Skip to content

feat(ui): polish core components with additive variants - #157

Merged
antosubash merged 3 commits into
mainfrom
claude/improve-design-system-NAPKg
May 11, 2026
Merged

feat(ui): polish core components with additive variants#157
antosubash merged 3 commits into
mainfrom
claude/improve-design-system-NAPKg

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

Additive polish to the core UI primitives in @simplemodule/ui and @simplemodule/theme-default. All changes are backwards-compatible — existing call sites use the default variant and need no updates.

What changed

  • Dialogsize prop with sm | default | lg | xl | full so modules can drop hardcoded sm:max-w-lg overrides.
  • ButtonisLoading + loadingText props that render an inline spinner and set aria-busy; new size="icon" variant; standard focus-visible ring on the base.
  • Inputprefix / suffix slots that absolute-position adornments inside the field with auto-padding, and a wrapperClassName for outer customization.
  • Card — extracted cardVariants with variant (default / flat / elevated / ghost) and padding (none / sm / default / lg). Default behaviour unchanged.
  • AppLayout — sidebar nav classes moved from inline TSX constants into theme as .sidebar-nav-link-active / -inactive with focus-visible ring, so styling is themable.
  • Theme — new .focus-ring and .focus-ring-danger utilities for consistent focus treatment across custom interactive elements.

Why

The base library had high adoption (97 import sites) but a few rough edges showed up repeatedly: dialogs with hardcoded widths in module pages, no isLoading button state, no input adornment slots, and nav classes hardcoded in app-layout.tsx. These additions cover the common asks without touching any consumer.

Test plan

  • npm run check:fix (biome) clean
  • npm run validate-pages clean
  • npm run build (all module Vite library builds + ClientApp) succeeds
  • dotnet build succeeds with 0 warnings / 0 errors
  • Visual smoke check: open a page using Dialog / Button / Input / Card and confirm default rendering is unchanged
  • Try a <Dialog><DialogContent size="lg"> and <Button isLoading>Save</Button> in a module page

Generated by Claude Code

- Dialog: add size variants (sm/default/lg/xl/full); modules can drop
hardcoded sm:max-w-lg overrides.
- Button: add isLoading + loadingText props with inline spinner; size
gains an icon variant; add focus-visible ring.
- Input: add prefix/suffix slots that auto-pad the field and merge
cleanly with existing variants.
- Card: extract cardVariants with variant (default/flat/elevated/ghost)
and padding (none/sm/default/lg) options.
- AppLayout: extract sidebar nav classes into theme as
.sidebar-nav-link-active / -inactive (with focus-visible ring) so
styling is themable rather than hardcoded in tsx.
- Theme: add .focus-ring and .focus-ring-danger utilities for
consistent focus treatment across custom interactive elements.
All changes are backwards-compatible - existing call sites use the
default variant and need no updates.
@cloudflare-workers-and-pages

cloudflare-workers-and-pagesBot commented May 9, 2026

Copy link
Copy Markdown

Deploying simplemodule-website with Cloudflare Pages Cloudflare Pages

Latest commit:56279c9
Status: ✅ Deploy successful!
Preview URL:https://fab16643.simplemodule-website.pages.dev
Branch Preview URL:https://claude-improve-design-system.simplemodule-website.pages.dev

View logs

claudeand others added 2 commits May 9, 2026 20:51
Reconcile #155 (Card m-2 margin) with this branch's CVA-based Card
refactor by adding `m-2` to the cardVariants base classes so the
default visual is preserved across all variant/padding combinations.
Also fix a TS2430 conflict surfaced by `npm run typecheck` after the
merge: HTMLInputElement has a built-in `prefix?: string` (RDFa)
attribute, which collided with our new `prefix?: ReactNode` slot.
Resolved by `Omit<..., 'prefix'>` on the InputProps base interface.
@antosubash
antosubash marked this pull request as ready for review May 11, 2026 15:24
@antosubash
antosubash merged commit f0cfe2e into mainMay 11, 2026
6 checks passed
@antosubash
antosubash deleted the claude/improve-design-system-NAPKg branch May 11, 2026 15:32
antosubash added a commit that referenced this pull request May 20, 2026
Catches the site up with PRs since the last sync (#119):
- Adds guides for Notifications (#194), Rate Limiting (#206),
Broadcasting (#193), and Identity & Sessions (#187/#188/#185/#198).
- Documents signed URLs (#195) in the File Storage guide.
- Replaces the "not a durable queue" warning in events.md with the
actual Wolverine inbox/outbox story (#192).
- Refreshes Button variants in the components reference (#157).
- Rewrites docs/missing-cross-cutting-modules.md to mark the now-
covered modules done and trim the open backlog.
- Sidebar updated; pre-existing `<T>` parse error in soft-delete.md
fixed so the build is green.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@antosubash@claude