@plexui/vue 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +3 -2
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +135 -18
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/dialogSteps.js +85 -0
- package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
- package/dist/es/components/Dialog/dialogViewport.js +74 -0
- package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +2 -1
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/components/IndexBar/IndexBar.js +215 -0
- package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
- package/dist/es/components/IndexBar/index.js +2 -0
- package/dist/es/components/IndexBar/index.js.map +1 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +10 -6
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Page/Page.js +2 -2
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
- package/dist/es/components/PhoneLayout/index.js +2 -0
- package/dist/es/components/PhoneLayout/index.js.map +1 -0
- package/dist/es/components/Popover/Popover.js +1 -1
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
- package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
- package/dist/es/components/Select/Select.js +2 -2
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +34 -3
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
- package/dist/es/components/SwipeActions/index.js +2 -0
- package/dist/es/components/SwipeActions/index.js.map +1 -0
- package/dist/es/components/Switch/Switch.js +3 -1
- package/dist/es/components/Switch/Switch.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +23 -8
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/TabBar/index.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +1 -0
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/TagInput/TagInput.js +3 -46
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js +1 -0
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +276 -0
- package/dist/es/components/Tip/Tip.js.map +1 -0
- package/dist/es/components/Tip/index.js +2 -0
- package/dist/es/components/Tip/index.js.map +1 -0
- package/dist/es/components/Toast/ToastRenderer.js +30 -13
- package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
- package/dist/es/components/Toast/Toaster.js +17 -6
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/toastLifecycle.js +113 -1
- package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +3 -3
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/composables/useEscCloseStack.js +8 -4
- package/dist/es/composables/useEscCloseStack.js.map +1 -1
- package/dist/es/lib/floatingBoundary.js +3 -1
- package/dist/es/lib/floatingBoundary.js.map +1 -1
- package/dist/es/lib/helpers.js +21 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/phoneLayout.js +16 -0
- package/dist/es/lib/phoneLayout.js.map +1 -0
- package/dist/es/lib/toastRegion.js +6 -0
- package/dist/es/lib/toastRegion.js.map +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/ContextMenu/shared.d.ts +3 -2
- package/dist/types/components/Dialog/Dialog.d.ts +93 -3
- package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
- package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
- package/dist/types/components/IndexBar/index.d.ts +1 -0
- package/dist/types/components/Menu/Menu.d.ts +14 -15
- package/dist/types/components/Page/Page.d.ts +2 -2
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
- package/dist/types/components/PhoneLayout/index.d.ts +1 -0
- package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
- package/dist/types/components/SwipeActions/index.d.ts +1 -0
- package/dist/types/components/TabBar/TabBar.d.ts +55 -6
- package/dist/types/components/TabBar/index.d.ts +1 -1
- package/dist/types/components/Tip/Tip.d.ts +146 -0
- package/dist/types/components/Tip/index.d.ts +1 -0
- package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +9 -7
- package/dist/types/composables/useEscCloseStack.d.ts +2 -2
- package/dist/types/lib/helpers.d.ts +6 -0
- package/dist/types/lib/phoneLayout.d.ts +11 -0
- package/dist/types/lib/toastRegion.d.ts +5 -0
- package/package.json +2 -2
|
@@ -74,8 +74,8 @@ export const PageHeader = defineComponent({
|
|
|
74
74
|
* @default true
|
|
75
75
|
*/
|
|
76
76
|
divider: { type: Boolean, default: true },
|
|
77
|
-
/** How the bar meets the content scrolled under it on a phone. @default "
|
|
78
|
-
background: { type: String, default: "
|
|
77
|
+
/** How the bar meets the content scrolled under it on a phone. @default "glass" */
|
|
78
|
+
background: { type: String, default: "glass" },
|
|
79
79
|
},
|
|
80
80
|
setup(props, { slots }) {
|
|
81
81
|
const { scrolled, headerHeight } = injectPageContext("PageHeader");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,GAAG,GAKJ,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,EAAE,YAAY,EAA6C,MAAM,uBAAuB,CAAA;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,CAAC,MAAM,gDAAgD,CAAA;AAuB9D,MAAM,YAAY,GAA8B,MAAM,CAAC,MAAM,CAAC,CAAA;AAE9D,SAAS,iBAAiB,CAAC,IAAY;IACrC,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;QAC/D,gEAAgE;QAChE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAuC,EAAE,OAAO,EAAE,OAAO,EAAE;KAC7E;IACD,KAAK,CAAC,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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 defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { TOOLBAR_HOST, type BarBackground, type ToolbarPlacement } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\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\n/** How a phone bar of the page meets the content scrolled under it; see `BarBackground`. */\nexport type PageBarBackground = BarBackground\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\ntype PageContext = {\n /** Content has scrolled under the header. */\n scrolled: Ref<boolean>\n /** Content continues under the footer. */\n contentBelow: Ref<boolean>\n footerHeight: Ref<number>\n headerHeight: Ref<number | undefined>\n /** Writes the content's scroll offset to the page as `--page-scroll-y`, which a large Toolbar title follows. */\n setScrollY: (scrollY: number) => void\n /** Tells the bars that follow the scroll, such as a minimizing TabBar, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n}\nconst PAGE_CONTEXT: InjectionKey<PageContext> = Symbol(\"Page\")\n\nfunction injectPageContext(part: string): PageContext {\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 /** Mobile canvas and grouped-field palette. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n },\n setup(props, { slots }) {\n const boundary = provideFloatingBoundaryScope()\n let root: HTMLElement | null = null\n const setRoot = (node: unknown) => {\n root = node instanceof HTMLElement ? node : null\n boundary.setRoot(node)\n }\n // Written straight to the element: a scroll frame must not render the page again.\n const setScrollY = (scrollY: number) => root?.style.setProperty(\"--page-scroll-y\", String(Math.max(0, scrollY)))\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const notifyScroll = (scrollY: number) => scrollListeners.forEach((listener) => listener(scrollY))\n const subscribeScroll = (listener: (scrollTop: number) => void) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n }\n const context = { scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), setScrollY, notifyScroll }\n provide(PAGE_CONTEXT, context)\n // A phone Toolbar replaces the header and footer bars; it reports its own heights.\n const toolbarTop = ref<number>()\n const toolbarBottom = ref<number>()\n provide(TOOLBAR_HOST, {\n kind: \"page\",\n scrolled: context.scrolled,\n contentBelow: context.contentBelow,\n subscribeScroll,\n setHeight: (placement: ToolbarPlacement, height: number | undefined) => { (placement === \"top\" ? toolbarTop : toolbarBottom).value = height },\n })\n return () => h(\"div\", { \"ref\": setRoot, \"class\": s.Page, \"data-width\": props.width, \"data-surface\": props.surface,\n style: {\n \"--page-footer-height\": `${context.footerHeight.value}px`,\n ...(context.headerHeight.value !== undefined ? { \"--page-header-height\": `${context.headerHeight.value}px` } : {}),\n ...(toolbarTop.value !== undefined ? { \"--page-toolbar-height\": `${toolbarTop.value}px` } : {}),\n ...(toolbarBottom.value !== undefined ? { \"--page-toolbar-bottom-height\": `${toolbarBottom.value}px` } : {}),\n } }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth; surface?: \"plain\" | \"grouped\" } & 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 a divider once the content has scrolled under the header: on a\n * desktop layout, and on a phone with a `\"hard\"` or `\"glass\"` background.\n * 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 /** How the bar meets the content scrolled under it on a phone. @default \"soft\" */\n background: { type: String as PropType<PageBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const { scrolled, headerHeight } = injectPageContext(\"PageHeader\")\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const header = element.value\n if (!header) return\n const update = () => { headerHeight.value = header.offsetHeight }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(header, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); headerHeight.value = undefined })\n\n return () =>\n h(\"div\", { \"ref\": element, \"class\": s.Header, \"data-background\": props.background, \"data-scrolled\": scrolled.value ? \"\" : undefined, \"data-divider\": props.divider ? \"\" : 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 = defineComponent({\n name: \"PageBar\",\n setup(_, { slots }) {\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n let children: MutationObserver | undefined\n onMounted(() => {\n const bar = element.value\n if (!bar) return\n const sides = () => bar.querySelectorAll<HTMLElement>(`:scope > .${s.Leading}, :scope > .${s.Actions}`)\n const update = () => {\n const width = Math.max(44, ...Array.from(sides(), (side) => side.offsetWidth))\n bar.style.setProperty(\"--page-bar-side-width\", `${width}px`)\n }\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeSides = () => { observer?.disconnect(); sides().forEach((side) => observer?.observe(side, { box: \"border-box\" })); update() }\n observeSides()\n children = new MutationObserver(observeSides)\n children.observe(bar, { childList: true })\n })\n onBeforeUnmount(() => { observer?.disconnect(); children?.disconnect() })\n return () => h(\"div\", { ref: element, class: s.Bar }, slots.default?.())\n },\n})\n/** Navigation controls on the leading side (React `Page.Leading`). */\nexport const PageLeading = part(\"PageLeading\", \"div\", s.Leading)\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 flow container for badges and text (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"div\", 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, contentBelow, setScrollY, notifyScroll } = injectPageContext(\"PageContent\")\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value) return\n stop = observeScrollEdges(element.value, (edges) => {\n scrolled.value = edges.scrolled\n contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => { stop?.(); scrolled.value = false; contentBelow.value = false })\n\n const onScroll = (event: Event) => {\n const top = (event.currentTarget as HTMLElement).scrollTop\n setScrollY(top)\n notifyScroll(top)\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"ref\": element, \"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 props: {\n /** How the bar meets the content scrolled under it on a phone. @default \"soft\" */\n background: { type: String as PropType<PageBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const element = ref<HTMLElement | null>(null)\n const { contentBelow, footerHeight } = injectPageContext(\"PageFooter\")\n const boundary = useFloatingBoundaryRegistration()\n const setFooter = (node: unknown) => {\n element.value = node instanceof HTMLElement ? node : null\n boundary?.setFooter(node)\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const footer = element.value\n if (!footer) return\n const update = () => { footerHeight.value = footer.offsetHeight }\n update()\n if (typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(update)\n observer.observe(footer, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); footerHeight.value = 0 })\n return () => h(\"div\", { ref: setFooter, class: s.Footer, \"data-background\": props.background, \"data-content-below\": contentBelow.value ? \"\" : undefined }, [\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\nexport type PageFooterProps = PageSlotProps & { background?: PageBarBackground }\n"]}
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,GAAG,GAKJ,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,EAAE,YAAY,EAA6C,M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AAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAA,CAAC,CAAC,CAAA;YACjE,MAAM,EAAE,CAAA;YACR,IAAI,OAAO,cAAc,KAAK,WAAW;gBAAE,OAAM;YACjD,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAA;YACrC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;QACF,eAAe,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;QACzE,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,UAAU,EAAE,oBAAoB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;YACzJ,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 defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { TOOLBAR_HOST, type BarBackground, type ToolbarPlacement } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\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\n/** How a phone bar of the page meets the content scrolled under it; see `BarBackground`. */\nexport type PageBarBackground = BarBackground\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\ntype PageContext = {\n /** Content has scrolled under the header. */\n scrolled: Ref<boolean>\n /** Content continues under the footer. */\n contentBelow: Ref<boolean>\n footerHeight: Ref<number>\n headerHeight: Ref<number | undefined>\n /** Writes the content's scroll offset to the page as `--page-scroll-y`, which a large Toolbar title follows. */\n setScrollY: (scrollY: number) => void\n /** Tells the bars that follow the scroll, such as a minimizing TabBar, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n}\nconst PAGE_CONTEXT: InjectionKey<PageContext> = Symbol(\"Page\")\n\nfunction injectPageContext(part: string): PageContext {\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 /** Mobile canvas and grouped-field palette. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n },\n setup(props, { slots }) {\n const boundary = provideFloatingBoundaryScope()\n let root: HTMLElement | null = null\n const setRoot = (node: unknown) => {\n root = node instanceof HTMLElement ? node : null\n boundary.setRoot(node)\n }\n // Written straight to the element: a scroll frame must not render the page again.\n const setScrollY = (scrollY: number) => root?.style.setProperty(\"--page-scroll-y\", String(Math.max(0, scrollY)))\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const notifyScroll = (scrollY: number) => scrollListeners.forEach((listener) => listener(scrollY))\n const subscribeScroll = (listener: (scrollTop: number) => void) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n }\n const context = { scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), setScrollY, notifyScroll }\n provide(PAGE_CONTEXT, context)\n // A phone Toolbar replaces the header and footer bars; it reports its own heights.\n const toolbarTop = ref<number>()\n const toolbarBottom = ref<number>()\n provide(TOOLBAR_HOST, {\n kind: \"page\",\n scrolled: context.scrolled,\n contentBelow: context.contentBelow,\n subscribeScroll,\n setHeight: (placement: ToolbarPlacement, height: number | undefined) => { (placement === \"top\" ? toolbarTop : toolbarBottom).value = height },\n })\n return () => h(\"div\", { \"ref\": setRoot, \"class\": s.Page, \"data-width\": props.width, \"data-surface\": props.surface,\n style: {\n \"--page-footer-height\": `${context.footerHeight.value}px`,\n ...(context.headerHeight.value !== undefined ? { \"--page-header-height\": `${context.headerHeight.value}px` } : {}),\n ...(toolbarTop.value !== undefined ? { \"--page-toolbar-height\": `${toolbarTop.value}px` } : {}),\n ...(toolbarBottom.value !== undefined ? { \"--page-toolbar-bottom-height\": `${toolbarBottom.value}px` } : {}),\n } }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth; surface?: \"plain\" | \"grouped\" } & 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 a divider once the content has scrolled under the header: on a\n * desktop layout, and on a phone with a `\"hard\"` or `\"glass\"` background.\n * 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 /** How the bar meets the content scrolled under it on a phone. @default \"glass\" */\n background: { type: String as PropType<PageBarBackground>, default: \"glass\" },\n },\n setup(props, { slots }) {\n const { scrolled, headerHeight } = injectPageContext(\"PageHeader\")\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const header = element.value\n if (!header) return\n const update = () => { headerHeight.value = header.offsetHeight }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(header, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); headerHeight.value = undefined })\n\n return () =>\n h(\"div\", { \"ref\": element, \"class\": s.Header, \"data-background\": props.background, \"data-scrolled\": scrolled.value ? \"\" : undefined, \"data-divider\": props.divider ? \"\" : 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 = defineComponent({\n name: \"PageBar\",\n setup(_, { slots }) {\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n let children: MutationObserver | undefined\n onMounted(() => {\n const bar = element.value\n if (!bar) return\n const sides = () => bar.querySelectorAll<HTMLElement>(`:scope > .${s.Leading}, :scope > .${s.Actions}`)\n const update = () => {\n const width = Math.max(44, ...Array.from(sides(), (side) => side.offsetWidth))\n bar.style.setProperty(\"--page-bar-side-width\", `${width}px`)\n }\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeSides = () => { observer?.disconnect(); sides().forEach((side) => observer?.observe(side, { box: \"border-box\" })); update() }\n observeSides()\n children = new MutationObserver(observeSides)\n children.observe(bar, { childList: true })\n })\n onBeforeUnmount(() => { observer?.disconnect(); children?.disconnect() })\n return () => h(\"div\", { ref: element, class: s.Bar }, slots.default?.())\n },\n})\n/** Navigation controls on the leading side (React `Page.Leading`). */\nexport const PageLeading = part(\"PageLeading\", \"div\", s.Leading)\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 flow container for badges and text (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"div\", 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, contentBelow, setScrollY, notifyScroll } = injectPageContext(\"PageContent\")\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value) return\n stop = observeScrollEdges(element.value, (edges) => {\n scrolled.value = edges.scrolled\n contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => { stop?.(); scrolled.value = false; contentBelow.value = false })\n\n const onScroll = (event: Event) => {\n const top = (event.currentTarget as HTMLElement).scrollTop\n setScrollY(top)\n notifyScroll(top)\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"ref\": element, \"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 props: {\n /** How the bar meets the content scrolled under it on a phone. @default \"soft\" */\n background: { type: String as PropType<PageBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const element = ref<HTMLElement | null>(null)\n const { contentBelow, footerHeight } = injectPageContext(\"PageFooter\")\n const boundary = useFloatingBoundaryRegistration()\n const setFooter = (node: unknown) => {\n element.value = node instanceof HTMLElement ? node : null\n boundary?.setFooter(node)\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const footer = element.value\n if (!footer) return\n const update = () => { footerHeight.value = footer.offsetHeight }\n update()\n if (typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(update)\n observer.observe(footer, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); footerHeight.value = 0 })\n return () => h(\"div\", { ref: setFooter, class: s.Footer, \"data-background\": props.background, \"data-content-below\": contentBelow.value ? \"\" : undefined }, [\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\nexport type PageFooterProps = PageSlotProps & { background?: PageBarBackground }\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, provide, ref, shallowRef, } from "vue";
|
|
3
|
+
import s from "@plexui/styles/components/PhoneLayout/PhoneLayout.module.css";
|
|
4
|
+
import { PHONE_MEDIA } from "../../lib/phoneLayout.js";
|
|
5
|
+
/** Provided inside a PhoneLayout and a Dialog. */
|
|
6
|
+
export const PHONE_LAYOUT = Symbol("PhoneLayout");
|
|
7
|
+
/**
|
|
8
|
+
* Lays out what it holds as on a phone at any window width, such as a phone frame on a desktop page: components take
|
|
9
|
+
* their phone presentation inside it, and a Dialog opened inside it covers the box instead of the window.
|
|
10
|
+
*/
|
|
11
|
+
export const PhoneLayout = defineComponent({
|
|
12
|
+
name: "PhoneLayout",
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
setup(_props, { slots, attrs }) {
|
|
15
|
+
const container = shallowRef(null);
|
|
16
|
+
provide(PHONE_LAYOUT, { container, phone: ref(true) });
|
|
17
|
+
return () => h("div", { ...attrs, ref: container, class: clsx(s.PhoneLayout, attrs.class), "data-plex-layout": "phone" }, slots.default?.());
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Whether components here are laid out as on a phone: inside a PhoneLayout (or a Dialog with `layout="phone"`), or
|
|
22
|
+
* in a window 767px wide or narrower. The server answers false outside a PhoneLayout.
|
|
23
|
+
*/
|
|
24
|
+
export const usePhoneLayout = () => {
|
|
25
|
+
const scope = inject(PHONE_LAYOUT, null);
|
|
26
|
+
const narrow = ref(false);
|
|
27
|
+
let query = null;
|
|
28
|
+
const update = () => { narrow.value = query?.matches ?? false; };
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
if (typeof window.matchMedia !== "function")
|
|
31
|
+
return;
|
|
32
|
+
query = window.matchMedia(PHONE_MEDIA);
|
|
33
|
+
update();
|
|
34
|
+
// Safari before 14 has only the older listener methods
|
|
35
|
+
if (typeof query.addEventListener === "function")
|
|
36
|
+
query.addEventListener("change", update);
|
|
37
|
+
else
|
|
38
|
+
query.addListener(update);
|
|
39
|
+
});
|
|
40
|
+
onBeforeUnmount(() => {
|
|
41
|
+
if (!query)
|
|
42
|
+
return;
|
|
43
|
+
if (typeof query.removeEventListener === "function")
|
|
44
|
+
query.removeEventListener("change", update);
|
|
45
|
+
else
|
|
46
|
+
query.removeListener(update);
|
|
47
|
+
});
|
|
48
|
+
return computed(() => !!scope?.phone.value || narrow.value);
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=PhoneLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneLayout.js","sourceRoot":"","sources":["../../../../src/components/PhoneLayout/PhoneLayout.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,GAIX,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,8DAA8D,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAStD,kDAAkD;AAClD,MAAM,CAAC,MAAM,YAAY,GAAmC,MAAM,CAAC,aAAa,CAAC,CAAA;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E,MAAM,CAAC,CAAA;;YACrF,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IACF,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,KAAK;YAAE,OAAM;QAClB,IAAI,OAAO,KAAK,CAAC,mBAAmB,KAAK,UAAU;YAAE,KAAK,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;;YAC3F,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n type ComputedRef,\n type InjectionKey,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/PhoneLayout/PhoneLayout.module.css\"\nimport { PHONE_MEDIA } from \"../../lib/phoneLayout.js\"\n\nexport type PhoneLayoutValue = {\n /** Where dialogs inside the layout portal to: the PhoneLayout box, or null for the document body. */\n container: Ref<HTMLElement | null>\n /** Whether what is inside is laid out as on a phone: always inside a PhoneLayout, as its `layout` says in a Dialog. */\n phone: Readonly<Ref<boolean>>\n}\n\n/** Provided inside a PhoneLayout and a Dialog. */\nexport const PHONE_LAYOUT: InjectionKey<PhoneLayoutValue> = Symbol(\"PhoneLayout\")\n\n/**\n * Lays out what it holds as on a phone at any window width, such as a phone frame on a desktop page: components take\n * their phone presentation inside it, and a Dialog opened inside it covers the box instead of the window.\n */\nexport const PhoneLayout = defineComponent({\n name: \"PhoneLayout\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const container = shallowRef<HTMLElement | null>(null)\n provide(PHONE_LAYOUT, { container, phone: ref(true) })\n return () =>\n h(\n \"div\",\n { ...attrs, ref: container, class: clsx(s.PhoneLayout, attrs.class as string | undefined), \"data-plex-layout\": \"phone\" },\n slots.default?.(),\n )\n },\n})\n\n/**\n * Whether components here are laid out as on a phone: inside a PhoneLayout (or a Dialog with `layout=\"phone\"`), or\n * in a window 767px wide or narrower. The server answers false outside a PhoneLayout.\n */\nexport const usePhoneLayout = (): ComputedRef<boolean> => {\n const scope = inject(PHONE_LAYOUT, null)\n const narrow = ref(false)\n let query: MediaQueryList | null = null\n const update = () => { narrow.value = query?.matches ?? false }\n onMounted(() => {\n if (typeof window.matchMedia !== \"function\") return\n query = window.matchMedia(PHONE_MEDIA)\n update()\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener === \"function\") query.addEventListener(\"change\", update)\n else query.addListener(update)\n })\n onBeforeUnmount(() => {\n if (!query) return\n if (typeof query.removeEventListener === \"function\") query.removeEventListener(\"change\", update)\n else query.removeListener(update)\n })\n return computed(() => !!scope?.phone.value || narrow.value)\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/PhoneLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAyB,MAAM,kBAAkB,CAAA","sourcesContent":["export { PHONE_LAYOUT, PhoneLayout, usePhoneLayout, type PhoneLayoutValue } from \"./PhoneLayout.js\"\n"]}
|
|
@@ -244,7 +244,7 @@ const PopoverContentImpl = defineComponent({
|
|
|
244
244
|
return;
|
|
245
245
|
pressedOutside = true;
|
|
246
246
|
setOpen(false);
|
|
247
|
-
});
|
|
247
|
+
}, () => contentRef.value);
|
|
248
248
|
const handleCloseAutoFocus = (event) => {
|
|
249
249
|
if (showOnHover.value || pressedOutside)
|
|
250
250
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.ts"],"names":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,EAAE,CAAC,KAAK,CAAC,CAAA;QAEhC,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE;YAC1B,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE,CACV,CAAC,CAAC,iBAAiB,EAAE,IAAI,EAAE;YACzB,OAAO,EAAE,GAAG,EAAE,CAAC;gBACb,CAAC,CACC,eAAe,EACf,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,EACxD;oBACE,OAAO,EAAE,GAAG,EAAE,CAAC;wBACb,IAAI,CAAC,KAAK;4BACR,CAAC,CAAC,CAAC,CACC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,kBAAkB,EAChE;gCACE,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;gCACpD,GAAI,KAAsB;gCAC1B,GAAG,cAAc,CAAC,KAAK,CAAC;gCACxB,KAAK,EAAE,KAAK,CAAC,KAAK;6BACnB,EACD,KAAK,CACN;4BACH,CAAC,CAAC,kBAAkB,EAAE;qBACzB;iBACF,CACF;aACF;SACF,CAAC,CAAA;IACN,CAAC;CACF,CAAC,CAAA;AAEF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAGhB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAClC,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAA","sourcesContent":["import {\n computed,\n createCommentVNode,\n defineComponent,\n h,\n markRaw,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n watch,\n watchPostEffect,\n type ExtractPropTypes,\n type PropType,\n} from \"vue\"\nimport {\n PopoverAnchor as RekaPopoverAnchor,\n PopoverContent as RekaPopoverContent,\n PopoverPortal as RekaPopoverPortal,\n PopoverRoot as RekaPopoverRoot,\n injectPopoverRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { provideFieldColumns, provideFieldRow } from \"../../lib/fieldRow.js\"\nimport { dataAttributes, focusableElements, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { overlayTiming } from \"../Transition/shared.js\"\nimport { withRadixVariableNames } from \"../Tooltip/Tooltip.js\"\nimport { composeEventHandlers, firstElementChild, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport { useDeferredPointerDownOutside } from \"./deferredPointerDownOutside.js\"\nimport { createPointerIntentArea, isPointInPolygon, type Polygon } from \"./pointerIntent.js\"\nimport { PopoverContextKey, usePopoverContext, type PopoverContextValue } from \"./usePopoverContext.js\"\nimport { usePopoverController } from \"./usePopoverController.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport s from \"@plexui/styles/components/Popover/Popover.module.css\"\n\n// Vue port of packages/ui/src/components/Popover/Popover.tsx on Reka UI.\n// Exports are flat (`PopoverTrigger`, `PopoverContent`) because\n// runtime-compiled templates cannot resolve `Popover.Trigger`; the static\n// properties are kept for render functions and SFCs.\n//\n// Reka keeps positioning, the dismissable layer, the focus scope and focus\n// return. As in Tooltip, the port follows Radix where they differ:\n// - The trigger is Radix's: it runs after the child's handlers and toggles\n// only when none called preventDefault(), carries no `id`, and has\n// `aria-controls` only while open.\n// - The content element is rendered here (Reka's `as`): Radix's custom\n// property names (the shared CSS reads `--radix-popover-content-*`), no\n// `dir`, no `aria-labelledby`.\n// - A press outside closes it on the click that follows, as Radix's\n// deferred outside press does (./deferredPointerDownOutside.ts).\n// - The portal renders once mounted, as Radix's does, so a closed popover\n// server-renders nothing.\n\nexport type PopoverSide = \"top\" | \"right\" | \"bottom\" | \"left\"\nexport type PopoverAlign = \"start\" | \"center\" | \"end\"\n\nconst PopoverComponent = defineComponent({\n name: \"Popover\",\n props: {\n /** Controlled visibility (`v-model:open`); uncontrolled when omitted */\n open: { type: Boolean, default: undefined },\n /** Opens on hover and focus instead of click. @default false */\n showOnHover: { type: Boolean, default: false },\n /** Delay before a hover popover opens, in milliseconds. @default 150 */\n hoverOpenDelay: { type: Number, default: 150 },\n },\n emits: {\n \"update:open\": (nextState: boolean) => typeof nextState === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const open = ref(false)\n const shake = ref(false)\n const triggerRef = shallowRef<HTMLElement | null>(null)\n const contentRef = shallowRef<HTMLElement | null>(null)\n let openTimer: ReturnType<typeof setTimeout> | undefined\n const hoverOpenFocusedWithTab = { current: false }\n const isPointerInTransitRef = { current: false }\n const isOpen = computed(() => props.open ?? open.value)\n\n const temporarilyPreventClickToClose = ref(false)\n watch(temporarilyPreventClickToClose, (prevent, _, onCleanup) => {\n if (!prevent) return\n const id = setTimeout(() => {\n temporarilyPreventClickToClose.value = false\n }, 500)\n onCleanup(() => clearTimeout(id))\n })\n\n const handleOpenChange = (nextState: boolean) => {\n clearTimeout(openTimer)\n\n // No-op if the state is not changing\n if (isOpen.value === nextState) {\n return\n }\n\n if (!nextState) {\n // clear any running shake animation on close\n shake.value = false\n\n // Check for specific hover conditions where focus should be\n // immediately restored to the trigger before closing\n if (props.showOnHover && hoverOpenFocusedWithTab.current) {\n triggerRef.value?.focus()\n }\n\n // Always cleanup this state\n hoverOpenFocusedWithTab.current = false\n }\n\n emit(\"update:open\", nextState)\n open.value = nextState\n\n if (props.showOnHover) {\n temporarilyPreventClickToClose.value = nextState\n }\n }\n\n const handleTriggerEnter = () => {\n openTimer = setTimeout(() => handleOpenChange(true), props.hoverOpenDelay)\n }\n\n const handleTriggerLeave = () => {\n clearTimeout(openTimer)\n }\n\n onBeforeUnmount(() => {\n clearTimeout(openTimer)\n })\n\n const store: PopoverContextValue = {\n open: isOpen,\n setOpen: handleOpenChange,\n shake,\n setShake: (next) => {\n shake.value = next\n },\n showOnHover: computed(() => props.showOnHover),\n temporarilyPreventClickToClose,\n onTriggerEnter: handleTriggerEnter,\n onTriggerLeave: handleTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n hoverOpenFocusedWithTab,\n }\n provide(PopoverContextKey, store)\n\n return () =>\n h(\n RekaPopoverRoot,\n { \"open\": isOpen.value, \"onUpdate:open\": handleOpenChange, \"modal\": false },\n { default: () => slots.default?.() },\n )\n },\n})\n\n/**\n * Renders its child (a button, link, ...) as the popover trigger. Like\n * `Popover.Trigger` in React it takes no other props: attributes on it are\n * not passed on.\n */\nexport const PopoverTrigger = defineComponent({\n name: \"PopoverTrigger\",\n inheritAttrs: false,\n emits: {\n pointerdown: (event: PointerEvent) => typeof event.type === \"string\",\n click: (event: MouseEvent) => typeof event.type === \"string\",\n },\n setup(_props, { slots, emit }) {\n const {\n open,\n setOpen,\n showOnHover,\n temporarilyPreventClickToClose,\n onTriggerEnter,\n onTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n } = usePopoverContext()\n const rootContext = injectPopoverRootContext()\n rootContext.contentId ||= useId(undefined, \"reka-popover-content\")\n const { forwardRef, currentElement } = useForwardExpose()\n let hasPointerMoveOpened = false\n\n // Focus returns here on close, and pointer-downs on it are not \"outside\".\n // Follows a replaced child element, as Radix's composed ref does\n watchPostEffect(() => {\n triggerRef.value = currentElement.value ?? null\n rootContext.triggerElement.value = currentElement.value\n })\n\n const maybePreventClickClose = (evt: Event) => {\n // Don't prevent temporary close if the trigger is an anchor tag itself\n const isLink = (evt.currentTarget as Element).nodeName.toLocaleLowerCase() === \"a\"\n\n if (!isLink && temporarilyPreventClickToClose.value) {\n // Prevents tooltip listeners from closing\n evt.preventDefault()\n evt.stopPropagation()\n }\n }\n\n const handlePointerMove = (evt: PointerEvent) => {\n if (!isHoverPointer(evt)) {\n return\n }\n\n if (!hasPointerMoveOpened && !isPointerInTransitRef.current) {\n onTriggerEnter()\n hasPointerMoveOpened = true\n }\n }\n\n const handlePointerLeave = () => {\n if (!hasPointerMoveOpened) {\n return\n }\n\n onTriggerLeave()\n hasPointerMoveOpened = false\n }\n\n const handleBlur = () => {\n setTimeout(() => {\n // Ignore this handler if focus has moved into the popover\n if (contentRef.value?.contains(document.activeElement)) {\n return\n }\n\n setOpen(false)\n }, 50)\n }\n\n const onPointerdown = (evt: PointerEvent) => {\n maybePreventClickClose(evt)\n emit(\"pointerdown\", evt)\n }\n\n const onClick = composeEventHandlers(\n (evt: MouseEvent) => {\n maybePreventClickClose(evt)\n emit(\"click\", evt)\n },\n () => rootContext.onOpenToggle(),\n )\n\n return () => {\n const child = firstElementChild(slots.default?.())\n if (!child) return null\n\n const isOpen = open.value\n const hover = showOnHover.value\n // Radix's PopoverTrigger props, then Plex's handlers\n const triggerProps = {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n onPointerdown,\n onClick,\n \"onPointermove\": hover ? handlePointerMove : undefined,\n \"onPointerleave\": hover ? handlePointerLeave : undefined,\n \"onFocus\": hover ? () => setOpen(true) : undefined,\n \"onBlur\": hover ? handleBlur : undefined,\n }\n\n return h(RekaPopoverAnchor, { asChild: true, ref: forwardRef }, { default: () => mergeSlotProps(child, triggerProps) })\n }\n },\n})\n\nconst contentProps = {\n /** Avoids collisions with the viewport and scroll containers. @default true */\n avoidCollisions: { type: Boolean, default: undefined },\n /** Distance from viewport and scroll container boundaries, in pixels. @default 20 */\n collisionPadding: { type: Number, default: 20 },\n /** `width` of the popover; numbers are pixels. @default \"auto\" */\n width: [Number, String] as PropType<number | \"auto\">,\n /** `min-width` of the popover; numbers are pixels. @default 300 */\n minWidth: [Number, String] as PropType<number | \"auto\">,\n /** `max-width` of the popover, in pixels */\n maxWidth: Number,\n /** Preferred side of the trigger. @default \"bottom\" */\n side: String as PropType<PopoverSide>,\n /** Distance from the trigger, in pixels. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** Preferred alignment against the trigger. @default \"center\" */\n align: String as PropType<PopoverAlign>,\n /** Offset from the \"start\" or \"end\" alignment, in pixels. @default 0 */\n alignOffset: Number,\n /** Translucent popover surface. @default false */\n translucent: { type: Boolean, default: undefined },\n /** Moves focus into the popover when it opens. @default true */\n autoFocus: { type: Boolean, default: true },\n}\n\ntype ContentProps = ExtractPropTypes<typeof contentProps>\n\n// The element Reka's content renders (`as`). Raw: Reka passes `as` through\n// reactive props, and Vue warns about a component made reactive.\nconst PopoverContentElement = markRaw(defineComponent({\n name: \"PopoverContentElement\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const { contentRef } = usePopoverContext()\n const setContentRef = (el: unknown) => {\n contentRef.value = (el as HTMLElement | null) ?? null\n }\n\n return () => {\n const { style, ...rest } = attrs\n delete rest.dir\n delete rest[\"aria-labelledby\"]\n delete rest.forceMount\n return h(\n \"div\",\n { ...rest, style: withRadixVariableNames(style, \"popover\"), ref: setContentRef },\n slots.default?.(),\n )\n }\n },\n}))\n\nconst PopoverContentImpl = defineComponent({\n name: \"PopoverContentImpl\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { showOnHover, shake, contentRef, setOpen, triggerRef } = usePopoverContext()\n const controller = usePopoverController()\n\n // Radix's non-modal content: a press on the trigger is left to the\n // trigger, and focus does not return to it after a press outside\n let pressedOutside = false\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (triggerRef.value?.contains(originalEvent.target as Node)) return\n pressedOutside = true\n setOpen(false)\n })\n const handleCloseAutoFocus = (event: Event) => {\n if (showOnHover.value || pressedOutside) event.preventDefault()\n else keepMovedFocus(event)\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n const contentElement = contentRef.value\n\n if (\n // When the current target is our container\n contentElement &&\n evt.target === contentElement &&\n // We know that shift key tabs will lead to closing the popover (because we don't use `modal`)\n evt.key === \"Tab\" &&\n evt.shiftKey\n ) {\n // Prevent that from happening\n evt.preventDefault()\n evt.stopPropagation()\n\n // Move focus to the last focusable element, placing the user in the focus loop\n const focusable = focusableElements(contentElement)\n const lastFocusable = focusable[focusable.length - 1]\n lastFocusable?.focus()\n }\n }\n\n // Important that we send initial focus into the popover, placing it onto the container.\n // This allows focus looping to begin, as well as capturing scoped key presses.\n // We prevent Reka's default behavior of focusing an element, because this can have adverse side-effects.\n // A tick later, as with the Select's list: until Reka's focus scope here has\n // registered, a Dialog around this content sends the focus straight back,\n // and the content takes that for focus moving outside and closes.\n onMounted(() => {\n watch(\n [showOnHover, () => props.autoFocus],\n async () => {\n await nextTick()\n const contentElement = contentRef.value\n\n if (!contentElement || !props.autoFocus) {\n return\n }\n\n // If we're already focused within the content area, no-op.\n // This would be true if some inner component declares autoFocus\n if (contentElement.contains(document.activeElement)) {\n return\n }\n\n // Our focus isn't in the content area - move it there.\n // NOTE: Don't automatically shift focus on hover popovers\n if (!showOnHover.value) {\n contentElement.focus({ preventScroll: true })\n }\n },\n { immediate: true },\n )\n })\n\n return () =>\n h(\n RekaPopoverContent,\n {\n ...dataAttributes(attrs),\n \"forceMount\": true,\n \"as\": PopoverContentElement,\n \"class\": [s.Popover, attrs.class],\n \"style\": toCssVariables({\n \"popover-width\": props.width,\n \"popover-min-width\": props.minWidth,\n \"popover-max-width\": props.maxWidth,\n }),\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n \"onPointerDownOutside\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n \"data-animate\": shake.value ? \"shake\" : undefined,\n \"data-translucent\": props.translucent ? \"true\" : undefined,\n \"side\": props.side,\n \"sideOffset\": props.sideOffset,\n \"align\": props.align,\n \"alignOffset\": props.alignOffset ?? (props.align === \"center\" ? 0 : -5),\n \"avoidCollisions\": props.avoidCollisions ?? true,\n \"hideWhenDetached\": true,\n \"collisionPadding\": props.collisionPadding,\n \"onOpenAutoFocus\": preventDefaultHandler,\n // Escape is handled by the Escape stack in PopoverContent\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onKeydown\": handleKeyDown,\n },\n { default: () => slots.default?.(controller) },\n )\n },\n})\n\nconst PopoverContentHoverable = defineComponent({\n name: \"PopoverContentHoverable\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, setOpen, triggerRef, contentRef, isPointerInTransitRef, hoverOpenFocusedWithTab } = usePopoverContext()\n const pointerGraceArea = shallowRef<Polygon | null>(null)\n\n const handleRemoveGraceArea = () => {\n pointerGraceArea.value = null\n isPointerInTransitRef.current = false\n }\n\n const handleCreateGraceArea = (event: PointerEvent, hoverTarget: HTMLElement) => {\n if (!isHoverPointer(event)) return\n const graceArea = createPointerIntentArea(event, hoverTarget)\n pointerGraceArea.value = graceArea\n isPointerInTransitRef.current = true\n }\n\n onBeforeUnmount(handleRemoveGraceArea)\n\n let removeLeaveListeners = () => {}\n onMounted(() => {\n const trigger = triggerRef.value\n const content = contentRef.value\n\n if (!trigger || !content) {\n return\n }\n\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content)\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger)\n\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave)\n content.addEventListener(\"pointerleave\", handleContentLeave)\n removeLeaveListeners = () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave)\n content.removeEventListener(\"pointerleave\", handleContentLeave)\n }\n })\n onBeforeUnmount(() => removeLeaveListeners())\n\n watch(pointerGraceArea, (graceArea, _, onCleanup) => {\n if (!graceArea) {\n return\n }\n\n const handleTrackPointerGrace = (event: PointerEvent) => {\n if (!isHoverPointer(event)) return\n const trigger = triggerRef.value\n const content = contentRef.value\n const target = event.target as HTMLElement\n const pointerPosition = { x: event.clientX, y: event.clientY }\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target)\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, graceArea)\n // Stop considering grace areas when the pointer runs into other control triggers\n const targetHasPopup = target.hasAttribute(\"aria-haspopup\")\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea()\n } else if (isPointerOutsideGraceArea || targetHasPopup) {\n handleRemoveGraceArea()\n setOpen(false)\n }\n }\n document.addEventListener(\"pointermove\", handleTrackPointerGrace)\n onCleanup(() => document.removeEventListener(\"pointermove\", handleTrackPointerGrace))\n })\n\n // Hoverable doesn't place focus in the popover by default.\n // If it is open and Tab is pressed, focus the first focusable element and\n // remember to restore focus to the trigger on close.\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Closed and still leaving: Tab belongs to the page again\n if (!open.value || !contentRef.value) {\n return\n }\n\n // Only assume forward tab is attempting to move into the popup\n if (evt.key === \"Tab\" && !evt.shiftKey) {\n const [firstFocusable] = focusableElements(contentRef.value)\n if (firstFocusable) {\n evt.preventDefault()\n firstFocusable.focus()\n hoverOpenFocusedWithTab.current = true\n document.removeEventListener(\"keydown\", handleKeyDown)\n }\n }\n }\n onMounted(() => document.addEventListener(\"keydown\", handleKeyDown))\n onBeforeUnmount(() => document.removeEventListener(\"keydown\", handleKeyDown))\n\n return () => h(PopoverContentImpl, { ...props, ...dataAttributes(attrs), class: attrs.class }, slots)\n },\n})\n\n/**\n * The floating panel. `class` lands on the panel. The default slot receives\n * `{ close, shake }`, the same functions `usePopoverController()` returns.\n */\nexport const PopoverContent = defineComponent({\n name: \"PopoverContent\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, showOnHover, setOpen } = usePopoverContext()\n // A popup opened from a Field row is not that row: its own controls keep their usual shape and menus\n provideFieldRow(() => false)\n provideFieldColumns(() => false)\n\n useEscCloseStack(open, () => {\n setOpen(false)\n })\n\n return () =>\n h(RekaPopoverPortal, null, {\n default: () => [\n h(\n TransitionGroup,\n { class: s.Transition, ...overlayTiming, overlay: true },\n {\n default: () => [\n open.value\n ? h(\n showOnHover.value ? PopoverContentHoverable : PopoverContentImpl,\n {\n key: showOnHover.value ? \"popover-hover\" : \"popover\",\n ...(props as ContentProps),\n ...dataAttributes(attrs),\n class: attrs.class,\n },\n slots,\n )\n : createCommentVNode(),\n ],\n },\n ),\n ],\n })\n },\n})\n\n/** Popover root. Uncontrolled by default; bind `v-model:open` to control it. */\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 Popover: typeof PopoverComponent & {\n Trigger: typeof PopoverTrigger\n Content: typeof PopoverContent\n} = Object.assign(PopoverComponent, {\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n})\n\nexport type PopoverProps = InstanceType<typeof PopoverComponent>[\"$props\"]\nexport type PopoverContentProps = InstanceType<typeof PopoverContent>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,CAAC,EACD,OAAO,EACP,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,eAAe,GAGhB,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,cAAc,IAAI,kBAAkB,EACpC,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD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AAK,CAAC;gCACxB,KAAK,EAAE,KAAK,CAAC,KAAK;6BACnB,EACD,KAAK,CACN;4BACH,CAAC,CAAC,kBAAkB,EAAE;qBACzB;iBACF,CACF;aACF;SACF,CAAC,CAAA;IACN,CAAC;CACF,CAAC,CAAA;AAEF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAGhB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAClC,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAA","sourcesContent":["import {\n computed,\n createCommentVNode,\n defineComponent,\n h,\n markRaw,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n watch,\n watchPostEffect,\n type ExtractPropTypes,\n type PropType,\n} from \"vue\"\nimport {\n PopoverAnchor as RekaPopoverAnchor,\n PopoverContent as RekaPopoverContent,\n PopoverPortal as RekaPopoverPortal,\n PopoverRoot as RekaPopoverRoot,\n injectPopoverRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { provideFieldColumns, provideFieldRow } from \"../../lib/fieldRow.js\"\nimport { dataAttributes, focusableElements, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { overlayTiming } from \"../Transition/shared.js\"\nimport { withRadixVariableNames } from \"../Tooltip/Tooltip.js\"\nimport { composeEventHandlers, firstElementChild, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport { useDeferredPointerDownOutside } from \"./deferredPointerDownOutside.js\"\nimport { createPointerIntentArea, isPointInPolygon, type Polygon } from \"./pointerIntent.js\"\nimport { PopoverContextKey, usePopoverContext, type PopoverContextValue } from \"./usePopoverContext.js\"\nimport { usePopoverController } from \"./usePopoverController.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport s from \"@plexui/styles/components/Popover/Popover.module.css\"\n\n// Vue port of packages/ui/src/components/Popover/Popover.tsx on Reka UI.\n// Exports are flat (`PopoverTrigger`, `PopoverContent`) because\n// runtime-compiled templates cannot resolve `Popover.Trigger`; the static\n// properties are kept for render functions and SFCs.\n//\n// Reka keeps positioning, the dismissable layer, the focus scope and focus\n// return. As in Tooltip, the port follows Radix where they differ:\n// - The trigger is Radix's: it runs after the child's handlers and toggles\n// only when none called preventDefault(), carries no `id`, and has\n// `aria-controls` only while open.\n// - The content element is rendered here (Reka's `as`): Radix's custom\n// property names (the shared CSS reads `--radix-popover-content-*`), no\n// `dir`, no `aria-labelledby`.\n// - A press outside closes it on the click that follows, as Radix's\n// deferred outside press does (./deferredPointerDownOutside.ts).\n// - The portal renders once mounted, as Radix's does, so a closed popover\n// server-renders nothing.\n\nexport type PopoverSide = \"top\" | \"right\" | \"bottom\" | \"left\"\nexport type PopoverAlign = \"start\" | \"center\" | \"end\"\n\nconst PopoverComponent = defineComponent({\n name: \"Popover\",\n props: {\n /** Controlled visibility (`v-model:open`); uncontrolled when omitted */\n open: { type: Boolean, default: undefined },\n /** Opens on hover and focus instead of click. @default false */\n showOnHover: { type: Boolean, default: false },\n /** Delay before a hover popover opens, in milliseconds. @default 150 */\n hoverOpenDelay: { type: Number, default: 150 },\n },\n emits: {\n \"update:open\": (nextState: boolean) => typeof nextState === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const open = ref(false)\n const shake = ref(false)\n const triggerRef = shallowRef<HTMLElement | null>(null)\n const contentRef = shallowRef<HTMLElement | null>(null)\n let openTimer: ReturnType<typeof setTimeout> | undefined\n const hoverOpenFocusedWithTab = { current: false }\n const isPointerInTransitRef = { current: false }\n const isOpen = computed(() => props.open ?? open.value)\n\n const temporarilyPreventClickToClose = ref(false)\n watch(temporarilyPreventClickToClose, (prevent, _, onCleanup) => {\n if (!prevent) return\n const id = setTimeout(() => {\n temporarilyPreventClickToClose.value = false\n }, 500)\n onCleanup(() => clearTimeout(id))\n })\n\n const handleOpenChange = (nextState: boolean) => {\n clearTimeout(openTimer)\n\n // No-op if the state is not changing\n if (isOpen.value === nextState) {\n return\n }\n\n if (!nextState) {\n // clear any running shake animation on close\n shake.value = false\n\n // Check for specific hover conditions where focus should be\n // immediately restored to the trigger before closing\n if (props.showOnHover && hoverOpenFocusedWithTab.current) {\n triggerRef.value?.focus()\n }\n\n // Always cleanup this state\n hoverOpenFocusedWithTab.current = false\n }\n\n emit(\"update:open\", nextState)\n open.value = nextState\n\n if (props.showOnHover) {\n temporarilyPreventClickToClose.value = nextState\n }\n }\n\n const handleTriggerEnter = () => {\n openTimer = setTimeout(() => handleOpenChange(true), props.hoverOpenDelay)\n }\n\n const handleTriggerLeave = () => {\n clearTimeout(openTimer)\n }\n\n onBeforeUnmount(() => {\n clearTimeout(openTimer)\n })\n\n const store: PopoverContextValue = {\n open: isOpen,\n setOpen: handleOpenChange,\n shake,\n setShake: (next) => {\n shake.value = next\n },\n showOnHover: computed(() => props.showOnHover),\n temporarilyPreventClickToClose,\n onTriggerEnter: handleTriggerEnter,\n onTriggerLeave: handleTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n hoverOpenFocusedWithTab,\n }\n provide(PopoverContextKey, store)\n\n return () =>\n h(\n RekaPopoverRoot,\n { \"open\": isOpen.value, \"onUpdate:open\": handleOpenChange, \"modal\": false },\n { default: () => slots.default?.() },\n )\n },\n})\n\n/**\n * Renders its child (a button, link, ...) as the popover trigger. Like\n * `Popover.Trigger` in React it takes no other props: attributes on it are\n * not passed on.\n */\nexport const PopoverTrigger = defineComponent({\n name: \"PopoverTrigger\",\n inheritAttrs: false,\n emits: {\n pointerdown: (event: PointerEvent) => typeof event.type === \"string\",\n click: (event: MouseEvent) => typeof event.type === \"string\",\n },\n setup(_props, { slots, emit }) {\n const {\n open,\n setOpen,\n showOnHover,\n temporarilyPreventClickToClose,\n onTriggerEnter,\n onTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n } = usePopoverContext()\n const rootContext = injectPopoverRootContext()\n rootContext.contentId ||= useId(undefined, \"reka-popover-content\")\n const { forwardRef, currentElement } = useForwardExpose()\n let hasPointerMoveOpened = false\n\n // Focus returns here on close, and pointer-downs on it are not \"outside\".\n // Follows a replaced child element, as Radix's composed ref does\n watchPostEffect(() => {\n triggerRef.value = currentElement.value ?? null\n rootContext.triggerElement.value = currentElement.value\n })\n\n const maybePreventClickClose = (evt: Event) => {\n // Don't prevent temporary close if the trigger is an anchor tag itself\n const isLink = (evt.currentTarget as Element).nodeName.toLocaleLowerCase() === \"a\"\n\n if (!isLink && temporarilyPreventClickToClose.value) {\n // Prevents tooltip listeners from closing\n evt.preventDefault()\n evt.stopPropagation()\n }\n }\n\n const handlePointerMove = (evt: PointerEvent) => {\n if (!isHoverPointer(evt)) {\n return\n }\n\n if (!hasPointerMoveOpened && !isPointerInTransitRef.current) {\n onTriggerEnter()\n hasPointerMoveOpened = true\n }\n }\n\n const handlePointerLeave = () => {\n if (!hasPointerMoveOpened) {\n return\n }\n\n onTriggerLeave()\n hasPointerMoveOpened = false\n }\n\n const handleBlur = () => {\n setTimeout(() => {\n // Ignore this handler if focus has moved into the popover\n if (contentRef.value?.contains(document.activeElement)) {\n return\n }\n\n setOpen(false)\n }, 50)\n }\n\n const onPointerdown = (evt: PointerEvent) => {\n maybePreventClickClose(evt)\n emit(\"pointerdown\", evt)\n }\n\n const onClick = composeEventHandlers(\n (evt: MouseEvent) => {\n maybePreventClickClose(evt)\n emit(\"click\", evt)\n },\n () => rootContext.onOpenToggle(),\n )\n\n return () => {\n const child = firstElementChild(slots.default?.())\n if (!child) return null\n\n const isOpen = open.value\n const hover = showOnHover.value\n // Radix's PopoverTrigger props, then Plex's handlers\n const triggerProps = {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n onPointerdown,\n onClick,\n \"onPointermove\": hover ? handlePointerMove : undefined,\n \"onPointerleave\": hover ? handlePointerLeave : undefined,\n \"onFocus\": hover ? () => setOpen(true) : undefined,\n \"onBlur\": hover ? handleBlur : undefined,\n }\n\n return h(RekaPopoverAnchor, { asChild: true, ref: forwardRef }, { default: () => mergeSlotProps(child, triggerProps) })\n }\n },\n})\n\nconst contentProps = {\n /** Avoids collisions with the viewport and scroll containers. @default true */\n avoidCollisions: { type: Boolean, default: undefined },\n /** Distance from viewport and scroll container boundaries, in pixels. @default 20 */\n collisionPadding: { type: Number, default: 20 },\n /** `width` of the popover; numbers are pixels. @default \"auto\" */\n width: [Number, String] as PropType<number | \"auto\">,\n /** `min-width` of the popover; numbers are pixels. @default 300 */\n minWidth: [Number, String] as PropType<number | \"auto\">,\n /** `max-width` of the popover, in pixels */\n maxWidth: Number,\n /** Preferred side of the trigger. @default \"bottom\" */\n side: String as PropType<PopoverSide>,\n /** Distance from the trigger, in pixels. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** Preferred alignment against the trigger. @default \"center\" */\n align: String as PropType<PopoverAlign>,\n /** Offset from the \"start\" or \"end\" alignment, in pixels. @default 0 */\n alignOffset: Number,\n /** Translucent popover surface. @default false */\n translucent: { type: Boolean, default: undefined },\n /** Moves focus into the popover when it opens. @default true */\n autoFocus: { type: Boolean, default: true },\n}\n\ntype ContentProps = ExtractPropTypes<typeof contentProps>\n\n// The element Reka's content renders (`as`). Raw: Reka passes `as` through\n// reactive props, and Vue warns about a component made reactive.\nconst PopoverContentElement = markRaw(defineComponent({\n name: \"PopoverContentElement\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const { contentRef } = usePopoverContext()\n const setContentRef = (el: unknown) => {\n contentRef.value = (el as HTMLElement | null) ?? null\n }\n\n return () => {\n const { style, ...rest } = attrs\n delete rest.dir\n delete rest[\"aria-labelledby\"]\n delete rest.forceMount\n return h(\n \"div\",\n { ...rest, style: withRadixVariableNames(style, \"popover\"), ref: setContentRef },\n slots.default?.(),\n )\n }\n },\n}))\n\nconst PopoverContentImpl = defineComponent({\n name: \"PopoverContentImpl\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { showOnHover, shake, contentRef, setOpen, triggerRef } = usePopoverContext()\n const controller = usePopoverController()\n\n // Radix's non-modal content: a press on the trigger is left to the\n // trigger, and focus does not return to it after a press outside\n let pressedOutside = false\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (triggerRef.value?.contains(originalEvent.target as Node)) return\n pressedOutside = true\n setOpen(false)\n }, () => contentRef.value)\n const handleCloseAutoFocus = (event: Event) => {\n if (showOnHover.value || pressedOutside) event.preventDefault()\n else keepMovedFocus(event)\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n const contentElement = contentRef.value\n\n if (\n // When the current target is our container\n contentElement &&\n evt.target === contentElement &&\n // We know that shift key tabs will lead to closing the popover (because we don't use `modal`)\n evt.key === \"Tab\" &&\n evt.shiftKey\n ) {\n // Prevent that from happening\n evt.preventDefault()\n evt.stopPropagation()\n\n // Move focus to the last focusable element, placing the user in the focus loop\n const focusable = focusableElements(contentElement)\n const lastFocusable = focusable[focusable.length - 1]\n lastFocusable?.focus()\n }\n }\n\n // Important that we send initial focus into the popover, placing it onto the container.\n // This allows focus looping to begin, as well as capturing scoped key presses.\n // We prevent Reka's default behavior of focusing an element, because this can have adverse side-effects.\n // A tick later, as with the Select's list: until Reka's focus scope here has\n // registered, a Dialog around this content sends the focus straight back,\n // and the content takes that for focus moving outside and closes.\n onMounted(() => {\n watch(\n [showOnHover, () => props.autoFocus],\n async () => {\n await nextTick()\n const contentElement = contentRef.value\n\n if (!contentElement || !props.autoFocus) {\n return\n }\n\n // If we're already focused within the content area, no-op.\n // This would be true if some inner component declares autoFocus\n if (contentElement.contains(document.activeElement)) {\n return\n }\n\n // Our focus isn't in the content area - move it there.\n // NOTE: Don't automatically shift focus on hover popovers\n if (!showOnHover.value) {\n contentElement.focus({ preventScroll: true })\n }\n },\n { immediate: true },\n )\n })\n\n return () =>\n h(\n RekaPopoverContent,\n {\n ...dataAttributes(attrs),\n \"forceMount\": true,\n \"as\": PopoverContentElement,\n \"class\": [s.Popover, attrs.class],\n \"style\": toCssVariables({\n \"popover-width\": props.width,\n \"popover-min-width\": props.minWidth,\n \"popover-max-width\": props.maxWidth,\n }),\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n \"onPointerDownOutside\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n \"data-animate\": shake.value ? \"shake\" : undefined,\n \"data-translucent\": props.translucent ? \"true\" : undefined,\n \"side\": props.side,\n \"sideOffset\": props.sideOffset,\n \"align\": props.align,\n \"alignOffset\": props.alignOffset ?? (props.align === \"center\" ? 0 : -5),\n \"avoidCollisions\": props.avoidCollisions ?? true,\n \"hideWhenDetached\": true,\n \"collisionPadding\": props.collisionPadding,\n \"onOpenAutoFocus\": preventDefaultHandler,\n // Escape is handled by the Escape stack in PopoverContent\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onKeydown\": handleKeyDown,\n },\n { default: () => slots.default?.(controller) },\n )\n },\n})\n\nconst PopoverContentHoverable = defineComponent({\n name: \"PopoverContentHoverable\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, setOpen, triggerRef, contentRef, isPointerInTransitRef, hoverOpenFocusedWithTab } = usePopoverContext()\n const pointerGraceArea = shallowRef<Polygon | null>(null)\n\n const handleRemoveGraceArea = () => {\n pointerGraceArea.value = null\n isPointerInTransitRef.current = false\n }\n\n const handleCreateGraceArea = (event: PointerEvent, hoverTarget: HTMLElement) => {\n if (!isHoverPointer(event)) return\n const graceArea = createPointerIntentArea(event, hoverTarget)\n pointerGraceArea.value = graceArea\n isPointerInTransitRef.current = true\n }\n\n onBeforeUnmount(handleRemoveGraceArea)\n\n let removeLeaveListeners = () => {}\n onMounted(() => {\n const trigger = triggerRef.value\n const content = contentRef.value\n\n if (!trigger || !content) {\n return\n }\n\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content)\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger)\n\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave)\n content.addEventListener(\"pointerleave\", handleContentLeave)\n removeLeaveListeners = () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave)\n content.removeEventListener(\"pointerleave\", handleContentLeave)\n }\n })\n onBeforeUnmount(() => removeLeaveListeners())\n\n watch(pointerGraceArea, (graceArea, _, onCleanup) => {\n if (!graceArea) {\n return\n }\n\n const handleTrackPointerGrace = (event: PointerEvent) => {\n if (!isHoverPointer(event)) return\n const trigger = triggerRef.value\n const content = contentRef.value\n const target = event.target as HTMLElement\n const pointerPosition = { x: event.clientX, y: event.clientY }\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target)\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, graceArea)\n // Stop considering grace areas when the pointer runs into other control triggers\n const targetHasPopup = target.hasAttribute(\"aria-haspopup\")\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea()\n } else if (isPointerOutsideGraceArea || targetHasPopup) {\n handleRemoveGraceArea()\n setOpen(false)\n }\n }\n document.addEventListener(\"pointermove\", handleTrackPointerGrace)\n onCleanup(() => document.removeEventListener(\"pointermove\", handleTrackPointerGrace))\n })\n\n // Hoverable doesn't place focus in the popover by default.\n // If it is open and Tab is pressed, focus the first focusable element and\n // remember to restore focus to the trigger on close.\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Closed and still leaving: Tab belongs to the page again\n if (!open.value || !contentRef.value) {\n return\n }\n\n // Only assume forward tab is attempting to move into the popup\n if (evt.key === \"Tab\" && !evt.shiftKey) {\n const [firstFocusable] = focusableElements(contentRef.value)\n if (firstFocusable) {\n evt.preventDefault()\n firstFocusable.focus()\n hoverOpenFocusedWithTab.current = true\n document.removeEventListener(\"keydown\", handleKeyDown)\n }\n }\n }\n onMounted(() => document.addEventListener(\"keydown\", handleKeyDown))\n onBeforeUnmount(() => document.removeEventListener(\"keydown\", handleKeyDown))\n\n return () => h(PopoverContentImpl, { ...props, ...dataAttributes(attrs), class: attrs.class }, slots)\n },\n})\n\n/**\n * The floating panel. `class` lands on the panel. The default slot receives\n * `{ close, shake }`, the same functions `usePopoverController()` returns.\n */\nexport const PopoverContent = defineComponent({\n name: \"PopoverContent\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, showOnHover, setOpen } = usePopoverContext()\n // A popup opened from a Field row is not that row: its own controls keep their usual shape and menus\n provideFieldRow(() => false)\n provideFieldColumns(() => false)\n\n useEscCloseStack(open, () => {\n setOpen(false)\n })\n\n return () =>\n h(RekaPopoverPortal, null, {\n default: () => [\n h(\n TransitionGroup,\n { class: s.Transition, ...overlayTiming, overlay: true },\n {\n default: () => [\n open.value\n ? h(\n showOnHover.value ? PopoverContentHoverable : PopoverContentImpl,\n {\n key: showOnHover.value ? \"popover-hover\" : \"popover\",\n ...(props as ContentProps),\n ...dataAttributes(attrs),\n class: attrs.class,\n },\n slots,\n )\n : createCommentVNode(),\n ],\n },\n ),\n ],\n })\n },\n})\n\n/** Popover root. Uncontrolled by default; bind `v-model:open` to control it. */\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 Popover: typeof PopoverComponent & {\n Trigger: typeof PopoverTrigger\n Content: typeof PopoverContent\n} = Object.assign(PopoverComponent, {\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n})\n\nexport type PopoverProps = InstanceType<typeof PopoverComponent>[\"$props\"]\nexport type PopoverContentProps = InstanceType<typeof PopoverContent>[\"$props\"]\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onBeforeUnmount } from "vue";
|
|
1
|
+
import { onBeforeUnmount, onMounted } from "vue";
|
|
2
2
|
const OUTSIDE_INTERACTION_EVENTS = ["pointerup", "mousedown", "mouseup", "touchstart", "touchend", "click"];
|
|
3
3
|
/**
|
|
4
4
|
* A layer's own dismiss affordance (a dialog overlay): pressing it dismisses
|
|
@@ -11,13 +11,60 @@ const isOnDismissableSurface = (target) => target instanceof Node && [...dismiss
|
|
|
11
11
|
* runs on the click that completes a deferred press. `reset` drops a pending
|
|
12
12
|
* press (the layer closed some other way); unmounting does it too.
|
|
13
13
|
*/
|
|
14
|
-
export const useDeferredPointerDownOutside = (dismiss) => {
|
|
14
|
+
export const useDeferredPointerDownOutside = (dismiss, layer) => {
|
|
15
15
|
let stop;
|
|
16
|
+
// A touch press until its click (Reka reports it then), or a moment after it lifts without one (a long press).
|
|
17
|
+
// With the layer known, a touch outside it holds every focus moving outside, as Radix's deferred press does;
|
|
18
|
+
// without it, only the focus the touch gives to what it touched.
|
|
19
|
+
let touch;
|
|
20
|
+
const clearTouch = () => {
|
|
21
|
+
if (touch?.timer !== undefined)
|
|
22
|
+
window.clearTimeout(touch.timer);
|
|
23
|
+
touch = undefined;
|
|
24
|
+
};
|
|
25
|
+
const onTouchDown = (event) => {
|
|
26
|
+
clearTouch();
|
|
27
|
+
if (event.pointerType !== "touch" || event.button !== 0)
|
|
28
|
+
return;
|
|
29
|
+
const root = layer?.();
|
|
30
|
+
if (root && event.target instanceof Node && root.contains(event.target))
|
|
31
|
+
return;
|
|
32
|
+
touch = { id: event.pointerId, target: event.target, outside: Boolean(root) };
|
|
33
|
+
};
|
|
34
|
+
const onTouchUp = (event) => {
|
|
35
|
+
if (touch?.id === event.pointerId)
|
|
36
|
+
touch.timer = window.setTimeout(clearTouch, 1000);
|
|
37
|
+
};
|
|
38
|
+
const onTouchCancel = (event) => {
|
|
39
|
+
if (touch?.id === event.pointerId)
|
|
40
|
+
clearTouch();
|
|
41
|
+
};
|
|
42
|
+
// After Reka's click listener has reported the touch
|
|
43
|
+
const onTouchClick = () => {
|
|
44
|
+
if (touch)
|
|
45
|
+
window.setTimeout(clearTouch, 0);
|
|
46
|
+
};
|
|
47
|
+
// A press is over: the deferred one, and a touch still waiting for its click (the layer closed some other way)
|
|
16
48
|
const reset = () => {
|
|
17
49
|
stop?.();
|
|
18
50
|
stop = undefined;
|
|
51
|
+
clearTouch();
|
|
19
52
|
};
|
|
20
|
-
|
|
53
|
+
let ownerDocument;
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
ownerDocument = document;
|
|
56
|
+
ownerDocument.addEventListener("pointerdown", onTouchDown, true);
|
|
57
|
+
ownerDocument.addEventListener("pointerup", onTouchUp, true);
|
|
58
|
+
ownerDocument.addEventListener("pointercancel", onTouchCancel, true);
|
|
59
|
+
ownerDocument.addEventListener("click", onTouchClick, true);
|
|
60
|
+
});
|
|
61
|
+
onBeforeUnmount(() => {
|
|
62
|
+
reset();
|
|
63
|
+
ownerDocument?.removeEventListener("pointerdown", onTouchDown, true);
|
|
64
|
+
ownerDocument?.removeEventListener("pointerup", onTouchUp, true);
|
|
65
|
+
ownerDocument?.removeEventListener("pointercancel", onTouchCancel, true);
|
|
66
|
+
ownerDocument?.removeEventListener("click", onTouchClick, true);
|
|
67
|
+
});
|
|
21
68
|
const onPointerDownOutside = (event) => {
|
|
22
69
|
reset();
|
|
23
70
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -71,8 +118,16 @@ export const useDeferredPointerDownOutside = (dismiss) => {
|
|
|
71
118
|
ownerDocument.removeEventListener("pointercancel", handlePointerCancel, true);
|
|
72
119
|
};
|
|
73
120
|
};
|
|
121
|
+
// Focus the pending touch gives to what it touched (or to the control around it) is that touch
|
|
122
|
+
const focusedByTouch = (event) => {
|
|
123
|
+
if (touch?.outside)
|
|
124
|
+
return true;
|
|
125
|
+
const focused = event.detail?.originalEvent?.target;
|
|
126
|
+
const touched = touch?.target;
|
|
127
|
+
return touched instanceof Node && focused instanceof Node && (touched.contains(focused) || focused.contains(touched));
|
|
128
|
+
};
|
|
74
129
|
const onFocusOutside = (event) => {
|
|
75
|
-
if (stop)
|
|
130
|
+
if (stop || focusedByTouch(event))
|
|
76
131
|
event.preventDefault();
|
|
77
132
|
};
|
|
78
133
|
return { onPointerDownOutside, onFocusOutside, reset };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferredPointerDownOutside.js","sourceRoot":"","sources":["../../../../src/components/Popover/deferredPointerDownOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,KAAK,CAAA;AAcrC,MAAM,0BAA0B,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;AAE3G;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAW,CAAA;AAErD,MAAM,sBAAsB,GAAG,CAAC,MAA0B,EAAE,EAAE,CAC5D,MAAM,YAAY,IAAI,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;AAEhG;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,OAA8C,EAAE,EAAE;IAC9F,IAAI,IAA8B,CAAA;IAElC,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,IAAI,EAAE,EAAE,CAAA;QACR,IAAI,GAAG,SAAS,CAAA;IAClB,CAAC,CAAA;IAED,eAAe,CAAC,KAAK,CAAC,CAAA;IAEtB,MAAM,oBAAoB,GAAG,CAAC,KAAmB,EAAE,EAAE;QACnD,KAAK,EAAE,CAAA;QACP,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAA;QAChD,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,WAAW,KAAK,OAAO;YAAE,OAAM;QAC/E,4BAA4B;QAC5B,KAAK,CAAC,cAAc,EAAE,CAAA;QAEtB,MAAM,aAAa,GAAI,aAAa,CAAC,MAAsB,EAAE,aAAa,IAAI,QAAQ,CAAA;QACtF,MAAM,W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QACD,4EAA4E;QAC5E,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAC/C,aAAa,CAAC,gBAAgB,CAAC,aAAa,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAA;QACtE,aAAa,CAAC,gBAAgB,CAAC,eAAe,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAE1E,IAAI,GAAG,GAAG,EAAE;YACV,MAAM,GAAG,KAAK,CAAA;YACd,KAAK,MAAM,IAAI,IAAI,0BAA0B,EAAE,CAAC;gBAC9C,aAAa,CAAC,mBAAmB,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA;gBAC5D,aAAa,CAAC,mBAAmB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;YACvD,CAAC;YACD,aAAa,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;YAClD,aAAa,CAAC,mBAAmB,CAAC,aAAa,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAA;YACzE,aAAa,CAAC,mBAAmB,CAAC,eAAe,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAC/E,CAAC,CAAA;IACH,CAAC,CAAA;IAED,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE;QACtC,IAAI,IAAI;YAAE,KAAK,CAAC,cAAc,EAAE,CAAA;IAClC,CAAC,CAAA;IAED,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA;AACxD,CAAC,CAAA","sourcesContent":["import { onBeforeUnmount } from \"vue\"\n\n// Internal: radix-ui 1.8's deferred outside press (DismissableLayer's\n// `deferPointerDownOutside`), which Radix Popover and Dialog turn on and\n// Reka's dismissable layer does not have. Reka dismisses on the pointerdown\n// outside; Radix waits for the click that follows a primary-button press,\n// keeps the layer when something outside stopped that click (or the\n// pointerup / mouse / touch events before it) from reaching the document,\n// and ignores focus moving outside meanwhile. Other buttons are left to Reka,\n// which dismisses at once, as Radix does, and so are touches, which Reka\n// already reports on their click.\n\ntype OutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>\n\nconst OUTSIDE_INTERACTION_EVENTS = [\"pointerup\", \"mousedown\", \"mouseup\", \"touchstart\", \"touchend\", \"click\"]\n\n/**\n * A layer's own dismiss affordance (a dialog overlay): pressing it dismisses\n * even when something stops the events, as Radix's dismissable surfaces.\n */\nexport const dismissableSurfaces = new Set<Element>()\n\nconst isOnDismissableSurface = (target: EventTarget | null) =>\n target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target))\n\n/**\n * Listeners for Reka's `pointerDownOutside` and `focusOutside`; `dismiss`\n * runs on the click that completes a deferred press. `reset` drops a pending\n * press (the layer closed some other way); unmounting does it too.\n */\nexport const useDeferredPointerDownOutside = (dismiss: (originalEvent: PointerEvent) => void) => {\n let stop: (() => void) | undefined\n\n const reset = () => {\n stop?.()\n stop = undefined\n }\n\n onBeforeUnmount(reset)\n\n const onPointerDownOutside = (event: OutsideEvent) => {\n reset()\n const originalEvent = event.detail.originalEvent\n if (originalEvent.button !== 0 || originalEvent.pointerType === \"touch\") return\n // Reka must not dismiss now\n event.preventDefault()\n\n const ownerDocument = (originalEvent.target as Node | null)?.ownerDocument ?? document\n const intercepted = new Map<string, boolean>()\n let active = true\n\n const finish = () => {\n if (!active) return\n const wasIntercepted = [...intercepted.values()].some(Boolean)\n reset()\n if (!wasIntercepted) dismiss(originalEvent)\n }\n const handleCapture = (evt: Event) => {\n if (!isOnDismissableSurface(evt.target)) intercepted.set(evt.type, true)\n // A click stopped on its way to the document still ends the press\n if (evt.type === \"click\") window.setTimeout(finish, 0)\n }\n const handleBubble = (evt: Event) => {\n intercepted.set(evt.type, false)\n }\n // Any later press replaces this one (Reka reports the outside ones again)\n const handlePointerDown = () => reset()\n const handlePointerCancel = (event: PointerEvent) => {\n if (event.pointerId === originalEvent.pointerId) reset()\n }\n\n for (const name of OUTSIDE_INTERACTION_EVENTS) {\n ownerDocument.addEventListener(name, handleCapture, true)\n ownerDocument.addEventListener(name, handleBubble)\n }\n // After the bubble listener, so a click that got here counts as not stopped\n ownerDocument.addEventListener(\"click\", finish)\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerDocument.addEventListener(\"pointercancel\", handlePointerCancel, true)\n\n stop = () => {\n active = false\n for (const name of OUTSIDE_INTERACTION_EVENTS) {\n ownerDocument.removeEventListener(name, handleCapture, true)\n ownerDocument.removeEventListener(name, handleBubble)\n }\n ownerDocument.removeEventListener(\"click\", finish)\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerDocument.removeEventListener(\"pointercancel\", handlePointerCancel, true)\n }\n }\n\n const onFocusOutside = (event: Event) => {\n if (stop) event.preventDefault()\n }\n\n return { onPointerDownOutside, onFocusOutside, reset }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deferredPointerDownOutside.js","sourceRoot":"","sources":["../../../../src/components/Popover/deferredPointerDownOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAehD,MAAM,0BAA0B,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;AAE3G;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAW,CAAA;AAErD,MAAM,sBAAsB,GAAG,CAAC,MAA0B,EAAE,EAAE,CAC5D,MAAM,YAAY,IAAI,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;AAEhG;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,OAA8C,EAC9C,KAAwC,EACxC,EAAE;IACF,IAAI,IAA8B,CAAA;IAGlC,+GAA+G;IAC/G,6GAA6G;IAC7G,iEAAiE;I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CAAC,KAAY,EAAE,EAAE;QACtC,IAAI,IAAI,IAAI,cAAc,CAAC,KAAK,CAAC;YAAE,KAAK,CAAC,cAAc,EAAE,CAAA;IAC3D,CAAC,CAAA;IAED,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA;AACxD,CAAC,CAAA","sourcesContent":["import { onBeforeUnmount, onMounted } from \"vue\"\n\n// Internal: radix-ui 1.8's deferred outside press (DismissableLayer's\n// `deferPointerDownOutside`), which Radix Popover and Dialog turn on and\n// Reka's dismissable layer does not have. Reka dismisses on the pointerdown\n// outside; Radix waits for the click that follows a primary-button press,\n// keeps the layer when something outside stopped that click (or the\n// pointerup / mouse / touch events before it) from reaching the document,\n// and ignores focus moving outside meanwhile. Other buttons are left to Reka,\n// which dismisses at once, as Radix does, and so are touches, which Reka\n// already reports on their click; focus moving outside before that click is\n// the touch too, as Radix defers a touch and ignores that focus.\n\ntype OutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>\n\nconst OUTSIDE_INTERACTION_EVENTS = [\"pointerup\", \"mousedown\", \"mouseup\", \"touchstart\", \"touchend\", \"click\"]\n\n/**\n * A layer's own dismiss affordance (a dialog overlay): pressing it dismisses\n * even when something stops the events, as Radix's dismissable surfaces.\n */\nexport const dismissableSurfaces = new Set<Element>()\n\nconst isOnDismissableSurface = (target: EventTarget | null) =>\n target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target))\n\n/**\n * Listeners for Reka's `pointerDownOutside` and `focusOutside`; `dismiss`\n * runs on the click that completes a deferred press. `reset` drops a pending\n * press (the layer closed some other way); unmounting does it too.\n */\nexport const useDeferredPointerDownOutside = (\n dismiss: (originalEvent: PointerEvent) => void,\n layer?: () => Element | null | undefined,\n) => {\n let stop: (() => void) | undefined\n\n\n // A touch press until its click (Reka reports it then), or a moment after it lifts without one (a long press).\n // With the layer known, a touch outside it holds every focus moving outside, as Radix's deferred press does;\n // without it, only the focus the touch gives to what it touched.\n let touch: { id: number; target: EventTarget | null; outside: boolean; timer?: number } | undefined\n const clearTouch = () => {\n if (touch?.timer !== undefined) window.clearTimeout(touch.timer)\n touch = undefined\n }\n const onTouchDown = (event: PointerEvent) => {\n clearTouch()\n if (event.pointerType !== \"touch\" || event.button !== 0) return\n const root = layer?.()\n if (root && event.target instanceof Node && root.contains(event.target)) return\n touch = { id: event.pointerId, target: event.target, outside: Boolean(root) }\n }\n const onTouchUp = (event: PointerEvent) => {\n if (touch?.id === event.pointerId) touch.timer = window.setTimeout(clearTouch, 1000)\n }\n const onTouchCancel = (event: PointerEvent) => {\n if (touch?.id === event.pointerId) clearTouch()\n }\n // After Reka's click listener has reported the touch\n const onTouchClick = () => {\n if (touch) window.setTimeout(clearTouch, 0)\n }\n // A press is over: the deferred one, and a touch still waiting for its click (the layer closed some other way)\n const reset = () => {\n stop?.()\n stop = undefined\n clearTouch()\n }\n\n let ownerDocument: Document | undefined\n onMounted(() => {\n ownerDocument = document\n ownerDocument.addEventListener(\"pointerdown\", onTouchDown, true)\n ownerDocument.addEventListener(\"pointerup\", onTouchUp, true)\n ownerDocument.addEventListener(\"pointercancel\", onTouchCancel, true)\n ownerDocument.addEventListener(\"click\", onTouchClick, true)\n })\n\n onBeforeUnmount(() => {\n reset()\n ownerDocument?.removeEventListener(\"pointerdown\", onTouchDown, true)\n ownerDocument?.removeEventListener(\"pointerup\", onTouchUp, true)\n ownerDocument?.removeEventListener(\"pointercancel\", onTouchCancel, true)\n ownerDocument?.removeEventListener(\"click\", onTouchClick, true)\n })\n\n const onPointerDownOutside = (event: OutsideEvent) => {\n reset()\n const originalEvent = event.detail.originalEvent\n if (originalEvent.button !== 0 || originalEvent.pointerType === \"touch\") return\n // Reka must not dismiss now\n event.preventDefault()\n\n const ownerDocument = (originalEvent.target as Node | null)?.ownerDocument ?? document\n const intercepted = new Map<string, boolean>()\n let active = true\n\n const finish = () => {\n if (!active) return\n const wasIntercepted = [...intercepted.values()].some(Boolean)\n reset()\n if (!wasIntercepted) dismiss(originalEvent)\n }\n const handleCapture = (evt: Event) => {\n if (!isOnDismissableSurface(evt.target)) intercepted.set(evt.type, true)\n // A click stopped on its way to the document still ends the press\n if (evt.type === \"click\") window.setTimeout(finish, 0)\n }\n const handleBubble = (evt: Event) => {\n intercepted.set(evt.type, false)\n }\n // Any later press replaces this one (Reka reports the outside ones again)\n const handlePointerDown = () => reset()\n const handlePointerCancel = (event: PointerEvent) => {\n if (event.pointerId === originalEvent.pointerId) reset()\n }\n\n for (const name of OUTSIDE_INTERACTION_EVENTS) {\n ownerDocument.addEventListener(name, handleCapture, true)\n ownerDocument.addEventListener(name, handleBubble)\n }\n // After the bubble listener, so a click that got here counts as not stopped\n ownerDocument.addEventListener(\"click\", finish)\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerDocument.addEventListener(\"pointercancel\", handlePointerCancel, true)\n\n stop = () => {\n active = false\n for (const name of OUTSIDE_INTERACTION_EVENTS) {\n ownerDocument.removeEventListener(name, handleCapture, true)\n ownerDocument.removeEventListener(name, handleBubble)\n }\n ownerDocument.removeEventListener(\"click\", finish)\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerDocument.removeEventListener(\"pointercancel\", handlePointerCancel, true)\n }\n }\n\n // Focus the pending touch gives to what it touched (or to the control around it) is that touch\n const focusedByTouch = (event: Event) => {\n if (touch?.outside) return true\n const focused = (event as CustomEvent<{ originalEvent?: FocusEvent }>).detail?.originalEvent?.target\n const touched = touch?.target\n return touched instanceof Node && focused instanceof Node && (touched.contains(focused) || focused.contains(touched))\n }\n\n const onFocusOutside = (event: Event) => {\n if (stop || focusedByTouch(event)) event.preventDefault()\n }\n\n return { onPointerDownOutside, onFocusOutside, reset }\n}\n"]}
|
|
@@ -558,7 +558,7 @@ const SelectPopoverContent = defineComponent({
|
|
|
558
558
|
name: "SelectPopoverContent",
|
|
559
559
|
setup() {
|
|
560
560
|
const { props, align, alignOffset, listWidth, listMaxWidth, pill } = useSelectContext();
|
|
561
|
-
const { handleRootOpenChange, popoverTriggerEl, open } = inject(CustomSelectContextKey);
|
|
561
|
+
const { handleRootOpenChange, popoverTriggerEl, open, selectContentRef } = inject(CustomSelectContextKey);
|
|
562
562
|
const floatingBoundary = useFloatingBoundary(() => open.value && props.avoidCollisions, { bottom: 30, top: 30 });
|
|
563
563
|
// Radix (1.8.1) dismisses on the click that follows a primary pointer down outside
|
|
564
564
|
const { onPointerDownOutside, onFocusOutside } = useDeferredPointerDownOutside((originalEvent) => {
|
|
@@ -566,7 +566,7 @@ const SelectPopoverContent = defineComponent({
|
|
|
566
566
|
if (popoverTriggerEl.value?.contains(originalEvent.target))
|
|
567
567
|
return;
|
|
568
568
|
handleRootOpenChange(false);
|
|
569
|
-
});
|
|
569
|
+
}, () => selectContentRef.value);
|
|
570
570
|
return () => h(RekaPopoverContent, {
|
|
571
571
|
forceMount: true,
|
|
572
572
|
as: SelectContentElement,
|