Commit Graph

11 Commits

Author SHA1 Message Date
Florian Schroedl
5cb339e04b fix(tooltip): close gap between arrow and tooltip box
The triangle's `bottom` offset was too large, leaving a visible gap
(and 1px sub-pixel seam) between the arrow and the tooltip body.
Changed from `calc(100% - 5px)` to `calc(100% - 1px)` so the arrow
slightly overlaps the box, eliminating the gap.
2026-03-03 12:03:29 +01:00
Florian Schroedl
398811305c fix(alert): vertically center alert content
Add align-items: center to .alert flex container and remove bottom
margin from .alert-title that was offsetting the text.
2026-03-03 12:00:08 +01:00
Florian Schroedl
b3da46ac02 feat(dialog): close dialog on backdrop click
Add click handlers to the dialog component for all three targets that
close the dialog when clicking the backdrop area (outside the dialog box).
Uses event.target === event.currentTarget to distinguish backdrop clicks
from content clicks.

- :clj — inline onclick attribute
- :cljs — Replicant :on {:click handler}
- :squint — :on-click handler
- CSS: cursor: pointer on ::backdrop for affordance
2026-03-03 11:50:30 +01:00
Florian Schroedl
c36ee05c68 fix: set dialog text color to use theme foreground
The native `<dialog>` element has browser-default black text that
doesn't inherit from the body, making it unreadable in dark mode.
2026-03-03 11:43:20 +01:00
Florian Schroedl
a9f4f4158c fix: align dev target inconsistencies across hiccup, replicant, squint
- Squint section helper: add missing inner flex-column wrapper div
  (was putting children directly in section, unlike hiccup/replicant)
- Hiccup accordion text: shorten to match replicant/squint wording
- Squint dialog ID: rename "demo-dialog-sq" → "demo-dialog" to match others
2026-03-03 11:41:14 +01:00
Florian Schroedl
18043cb150 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.
2026-03-03 11:37:05 +01:00
Florian Schroedl
d55e3d3a90 refactor: remove all CSS transition animations
Remove transition properties from body (background-color/color) and
button (background-color/box-shadow/opacity) styles.
2026-03-03 11:19:59 +01:00
Florian Schroedl
609613f4fb feat: add algorithmic size and font scales
Add :scales config to tokens.edn with two generated scales:
- Size (linear): --size-1 through --size-16, base 0.25rem × N
- Font (geometric): --font-xs through --font-3xl, ratio 1.25

gen.clj computes values and emits them into :root only (not dark
theme blocks). button.css now uses scale vars instead of raw rem.
Change base or ratio in tokens.edn to recompute the entire scale.
2026-03-03 11:16:23 +01:00
Florian Schroedl
988617617c refactor: replace BEM with utility classes, move component CSS to files
- Rename CSS classes from BEM double-dash (btn--primary) to flat
  utility-style single-dash (btn-primary)
- Move button CSS from inline Clojure string in gen.clj to
  src/ui/button.css next to button.cljc
- gen.clj now auto-collects all src/ui/*.css files via babashka.fs glob
- Replace clojure.java.io with babashka.fs throughout gen.clj
- Update AGENTS.md to reflect new conventions
2026-03-03 11:11:47 +01:00
Florian Schroedl
6b4899f8bf refactor: centralize body base styles in theme.css
Move font-family, background, color, margin, and transition from
duplicated inline <style> blocks in each dev target into the CSS
generator (base-css). Dev pages now only set page-specific padding.

Also fixes hiccup target rendering the wrong font due to hiccup2
HTML-escaping quotes inside <style> tags, and adds missing <!DOCTYPE>.
2026-03-03 11:04:27 +01:00
Florian Schroedl
42ddb56d65 Init 2026-03-03 11:02:08 +01:00