feat: add 13 components adapted from Oat UI

Components (.cljc + .css + tests):
- Alert (success/warning/danger/info variants)
- Badge (primary/secondary/outline/success/warning/danger)
- Card (card/card-header/card-body/card-footer)
- Accordion (collapsible with open/closed state)
- Table (headers/rows, striped/bordered variants)
- Dialog (modal with header/body/footer sections)
- Breadcrumb (nav with active item)
- Pagination (current/total with prev/next)
- Progress (value bar with color variants)
- Spinner (sm/md/lg sizes)
- Skeleton (line/box/circle/heading placeholders)
- Switch (toggle with checked/disabled states)
- Tooltip (hover text via data-tooltip attr)

CSS-only additions:
- Form elements (inputs, selects, checkboxes, radios, range, groups)
- Grid (12-column system with offsets, responsive)
- Utilities (flex, spacing, alignment, sr-only)

Also adds warning/fg-on-warning tokens to light and dark themes.
All 3 dev targets updated with full component showcase.
40 tests, 213 assertions, all passing.
This commit is contained in:
Florian Schroedl
2026-03-03 11:37:05 +01:00
parent d55e3d3a90
commit 18043cb150
47 changed files with 2556 additions and 106 deletions

59
src/ui/dialog.css Normal file
View File

@@ -0,0 +1,59 @@
.dialog {
position: fixed;
inset: 0;
z-index: 50;
width: min(100% - 2rem, 32rem);
max-height: 85vh;
margin: auto;
padding: 0;
background: var(--bg-1);
border: var(--border-0);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-3);
overflow: hidden;
}
.dialog[open] {
display: flex;
flex-direction: column;
}
.dialog::backdrop {
background: rgba(0, 0, 0, 0.5);
}
.dialog-header {
display: flex;
flex-direction: column;
gap: var(--size-1);
padding: var(--size-6);
padding-bottom: 0;
}
.dialog-header h1,
.dialog-header h2,
.dialog-header h3,
.dialog-header h4,
.dialog-header h5,
.dialog-header h6 {
margin: 0;
}
.dialog-header p {
font-size: var(--font-sm);
color: var(--fg-2);
margin: 0;
}
.dialog-body {
padding: var(--size-6);
overflow-y: auto;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: var(--size-2);
padding: var(--size-6);
padding-top: 0;
}