Skip to content

feat: add Modal compound component to registry#2

Open
calebpanza wants to merge 2 commits into
mainfrom
cyrus/cui-1-add-modal-component-with-post-for-me-and-dxlogic-references
Open

feat: add Modal compound component to registry#2
calebpanza wants to merge 2 commits into
mainfrom
cyrus/cui-1-add-modal-component-with-post-for-me-and-dxlogic-references

Conversation

@calebpanza

@calebpanza calebpanza commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Assignee: Caleb Panza

Summary

Adds the Modal compound-component family to the crescent-ui shadcn registry (CUI-1). The family is authored as registry source one level up from the resolved app output (the Post for Me / DXLogic copies are the result of a shadcn add): cn-* tokens instead of literal colors, IconPlaceholder instead of a hard icon import, dual-base (Base UI + Radix), and a self-contained item that ships its own css.

This PR now delivers the full family — Layout + Views + Carousel — reconciled from the pasted Post for Me reference and the live DXLogic copy (web/app/components/modal/), which were verified byte-identical.

What's in the family

  • LayoutModal/ModalContent (framed | simple), ModalHeader/ModalBody/ModalColumns·ModalColumn·ModalAside/ModalFooter.
  • Carousel (this commit) — ModalCarousel/ModalCarouselViewport/ModalSlide/ModalCarouselDots/ModalCarouselNav + useModalCarousel. Ordered horizontal slides with deliberate, button-driven stepping (drag off).
  • Views — replace-style inner navigation: ModalViews/ModalView/ModalViewsBack + useModalViews.

How the carousel slice fits the registry model

carousel is a stock shadcn primitive, so — exactly like dialog and button — it's referenced via registryDependencies rather than re-authored as a crescent item. The modal source composes the consumer's @/ui/carousel; embla arrives transitively through that primitive. An app/ui/carousel.tsx (embla) is added solely so the showcase can render the carousel live.

Changes

  • registry/bases/{base,radix}/ui/modal.tsx — merged the ModalCarousel parts into the single source (mirrors how ModalViews was merged).
  • scripts/build-registry.ts + registry.jsoncarousel added to modal's registryDependencies; descriptions refreshed.
  • app/ui/carousel.tsx (new), embla-carousel-react dependency — showcase rendering.
  • app/showcase/components/modal-demo.tsx + demos.tsx — a "Slidable carousel" example.
  • registry-dist/*/modal.json ×16 — regenerated.

Verification

  • registry:build — 32 items, no unresolved cn-*.
  • typecheck, lint, full build (SSR + client) — all green.
  • Carousel renders correctly in the showcase (verified via screenshot: dots track progress, Back hides on first slide, Next → Finish on last).

Closes CUI-1.


Tip: I will respond to comments that @ mention @cyrus-daymoon on this PR. You can also submit a review with all your feedback at once, and I will automatically wake up to address each comment.

Add a Modal compound-component family to the crescent-ui shadcn registry,
generalized from the Post for Me dashboard and DXLogic app-level modal
implementations into registry source (cn-* tokens, icon-agnostic, dual-base).

- registry/bases/{base,radix}/ui/modal.tsx — Modal layout (Header/Body/
  Columns/Aside/Footer) + replace-style ModalViews navigation, composed on
  the consumer's dialog + button (registryDependencies)
- app/ui/dialog.tsx — Base UI Dialog chrome the showcase renders Modal on
- cn-dialog-content radius token across all 8 styles
- modal-view keyframes shipped via the registry item css field (+ app.css
  for the live showcase)
- build-registry.ts: emit registryDependencies + css; registry.json + demo

Carousel slides are a planned follow-up (needs embla + a Carousel primitive).
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crescent-ui Ready Ready Preview, Comment Jun 29, 2026 3:04pm

Request Review

Add the slidable carousel variation (ModalCarousel, ModalCarouselViewport,
ModalSlide, ModalCarouselDots, ModalCarouselNav, useModalCarousel) to the
Modal registry source, completing the full family reconciled from the Post
for Me and DXLogic references.

- Merge carousel parts into the single registry modal.tsx (base + radix),
  composing the consumer's stock shadcn carousel via @/ui/carousel
- Add carousel to modal's registryDependencies (alongside dialog + button)
- Add app/ui/carousel.tsx (embla) so the showcase renders the carousel
- Add a Slidable carousel showcase example
- Rebuild registry-dist (32 items, no unresolved cn-*)
Sign up for free to 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.

1 participant