Redesign - Shared field foundation rules (duplicated across 15 form components and emitted globally) are now identical everywhere, so later copies no longer silently override earlier redesigns. - Drawn checkbox and radio controls, white switch thumbs (the thumb was the text colour, a black blob in light mode), recessed field wells, keycap actions in Modal, Drawer, Popover, Toaster, Pagination, Stepper, DataTable. - Menus (Dropdown, ContextMenu, Popover, Select dropdown, Navbar panels) share one flat raised panel with neutral hover rows and mono section labels. - Alerts with an accent rail and icon chip; card headers without the grey band; accordion, collapse, list, list group, timeline, stats, metrics, chat, skeleton, avatar group, clipboard, splitter, section, sidebar, navbar and upload progress restyled. - Chart rebuilt: nice y-axis ticks, gridlines, rounded bars, line and area modes, hover tooltips, hidden series leave the scale. Fixes - Checkbox and radio labels toggle their input again (empty for="" broke it). - TimePicker kept every clicked time pressed; only the chosen hour and minute are pressed now, and nothing is pressed before a value exists. - ColorPicker hex readout now follows the picked colour. - Disabled FileInput no longer shows the native file-input text. - Date and time panels float instead of pushing content. - ContextMenu opened at the pointer closes on scroll. - Drawer left/top/bottom placements slide from their own edge again. - Image-only Card no longer renders an empty body strip. - Timeline supports item.time, current/upcoming states, sizes and compact/alternate variants; showcase demos use distinct variants. - ChatBubble: delivery receipts (sending/sent/delivered/read/failed/error) and meta aligned to its bubble. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
component Spinner {
|
|
props {
|
|
color: string = "primary"
|
|
label: string = "Loading"
|
|
size: string = "md"
|
|
lines: number = 3
|
|
class: string = ""
|
|
}
|
|
view {
|
|
<div class="wrn-spinner-component {class}" data-color="{color}" data-size="{size}" role="status" aria-label="{label}">
|
|
<i class="wrn-spinner-component__indicator" aria-hidden="true"></i>
|
|
</div>
|
|
}
|
|
|
|
style {
|
|
.wrn-spinner-component {
|
|
--wrn-spinner-size: 1.5rem;
|
|
--wrn-spinner-color: var(--wrn-color-primary);
|
|
display: inline-grid;
|
|
place-items: center;
|
|
}
|
|
|
|
.wrn-spinner-component[data-size="xs"] { --wrn-spinner-size: 0.875rem; }
|
|
.wrn-spinner-component[data-size="sm"] { --wrn-spinner-size: 1.125rem; }
|
|
.wrn-spinner-component[data-size="lg"] { --wrn-spinner-size: 2rem; }
|
|
.wrn-spinner-component[data-size="xl"] { --wrn-spinner-size: 2.5rem; }
|
|
.wrn-spinner-component[data-color="secondary"] { --wrn-spinner-color: var(--wrn-color-secondary); }
|
|
.wrn-spinner-component[data-color="success"] { --wrn-spinner-color: var(--wrn-color-success); }
|
|
.wrn-spinner-component[data-color="warning"] { --wrn-spinner-color: var(--wrn-color-warning); }
|
|
.wrn-spinner-component[data-color="danger"] { --wrn-spinner-color: var(--wrn-color-danger); }
|
|
.wrn-spinner-component[data-color="info"] { --wrn-spinner-color: var(--wrn-color-info); }
|
|
|
|
.wrn-spinner-component__indicator {
|
|
display: block;
|
|
width: var(--wrn-spinner-size);
|
|
height: var(--wrn-spinner-size);
|
|
border: 2px solid color-mix(in srgb, var(--wrn-spinner-color) 16%, transparent);
|
|
border-top-color: var(--wrn-spinner-color);
|
|
border-right-color: var(--wrn-spinner-color);
|
|
border-radius: 50%;
|
|
animation: wrn-spinner-component-spin 650ms cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
|
|
}
|
|
|
|
@keyframes wrn-spinner-component-spin { to { transform: rotate(360deg); } }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.wrn-spinner-component__indicator { animation-duration: 1.8s; }
|
|
}
|
|
}
|
|
}
|