@plexui/vue 0.29.0 → 0.30.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/dist/es/components/Dialog/Dialog.js +32 -11
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/RadioGroup/RadioGroup.js +3 -1
- package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +11 -3
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -191,7 +191,7 @@ export const DialogContent = defineComponent({
|
|
|
191
191
|
* and a phone sheet pulled down all ask first. Pass it while there are changes and leave it out (or `false`) when
|
|
192
192
|
* there are none. Setting `open` to false yourself, such as after Save, closes at once.
|
|
193
193
|
*/
|
|
194
|
-
confirmClose: { type: [Object, Boolean], default: undefined },
|
|
194
|
+
confirmClose: { type: [Object, Boolean, Function], default: undefined },
|
|
195
195
|
/** Stack order of the overlay and the dialog. @default 50 */
|
|
196
196
|
zIndex: Number,
|
|
197
197
|
/** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */
|
|
@@ -230,17 +230,34 @@ export const DialogContent = defineComponent({
|
|
|
230
230
|
const closeButton = shallowRef(null);
|
|
231
231
|
// Where focus returns when the question is dismissed: the field or button that asked to close
|
|
232
232
|
let returnFocus = null;
|
|
233
|
+
// The question a function `confirmClose` returned at the last close attempt
|
|
234
|
+
const asked = shallowRef(null);
|
|
235
|
+
// Whether the dialog closed at once (no question to ask)
|
|
233
236
|
const requestClose = () => {
|
|
234
237
|
// A press on a dialog that is already leaving asks nothing
|
|
235
238
|
if (!open.value)
|
|
236
|
-
return;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
+
return false;
|
|
240
|
+
const confirm = props.confirmClose;
|
|
241
|
+
if (!confirm) {
|
|
242
|
+
setOpen(false);
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
239
245
|
if (confirming.value || performance.now() - confirmClosedAt < DOUBLE_CLICK)
|
|
240
|
-
return;
|
|
246
|
+
return false;
|
|
247
|
+
// A function decides at the attempt: the owner commits what is typed, then compares
|
|
248
|
+
if (typeof confirm === "function") {
|
|
249
|
+
const question = confirm();
|
|
250
|
+
if (!question) {
|
|
251
|
+
setOpen(false);
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
asked.value = question;
|
|
255
|
+
}
|
|
241
256
|
returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
242
257
|
setConfirming(true);
|
|
258
|
+
return false;
|
|
243
259
|
};
|
|
260
|
+
const question = () => (typeof props.confirmClose === "function" ? asked.value : props.confirmClose || null);
|
|
244
261
|
const setCloseButton = (button) => { closeButton.value = button; };
|
|
245
262
|
// The answer that discards: the question leaves first, then the dialog, as iOS dismisses the confirmation before
|
|
246
263
|
// the sheet; together, the question would stand still over the sheet as it leaves.
|
|
@@ -373,10 +390,8 @@ export const DialogContent = defineComponent({
|
|
|
373
390
|
const request = new CustomEvent("dialog.sheetDrag", { cancelable: true, detail: { originalEvent } });
|
|
374
391
|
if (ownerKeepsOpen(request))
|
|
375
392
|
return false;
|
|
376
|
-
if (props.confirmClose)
|
|
377
|
-
requestClose();
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
393
|
+
if (props.confirmClose)
|
|
394
|
+
return requestClose();
|
|
380
395
|
setOpen(false);
|
|
381
396
|
return true;
|
|
382
397
|
};
|
|
@@ -508,7 +523,7 @@ export const DialogContent = defineComponent({
|
|
|
508
523
|
slots.default?.(),
|
|
509
524
|
props.confirmClose
|
|
510
525
|
? h(ConfirmClose, {
|
|
511
|
-
...
|
|
526
|
+
...(question() ?? { message: null }),
|
|
512
527
|
open: confirming.value,
|
|
513
528
|
anchor: (phoneWindow.value || phoneLayout.value) && mobileVariant.value === "sheet" ? closeButton.value : null,
|
|
514
529
|
returnFocus: () => returnFocus,
|
|
@@ -779,6 +794,7 @@ const ConfirmClose = defineComponent({
|
|
|
779
794
|
name: "DialogConfirmClose",
|
|
780
795
|
props: {
|
|
781
796
|
message: { type: null, required: true },
|
|
797
|
+
detail: { type: null, default: undefined },
|
|
782
798
|
confirmLabel: { type: null, default: "Discard Changes" },
|
|
783
799
|
cancelLabel: { type: null, default: "Keep Editing" },
|
|
784
800
|
open: { type: Boolean, default: false },
|
|
@@ -796,6 +812,7 @@ const ConfirmClose = defineComponent({
|
|
|
796
812
|
const setOpen = (next) => emit("update:open", next);
|
|
797
813
|
const confirm = () => emit("confirm");
|
|
798
814
|
const messageId = useId(undefined, "plex-confirm-close");
|
|
815
|
+
const hasDetail = () => props.detail != null && props.detail !== false;
|
|
799
816
|
return () => {
|
|
800
817
|
const anchor = props.anchor;
|
|
801
818
|
if (anchor) {
|
|
@@ -816,6 +833,7 @@ const ConfirmClose = defineComponent({
|
|
|
816
833
|
"data-dialog-confirm-close": "",
|
|
817
834
|
}, () => [
|
|
818
835
|
h("p", { id: messageId, class: s.ConfirmCloseMessage }, [props.message]),
|
|
836
|
+
hasDetail() ? h("p", { class: s.ConfirmCloseDetail }, [props.detail]) : null,
|
|
819
837
|
h(Button, { block: true, pill: true, color: "danger", variant: "soft", class: s.ConfirmCloseAction, onClick: confirm }, () => props.confirmLabel),
|
|
820
838
|
]),
|
|
821
839
|
]);
|
|
@@ -837,7 +855,10 @@ const ConfirmClose = defineComponent({
|
|
|
837
855
|
},
|
|
838
856
|
}, () => [
|
|
839
857
|
// The question names the alert, as an alert's title does
|
|
840
|
-
h(DialogHeader, null, () => [
|
|
858
|
+
h(DialogHeader, null, () => [
|
|
859
|
+
h(DialogTitle, null, () => props.message),
|
|
860
|
+
hasDetail() ? h(DialogDescription, null, () => props.detail) : null,
|
|
861
|
+
]),
|
|
841
862
|
h(DialogFooter, null, () => [
|
|
842
863
|
h(DialogClose, null, () => [h(Button, { color: "secondary", variant: "soft" }, () => props.cancelLabel)]),
|
|
843
864
|
h(Button, { color: "danger", onClick: confirm }, () => props.confirmLabel),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EAUL,OAAO,EACP,UAAU,GACX,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACzG,OAAO,EAA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BAClC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { Button } from \"../Button/Button.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { Popover, PopoverAnchor, PopoverContent } from \"../Popover/Popover.js\"\nimport { barBackground, TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarTrailing, type BarBackground, type BarBackgroundAlias } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = { scrolled: Ref<boolean>; contentBelow: Ref<boolean> }\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = {\n showClose: boolean\n /** The bar's Close asks first (`confirmClose`) */\n asksToClose: boolean\n requestClose: () => void\n setCloseButton: (button: HTMLElement | null) => void\n}\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// A close that asks first (`confirmClose`): DialogClose inside the content asks as the Close button does\nconst DIALOG_REQUEST_CLOSE: InjectionKey<ComputedRef<(() => void) | null>> = Symbol(\"DialogRequestClose\")\n\n/**\n * What a dialog asks before it closes with unsaved changes: the question and its destructive answer. On a phone\n * Sheet it stands at the bar's Close as an iOS confirmation (a glass popover over the sheet, no dimming; a press\n * outside it keeps editing); elsewhere it is an alert with a second answer that keeps editing.\n */\nexport type DialogConfirmClose = {\n /** The question, such as \"Are you sure you want to discard this new note?\"; text or vnodes, as React takes a node */\n message: VNodeChild\n /** The answer that closes and loses the changes. @default \"Discard Changes\" */\n confirmLabel?: VNodeChild\n /** The alert's answer that keeps the dialog open. @default \"Keep Editing\" */\n cancelLabel?: VNodeChild\n}\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /**\n * Where a phone sheet stands at 767px and below: `bottom`, or `fullscreen` for the whole screen. `center` is the\n * alert's place: without `mobileVariant` it makes the dialog an alert. @default \"fullscreen\" for a fullscreen\n * dialog, else \"bottom\"\n */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /**\n * The iOS presentation at 767px and below. A phone has two modal views: the sheet, which iOS gives any view it\n * presents, and the alert, a short question with its answers (UIAlertController). @default \"sheet\"\n */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog, and on a phone sheet pulled down to close, before it closes;\n * `event.preventDefault()` keeps it open, such as for a form with unsaved changes (the sheet then returns, as an\n * iOS sheet does under `isModalInPresentation`), or for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /**\n * Asks before the dialog closes, as a form with unsaved changes does: Close, DialogClose, Escape, a press outside\n * and a phone sheet pulled down all ask first. Pass it while there are changes and leave it out (or `false`) when\n * there are none. Setting `open` to false yourself, such as after Save, closes at once.\n */\n confirmClose: { type: [Object, Boolean] as PropType<DialogConfirmClose | false | null>, default: undefined },\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n const scroll: DialogScroll = { scrolled: ref(false), contentBelow: ref(false) }\n provide(DIALOG_SCROLL, scroll)\n provide(TOOLBAR_HOST, { kind: \"dialog\", scrolled: scroll.scrolled, contentBelow: scroll.contentBelow })\n // A phone has no other modal view than the sheet and the alert (owner 12.11: «нет такого в iOS»): a centered\n // dialog is an alert, any other a sheet, at the bottom or over the whole screen.\n const mobileVariant = computed(() => props.mobileVariant ?? (props.mobilePlacement === \"center\" ? \"alert\" : \"sheet\"))\n const phoneWindow = usePhoneLayout()\n // A close asked for while there are changes waits for the answer (`confirmClose`). A press that dismisses the\n // question itself does not ask again: one just after the question closed is that press.\n const confirming = ref(false)\n let confirmClosedAt = 0\n const setConfirming = (next: boolean) => {\n if (confirming.value && !next) confirmClosedAt = performance.now()\n confirming.value = next\n }\n watch([open, () => props.confirmClose], ([isOpen, confirm]) => { if (!isOpen || !confirm) setConfirming(false) })\n const closeButton = shallowRef<HTMLElement | null>(null)\n // Where focus returns when the question is dismissed: the field or button that asked to close\n let returnFocus: HTMLElement | null = null\n const requestClose = () => {\n // A press on a dialog that is already leaving asks nothing\n if (!open.value) return\n if (!props.confirmClose) return setOpen(false)\n if (confirming.value || performance.now() - confirmClosedAt < DOUBLE_CLICK) return\n returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null\n setConfirming(true)\n }\n const setCloseButton = (button: HTMLElement | null) => { closeButton.value = button }\n // The answer that discards: the question leaves first, then the dialog, as iOS dismisses the confirmation before\n // the sheet; together, the question would stand still over the sheet as it leaves.\n let confirmTimer: ReturnType<typeof setTimeout> | undefined\n onBeforeUnmount(() => clearTimeout(confirmTimer))\n // A close from outside, or a new opening, ends a discard that is still waiting for the question to leave\n watch(open, () => clearTimeout(confirmTimer))\n const confirmAndClose = () => {\n setConfirming(false)\n clearTimeout(confirmTimer)\n confirmTimer = setTimeout(() => setOpen(false), overlayTiming.exitDuration)\n }\n provide(DIALOG_REQUEST_CLOSE, computed(() => (props.confirmClose ? requestClose : null)))\n provide(DIALOG_SHEET, computed(() => (mobileVariant.value === \"sheet\"\n ? { showClose: props.showClose, asksToClose: Boolean(props.confirmClose), requestClose, setCloseButton }\n : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n mobileVariant.value === \"alert\"\n ? \"center\"\n : (props.mobilePlacement ?? props.placement) === \"fullscreen\" ? \"fullscreen\" : \"bottom\",\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n requestClose()\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) requestClose()\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press that dismisses the question before a close keeps editing\n if (confirming.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n // With changes a touch or another button asks too, and Reka does not close on it\n if (props.confirmClose) {\n // The owner's veto first: it reads the event's own defaultPrevented\n const kept = ownerKeepsOpen(event as DialogInteractOutsideEvent)\n event.preventDefault()\n // A right click (button 2, or Control and a click on a Mac) is not a dismissal, as Reka and React hold (Codex #58)\n if (!kept && !originalEvent.ctrlKey && originalEvent.button !== 2) requestClose()\n return\n }\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n // With changes focus leaving asks, as React's interact-outside does; Reka does not close on it\n if (!event.defaultPrevented && props.confirmClose) {\n event.preventDefault()\n requestClose()\n }\n }\n // A sheet pulled down asks as a press outside does: an owner that keeps the dialog open on one, such as a form\n // with unsaved changes, keeps it on the other, and the sheet returns.\n const dismissByDrag = (originalEvent: TouchEvent) => {\n const request: DialogInteractOutsideEvent = new CustomEvent(\"dialog.sheetDrag\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return false\n if (props.confirmClose) {\n requestClose()\n return false\n }\n setOpen(false)\n return true\n }\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? 0}px`)\n }\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, dismissByDrag)\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, dismissByDrag)\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": mobileVariant.value,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n props.confirmClose\n ? h(ConfirmClose, {\n ...props.confirmClose,\n open: confirming.value,\n anchor: (phoneWindow.value || phoneLayout.value) && mobileVariant.value === \"sheet\" ? closeButton.value : null,\n returnFocus: () => returnFocus,\n \"onUpdate:open\": setConfirming,\n onConfirm: confirmAndClose,\n zIndex: props.zIndex,\n })\n : null,\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n // A sheet crosses the screen on a phone, and wherever its owner asked for one; a dialog left to its defaults\n // stays the centred panel on a desktop, with that panel's timing.\n const sheetCrosses = (phoneWindow.value || phoneLayout.value || props.mobileVariant === \"sheet\" || props.mobilePlacement !== undefined) &&\n (mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\")\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || sheetCrosses\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: s.Transition,\n ...(crossesScreen ? overlayTimingLarge : overlayTiming),\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type DialogBarBackground = BarBackground | BarBackgroundAlias\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isLeadingAction = (part: unknown) => isHeaderAction(part) && (part as VNode).props?.side === \"leading\"\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": barBackground(props.background), \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row 16px under the top edge.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n // A step's Back takes the leading place, as the back button of a screen pushed inside an iOS sheet\n sheet?.value?.showClose && !parts.some(isLeadingAction)\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n sheet.value?.asksToClose\n ? h(NavigationButton, {\n \"ref\": (instance: unknown) => sheet.value?.setCloseButton(elementOf(instance)),\n \"action\": \"close\",\n \"variant\": \"ghost\",\n \"aria-label\": \"Close dialog\",\n \"onClick\": () => sheet.value?.requestClose(),\n })\n : h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n ...parts.filter(isLeadingAction),\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part))),\n ...parts.filter((part) => isHeaderAction(part) && !isLeadingAction(part)),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n props: {\n /**\n * `leading` puts the action before the title, such as the Back of a step in `DialogSteps`: on a phone Sheet it\n * takes the place of Close, as the back button of a screen pushed inside an iOS sheet does.\n * @default \"trailing\"\n */\n side: { type: String as PropType<\"leading\" | \"trailing\">, default: \"trailing\" },\n },\n setup(props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => {\n if (bar?.value && props.side === \"leading\") return h(ToolbarLeading, { class: s.BarClose }, () => slots.default?.())\n if (bar?.value) return h(ToolbarTrailing, null, () => slots.default?.())\n return h(\"div\", { \"class\": s.HeaderAction, \"data-side\": props.side === \"leading\" ? \"leading\" : undefined }, slots.default?.())\n }\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class] }, [\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const phone = usePhoneLayout()\n return () => {\n const parts = slots.default?.()\n // A phone Sheet stacks its main action on top, as an iOS setup sheet does. A footer is written with it last,\n // where a desktop row ends, so the order is turned in the page itself: focus and a screen reader meet the\n // actions in the order they are seen.\n const turned = sheet?.value && phone.value && props.mobileLayout !== \"inline\"\n return h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": barBackground(props.background),\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, turned ? headerParts(parts).reverse() : parts)\n }\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const requestClose = inject(DIALOG_REQUEST_CLOSE, null)\n const onClick = (event: Event) => {\n if (event.defaultPrevented) return\n const request = requestClose?.value\n if (request) request()\n else rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nconst elementOf = (instance: unknown): HTMLElement | null =>\n instance instanceof HTMLElement ? instance : ((instance as { $el?: unknown } | null)?.$el instanceof HTMLElement ? (instance as { $el: HTMLElement }).$el : null)\n\n// iOS asks at the button that closes (a confirmation dialog presented from the sheet's Close on iOS 27: a glass\n// popover over it, no dimming, the question in 17 regular over a full-width destructive pill); with no such button,\n// and on a desktop, the question is an alert.\nconst ConfirmClose = defineComponent({\n name: \"DialogConfirmClose\",\n props: {\n message: { type: null as unknown as PropType<VNodeChild>, required: true },\n confirmLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Discard Changes\" },\n cancelLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Keep Editing\" },\n open: { type: Boolean, default: false },\n /** The phone Sheet's Close: the question stands at it. Without one it is an alert. */\n anchor: { type: Object as PropType<HTMLElement | null>, default: null },\n returnFocus: { type: Function as PropType<() => HTMLElement | null>, required: true },\n /** The owner dialog's stack order: the question stands over it */\n zIndex: Number,\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n confirm: () => true,\n },\n setup(props, { emit }) {\n const setOpen = (next: boolean) => emit(\"update:open\", next)\n const confirm = () => emit(\"confirm\")\n const messageId = useId(undefined, \"plex-confirm-close\")\n return () => {\n const anchor = props.anchor\n if (anchor) {\n return h(Popover, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(PopoverAnchor, { element: anchor }),\n // Over the Close, its corner 6 before the button's, as the native confirmation grows out of it\n h(PopoverContent, {\n \"side\": \"bottom\",\n \"align\": \"start\",\n \"sideOffset\": -anchor.offsetHeight,\n \"alignOffset\": -6,\n \"collisionPadding\": 10,\n \"width\": 240,\n \"minWidth\": 240,\n \"zIndex\": props.zIndex,\n \"ariaLabelledby\": messageId,\n \"class\": s.ConfirmClose,\n \"data-dialog-confirm-close\": \"\",\n }, () => [\n h(\"p\", { id: messageId, class: s.ConfirmCloseMessage }, [props.message as VNodeArrayChildren[number]]),\n h(Button, { block: true, pill: true, color: \"danger\", variant: \"soft\", class: s.ConfirmCloseAction, onClick: confirm }, () => props.confirmLabel),\n ]),\n ])\n }\n return h(Dialog, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(DialogContent, {\n \"mobileVariant\": \"alert\",\n \"surface\": \"plain\",\n \"width\": 360,\n \"showClose\": false,\n \"zIndex\": props.zIndex,\n \"data-dialog-confirm-close\": \"\",\n \"onCloseAutoFocus\": (event: Event) => {\n const target = props.returnFocus()\n if (target?.isConnected) {\n event.preventDefault()\n target.focus({ preventScroll: true })\n }\n },\n }, () => [\n // The question names the alert, as an alert's title does\n h(DialogHeader, null, () => [h(DialogTitle, null, () => props.message)]),\n h(DialogFooter, null, () => [\n h(DialogClose, null, () => [h(Button, { color: \"secondary\", variant: \"soft\" }, () => props.cancelLabel)]),\n h(Button, { color: \"danger\", onClick: confirm }, () => props.confirmLabel),\n ]),\n ]),\n ])\n }\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/**\n * A press or a focus outside the dialog, or a phone sheet pulled down to close; `event.detail.originalEvent` is the\n * browser's event (a TouchEvent for the sheet).\n */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent | TouchEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogHeaderActionProps = InstanceType<typeof DialogHeaderAction>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EAUL,OAAO,EACP,UAAU,GACX,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAA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ACb,OAAO,EAAE,SAAS;oBAClB,MAAM,EAAE,SAAS;oBACjB,YAAY,EAAE,gBAAgB;oBAC9B,cAAc,EAAE,iBAAiB;iBAClC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { Button } from \"../Button/Button.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { Popover, PopoverAnchor, PopoverContent } from \"../Popover/Popover.js\"\nimport { barBackground, TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarTrailing, type BarBackground, type BarBackgroundAlias } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = { scrolled: Ref<boolean>; contentBelow: Ref<boolean> }\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = {\n showClose: boolean\n /** The bar's Close asks first (`confirmClose`) */\n asksToClose: boolean\n requestClose: () => void\n setCloseButton: (button: HTMLElement | null) => void\n}\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// A close that asks first (`confirmClose`): DialogClose inside the content asks as the Close button does\nconst DIALOG_REQUEST_CLOSE: InjectionKey<ComputedRef<(() => void) | null>> = Symbol(\"DialogRequestClose\")\n\n/**\n * What a dialog asks before it closes with unsaved changes: the question and its destructive answer. On a phone\n * Sheet it stands at the bar's Close as an iOS confirmation (a glass popover over the sheet, no dimming; a press\n * outside it keeps editing); elsewhere it is an alert with a second answer that keeps editing.\n */\nexport type DialogConfirmClose = {\n /** The question, such as \"Are you sure you want to discard this new note?\"; text or vnodes, as React takes a node */\n message: VNodeChild\n /** A quieter line under the question, such as what a save left behind */\n detail?: VNodeChild\n /** The answer that closes and loses the changes. @default \"Discard Changes\" */\n confirmLabel?: VNodeChild\n /** The alert's answer that keeps the dialog open. @default \"Keep Editing\" */\n cancelLabel?: VNodeChild\n}\n/**\n * `confirmClose` as a value, or as a function the dialog calls at each close attempt (Close, DialogClose, Escape, a\n * press outside, a sheet pulled down) before it decides: it returns the question, or nothing to close at once. An\n * owner that commits typed words only on blur commits them there, then compares.\n */\nexport type DialogConfirmCloseProp = DialogConfirmClose | (() => DialogConfirmClose | false | null | undefined) | false | null\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /**\n * Where a phone sheet stands at 767px and below: `bottom`, or `fullscreen` for the whole screen. `center` is the\n * alert's place: without `mobileVariant` it makes the dialog an alert. @default \"fullscreen\" for a fullscreen\n * dialog, else \"bottom\"\n */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /**\n * The iOS presentation at 767px and below. A phone has two modal views: the sheet, which iOS gives any view it\n * presents, and the alert, a short question with its answers (UIAlertController). @default \"sheet\"\n */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog, and on a phone sheet pulled down to close, before it closes;\n * `event.preventDefault()` keeps it open, such as for a form with unsaved changes (the sheet then returns, as an\n * iOS sheet does under `isModalInPresentation`), or for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /**\n * Asks before the dialog closes, as a form with unsaved changes does: Close, DialogClose, Escape, a press outside\n * and a phone sheet pulled down all ask first. Pass it while there are changes and leave it out (or `false`) when\n * there are none. Setting `open` to false yourself, such as after Save, closes at once.\n */\n confirmClose: { type: [Object, Boolean, Function] as PropType<DialogConfirmCloseProp>, default: undefined },\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n const scroll: DialogScroll = { scrolled: ref(false), contentBelow: ref(false) }\n provide(DIALOG_SCROLL, scroll)\n provide(TOOLBAR_HOST, { kind: \"dialog\", scrolled: scroll.scrolled, contentBelow: scroll.contentBelow })\n // A phone has no other modal view than the sheet and the alert (owner 12.11: «нет такого в iOS»): a centered\n // dialog is an alert, any other a sheet, at the bottom or over the whole screen.\n const mobileVariant = computed(() => props.mobileVariant ?? (props.mobilePlacement === \"center\" ? \"alert\" : \"sheet\"))\n const phoneWindow = usePhoneLayout()\n // A close asked for while there are changes waits for the answer (`confirmClose`). A press that dismisses the\n // question itself does not ask again: one just after the question closed is that press.\n const confirming = ref(false)\n let confirmClosedAt = 0\n const setConfirming = (next: boolean) => {\n if (confirming.value && !next) confirmClosedAt = performance.now()\n confirming.value = next\n }\n watch([open, () => props.confirmClose], ([isOpen, confirm]) => { if (!isOpen || !confirm) setConfirming(false) })\n const closeButton = shallowRef<HTMLElement | null>(null)\n // Where focus returns when the question is dismissed: the field or button that asked to close\n let returnFocus: HTMLElement | null = null\n // The question a function `confirmClose` returned at the last close attempt\n const asked = shallowRef<DialogConfirmClose | null>(null)\n // Whether the dialog closed at once (no question to ask)\n const requestClose = (): boolean => {\n // A press on a dialog that is already leaving asks nothing\n if (!open.value) return false\n const confirm = props.confirmClose\n if (!confirm) { setOpen(false); return true }\n if (confirming.value || performance.now() - confirmClosedAt < DOUBLE_CLICK) return false\n // A function decides at the attempt: the owner commits what is typed, then compares\n if (typeof confirm === \"function\") {\n const question = confirm()\n if (!question) { setOpen(false); return true }\n asked.value = question\n }\n returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null\n setConfirming(true)\n return false\n }\n const question = () => (typeof props.confirmClose === \"function\" ? asked.value : props.confirmClose || null)\n const setCloseButton = (button: HTMLElement | null) => { closeButton.value = button }\n // The answer that discards: the question leaves first, then the dialog, as iOS dismisses the confirmation before\n // the sheet; together, the question would stand still over the sheet as it leaves.\n let confirmTimer: ReturnType<typeof setTimeout> | undefined\n onBeforeUnmount(() => clearTimeout(confirmTimer))\n // A close from outside, or a new opening, ends a discard that is still waiting for the question to leave\n watch(open, () => clearTimeout(confirmTimer))\n const confirmAndClose = () => {\n setConfirming(false)\n clearTimeout(confirmTimer)\n confirmTimer = setTimeout(() => setOpen(false), overlayTiming.exitDuration)\n }\n provide(DIALOG_REQUEST_CLOSE, computed(() => (props.confirmClose ? requestClose : null)))\n provide(DIALOG_SHEET, computed(() => (mobileVariant.value === \"sheet\"\n ? { showClose: props.showClose, asksToClose: Boolean(props.confirmClose), requestClose, setCloseButton }\n : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n mobileVariant.value === \"alert\"\n ? \"center\"\n : (props.mobilePlacement ?? props.placement) === \"fullscreen\" ? \"fullscreen\" : \"bottom\",\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n requestClose()\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) requestClose()\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press that dismisses the question before a close keeps editing\n if (confirming.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n // With changes a touch or another button asks too, and Reka does not close on it\n if (props.confirmClose) {\n // The owner's veto first: it reads the event's own defaultPrevented\n const kept = ownerKeepsOpen(event as DialogInteractOutsideEvent)\n event.preventDefault()\n // A right click (button 2, or Control and a click on a Mac) is not a dismissal, as Reka and React hold (Codex #58)\n if (!kept && !originalEvent.ctrlKey && originalEvent.button !== 2) requestClose()\n return\n }\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n // With changes focus leaving asks, as React's interact-outside does; Reka does not close on it\n if (!event.defaultPrevented && props.confirmClose) {\n event.preventDefault()\n requestClose()\n }\n }\n // A sheet pulled down asks as a press outside does: an owner that keeps the dialog open on one, such as a form\n // with unsaved changes, keeps it on the other, and the sheet returns.\n const dismissByDrag = (originalEvent: TouchEvent) => {\n const request: DialogInteractOutsideEvent = new CustomEvent(\"dialog.sheetDrag\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return false\n if (props.confirmClose) return requestClose()\n setOpen(false)\n return true\n }\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? 0}px`)\n }\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, dismissByDrag)\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, dismissByDrag)\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": mobileVariant.value,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n props.confirmClose\n ? h(ConfirmClose, {\n ...(question() ?? { message: null }),\n open: confirming.value,\n anchor: (phoneWindow.value || phoneLayout.value) && mobileVariant.value === \"sheet\" ? closeButton.value : null,\n returnFocus: () => returnFocus,\n \"onUpdate:open\": setConfirming,\n onConfirm: confirmAndClose,\n zIndex: props.zIndex,\n })\n : null,\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n // A sheet crosses the screen on a phone, and wherever its owner asked for one; a dialog left to its defaults\n // stays the centred panel on a desktop, with that panel's timing.\n const sheetCrosses = (phoneWindow.value || phoneLayout.value || props.mobileVariant === \"sheet\" || props.mobilePlacement !== undefined) &&\n (mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\")\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || sheetCrosses\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: s.Transition,\n ...(crossesScreen ? overlayTimingLarge : overlayTiming),\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type DialogBarBackground = BarBackground | BarBackgroundAlias\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isLeadingAction = (part: unknown) => isHeaderAction(part) && (part as VNode).props?.side === \"leading\"\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": barBackground(props.background), \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row 16px under the top edge.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n // A step's Back takes the leading place, as the back button of a screen pushed inside an iOS sheet\n sheet?.value?.showClose && !parts.some(isLeadingAction)\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n sheet.value?.asksToClose\n ? h(NavigationButton, {\n \"ref\": (instance: unknown) => sheet.value?.setCloseButton(elementOf(instance)),\n \"action\": \"close\",\n \"variant\": \"ghost\",\n \"aria-label\": \"Close dialog\",\n \"onClick\": () => sheet.value?.requestClose(),\n })\n : h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n ...parts.filter(isLeadingAction),\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part))),\n ...parts.filter((part) => isHeaderAction(part) && !isLeadingAction(part)),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n props: {\n /**\n * `leading` puts the action before the title, such as the Back of a step in `DialogSteps`: on a phone Sheet it\n * takes the place of Close, as the back button of a screen pushed inside an iOS sheet does.\n * @default \"trailing\"\n */\n side: { type: String as PropType<\"leading\" | \"trailing\">, default: \"trailing\" },\n },\n setup(props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => {\n if (bar?.value && props.side === \"leading\") return h(ToolbarLeading, { class: s.BarClose }, () => slots.default?.())\n if (bar?.value) return h(ToolbarTrailing, null, () => slots.default?.())\n return h(\"div\", { \"class\": s.HeaderAction, \"data-side\": props.side === \"leading\" ? \"leading\" : undefined }, slots.default?.())\n }\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class] }, [\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const phone = usePhoneLayout()\n return () => {\n const parts = slots.default?.()\n // A phone Sheet stacks its main action on top, as an iOS setup sheet does. A footer is written with it last,\n // where a desktop row ends, so the order is turned in the page itself: focus and a screen reader meet the\n // actions in the order they are seen.\n const turned = sheet?.value && phone.value && props.mobileLayout !== \"inline\"\n return h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": barBackground(props.background),\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, turned ? headerParts(parts).reverse() : parts)\n }\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const requestClose = inject(DIALOG_REQUEST_CLOSE, null)\n const onClick = (event: Event) => {\n if (event.defaultPrevented) return\n const request = requestClose?.value\n if (request) request()\n else rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nconst elementOf = (instance: unknown): HTMLElement | null =>\n instance instanceof HTMLElement ? instance : ((instance as { $el?: unknown } | null)?.$el instanceof HTMLElement ? (instance as { $el: HTMLElement }).$el : null)\n\n// iOS asks at the button that closes (a confirmation dialog presented from the sheet's Close on iOS 27: a glass\n// popover over it, no dimming, the question in 17 regular over a full-width destructive pill); with no such button,\n// and on a desktop, the question is an alert.\nconst ConfirmClose = defineComponent({\n name: \"DialogConfirmClose\",\n props: {\n message: { type: null as unknown as PropType<VNodeChild>, required: true },\n detail: { type: null as unknown as PropType<VNodeChild>, default: undefined },\n confirmLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Discard Changes\" },\n cancelLabel: { type: null as unknown as PropType<VNodeChild>, default: \"Keep Editing\" },\n open: { type: Boolean, default: false },\n /** The phone Sheet's Close: the question stands at it. Without one it is an alert. */\n anchor: { type: Object as PropType<HTMLElement | null>, default: null },\n returnFocus: { type: Function as PropType<() => HTMLElement | null>, required: true },\n /** The owner dialog's stack order: the question stands over it */\n zIndex: Number,\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n confirm: () => true,\n },\n setup(props, { emit }) {\n const setOpen = (next: boolean) => emit(\"update:open\", next)\n const confirm = () => emit(\"confirm\")\n const messageId = useId(undefined, \"plex-confirm-close\")\n const hasDetail = () => props.detail != null && props.detail !== false\n return () => {\n const anchor = props.anchor\n if (anchor) {\n return h(Popover, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(PopoverAnchor, { element: anchor }),\n // Over the Close, its corner 6 before the button's, as the native confirmation grows out of it\n h(PopoverContent, {\n \"side\": \"bottom\",\n \"align\": \"start\",\n \"sideOffset\": -anchor.offsetHeight,\n \"alignOffset\": -6,\n \"collisionPadding\": 10,\n \"width\": 240,\n \"minWidth\": 240,\n \"zIndex\": props.zIndex,\n \"ariaLabelledby\": messageId,\n \"class\": s.ConfirmClose,\n \"data-dialog-confirm-close\": \"\",\n }, () => [\n h(\"p\", { id: messageId, class: s.ConfirmCloseMessage }, [props.message as VNodeArrayChildren[number]]),\n hasDetail() ? h(\"p\", { class: s.ConfirmCloseDetail }, [props.detail as VNodeArrayChildren[number]]) : null,\n h(Button, { block: true, pill: true, color: \"danger\", variant: \"soft\", class: s.ConfirmCloseAction, onClick: confirm }, () => props.confirmLabel),\n ]),\n ])\n }\n return h(Dialog, { \"open\": props.open, \"onUpdate:open\": setOpen }, () => [\n h(DialogContent, {\n \"mobileVariant\": \"alert\",\n \"surface\": \"plain\",\n \"width\": 360,\n \"showClose\": false,\n \"zIndex\": props.zIndex,\n \"data-dialog-confirm-close\": \"\",\n \"onCloseAutoFocus\": (event: Event) => {\n const target = props.returnFocus()\n if (target?.isConnected) {\n event.preventDefault()\n target.focus({ preventScroll: true })\n }\n },\n }, () => [\n // The question names the alert, as an alert's title does\n h(DialogHeader, null, () => [\n h(DialogTitle, null, () => props.message),\n hasDetail() ? h(DialogDescription, null, () => props.detail) : null,\n ]),\n h(DialogFooter, null, () => [\n h(DialogClose, null, () => [h(Button, { color: \"secondary\", variant: \"soft\" }, () => props.cancelLabel)]),\n h(Button, { color: \"danger\", onClick: confirm }, () => props.confirmLabel),\n ]),\n ]),\n ])\n }\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/**\n * A press or a focus outside the dialog, or a phone sheet pulled down to close; `event.detail.originalEvent` is the\n * browser's event (a TouchEvent for the sheet).\n */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent | TouchEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogHeaderActionProps = InstanceType<typeof DialogHeaderAction>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,GAad,MAAM,aAAa,CAAA","sourcesContent":["export {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogDescriptionSlot,\n DialogFooter,\n DialogHeader,\n DialogHeaderAction,\n DialogSteps,\n DialogTitle,\n DialogTrigger,\n type DialogBarBackground,\n type DialogConfirmClose,\n type DialogConfirmCloseProp,\n type DialogHeaderProps,\n type DialogFooterProps,\n type DialogHeaderActionProps,\n type DialogContentProps,\n type DialogInteractOutsideEvent,\n type DialogLayerProps,\n type DialogPlacement,\n type DialogProps,\n type DialogStepsProps,\n} from \"./Dialog.js\"\n"]}
|
|
@@ -393,7 +393,9 @@ const RadioGroupItemComponent = defineComponent({
|
|
|
393
393
|
"data-orientation": props.orientation,
|
|
394
394
|
"onMousedown": handleLabelMouseDown,
|
|
395
395
|
}, [
|
|
396
|
-
|
|
396
|
+
// A Field row finds a lone radio by this attribute: a selector needs a feature on its subject, or a change of
|
|
397
|
+
// :only-child anywhere restyles that element's whole subtree
|
|
398
|
+
h("div", { "class": s.RadioIndicatorWrapper, "ref": wrapper, "data-radio-indicator": "" }, [
|
|
397
399
|
h(RovingFocusItem, { asChild: true, focusable: !isDisabled, active: isChecked }, {
|
|
398
400
|
default: () => h("button", {
|
|
399
401
|
"type": "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EAC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,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAaF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string | null) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n // Reka's mouseup focus behavior is deliberately omitted.\n void _onMouseup\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selection, including `null` for none. Bind with `v-model:value`; leave undefined for an uncontrolled group. */\n value: { type: String as PropType<string | null>, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selection changed (`v-model:value`). Resetting an initially empty form reports `null`. */\n \"update:value\": (value: string | null) => value === null || typeof value === \"string\",\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (value: string | null) => value === null || typeof value === \"string\",\n },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string | null) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const listeners: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n let focusSelectionTimer: ReturnType<typeof setTimeout> | undefined\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n const radio = event.currentTarget\n if (!(radio instanceof HTMLButtonElement)) return\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n // Reka moves focus in nextTick, which a browser can flush before the\n // keydown reaches document. Check the arrow flag after that listener,\n // like Reka's RadioGroupItem, without selecting a radio the user left.\n focusSelectionTimer = setTimeout(() => {\n focusSelectionTimer = undefined\n if (isArrowKeyPressed && !disabled.value && radio.isConnected && radio.ownerDocument.activeElement === radio) {\n radio.click()\n }\n }, 0)\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const {\n \"class\": className,\n // These name the radio itself: a `Field` around the item labels it through them\n \"id\": idAttr,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...restAttrs\n } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = (idAttr as string | undefined) ?? `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const children = slots.default?.()\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-has-label\": hasContent(children) ? \"\" : undefined,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n h(\"div\", { class: s.RadioIndicatorWrapper, ref: wrapper }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": [descriptionId, ariaDescribedBy].filter(Boolean).join(\" \") || undefined,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }, [h(CheckMd, { class: s.Checkmark })]),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n children,\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAA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,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string | null) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n // Reka's mouseup focus behavior is deliberately omitted.\n void _onMouseup\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selection, including `null` for none. Bind with `v-model:value`; leave undefined for an uncontrolled group. */\n value: { type: String as PropType<string | null>, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selection changed (`v-model:value`). Resetting an initially empty form reports `null`. */\n \"update:value\": (value: string | null) => value === null || typeof value === \"string\",\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (value: string | null) => value === null || typeof value === \"string\",\n },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string | null) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const listeners: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n let focusSelectionTimer: ReturnType<typeof setTimeout> | undefined\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n const radio = event.currentTarget\n if (!(radio instanceof HTMLButtonElement)) return\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n // Reka moves focus in nextTick, which a browser can flush before the\n // keydown reaches document. Check the arrow flag after that listener,\n // like Reka's RadioGroupItem, without selecting a radio the user left.\n focusSelectionTimer = setTimeout(() => {\n focusSelectionTimer = undefined\n if (isArrowKeyPressed && !disabled.value && radio.isConnected && radio.ownerDocument.activeElement === radio) {\n radio.click()\n }\n }, 0)\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const {\n \"class\": className,\n // These name the radio itself: a `Field` around the item labels it through them\n \"id\": idAttr,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...restAttrs\n } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = (idAttr as string | undefined) ?? `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const children = slots.default?.()\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-has-label\": hasContent(children) ? \"\" : undefined,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n // A Field row finds a lone radio by this attribute: a selector needs a feature on its subject, or a change of\n // :only-child anywhere restyles that element's whole subtree\n h(\"div\", { \"class\": s.RadioIndicatorWrapper, \"ref\": wrapper, \"data-radio-indicator\": \"\" }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": [descriptionId, ariaDescribedBy].filter(Boolean).join(\" \") || undefined,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }, [h(CheckMd, { class: s.Checkmark })]),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n children,\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
@@ -8,11 +8,19 @@ import { type BarBackground, type BarBackgroundAlias } from "../Toolbar/Toolbar.
|
|
|
8
8
|
export type DialogConfirmClose = {
|
|
9
9
|
/** The question, such as "Are you sure you want to discard this new note?"; text or vnodes, as React takes a node */
|
|
10
10
|
message: VNodeChild;
|
|
11
|
+
/** A quieter line under the question, such as what a save left behind */
|
|
12
|
+
detail?: VNodeChild;
|
|
11
13
|
/** The answer that closes and loses the changes. @default "Discard Changes" */
|
|
12
14
|
confirmLabel?: VNodeChild;
|
|
13
15
|
/** The alert's answer that keeps the dialog open. @default "Keep Editing" */
|
|
14
16
|
cancelLabel?: VNodeChild;
|
|
15
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* `confirmClose` as a value, or as a function the dialog calls at each close attempt (Close, DialogClose, Escape, a
|
|
20
|
+
* press outside, a sheet pulled down) before it decides: it returns the question, or nothing to close at once. An
|
|
21
|
+
* owner that commits typed words only on blur commits them there, then compares.
|
|
22
|
+
*/
|
|
23
|
+
export type DialogConfirmCloseProp = DialogConfirmClose | (() => DialogConfirmClose | false | null | undefined) | false | null;
|
|
16
24
|
/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */
|
|
17
25
|
export declare const Dialog: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
18
26
|
open: {
|
|
@@ -101,7 +109,7 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
101
109
|
* there are none. Setting `open` to false yourself, such as after Save, closes at once.
|
|
102
110
|
*/
|
|
103
111
|
confirmClose: {
|
|
104
|
-
type: PropType<
|
|
112
|
+
type: PropType<DialogConfirmCloseProp>;
|
|
105
113
|
default: undefined;
|
|
106
114
|
};
|
|
107
115
|
/** Stack order of the overlay and the dialog. @default 50 */
|
|
@@ -182,7 +190,7 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
182
190
|
* there are none. Setting `open` to false yourself, such as after Save, closes at once.
|
|
183
191
|
*/
|
|
184
192
|
confirmClose: {
|
|
185
|
-
type: PropType<
|
|
193
|
+
type: PropType<DialogConfirmCloseProp>;
|
|
186
194
|
default: undefined;
|
|
187
195
|
};
|
|
188
196
|
/** Stack order of the overlay and the dialog. @default 50 */
|
|
@@ -203,7 +211,7 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
203
211
|
placement: DialogPlacement;
|
|
204
212
|
showClose: boolean;
|
|
205
213
|
surface: "plain" | "grouped";
|
|
206
|
-
confirmClose:
|
|
214
|
+
confirmClose: DialogConfirmCloseProp;
|
|
207
215
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
208
216
|
/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. `"solid"` is the earlier name of `"hard"`. */
|
|
209
217
|
export type DialogBarBackground = BarBackground | BarBackgroundAlias;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogDescriptionSlot, DialogFooter, DialogHeader, DialogHeaderAction, DialogSteps, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogConfirmClose, type DialogHeaderProps, type DialogFooterProps, type DialogHeaderActionProps, type DialogContentProps, type DialogInteractOutsideEvent, type DialogLayerProps, type DialogPlacement, type DialogProps, type DialogStepsProps, } from "./Dialog.js";
|
|
1
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogDescriptionSlot, DialogFooter, DialogHeader, DialogHeaderAction, DialogSteps, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogConfirmClose, type DialogConfirmCloseProp, type DialogHeaderProps, type DialogFooterProps, type DialogHeaderActionProps, type DialogContentProps, type DialogInteractOutsideEvent, type DialogLayerProps, type DialogPlacement, type DialogProps, type DialogStepsProps, } from "./Dialog.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexui/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@maskito/core": "5.2.2",
|
|
78
78
|
"@maskito/kit": "5.2.2",
|
|
79
79
|
"@maskito/vue": "5.2.2",
|
|
80
|
-
"@plexui/styles": "^0.
|
|
80
|
+
"@plexui/styles": "^0.9.0",
|
|
81
81
|
"@tanstack/table-core": "8.21.3",
|
|
82
82
|
"@tanstack/vue-table": "8.21.3",
|
|
83
83
|
"@tiptap/core": "3.21.0",
|