Files
WRNexusJS/packages/ui/components/progress.wrn
T
ClintchizandClaude Opus 5.5 1bed8e4b74 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>
2026-09-30 16:18:13 +05:30

87 lines
3.4 KiB
Plaintext

component Progress {
props {
size: string = "default"
color: string = "primary"
label: string = "Progress"
value: number = 50
max: number = 100
showValue: boolean = true
class: string = ""
}
view {
<div class="wrn-progress-component {class}" data-color="{color}" data-size="{size}">
<div class="wrn-progress-component__row"><span>{label}</span>{#if showValue}<strong>{value}%</strong>{/if}</div>
<progress class="wrn-progress-component__track" value="{value}" max="{max}" aria-label="{label}"></progress>
</div>
}
style {
.wrn-progress-component {
--wrn-progress-color: var(--wrn-color-primary);
display: grid;
width: 100%;
gap: 0.5rem;
color: var(--wrn-color-text);
font-size: 0.875rem;
}
.wrn-progress-component[data-color="secondary"] { --wrn-progress-color: var(--wrn-color-secondary); }
.wrn-progress-component[data-color="success"] { --wrn-progress-color: var(--wrn-color-success); }
.wrn-progress-component[data-color="warning"] { --wrn-progress-color: var(--wrn-color-warning); }
.wrn-progress-component[data-color="danger"] { --wrn-progress-color: var(--wrn-color-danger); }
.wrn-progress-component[data-color="info"] { --wrn-progress-color: var(--wrn-color-info); }
.wrn-progress-component[data-size="xs"] { font-size: 0.75rem; }
.wrn-progress-component[data-size="lg"],
.wrn-progress-component[data-size="xl"] { font-size: 1rem; }
.wrn-progress-component__row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
font-weight: 550;
}
.wrn-progress-component__row > strong {
color: var(--wrn-color-text-muted, var(--wrn-color-muted));
font-family: var(--wrn-font-mono, monospace);
font-size: 0.8em;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
/* Recessed track, raised fill: the same keycap-on-well pairing as the
button and field. */
.wrn-progress-component__track {
appearance: none;
width: 100%;
height: 0.5rem;
overflow: hidden;
border: 0;
border-radius: 999px;
background: var(--wrn-color-surface-muted, var(--wrn-color-surface-2));
box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1);
accent-color: var(--wrn-progress-color);
}
.wrn-progress-component[data-size="xs"] .wrn-progress-component__track,
.wrn-progress-component[data-size="sm"] .wrn-progress-component__track { height: 0.3125rem; }
.wrn-progress-component[data-size="lg"] .wrn-progress-component__track,
.wrn-progress-component[data-size="xl"] .wrn-progress-component__track { height: 0.75rem; }
.wrn-progress-component__track::-webkit-progress-bar {
background: var(--wrn-color-surface-muted, var(--wrn-color-surface-2));
border-radius: 999px;
}
.wrn-progress-component__track::-webkit-progress-value {
border-radius: 999px;
background: linear-gradient(180deg, color-mix(in srgb, var(--wrn-progress-color) 88%, white), var(--wrn-progress-color));
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
transition: width var(--wrn-motion-slow) var(--wrn-ease-emphasized);
}
.wrn-progress-component__track::-moz-progress-bar {
border-radius: 999px;
background: linear-gradient(180deg, color-mix(in srgb, var(--wrn-progress-color) 88%, white), var(--wrn-progress-color));
}
}
}