{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"react-modal-popup-dialog-with-focus-trap-confirm-form-bottom-sheet-and-side-drawer","type":"registry:component","title":"React Modal Popup Dialog with Focus Trap, Confirm, Form, Bottom Sheet and Side Drawer","description":"Free React modal popup in one file: focus trap, Escape to close, scroll lock, focus return, click outside. Confirm, form, bottom sheet and drawer.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/react-modal-popup-dialog-with-focus-trap-confirm-form-bottom-sheet-and-side-drawer.tsx","type":"registry:component","content":"import { useEffect, useId, useRef, useState, type ReactNode, type RefObject } from \"react\";\nimport { AnimatePresence, motion, useReducedMotion, type PanInfo } from \"framer-motion\";\n\n/*\n  React modal popup in one file, four variants.\n  In your app: wrap <Modal> output in createPortal(..., document.body) from react-dom,\n  change \"absolute\" to \"fixed\" on the overlay and panel, and pass document.body to\n  lockScroll. The demo keeps everything inside a framed box so it can be previewed.\n*/\n\ntype Variant = \"center\" | \"sheet\" | \"drawer\";\ntype Which = \"confirm\" | \"form\" | \"sheet\" | \"drawer\" | null;\n\nconst FOCUSABLE =\n  'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])';\n\nconst projects = [\n  { name: \"Spring lookbook\", pages: 6, edited: \"2 hours ago\", tone: \"#d9e7dd\", img: \"https://images.pexels.com/photos/39835429/pexels-photo-39835429.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Woman in a red blouse posing on a resort balcony by the pool\" },\n  { name: \"Harbour Dental\", pages: 4, edited: \"Yesterday\", tone: \"#dfe6f1\", img: \"https://images.pexels.com/photos/4270379/pexels-photo-4270379.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Dentist treating a patient in a bright modern clinic\" },\n  { name: \"Fold & Grain bakery\", pages: 8, edited: \"Mon\", tone: \"#f1e6d6\", img: \"https://images.pexels.com/photos/8633662/pexels-photo-8633662.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Freshly baked rustic sourdough loaves and buns\" },\n  { name: \"Northfield Cycling\", pages: 5, edited: \"Last week\", tone: \"#e9e1ef\", img: \"https://images.pexels.com/photos/5735768/pexels-photo-5735768.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Smiling cyclist racing a road bike on a sunny day\" },\n  { name: \"Lumen Studio\", pages: 3, edited: \"Sep 28\", tone: \"#f3dfdc\", img: \"https://images.pexels.com/photos/30332804/pexels-photo-30332804.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Photography studio with a mocha backdrop and lighting\" },\n  { name: \"Orchard Lane Rentals\", pages: 7, edited: \"Sep 21\", tone: \"#e1ece9\", img: \"https://images.pexels.com/photos/8146214/pexels-photo-8146214.jpeg?auto=compress&cs=tinysrgb&w=600\", alt: \"Bright empty room with wooden floors in a rental flat\" },\n];\n\nconst lineItems = [\n  { label: \"Studio plan, October\", amount: 29 },\n  { label: \"Extra domain: harbourdental.example\", amount: 12 },\n  { label: \"Storage, 20 GB add-on\", amount: 4 },\n];\n\n/* Locks scrolling on one element and keeps the scrollbar gap so nothing shifts. */\nfunction lockScroll(el: HTMLElement) {\n  const gap = el.offsetWidth - el.clientWidth;\n  const prev = { overflow: el.style.overflow, paddingRight: el.style.paddingRight };\n  el.style.overflow = \"hidden\";\n  if (gap > 0) el.style.paddingRight = `${gap}px`;\n  return () => {\n    el.style.overflow = prev.overflow;\n    el.style.paddingRight = prev.paddingRight;\n  };\n}\n\nfunction useDialogBehaviour(opts: {\n  open: boolean;\n  onClose: () => void;\n  panelRef: RefObject<HTMLDivElement>;\n  backgroundRef: RefObject<HTMLElement>;\n  scrollRef: RefObject<HTMLElement>;\n  triggerRef: RefObject<HTMLButtonElement>;\n  initialFocusRef?: RefObject<HTMLElement>;\n  moveFocus: boolean;\n}) {\n  const { open, onClose, panelRef, backgroundRef, scrollRef, triggerRef, initialFocusRef, moveFocus } = opts;\n  const closeRef = useRef(onClose);\n  closeRef.current = onClose;\n\n  useEffect(() => {\n    if (!open) return;\n    const bg = backgroundRef.current;\n    const scroller = scrollRef.current;\n    bg?.setAttribute(\"inert\", \"\");\n    bg?.setAttribute(\"aria-hidden\", \"true\");\n    const unlock = scroller ? lockScroll(scroller) : undefined;\n\n    if (moveFocus) {\n      const target = initialFocusRef?.current ?? panelRef.current?.querySelector<HTMLElement>(FOCUSABLE);\n      requestAnimationFrame(() => target?.focus({ preventScroll: true }));\n    }\n\n    const onKey = (e: KeyboardEvent) => {\n      const panel = panelRef.current;\n      if (!panel) return;\n      if (e.key === \"Escape\") {\n        e.preventDefault();\n        closeRef.current();\n        return;\n      }\n      if (e.key !== \"Tab\" || !panel.contains(document.activeElement)) return;\n      const items = Array.from(panel.querySelectorAll<HTMLElement>(FOCUSABLE)).filter((n) => n.offsetParent !== null);\n      if (!items.length) return;\n      const first = items[0];\n      const last = items[items.length - 1];\n      if (e.shiftKey && document.activeElement === first) {\n        e.preventDefault();\n        last.focus();\n      } else if (!e.shiftKey && document.activeElement === last) {\n        e.preventDefault();\n        first.focus();\n      }\n    };\n    document.addEventListener(\"keydown\", onKey);\n\n    return () => {\n      document.removeEventListener(\"keydown\", onKey);\n      bg?.removeAttribute(\"inert\");\n      bg?.removeAttribute(\"aria-hidden\");\n      unlock?.();\n      if (moveFocus || panelRef.current?.contains(document.activeElement)) {\n        triggerRef.current?.focus({ preventScroll: true });\n      }\n    };\n  }, [open, moveFocus, backgroundRef, scrollRef, panelRef, triggerRef, initialFocusRef]);\n}\n\nfunction Modal(props: {\n  open: boolean;\n  onClose: () => void;\n  variant: Variant;\n  title: string;\n  description?: string;\n  role?: \"dialog\" | \"alertdialog\";\n  closeOnOverlay?: boolean;\n  backgroundRef: RefObject<HTMLElement>;\n  scrollRef: RefObject<HTMLElement>;\n  triggerRef: RefObject<HTMLButtonElement>;\n  initialFocusRef?: RefObject<HTMLElement>;\n  moveFocus: boolean;\n  children: ReactNode;\n  footer?: ReactNode;\n}) {\n  const { open, onClose, variant, title, description, role = \"dialog\", closeOnOverlay = true, children, footer } = props;\n  const panelRef = useRef<HTMLDivElement>(null);\n  const titleId = useId();\n  const descId = useId();\n  const reduce = useReducedMotion();\n  useDialogBehaviour({ ...props, panelRef });\n\n  const spring = reduce ? { duration: 0 } : { type: \"spring\" as const, stiffness: 420, damping: 36, mass: 0.9 };\n  const motionFor: Record<Variant, { initial: object; animate: object; exit: object }> = {\n    center: { initial: { opacity: 0, y: 14, scale: 0.97 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: 8, scale: 0.98 } },\n    sheet: { initial: { y: \"100%\" }, animate: { y: 0 }, exit: { y: \"100%\" } },\n    drawer: { initial: { x: \"100%\" }, animate: { x: 0 }, exit: { x: \"100%\" } },\n  };\n  const placement: Record<Variant, string> = {\n    center:\n      \"inset-0 sm:inset-auto sm:left-1/2 sm:top-1/2 sm:w-[min(440px,calc(100%-32px))] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-2xl\",\n    sheet: \"inset-x-0 bottom-0 max-h-[88%] rounded-t-3xl sm:mx-auto sm:max-w-lg\",\n    drawer: \"inset-y-0 right-0 w-full max-w-sm sm:rounded-l-2xl\",\n  };\n\n  const onDragEnd = (_: unknown, info: PanInfo) => {\n    if (info.offset.y > 110 || info.velocity.y > 600) onClose();\n  };\n\n  return (\n    <AnimatePresence>\n      {open && (\n        <>\n          <motion.div\n            key=\"overlay\"\n            className=\"absolute inset-0 z-40 bg-stone-950/45\"\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            transition={{ duration: reduce ? 0 : 0.2 }}\n            onClick={closeOnOverlay ? onClose : undefined}\n            aria-hidden=\"true\"\n          />\n          {/* Wrapper carries the CSS centring transform so framer-motion can own the inner one. */}\n          <div className={`absolute z-50 flex flex-col ${placement[variant]}`}>\n            <motion.div\n              ref={panelRef}\n              role={role}\n              aria-modal=\"true\"\n              aria-labelledby={titleId}\n              aria-describedby={description ? descId : undefined}\n              className={`flex min-h-0 flex-1 flex-col overflow-hidden bg-white shadow-[0_24px_60px_-12px_rgba(20,18,15,0.35),0_0_0_1px_rgba(20,18,15,0.06)] ${\n                variant === \"center\" ? \"sm:rounded-2xl\" : variant === \"sheet\" ? \"rounded-t-3xl\" : \"sm:rounded-l-2xl\"\n              }`}\n              {...motionFor[variant]}\n              transition={spring}\n              drag={variant === \"sheet\" && !reduce ? \"y\" : false}\n              dragConstraints={{ top: 0, bottom: 0 }}\n              dragElastic={{ top: 0, bottom: 0.6 }}\n              onDragEnd={variant === \"sheet\" ? onDragEnd : undefined}\n            >\n              {variant === \"sheet\" && (\n                <div className=\"flex justify-center pt-3\" aria-hidden=\"true\">\n                  <span className=\"h-1.5 w-10 rounded-full bg-stone-300\" />\n                </div>\n              )}\n              <div className=\"flex items-start gap-4 px-6 pt-5\">\n                <div className=\"min-w-0 flex-1\">\n                  <h2 id={titleId} className=\"text-[17px] font-semibold tracking-tight text-stone-900\">\n                    {title}\n                  </h2>\n                  {description && (\n                    <p id={descId} className=\"mt-1 text-sm leading-relaxed text-stone-600\">\n                      {description}\n                    </p>\n                  )}\n                </div>\n                {role === \"dialog\" && (\n                  <button\n                    type=\"button\"\n                    onClick={onClose}\n                    aria-label=\"Close\"\n                    className=\"-mr-2 -mt-1 grid h-10 w-10 shrink-0 place-items-center rounded-full text-stone-500 transition-colors hover:bg-stone-100 hover:text-stone-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-700\"\n                  >\n                    <svg width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\">\n                      <path d=\"M5 5l10 10M15 5L5 15\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n                    </svg>\n                  </button>\n                )}\n              </div>\n              <div className=\"min-h-0 flex-1 overflow-y-auto px-6 pb-2 pt-4\">{children}</div>\n              {footer && <div className=\"flex flex-col-reverse gap-2 border-t border-stone-100 px-6 py-4 sm:flex-row sm:justify-end\">{footer}</div>}\n            </motion.div>\n          </div>\n        </>\n      )}\n    </AnimatePresence>\n  );\n}\n\nconst btn =\n  \"inline-flex h-10 items-center justify-center rounded-xl px-4 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 active:scale-[0.98] motion-reduce:transform-none\";\nconst btnPrimary = `${btn} bg-stone-900 text-white hover:bg-stone-800 focus-visible:ring-emerald-700`;\nconst btnGhost = `${btn} border border-stone-200 bg-white text-stone-800 hover:bg-stone-50 focus-visible:ring-emerald-700`;\nconst btnDanger = `${btn} bg-red-600 text-white hover:bg-red-700 focus-visible:ring-red-600`;\n\nexport default function ReactModalPopupDialogs() {\n  // Starts open so the preview shows a dialog; nothing steals focus until someone clicks.\n  const [open, setOpen] = useState<Which>(\"form\");\n  const [userOpened, setUserOpened] = useState(false);\n  const [name, setName] = useState(\"Autumn menu\");\n  const [visibility, setVisibility] = useState(\"team\");\n  const [error, setError] = useState(\"\");\n  const [copied, setCopied] = useState(false);\n  const [access, setAccess] = useState(\"view\");\n\n  const bgRef = useRef<HTMLDivElement>(null);\n  const scrollRef = useRef<HTMLDivElement>(null);\n  const confirmTrig = useRef<HTMLButtonElement>(null);\n  const formTrig = useRef<HTMLButtonElement>(null);\n  const sheetTrig = useRef<HTMLButtonElement>(null);\n  const drawerTrig = useRef<HTMLButtonElement>(null);\n  const cancelRef = useRef<HTMLButtonElement>(null);\n  const nameRef = useRef<HTMLInputElement>(null);\n\n  const show = (w: Which) => {\n    setUserOpened(true);\n    setError(\"\");\n    setCopied(false);\n    setOpen(w);\n  };\n  const close = () => setOpen(null);\n  const shared = { backgroundRef: bgRef, scrollRef, moveFocus: userOpened, onClose: close };\n\n  const slug = name.trim().toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\");\n  const submit = (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!name.trim()) {\n      setError(\"Give the project a name.\");\n      nameRef.current?.focus();\n      return;\n    }\n    close();\n  };\n  const total = lineItems.reduce((s, i) => s + i.amount, 0);\n\n  const triggers: { label: string; w: Exclude<Which, null>; ref: RefObject<HTMLButtonElement>; cls: string }[] = [\n    { label: \"Delete project\", w: \"confirm\", ref: confirmTrig, cls: btnGhost },\n    { label: \"New project\", w: \"form\", ref: formTrig, cls: btnPrimary },\n    { label: \"Share sheet\", w: \"sheet\", ref: sheetTrig, cls: btnGhost },\n    { label: \"Invoice drawer\", w: \"drawer\", ref: drawerTrig, cls: btnGhost },\n  ];\n\n  return (\n    <div\n      className=\"flex min-h-[640px] items-center justify-center bg-[#efece6] px-4 py-8\"\n      style={{ fontFamily: '\"Inter Tight\", Inter, ui-sans-serif, system-ui, sans-serif' }}\n    >\n      <div className=\"relative h-[576px] w-full max-w-4xl overflow-hidden rounded-[20px] bg-stone-50 ring-1 ring-stone-900/10\">\n        <div ref={bgRef} className=\"h-full\">\n          <div ref={scrollRef} className=\"h-full overflow-y-auto\">\n            <header className=\"flex flex-col gap-4 border-b border-stone-200 bg-white px-5 py-5 sm:px-7\">\n              <div>\n                <h2 className=\"text-lg font-semibold tracking-tight text-stone-900\">Projects</h2>\n                <p className=\"text-sm text-stone-600\">Open any of the four dialogs below.</p>\n              </div>\n              <div className=\"flex flex-wrap gap-2\">\n                {triggers.map((t) => (\n                  <button\n                    key={t.w}\n                    ref={t.ref}\n                    type=\"button\"\n                    aria-haspopup=\"dialog\"\n                    aria-expanded={open === t.w}\n                    onClick={() => show(t.w)}\n                    className={t.cls}\n                  >\n                    {t.label}\n                  </button>\n                ))}\n              </div>\n            </header>\n            <ul className=\"grid grid-cols-1 gap-4 p-5 sm:grid-cols-2 sm:p-7 lg:grid-cols-3\">\n              {projects.map((p) => (\n                <li key={p.name} className=\"rounded-2xl border border-stone-200 bg-white p-3\">\n                  <img src={p.img} alt={p.alt} width={600} height={400} loading=\"lazy\" className=\"h-24 w-full rounded-xl object-cover\" style={{ background: p.tone }} />\n                  <p className=\"mt-3 text-sm font-medium text-stone-900\">{p.name}</p>\n                  <p className=\"text-xs text-stone-600\">\n                    {p.pages} pages · edited {p.edited}\n                  </p>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n\n        {/* 1. Confirm dialog: alertdialog, safe button focused first, overlay click ignored */}\n        <Modal\n          {...shared}\n          open={open === \"confirm\"}\n          variant=\"center\"\n          role=\"alertdialog\"\n          closeOnOverlay={false}\n          triggerRef={confirmTrig}\n          initialFocusRef={cancelRef}\n          title=\"Delete Spring lookbook?\"\n          description=\"Its 6 pages and published address go offline straight away. This cannot be undone.\"\n          footer={\n            <>\n              <button ref={cancelRef} type=\"button\" onClick={close} className={btnGhost}>\n                Keep project\n              </button>\n              <button type=\"button\" onClick={close} className={btnDanger}>\n                Delete project\n              </button>\n            </>\n          }\n        >\n          <div className=\"mb-2 rounded-xl bg-red-50 px-4 py-3 text-sm text-red-800\">\n            Visitors to lookbook.example will see a not found page.\n          </div>\n        </Modal>\n\n        {/* 2. Form dialog: full screen on phones, centred card from sm up */}\n        <Modal\n          {...shared}\n          open={open === \"form\"}\n          variant=\"center\"\n          triggerRef={formTrig}\n          initialFocusRef={nameRef}\n          title=\"New project\"\n          description=\"Name it now; you can change everything later.\"\n          footer={\n            <>\n              <button type=\"button\" onClick={close} className={btnGhost}>\n                Cancel\n              </button>\n              <button type=\"submit\" form=\"s2-modal-form\" className={btnPrimary}>\n                Create project\n              </button>\n            </>\n          }\n        >\n          <form id=\"s2-modal-form\" onSubmit={submit} noValidate className=\"space-y-5 pb-2\">\n            <div>\n              <label htmlFor=\"s2-modal-name\" className=\"text-sm font-medium text-stone-800\">\n                Project name\n              </label>\n              <input\n                ref={nameRef}\n                id=\"s2-modal-name\"\n                value={name}\n                onChange={(e) => {\n                  setName(e.target.value);\n                  if (error) setError(\"\");\n                }}\n                aria-invalid={error ? true : undefined}\n                aria-describedby=\"s2-modal-name-hint\"\n                className={`mt-1.5 h-11 w-full rounded-xl border bg-white px-3.5 text-[15px] text-stone-900 outline-none transition focus:ring-2 ${\n                  error ? \"border-red-500 focus:ring-red-500/30\" : \"border-stone-300 focus:border-emerald-700 focus:ring-emerald-700/20\"\n                }`}\n              />\n              <p id=\"s2-modal-name-hint\" className={`mt-1.5 text-xs ${error ? \"text-red-700\" : \"text-stone-600\"}`}>\n                {error || `Address: ${slug || \"your-project\"}.site.example`}\n              </p>\n            </div>\n            <fieldset>\n              <legend className=\"text-sm font-medium text-stone-800\">Who can edit</legend>\n              <div className=\"mt-2 grid grid-cols-2 gap-2\">\n                {[\n                  { v: \"me\", t: \"Only me\", d: \"Private draft\" },\n                  { v: \"team\", t: \"My team\", d: \"4 editors\" },\n                ].map((o) => (\n                  <label\n                    key={o.v}\n                    className={`cursor-pointer rounded-xl border px-3.5 py-3 transition has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-emerald-700 ${\n                      visibility === o.v ? \"border-emerald-700 bg-emerald-50/60\" : \"border-stone-200 hover:border-stone-300\"\n                    }`}\n                  >\n                    <input\n                      type=\"radio\"\n                      name=\"s2-modal-vis\"\n                      aria-label={`${o.t}, ${o.d}`}\n                      value={o.v}\n                      checked={visibility === o.v}\n                      onChange={() => setVisibility(o.v)}\n                      className=\"sr-only\"\n                    />\n                    <span className=\"block text-sm font-medium text-stone-900\">{o.t}</span>\n                    <span className=\"block text-xs text-stone-600\">{o.d}</span>\n                  </label>\n                ))}\n              </div>\n            </fieldset>\n          </form>\n        </Modal>\n\n        {/* 3. Bottom sheet: drag the handle down to dismiss */}\n        <Modal {...shared} open={open === \"sheet\"} variant=\"sheet\" triggerRef={sheetTrig} title=\"Share Harbour Dental\" description=\"Anyone with the link can see the draft.\">\n          <div className=\"space-y-4 pb-5\">\n            <div className=\"flex gap-2\">\n              <label htmlFor=\"s2-modal-link\" className=\"sr-only\">\n                Share link\n              </label>\n              <input\n                id=\"s2-modal-link\"\n                readOnly\n                value=\"harbour-dental.site.example/draft\"\n                className=\"h-11 min-w-0 flex-1 rounded-xl border border-stone-200 bg-stone-50 px-3.5 text-sm text-stone-700 outline-none focus:ring-2 focus:ring-emerald-700/30\"\n              />\n              <button type=\"button\" onClick={() => setCopied(true)} className={btnPrimary} aria-live=\"polite\">\n                {copied ? \"Copied\" : \"Copy\"}\n              </button>\n            </div>\n            <div role=\"radiogroup\" aria-label=\"Link access\" className=\"grid grid-cols-2 gap-1 rounded-xl bg-stone-100 p-1\">\n              {[\n                { v: \"view\", t: \"Can view\" },\n                { v: \"comment\", t: \"Can comment\" },\n              ].map((o) => (\n                <button\n                  key={o.v}\n                  type=\"button\"\n                  role=\"radio\"\n                  aria-checked={access === o.v}\n                  onClick={() => setAccess(o.v)}\n                  className={`h-10 rounded-lg text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-700 ${\n                    access === o.v ? \"bg-white text-stone-900 shadow-sm\" : \"text-stone-600 hover:text-stone-900\"\n                  }`}\n                >\n                  {o.t}\n                </button>\n              ))}\n            </div>\n          </div>\n        </Modal>\n\n        {/* 4. Side drawer */}\n        <Modal\n          {...shared}\n          open={open === \"drawer\"}\n          variant=\"drawer\"\n          triggerRef={drawerTrig}\n          title=\"Invoice INV-2041\"\n          description=\"Paid 3 October by card ending 4410.\"\n          footer={\n            <button type=\"button\" onClick={close} className={btnPrimary}>\n              Download PDF\n            </button>\n          }\n        >\n          <div className=\"mb-4 flex items-center justify-between rounded-xl bg-emerald-50 px-4 py-3\">\n            <span className=\"text-sm font-medium text-emerald-900\">Paid in full</span>\n            <span className=\"rounded-full bg-white px-2.5 py-1 text-xs font-medium text-emerald-800 ring-1 ring-emerald-200\">Receipt sent</span>\n          </div>\n          <dl className=\"divide-y divide-stone-100\">\n            {lineItems.map((i) => (\n              <div key={i.label} className=\"flex justify-between gap-4 py-3 text-sm\">\n                <dt className=\"text-stone-700\">{i.label}</dt>\n                <dd className=\"tabular-nums text-stone-900\">${i.amount.toFixed(2)}</dd>\n              </div>\n            ))}\n            <div className=\"flex justify-between gap-4 py-3 text-sm font-semibold\">\n              <dt className=\"text-stone-900\">Total</dt>\n              <dd className=\"tabular-nums text-stone-900\">${total.toFixed(2)}</dd>\n            </div>\n          </dl>\n          <div className=\"mt-4 rounded-xl border border-stone-200 px-4 py-3 text-sm leading-relaxed text-stone-700\">\n            <p className=\"font-medium text-stone-900\">Billed to</p>\n            <p>Harbour Dental Ltd</p>\n            <p>14 Quay Street, Bristol BS1 4DJ</p>\n            <p>accounts@harbourdental.example</p>\n          </div>\n        </Modal>\n      </div>\n    </div>\n  );\n}\n"}]}
