@plexui/vue 0.7.3 → 0.8.1

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.
@@ -104,6 +104,8 @@ export const DialogContent = defineComponent({
104
104
  placement: { type: String, default: "center" },
105
105
  /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */
106
106
  mobilePlacement: String,
107
+ /** Mobile presentation at 640px and below. Sheets default to bottom placement. */
108
+ mobileVariant: String,
107
109
  /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */
108
110
  onOpenAutoFocus: Function,
109
111
  /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */
@@ -111,6 +113,9 @@ export const DialogContent = defineComponent({
111
113
  },
112
114
  setup(props, { slots, attrs }) {
113
115
  const { open, setOpen, titleCount, descriptionCount } = useDialogContext();
116
+ const mobilePlacement = computed(() => props.mobileVariant === "alert"
117
+ ? "center"
118
+ : props.mobilePlacement ?? (props.mobileVariant === "sheet" ? "bottom" : undefined));
114
119
  const rootContext = injectDialogRootContext();
115
120
  // Radix's root makes the content id; Reka's trigger does, so a dialog
116
121
  // without one would render `id=""`
@@ -164,10 +169,17 @@ export const DialogContent = defineComponent({
164
169
  detachDrag?.();
165
170
  detachDrag = undefined;
166
171
  panelElement = element;
167
- if (element && props.mobilePlacement === "bottom") {
172
+ if (element && mobilePlacement.value === "bottom") {
168
173
  detachDrag = attachSheetDrag(element, () => setOpen(false));
169
174
  }
170
175
  };
176
+ watch(mobilePlacement, () => {
177
+ detachDrag?.();
178
+ detachDrag = panelElement && mobilePlacement.value === "bottom"
179
+ ? attachSheetDrag(panelElement, () => setOpen(false))
180
+ : undefined;
181
+ });
182
+ onBeforeUnmount(() => detachDrag?.());
171
183
  let overlayElement;
172
184
  const setOverlayRef = (instance) => {
173
185
  const el = instance?.$el;
@@ -185,9 +197,11 @@ export const DialogContent = defineComponent({
185
197
  h(RekaDialogContent, {
186
198
  "forceMount": true,
187
199
  "class": s.Content,
200
+ "data-plex-dialog": "",
188
201
  "style": toCssVariables({ "dialog-width": props.width }),
189
202
  "data-placement": props.placement === "center" ? undefined : props.placement,
190
- "data-mobile-placement": props.mobilePlacement,
203
+ "data-mobile-placement": mobilePlacement.value,
204
+ "data-mobile-variant": props.mobileVariant,
191
205
  "data-pill": props.pill ? "" : undefined,
192
206
  "onOpenAutoFocus": props.onOpenAutoFocus,
193
207
  "onCloseAutoFocus": handleCloseAutoFocus,
@@ -215,8 +229,8 @@ export const DialogContent = defineComponent({
215
229
  }),
216
230
  ]);
217
231
  return () => {
218
- const { placement, mobilePlacement } = props;
219
- const crossesScreen = placement === "bottom" || placement === "start" || placement === "end" || mobilePlacement === "bottom";
232
+ const { placement } = props;
233
+ const crossesScreen = placement === "bottom" || placement === "start" || placement === "end" || mobilePlacement.value === "bottom";
220
234
  return h(RekaDialogPortal, null, {
221
235
  default: () => [
222
236
  h(TransitionGroup,
@@ -240,6 +254,12 @@ export const DialogHeader = defineComponent({
240
254
  return () => h("div", { class: s.Header }, slots.default?.());
241
255
  },
242
256
  });
257
+ export const DialogHeaderAction = defineComponent({
258
+ name: "DialogHeaderAction",
259
+ setup(_props, { slots }) {
260
+ return () => h("div", { class: s.HeaderAction }, slots.default?.());
261
+ },
262
+ });
243
263
  /** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */
244
264
  export const DialogBody = defineComponent({
245
265
  name: "DialogBody",
@@ -250,8 +270,12 @@ export const DialogBody = defineComponent({
250
270
  });
251
271
  export const DialogFooter = defineComponent({
252
272
  name: "DialogFooter",
253
- setup(_props, { slots }) {
254
- return () => h("div", { class: s.Footer }, slots.default?.());
273
+ props: {
274
+ /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
275
+ mobileLayout: String,
276
+ },
277
+ setup(props, { slots }) {
278
+ return () => h("div", { class: s.Footer, "data-mobile-layout": props.mobileLayout }, slots.default?.());
255
279
  },
256
280
  });
257
281
  /** Counts a mounted part, as Radix's title and description counts do. */
@@ -1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AAE,KAAK,EAAE;QACrB,MAAM,WAAW,GAAG,uBAAuB,EAAE,CAAA;QAC7C,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE;YAC/B,IAAI,CAAC,KAAK,CAAC,gBAAgB;gBAAE,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QAC9D,CAAC,CAAA;QACD,OAAO,GAAG,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;IACjG,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n watch,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\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 injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { 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 { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\n\nconst DOUBLE_CLICK = 300\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}\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) => true,\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\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) })\n\n return () =>\n h(RekaDialogRoot, { \"open\": isOpen.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 { 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) rootContext.onOpenToggle()\n }\n\n return () => {\n const open = rootContext.open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": open || false,\n \"aria-controls\": open ? rootContext.contentId : undefined,\n \"data-state\": open ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\nconst CloseIcon = () =>\n h(\"svg\", { \"class\": s.CloseIcon, \"viewBox\": \"0 0 20 20\", \"width\": \"20\", \"height\": \"20\", \"aria-hidden\": \"true\" }, [\n h(\"path\", {\n fill: \"currentColor\",\n d: \"M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06\",\n }),\n ])\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\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 /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\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 setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\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\n // Force-mounted content refocuses Reka's trigger the moment it closes.\n // Focus waits for the exit, as in Radix: the trigger is held back until\n // the content unmounts, where Reka's own close auto focus uses it.\n let closingTrigger: HTMLElement | undefined\n watch(\n open,\n (isOpen) => {\n if (isOpen) {\n if (closingTrigger) rootContext.triggerElement.value = closingTrigger\n closingTrigger = undefined\n } else {\n closingTrigger = rootContext.triggerElement.value\n rootContext.triggerElement.value = undefined\n }\n },\n { flush: \"sync\" },\n )\n const handleCloseAutoFocus = (event: Event) => {\n props.onCloseAutoFocus?.(event)\n keepMovedFocus(event)\n if (closingTrigger) rootContext.triggerElement.value = closingTrigger\n closingTrigger = undefined\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, () => {\n setOpen(false)\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 // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) setOpen(false)\n })\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n detachDrag = undefined\n panelElement = element\n if (element && props.mobilePlacement === \"bottom\") {\n detachDrag = attachSheetDrag(element, () => setOpen(false))\n }\n }\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(\"div\", { key: \"dialog\" }, [\n h(RekaDialogOverlay, { class: s.Overlay, forceMount: true, ref: setOverlayRef }),\n h(\n RekaDialogContent,\n {\n \"forceMount\": true,\n \"class\": s.Content,\n \"style\": toCssVariables({ \"dialog-width\": props.width }),\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": props.mobilePlacement,\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\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n },\n {\n default: () => [\n h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(\"button\", { \"type\": \"button\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }, [\n h(CloseIcon),\n ]),\n ],\n })\n : null,\n slots.default?.(),\n ]),\n ],\n },\n ),\n ])\n\n return () => {\n const { placement, mobilePlacement } = props\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || mobilePlacement === \"bottom\"\n return h(RekaDialogPortal, null, {\n default: () => [\n 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\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n setup(_props, { slots }) {\n return () => h(\"div\", { class: s.Header }, slots.default?.())\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 return () => h(\"div\", { class: [s.Body, attrs.class] }, slots.default?.())\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n setup(_props, { slots }) {\n return () => h(\"div\", { class: s.Footer }, slots.default?.())\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 return () => h(RekaDialogTitle, { class: s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n return () => h(RekaDialogDescription, { class: 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 onClick = (event: Event) => {\n if (!event.defaultPrevented) rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\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,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,KAAK,GAON,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,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC5F,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,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E,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAA;IACvG,CAAC;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,aAAa;IACnB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;QACrB,MAAM,WAAW,GAAG,uBAAuB,EAAE,CAAA;QAC7C,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE;YAC/B,IAAI,CAAC,KAAK,CAAC,gBAAgB;gBAAE,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QAC9D,CAAC,CAAA;QACD,OAAO,GAAG,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;IACjG,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n watch,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\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 injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { 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 { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\n\nconst DOUBLE_CLICK = 300\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}\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) => true,\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\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) })\n\n return () =>\n h(RekaDialogRoot, { \"open\": isOpen.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 { 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) rootContext.onOpenToggle()\n }\n\n return () => {\n const open = rootContext.open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": open || false,\n \"aria-controls\": open ? rootContext.contentId : undefined,\n \"data-state\": open ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\nconst CloseIcon = () =>\n h(\"svg\", { \"class\": s.CloseIcon, \"viewBox\": \"0 0 20 20\", \"width\": \"20\", \"height\": \"20\", \"aria-hidden\": \"true\" }, [\n h(\"path\", {\n fill: \"currentColor\",\n d: \"M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06\",\n }),\n ])\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\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 /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /** Mobile presentation at 640px and below. Sheets default to bottom placement. */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\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 setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const mobilePlacement = computed(() =>\n props.mobileVariant === \"alert\"\n ? \"center\"\n : props.mobilePlacement ?? (props.mobileVariant === \"sheet\" ? \"bottom\" : undefined),\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\n // Force-mounted content refocuses Reka's trigger the moment it closes.\n // Focus waits for the exit, as in Radix: the trigger is held back until\n // the content unmounts, where Reka's own close auto focus uses it.\n let closingTrigger: HTMLElement | undefined\n watch(\n open,\n (isOpen) => {\n if (isOpen) {\n if (closingTrigger) rootContext.triggerElement.value = closingTrigger\n closingTrigger = undefined\n } else {\n closingTrigger = rootContext.triggerElement.value\n rootContext.triggerElement.value = undefined\n }\n },\n { flush: \"sync\" },\n )\n const handleCloseAutoFocus = (event: Event) => {\n props.onCloseAutoFocus?.(event)\n keepMovedFocus(event)\n if (closingTrigger) rootContext.triggerElement.value = closingTrigger\n closingTrigger = undefined\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, () => {\n setOpen(false)\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 // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) setOpen(false)\n })\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n detachDrag = undefined\n panelElement = element\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, () => setOpen(false))\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, () => setOpen(false))\n : undefined\n })\n onBeforeUnmount(() => detachDrag?.())\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(\"div\", { key: \"dialog\" }, [\n h(RekaDialogOverlay, { class: s.Overlay, forceMount: true, ref: setOverlayRef }),\n h(\n RekaDialogContent,\n {\n \"forceMount\": true,\n \"class\": s.Content,\n \"data-plex-dialog\": \"\",\n \"style\": toCssVariables({ \"dialog-width\": props.width }),\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": props.mobileVariant,\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\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n },\n {\n default: () => [\n h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(\"button\", { \"type\": \"button\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }, [\n h(CloseIcon),\n ]),\n ],\n })\n : null,\n slots.default?.(),\n ]),\n ],\n },\n ),\n ])\n\n return () => {\n const { placement } = props\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || mobilePlacement.value === \"bottom\"\n return h(RekaDialogPortal, null, {\n default: () => [\n 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\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n setup(_props, { slots }) {\n return () => h(\"div\", { class: s.Header }, slots.default?.())\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n setup(_props, { slots }) {\n return () => h(\"div\", { class: s.HeaderAction }, slots.default?.())\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 return () => h(\"div\", { class: [s.Body, attrs.class] }, slots.default?.())\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n },\n setup(props, { slots }) {\n return () => h(\"div\", { class: s.Footer, \"data-mobile-layout\": props.mobileLayout }, slots.default?.())\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 return () => h(RekaDialogTitle, { class: s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n return () => h(RekaDialogDescription, { class: 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 onClick = (event: Event) => {\n if (!event.defaultPrevented) rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n"]}
@@ -1,2 +1,2 @@
1
- export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./Dialog.js";
1
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderAction, DialogTitle, DialogTrigger, } from "./Dialog.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -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,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,GAId,MAAM,aAAa,CAAA","sourcesContent":["export {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n type DialogContentProps,\n type DialogPlacement,\n type DialogProps,\n} from \"./Dialog.js\"\n"]}
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,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,GAId,MAAM,aAAa,CAAA","sourcesContent":["export {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogHeaderAction,\n DialogTitle,\n DialogTrigger,\n type DialogContentProps,\n type DialogPlacement,\n type DialogProps,\n} from \"./Dialog.js\"\n"]}
@@ -11,18 +11,23 @@ export const attachSheetDrag = (panel, close) => {
11
11
  let lastY = 0;
12
12
  let lastTime = 0;
13
13
  let speed = 0;
14
+ let settleTimer;
14
15
  const clear = () => {
15
16
  panel.style.transition = "";
16
17
  panel.style.transform = "";
17
18
  };
18
19
  const onStart = (event) => {
19
- if (event.touches.length !== 1 || !window.matchMedia("(max-width: 767px)").matches)
20
+ if (event.touches.length !== 1 || !window.matchMedia("(max-width: 640px)").matches)
20
21
  return;
21
22
  const { clientY } = event.touches[0];
22
23
  if (clientY - panel.getBoundingClientRect().top > GRIP)
23
24
  return;
24
25
  if (event.target?.closest?.(INTERACTIVE))
25
26
  return;
27
+ if (settleTimer !== undefined)
28
+ window.clearTimeout(settleTimer);
29
+ settleTimer = undefined;
30
+ panel.removeEventListener("transitionend", clear);
26
31
  startY = clientY;
27
32
  lastY = clientY;
28
33
  lastTime = event.timeStamp;
@@ -51,12 +56,14 @@ export const attachSheetDrag = (panel, close) => {
51
56
  return;
52
57
  }
53
58
  if (travelled > panel.getBoundingClientRect().height * CLOSE_SHARE || flick) {
54
- close();
55
- // Something may keep it open, unsaved changes for one
56
- window.setTimeout(() => {
59
+ // Something may keep it open, unsaved changes for one.
60
+ // Register before close, which may synchronously detach this gesture.
61
+ settleTimer = window.setTimeout(() => {
62
+ settleTimer = undefined;
57
63
  if (panel.isConnected)
58
64
  clear();
59
65
  }, SETTLE);
66
+ close();
60
67
  return;
61
68
  }
62
69
  panel.style.transition = "transform 250ms var(--cubic-enter)";
@@ -72,6 +79,12 @@ export const attachSheetDrag = (panel, close) => {
72
79
  panel.removeEventListener("touchmove", onMove);
73
80
  panel.removeEventListener("touchend", onEnd);
74
81
  panel.removeEventListener("touchcancel", onEnd);
82
+ panel.removeEventListener("transitionend", clear);
83
+ if (settleTimer !== undefined)
84
+ window.clearTimeout(settleTimer);
85
+ settleTimer = undefined;
86
+ startY = null;
87
+ clear();
75
88
  };
76
89
  };
77
90
  //# sourceMappingURL=sheetDrag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,mGAAmG;AACnG,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAA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KAAK,CAAC,SAAS,GAAG,EAAE,CAAA;QAC1B,KAAK,CAAC,gBAAgB,CAAC,eAAe,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,CAAC,CAAA;IAED,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,KAAK,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/D,KAAK,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IACzC,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IAE5C,OAAO,GAAG,EAAE;QACV,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QAChD,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;QAC9C,KAAK,CAAC,mBAAmB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAC5C,KAAK,CAAC,mBAAmB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACjD,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["// A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Buttons in that strip keep their press.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\n\nexport const attachSheetDrag = (panel: HTMLElement, close: () => void) => {\n let startY: number | null = null\n let lastY = 0\n let lastTime = 0\n let speed = 0\n\n const clear = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n\n const onStart = (event: TouchEvent) => {\n if (event.touches.length !== 1 || !window.matchMedia(\"(max-width: 767px)\").matches) return\n const { clientY } = event.touches[0]\n if (clientY - panel.getBoundingClientRect().top > GRIP) return\n if ((event.target as Element | null)?.closest?.(INTERACTIVE)) return\n startY = clientY\n lastY = clientY\n lastTime = event.timeStamp\n speed = 0\n }\n\n const onMove = (event: TouchEvent) => {\n if (startY === null) return\n event.preventDefault()\n const { clientY } = event.touches[0]\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n if (startY === null) return\n const travelled = lastY - startY\n // A finger that rested before lifting is no flick\n const flick = speed > CLOSE_SPEED && event.timeStamp - lastTime < REST\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n if (travelled > panel.getBoundingClientRect().height * CLOSE_SHARE || flick) {\n close()\n // Something may keep it open, unsaved changes for one\n window.setTimeout(() => {\n if (panel.isConnected) clear()\n }, SETTLE)\n return\n }\n panel.style.transition = \"transform 250ms var(--cubic-enter)\"\n panel.style.transform = \"\"\n panel.addEventListener(\"transitionend\", clear, { once: true })\n }\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onEnd)\n\n return () => {\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onEnd)\n }\n}\n"]}
1
+ {"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,mGAAmG;AACnG,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,IAAI,GAAG,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ves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Buttons in that strip keep their press.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\n\nexport const attachSheetDrag = (panel: HTMLElement, close: () => void) => {\n let startY: number | null = null\n let lastY = 0\n let lastTime = 0\n let speed = 0\n let settleTimer: number | undefined\n\n const clear = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n\n const onStart = (event: TouchEvent) => {\n if (event.touches.length !== 1 || !window.matchMedia(\"(max-width: 640px)\").matches) return\n const { clientY } = event.touches[0]\n if (clientY - panel.getBoundingClientRect().top > GRIP) return\n if ((event.target as Element | null)?.closest?.(INTERACTIVE)) return\n if (settleTimer !== undefined) window.clearTimeout(settleTimer)\n settleTimer = undefined\n panel.removeEventListener(\"transitionend\", clear)\n startY = clientY\n lastY = clientY\n lastTime = event.timeStamp\n speed = 0\n }\n\n const onMove = (event: TouchEvent) => {\n if (startY === null) return\n event.preventDefault()\n const { clientY } = event.touches[0]\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n if (startY === null) return\n const travelled = lastY - startY\n // A finger that rested before lifting is no flick\n const flick = speed > CLOSE_SPEED && event.timeStamp - lastTime < REST\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n if (travelled > panel.getBoundingClientRect().height * CLOSE_SHARE || flick) {\n // Something may keep it open, unsaved changes for one.\n // Register before close, which may synchronously detach this gesture.\n settleTimer = window.setTimeout(() => {\n settleTimer = undefined\n if (panel.isConnected) clear()\n }, SETTLE)\n close()\n return\n }\n panel.style.transition = \"transform 250ms var(--cubic-enter)\"\n panel.style.transform = \"\"\n panel.addEventListener(\"transitionend\", clear, { once: true })\n }\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onEnd)\n\n return () => {\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onEnd)\n panel.removeEventListener(\"transitionend\", clear)\n if (settleTimer !== undefined) window.clearTimeout(settleTimer)\n settleTimer = undefined\n startY = null\n clear()\n }\n}\n"]}
@@ -3,7 +3,7 @@ import s from "@plexui/styles/components/Page/Page.module.css";
3
3
  // A trackpad's small settle at the top must not flash the line.
4
4
  const SCROLLED_AFTER = 4;
5
5
  const PAGE_CONTEXT = Symbol("Page");
6
- function usePageContext(part) {
6
+ function injectPageContext(part) {
7
7
  const scrolled = inject(PAGE_CONTEXT, null);
8
8
  if (!scrolled) {
9
9
  throw new Error(`${part} must be used within Page`);
@@ -41,7 +41,7 @@ export const PageHeader = defineComponent({
41
41
  divider: { type: Boolean, default: true },
42
42
  },
43
43
  setup(props, { slots }) {
44
- const scrolled = usePageContext("PageHeader");
44
+ const scrolled = injectPageContext("PageHeader");
45
45
  const line = computed(() => props.divider && scrolled.value);
46
46
  return () => h("div", { "class": s.Header, "data-scrolled": line.value ? "" : undefined }, [
47
47
  h("div", { class: s.Head }, slots.default?.()),
@@ -79,11 +79,20 @@ export const PageContent = defineComponent({
79
79
  fill: { type: Boolean, default: false },
80
80
  },
81
81
  setup(props, { attrs, slots }) {
82
- const scrolled = usePageContext("PageContent");
82
+ const scrolled = injectPageContext("PageContent");
83
83
  const onScroll = (event) => {
84
84
  scrolled.value = event.currentTarget.scrollTop > SCROLLED_AFTER;
85
85
  };
86
86
  return () => h("div", mergeProps({ "class": s.Content, "data-fill": props.fill ? "" : undefined, onScroll }, attrs), [h("div", { class: s.Column }, slots.default?.())]);
87
87
  },
88
88
  });
89
+ /** Actions that remain below the scrolling content (React `Page.Footer`). */
90
+ export const PageFooter = defineComponent({
91
+ name: "PageFooter",
92
+ setup(_props, { slots }) {
93
+ return () => h("div", { class: s.Footer }, [
94
+ h("div", { class: s.FooterContent }, slots.default?.()),
95
+ ]);
96
+ },
97
+ });
89
98
  //# sourceMappingURL=Page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,OAAO,EACP,GAAG,GAKJ,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,gDAAgD,CAAA;AAQ9D,gEAAgE;AAChE,MAAM,cAAc,GAAG,CAAC,CAAA;AAExB,MAAM,YAAY,GAA+B,MAAM,CAAC,MAAM,CAAC,CAAA;AAE/D,SAAS,cAAc,CAAC,IAAY;IAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;IAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,2BAA2B,CAAC,CAAA;IACrD,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,aAAa,GAAG,eAAe,CAAC;IACpC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;QACL;;;;;;WAMG;QACH,KAAK,EAAE,EAAE,IAAI,EAAE,MAA6B,EAAE,OAAO,EAAE,MAAM,EAAE;KAChE;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;QAEjC,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,K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SAAS,EAAE,QAAQ,EAAE,EAC1E,KAAK,CACN,EACD,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CACnD,CAAA;IACL,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Page/Page.module.css\"\n\n// Vue port of packages/ui/src/components/Page/Page.tsx. Exports are flat\n// (`PageHeader` for `Page.Header`, ...). As in React, caller attributes are\n// applied after the page's own (`class` is merged), so they win.\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\n// A trackpad's small settle at the top must not flash the line.\nconst SCROLLED_AFTER = 4\n\nconst PAGE_CONTEXT: InjectionKey<Ref<boolean>> = Symbol(\"Page\")\n\nfunction usePageContext(part: string): Ref<boolean> {\n const scrolled = inject(PAGE_CONTEXT, null)\n if (!scrolled) {\n throw new Error(`${part} must be used within Page`)\n }\n return scrolled\n}\n\nconst PageComponent = defineComponent({\n name: \"Page\",\n props: {\n /**\n * Width of the column that header and content share: `\"full\"` (edge to\n * edge, for tables), `\"wide\"` (1280px, centred, for overviews) or `\"column\"`\n * (768px, centred, for settings and forms). Set `--page-width` on the page\n * for any other width.\n * @default \"full\"\n */\n width: { type: String as PropType<PageWidth>, default: \"full\" },\n },\n setup(props, { slots }) {\n provide(PAGE_CONTEXT, ref(false))\n\n return () => h(\"div\", { \"class\": s.Page, \"data-width\": props.width }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth } & HTMLAttributes\n\nexport const Page = PageComponent as typeof PageComponent & { new (): { $props: PageProps } }\n\n/** The band above the content, one column with it (React `Page.Header`). */\nexport const PageHeader = defineComponent({\n name: \"PageHeader\",\n props: {\n /**\n * Shows the line, and the glass on a phone, once the content has scrolled\n * under the header. Turn it off when the content already draws a line of\n * its own at that place.\n * @default true\n */\n divider: { type: Boolean, default: true },\n },\n setup(props, { slots }) {\n const scrolled = usePageContext(\"PageHeader\")\n const line = computed(() => props.divider && scrolled.value)\n\n return () =>\n h(\"div\", { \"class\": s.Header, \"data-scrolled\": line.value ? \"\" : undefined }, [\n h(\"div\", { class: s.Head }, slots.default?.()),\n ])\n },\n})\n\nfunction part(name: string, tag: string, className: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(tag, { class: className }, slots.default?.())\n },\n })\n}\n\n/** The row of the title and the actions (React `Page.Bar`). */\nexport const PageBar = part(\"PageBar\", \"div\", s.Bar)\n/** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */\nexport const PageHeading = part(\"PageHeading\", \"div\", s.Heading)\n/** Page heading, an `<h1>` (React `Page.Title`). */\nexport const PageTitle = part(\"PageTitle\", \"h1\", s.Title)\n/** Status of the page, a `<p>` (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"p\", s.Subtitle)\n/** Buttons on the trailing side of the bar (React `Page.Actions`). */\nexport const PageActions = part(\"PageActions\", \"div\", s.Actions)\n\n/** The part of the page that scrolls (React `Page.Content`). */\nexport const PageContent = defineComponent({\n name: \"PageContent\",\n inheritAttrs: false,\n props: {\n /**\n * The content fills the page and scrolls inside itself, as a table does:\n * the page stops scrolling from 768px up.\n * @default false\n */\n fill: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const scrolled = usePageContext(\"PageContent\")\n\n const onScroll = (event: Event) => {\n scrolled.value = (event.currentTarget as HTMLElement).scrollTop > SCROLLED_AFTER\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined, onScroll },\n attrs,\n ),\n [h(\"div\", { class: s.Column }, slots.default?.())],\n )\n },\n})\n\n/** Props of the Page parts: native attributes of their element. */\nexport type PageSlotProps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6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,IAAI,EAAE,YAAY;IAClB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;QACrB,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;YACzC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Page/Page.module.css\"\n\n// Vue port of packages/ui/src/components/Page/Page.tsx. Exports are flat\n// (`PageHeader` for `Page.Header`, ...). As in React, caller attributes are\n// applied after the page's own (`class` is merged), so they win.\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\n// A trackpad's small settle at the top must not flash the line.\nconst SCROLLED_AFTER = 4\n\nconst PAGE_CONTEXT: InjectionKey<Ref<boolean>> = Symbol(\"Page\")\n\nfunction injectPageContext(part: string): Ref<boolean> {\n const scrolled = inject(PAGE_CONTEXT, null)\n if (!scrolled) {\n throw new Error(`${part} must be used within Page`)\n }\n return scrolled\n}\n\nconst PageComponent = defineComponent({\n name: \"Page\",\n props: {\n /**\n * Width of the column that header and content share: `\"full\"` (edge to\n * edge, for tables), `\"wide\"` (1280px, centred, for overviews) or `\"column\"`\n * (768px, centred, for settings and forms). Set `--page-width` on the page\n * for any other width.\n * @default \"full\"\n */\n width: { type: String as PropType<PageWidth>, default: \"full\" },\n },\n setup(props, { slots }) {\n provide(PAGE_CONTEXT, ref(false))\n\n return () => h(\"div\", { \"class\": s.Page, \"data-width\": props.width }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth } & HTMLAttributes\n\nexport const Page = PageComponent as typeof PageComponent & { new (): { $props: PageProps } }\n\n/** The band above the content, one column with it (React `Page.Header`). */\nexport const PageHeader = defineComponent({\n name: \"PageHeader\",\n props: {\n /**\n * Shows the line, and the glass on a phone, once the content has scrolled\n * under the header. Turn it off when the content already draws a line of\n * its own at that place.\n * @default true\n */\n divider: { type: Boolean, default: true },\n },\n setup(props, { slots }) {\n const scrolled = injectPageContext(\"PageHeader\")\n const line = computed(() => props.divider && scrolled.value)\n\n return () =>\n h(\"div\", { \"class\": s.Header, \"data-scrolled\": line.value ? \"\" : undefined }, [\n h(\"div\", { class: s.Head }, slots.default?.()),\n ])\n },\n})\n\nfunction part(name: string, tag: string, className: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(tag, { class: className }, slots.default?.())\n },\n })\n}\n\n/** The row of the title and the actions (React `Page.Bar`). */\nexport const PageBar = part(\"PageBar\", \"div\", s.Bar)\n/** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */\nexport const PageHeading = part(\"PageHeading\", \"div\", s.Heading)\n/** Page heading, an `<h1>` (React `Page.Title`). */\nexport const PageTitle = part(\"PageTitle\", \"h1\", s.Title)\n/** Status of the page, a `<p>` (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"p\", s.Subtitle)\n/** Buttons on the trailing side of the bar (React `Page.Actions`). */\nexport const PageActions = part(\"PageActions\", \"div\", s.Actions)\n\n/** The part of the page that scrolls (React `Page.Content`). */\nexport const PageContent = defineComponent({\n name: \"PageContent\",\n inheritAttrs: false,\n props: {\n /**\n * The content fills the page and scrolls inside itself, as a table does:\n * the page stops scrolling from 768px up.\n * @default false\n */\n fill: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const scrolled = injectPageContext(\"PageContent\")\n\n const onScroll = (event: Event) => {\n scrolled.value = (event.currentTarget as HTMLElement).scrollTop > SCROLLED_AFTER\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined, onScroll },\n attrs,\n ),\n [h(\"div\", { class: s.Column }, slots.default?.())],\n )\n },\n})\n\n/** Actions that remain below the scrolling content (React `Page.Footer`). */\nexport const PageFooter = defineComponent({\n name: \"PageFooter\",\n setup(_props, { slots }) {\n return () => h(\"div\", { class: s.Footer }, [\n h(\"div\", { class: s.FooterContent }, slots.default?.()),\n ])\n },\n})\n\n/** Props of the Page parts: native attributes of their element. */\nexport type PageSlotProps = HTMLAttributes\n"]}
@@ -1,2 +1,2 @@
1
- export { Page, PageActions, PageBar, PageContent, PageHeader, PageHeading, PageSubtitle, PageTitle, } from "./Page.js";
1
+ export { Page, PageActions, PageBar, PageContent, PageFooter, PageHeader, PageHeading, PageSubtitle, PageTitle, } from "./Page.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,SAAS,GAIV,MAAM,WAAW,CAAA","sourcesContent":["export {\n Page,\n PageActions,\n PageBar,\n PageContent,\n PageHeader,\n PageHeading,\n PageSubtitle,\n PageTitle,\n type PageProps,\n type PageSlotProps,\n type PageWidth,\n} from \"./Page.js\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,SAAS,GAIV,MAAM,WAAW,CAAA","sourcesContent":["export {\n Page,\n PageActions,\n PageBar,\n PageContent,\n PageFooter,\n PageHeader,\n PageHeading,\n PageSubtitle,\n PageTitle,\n type PageProps,\n type PageSlotProps,\n type PageWidth,\n} from \"./Page.js\"\n"]}
@@ -1,6 +1,7 @@
1
1
  import { computed, defineComponent, h, inject, nextTick, onBeforeUnmount, onMounted, provide, ref, shallowRef, useId, watch, withCtx, } from "vue";
2
2
  import { Presence, RovingFocusGroup, RovingFocusItem } from "reka-ui";
3
3
  import { bubbleInputStyle, useIsFormControl, useSize } from "../Checkbox/bubbleInput.js";
4
+ import { CheckMd } from "../Icon/index.js";
4
5
  import s from "@plexui/styles/components/RadioGroup/RadioGroup.module.css";
5
6
  const RadioGroupContextKey = Symbol("PlexUIRadioGroup");
6
7
  const useRadioGroupContext = () => {
@@ -406,7 +407,7 @@ const RadioGroupItemComponent = defineComponent({
406
407
  "data-state": state,
407
408
  "data-disabled": isDisabled ? "" : undefined,
408
409
  "class": s.RadioIndicator,
409
- }),
410
+ }, [h(CheckMd, { class: s.Checkmark })]),
410
411
  ]),
411
412
  }),
412
413
  ]),
@@ -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,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI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,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 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) => 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 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 selected value. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: { type: String, 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 selected value changed (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\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) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string) => {\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 if (nextValue !== null) 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 if (initialValue !== null) 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 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 })\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 // Roving focus moved here with an arrow key: check this radio by clicking it\n if (isArrowKeyPressed) (event.currentTarget as HTMLButtonElement).click()\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 label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\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 }),\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 slots.default?.(),\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,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;IAC5E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAID,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AAEtE,sCAAsC;AACtC,MAAM,UAAU,GAAG,CAAC,UAAyB,EAAE,EAAE;IAC/C,MAAM,iBAAiB,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AAU;4BACtB,UAAU,EAAE,CAAC,CAAC;4BACd,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;yBACjF,CAAC;wBACJ,CAAC,CAAC,IAAI;iBACT,CAAC;gBACF,KAAK,CAAC,OAAO,EAAE,EAAE;aAClB,CACF,CAAA;YAED,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,EAAE,GAAG,SAAS,EAAE,EAAE;gBAC1E,aAAa;oBACX,CAAC,CAAC,0FAA0F;wBAC1F,CAAC,CACC,KAAK,EACL;4BACE,OAAO,EAAE,CAAC,CAAC,cAAc;4BACzB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;4BAC1C,kBAAkB,EAAE,KAAK,CAAC,WAAW;yBACtC,EACD;4BACE,KAAK;4BACL,CAAC,CACC,MAAM,EACN,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAClG,WAAW,CACZ;yBACF,CACF;oBACH,CAAC,CAAC,KAAK;aACV,CAAC,CAAA;QACJ,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 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) => 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 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 selected value. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: { type: String, 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 selected value changed (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\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) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string) => {\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 if (nextValue !== null) 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 if (initialValue !== null) 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 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 })\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 // Roving focus moved here with an arrow key: check this radio by clicking it\n if (isArrowKeyPressed) (event.currentTarget as HTMLButtonElement).click()\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 label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\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 slots.default?.(),\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"]}
@@ -53,6 +53,8 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
53
53
  };
54
54
  /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */
55
55
  mobilePlacement: PropType<Extract<DialogPlacement, "center" | "bottom" | "fullscreen">>;
56
+ /** Mobile presentation at 640px and below. Sheets default to bottom placement. */
57
+ mobileVariant: PropType<"alert" | "sheet">;
56
58
  /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */
57
59
  onOpenAutoFocus: PropType<(event: Event) => void>;
58
60
  /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */
@@ -89,6 +91,8 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
89
91
  };
90
92
  /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */
91
93
  mobilePlacement: PropType<Extract<DialogPlacement, "center" | "bottom" | "fullscreen">>;
94
+ /** Mobile presentation at 640px and below. Sheets default to bottom placement. */
95
+ mobileVariant: PropType<"alert" | "sheet">;
92
96
  /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */
93
97
  onOpenAutoFocus: PropType<(event: Event) => void>;
94
98
  /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */
@@ -102,13 +106,22 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
102
106
  export declare const DialogHeader: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
103
107
  [key: string]: any;
104
108
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
109
+ export declare const DialogHeaderAction: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
110
+ [key: string]: any;
111
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
105
112
  /** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */
106
113
  export declare const DialogBody: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
107
114
  [key: string]: any;
108
115
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
109
- export declare const DialogFooter: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
116
+ export declare const DialogFooter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
117
+ /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
118
+ mobileLayout: PropType<"inline" | "stacked">;
119
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
110
120
  [key: string]: any;
111
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
121
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
122
+ /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
123
+ mobileLayout: PropType<"inline" | "stacked">;
124
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
112
125
  export declare const DialogTitle: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
113
126
  [key: string]: any;
114
127
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1 +1 @@
1
- export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DialogContentProps, type DialogPlacement, type DialogProps, } from "./Dialog.js";
1
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderAction, DialogTitle, DialogTrigger, type DialogContentProps, type DialogPlacement, type DialogProps, } from "./Dialog.js";
@@ -112,6 +112,10 @@ export declare const PageContent: import("vue").DefineComponent<import("vue").Ex
112
112
  }>> & Readonly<{}>, {
113
113
  fill: boolean;
114
114
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
115
+ /** Actions that remain below the scrolling content (React `Page.Footer`). */
116
+ export declare const PageFooter: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
117
+ [key: string]: any;
118
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
115
119
  /** Props of the Page parts: native attributes of their element. */
116
120
  export type PageSlotProps = HTMLAttributes;
117
121
  export {};
@@ -1 +1 @@
1
- export { Page, PageActions, PageBar, PageContent, PageHeader, PageHeading, PageSubtitle, PageTitle, type PageProps, type PageSlotProps, type PageWidth, } from "./Page.js";
1
+ export { Page, PageActions, PageBar, PageContent, PageFooter, PageHeader, PageHeading, PageSubtitle, PageTitle, type PageProps, type PageSlotProps, type PageWidth, } from "./Page.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/vue",
3
- "version": "0.7.3",
3
+ "version": "0.8.1",
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.1.30",
80
+ "@plexui/styles": "^0.1.31",
81
81
  "@tanstack/table-core": "8.21.3",
82
82
  "@tanstack/vue-table": "8.21.3",
83
83
  "@tiptap/core": "3.21.0",