Design tokens: ipal-tokens CLI, components on single names, templates, tests

- bin ipal-tokens: src/design/tokens.ts → src/design/tokens.css, --check, WCAG
  contrast report (fails on AA errors; --report, --warn-only)
- CookieBanner / CookieButton read the single --ipal-* roles; the fallback follows
  color-scheme via light-dark() and still honours the legacy -dark variables
- lightbox fade reads --ipal-duration / --ipal-ease-out
- DESIGN.md and tokens.ts templates in ipal-setup/resources

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 13:55:59 +01:00
co-authored by Claude Opus 5.5
parent 9511b12d19
commit ca8e93eaf4
11 changed files with 391 additions and 23 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ export function LightboxDialog({
const style = (key: keyof typeof STYLES, extra?: CSSProperties): CSSProperties | undefined =>
unstyled ? undefined : { ...(key === 'close' || key === 'next' || key === 'previous' ? STYLES.button : {}), ...STYLES[key], ...extra }
const motion = prefersReducedMotion()
const dialogStyle = style('dialog', motion ? undefined : { opacity: visible ? 1 : 0, transition: `opacity ${v('duration', '200ms')} ease` })
const dialogStyle = style('dialog', motion ? undefined : { opacity: visible ? 1 : 0, transition: `opacity ${v('duration', 'var(--ipal-duration, 200ms)')} ${v('easing', 'var(--ipal-ease-out, ease)')}` })
const canPrev = loop || current > 0
const canNext = loop || current < total - 1
const step = (delta: number) => onIndexChange(lightboxIndex(current, delta, total, loop))