@plexui/vue 0.29.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/Dialog/Dialog.js +125 -16
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Page/Page.js +1 -1
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/RadioGroup/RadioGroup.js +3 -1
- package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +15 -8
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +12 -4
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/FloatingLabelInput/FloatingLabelInput.d.ts +1 -1
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts +2 -2
- package/dist/types/components/Page/Page.d.ts +7 -0
- package/dist/types/components/Textarea/Textarea.d.ts +1 -1
- package/dist/types/components/Toolbar/Toolbar.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GAKN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAsE,MAAM,uBAAuB,CAAA;AACvI,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,CAAC,MAAM,gDAAgD,CAAA;AA+B9D;;;;;GAKG;AACH,SAAS,eAAe,CAAC,OAAoB,EAAE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AE,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,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;YACxK,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n shallowRef,\n watch,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { barBackground, TOOLBAR_HOST, type BarBackground, type BarBackgroundAlias, 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`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type PageBarBackground = BarBackground | BarBackgroundAlias\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 /** Tells the bars that follow the scroll, such as a minimizing TabBar or a large title, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n /** A large Toolbar title asks for a place at the top of the content, where it scrolls with the content. */\n largeTitle: Ref<boolean>\n setLargeTitleSlot: (slot: unknown) => void\n /** The place of the bar's rows under a large title, which pins them under the bar. */\n largeTitleRowSlot: Ref<HTMLElement | null>\n setLargeTitleRowSlot: (slot: unknown) => void\n /** The rows under a large title are pinned under the bar, and their height, which the bar's background takes in. */\n titleRowsPinned: Ref<boolean>\n titleRowsHeight: Ref<number>\n}\n\n/**\n * Follows the rows of a large title's bar (Toolbar.Row) in the content. They stand under the title and, scrolled up to\n * the bar, stay under its controls (`position: sticky`): they are pinned once the sticky offset moves them off the\n * title's bottom, where they would stand. It reports that and their height, which the bar's background takes in. React's\n * twin.\n */\nfunction followTitleRows(content: HTMLElement, rows: HTMLElement, report: (pinned: boolean, height: number) => void) {\n let last = \"\"\n const update = () => {\n const height = rows.offsetHeight\n const title = rows.previousElementSibling\n const pinned = height > 0 && !!title && rows.getBoundingClientRect().top - title.getBoundingClientRect().bottom > 0.5\n if (`${pinned} ${height}` === last) return\n last = `${pinned} ${height}`\n report(pinned, height)\n }\n update()\n content.addEventListener(\"scroll\", update, { passive: true })\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(rows)\n observer?.observe(content)\n // The title changing its height (a subtitle shown or gone) moves the rows with no scroll (Codex #7).\n const title = rows.previousElementSibling\n if (title) observer?.observe(title)\n return () => {\n content.removeEventListener(\"scroll\", update)\n observer?.disconnect()\n report(false, 0)\n }\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 const setRoot = (node: unknown) => boundary.setRoot(node)\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 // A large Toolbar title lives in the content, where the browser scrolls it with the content and its overscroll;\n // PageContent keeps a place for it at its top while a title asks for one.\n const largeTitleRequests = ref(0)\n const largeTitle = computed(() => largeTitleRequests.value > 0)\n const largeTitleSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleSlot = (slot: unknown) => { largeTitleSlot.value = slot instanceof HTMLElement ? slot : null }\n const requestLargeTitleSlot = () => {\n largeTitleRequests.value += 1\n return () => { largeTitleRequests.value -= 1 }\n }\n // The bar's rows under a large title have a place of their own under it, which pins them under the bar once scrolled.\n const largeTitleRowSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleRowSlot = (slot: unknown) => { largeTitleRowSlot.value = slot instanceof HTMLElement ? slot : null }\n const titleRowsPinned = ref(false)\n const titleRowsHeight = ref(0)\n const context = {\n scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), notifyScroll, largeTitle,\n setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight,\n }\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 requestLargeTitleSlot,\n largeTitleSlot: computed(() => (largeTitle.value ? largeTitleSlot.value : null)),\n largeTitleRowSlot: computed(() => (largeTitle.value ? largeTitleRowSlot.value : null)),\n rowsPinned: computed(() => largeTitle.value && titleRowsPinned.value),\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 ...(titleRowsHeight.value > 0 ? { \"--page-toolbar-rows-height\": `${titleRowsHeight.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\": barBackground(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, notifyScroll, largeTitle, setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight } = 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 // The rows of a large title's bar pin under it once scrolled up to it.\n let stopRows: (() => void) | undefined\n watch([element, largeTitleRowSlot], ([content, rows]) => {\n stopRows?.()\n stopRows = content && rows\n ? followTitleRows(content, rows, (pinned, height) => { titleRowsPinned.value = pinned; titleRowsHeight.value = height })\n : undefined\n }, { flush: \"post\" })\n onBeforeUnmount(() => { stopRows?.(); stopRows = undefined })\n\n const onScroll = (event: Event) => {\n notifyScroll((event.currentTarget as HTMLElement).scrollTop)\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 }, [\n largeTitle.value ? h(\"div\", { ref: setLargeTitleSlot, class: s.LargeTitle }) : null,\n largeTitle.value ? h(\"div\", { ref: setLargeTitleRowSlot, class: s.LargeTitleRows }) : null,\n slots.default?.(),\n ])],\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\": barBackground(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,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GAKN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAsE,MAAM,uBAAuB,CAAA;AACvI,OAAO,EAAE,kBAAkB,EAAE,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AE,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,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;YACxK,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n shallowRef,\n watch,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { barBackground, TOOLBAR_HOST, type BarBackground, type BarBackgroundAlias, 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`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type PageBarBackground = BarBackground | BarBackgroundAlias\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 /** Tells the bars that follow the scroll, such as a minimizing TabBar or a large title, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n /** A large Toolbar title asks for a place at the top of the content, where it scrolls with the content. */\n largeTitle: Ref<boolean>\n setLargeTitleSlot: (slot: unknown) => void\n /** The place of the bar's rows under a large title, which pins them under the bar. */\n largeTitleRowSlot: Ref<HTMLElement | null>\n setLargeTitleRowSlot: (slot: unknown) => void\n /** The rows under a large title are pinned under the bar, and their height, which the bar's background takes in. */\n titleRowsPinned: Ref<boolean>\n titleRowsHeight: Ref<number>\n}\n\n/**\n * Follows the rows of a large title's bar (Toolbar.Row) in the content. They stand under the title and, scrolled up to\n * the bar, stay under its controls (`position: sticky`): they are pinned once the sticky offset moves them off the\n * title's bottom, where they would stand. It reports that and their height, which the bar's background takes in. React's\n * twin.\n */\nexport function followTitleRows(content: HTMLElement, rows: HTMLElement, report: (pinned: boolean, height: number) => void) {\n let last = \"\"\n const update = () => {\n const height = rows.offsetHeight\n const title = rows.previousElementSibling\n const pinned = height > 0 && !!title && rows.getBoundingClientRect().top - title.getBoundingClientRect().bottom > 0.5\n if (`${pinned} ${height}` === last) return\n last = `${pinned} ${height}`\n report(pinned, height)\n }\n update()\n content.addEventListener(\"scroll\", update, { passive: true })\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(rows)\n observer?.observe(content)\n // The title changing its height (a subtitle shown or gone) moves the rows with no scroll (Codex #7).\n const title = rows.previousElementSibling\n if (title) observer?.observe(title)\n return () => {\n content.removeEventListener(\"scroll\", update)\n observer?.disconnect()\n report(false, 0)\n }\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 const setRoot = (node: unknown) => boundary.setRoot(node)\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 // A large Toolbar title lives in the content, where the browser scrolls it with the content and its overscroll;\n // PageContent keeps a place for it at its top while a title asks for one.\n const largeTitleRequests = ref(0)\n const largeTitle = computed(() => largeTitleRequests.value > 0)\n const largeTitleSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleSlot = (slot: unknown) => { largeTitleSlot.value = slot instanceof HTMLElement ? slot : null }\n const requestLargeTitleSlot = () => {\n largeTitleRequests.value += 1\n return () => { largeTitleRequests.value -= 1 }\n }\n // The bar's rows under a large title have a place of their own under it, which pins them under the bar once scrolled.\n const largeTitleRowSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleRowSlot = (slot: unknown) => { largeTitleRowSlot.value = slot instanceof HTMLElement ? slot : null }\n const titleRowsPinned = ref(false)\n const titleRowsHeight = ref(0)\n const context = {\n scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), notifyScroll, largeTitle,\n setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight,\n }\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 requestLargeTitleSlot,\n largeTitleSlot: computed(() => (largeTitle.value ? largeTitleSlot.value : null)),\n largeTitleRowSlot: computed(() => (largeTitle.value ? largeTitleRowSlot.value : null)),\n rowsPinned: computed(() => largeTitle.value && titleRowsPinned.value),\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 ...(titleRowsHeight.value > 0 ? { \"--page-toolbar-rows-height\": `${titleRowsHeight.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\": barBackground(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, notifyScroll, largeTitle, setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight } = 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 // The rows of a large title's bar pin under it once scrolled up to it.\n let stopRows: (() => void) | undefined\n watch([element, largeTitleRowSlot], ([content, rows]) => {\n stopRows?.()\n stopRows = content && rows\n ? followTitleRows(content, rows, (pinned, height) => { titleRowsPinned.value = pinned; titleRowsHeight.value = height })\n : undefined\n }, { flush: \"post\" })\n onBeforeUnmount(() => { stopRows?.(); stopRows = undefined })\n\n const onScroll = (event: Event) => {\n notifyScroll((event.currentTarget as HTMLElement).scrollTop)\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 }, [\n largeTitle.value ? h(\"div\", { ref: setLargeTitleSlot, class: s.LargeTitle }) : null,\n largeTitle.value ? h(\"div\", { ref: setLargeTitleRowSlot, class: s.LargeTitleRows }) : null,\n slots.default?.(),\n ])],\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\": barBackground(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"]}
|
|
@@ -393,7 +393,9 @@ const RadioGroupItemComponent = defineComponent({
|
|
|
393
393
|
"data-orientation": props.orientation,
|
|
394
394
|
"onMousedown": handleLabelMouseDown,
|
|
395
395
|
}, [
|
|
396
|
-
|
|
396
|
+
// A Field row finds a lone radio by this attribute: a selector needs a feature on its subject, or a change of
|
|
397
|
+
// :only-child anywhere restyles that element's whole subtree
|
|
398
|
+
h("div", { "class": s.RadioIndicatorWrapper, "ref": wrapper, "data-radio-indicator": "" }, [
|
|
397
399
|
h(RovingFocusItem, { asChild: true, focusable: !isDisabled, active: isChecked }, {
|
|
398
400
|
default: () => h("button", {
|
|
399
401
|
"type": "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;IAC5E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAID,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AAEtE,sCAAsC;AACtC,MAAM,UAAU,GAAG,CAAC,UAAyB,EAAE,EAAE;IAC/C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAA;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AAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;4BAC1C,kBAAkB,EAAE,KAAK,CAAC,WAAW;yBACtC,EACD;4BACE,KAAK;4BACL,CAAC,CACC,MAAM,EACN,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAClG,WAAW,CACZ;yBACF,CACF;oBACH,CAAC,CAAC,KAAK;aACV,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAaF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string | null) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n // Reka's mouseup focus behavior is deliberately omitted.\n void _onMouseup\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selection, including `null` for none. Bind with `v-model:value`; leave undefined for an uncontrolled group. */\n value: { type: String as PropType<string | null>, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selection changed (`v-model:value`). Resetting an initially empty form reports `null`. */\n \"update:value\": (value: string | null) => value === null || typeof value === \"string\",\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (value: string | null) => value === null || typeof value === \"string\",\n },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string | null) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const listeners: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n let focusSelectionTimer: ReturnType<typeof setTimeout> | undefined\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n const radio = event.currentTarget\n if (!(radio instanceof HTMLButtonElement)) return\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n // Reka moves focus in nextTick, which a browser can flush before the\n // keydown reaches document. Check the arrow flag after that listener,\n // like Reka's RadioGroupItem, without selecting a radio the user left.\n focusSelectionTimer = setTimeout(() => {\n focusSelectionTimer = undefined\n if (isArrowKeyPressed && !disabled.value && radio.isConnected && radio.ownerDocument.activeElement === radio) {\n radio.click()\n }\n }, 0)\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const {\n \"class\": className,\n // These name the radio itself: a `Field` around the item labels it through them\n \"id\": idAttr,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...restAttrs\n } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = (idAttr as string | undefined) ?? `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const children = slots.default?.()\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-has-label\": hasContent(children) ? \"\" : undefined,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n h(\"div\", { class: s.RadioIndicatorWrapper, ref: wrapper }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": [descriptionId, ariaDescribedBy].filter(Boolean).join(\" \") || undefined,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }, [h(CheckMd, { class: s.Checkmark })]),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n children,\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;IAC5E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAID,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AAEtE,sCAAsC;AACtC,MAAM,UAAU,GAAG,CAAC,UAAyB,EAAE,EAAE;IAC/C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAA;IAChD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS,KAAK,iBAAiB;YAAE,OAAM;QAC3C,SAAS,CAAC,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AAkB,EAAE,KAAK,CAAC,WAAW;yBACtC,EACD;4BACE,KAAK;4BACL,CAAC,CACC,MAAM,EACN,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAClG,WAAW,CACZ;yBACF,CACF;oBACH,CAAC,CAAC,KAAK;aACV,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAaF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string | null) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n // Reka's mouseup focus behavior is deliberately omitted.\n void _onMouseup\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selection, including `null` for none. Bind with `v-model:value`; leave undefined for an uncontrolled group. */\n value: { type: String as PropType<string | null>, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selection changed (`v-model:value`). Resetting an initially empty form reports `null`. */\n \"update:value\": (value: string | null) => value === null || typeof value === \"string\",\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (value: string | null) => value === null || typeof value === \"string\",\n },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string | null) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const listeners: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n let focusSelectionTimer: ReturnType<typeof setTimeout> | undefined\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n const radio = event.currentTarget\n if (!(radio instanceof HTMLButtonElement)) return\n if (focusSelectionTimer !== undefined) clearTimeout(focusSelectionTimer)\n // Reka moves focus in nextTick, which a browser can flush before the\n // keydown reaches document. Check the arrow flag after that listener,\n // like Reka's RadioGroupItem, without selecting a radio the user left.\n focusSelectionTimer = setTimeout(() => {\n focusSelectionTimer = undefined\n if (isArrowKeyPressed && !disabled.value && radio.isConnected && radio.ownerDocument.activeElement === radio) {\n radio.click()\n }\n }, 0)\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const {\n \"class\": className,\n // These name the radio itself: a `Field` around the item labels it through them\n \"id\": idAttr,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...restAttrs\n } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = (idAttr as string | undefined) ?? `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const children = slots.default?.()\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-has-label\": hasContent(children) ? \"\" : undefined,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n // A Field row finds a lone radio by this attribute: a selector needs a feature on its subject, or a change of\n // :only-child anywhere restyles that element's whole subtree\n h(\"div\", { \"class\": s.RadioIndicatorWrapper, \"ref\": wrapper, \"data-radio-indicator\": \"\" }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": [descriptionId, ariaDescribedBy].filter(Boolean).join(\" \") || undefined,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }, [h(CheckMd, { class: s.Checkmark })]),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n children,\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
@@ -194,15 +194,17 @@ export const ToolbarRow = defineComponent({
|
|
|
194
194
|
setup(_, { slots, attrs }) {
|
|
195
195
|
const host = inject(TOOLBAR_HOST, null);
|
|
196
196
|
const titleStyle = inject(TOOLBAR_TITLE_STYLE, null);
|
|
197
|
-
|
|
197
|
+
// The rows go with the title: under it at the top of a page's content or a Sheet's body
|
|
198
|
+
const large = computed(() => titleStyle?.value === "large" && !!host?.requestLargeTitleSlot);
|
|
198
199
|
const slot = computed(() => (large.value ? host?.largeTitleRowSlot?.value ?? null : null));
|
|
199
200
|
let release;
|
|
200
|
-
onMounted(() => { if (large.value)
|
|
201
|
-
release = host?.requestLargeTitleSlot?.(); });
|
|
202
201
|
watch(large, (value) => {
|
|
203
202
|
release?.();
|
|
204
203
|
release = value ? host?.requestLargeTitleSlot?.() : undefined;
|
|
205
204
|
});
|
|
205
|
+
// A watch that ran first has asked already (Codex #68)
|
|
206
|
+
onMounted(() => { if (large.value && !release)
|
|
207
|
+
release = host?.requestLargeTitleSlot?.(); });
|
|
206
208
|
onBeforeUnmount(() => release?.());
|
|
207
209
|
const element = ref(null);
|
|
208
210
|
const anchor = ref(null);
|
|
@@ -215,9 +217,12 @@ export const ToolbarRow = defineComponent({
|
|
|
215
217
|
return () => {
|
|
216
218
|
const place = slot.value;
|
|
217
219
|
const row = h("div", { ...attrs, "ref": element, "class": [s.Row, attrs.class], "data-toolbar-row": "", "data-in-content": place ? "" : undefined }, slots.default?.());
|
|
218
|
-
// Under a large title the row waits for its place in the content, as React's does
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
// Under a large title the row waits for its place in the content, as React's does; a host with no content to
|
|
221
|
+
// keep the title in (a Sheet without a body) keeps it in the bar.
|
|
222
|
+
if (large.value && place)
|
|
223
|
+
return [h(Teleport, { to: place }, [row]), h("span", { "ref": anchor, "data-toolbar-row-anchor": "", "hidden": true })];
|
|
224
|
+
if (large.value && host?.holdsLargeTitle?.value !== false)
|
|
225
|
+
return null;
|
|
221
226
|
return row;
|
|
222
227
|
};
|
|
223
228
|
},
|
|
@@ -252,10 +257,12 @@ export const ToolbarTitle = defineComponent({
|
|
|
252
257
|
const titleStyle = inject(TOOLBAR_TITLE_STYLE, null);
|
|
253
258
|
const bar = inject(TOOLBAR_ELEMENT, null);
|
|
254
259
|
const heading = ref(null);
|
|
255
|
-
|
|
260
|
+
// A page, and a Dialog with its body, keep the title at the top of their content
|
|
261
|
+
const large = computed(() => titleStyle?.value === "large" && !!host?.requestLargeTitleSlot);
|
|
256
262
|
const slot = computed(() => (large.value ? host?.largeTitleSlot?.value ?? null : null));
|
|
257
263
|
let release;
|
|
258
|
-
|
|
264
|
+
// A watch that ran first has asked already (Codex #68)
|
|
265
|
+
onMounted(() => { if (large.value && !release)
|
|
259
266
|
release = host?.requestLargeTitleSlot?.(); });
|
|
260
267
|
watch(large, (value) => {
|
|
261
268
|
release?.();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,QAAQ,EACR,KAAK,GAMN,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,sDAAsD,CAAA;AA8BpE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAyC,EAA6B,EAAE,CACpG,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAA;AAyB/E,MAAM,CAAC,MAAM,YAAY,GAA8B,MAAM,CAAC,aAAa,CAAC,CAAA;AAE5E,2G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ent":["import {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n Teleport,\n watch,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\n// Vue port of packages/ui/src/components/Toolbar/Toolbar.tsx. Exports are flat\n// (`ToolbarLeading` for `Toolbar.Leading`, ...).\n\nexport type ToolbarPlacement = \"top\" | \"bottom\"\n/** Title layouts of the phone top bar. */\nexport type ToolbarTitleStyle = \"inline\" | \"large\" | \"compact-large\" | \"compact-medium\"\nexport type ToolbarTitleAlign = \"center\" | \"start\"\n/**\n * How a bar meets the content scrolled under it, after the scroll edge effect of iOS 26:\n * - `\"soft\"` (the default of a bottom bar): at the top, once content is under the bar, a blur that grows toward the top under a\n * thin veil of the canvas color, with no line, which lets go past the bar; at the bottom of a page the content stays clear\n * under and around the controls, as on native iOS 26, and a Sheet's bottom bar fades its content into the panel\n * - `\"hard\"`: an opaque bar of the canvas color with a hairline once content is under it\n * - `\"glass\"` (the default of a top bar): a translucent, blurred bar with a hairline, shown once content is under it\n * - `\"blur\"`: no fill and no line, once content is under the bar: the content blurred a little over the bar and past it,\n * and heavily toward the screen's edge\n *\n * iOS 27.2 has two scroll edges, soft and hard; glass is the bar of earlier iOS and blur an app's own.\n */\nexport type BarBackground = \"soft\" | \"hard\" | \"glass\" | \"blur\"\n/**\n * `\"solid\"` is the earlier name of `\"hard\"`: iOS has no opaque bar without a line, and it draws the line of a hard edge\n * only once content is under the bar, so at rest the two look the same.\n */\nexport type BarBackgroundAlias = \"solid\"\n/** `\"edge\"` is the earlier name of `\"soft\"`, `\"solid\"` of `\"hard\"`. */\nexport type ToolbarBackground = BarBackground | BarBackgroundAlias | \"edge\"\n\n/** The background a bar draws, from its current name or an earlier one. */\nexport const barBackground = (background: ToolbarBackground | undefined): BarBackground | undefined =>\n background === \"edge\" ? \"soft\" : background === \"solid\" ? \"hard\" : background\n\n/**\n * A surface that places phone toolbars: `Page` puts the top bar over its content\n * and reserves the space; `Dialog` puts it 16px under the Sheet's top edge.\n */\nexport type ToolbarHost = {\n kind: \"page\" | \"dialog\"\n setHeight?: (placement: ToolbarPlacement, height: number | undefined) => void\n /** Content has scrolled under the top bar, so its glass casts a shadow and a hard or glass bar shows its line. */\n scrolled?: Ref<boolean>\n /** Content continues under the bottom bar, so a hard or glass bar shows its line. */\n contentBelow?: Ref<boolean>\n /** Calls the listener with the content's scroll offset on every scroll; returns the unsubscribe. A TabBar minimizes with it. */\n subscribeScroll?: (listener: (scrollTop: number) => void) => () => void\n /** A large title asks for a place in the content; returns the release. */\n requestLargeTitleSlot?: () => () => void\n /** The place at the top of the content where a large title scrolls with it, once the content has made one. */\n largeTitleSlot?: Ref<HTMLElement | null>\n /** The place under a large title where the bar's rows stand, pinned under the bar once scrolled up to it. */\n largeTitleRowSlot?: Ref<HTMLElement | null>\n /** The rows under a large title are pinned under the bar, so its background reaches under them. */\n rowsPinned?: Ref<boolean>\n}\n\nexport const TOOLBAR_HOST: InjectionKey<ToolbarHost> = Symbol(\"ToolbarHost\")\n\n// The title style of the top bar, which a large title on a page needs to show itself inline once scrolled.\nconst TOOLBAR_TITLE_STYLE: InjectionKey<ComputedRef<ToolbarTitleStyle | undefined>> = Symbol(\"ToolbarTitleStyle\")\n// The bar itself, which a large title in the content marks once it has gone under the bar.\nconst TOOLBAR_ELEMENT: InjectionKey<Ref<HTMLElement | null>> = Symbol(\"ToolbarElement\")\n\n// The tokens of a large title a bar can set for itself, which the title in the content no longer inherits from it.\nconst LARGE_TITLE_TOKENS = [\n \"--toolbar-padding-bottom\",\n \"--toolbar-large-title-gap\",\n \"--toolbar-large-title-font-size\",\n \"--toolbar-large-title-line-height\",\n \"--toolbar-large-title-descent\",\n \"--toolbar-large-subtitle-font-size\",\n \"--toolbar-large-subtitle-line-height\",\n \"--toolbar-large-subtitle-descent\",\n]\n\n/**\n * Follows a large title in the content: it takes the large title tokens the bar sets for itself, and once its last line\n * is at the bar's bottom the bar shows it inline. Scrolling moves it; a change of layout (a wide window turning into a\n * phone's, which shows the bar and the title) or of a class or style on the bar, the content or around them measures it\n * again. A token the bar shares with the content stays inherited, so it follows the page's changes. A hidden title has\n * not gone under anything.\n */\nfunction followLargeTitle(bar: HTMLElement, heading: HTMLElement, subscribeScroll: (listener: () => void) => () => void) {\n const collapse = () => {\n const box = heading.getBoundingClientRect()\n bar.toggleAttribute(\"data-title-collapsed\", box.height > 0 && box.bottom <= bar.getBoundingClientRect().bottom)\n }\n const layout = () => {\n const own = getComputedStyle(bar)\n const place = heading.parentElement ? getComputedStyle(heading.parentElement) : undefined\n for (const token of LARGE_TITLE_TOKENS) {\n const value = own.getPropertyValue(token).trim()\n if (value && value !== place?.getPropertyValue(token).trim()) heading.style.setProperty(token, value)\n else heading.style.removeProperty(token)\n }\n collapse()\n }\n layout()\n const unsubscribe = subscribeScroll(collapse)\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(layout) : undefined\n observer?.observe(bar)\n observer?.observe(heading)\n const mutations = typeof MutationObserver !== \"undefined\" ? new MutationObserver(layout) : undefined\n // A token reaches the bar or the content from the class or style of either or of anything around them.\n for (const start of [bar, heading.parentElement]) {\n for (let node = start; node; node = node.parentElement) mutations?.observe(node, { attributes: true, attributeFilter: [\"class\", \"style\"] })\n }\n return () => {\n unsubscribe()\n observer?.disconnect()\n mutations?.disconnect()\n bar.removeAttribute(\"data-title-collapsed\")\n for (const token of LARGE_TITLE_TOKENS) heading.style.removeProperty(token)\n }\n}\n\nconst ToolbarComponent = defineComponent({\n name: \"Toolbar\",\n props: {\n /** @default \"top\" */\n placement: { type: String as PropType<ToolbarPlacement>, default: \"top\" },\n /** Layout of `ToolbarTitle` in a top bar. @default \"inline\" */\n titleStyle: { type: String as PropType<ToolbarTitleStyle>, default: \"inline\" },\n /** Alignment of an inline title. Compact and large titles always start at the leading edge. @default \"center\" */\n titleAlign: { type: String as PropType<ToolbarTitleAlign>, default: \"center\" },\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" at the top, \"soft\" at the bottom */\n background: { type: String as PropType<ToolbarBackground>, default: undefined },\n },\n setup(props, { slots }) {\n const host = inject(TOOLBAR_HOST, null)\n provide(TOOLBAR_TITLE_STYLE, computed(() => (props.placement === \"top\" ? props.titleStyle : undefined)))\n const element = ref<HTMLElement | null>(null)\n provide(TOOLBAR_ELEMENT, element)\n let observer: ResizeObserver | undefined\n let reported: ToolbarPlacement | undefined\n onMounted(() => {\n const bar = element.value\n const setHeight = host?.setHeight\n if (!bar || !setHeight) return\n // A desktop layout hides the bar; its height then leaves the host's own header in charge.\n const update = () => {\n if (reported && reported !== props.placement) setHeight(reported, undefined)\n reported = props.placement\n setHeight(props.placement, bar.offsetHeight || undefined)\n }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(bar, { box: \"border-box\" })\n })\n onBeforeUnmount(() => {\n observer?.disconnect()\n if (reported) host?.setHeight?.(reported, undefined)\n })\n return () => h(\"div\", {\n \"ref\": element,\n \"class\": s.Toolbar,\n \"data-toolbar\": \"\",\n \"data-placement\": props.placement,\n \"data-title-style\": props.placement === \"top\" ? props.titleStyle : undefined,\n \"data-title-align\": props.placement === \"top\" ? props.titleAlign : undefined,\n \"data-background\": barBackground(props.background) ?? (props.placement === \"bottom\" ? \"soft\" : \"glass\"),\n \"data-host\": host?.kind,\n \"data-scrolled\": props.placement === \"top\" && host?.scrolled?.value ? \"\" : undefined,\n \"data-content-below\": props.placement === \"bottom\" && host?.contentBelow?.value ? \"\" : undefined,\n \"data-rows-pinned\": props.placement === \"top\" && host?.rowsPinned?.value ? \"\" : undefined,\n }, slots.default?.())\n },\n})\n\n/** Props of `Toolbar`. */\nexport type ToolbarProps = {\n placement?: ToolbarPlacement\n titleStyle?: ToolbarTitleStyle\n titleAlign?: ToolbarTitleAlign\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" at the top, \"soft\" at the bottom */\n background?: ToolbarBackground\n} & HTMLAttributes\n\n/** A phone toolbar, top or bottom. It never renders at the desktop breakpoint. */\nexport const Toolbar = ToolbarComponent as typeof ToolbarComponent & { new (): { $props: ToolbarProps } }\n\nfunction part(name: string, className: string, role?: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(\"div\", { class: className, role }, slots.default?.())\n },\n })\n}\n\n/** Items at the leading edge (React `Toolbar.Leading`). */\nexport const ToolbarLeading = part(\"ToolbarLeading\", s.Leading)\n/** Items at the trailing edge (React `Toolbar.Trailing`). */\nexport const ToolbarTrailing = part(\"ToolbarTrailing\", s.Trailing)\n/** Buttons that share one capsule (React `Toolbar.Group`). */\nexport const ToolbarGroup = part(\"ToolbarGroup\", s.Group, \"group\")\nconst rowOfAnchor = new WeakMap<Element, HTMLElement>()\n\n/**\n * Under a large title each row is portaled into the rows' place as it mounts, so a row that comes later (a search field\n * shown over a segmented control already there) would stand last. An empty anchor in the bar keeps the row's place among\n * the bar's rows, and the rows are moved into that order in the content, so the keyboard and a screen reader meet them\n * as they stand (Codex #7); a row added or removed in the bar orders them again.\n * (React's twin)\n */\nfunction followRowOrder(anchor: HTMLElement, row: HTMLElement) {\n const bar = anchor.closest(\"[data-toolbar]\") ?? anchor.parentElement\n if (!bar) return () => {}\n rowOfAnchor.set(anchor, row)\n const place = () => {\n const slot = row.parentElement\n if (!slot) return\n const rows = Array.from(bar.querySelectorAll(\"[data-toolbar-row-anchor]\"), (mark) => rowOfAnchor.get(mark))\n .filter((each): each is HTMLElement => each?.parentElement === slot)\n // From the last row back, a row that does not stand before the next one goes right before it: only a row out of\n // place moves (the one that came later), so a field focused in another row keeps its focus (Codex #8); moveBefore,\n // where the browser has it, keeps it even in the row that moves.\n const move = (slot as HTMLElement & { moveBefore?: (node: Node, child: Node | null) => void }).moveBefore\n for (let index = rows.length - 2; index >= 0; index--) {\n const each = rows[index]\n const next = rows[index + 1]\n if (each.compareDocumentPosition(next) & Node.DOCUMENT_POSITION_FOLLOWING) continue\n try {\n if (move) {\n move.call(slot, each, next)\n continue\n }\n } catch {\n // falls back to a plain move\n }\n slot.insertBefore(each, next)\n }\n }\n place()\n const observer = typeof MutationObserver !== \"undefined\" ? new MutationObserver(place) : undefined\n observer?.observe(bar, { childList: true, subtree: true })\n return () => {\n observer?.disconnect()\n rowOfAnchor.delete(anchor)\n }\n}\n\n/**\n * A row under the controls, part of the bar: a segmented control that switches the screen's views (a chat list's\n * folders under its bar), or a search field. It spans the bar, and a control in it fills the row; several rows stand in\n * their order (a search field over a segmented control). Under a large title on a page the rows stand under the title,\n * at the top of the content, and once scrolled up to the bar they stay pinned under its controls, as iOS 27.2 pins a\n * safeAreaBar under a large title's bar (React `Toolbar.Row`).\n */\nexport const ToolbarRow = defineComponent({\n name: \"ToolbarRow\",\n inheritAttrs: false,\n setup(_, { slots, attrs }) {\n const host = inject(TOOLBAR_HOST, null)\n const titleStyle = inject(TOOLBAR_TITLE_STYLE, null)\n const large = computed(() => titleStyle?.value === \"large\" && host?.kind === \"page\")\n const slot = computed(() => (large.value ? host?.largeTitleRowSlot?.value ?? null : null))\n let release: (() => void) | undefined\n onMounted(() => { if (large.value) release = host?.requestLargeTitleSlot?.() })\n watch(large, (value) => {\n release?.()\n release = value ? host?.requestLargeTitleSlot?.() : undefined\n })\n onBeforeUnmount(() => release?.())\n const element = ref<HTMLElement | null>(null)\n const anchor = ref<HTMLElement | null>(null)\n let stopOrder: (() => void) | undefined\n watch([slot, element, anchor], ([place, row, mark]) => {\n stopOrder?.()\n stopOrder = place && row && mark ? followRowOrder(mark, row) : undefined\n }, { flush: \"post\" })\n onBeforeUnmount(() => { stopOrder?.(); stopOrder = undefined })\n return () => {\n const place = slot.value\n const row = h(\"div\", { ...attrs, \"ref\": element, \"class\": [s.Row, attrs.class], \"data-toolbar-row\": \"\", \"data-in-content\": place ? \"\" : undefined }, slots.default?.())\n // Under a large title the row waits for its place in the content, as React's does.\n if (large.value) return place ? [h(Teleport, { to: place }, [row]), h(\"span\", { \"ref\": anchor, \"data-toolbar-row-anchor\": \"\", \"hidden\": true })] : null\n return row\n }\n },\n})\n\n/** Custom middle content: a search field, a segmented control or a single centered action (React `Toolbar.Content`). */\nexport const ToolbarContent = defineComponent({\n name: \"ToolbarContent\",\n props: {\n /** Stretch between the leading and trailing items, as a search field does. */\n fill: { type: Boolean, default: false },\n },\n setup(props, { slots }) {\n return () => h(\"div\", { \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined }, slots.default?.())\n },\n})\n\n/** The bar title, with an optional second line (React `Toolbar.Title`). */\nexport const ToolbarTitle = defineComponent({\n name: \"ToolbarTitle\",\n inheritAttrs: false,\n props: {\n /** A second, smaller line below the title. The `subtitle` slot takes precedence. */\n subtitle: { type: String, default: undefined },\n /**\n * Heading level. In a Dialog the dialog's own title names the Sheet, so the bar title is hidden\n * from assistive technology there.\n * @default \"h1\"\n */\n as: { type: String as PropType<\"h1\" | \"h2\" | \"h3\">, default: \"h1\" },\n },\n setup(props, { slots, attrs }) {\n const host = inject(TOOLBAR_HOST, null)\n const titleStyle = inject(TOOLBAR_TITLE_STYLE, null)\n const bar = inject(TOOLBAR_ELEMENT, null)\n const heading = ref<HTMLElement | null>(null)\n const large = computed(() => titleStyle?.value === \"large\" && host?.kind === \"page\")\n const slot = computed(() => (large.value ? host?.largeTitleSlot?.value ?? null : null))\n let release: (() => void) | undefined\n onMounted(() => { if (large.value) release = host?.requestLargeTitleSlot?.() })\n watch(large, (value) => {\n release?.()\n release = value ? host?.requestLargeTitleSlot?.() : undefined\n })\n // In the content the title scrolls with it, on the compositor and through the overscroll, as on iOS 26. Once it has\n // gone under the bar (its last line at the bar's bottom), the bar shows it inline and a hard or glass bar its line.\n // It starts once mounted too: a bar replaced under a page that keeps its content finds the place already there.\n let stopFollowing: (() => void) | undefined\n const follow = () => {\n stopFollowing?.()\n stopFollowing = undefined\n const element = bar?.value\n const title = heading.value\n if (!slot.value || !element || !title || !host?.subscribeScroll) return\n stopFollowing = followLargeTitle(element, title, host.subscribeScroll)\n }\n onMounted(follow)\n watch([slot, () => bar?.value], follow, { flush: \"post\" })\n onBeforeUnmount(() => { stopFollowing?.(); release?.() })\n return () => {\n // An empty subtitle, from the prop or a slot that renders nothing, leaves the title on one line, as in React.\n const present = (value: unknown) => (Array.isArray(value) ? value.length > 0 : value != null && value !== \"\")\n const subtitle = slots.subtitle?.() ?? props.subtitle\n const place = slot.value\n const title = h(\"div\", { \"ref\": heading, \"class\": s.Heading, \"aria-hidden\": host?.kind === \"dialog\" ? \"true\" : undefined, \"data-in-content\": place ? \"\" : undefined }, [\n h(props.as, { ...attrs, class: [s.Title, attrs.class] }, slots.default?.()),\n present(subtitle) ? h(\"p\", { class: s.Subtitle }, subtitle) : null,\n ])\n if (!large.value) return title\n // Until the content has made its place (a server-rendered page before it hydrates), the title stands in the bar\n // where it will stand in the content. The inline copy the row of controls shows once the large title has gone\n // under it keeps a subtitle as a second line, as in the inline title (iOS 26 kit Toolbar - Top - iPhone, Title 2 Line).\n const copySubtitle = slots.subtitle?.() ?? props.subtitle\n const copy = present(copySubtitle)\n ? [h(\"span\", { class: s.CollapsedLine }, slots.default?.()), h(\"span\", { class: s.CollapsedSubtitle }, copySubtitle)]\n : slots.default?.()\n return [h(Teleport, { to: place ?? \"body\", disabled: !place }, [title]), h(\"span\", { \"class\": s.CollapsedTitle, \"aria-hidden\": \"true\" }, copy)]\n }\n },\n})\n"]}
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,QAAQ,EACR,KAAK,GAMN,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,sDAAsD,CAAA;AA8BpE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,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C,CAAC,iBAAiB,EAAE,EAAE,YAAY,CAAC,CAAC;gBACrH,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAA;YACrB,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,CAAA;QACjJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n Teleport,\n watch,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\n// Vue port of packages/ui/src/components/Toolbar/Toolbar.tsx. Exports are flat\n// (`ToolbarLeading` for `Toolbar.Leading`, ...).\n\nexport type ToolbarPlacement = \"top\" | \"bottom\"\n/** Title layouts of the phone top bar. */\nexport type ToolbarTitleStyle = \"inline\" | \"large\" | \"compact-large\" | \"compact-medium\"\nexport type ToolbarTitleAlign = \"center\" | \"start\"\n/**\n * How a bar meets the content scrolled under it, after the scroll edge effect of iOS 26:\n * - `\"soft\"` (the default of a bottom bar): at the top, once content is under the bar, a blur that grows toward the top under a\n * thin veil of the canvas color, with no line, which lets go past the bar; at the bottom of a page the content stays clear\n * under and around the controls, as on native iOS 26, and a Sheet's bottom bar fades its content into the panel\n * - `\"hard\"`: an opaque bar of the canvas color with a hairline once content is under it\n * - `\"glass\"` (the default of a top bar): a translucent, blurred bar with a hairline, shown once content is under it\n * - `\"blur\"`: no fill and no line, once content is under the bar: the content blurred a little over the bar and past it,\n * and heavily toward the screen's edge\n *\n * iOS 27.2 has two scroll edges, soft and hard; glass is the bar of earlier iOS and blur an app's own.\n */\nexport type BarBackground = \"soft\" | \"hard\" | \"glass\" | \"blur\"\n/**\n * `\"solid\"` is the earlier name of `\"hard\"`: iOS has no opaque bar without a line, and it draws the line of a hard edge\n * only once content is under the bar, so at rest the two look the same.\n */\nexport type BarBackgroundAlias = \"solid\"\n/** `\"edge\"` is the earlier name of `\"soft\"`, `\"solid\"` of `\"hard\"`. */\nexport type ToolbarBackground = BarBackground | BarBackgroundAlias | \"edge\"\n\n/** The background a bar draws, from its current name or an earlier one. */\nexport const barBackground = (background: ToolbarBackground | undefined): BarBackground | undefined =>\n background === \"edge\" ? \"soft\" : background === \"solid\" ? \"hard\" : background\n\n/**\n * A surface that places phone toolbars: `Page` puts the top bar over its content\n * and reserves the space; `Dialog` puts it 16px under the Sheet's top edge.\n */\nexport type ToolbarHost = {\n kind: \"page\" | \"dialog\"\n setHeight?: (placement: ToolbarPlacement, height: number | undefined) => void\n /** Content has scrolled under the top bar, so its glass casts a shadow and a hard or glass bar shows its line. */\n scrolled?: Ref<boolean>\n /** Content continues under the bottom bar, so a hard or glass bar shows its line. */\n contentBelow?: Ref<boolean>\n /** Calls the listener with the content's scroll offset on every scroll; returns the unsubscribe. A TabBar minimizes with it. */\n subscribeScroll?: (listener: (scrollTop: number) => void) => () => void\n /** A large title asks for a place in the content; returns the release. */\n requestLargeTitleSlot?: () => () => void\n /** The place at the top of the content where a large title scrolls with it, once the content has made one. */\n largeTitleSlot?: Ref<HTMLElement | null>\n /** The place under a large title where the bar's rows stand, pinned under the bar once scrolled up to it. */\n largeTitleRowSlot?: Ref<HTMLElement | null>\n /** The rows under a large title are pinned under the bar, so its background reaches under them. */\n rowsPinned?: Ref<boolean>\n /**\n * `false` while the host has no content to keep a large title in (a Dialog without DialogBody): the title and its\n * rows stay in the bar. Otherwise the rows wait for their place, so they mount once, there.\n */\n holdsLargeTitle?: Ref<boolean>\n}\n\nexport const TOOLBAR_HOST: InjectionKey<ToolbarHost> = Symbol(\"ToolbarHost\")\n\n// The title style of the top bar, which a large title on a page needs to show itself inline once scrolled.\nconst TOOLBAR_TITLE_STYLE: InjectionKey<ComputedRef<ToolbarTitleStyle | undefined>> = Symbol(\"ToolbarTitleStyle\")\n// The bar itself, which a large title in the content marks once it has gone under the bar.\nconst TOOLBAR_ELEMENT: InjectionKey<Ref<HTMLElement | null>> = Symbol(\"ToolbarElement\")\n\n// The tokens of a large title a bar can set for itself, which the title in the content no longer inherits from it.\nconst LARGE_TITLE_TOKENS = [\n \"--toolbar-padding-bottom\",\n \"--toolbar-large-title-gap\",\n \"--toolbar-large-title-font-size\",\n \"--toolbar-large-title-line-height\",\n \"--toolbar-large-title-descent\",\n \"--toolbar-large-subtitle-font-size\",\n \"--toolbar-large-subtitle-line-height\",\n \"--toolbar-large-subtitle-descent\",\n]\n\n/**\n * Follows a large title in the content: it takes the large title tokens the bar sets for itself, and once its last line\n * is at the bar's bottom the bar shows it inline. Scrolling moves it; a change of layout (a wide window turning into a\n * phone's, which shows the bar and the title) or of a class or style on the bar, the content or around them measures it\n * again. A token the bar shares with the content stays inherited, so it follows the page's changes. A hidden title has\n * not gone under anything.\n */\nfunction followLargeTitle(bar: HTMLElement, heading: HTMLElement, subscribeScroll: (listener: () => void) => () => void) {\n const collapse = () => {\n const box = heading.getBoundingClientRect()\n bar.toggleAttribute(\"data-title-collapsed\", box.height > 0 && box.bottom <= bar.getBoundingClientRect().bottom)\n }\n const layout = () => {\n const own = getComputedStyle(bar)\n const place = heading.parentElement ? getComputedStyle(heading.parentElement) : undefined\n for (const token of LARGE_TITLE_TOKENS) {\n const value = own.getPropertyValue(token).trim()\n if (value && value !== place?.getPropertyValue(token).trim()) heading.style.setProperty(token, value)\n else heading.style.removeProperty(token)\n }\n collapse()\n }\n layout()\n const unsubscribe = subscribeScroll(collapse)\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(layout) : undefined\n observer?.observe(bar)\n observer?.observe(heading)\n const mutations = typeof MutationObserver !== \"undefined\" ? new MutationObserver(layout) : undefined\n // A token reaches the bar or the content from the class or style of either or of anything around them.\n for (const start of [bar, heading.parentElement]) {\n for (let node = start; node; node = node.parentElement) mutations?.observe(node, { attributes: true, attributeFilter: [\"class\", \"style\"] })\n }\n return () => {\n unsubscribe()\n observer?.disconnect()\n mutations?.disconnect()\n bar.removeAttribute(\"data-title-collapsed\")\n for (const token of LARGE_TITLE_TOKENS) heading.style.removeProperty(token)\n }\n}\n\nconst ToolbarComponent = defineComponent({\n name: \"Toolbar\",\n props: {\n /** @default \"top\" */\n placement: { type: String as PropType<ToolbarPlacement>, default: \"top\" },\n /** Layout of `ToolbarTitle` in a top bar. @default \"inline\" */\n titleStyle: { type: String as PropType<ToolbarTitleStyle>, default: \"inline\" },\n /** Alignment of an inline title. Compact and large titles always start at the leading edge. @default \"center\" */\n titleAlign: { type: String as PropType<ToolbarTitleAlign>, default: \"center\" },\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" at the top, \"soft\" at the bottom */\n background: { type: String as PropType<ToolbarBackground>, default: undefined },\n },\n setup(props, { slots }) {\n const host = inject(TOOLBAR_HOST, null)\n provide(TOOLBAR_TITLE_STYLE, computed(() => (props.placement === \"top\" ? props.titleStyle : undefined)))\n const element = ref<HTMLElement | null>(null)\n provide(TOOLBAR_ELEMENT, element)\n let observer: ResizeObserver | undefined\n let reported: ToolbarPlacement | undefined\n onMounted(() => {\n const bar = element.value\n const setHeight = host?.setHeight\n if (!bar || !setHeight) return\n // A desktop layout hides the bar; its height then leaves the host's own header in charge.\n const update = () => {\n if (reported && reported !== props.placement) setHeight(reported, undefined)\n reported = props.placement\n setHeight(props.placement, bar.offsetHeight || undefined)\n }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(bar, { box: \"border-box\" })\n })\n onBeforeUnmount(() => {\n observer?.disconnect()\n if (reported) host?.setHeight?.(reported, undefined)\n })\n return () => h(\"div\", {\n \"ref\": element,\n \"class\": s.Toolbar,\n \"data-toolbar\": \"\",\n \"data-placement\": props.placement,\n \"data-title-style\": props.placement === \"top\" ? props.titleStyle : undefined,\n \"data-title-align\": props.placement === \"top\" ? props.titleAlign : undefined,\n \"data-background\": barBackground(props.background) ?? (props.placement === \"bottom\" ? \"soft\" : \"glass\"),\n \"data-host\": host?.kind,\n \"data-scrolled\": props.placement === \"top\" && host?.scrolled?.value ? \"\" : undefined,\n \"data-content-below\": props.placement === \"bottom\" && host?.contentBelow?.value ? \"\" : undefined,\n \"data-rows-pinned\": props.placement === \"top\" && host?.rowsPinned?.value ? \"\" : undefined,\n }, slots.default?.())\n },\n})\n\n/** Props of `Toolbar`. */\nexport type ToolbarProps = {\n placement?: ToolbarPlacement\n titleStyle?: ToolbarTitleStyle\n titleAlign?: ToolbarTitleAlign\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" at the top, \"soft\" at the bottom */\n background?: ToolbarBackground\n} & HTMLAttributes\n\n/** A phone toolbar, top or bottom. It never renders at the desktop breakpoint. */\nexport const Toolbar = ToolbarComponent as typeof ToolbarComponent & { new (): { $props: ToolbarProps } }\n\nfunction part(name: string, className: string, role?: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(\"div\", { class: className, role }, slots.default?.())\n },\n })\n}\n\n/** Items at the leading edge (React `Toolbar.Leading`). */\nexport const ToolbarLeading = part(\"ToolbarLeading\", s.Leading)\n/** Items at the trailing edge (React `Toolbar.Trailing`). */\nexport const ToolbarTrailing = part(\"ToolbarTrailing\", s.Trailing)\n/** Buttons that share one capsule (React `Toolbar.Group`). */\nexport const ToolbarGroup = part(\"ToolbarGroup\", s.Group, \"group\")\nconst rowOfAnchor = new WeakMap<Element, HTMLElement>()\n\n/**\n * Under a large title each row is portaled into the rows' place as it mounts, so a row that comes later (a search field\n * shown over a segmented control already there) would stand last. An empty anchor in the bar keeps the row's place among\n * the bar's rows, and the rows are moved into that order in the content, so the keyboard and a screen reader meet them\n * as they stand (Codex #7); a row added or removed in the bar orders them again.\n * (React's twin)\n */\nfunction followRowOrder(anchor: HTMLElement, row: HTMLElement) {\n const bar = anchor.closest(\"[data-toolbar]\") ?? anchor.parentElement\n if (!bar) return () => {}\n rowOfAnchor.set(anchor, row)\n const place = () => {\n const slot = row.parentElement\n if (!slot) return\n const rows = Array.from(bar.querySelectorAll(\"[data-toolbar-row-anchor]\"), (mark) => rowOfAnchor.get(mark))\n .filter((each): each is HTMLElement => each?.parentElement === slot)\n // From the last row back, a row that does not stand before the next one goes right before it: only a row out of\n // place moves (the one that came later), so a field focused in another row keeps its focus (Codex #8); moveBefore,\n // where the browser has it, keeps it even in the row that moves.\n const move = (slot as HTMLElement & { moveBefore?: (node: Node, child: Node | null) => void }).moveBefore\n for (let index = rows.length - 2; index >= 0; index--) {\n const each = rows[index]\n const next = rows[index + 1]\n if (each.compareDocumentPosition(next) & Node.DOCUMENT_POSITION_FOLLOWING) continue\n try {\n if (move) {\n move.call(slot, each, next)\n continue\n }\n } catch {\n // falls back to a plain move\n }\n slot.insertBefore(each, next)\n }\n }\n place()\n const observer = typeof MutationObserver !== \"undefined\" ? new MutationObserver(place) : undefined\n observer?.observe(bar, { childList: true, subtree: true })\n return () => {\n observer?.disconnect()\n rowOfAnchor.delete(anchor)\n }\n}\n\n/**\n * A row under the controls, part of the bar: a segmented control that switches the screen's views (a chat list's\n * folders under its bar), or a search field. It spans the bar, and a control in it fills the row; several rows stand in\n * their order (a search field over a segmented control). Under a large title on a page the rows stand under the title,\n * at the top of the content, and once scrolled up to the bar they stay pinned under its controls, as iOS 27.2 pins a\n * safeAreaBar under a large title's bar (React `Toolbar.Row`).\n */\nexport const ToolbarRow = defineComponent({\n name: \"ToolbarRow\",\n inheritAttrs: false,\n setup(_, { slots, attrs }) {\n const host = inject(TOOLBAR_HOST, null)\n const titleStyle = inject(TOOLBAR_TITLE_STYLE, null)\n // The rows go with the title: under it at the top of a page's content or a Sheet's body\n const large = computed(() => titleStyle?.value === \"large\" && !!host?.requestLargeTitleSlot)\n const slot = computed(() => (large.value ? host?.largeTitleRowSlot?.value ?? null : null))\n let release: (() => void) | undefined\n watch(large, (value) => {\n release?.()\n release = value ? host?.requestLargeTitleSlot?.() : undefined\n })\n // A watch that ran first has asked already (Codex #68)\n onMounted(() => { if (large.value && !release) release = host?.requestLargeTitleSlot?.() })\n onBeforeUnmount(() => release?.())\n const element = ref<HTMLElement | null>(null)\n const anchor = ref<HTMLElement | null>(null)\n let stopOrder: (() => void) | undefined\n watch([slot, element, anchor], ([place, row, mark]) => {\n stopOrder?.()\n stopOrder = place && row && mark ? followRowOrder(mark, row) : undefined\n }, { flush: \"post\" })\n onBeforeUnmount(() => { stopOrder?.(); stopOrder = undefined })\n return () => {\n const place = slot.value\n const row = h(\"div\", { ...attrs, \"ref\": element, \"class\": [s.Row, attrs.class], \"data-toolbar-row\": \"\", \"data-in-content\": place ? \"\" : undefined }, slots.default?.())\n // Under a large title the row waits for its place in the content, as React's does; a host with no content to\n // keep the title in (a Sheet without a body) keeps it in the bar.\n if (large.value && place) return [h(Teleport, { to: place }, [row]), h(\"span\", { \"ref\": anchor, \"data-toolbar-row-anchor\": \"\", \"hidden\": true })]\n if (large.value && host?.holdsLargeTitle?.value !== false) return null\n return row\n }\n },\n})\n\n/** Custom middle content: a search field, a segmented control or a single centered action (React `Toolbar.Content`). */\nexport const ToolbarContent = defineComponent({\n name: \"ToolbarContent\",\n props: {\n /** Stretch between the leading and trailing items, as a search field does. */\n fill: { type: Boolean, default: false },\n },\n setup(props, { slots }) {\n return () => h(\"div\", { \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined }, slots.default?.())\n },\n})\n\n/** The bar title, with an optional second line (React `Toolbar.Title`). */\nexport const ToolbarTitle = defineComponent({\n name: \"ToolbarTitle\",\n inheritAttrs: false,\n props: {\n /** A second, smaller line below the title. The `subtitle` slot takes precedence. */\n subtitle: { type: String, default: undefined },\n /**\n * Heading level. In a Dialog the dialog's own title names the Sheet, so the bar title is hidden\n * from assistive technology there.\n * @default \"h1\"\n */\n as: { type: String as PropType<\"h1\" | \"h2\" | \"h3\">, default: \"h1\" },\n },\n setup(props, { slots, attrs }) {\n const host = inject(TOOLBAR_HOST, null)\n const titleStyle = inject(TOOLBAR_TITLE_STYLE, null)\n const bar = inject(TOOLBAR_ELEMENT, null)\n const heading = ref<HTMLElement | null>(null)\n // A page, and a Dialog with its body, keep the title at the top of their content\n const large = computed(() => titleStyle?.value === \"large\" && !!host?.requestLargeTitleSlot)\n const slot = computed(() => (large.value ? host?.largeTitleSlot?.value ?? null : null))\n let release: (() => void) | undefined\n // A watch that ran first has asked already (Codex #68)\n onMounted(() => { if (large.value && !release) release = host?.requestLargeTitleSlot?.() })\n watch(large, (value) => {\n release?.()\n release = value ? host?.requestLargeTitleSlot?.() : undefined\n })\n // In the content the title scrolls with it, on the compositor and through the overscroll, as on iOS 26. Once it has\n // gone under the bar (its last line at the bar's bottom), the bar shows it inline and a hard or glass bar its line.\n // It starts once mounted too: a bar replaced under a page that keeps its content finds the place already there.\n let stopFollowing: (() => void) | undefined\n const follow = () => {\n stopFollowing?.()\n stopFollowing = undefined\n const element = bar?.value\n const title = heading.value\n if (!slot.value || !element || !title || !host?.subscribeScroll) return\n stopFollowing = followLargeTitle(element, title, host.subscribeScroll)\n }\n onMounted(follow)\n watch([slot, () => bar?.value], follow, { flush: \"post\" })\n onBeforeUnmount(() => { stopFollowing?.(); release?.() })\n return () => {\n // An empty subtitle, from the prop or a slot that renders nothing, leaves the title on one line, as in React.\n const present = (value: unknown) => (Array.isArray(value) ? value.length > 0 : value != null && value !== \"\")\n const subtitle = slots.subtitle?.() ?? props.subtitle\n const place = slot.value\n const title = h(\"div\", { \"ref\": heading, \"class\": s.Heading, \"aria-hidden\": host?.kind === \"dialog\" ? \"true\" : undefined, \"data-in-content\": place ? \"\" : undefined }, [\n h(props.as, { ...attrs, class: [s.Title, attrs.class] }, slots.default?.()),\n present(subtitle) ? h(\"p\", { class: s.Subtitle }, subtitle) : null,\n ])\n if (!large.value) return title\n // Until the content has made its place (a server-rendered page before it hydrates), the title stands in the bar\n // where it will stand in the content. The inline copy the row of controls shows once the large title has gone\n // under it keeps a subtitle as a second line, as in the inline title (iOS 26 kit Toolbar - Top - iPhone, Title 2 Line).\n const copySubtitle = slots.subtitle?.() ?? props.subtitle\n const copy = present(copySubtitle)\n ? [h(\"span\", { class: s.CollapsedLine }, slots.default?.()), h(\"span\", { class: s.CollapsedSubtitle }, copySubtitle)]\n : slots.default?.()\n return [h(Teleport, { to: place ?? \"body\", disabled: !place }, [title]), h(\"span\", { \"class\": s.CollapsedTitle, \"aria-hidden\": \"true\" }, copy)]\n }\n },\n})\n"]}
|