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

43
src/ui/tooltip.css Normal file
View File

@@ -0,0 +1,43 @@
.tooltip {
position: relative;
display: inline-block;
}
.tooltip::before,
.tooltip::after {
position: absolute;
left: 50%;
opacity: 0;
visibility: hidden;
transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
pointer-events: none;
z-index: 1000;
}
.tooltip::after {
content: attr(data-tooltip);
bottom: calc(100% + 10px);
transform: translateX(-50%) translateY(4px);
padding: var(--size-2) var(--size-3);
font-size: var(--font-xs);
line-height: 1;
white-space: nowrap;
background: var(--fg-0);
color: var(--bg-0);
border-radius: var(--radius-md);
}
.tooltip::before {
content: "";
bottom: calc(100% - 5px);
transform: translateX(-50%) translateY(4px);
border: 6px solid transparent;
border-top-color: var(--fg-0);
}
.tooltip:hover::before,
.tooltip:hover::after {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
}