feat: add UI primitive library — Button, Card, Input, Badge, Modal, Toast

- Add cn() utility for class merging in lib/utils.ts
- Button: primary/secondary/ghost/danger variants, sm/md/lg sizes, disabled/loading states
- Card: gradient-card background with optional header/footer slots
- Input: text/email/password/number types with label, error, helper text, focus ring
- Badge: default/success/warning/error/info variants
- Modal: Portal-based dialog with focus trap, ESC/backdrop close, animations
- Toast: ToastProvider context with show/dismiss/auto-dismiss and variant support
- Barrel export via index.ts
- 46 unit tests across all primitives
- Configure vitest with vite-plugin-solid for JSX support
This commit is contained in:
2026-05-25 13:03:00 -04:00
parent 06bf9ac97c
commit 4118a25388
12 changed files with 1019 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
export { default as Button } from "./Button";
export { default as Card } from "./Card";
export { default as Input } from "./Input";
export { default as Badge } from "./Badge";
export { default as Modal } from "./Modal";
export { ToastProvider, useToast } from "./Toast";