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:
43
src/ui/alert.css
Normal file
43
src/ui/alert.css
Normal file
@@ -0,0 +1,43 @@
|
||||
.alert {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: var(--size-3);
|
||||
padding: var(--size-4) var(--size-6);
|
||||
background: var(--bg-1);
|
||||
border: var(--border-0);
|
||||
border-radius: var(--radius-md);
|
||||
font-size: var(--font-sm);
|
||||
}
|
||||
|
||||
.alert-title {
|
||||
font-weight: 600;
|
||||
margin: 0 0 var(--size-1) 0;
|
||||
}
|
||||
|
||||
.alert-body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
border: none;
|
||||
color: var(--success);
|
||||
background: color-mix(in srgb, var(--success) 10%, var(--bg-0));
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
border: none;
|
||||
color: var(--warning);
|
||||
background: color-mix(in srgb, var(--warning) 10%, var(--bg-0));
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
border: none;
|
||||
color: var(--danger);
|
||||
background: color-mix(in srgb, var(--danger) 10%, var(--bg-0));
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
border: none;
|
||||
color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 10%, var(--bg-0));
|
||||
}
|
||||
Reference in New Issue
Block a user