feat(ui): component redesign pass and fixes, release ui 0.8.87

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>
This commit is contained in:
ClintchizandClaude Opus 5.5 committed 2026-09-30 16:18:13 +05:30
1 parent 5eae6f3b3c
commit 1bed8e4b74
93 files changed
+4439 -1915

No files matched your search

+101 -26
View File
@@ -25,6 +25,25 @@ component ChatBubble {
return item.direction === "outgoing" ? "outgoing" : "incoming"
}
// Delivery receipt from item.receipt, or from a status label that names one.
shared function receipt(item, value) {
value = String(item.receipt || item.status || "").toLowerCase()
if (value === "seen") { return "read" }
if (value === "sending" || value === "sent" || value === "delivered" || value === "read" || value === "failed" || value === "error") { return value }
return ""
}
shared function receiptLabel(item, value) {
value = receipt(item)
if (value === "sending") { return "Sending" }
if (value === "sent") { return "Sent" }
if (value === "delivered") { return "Delivered" }
if (value === "read") { return "Read" }
if (value === "failed") { return "Not delivered" }
if (value === "error") { return "Error" }
return ""
}
client function selectMessage(item, index) {
output.messageClick({
item: item,
@@ -66,6 +85,7 @@ component ChatBubble {
{...attrs}
class="wrn-component wrn-component--color-{color} wrn-component--size-{size} wrn-next--chat-bubble wrn-next--variant-{variant} {class}"
data-one-sided="{oneSided}"
data-avatars="{showAvatars}"
role="log"
aria-label="{ariaLabel}"
aria-live="polite"
@@ -128,11 +148,24 @@ component ChatBubble {
</div>
</div>
{#if showMetadata && (item.timestamp || item.status || item.actionLabel)}
<footer class="wrn-next__chat-meta" data-tone="{item.statusTone || 'muted'}">
{#if showMetadata && (item.timestamp || item.status || item.receipt || item.actionLabel)}
<footer class="wrn-next__chat-meta" data-tone="{item.statusTone || (receipt(item) === 'failed' || receipt(item) === 'error' ? 'danger' : 'muted')}" data-receipt="{receipt(item)}">
{#if item.statusIcon}<span class="{item.statusIcon}" aria-hidden="true"></span>{/if}
{#if item.status}<span>{item.status}</span>{/if}
{#if item.status && (!receipt(item) || receipt(item) === "failed" || receipt(item) === "error")}<span class="wrn-next__chat-status">{item.status}</span>{/if}
{#if item.timestamp}<time datetime="{item.datetime || ''}">{item.timestamp}</time>{/if}
{#if receipt(item)}
<span class="wrn-next__chat-receipt" data-receipt="{receipt(item)}" role="img" aria-label="{receiptLabel(item)}" title="{receiptLabel(item)}">
{#if receipt(item) === "sending"}
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><circle cx="8" cy="8" r="6"></circle><path d="M8 4.75V8l2 1.5"></path></svg>
{:else if receipt(item) === "sent"}
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3.5 8.5l3 3 6-7"></path></svg>
{:else if receipt(item) === "delivered" || receipt(item) === "read"}
<svg viewBox="0 0 20 16" width="17" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1.5 8.5l3 3 6-7"></path><path d="M8.5 11.5l.5.5 6-7.5"></path></svg>
{:else}
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><circle cx="8" cy="8" r="6"></circle><path d="M8 4.75v3.75"></path><path d="M8 11h.01"></path></svg>
{/if}
</span>
{/if}
{#if item.actionLabel}
<button type="button" @click="selectAction(event, item, index)">
{item.actionLabel}
@@ -183,7 +216,7 @@ component ChatBubble {
.wrn-next__chat-thread {
display: grid;
min-width: 0;
gap: 1.25rem;
gap: 0.875rem;
}
.wrn-next__chat-message {
@@ -191,7 +224,7 @@ component ChatBubble {
width: min(78%, 34rem);
min-width: 0;
justify-self: start;
gap: 0.4rem;
gap: 0.3rem;
}
.wrn-next__chat-message[data-direction="outgoing"] {
@@ -205,8 +238,8 @@ component ChatBubble {
.wrn-next__chat-row {
display: flex;
min-width: 0;
align-items: flex-start;
gap: 0.75rem;
align-items: flex-end;
gap: 0.5rem;
}
.wrn-next__chat-message[data-direction="outgoing"] .wrn-next__chat-row {
@@ -221,11 +254,14 @@ component ChatBubble {
.wrn-next__chat-content {
min-width: 0;
padding: var(--wrn-chat-padding);
padding: 0.625rem 0.875rem;
border: 1px solid var(--wrn-color-border);
border-radius: 1rem;
border-radius: 1.125rem 1.125rem 1.125rem 0.25rem;
background: var(--wrn-color-surface-raised, var(--wrn-color-surface));
box-shadow: var(--wrn-shadow-1);
color: var(--wrn-color-text);
font-size: 0.875rem;
line-height: 1.5;
cursor: pointer;
}
@@ -235,8 +271,10 @@ component ChatBubble {
}
.wrn-next__chat-message[data-direction="outgoing"] .wrn-next__chat-content {
border-color: var(--wrn-chat-color);
background: var(--wrn-chat-color);
border-color: color-mix(in srgb, var(--wrn-chat-color) 82%, black);
border-radius: 1.125rem 1.125rem 0.25rem 1.125rem;
background: linear-gradient(180deg, color-mix(in srgb, var(--wrn-chat-color) 94%, white), var(--wrn-chat-color));
box-shadow: var(--wrn-highlight-edge, none), 0 1px 2px color-mix(in srgb, var(--wrn-chat-color) 25%, transparent);
color: var(--wrn-color-primary-contrast, #fff);
}
@@ -268,8 +306,8 @@ component ChatBubble {
}
.wrn-next__chat-content a {
color: var(--wrn-chat-color);
font-weight: 650;
color: var(--wrn-color-primary-text, var(--wrn-chat-color));
font-weight: 600;
text-decoration: none;
}
@@ -280,17 +318,21 @@ component ChatBubble {
.wrn-next__chat-avatar {
display: grid;
flex: 0 0 2.5rem;
width: 2.5rem;
min-height: 2.5rem;
flex: 0 0 2rem;
width: 2rem;
min-height: 2rem;
height: 2rem;
overflow: hidden;
padding: 0;
place-items: center;
border: 1px solid var(--wrn-color-border);
border-radius: 999px;
background: var(--wrn-color-surface-raised, var(--wrn-color-surface));
color: var(--wrn-color-text);
background: color-mix(in srgb, var(--wrn-chat-color) 12%, var(--wrn-color-surface));
color: var(--wrn-color-primary-text, var(--wrn-chat-color));
font: inherit;
font-size: 0.72rem;
font-weight: 650;
cursor: pointer;
place-items: center;
}
.wrn-next__chat-avatar img {
@@ -308,9 +350,11 @@ component ChatBubble {
display: flex;
align-items: center;
gap: 0.3rem;
padding-inline: calc(2.5rem + 0.75rem);
color: var(--wrn-color-text-muted);
font-size: 0.78em;
padding-inline: 0.25rem;
color: var(--wrn-color-text-subtle, var(--wrn-color-text-muted));
font-size: 0.6875rem;
font-variant-numeric: tabular-nums;
line-height: 1;
}
.wrn-next__chat-message[data-direction="outgoing"] .wrn-next__chat-meta {
@@ -318,18 +362,19 @@ component ChatBubble {
}
.wrn-next__chat-meta[data-tone="danger"] {
color: var(--wrn-color-danger);
color: var(--wrn-color-danger-text, var(--wrn-color-danger));
}
.wrn-next__chat-meta button {
padding: 0;
border: 0;
background: transparent;
color: inherit;
color: var(--wrn-color-danger-text, var(--wrn-color-danger));
font: inherit;
font-weight: 700;
font-weight: 650;
cursor: pointer;
text-decoration: underline;
text-underline-offset: 0.2em;
}
@media (max-width: 640px) {
@@ -411,8 +456,38 @@ component ChatBubble {
.wrn-component p {
margin: 0;
color: var(--wrn-color-muted);
color: var(--wrn-color-text-muted, var(--wrn-color-muted));
line-height: 1.6;
}
.wrn-next--chat-bubble[data-avatars="true"] .wrn-next__chat-meta {
padding-inline: calc(2rem + 0.5rem + 0.25rem);
}
.wrn-next__chat-receipt {
display: inline-flex;
align-items: center;
color: var(--wrn-color-text-subtle, var(--wrn-color-text-muted));
}
.wrn-next__chat-receipt[data-receipt="read"] {
color: var(--wrn-color-info, var(--wrn-color-primary));
}
.wrn-next__chat-receipt:is([data-receipt="failed"], [data-receipt="error"]) {
color: var(--wrn-color-danger);
}
.wrn-next__chat-receipt[data-receipt="sending"] svg {
animation: wrn-chat-sending 1.6s linear infinite;
}
@keyframes wrn-chat-sending {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.wrn-next__chat-receipt[data-receipt="sending"] svg { animation: none; }
}
}
}