@mirohq/design-system-dialog 0.1.0-dialog.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/main.js +691 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +688 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +177 -0
- package/package.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/primitive/context.tsx","../src/primitive/root.tsx","../src/primitive/trigger.tsx","../src/primitive/portal.tsx","../src/primitive/backdrop.tsx","../src/primitive/viewport.tsx","../src/primitive/content.tsx","../src/primitive/title.tsx","../src/primitive/description.tsx","../src/primitive/close.tsx","../src/primitive/use-dialog.ts","../src/styles/animation.ts","../src/partials/backdrop.tsx","../src/partials/close.tsx","../src/partials/parts.tsx","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/trigger.tsx","../src/dialog.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { Dispatch, RefObject, SetStateAction } from 'react'\n\nimport type { DialogRole, DialogState } from './types'\n\n/**\n * The cross-part ids, derived from the one base id so the trigger's\n * aria-controls, the Content's id, and the labelledby/describedby always\n * agree.\n */\nexport interface DialogIds {\n content: string\n title: string\n description: string\n}\n\n// Which optional parts are currently present: Content only references the\n// rendered Title/Description.\nexport interface PartsPresence {\n title: boolean\n description: boolean\n}\n\nexport interface DialogContextValue {\n state: DialogState\n open: boolean\n /** Whether the dialog occupies the tree: open or mid-exit (`closing`) — the\n * Portal's unmount gate. */\n mounted: boolean\n modal: boolean\n role: DialogRole\n id: string\n ids: DialogIds\n // Nesting level (1 = top-level). Decides the topmost dialog of a stack for\n // Escape, focus, and assistive-tech containment.\n depth: number\n // The element the Portal teleported into, or null for the page body —\n // Content scopes the scroll lock to it. The root provides null; Portal\n // re-provides the context with the field filled in.\n container: HTMLElement | null\n // The rendered Backdrop element, shared because Backdrop and Content are\n // sibling layers: Content's stack entry excepts its own backdrop from the\n // containment so it stays pressable while its dialog is topmost.\n backdropRef: RefObject<HTMLDivElement>\n // The rendered Trigger element — the close's focus-restore fallback when\n // nothing was focused before opening (a pointer press leaves focus on the\n // body: the DS Button suppresses mousedown's native focus).\n triggerRef: RefObject<HTMLButtonElement>\n // The rendered Close element — how the focus containment keeps the part\n // the cycle's last stop (an id would duplicate if Close ever doubled).\n closeRef: RefObject<HTMLButtonElement>\n parts: PartsPresence\n setParts: Dispatch<SetStateAction<PartsPresence>>\n toggle: () => void\n close: () => void\n interactOutside: (event: MouseEvent) => void\n exitComplete: () => void\n}\n\nexport const DialogContext = createContext<DialogContextValue | undefined>(\n undefined\n)\n\nexport const useDialogContext = (): DialogContextValue => {\n const context = useContext(DialogContext)\n if (context === undefined) {\n throw new Error('Dialog parts must be rendered within a <Dialog> root')\n }\n return context\n}\n","// <Root> — owns the open state and renders no DOM.\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport type { ReactNode } from 'react'\nimport { useId } from '@mirohq/design-system-use-id'\nimport { useBrowserNavigation } from '@mirohq/design-system-use-browser-navigation'\nimport { isTopmostLayer } from '@mirohq/design-system-use-overlay'\n\nimport { DialogContext } from './context'\nimport type { PartsPresence } from './context'\nimport type { BackNavigationPayload, DialogOptions, DialogState } from './types'\n\nexport interface RootProps extends DialogOptions {\n children?: ReactNode\n}\n\nexport const Root = ({ children, ...options }: RootProps): ReactNode => {\n // Nesting derives from the parent dialog's context (undefined = top-level).\n const depth = (useContext(DialogContext)?.depth ?? 0) + 1\n const generatedId = useId()\n // `?? generatedId`: an explicit `id={undefined}` must not knock out the\n // fallback — ids also key the dialog stack, so they must exist.\n const id = options.id ?? generatedId\n const role = options.role ?? 'dialog'\n const modal = options.modal ?? true\n const animated = options.animated === true\n\n const controlled = options.open !== undefined\n const [uncontrolledOpen, setUncontrolledOpen] = useState(\n options.defaultOpen === true\n )\n const open = controlled ? options.open === true : uncontrolledOpen\n\n // Controlled-ness follows the prop live: mirroring the prop keeps the\n // uncontrolled value current, so dropping the prop hands the state back\n // right where it stands.\n if (controlled && uncontrolledOpen !== open) setUncontrolledOpen(open)\n\n // The exit window: only an `animated` close passes through `closing`, and\n // reopening interrupts it. Adjusted during render — an effect would let an\n // unmounted frame slip between the close and the exit.\n const [exiting, setExiting] = useState(false)\n const previousOpen = useRef(open)\n if (previousOpen.current !== open) {\n previousOpen.current = open\n if (open) {\n if (exiting) setExiting(false)\n } else if (animated) {\n setExiting(true)\n }\n }\n\n const state: DialogState = open ? 'open' : exiting ? 'closing' : 'closed'\n\n // Read through a ref so the document-level listeners and the history guard\n // follow the open state alone — fresh callback identities must not re-bind\n // listeners or churn real session-history entries.\n const optionsRef = useRef(options)\n optionsRef.current = options\n\n // onOpenChange reports once per transition-or-intent: every interaction\n // that asks for a different value reports it immediately — a controlled\n // dialog stays put, but the ask is not silent (`open` + `onOpenChange`\n // works on its own, like the Radix-based overlays) — and a change the\n // prop drives by itself reports from the effect. The already-reported\n // check keeps a granted intent from echoing when the prop answers it.\n // No call on mount.\n const reportedOpen = useRef(open)\n const resolvedOpen = useRef(open)\n useEffect(() => {\n if (resolvedOpen.current === open) return\n resolvedOpen.current = open\n if (reportedOpen.current === open) return\n reportedOpen.current = open\n optionsRef.current.onOpenChange?.(open)\n })\n\n const setOpen = (next: boolean): void => {\n if (open === next) return\n reportedOpen.current = next\n optionsRef.current.onOpenChange?.(next)\n // A controlled dialog never moves on its own — the consumer decides at\n // the source (this report and the dismissal callbacks) and answers\n // through the prop.\n if (!controlled) setUncontrolledOpen(next)\n }\n\n // Escape is a document-level concern, not a part's — it must work wherever\n // focus is. The handler lives on a ref so the listener binds per open\n // window, not per render; a `closing` dialog has already detached it.\n const onEscapeRef = useRef<(event: KeyboardEvent) => void>(() => {})\n onEscapeRef.current = (event: KeyboardEvent): void => {\n // Only the topmost dialog answers Escape — a nested stack closes one\n // layer at a time.\n if (!isTopmostLayer(id)) return\n optionsRef.current.onEscapeKeyDown?.(event)\n if (event.defaultPrevented) return\n if (optionsRef.current.closeOnEscape === false) return\n setOpen(false)\n }\n\n useEffect(() => {\n if (!open) return\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') onEscapeRef.current(event)\n }\n document.addEventListener('keydown', onKeyDown, true)\n return () => document.removeEventListener('keydown', onKeyDown, true)\n }, [open])\n\n // closeOnBack: while open, a guard entry in the session history turns the\n // host's Back into a dismissal instead of a navigation — and the entry a\n // Back press spends survives in the forward stack, so the host's Forward\n // reopens what Back closed. It lives on the root — the guard concerns the\n // dialog's openness, not any rendered part.\n const onBackRef = useRef<() => boolean>(() => false)\n onBackRef.current = (): boolean => {\n // The host's back has no cancelable event — synthesize the veto payload\n // so the callback contract matches the other dismissals.\n const payload: BackNavigationPayload = {\n defaultPrevented: false,\n preventDefault() {\n payload.defaultPrevented = true\n },\n }\n optionsRef.current.onBackNavigation?.(payload)\n if (payload.defaultPrevented === true) return false\n // A controlled dialog only records the request (onOpenChange reports the\n // intent) — the consumer follows through the prop, and the guard re-arms\n // until it does.\n setOpen(false)\n return !controlled\n }\n\n // `backNavigate`'s mirror, decided the same way — and reachable from the\n // animated `closing` state too: Forward interrupts the exit.\n const onForwardRef = useRef<() => boolean>(() => false)\n onForwardRef.current = (): boolean => {\n const payload: BackNavigationPayload = {\n defaultPrevented: false,\n preventDefault() {\n payload.defaultPrevented = true\n },\n }\n optionsRef.current.onForwardNavigation?.(payload)\n if (payload.defaultPrevented === true) return false\n if (optionsRef.current.closeOnBack !== true) return false\n setOpen(true)\n return !controlled\n }\n\n useBrowserNavigation({\n enabled: options.closeOnBack === true,\n open,\n onBack: () => onBackRef.current(),\n onForward: () => onForwardRef.current(),\n // The dialog's nesting depth is what a returning dialog recognizes its\n // own spent entry by: the instance is new after a remount, but the\n // position in the stack is the same.\n claim: `dialog:${depth}`,\n })\n\n // A press that starts inside the dialog window never counts as outside,\n // wherever it releases: a text-selection drag out of the window dispatches\n // its click on the layer around it (a click targets the press's and the\n // release's common ancestor), so the click's target alone can't tell a\n // dismissal from a drag. Each press records its origin instead.\n const insidePressRef = useRef(false)\n useEffect(() => {\n if (!open) return\n const contentId = `${id}-content`\n const onPointerDown = (event: Event): void => {\n const content = document.getElementById(contentId)\n insidePressRef.current =\n content !== null &&\n event.target instanceof Node &&\n content.contains(event.target)\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n return () =>\n document.removeEventListener('pointerdown', onPointerDown, true)\n }, [open, id])\n\n const interactOutside = (event: MouseEvent): void => {\n if (insidePressRef.current) return\n // An outside press is an intent, not a close command: the consumer may\n // veto it, and the role's dismissal setting gates it — an alert dialog\n // interrupts for a response, so it doesn't dismiss unless opted in.\n options.onInteractOutside?.(event)\n if (event.defaultPrevented) return\n if (!(options.closeOnInteractOutside ?? role === 'dialog')) return\n setOpen(false)\n }\n const interactOutsideRef = useRef(interactOutside)\n interactOutsideRef.current = interactOutside\n\n const backdropRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLButtonElement>(null)\n const closeRef = useRef<HTMLButtonElement>(null)\n\n // A non-modal dialog coexists with the page: no layer intercepts the\n // press, so the outside interaction is read from the document. Presses\n // inside the window are inside; the trigger's own press stays a plain\n // toggle — counting it as outside would close and immediately reopen.\n useEffect(() => {\n if (!open || modal) return\n const contentId = `${id}-content`\n const onClick = (event: MouseEvent): void => {\n if (!isTopmostLayer(id)) return\n if (!(event.target instanceof Node)) return\n if (document.getElementById(contentId)?.contains(event.target) === true)\n return\n if (triggerRef.current?.contains(event.target) === true) return\n interactOutsideRef.current(event)\n }\n document.addEventListener('click', onClick)\n return () => document.removeEventListener('click', onClick)\n }, [open, modal, id])\n\n const [parts, setParts] = useState<PartsPresence>({\n title: false,\n description: false,\n })\n\n return (\n <DialogContext.Provider\n value={{\n state,\n open,\n mounted: state !== 'closed',\n modal,\n role,\n id,\n ids: {\n content: `${id}-content`,\n title: `${id}-title`,\n description: `${id}-description`,\n },\n depth,\n container: null,\n backdropRef,\n triggerRef,\n closeRef,\n parts,\n setParts,\n toggle: () => setOpen(!open),\n close: () => setOpen(false),\n interactOutside,\n exitComplete: () => setExiting(false),\n }}\n >\n {children}\n </DialogContext.Provider>\n )\n}\n","// <Trigger> — toggles the dialog; focus returns here on close.\nimport React, { forwardRef } from 'react'\nimport type { ComponentProps } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { composeHandlers, mergeRefs } from '@mirohq/design-system-utils'\n\nimport { useDialogContext } from './context'\n\nexport interface TriggerProps extends ComponentProps<typeof Primitive.button> {}\n\nexport const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(\n ({ asChild = false, ...props }, forwardedRef) => {\n const { open, state, ids, toggle, triggerRef } = useDialogContext()\n const consumer = composeHandlers(\n { onClick: toggle },\n asChild ? props : { type: 'button' as const, ...props }\n )\n\n return (\n <Primitive.button\n {...consumer}\n aria-haspopup='dialog'\n aria-expanded={open}\n // A dangling aria-controls id is an a11y defect — only while open.\n aria-controls={open ? ids.content : undefined}\n data-state={state}\n asChild={asChild}\n ref={mergeRefs([triggerRef, forwardedRef])}\n />\n )\n }\n)\n","// <Portal> — teleports the layers out of the tree while open.\nimport React from 'react'\nimport type { ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { DialogContext, useDialogContext } from './context'\n\nexport interface PortalProps {\n children?: ReactNode\n /** The element to portal into. @default document.body */\n container?: HTMLElement | null\n}\n\nexport const Portal = ({ children, container }: PortalProps): ReactNode => {\n const context = useDialogContext()\n // `mounted`, not `open`: an animated dialog stays in the tree through\n // `closing` so its exit visual can play before everything unmounts.\n if (!context.mounted || typeof document === 'undefined') return null\n // Re-provide the context with the scoped container (null = page body) so\n // Content locks the right scroll surface.\n return createPortal(\n <DialogContext.Provider\n value={{ ...context, container: container ?? null }}\n >\n {children}\n </DialogContext.Provider>,\n container ?? document.body\n )\n}\n","// <Backdrop> — the layer behind the dialog window.\nimport React, { forwardRef } from 'react'\nimport type { ComponentProps, MouseEvent } from 'react'\nimport { composeHandlers, mergeRefs } from '@mirohq/design-system-utils'\nimport { isTopmostLayer } from '@mirohq/design-system-use-overlay'\n\nimport { useDialogContext } from './context'\n\nexport interface BackdropProps extends ComponentProps<'div'> {}\n\nexport const Backdrop = forwardRef<HTMLDivElement, BackdropProps>(\n (props, forwardedRef) => {\n const { modal, state, id, container, backdropRef, interactOutside } =\n useDialogContext()\n\n // Only a modal dialog dims the page — non-modal coexists with it.\n if (!modal) return null\n\n const consumer = composeHandlers(\n {\n // Only the topmost dialog of a stack answers an outside press.\n onClick: (event: MouseEvent<HTMLElement>) => {\n if (isTopmostLayer(id)) interactOutside(event.nativeEvent)\n },\n },\n props\n )\n\n return (\n // role=presentation: the backdrop is a purely visual layer; its press\n // is the pointer half of an outside dismissal, with Escape as the\n // keyboard path (jsx-a11y's keyboard pairing doesn't apply).\n <div\n role='presentation'\n {...consumer}\n data-state={state}\n // A scoped dialog (Portal container) pins to the container, not the\n // page — the styled layer switches positioning on this attribute.\n data-scoped={container === null ? undefined : ''}\n ref={mergeRefs([backdropRef, forwardedRef])}\n />\n )\n }\n)\n","// <Viewport> — the positioning + scroll layer around the dialog window.\nimport React, { forwardRef } from 'react'\nimport type { ComponentProps, MouseEvent } from 'react'\nimport { composeHandlers } from '@mirohq/design-system-utils'\nimport { isTopmostLayer } from '@mirohq/design-system-use-overlay'\n\nimport { useDialogContext } from './context'\n\nexport interface ViewportProps extends ComponentProps<'div'> {\n /** Marks the layer full-screen: the window fills it edge to edge, so the\n * layer drops its own inset. @default false */\n fullScreen?: boolean\n}\n\nexport const Viewport = forwardRef<HTMLDivElement, ViewportProps>(\n ({ fullScreen, ...props }, forwardedRef) => {\n const { state, id, modal, container, interactOutside } = useDialogContext()\n\n const consumer = composeHandlers(\n {\n // Box presses bubble up here — only a press that started on the\n // viewport itself is an outside interaction, and only the topmost\n // dialog of a stack answers it.\n onClick: (event: MouseEvent<HTMLElement>) => {\n if (event.target !== event.currentTarget) return\n if (!isTopmostLayer(id)) return\n interactOutside(event.nativeEvent)\n },\n },\n props\n )\n\n return (\n // role=presentation: a purely presentational positioning wrapper — the\n // press it answers is the pointer half of an outside dismissal, with\n // Escape as the keyboard path.\n <div\n role='presentation'\n {...consumer}\n data-state={state}\n // A scoped dialog (Portal container) pins to the container, not the\n // page — the styled layer switches positioning on this attribute.\n data-scoped={container === null ? undefined : ''}\n // A non-modal dialog coexists with the page — without this marker the\n // styled layer stops intercepting pointer presses.\n data-modal={modal ? '' : undefined}\n // A full-screen window fills the layer edge to edge — the styled\n // layer drops its inset on this attribute.\n data-full-screen={fullScreen === true ? '' : undefined}\n ref={forwardedRef}\n />\n )\n }\n)\n","// <Content> — the dialog window: focus moves in on open, restores on close,\n// traps while modal.\nimport React, { forwardRef, useEffect, useRef } from 'react'\nimport type { ComponentProps, RefObject } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { useFocusTrap } from '@mirohq/design-system-use-focus-trap'\nimport { useScrollLock } from '@mirohq/design-system-use-scroll-lock'\nimport {\n isTopmostLayer,\n useOverlay,\n useOverlayExit,\n} from '@mirohq/design-system-use-overlay'\n\nimport { useDialogContext } from './context'\n\nexport interface ContentProps extends ComponentProps<'div'> {\n /** The element to focus when the dialog opens. @default the dialog window */\n initialFocus?: RefObject<HTMLElement>\n}\n\nexport const Content = forwardRef<HTMLDivElement, ContentProps>(\n ({ initialFocus, ...props }, forwardedRef) => {\n const {\n state,\n open,\n modal,\n role,\n id,\n ids,\n depth,\n container,\n backdropRef,\n triggerRef,\n closeRef,\n parts,\n exitComplete,\n } = useDialogContext()\n const contentRef = useRef<HTMLDivElement>(null)\n\n // The open window: the stack entry, containment, initial focus, and the\n // focus restore — released the moment a close starts, not when the exit\n // visual finishes.\n useOverlay(contentRef, {\n enabled: open,\n id,\n depth,\n modal,\n backdrop: () => backdropRef.current,\n initialFocus,\n // A pointer press opens without focusing the trigger (the DS Button\n // suppresses mousedown's native focus), so the close would find only\n // the body to restore to — fall back to the trigger, the invoker APG\n // says focus returns to.\n restoreFocus: () => triggerRef.current,\n })\n\n // The exit window: a Content rendered while not open only happens in\n // `closing` — the still-painting layer leaves the page's interaction and\n // its finished visual reports the unmount.\n useOverlayExit(contentRef, {\n exiting: !open,\n boundary: container,\n backdrop: () => backdropRef.current,\n onExitComplete: exitComplete,\n })\n\n // The lock spans the whole mount — through `closing` too: releasing it\n // mid-exit would bring the scrollbar back and reflow the page under the\n // still-painting layer. A scoped dialog locks its portal container; a\n // page dialog locks the body. The context's `null` container means the\n // page body — the hook's default — not its \"no target yet\".\n useScrollLock(modal, container ?? undefined)\n\n useFocusTrap(contentRef, {\n // Only a modal dialog traps, and only while topmost — a nested dialog\n // owns focus while open.\n enabled: () => modal && isTopmostLayer(id),\n // The Close part is the cycle's last stop wherever it renders (SPEC).\n last: () => closeRef.current,\n })\n\n // The constraint is \"never neither\": a rendered Title or an accessible\n // label on the window. Read from the DOM — it is committed before this\n // effect, while the Title's presence registration is not, and a label\n // arriving through any prop spread counts too.\n useEffect(() => {\n if (!open) return\n const element = contentRef.current\n if (element === null) return\n if (parts.title || document.getElementById(ids.title) !== null) return\n if (\n element.hasAttribute('aria-label') ||\n element.hasAttribute('aria-labelledby')\n ) {\n return\n }\n console.warn(\n '[Dialog] the dialog resolves no accessible name: render a ' +\n '<Dialog.Title>, or give Content an aria-label when it truly ' +\n 'cannot have one.'\n )\n }, [open, parts.title, ids.title])\n\n // The ARIA relationships always follow what is rendered — an omitted part\n // never leaves a dangling reference, and a consumer-supplied value wins\n // over the derived one.\n const labelling: Record<string, string> = {}\n if (parts.title && props['aria-labelledby'] == null) {\n labelling['aria-labelledby'] = ids.title\n }\n if (parts.description && props['aria-describedby'] == null) {\n labelling['aria-describedby'] = ids.description\n }\n\n return (\n // A neutral element with the role, not <dialog>: the window is the\n // initial focus target, so it carries tabindex — which HTML forbids on\n // <dialog> — and the native element only pays off via showModal(),\n // which this contract deliberately doesn't use.\n <div\n {...props}\n {...labelling}\n role={role}\n id={ids.content}\n aria-modal={modal || undefined}\n // The initial focus target: focusable in script, not in the tab order.\n tabIndex={-1}\n data-state={state}\n ref={mergeRefs([contentRef, forwardedRef])}\n />\n )\n }\n)\n","// <Title> — the dialog's accessible name.\nimport React, { forwardRef, useEffect } from 'react'\nimport type { ComponentProps } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { useDialogContext } from './context'\n\nexport interface TitleProps extends ComponentProps<typeof Primitive.h2> {}\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(\n ({ asChild = false, ...props }, forwardedRef) => {\n const { ids, setParts } = useDialogContext()\n\n // Presence drives the ARIA relationships on Content — a Title can appear\n // or disappear at any time, open or closed.\n useEffect(() => {\n setParts(parts => (parts.title ? parts : { ...parts, title: true }))\n return () =>\n setParts(parts => (parts.title ? { ...parts, title: false } : parts))\n }, [setParts])\n\n return (\n <Primitive.h2\n {...props}\n id={ids.title}\n asChild={asChild}\n ref={forwardedRef}\n />\n )\n }\n)\n","// <Description> — the dialog's accessible description.\nimport React, { forwardRef, useEffect } from 'react'\nimport type { ComponentProps } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { useDialogContext } from './context'\n\nexport interface DescriptionProps extends ComponentProps<typeof Primitive.p> {}\n\nexport const Description = forwardRef<HTMLParagraphElement, DescriptionProps>(\n ({ asChild = false, ...props }, forwardedRef) => {\n const { ids, setParts } = useDialogContext()\n\n // Presence drives the ARIA relationships on Content — a Description can\n // appear or disappear at any time, open or closed.\n useEffect(() => {\n setParts(parts =>\n parts.description ? parts : { ...parts, description: true }\n )\n return () =>\n setParts(parts =>\n parts.description ? { ...parts, description: false } : parts\n )\n }, [setParts])\n\n return (\n <Primitive.p\n {...props}\n id={ids.description}\n asChild={asChild}\n ref={forwardedRef}\n />\n )\n }\n)\n","// <Close> — the visible in-dialog close affordance.\nimport React, { forwardRef } from 'react'\nimport type { ComponentProps } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { composeHandlers, mergeRefs } from '@mirohq/design-system-utils'\n\nimport { useDialogContext } from './context'\n\nexport interface CloseProps extends ComponentProps<typeof Primitive.button> {}\n\nexport const Close = forwardRef<HTMLButtonElement, CloseProps>(\n ({ asChild = false, ...props }, forwardedRef) => {\n const { close, closeRef } = useDialogContext()\n const consumer = composeHandlers(\n { onClick: close },\n asChild ? props : { type: 'button' as const, ...props }\n )\n\n return (\n <Primitive.button\n {...consumer}\n asChild={asChild}\n // Registered so the focus containment keeps it the cycle's last stop\n // wherever it renders.\n ref={mergeRefs([closeRef, forwardedRef])}\n />\n )\n }\n)\n","// useDialog — imperative access to the nearest <Dialog> root from anywhere in\n// its subtree: the same state a part reads, plus open/close/toggle.\nimport { useDialogContext } from './context'\nimport type { DialogState } from './types'\n\nexport interface UseDialogResult {\n id: string\n isOpen: boolean\n state: DialogState\n modal: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport const useDialog = (): UseDialogResult => {\n const context = useDialogContext()\n\n return {\n id: context.id,\n isOpen: context.open,\n state: context.state,\n modal: context.modal,\n // Idempotent: toggle() would close an already-open dialog.\n open: () => {\n if (!context.open) context.toggle()\n },\n close: context.close,\n toggle: context.toggle,\n }\n}\n","// Must stay under the exit-watch fallback ceiling (500ms), or a closing\n// dialog would be cut short instead of finishing its animation.\nexport const ANIMATION_DURATION = '250ms'\n\nexport const MOTION = '@media (prefers-reduced-motion: no-preference)'\n","import { keyframes, styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nimport { Backdrop as BackdropPrimitive } from '../primitive'\nimport { ANIMATION_DURATION, MOTION } from '../styles/animation'\n\nconst fadeIn = keyframes({\n from: { opacity: 0 },\n to: { opacity: 1 },\n})\n\nconst fadeOut = keyframes({\n from: { opacity: 1 },\n to: { opacity: 0 },\n})\n\nexport const Backdrop = styled(BackdropPrimitive, {\n position: 'fixed',\n inset: 0,\n zIndex: '$dialog',\n backgroundColor: '$background-alpha-neutrals-overlay',\n // A scoped dialog (Portal container) pins to the container, not the page.\n '&[data-scoped]': {\n position: 'absolute',\n },\n\n [MOTION]: {\n animation: `${fadeIn} ${ANIMATION_DURATION} ease-out`,\n // `forwards` holds the final frame until the unmount lands.\n '&[data-state=\"closing\"]': {\n animation: `${fadeOut} ${ANIMATION_DURATION} ease-out forwards`,\n },\n },\n})\nexport type BackdropProps = StrictComponentProps<typeof Backdrop>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nimport { Close as ClosePrimitive } from '../primitive'\n\n// Positioning only: the corner pin is the dialog's anatomy; the button's\n// visual comes from what the consumer composes in (typically an IconButton\n// via `asChild`).\nexport const Close = styled(ClosePrimitive, {\n position: 'absolute',\n top: '$300',\n right: '$300',\n})\nexport type CloseProps = StrictComponentProps<typeof Close>\n","import type { ComponentProps } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nimport {\n Description as DescriptionPrimitive,\n Title as TitlePrimitive,\n} from '../primitive'\n\n// The window owns the default inset; each part escapes it with negative\n// margins and lays its spec'd box with its own padding, so the parts sit\n// edge to edge while bare content stays padded.\n\nexport const Banner = styled(Primitive.div, {\n margin: '-$500 -$500 0',\n // The floor yields on short screens (text zoom, 400% reflow): the media\n // must not eat the space the title and actions need.\n minHeight: 'min(300px, 40vh)',\n borderTopLeftRadius: '$100',\n borderTopRightRadius: '$100',\n overflow: 'hidden',\n backgroundColor: '$background-primary-subtle',\n // Media dropped in fills the slot with no hand-made styles.\n '& > img, & > video': {\n display: 'block',\n width: '100%',\n height: '100%',\n objectFit: 'contain',\n },\n})\nexport type BannerProps = ComponentProps<typeof Banner>\n\nexport const Title = styled(TitlePrimitive, {\n fontFamily: '$heading',\n fontSize: '$300',\n lineHeight: 1.35,\n fontWeight: 400,\n fontFeatureSettings: \"'ss01'\",\n padding: '$400 $1200 $100 $500',\n margin: '-$500 -$500 0',\n // A banner before it already consumed the window's top inset, so the title\n // must not escape it a second time.\n [`${Banner} ~ &`]: {\n marginTop: 0,\n },\n})\nexport type TitleProps = ComponentProps<typeof Title>\n\nexport const Description = styled(DescriptionPrimitive, {\n fontFamily: '$body',\n fontSize: '$200',\n lineHeight: 1.5,\n padding: '$200 $500',\n margin: '0 -$500',\n // As the last part, its own $200 plus the window's $500 would overshoot\n // the $500 closing inset.\n '&:last-child': {\n marginBottom: '-$200',\n },\n})\nexport type DescriptionProps = ComponentProps<typeof Description>\n\nexport const Actions = styled(Primitive.div, {\n display: 'flex',\n gap: '$100',\n // The window's inset supplies the $500 closing edge below the row.\n padding: '$200 $500 0',\n margin: '0 -$500',\n})\nexport type ActionsProps = ComponentProps<typeof Actions>\n","import React, { forwardRef } from 'react'\nimport type { ElementRef, RefObject } from 'react'\nimport { keyframes, styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nimport {\n Content as ContentPrimitive,\n Viewport as ViewportPrimitive,\n} from '../primitive'\nimport { Actions, Banner, Description, Title } from './parts'\nimport { Close } from './close'\nimport { ANIMATION_DURATION, MOTION } from '../styles/animation'\n\nconst scaleIn = keyframes({\n from: { opacity: 0, transform: 'scale(0.8)' },\n to: { opacity: 1, transform: 'scale(1)' },\n})\n\nconst scaleOut = keyframes({\n from: { opacity: 1, transform: 'scale(1)' },\n to: { opacity: 0, transform: 'scale(0.8)' },\n})\n\nconst StyledViewport = styled(ViewportPrimitive, {\n position: 'fixed',\n inset: 0,\n zIndex: '$dialog',\n display: 'flex',\n overflow: 'auto',\n padding: '$300',\n '&[data-scoped]': {\n position: 'absolute',\n },\n '&[data-full-screen]': {\n padding: 0,\n },\n '&:not([data-modal])': {\n pointerEvents: 'none',\n },\n})\n\nconst StyledContent = styled(ContentPrimitive, {\n position: 'relative',\n margin: 'auto',\n boxSizing: 'border-box',\n width: 'fit-content',\n // The floors yield to the screen: WCAG 1.4.10 reflow requires the window\n // to fit a 320px viewport (400% zoom), so neither bound may exceed the\n // layer's width.\n minWidth: 'min(560px, 100%)',\n maxWidth: 'min(960px, 100%)',\n backgroundColor: '$background-neutrals',\n color: '$text-neutrals',\n borderRadius: '$100',\n boxShadow: '$elevation-300',\n overflowWrap: 'break-word',\n outline: 'none',\n // The window stays interactive when its (non-modal) layer stops\n // intercepting presses.\n pointerEvents: 'auto',\n padding: '$500',\n\n [`&:has(${Title})`]: {\n paddingTop: 0,\n [`& ${Banner}`]: { marginTop: 0 },\n [`& ${Title}`]: { marginTop: 0 },\n },\n [`&:has(${Actions})`]: {\n paddingBottom: 0,\n [`& ${Actions}`]: { paddingBottom: '$500' },\n [`& ${Description}:last-child`]: { marginBottom: 0, paddingBottom: '$500' },\n },\n\n [MOTION]: {\n animation: `${scaleIn} ${ANIMATION_DURATION} ease-out`,\n '&[data-state=\"closing\"]': {\n animation: `${scaleOut} ${ANIMATION_DURATION} ease-out forwards`,\n },\n },\n\n variants: {\n scroll: {\n viewport: {},\n window: {\n maxHeight: '100%',\n overflow: 'auto',\n [`& ${Title}`]: {\n position: 'sticky',\n top: 0,\n backgroundColor: '$background-neutrals',\n },\n [`& ${Close}`]: {\n position: 'sticky',\n top: '$300',\n right: 'auto',\n float: 'right',\n marginRight: '-$200',\n zIndex: 1,\n },\n [`& ${Banner}`]: {\n overflow: 'visible',\n },\n },\n },\n\n flat: {\n true: {\n padding: 0,\n overflow: 'hidden',\n [`& ${Banner}`]: { margin: 0 },\n [`& ${Title}`]: { margin: 0 },\n [`& ${Description}`]: { margin: 0 },\n [`& ${Description}:last-child`]: { paddingBottom: '$500' },\n [`& ${Actions}`]: { margin: 0, paddingBottom: '$500' },\n },\n },\n\n fullScreen: {\n true: {\n width: '100%',\n height: '100%',\n minWidth: 0,\n maxWidth: 'none',\n margin: 0,\n borderRadius: 0,\n },\n },\n },\n\n compoundVariants: [\n {\n flat: true,\n scroll: 'window',\n css: { overflow: 'auto' },\n },\n ],\n\n defaultVariants: {\n scroll: 'viewport',\n },\n})\n\nexport interface ContentProps\n extends StrictComponentProps<typeof StyledContent> {\n /** The element to focus when the dialog opens. @default the dialog window */\n initialFocus?: RefObject<HTMLElement>\n}\n\nexport const Content = forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ fullScreen, ...props }, forwardedRef) => (\n <StyledViewport fullScreen={fullScreen === true}>\n <StyledContent {...props} fullScreen={fullScreen} ref={forwardedRef} />\n </StyledViewport>\n))\n","import { Portal as PortalPrimitive } from '../primitive'\nimport type { PortalProps as PortalPrimitiveProps } from '../primitive'\n\n// Unstyled part — passes straight through to the primitive.\nexport interface PortalProps extends PortalPrimitiveProps {}\nexport const Portal = PortalPrimitive\n","import { Trigger as TriggerPrimitive } from '../primitive'\nimport type { TriggerProps as TriggerPrimitiveProps } from '../primitive'\n\n// Unstyled part — passes straight through to the primitive.\nexport interface TriggerProps extends TriggerPrimitiveProps {}\nexport const Trigger = TriggerPrimitive\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport type { DialogOptions } from './primitive'\nimport { Root } from './primitive'\nimport { Backdrop } from './partials/backdrop'\nimport { Close } from './partials/close'\nimport { Content } from './partials/content'\nimport { Actions, Banner, Description, Title } from './partials/parts'\nimport { Portal } from './partials/portal'\nimport { Trigger } from './partials/trigger'\n\nexport interface DialogProps extends DialogOptions {\n children?: ReactNode\n}\n\n// The root owns the open state and renders no DOM.\nexport const Dialog: ((props: DialogProps) => ReactNode) & Parts = props => (\n <Root {...props} />\n)\n\n// Parts\n// -----------------------------------------------------------------------------\n\nexport interface Parts {\n Trigger: typeof Trigger\n Portal: typeof Portal\n Backdrop: typeof Backdrop\n Content: typeof Content\n Banner: typeof Banner\n Title: typeof Title\n Description: typeof Description\n Actions: typeof Actions\n Close: typeof Close\n}\n\nDialog.Trigger = Trigger\nDialog.Portal = Portal\nDialog.Backdrop = Backdrop\nDialog.Content = Content\nDialog.Banner = Banner\nDialog.Title = Title\nDialog.Description = Description\nDialog.Actions = Actions\nDialog.Close = Close\n"],"names":["_a","_b","Trigger","Portal","Backdrop","Content","Title","Description","Close","BackdropP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entProps, ReactNode, RefObject } from 'react';
|
|
3
|
+
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
4
|
+
import { StrictComponentProps } from '@mirohq/design-system-stitches';
|
|
5
|
+
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
6
|
+
import { Primitive } from '@mirohq/design-system-primitive';
|
|
7
|
+
|
|
8
|
+
type DialogRole = 'dialog' | 'alertdialog';
|
|
9
|
+
type DialogState = 'open' | 'closing' | 'closed';
|
|
10
|
+
/** The payload for a history-navigation dismissal (Back) or reopen (Forward).
|
|
11
|
+
* Synthesized — the host's traversal has no cancelable event of its own —
|
|
12
|
+
* carrying only the veto contract every dismissal callback shares. */
|
|
13
|
+
interface BackNavigationPayload {
|
|
14
|
+
defaultPrevented?: boolean;
|
|
15
|
+
preventDefault?: () => void;
|
|
16
|
+
}
|
|
17
|
+
interface DialogCallbacks {
|
|
18
|
+
/** Fired once per transition or intent with the value asked for: every
|
|
19
|
+
* interaction that requests an open/close reports it — a controlled dialog
|
|
20
|
+
* stays put, but the ask is never silent — and a prop-driven change
|
|
21
|
+
* reports too; a granted intent never echoes twice. */
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
/** Fired before an Escape dismissal; `preventDefault()` vetoes it. */
|
|
24
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
25
|
+
/** Fired before an outside-press dismissal; `preventDefault()` vetoes it. */
|
|
26
|
+
onInteractOutside?: (event: MouseEvent) => void;
|
|
27
|
+
/** Fired before a back-navigation dismissal; `preventDefault()` vetoes it. */
|
|
28
|
+
onBackNavigation?: (event?: BackNavigationPayload) => void;
|
|
29
|
+
/** Fired before a forward-navigation reopen; `preventDefault()` vetoes it. */
|
|
30
|
+
onForwardNavigation?: (event?: BackNavigationPayload) => void;
|
|
31
|
+
}
|
|
32
|
+
/** The dialog options — the behavior a consumer configures on the root. */
|
|
33
|
+
interface DialogOptions extends DialogCallbacks {
|
|
34
|
+
/** Base id for the dialog's parts; a unique, SSR-safe one is generated when
|
|
35
|
+
* omitted. The per-part ids (content/title/description) derive from it. */
|
|
36
|
+
id?: string;
|
|
37
|
+
/** Controlled open state: the dialog follows this prop alone and never
|
|
38
|
+
* moves on its own. Set back to `undefined` to hand the state over —
|
|
39
|
+
* uncontrolled from there, right where it stands. */
|
|
40
|
+
open?: boolean;
|
|
41
|
+
/** Initial open state for the uncontrolled dialog. @default false */
|
|
42
|
+
defaultOpen?: boolean;
|
|
43
|
+
/** Marks the dialog modal: `aria-modal`, focus trap, scroll lock. @default true */
|
|
44
|
+
modal?: boolean;
|
|
45
|
+
/** The ARIA pattern: a plain dialog or an alert dialog for urgent
|
|
46
|
+
* interruptions. @default 'dialog' */
|
|
47
|
+
role?: DialogRole;
|
|
48
|
+
/** Whether Escape closes the dialog. @default true */
|
|
49
|
+
closeOnEscape?: boolean;
|
|
50
|
+
/** Whether pressing the backdrop closes the dialog.
|
|
51
|
+
* @default true — false when `role="alertdialog"` */
|
|
52
|
+
closeOnInteractOutside?: boolean;
|
|
53
|
+
/** Treats the host's Back navigation as a dismissal: while the dialog is
|
|
54
|
+
* open, Back closes it instead of leaving the page — one layer per press in
|
|
55
|
+
* a nested stack (a guard entry planted in the session history) — and the
|
|
56
|
+
* host's Forward reopens what Back closed, guarded again.
|
|
57
|
+
* @default false */
|
|
58
|
+
closeOnBack?: boolean;
|
|
59
|
+
/** Reserves an exit window for a close animation: closing passes through the
|
|
60
|
+
* `closing` state (`data-state="closing"` styles the exit) and the dialog
|
|
61
|
+
* unmounts when its exit visual ends instead of immediately. @default false */
|
|
62
|
+
animated?: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface TriggerProps$1 extends ComponentProps<typeof Primitive.button> {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface PortalProps$1 {
|
|
69
|
+
children?: ReactNode;
|
|
70
|
+
/** The element to portal into. @default document.body */
|
|
71
|
+
container?: HTMLElement | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface BackdropProps$1 extends ComponentProps<'div'> {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ContentProps$1 extends ComponentProps<'div'> {
|
|
78
|
+
/** The element to focus when the dialog opens. @default the dialog window */
|
|
79
|
+
initialFocus?: RefObject<HTMLElement>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface TitleProps$1 extends ComponentProps<typeof Primitive.h2> {
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface DescriptionProps$1 extends ComponentProps<typeof Primitive.p> {
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface CloseProps$1 extends ComponentProps<typeof Primitive.button> {
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface UseDialogResult {
|
|
92
|
+
id: string;
|
|
93
|
+
isOpen: boolean;
|
|
94
|
+
state: DialogState;
|
|
95
|
+
modal: boolean;
|
|
96
|
+
open: () => void;
|
|
97
|
+
close: () => void;
|
|
98
|
+
toggle: () => void;
|
|
99
|
+
}
|
|
100
|
+
declare const useDialog: () => UseDialogResult;
|
|
101
|
+
|
|
102
|
+
/* Utilities */
|
|
103
|
+
/* ========================================================================== */
|
|
104
|
+
|
|
105
|
+
/** Returns a string with the given prefix followed by the given values. */
|
|
106
|
+
type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
|
|
107
|
+
|
|
108
|
+
type TransformProps<Props, Media> = {
|
|
109
|
+
[K in keyof Props]: (
|
|
110
|
+
| Props[K]
|
|
111
|
+
| (
|
|
112
|
+
& {
|
|
113
|
+
[KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
|
|
114
|
+
}
|
|
115
|
+
& {
|
|
116
|
+
[KMedia in string]: Props[K]
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare const Backdrop: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<Omit<BackdropProps$1, "ref"> & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<Omit<BackdropProps$1, "ref"> & React.RefAttributes<HTMLDivElement>>, {}, {}>;
|
|
123
|
+
type BackdropProps = StrictComponentProps<typeof Backdrop>;
|
|
124
|
+
|
|
125
|
+
declare const Close: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<Omit<CloseProps$1, "ref"> & React.RefAttributes<HTMLButtonElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<Omit<CloseProps$1, "ref"> & React.RefAttributes<HTMLButtonElement>>, {}, {}>;
|
|
126
|
+
type CloseProps = StrictComponentProps<typeof Close>;
|
|
127
|
+
|
|
128
|
+
declare const StyledContent: React__default.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React__default.ForwardRefExoticComponent<Omit<ContentProps$1, "ref"> & React__default.RefAttributes<HTMLDivElement>>>, "scroll" | "flat" | "fullScreen"> & TransformProps<{
|
|
129
|
+
scroll?: "viewport" | "window" | undefined;
|
|
130
|
+
flat?: boolean | "true" | undefined;
|
|
131
|
+
fullScreen?: boolean | "true" | undefined;
|
|
132
|
+
}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React__default.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React__default.ForwardRefExoticComponent<Omit<ContentProps$1, "ref"> & React__default.RefAttributes<HTMLDivElement>>, {
|
|
133
|
+
scroll?: "viewport" | "window" | undefined;
|
|
134
|
+
flat?: boolean | "true" | undefined;
|
|
135
|
+
fullScreen?: boolean | "true" | undefined;
|
|
136
|
+
}, {}>;
|
|
137
|
+
interface ContentProps extends StrictComponentProps<typeof StyledContent> {
|
|
138
|
+
/** The element to focus when the dialog opens. @default the dialog window */
|
|
139
|
+
initialFocus?: RefObject<HTMLElement>;
|
|
140
|
+
}
|
|
141
|
+
declare const Content: React__default.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
|
|
143
|
+
declare const Banner: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
144
|
+
type BannerProps = ComponentProps<typeof Banner>;
|
|
145
|
+
declare const Title: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<Omit<TitleProps$1, "ref"> & React.RefAttributes<HTMLHeadingElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLHeadingElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<Omit<TitleProps$1, "ref"> & React.RefAttributes<HTMLHeadingElement>>, {}, {}>;
|
|
146
|
+
type TitleProps = ComponentProps<typeof Title>;
|
|
147
|
+
declare const Description: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<Omit<DescriptionProps$1, "ref"> & React.RefAttributes<HTMLParagraphElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLParagraphElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<Omit<DescriptionProps$1, "ref"> & React.RefAttributes<HTMLParagraphElement>>, {}, {}>;
|
|
148
|
+
type DescriptionProps = ComponentProps<typeof Description>;
|
|
149
|
+
declare const Actions: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
150
|
+
type ActionsProps = ComponentProps<typeof Actions>;
|
|
151
|
+
|
|
152
|
+
interface PortalProps extends PortalProps$1 {
|
|
153
|
+
}
|
|
154
|
+
declare const Portal: ({ children, container }: PortalProps$1) => React.ReactNode;
|
|
155
|
+
|
|
156
|
+
interface TriggerProps extends TriggerProps$1 {
|
|
157
|
+
}
|
|
158
|
+
declare const Trigger: React.ForwardRefExoticComponent<Omit<TriggerProps$1, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
159
|
+
|
|
160
|
+
interface DialogProps extends DialogOptions {
|
|
161
|
+
children?: ReactNode;
|
|
162
|
+
}
|
|
163
|
+
declare const Dialog: ((props: DialogProps) => ReactNode) & Parts;
|
|
164
|
+
interface Parts {
|
|
165
|
+
Trigger: typeof Trigger;
|
|
166
|
+
Portal: typeof Portal;
|
|
167
|
+
Backdrop: typeof Backdrop;
|
|
168
|
+
Content: typeof Content;
|
|
169
|
+
Banner: typeof Banner;
|
|
170
|
+
Title: typeof Title;
|
|
171
|
+
Description: typeof Description;
|
|
172
|
+
Actions: typeof Actions;
|
|
173
|
+
Close: typeof Close;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export { Dialog, useDialog };
|
|
177
|
+
export type { BackNavigationPayload, ActionsProps as DialogActionsProps, BackdropProps as DialogBackdropProps, BannerProps as DialogBannerProps, DialogCallbacks, CloseProps as DialogCloseProps, ContentProps as DialogContentProps, DescriptionProps as DialogDescriptionProps, DialogOptions, PortalProps as DialogPortalProps, DialogProps, DialogRole, DialogState, TitleProps as DialogTitleProps, TriggerProps as DialogTriggerProps, UseDialogResult };
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mirohq/design-system-dialog",
|
|
3
|
+
"version": "0.1.0-dialog.0",
|
|
4
|
+
"description": "React dialog following the WAI-ARIA APG modal dialog pattern",
|
|
5
|
+
"author": "Miro",
|
|
6
|
+
"source": "src/index.ts",
|
|
7
|
+
"main": "dist/main.js",
|
|
8
|
+
"module": "dist/module.js",
|
|
9
|
+
"types": "dist/types.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": "./dist/main.js",
|
|
14
|
+
"import": "./dist/module.js",
|
|
15
|
+
"types": "./dist/types.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@stitches/react": "^1.2.8",
|
|
26
|
+
"react": "^16.14 || ^17 || ^18 || ^19",
|
|
27
|
+
"react-dom": "^16.14 || ^17 || ^18 || ^19"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@mirohq/design-system-primitive": "^2.2.1",
|
|
31
|
+
"@mirohq/design-system-stitches": "^3.3.34-dialog.0",
|
|
32
|
+
"@mirohq/design-system-use-browser-navigation": "^0.2.0-dialog.0",
|
|
33
|
+
"@mirohq/design-system-use-focus-trap": "^0.1.1-dialog.0",
|
|
34
|
+
"@mirohq/design-system-use-id": "^1.1.1",
|
|
35
|
+
"@mirohq/design-system-use-overlay": "^0.2.0-dialog.0",
|
|
36
|
+
"@mirohq/design-system-use-scroll-lock": "^0.1.0",
|
|
37
|
+
"@mirohq/design-system-utils": "^1.5.0-dialog.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "rollup -c ../../../rollup.config.js",
|
|
41
|
+
"clean": "rm -rf dist",
|
|
42
|
+
"prebuild": "pnpm clean"
|
|
43
|
+
}
|
|
44
|
+
}
|