@plexui/ui 0.61.1 → 0.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/es/components/Accordion/Accordion.js +21 -2
  2. package/dist/es/components/Accordion/Accordion.js.map +1 -1
  3. package/dist/es/components/Button/NavigationButton.js +1 -1
  4. package/dist/es/components/Button/NavigationButton.js.map +1 -1
  5. package/dist/es/components/Dialog/Dialog.js +51 -3
  6. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  7. package/dist/es/components/Dialog/sheetDrag.js +45 -12
  8. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  9. package/dist/es/components/Field/Field.js +3 -1
  10. package/dist/es/components/Field/Field.js.map +1 -1
  11. package/dist/es/components/Icon/svg/Array.js +3 -3
  12. package/dist/es/components/Icon/svg/Array.js.map +1 -1
  13. package/dist/es/components/Icon/svg/Boolean.js +3 -3
  14. package/dist/es/components/Icon/svg/Boolean.js.map +1 -1
  15. package/dist/es/components/Icon/svg/Clipboard.js +3 -3
  16. package/dist/es/components/Icon/svg/Clipboard.js.map +1 -1
  17. package/dist/es/components/Icon/svg/Comment.js +3 -3
  18. package/dist/es/components/Icon/svg/Comment.js.map +1 -1
  19. package/dist/es/components/Icon/svg/Error.js +3 -3
  20. package/dist/es/components/Icon/svg/Error.js.map +1 -1
  21. package/dist/es/components/Icon/svg/Function.js +3 -3
  22. package/dist/es/components/Icon/svg/Function.js.map +1 -1
  23. package/dist/es/components/Icon/svg/Number.js +3 -3
  24. package/dist/es/components/Icon/svg/Number.js.map +1 -1
  25. package/dist/es/components/Icon/svg/Object.js +3 -3
  26. package/dist/es/components/Icon/svg/Object.js.map +1 -1
  27. package/dist/es/components/Icon/svg/Report.js +3 -3
  28. package/dist/es/components/Icon/svg/Report.js.map +1 -1
  29. package/dist/es/components/Icon/svg/Storage.js +3 -3
  30. package/dist/es/components/Icon/svg/Storage.js.map +1 -1
  31. package/dist/es/components/Icon/svg/String.js +3 -3
  32. package/dist/es/components/Icon/svg/String.js.map +1 -1
  33. package/dist/es/components/Icon/svg/Text.js +3 -3
  34. package/dist/es/components/Icon/svg/Text.js.map +1 -1
  35. package/dist/es/components/Menu/Menu.js +22 -1
  36. package/dist/es/components/Menu/Menu.js.map +1 -1
  37. package/dist/es/components/PlexUIProvider/PlexUIProvider.js +40 -6
  38. package/dist/es/components/PlexUIProvider/PlexUIProvider.js.map +1 -1
  39. package/dist/es/components/PlexUIProvider/androidRipple.js +98 -0
  40. package/dist/es/components/PlexUIProvider/androidRipple.js.map +1 -0
  41. package/dist/es/components/PlexUIProvider/index.js.map +1 -1
  42. package/dist/es/components/Select/Select.js +217 -39
  43. package/dist/es/components/Select/Select.js.map +1 -1
  44. package/dist/es/components/Sidebar/Sidebar.js +6 -3
  45. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  46. package/dist/es/components/Sidebar/index.js +1 -1
  47. package/dist/es/components/Sidebar/index.js.map +1 -1
  48. package/dist/es/components/Toolbar/Toolbar.js +230 -5
  49. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  50. package/dist/es/components/Toolbar/index.js.map +1 -1
  51. package/dist/es/lib/accordionMotion.js +144 -0
  52. package/dist/es/lib/accordionMotion.js.map +1 -0
  53. package/dist/es/lib/fieldRow.js +73 -1
  54. package/dist/es/lib/fieldRow.js.map +1 -1
  55. package/dist/es/lib/presentMotion.js +151 -0
  56. package/dist/es/lib/presentMotion.js.map +1 -0
  57. package/dist/es/styles/android.css +1 -0
  58. package/dist/types/components/Accordion/Accordion.d.ts +1 -1
  59. package/dist/types/components/Button/NavigationButton.d.ts +8 -1
  60. package/dist/types/components/Field/Field.d.ts +3 -0
  61. package/dist/types/components/Icon/svg/Array.d.ts +2 -2
  62. package/dist/types/components/Icon/svg/Boolean.d.ts +2 -2
  63. package/dist/types/components/Icon/svg/Clipboard.d.ts +2 -2
  64. package/dist/types/components/Icon/svg/Comment.d.ts +2 -2
  65. package/dist/types/components/Icon/svg/Error.d.ts +2 -2
  66. package/dist/types/components/Icon/svg/Function.d.ts +2 -2
  67. package/dist/types/components/Icon/svg/Number.d.ts +2 -2
  68. package/dist/types/components/Icon/svg/Object.d.ts +2 -2
  69. package/dist/types/components/Icon/svg/Report.d.ts +2 -2
  70. package/dist/types/components/Icon/svg/Storage.d.ts +2 -2
  71. package/dist/types/components/Icon/svg/String.d.ts +2 -2
  72. package/dist/types/components/Icon/svg/Text.d.ts +2 -2
  73. package/dist/types/components/PlexUIProvider/PlexUIProvider.d.ts +10 -3
  74. package/dist/types/components/PlexUIProvider/androidRipple.d.ts +9 -0
  75. package/dist/types/components/PlexUIProvider/index.d.ts +1 -1
  76. package/dist/types/components/Select/Select.d.ts +24 -0
  77. package/dist/types/components/Sidebar/Sidebar.d.ts +8 -0
  78. package/dist/types/components/Sidebar/index.d.ts +2 -2
  79. package/dist/types/components/Toolbar/Toolbar.d.ts +16 -1
  80. package/dist/types/components/Toolbar/index.d.ts +1 -1
  81. package/dist/types/lib/accordionMotion.d.ts +20 -0
  82. package/dist/types/lib/fieldRow.d.ts +14 -0
  83. package/dist/types/lib/presentMotion.d.ts +46 -0
  84. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,CAAC,MAAM,sDAAsD,CAAA;AA2BpE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAyC,EAA6B,EAAE,CACpG,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,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LayoutEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n} from \"react\"\nimport { createPortal } from \"react-dom\"\nimport s from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\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. Both keep a large title at the top of\n * their content (Page.Content, Dialog.Body), where it scrolls and collapses into the bar.\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?: boolean\n /** Content continues under the bottom bar, so a hard or glass bar shows its line. */\n contentBelow?: 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?: 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?: HTMLElement | null\n /** The rows under a large title are pinned under the bar, so its background reaches under them. */\n rowsPinned?: boolean\n /**\n * `false` while the host has no content to keep a large title in (a Dialog without Dialog.Body): 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?: boolean\n}\n\nexport const ToolbarHostContext = createContext<ToolbarHost | null>(null)\n\n// The title style of the top bar, which a large title on a page needs to show itself inline once scrolled.\nconst ToolbarTitleStyleContext = createContext<ToolbarTitleStyle | undefined>(undefined)\n// The bar itself, which a large title in the content marks once it has gone under the bar. It is state, so a title\n// that mounts before its bar (a bar replaced under a page that keeps its content) follows the bar once it is there.\nconst ToolbarElementContext = createContext<HTMLDivElement | null>(null)\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\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport type ToolbarProps = HTMLAttributes<HTMLDivElement> & {\n /** @default \"top\" */\n placement?: ToolbarPlacement\n /** Layout of `Toolbar.Title` in a top bar. @default \"inline\" */\n titleStyle?: ToolbarTitleStyle\n /** Alignment of an inline title. Compact and large titles always start at the leading edge. @default \"center\" */\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 ref?: Ref<HTMLDivElement>\n}\n\nfunction ToolbarRoot({\n placement = \"top\",\n titleStyle = \"inline\",\n titleAlign = \"center\",\n background = placement === \"bottom\" ? \"soft\" : \"glass\",\n className,\n children,\n ref,\n ...restProps\n}: ToolbarProps) {\n const host = useContext(ToolbarHostContext)\n const element = useRef<HTMLDivElement | null>(null)\n const [barElement, setBarElement] = useState<HTMLDivElement | null>(null)\n const setRef = useCallback((node: HTMLDivElement | null) => {\n element.current = node\n setBarElement(node)\n if (typeof ref === \"function\") return ref(node)\n if (ref) ref.current = node\n }, [ref])\n const setHeight = host?.setHeight\n useLayoutEffect(() => {\n const bar = element.current\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 = () => setHeight(placement, bar.offsetHeight || undefined)\n update()\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(bar, { box: \"border-box\" })\n return () => { observer?.disconnect(); setHeight(placement, undefined) }\n }, [placement, setHeight])\n\n return (\n <div\n ref={setRef}\n className={clsx(s.Toolbar, className)}\n data-toolbar=\"\"\n data-placement={placement}\n data-title-style={placement === \"top\" ? titleStyle : undefined}\n data-title-align={placement === \"top\" ? titleAlign : undefined}\n data-background={barBackground(background)}\n data-host={host?.kind}\n data-scrolled={placement === \"top\" && host?.scrolled ? \"\" : undefined}\n data-content-below={placement === \"bottom\" && host?.contentBelow ? \"\" : undefined}\n data-rows-pinned={placement === \"top\" && host?.rowsPinned ? \"\" : undefined}\n {...restProps}\n >\n <ToolbarElementContext.Provider value={barElement}>\n <ToolbarTitleStyleContext.Provider value={placement === \"top\" ? titleStyle : undefined}>{children}</ToolbarTitleStyleContext.Provider>\n </ToolbarElementContext.Provider>\n </div>\n )\n}\nToolbarRoot.displayName = \"Toolbar\"\n\n/* ------------------------------------------------------------------ */\n/* Parts */\n/* ------------------------------------------------------------------ */\n\nexport type ToolbarSlotProps = HTMLAttributes<HTMLDivElement> & { ref?: Ref<HTMLDivElement> }\n\nfunction ToolbarLeading({ className, ...restProps }: ToolbarSlotProps) {\n return <div className={clsx(s.Leading, className)} {...restProps} />\n}\nToolbarLeading.displayName = \"Toolbar.Leading\"\n\nfunction ToolbarTrailing({ className, ...restProps }: ToolbarSlotProps) {\n return <div className={clsx(s.Trailing, className)} {...restProps} />\n}\nToolbarTrailing.displayName = \"Toolbar.Trailing\"\n\nexport type ToolbarContentProps = ToolbarSlotProps & {\n /** Stretch between the leading and trailing items, as a search field does. */\n fill?: boolean\n}\n\n/** Custom middle content: a search field, a segmented control or a single centered action. */\nfunction ToolbarContent({ fill = false, className, ...restProps }: ToolbarContentProps) {\n return <div className={clsx(s.Content, className)} data-fill={fill ? \"\" : undefined} {...restProps} />\n}\nToolbarContent.displayName = \"Toolbar.Content\"\n\n/** Buttons that share one capsule. */\nfunction ToolbarGroup({ className, ...restProps }: ToolbarSlotProps) {\n return <div role=\"group\" className={clsx(s.Group, className)} {...restProps} />\n}\nToolbarGroup.displayName = \"Toolbar.Group\"\n\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 */\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.\n */\nfunction ToolbarRow({ className, ref, ...restProps }: ToolbarSlotProps) {\n const host = useContext(ToolbarHostContext)\n const titleStyle = useContext(ToolbarTitleStyleContext)\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 = titleStyle === \"large\" && !!host?.requestLargeTitleSlot\n const requestSlot = large ? host?.requestLargeTitleSlot : undefined\n const slot = large ? host?.largeTitleRowSlot ?? null : null\n useLayoutEffect(() => requestSlot?.(), [requestSlot])\n const element = useRef<HTMLDivElement | null>(null)\n const anchor = useRef<HTMLSpanElement | null>(null)\n const setRef = useCallback((node: HTMLDivElement | null) => {\n element.current = node\n if (typeof ref === \"function\") return ref(node)\n if (ref) ref.current = node\n }, [ref])\n useLayoutEffect(() => {\n if (!slot || !anchor.current || !element.current) return\n return followRowOrder(anchor.current, element.current)\n }, [slot])\n const row = <div ref={setRef} className={clsx(s.Row, className)} data-toolbar-row=\"\" data-in-content={slot ? \"\" : undefined} {...restProps} />\n // Under a large title the row waits for its place in the content (it comes before the first paint) and never stands\n // in the bar first: moving it from the bar into the portal would mount its children again, and a switcher that holds\n // its own selection would lose it (Codex #5). A host with no content to keep the title in (a Sheet without a body)\n // keeps it in the bar.\n if (large && slot) return <>{createPortal(row, slot)}<span ref={anchor} data-toolbar-row-anchor=\"\" hidden /></>\n if (large && host?.holdsLargeTitle !== false) return null\n return row\n}\nToolbarRow.displayName = \"Toolbar.Row\"\n\nexport type ToolbarTitleProps = Omit<HTMLAttributes<HTMLHeadingElement>, \"children\"> & {\n children: ReactNode\n /** A second, smaller line below the title. */\n subtitle?: ReactNode\n /**\n * Heading level. In a Dialog the dialog's own title names the Sheet, so the bar title is hidden from\n * assistive technology there. @default \"h1\"\n */\n as?: \"h1\" | \"h2\" | \"h3\"\n ref?: Ref<HTMLHeadingElement>\n}\n\nfunction ToolbarTitle({ children, subtitle, as, className, ref, ...restProps }: ToolbarTitleProps) {\n const host = useContext(ToolbarHostContext)\n const titleStyle = useContext(ToolbarTitleStyleContext)\n const bar = useContext(ToolbarElementContext)\n const headingRef = useRef<HTMLDivElement | null>(null)\n // A page, and a Dialog with its body, keep the title at the top of their content\n const large = titleStyle === \"large\" && !!host?.requestLargeTitleSlot\n const requestSlot = large ? host?.requestLargeTitleSlot : undefined\n const slot = large ? host?.largeTitleSlot ?? null : null\n const subscribeScroll = host?.subscribeScroll\n useLayoutEffect(() => requestSlot?.(), [requestSlot])\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 useLayoutEffect(() => {\n const heading = headingRef.current\n if (!slot || !bar || !heading || !subscribeScroll) return\n return followLargeTitle(bar, heading, subscribeScroll)\n }, [bar, slot, subscribeScroll])\n const decorative = host?.kind === \"dialog\"\n const Tag = as ?? \"h1\"\n const hasSubtitle = subtitle != null && subtitle !== false && subtitle !== \"\"\n const heading = (\n <div ref={headingRef} className={s.Heading} aria-hidden={decorative || undefined} data-in-content={slot ? \"\" : undefined}>\n <Tag ref={ref} className={clsx(s.Title, className)} {...restProps}>{children}</Tag>\n {hasSubtitle && <p className={s.Subtitle}>{subtitle}</p>}\n </div>\n )\n if (!large) return heading\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 return (\n <>\n {slot ? createPortal(heading, slot) : heading}\n <span className={s.CollapsedTitle} aria-hidden=\"true\">\n {hasSubtitle ? <><span className={s.CollapsedLine}>{children}</span><span className={s.CollapsedSubtitle}>{subtitle}</span></> : children}\n </span>\n </>\n )\n}\nToolbarTitle.displayName = \"Toolbar.Title\"\n\n/* ------------------------------------------------------------------ */\n/* Compound */\n/* ------------------------------------------------------------------ */\n\nexport const Toolbar = ToolbarRoot as typeof ToolbarRoot & {\n Leading: typeof ToolbarLeading\n Title: typeof ToolbarTitle\n Content: typeof ToolbarContent\n Group: typeof ToolbarGroup\n Trailing: typeof ToolbarTrailing\n Row: typeof ToolbarRow\n}\n\nToolbar.Leading = ToolbarLeading\nToolbar.Title = ToolbarTitle\nToolbar.Content = ToolbarContent\nToolbar.Group = ToolbarGroup\nToolbar.Trailing = ToolbarTrailing\nToolbar.Row = ToolbarRow\n"]}
1
+ {"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAKT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D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M,YAClD,WAAW,CAAC,CAAC,CAAC,8BAAE,eAAM,SAAS,EAAE,CAAC,CAAC,aAAa,YAAG,QAAQ,GAAQ,EAAA,eAAM,SAAS,EAAE,CAAC,CAAC,iBAAiB,YAAG,QAAQ,GAAQ,IAAG,CAAC,CAAC,CAAC,QAAQ,GACpI,IACN,CACJ,CAAA;AACH,CAAC;AACD,YAAY,CAAC,WAAW,GAAG,eAAe,CAAA;AAE1C,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,MAAM,CAAC,MAAM,OAAO,GAAG,WAOtB,CAAA;AAED,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAA;AAC5B,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAA;AAC5B,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAA;AAClC,OAAO,CAAC,GAAG,GAAG,UAAU,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n type RefObject,\n} from \"react\"\nimport { createPortal } from \"react-dom\"\nimport { useEscCloseStack } from \"../../hooks/useEscCloseStack\"\nimport { Button } from \"../Button/Button\"\nimport { NavigationButton } from \"../Button/NavigationButton\"\nimport Search from \"../Icon/svg/Search\"\nimport s from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\nexport type ToolbarPlacement = \"top\" | \"bottom\"\n/**\n * Where a screen's search field stands (`Toolbar.Content search`):\n * - `\"bottom\"`: the field itself, in the bar it is written in: in a bottom bar, in reach of the thumb, as iOS 26 places a\n * screen's search\n * - `\"top\"`: a search button first among the top bar's trailing actions; pressed, it grows into the field over the bar,\n * the bar's leading action turns into a back arrow that closes it, and a Sheet goes full screen on Android\n * - `\"auto\"`: the platform's place, the bottom on iOS and the top in the Plex Android look (`data-platform=\"android\"`)\n */\nexport type ToolbarSearchPlacement = \"auto\" | \"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. Both keep a large title at the top of\n * their content (Page.Content, Dialog.Body), where it scrolls and collapses into the bar.\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?: boolean\n /** Content continues under the bottom bar, so a hard or glass bar shows its line. */\n contentBelow?: 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?: 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?: HTMLElement | null\n /** The rows under a large title are pinned under the bar, so its background reaches under them. */\n rowsPinned?: boolean\n /**\n * `false` while the host has no content to keep a large title in (a Dialog without Dialog.Body): 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?: boolean\n}\n\nexport const ToolbarHostContext = createContext<ToolbarHost | null>(null)\n\n// The title style of the top bar, which a large title on a page needs to show itself inline once scrolled.\nconst ToolbarTitleStyleContext = createContext<ToolbarTitleStyle | undefined>(undefined)\n// The bar itself, which a large title in the content marks once it has gone under the bar. It is state, so a title\n// that mounts before its bar (a bar replaced under a page that keeps its content) follows the bar once it is there.\nconst ToolbarElementContext = createContext<HTMLDivElement | null>(null)\n// The bar a part is written in: its placement, and the count of its searches that stand in the other bar\ntype ToolbarBar = { placement: ToolbarPlacement; searchAway: () => () => void }\nconst ToolbarBarContext = createContext<ToolbarBar | null>(null)\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\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport type ToolbarProps = HTMLAttributes<HTMLDivElement> & {\n /** @default \"top\" */\n placement?: ToolbarPlacement\n /** Layout of `Toolbar.Title` in a top bar. @default \"inline\" */\n titleStyle?: ToolbarTitleStyle\n /** Alignment of an inline title. Compact and large titles always start at the leading edge. @default \"center\" */\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 ref?: Ref<HTMLDivElement>\n}\n\nfunction ToolbarRoot({\n placement = \"top\",\n titleStyle = \"inline\",\n titleAlign = \"center\",\n background = placement === \"bottom\" ? \"soft\" : \"glass\",\n className,\n children,\n ref,\n ...restProps\n}: ToolbarProps) {\n const host = useContext(ToolbarHostContext)\n const element = useRef<HTMLDivElement | null>(null)\n const [barElement, setBarElement] = useState<HTMLDivElement | null>(null)\n const setRef = useCallback((node: HTMLDivElement | null) => {\n element.current = node\n setBarElement(node)\n if (typeof ref === \"function\") return ref(node)\n if (ref) ref.current = node\n }, [ref])\n // A bar that holds nothing but a search standing in the other bar (a bottom bar's field that the Plex Android look\n // puts at the top) leaves its place: it draws nothing and takes no height, and the search still renders from it.\n const [searchesAway, setSearchesAway] = useState(0)\n const searchAway = useCallback(() => {\n setSearchesAway((count) => count + 1)\n return () => setSearchesAway((count) => count - 1)\n }, [])\n const bar = useMemo(() => ({ placement, searchAway }), [placement, searchAway])\n const vacant = searchesAway > 0 && Children.toArray(children).every(isSearchContent)\n const setHeight = host?.setHeight\n useLayoutEffect(() => {\n const bar = element.current\n if (!bar || !setHeight || vacant) return\n // A desktop layout hides the bar; its height then leaves the host's own header in charge.\n const update = () => setHeight(placement, bar.offsetHeight || undefined)\n update()\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(bar, { box: \"border-box\" })\n return () => { observer?.disconnect(); setHeight(placement, undefined) }\n }, [placement, setHeight, vacant])\n\n const parts = (\n <ToolbarBarContext.Provider value={bar}>\n <ToolbarElementContext.Provider value={barElement}>\n <ToolbarTitleStyleContext.Provider value={placement === \"top\" ? titleStyle : undefined}>{children}</ToolbarTitleStyleContext.Provider>\n </ToolbarElementContext.Provider>\n </ToolbarBarContext.Provider>\n )\n // The same element, so the parts keep their state as the bar leaves and comes back\n if (vacant) return <div ref={setRef} hidden data-toolbar-vacant=\"\">{parts}</div>\n return (\n <div\n ref={setRef}\n className={clsx(s.Toolbar, className)}\n data-toolbar=\"\"\n data-placement={placement}\n data-title-style={placement === \"top\" ? titleStyle : undefined}\n data-title-align={placement === \"top\" ? titleAlign : undefined}\n data-background={barBackground(background)}\n data-host={host?.kind}\n data-scrolled={placement === \"top\" && host?.scrolled ? \"\" : undefined}\n data-content-below={placement === \"bottom\" && host?.contentBelow ? \"\" : undefined}\n data-rows-pinned={placement === \"top\" && host?.rowsPinned ? \"\" : undefined}\n {...restProps}\n >\n {parts}\n </div>\n )\n}\nToolbarRoot.displayName = \"Toolbar\"\n\n/* ------------------------------------------------------------------ */\n/* Parts */\n/* ------------------------------------------------------------------ */\n\nexport type ToolbarSlotProps = HTMLAttributes<HTMLDivElement> & { ref?: Ref<HTMLDivElement> }\n\nfunction ToolbarLeading({ className, ...restProps }: ToolbarSlotProps) {\n return <div className={clsx(s.Leading, className)} {...restProps} />\n}\nToolbarLeading.displayName = \"Toolbar.Leading\"\n\nfunction ToolbarTrailing({ className, ...restProps }: ToolbarSlotProps) {\n return <div className={clsx(s.Trailing, className)} {...restProps} />\n}\nToolbarTrailing.displayName = \"Toolbar.Trailing\"\n\nexport type ToolbarContentProps = ToolbarSlotProps & {\n /** Stretch between the leading and trailing items, as a search field does. */\n fill?: boolean\n /**\n * Marks the content as the screen's search field (an `Input`) and sets where it stands (`ToolbarSearchPlacement`):\n * write it in the bottom bar, and at the top it becomes a search button of the top bar beside it, a Page's or a\n * Sheet's, that opens the field over that bar. `true` is `\"auto\"`: the bottom on iOS, the top on Android.\n */\n search?: boolean | ToolbarSearchPlacement\n}\n\n/** Custom middle content: a search field, a segmented control or a single centered action. */\nfunction ToolbarContent({ fill = false, search, className, ...restProps }: ToolbarContentProps) {\n if (search != null && search !== false) {\n return <ToolbarSearch placement={search === true ? \"auto\" : search} fill={fill} className={className} {...restProps} />\n }\n return <div className={clsx(s.Content, className)} data-fill={fill ? \"\" : undefined} {...restProps} />\n}\nToolbarContent.displayName = \"Toolbar.Content\"\n\nconst isSearchContent = (part: ReactNode) =>\n isValidElement<ToolbarContentProps>(part) && part.type === ToolbarContent && part.props.search != null && part.props.search !== false\n\nconst ANDROID = '[data-platform=\"android\"]'\n\n/** Whether a part stands in the Plex Android look: `data-platform=\"android\"` on it or around it (PlexUIProvider). */\nfunction useAndroid(element: RefObject<Element | null>) {\n const [android, setAndroid] = useState(false)\n useLayoutEffect(() => {\n const read = () => setAndroid(!!(element.current ?? document.documentElement).closest(ANDROID))\n read()\n if (typeof MutationObserver === \"undefined\") return\n const observer = new MutationObserver(read)\n observer.observe(document.documentElement, { attributes: true, attributeFilter: [\"data-platform\"], subtree: true })\n return () => observer.disconnect()\n }, [element])\n return android\n}\n\nconst TOP_BAR = '[data-toolbar][data-placement=\"top\"]'\n\n/** The places of a search at the top: its button's capsule among the bar's trailing actions, and the layer its field opens in. */\ntype SearchPlaces = { bar: HTMLElement; button: HTMLElement; layer: HTMLElement }\n\n/**\n * The top bar a search at the top stands in: the bar it is written in, or the top bar beside it (a Page's, a Sheet's),\n * looked up no further than its dialog.\n */\nfunction findTopBar(anchor: HTMLElement): HTMLElement | null {\n const home = anchor.parentElement\n if (home?.matches(TOP_BAR)) return home\n for (let node = home?.parentElement; node; node = node.parentElement) {\n const bar = node.querySelector<HTMLElement>(`:scope > ${TOP_BAR}`)\n if (bar) return bar\n if (node.hasAttribute(\"data-plex-dialog\")) return null\n }\n return null\n}\n\n/**\n * Makes the places of a search in the top bar and keeps them there: its button's capsule first among the bar's trailing\n * actions (in a trailing place of its own while the bar has none) and the layer over the bar its field opens in. The\n * bar's parts come and go (a confirm shown once there are changes) and a page or a sheet can replace its bar: the\n * places follow, and `onPlaces` hears of each new bar. Returns the release.\n */\nfunction placeSearch(anchor: HTMLElement, onPlaces: (places: SearchPlaces | null) => void) {\n const doc = anchor.ownerDocument\n const make = (className: string, mark: string) => {\n const element = doc.createElement(\"div\")\n element.className = className\n element.setAttribute(mark, \"\")\n return element\n }\n const button = make(s.Group, \"data-toolbar-search-button\")\n const layer = make(s.SearchLayer, \"data-toolbar-search-layer\")\n const ownTrailing = make(s.Trailing, \"data-toolbar-search-trailing\")\n let bar: HTMLElement | null = null\n let reported: HTMLElement | null | undefined\n const leave = () => {\n bar?.removeAttribute(\"data-search\")\n bar?.removeAttribute(\"data-search-open\")\n button.remove()\n layer.remove()\n ownTrailing.remove()\n }\n const observer = typeof MutationObserver !== \"undefined\" ? new MutationObserver(() => place()) : undefined\n const place = () => {\n const next = findTopBar(anchor)\n if (next !== bar) {\n leave()\n observer?.disconnect()\n bar = next\n // The bar's own parts, and the bars beside it (a bar replaced, or one that comes later)\n for (const scope of [bar, bar?.parentElement, anchor.parentElement?.parentElement]) if (scope) observer?.observe(scope, { childList: true })\n }\n if (bar) {\n const trailing = Array.from(bar.children).find((child) => child.classList.contains(s.Trailing) && child !== ownTrailing)\n const home = trailing ?? ownTrailing\n if (home.firstElementChild !== button) home.prepend(button)\n if (trailing) ownTrailing.remove()\n else if (ownTrailing.parentElement !== bar) bar.append(ownTrailing)\n if (layer.parentElement !== bar) bar.append(layer)\n bar.setAttribute(\"data-search\", \"\")\n }\n if (bar !== reported) {\n reported = bar\n onPlaces(bar ? { bar, button, layer } : null)\n }\n }\n place()\n return () => {\n observer?.disconnect()\n leave()\n }\n}\n\n/**\n * The field grows out of its button and shrinks back into it: the button's capsule in the bar, by its layout box, which\n * the bar's motion (its actions shrinking away) leaves where it is. Its distance from the end of the bar's content is\n * kept, not from the bar's edge, so it holds as the bar's gutter changes (a Sheet's at the full screen). Set at once,\n * with no transition.\n */\nfunction followSearchButton({ bar, button, layer }: SearchPlaces, field: HTMLElement | null) {\n let left = 0\n for (let node: HTMLElement | null = button; node && node !== bar; node = node.offsetParent as HTMLElement | null) left += node.offsetLeft\n const style = getComputedStyle(bar)\n const end = style.direction === \"rtl\"\n ? left - (Number.parseFloat(style.paddingLeft) || 0)\n : bar.clientWidth - (Number.parseFloat(style.paddingRight) || 0) - left - button.offsetWidth\n layer.style.setProperty(\"--toolbar-search-from-end\", `${end}px`)\n layer.style.setProperty(\"--toolbar-search-from-size\", `${button.offsetWidth}px`)\n if (!field) return\n field.style.transition = \"none\"\n void field.offsetWidth\n field.style.transition = \"\"\n}\n\n/** Closing the search clears its field, as a search closed on Android or canceled on iOS does: the field's own input event. */\nfunction clearSearchField(field: HTMLElement | null) {\n const input = field?.querySelector(\"input\")\n if (!input || input.value === \"\") return\n Object.getOwnPropertyDescriptor(Object.getPrototypeOf(input), \"value\")?.set?.call(input, \"\")\n input.dispatchEvent(new Event(\"input\", { bubbles: true }))\n}\n\ntype ToolbarSearchProps = ToolbarSlotProps & { placement: ToolbarSearchPlacement; fill: boolean }\n\n/**\n * A screen's search field, where its placement puts it. At the bottom it is the field in its bar. At the top a search\n * button stands first among the top bar's trailing actions, in the capsule of the icon buttons next to it; pressed, it\n * grows into the field over the bar (from after a back circle to the bar's end) as the title and the actions fade, and\n * the leading action becomes a back arrow. Back, or Escape, closes it, clears the field and gives the button its focus\n * back; a Sheet on Android stands at the full screen while it is open (Dialog.module.css).\n */\nfunction ToolbarSearch({ placement, fill, className, children, ref, ...restProps }: ToolbarSearchProps) {\n const bar = useContext(ToolbarBarContext)\n const anchor = useRef<HTMLSpanElement | null>(null)\n const android = useAndroid(anchor)\n const top = (placement === \"auto\" ? (android ? \"top\" : \"bottom\") : placement) === \"top\"\n const [places, setPlaces] = useState<SearchPlaces | null>(null)\n useLayoutEffect(() => {\n const mark = anchor.current\n if (!top || !mark) return\n const release = placeSearch(mark, setPlaces)\n return () => { release(); setPlaces(null) }\n }, [top])\n // Written in the bottom bar, it leaves that bar to the top one\n const searchAway = bar?.searchAway\n const away = !!places && bar?.placement !== \"top\"\n useLayoutEffect(() => (away ? searchAway?.() : undefined), [away, searchAway])\n\n const [open, setOpen] = useState(false)\n const field = useRef<HTMLDivElement | null>(null)\n const trigger = useRef<HTMLButtonElement | null>(null)\n const setField = useCallback((node: HTMLDivElement | null) => {\n field.current = node\n if (typeof ref === \"function\") return ref(node)\n if (ref) ref.current = node\n }, [ref])\n useEffect(() => { if (!places) setOpen(false) }, [places])\n useLayoutEffect(() => {\n if (places) followSearchButton(places, field.current)\n }, [places])\n useLayoutEffect(() => {\n if (!places) return\n places.bar.toggleAttribute(\"data-search-open\", open)\n if (open) field.current?.querySelector(\"input\")?.focus({ preventScroll: true })\n }, [places, open])\n // The button takes the field's name: \"Search materials\"\n const [name, setName] = useState(\"Search\")\n useLayoutEffect(() => {\n const input = field.current?.querySelector(\"input\")\n const next = input?.getAttribute(\"aria-label\") || input?.placeholder || \"Search\"\n if (next !== name) setName(next)\n })\n const openSearch = () => {\n if (places) followSearchButton(places, field.current)\n setOpen(true)\n }\n const closeSearch = () => {\n if (places) {\n followSearchButton(places, null)\n // Closed at once, so the button is there to take the focus back\n places.bar.removeAttribute(\"data-search-open\")\n }\n clearSearchField(field.current)\n setOpen(false)\n trigger.current?.focus({ preventScroll: true })\n }\n useEscCloseStack(open, closeSearch)\n\n const mark = <span ref={anchor} hidden data-toolbar-search-anchor=\"\" />\n if (!places) {\n return <>{mark}<div ref={setField} className={clsx(s.Content, className)} data-fill={fill ? \"\" : undefined} {...restProps}>{children}</div></>\n }\n return (\n <>\n {mark}\n {createPortal(\n <Button ref={trigger} color=\"secondary\" variant=\"soft\" uniform pill aria-label={name} aria-expanded={open} onClick={openSearch} data-toolbar-search-trigger=\"\">\n <Search />\n </Button>,\n places.button,\n )}\n {createPortal(\n <>\n <div className={clsx(s.Leading, s.SearchBack)}>\n <NavigationButton action=\"back\" aria-label=\"Close search\" tabIndex={open ? undefined : -1} onClick={closeSearch} />\n </div>\n <div ref={setField} className={clsx(s.Content, s.SearchField, className)} data-fill=\"\" {...restProps}>{children}</div>\n </>,\n places.layer,\n )}\n </>\n )\n}\nToolbarSearch.displayName = \"Toolbar.Search\"\n\n/** Buttons that share one capsule. */\nfunction ToolbarGroup({ className, ...restProps }: ToolbarSlotProps) {\n return <div role=\"group\" className={clsx(s.Group, className)} {...restProps} />\n}\nToolbarGroup.displayName = \"Toolbar.Group\"\n\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 */\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.\n */\nfunction ToolbarRow({ className, ref, ...restProps }: ToolbarSlotProps) {\n const host = useContext(ToolbarHostContext)\n const titleStyle = useContext(ToolbarTitleStyleContext)\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 = titleStyle === \"large\" && !!host?.requestLargeTitleSlot\n const requestSlot = large ? host?.requestLargeTitleSlot : undefined\n const slot = large ? host?.largeTitleRowSlot ?? null : null\n useLayoutEffect(() => requestSlot?.(), [requestSlot])\n const element = useRef<HTMLDivElement | null>(null)\n const anchor = useRef<HTMLSpanElement | null>(null)\n const setRef = useCallback((node: HTMLDivElement | null) => {\n element.current = node\n if (typeof ref === \"function\") return ref(node)\n if (ref) ref.current = node\n }, [ref])\n useLayoutEffect(() => {\n if (!slot || !anchor.current || !element.current) return\n return followRowOrder(anchor.current, element.current)\n }, [slot])\n const row = <div ref={setRef} className={clsx(s.Row, className)} data-toolbar-row=\"\" data-in-content={slot ? \"\" : undefined} {...restProps} />\n // Under a large title the row waits for its place in the content (it comes before the first paint) and never stands\n // in the bar first: moving it from the bar into the portal would mount its children again, and a switcher that holds\n // its own selection would lose it (Codex #5). A host with no content to keep the title in (a Sheet without a body)\n // keeps it in the bar.\n if (large && slot) return <>{createPortal(row, slot)}<span ref={anchor} data-toolbar-row-anchor=\"\" hidden /></>\n if (large && host?.holdsLargeTitle !== false) return null\n return row\n}\nToolbarRow.displayName = \"Toolbar.Row\"\n\nexport type ToolbarTitleProps = Omit<HTMLAttributes<HTMLHeadingElement>, \"children\"> & {\n children: ReactNode\n /** A second, smaller line below the title. */\n subtitle?: ReactNode\n /**\n * Heading level. In a Dialog the dialog's own title names the Sheet, so the bar title is hidden from\n * assistive technology there. @default \"h1\"\n */\n as?: \"h1\" | \"h2\" | \"h3\"\n ref?: Ref<HTMLHeadingElement>\n}\n\nfunction ToolbarTitle({ children, subtitle, as, className, ref, ...restProps }: ToolbarTitleProps) {\n const host = useContext(ToolbarHostContext)\n const titleStyle = useContext(ToolbarTitleStyleContext)\n const bar = useContext(ToolbarElementContext)\n const headingRef = useRef<HTMLDivElement | null>(null)\n // A page, and a Dialog with its body, keep the title at the top of their content\n const large = titleStyle === \"large\" && !!host?.requestLargeTitleSlot\n const requestSlot = large ? host?.requestLargeTitleSlot : undefined\n const slot = large ? host?.largeTitleSlot ?? null : null\n const subscribeScroll = host?.subscribeScroll\n useLayoutEffect(() => requestSlot?.(), [requestSlot])\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 useLayoutEffect(() => {\n const heading = headingRef.current\n if (!slot || !bar || !heading || !subscribeScroll) return\n return followLargeTitle(bar, heading, subscribeScroll)\n }, [bar, slot, subscribeScroll])\n const decorative = host?.kind === \"dialog\"\n const Tag = as ?? \"h1\"\n const hasSubtitle = subtitle != null && subtitle !== false && subtitle !== \"\"\n const heading = (\n <div ref={headingRef} className={s.Heading} aria-hidden={decorative || undefined} data-in-content={slot ? \"\" : undefined}>\n <Tag ref={ref} className={clsx(s.Title, className)} {...restProps}>{children}</Tag>\n {hasSubtitle && <p className={s.Subtitle}>{subtitle}</p>}\n </div>\n )\n if (!large) return heading\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 return (\n <>\n {slot ? createPortal(heading, slot) : heading}\n <span className={s.CollapsedTitle} aria-hidden=\"true\">\n {hasSubtitle ? <><span className={s.CollapsedLine}>{children}</span><span className={s.CollapsedSubtitle}>{subtitle}</span></> : children}\n </span>\n </>\n )\n}\nToolbarTitle.displayName = \"Toolbar.Title\"\n\n/* ------------------------------------------------------------------ */\n/* Compound */\n/* ------------------------------------------------------------------ */\n\nexport const Toolbar = ToolbarRoot as typeof ToolbarRoot & {\n Leading: typeof ToolbarLeading\n Title: typeof ToolbarTitle\n Content: typeof ToolbarContent\n Group: typeof ToolbarGroup\n Trailing: typeof ToolbarTrailing\n Row: typeof ToolbarRow\n}\n\nToolbar.Leading = ToolbarLeading\nToolbar.Title = ToolbarTitle\nToolbar.Content = ToolbarContent\nToolbar.Group = ToolbarGroup\nToolbar.Trailing = ToolbarTrailing\nToolbar.Row = ToolbarRow\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,kBAAkB,GAYnB,MAAM,WAAW,CAAA","sourcesContent":["export {\n Toolbar,\n ToolbarHostContext,\n type BarBackground,\n type BarBackgroundAlias,\n type ToolbarBackground,\n type ToolbarContentProps,\n type ToolbarHost,\n type ToolbarPlacement,\n type ToolbarProps,\n type ToolbarSlotProps,\n type ToolbarTitleAlign,\n type ToolbarTitleProps,\n type ToolbarTitleStyle,\n} from \"./Toolbar\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,kBAAkB,GAanB,MAAM,WAAW,CAAA","sourcesContent":["export {\n Toolbar,\n ToolbarHostContext,\n type BarBackground,\n type BarBackgroundAlias,\n type ToolbarBackground,\n type ToolbarContentProps,\n type ToolbarHost,\n type ToolbarPlacement,\n type ToolbarProps,\n type ToolbarSearchPlacement,\n type ToolbarSlotProps,\n type ToolbarTitleAlign,\n type ToolbarTitleProps,\n type ToolbarTitleStyle,\n} from \"./Toolbar\"\n"]}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * An Accordion item opens and closes as an iOS 27.2 DisclosureGroup: the panel takes its height at once, its content
3
+ * shows through a clip that grows down from the trigger (the CSS keyframes of the panel), and what follows the item
4
+ * slides down into place, or up when it closes, by a transform. The page lays out once per toggle, not once a frame.
5
+ *
6
+ * The panel's `data-state` changing (or an open panel being inserted, as `asChild` does) is the toggle: a
7
+ * MutationObserver sees it after the framework has updated the DOM and before the frame paints, so the panel's height
8
+ * is known and what follows can be moved back to where it was, then let go. Each move is added to what the element
9
+ * already does (`composite: "add"`), so one item closing while another opens, a nested item inside a moving one, or a
10
+ * quick second toggle all sum to where the layout puts things. Time and curve are the panel's
11
+ * `--accordion-motion-duration` and `--accordion-motion-easing`, which its keyframes use too. With reduced motion,
12
+ * or a zero duration, nothing moves.
13
+ */
14
+ const toMilliseconds = (value) => {
15
+ const number = parseFloat(value);
16
+ if (!Number.isFinite(number))
17
+ return 0;
18
+ return value.trim().endsWith("ms") ? number : number * 1000;
19
+ };
20
+ /** The elements that follow an item, up to the outermost Accordion it is in: what moves when its panel resizes. */
21
+ const followersOf = (item, rootClass) => {
22
+ let top = item.closest(`.${rootClass}`);
23
+ while (top?.parentElement?.closest(`.${rootClass}`))
24
+ top = top.parentElement.closest(`.${rootClass}`);
25
+ const followers = [];
26
+ for (let node = item; node && node !== top; node = node.parentElement) {
27
+ for (let sibling = node.nextElementSibling; sibling; sibling = sibling.nextElementSibling) {
28
+ if (sibling instanceof HTMLElement)
29
+ followers.push(sibling);
30
+ }
31
+ }
32
+ return followers;
33
+ };
34
+ export function attachAccordionMotion(root, classes) {
35
+ if (typeof MutationObserver === "undefined" || typeof window === "undefined")
36
+ return () => { };
37
+ const all = new Set();
38
+ const closing = new Map();
39
+ const stopAll = () => {
40
+ for (const entry of [...closing.values()])
41
+ entry.release(true);
42
+ for (const animation of [...all])
43
+ animation.cancel();
44
+ all.clear();
45
+ };
46
+ const track = (animation) => {
47
+ all.add(animation);
48
+ const forget = () => all.delete(animation);
49
+ animation.addEventListener("finish", forget);
50
+ animation.addEventListener("cancel", forget);
51
+ return animation;
52
+ };
53
+ const toggle = (panel, opening) => {
54
+ const item = panel.parentElement;
55
+ if (!item?.classList.contains(classes.item) || typeof item.animate !== "function")
56
+ return;
57
+ // Opened again while it closes: its moves turn back to where they started, and nothing else is needed, as the
58
+ // panel never left the layout
59
+ const pending = closing.get(panel);
60
+ if (pending) {
61
+ if (opening) {
62
+ pending.release(false);
63
+ for (const animation of pending.animations) {
64
+ animation.reverse();
65
+ animation.addEventListener("finish", () => animation.cancel());
66
+ }
67
+ return;
68
+ }
69
+ pending.release(true);
70
+ }
71
+ const height = panel.getBoundingClientRect().height;
72
+ const style = getComputedStyle(panel);
73
+ const duration = toMilliseconds(style.getPropertyValue("--accordion-motion-duration"));
74
+ const easing = style.getPropertyValue("--accordion-motion-easing").trim() || "ease";
75
+ if (!height || !duration)
76
+ return;
77
+ const shift = { transform: `translateY(${-height}px)` };
78
+ const animations = followersOf(item, classes.root).map((follower) => track(follower.animate(opening ? [shift, { transform: "none" }] : [{ transform: "none" }, shift], {
79
+ duration,
80
+ easing,
81
+ composite: "add",
82
+ // Closing, what follows holds its place over the closed panel until the panel leaves the layout
83
+ fill: opening ? "none" : "forwards",
84
+ })));
85
+ if (opening || animations.length === 0)
86
+ return;
87
+ // The panel hides when its closing keyframes end; then what follows lets go of the shift, which the layout
88
+ // now gives it. A timer covers a panel whose animation never ends (removed, or its keyframes overridden).
89
+ let timer = 0;
90
+ const onEnd = (event) => {
91
+ if (event.target === panel)
92
+ entry.release(true);
93
+ };
94
+ const entry = {
95
+ animations,
96
+ release: (cancel) => {
97
+ window.clearTimeout(timer);
98
+ panel.removeEventListener("animationend", onEnd);
99
+ if (closing.get(panel) === entry)
100
+ closing.delete(panel);
101
+ if (cancel)
102
+ for (const animation of animations)
103
+ animation.cancel();
104
+ },
105
+ };
106
+ panel.addEventListener("animationend", onEnd);
107
+ timer = window.setTimeout(() => entry.release(true), duration + 100);
108
+ closing.set(panel, entry);
109
+ };
110
+ const isOwnPanel = (node) => node instanceof HTMLElement &&
111
+ node.classList.contains(classes.content) &&
112
+ node.closest(`.${classes.root}`) === root;
113
+ const observer = new MutationObserver((records) => {
114
+ if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
115
+ stopAll();
116
+ return;
117
+ }
118
+ for (const record of records) {
119
+ if (record.type === "attributes") {
120
+ const panel = record.target;
121
+ if (isOwnPanel(panel) && record.oldValue !== panel.dataset.state)
122
+ toggle(panel, panel.dataset.state === "open");
123
+ continue;
124
+ }
125
+ // A panel rendered only while open (`asChild`) arrives open
126
+ for (const node of record.addedNodes) {
127
+ if (isOwnPanel(node) && node.dataset.state === "open")
128
+ toggle(node, true);
129
+ }
130
+ }
131
+ });
132
+ observer.observe(root, {
133
+ subtree: true,
134
+ childList: true,
135
+ attributes: true,
136
+ attributeFilter: ["data-state"],
137
+ attributeOldValue: true,
138
+ });
139
+ return () => {
140
+ observer.disconnect();
141
+ stopAll();
142
+ };
143
+ }
144
+ //# sourceMappingURL=accordionMotion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordionMotion.js","sourceRoot":"","sources":["../../../src/lib/accordionMotion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;IACvC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;IAChC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAA;IACtC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAA;AAC7D,CAAC,CAAA;AAED,mHAAmH;AACnH,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAE,SAAiB,EAAE,EAAE;IAC3D,IAAI,GAAG,GAAuB,IAAI,CAAC,OAAO,CAAc,IAAI,SAAS,EAAE,CAAC,CAAA;IACxE,OAAO,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,IAAI,SAAS,EAAE,CAAC;QAAE,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAc,IAAI,SAAS,EAAE,CAAC,CAAA;I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AK,MAAM;oBAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;YAC3E,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE;QACrB,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,CAAC,YAAY,CAAC;QAC/B,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAA;IAEF,OAAO,GAAG,EAAE;QACV,QAAQ,CAAC,UAAU,EAAE,CAAA;QACrB,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;AACH,CAAC","sourcesContent":["/**\n * An Accordion item opens and closes as an iOS 27.2 DisclosureGroup: the panel takes its height at once, its content\n * shows through a clip that grows down from the trigger (the CSS keyframes of the panel), and what follows the item\n * slides down into place, or up when it closes, by a transform. The page lays out once per toggle, not once a frame.\n *\n * The panel's `data-state` changing (or an open panel being inserted, as `asChild` does) is the toggle: a\n * MutationObserver sees it after the framework has updated the DOM and before the frame paints, so the panel's height\n * is known and what follows can be moved back to where it was, then let go. Each move is added to what the element\n * already does (`composite: \"add\"`), so one item closing while another opens, a nested item inside a moving one, or a\n * quick second toggle all sum to where the layout puts things. Time and curve are the panel's\n * `--accordion-motion-duration` and `--accordion-motion-easing`, which its keyframes use too. With reduced motion,\n * or a zero duration, nothing moves.\n */\n\ntype Classes = { root: string; item: string; content: string }\n\nconst toMilliseconds = (value: string) => {\n const number = parseFloat(value)\n if (!Number.isFinite(number)) return 0\n return value.trim().endsWith(\"ms\") ? number : number * 1000\n}\n\n/** The elements that follow an item, up to the outermost Accordion it is in: what moves when its panel resizes. */\nconst followersOf = (item: HTMLElement, rootClass: string) => {\n let top: HTMLElement | null = item.closest<HTMLElement>(`.${rootClass}`)\n while (top?.parentElement?.closest(`.${rootClass}`)) top = top.parentElement.closest<HTMLElement>(`.${rootClass}`)\n const followers: HTMLElement[] = []\n for (let node: Element | null = item; node && node !== top; node = node.parentElement) {\n for (let sibling = node.nextElementSibling; sibling; sibling = sibling.nextElementSibling) {\n if (sibling instanceof HTMLElement) followers.push(sibling)\n }\n }\n return followers\n}\n\n/** A closing panel's moves, held until the panel leaves the layout. */\ntype Closing = { animations: Animation[]; release: (cancel: boolean) => void }\n\nexport function attachAccordionMotion(root: HTMLElement, classes: Classes): () => void {\n if (typeof MutationObserver === \"undefined\" || typeof window === \"undefined\") return () => {}\n const all = new Set<Animation>()\n const closing = new Map<HTMLElement, Closing>()\n\n const stopAll = () => {\n for (const entry of [...closing.values()]) entry.release(true)\n for (const animation of [...all]) animation.cancel()\n all.clear()\n }\n\n const track = (animation: Animation) => {\n all.add(animation)\n const forget = () => all.delete(animation)\n animation.addEventListener(\"finish\", forget)\n animation.addEventListener(\"cancel\", forget)\n return animation\n }\n\n const toggle = (panel: HTMLElement, opening: boolean) => {\n const item = panel.parentElement\n if (!item?.classList.contains(classes.item) || typeof item.animate !== \"function\") return\n\n // Opened again while it closes: its moves turn back to where they started, and nothing else is needed, as the\n // panel never left the layout\n const pending = closing.get(panel)\n if (pending) {\n if (opening) {\n pending.release(false)\n for (const animation of pending.animations) {\n animation.reverse()\n animation.addEventListener(\"finish\", () => animation.cancel())\n }\n return\n }\n pending.release(true)\n }\n\n const height = panel.getBoundingClientRect().height\n const style = getComputedStyle(panel)\n const duration = toMilliseconds(style.getPropertyValue(\"--accordion-motion-duration\"))\n const easing = style.getPropertyValue(\"--accordion-motion-easing\").trim() || \"ease\"\n if (!height || !duration) return\n\n const shift = { transform: `translateY(${-height}px)` }\n const animations = followersOf(item, classes.root).map((follower) =>\n track(\n follower.animate(opening ? [shift, { transform: \"none\" }] : [{ transform: \"none\" }, shift], {\n duration,\n easing,\n composite: \"add\",\n // Closing, what follows holds its place over the closed panel until the panel leaves the layout\n fill: opening ? \"none\" : \"forwards\",\n }),\n ),\n )\n if (opening || animations.length === 0) return\n\n // The panel hides when its closing keyframes end; then what follows lets go of the shift, which the layout\n // now gives it. A timer covers a panel whose animation never ends (removed, or its keyframes overridden).\n let timer = 0\n const onEnd = (event: AnimationEvent) => {\n if (event.target === panel) entry.release(true)\n }\n const entry: Closing = {\n animations,\n release: (cancel) => {\n window.clearTimeout(timer)\n panel.removeEventListener(\"animationend\", onEnd)\n if (closing.get(panel) === entry) closing.delete(panel)\n if (cancel) for (const animation of animations) animation.cancel()\n },\n }\n panel.addEventListener(\"animationend\", onEnd)\n timer = window.setTimeout(() => entry.release(true), duration + 100)\n closing.set(panel, entry)\n }\n\n const isOwnPanel = (node: Node): node is HTMLElement =>\n node instanceof HTMLElement &&\n node.classList.contains(classes.content) &&\n node.closest(`.${classes.root}`) === root\n\n const observer = new MutationObserver((records) => {\n if (window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) {\n stopAll()\n return\n }\n for (const record of records) {\n if (record.type === \"attributes\") {\n const panel = record.target\n if (isOwnPanel(panel) && record.oldValue !== panel.dataset.state) toggle(panel, panel.dataset.state === \"open\")\n continue\n }\n // A panel rendered only while open (`asChild`) arrives open\n for (const node of record.addedNodes) {\n if (isOwnPanel(node) && node.dataset.state === \"open\") toggle(node, true)\n }\n }\n })\n observer.observe(root, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: [\"data-state\"],\n attributeOldValue: true,\n })\n\n return () => {\n observer.disconnect()\n stopAll()\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { createContext, useContext } from "react";
1
+ import { createContext, useContext, useLayoutEffect, useRef } from "react";
2
2
  /**
3
3
  * True in a `Field row` whose control ends the row. It stands there beside
4
4
  * buttons and tags, so it takes their shape; a field with its label above stays
@@ -16,4 +16,76 @@ export const useFieldRowPill = (pill) => {
16
16
  const inRow = useFieldRow();
17
17
  return pill ?? inRow;
18
18
  };
19
+ const ANDROID_LOOK = '[data-platform="android"]';
20
+ const BLANK = " ";
21
+ /**
22
+ * In the Plex Android look a text field under its label (a vertical `Field row` with the label shown) is a field of
23
+ * an input card: the label stands in the field while it is empty, which the styles tell by `:placeholder-shown`. That
24
+ * needs a placeholder, so there a field without one gets a blank one; elsewhere (iOS, the desktop) nothing is added.
25
+ * `start` gives it and follows the platform and the field's own placeholder, `sync` checks again after a render,
26
+ * `stop` takes it back.
27
+ */
28
+ export function blankPlaceholder(controlId) {
29
+ let given = null;
30
+ let observer = null;
31
+ const release = () => {
32
+ if (given?.getAttribute("placeholder") === BLANK)
33
+ given.removeAttribute("placeholder");
34
+ given = null;
35
+ };
36
+ let watched = null;
37
+ const sync = () => {
38
+ if (typeof document === "undefined")
39
+ return;
40
+ const control = document.getElementById(controlId());
41
+ // Watch only this field's own placeholder (and, from `start`, the root's platform), never the whole document
42
+ if (observer && control && control !== watched) {
43
+ observer.observe(control, { attributes: true, attributeFilter: ["placeholder"] });
44
+ watched = control;
45
+ }
46
+ const input = (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) &&
47
+ control.matches('[data-slot="input"] > input, [data-slot="textarea"] > textarea') &&
48
+ control.closest(ANDROID_LOOK)
49
+ ? control
50
+ : null;
51
+ if (given && given !== input)
52
+ release();
53
+ if (input && !input.hasAttribute("placeholder")) {
54
+ input.setAttribute("placeholder", BLANK);
55
+ given = input;
56
+ }
57
+ };
58
+ const start = () => {
59
+ if (!observer && typeof MutationObserver !== "undefined" && typeof document !== "undefined") {
60
+ observer = new MutationObserver(sync);
61
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["data-platform"] });
62
+ }
63
+ sync();
64
+ };
65
+ const stop = () => {
66
+ observer?.disconnect();
67
+ observer = null;
68
+ watched = null;
69
+ release();
70
+ };
71
+ return { start, sync, stop };
72
+ }
73
+ /** `blankPlaceholder` for a Field: on while `active` (a vertical row with its label shown). */
74
+ export function useBlankPlaceholder(controlId, active) {
75
+ const current = useRef(null);
76
+ useLayoutEffect(() => {
77
+ if (!active)
78
+ return;
79
+ const blank = blankPlaceholder(() => controlId);
80
+ blank.start();
81
+ current.current = blank;
82
+ return () => {
83
+ blank.stop();
84
+ current.current = null;
85
+ };
86
+ }, [active, controlId]);
87
+ useLayoutEffect(() => {
88
+ current.current?.sync();
89
+ });
90
+ }
19
91
  //# sourceMappingURL=fieldRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fieldRow.js","sourceRoot":"","sources":["../../../src/lib/fieldRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;AAEnD,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;AAE5D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;AAEvD,oFAAoF;AACpF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAEpE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAyB,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,WAAW,EAAE,CAAA;IAC3B,OAAO,IAAI,IAAI,KAAK,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { createContext, useContext } from \"react\"\n\n/**\n * True in a `Field row` whose control ends the row. It stands there beside\n * buttons and tags, so it takes their shape; a field with its label above stays\n * rounded.\n */\nexport const FieldRowContext = createContext(false)\n\n/** True when the control ends a `Field row`. */\nexport const useFieldRow = () => useContext(FieldRowContext)\n\n/** True in a `FieldGroup columns`, where every value starts at one column. */\nexport const FieldColumnsContext = createContext(false)\n\n/** True when the control's value starts at the column of a `FieldGroup columns`. */\nexport const useFieldColumns = () => useContext(FieldColumnsContext)\n\n/** The control's own `pill`, or else the shape of its row. */\nexport const useFieldRowPill = (pill: boolean | undefined) => {\n const inRow = useFieldRow()\n return pill ?? inRow\n}\n"]}
1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EAAE,UAAU,EAAE,CAAA;QACtB,QAAQ,GAAG,IAAI,CAAA;QACf,OAAO,GAAG,IAAI,CAAA;QACd,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AAC9B,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,MAAe;IACpE,MAAM,OAAO,GAAG,MAAM,CAA6C,IAAI,CAAC,CAAA;IACxE,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,MAAM;YAAE,OAAM;QACnB,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;QAC/C,KAAK,CAAC,KAAK,EAAE,CAAA;QACb,OAAO,CAAC,OAAO,GAAG,KAAK,CAAA;QACvB,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,IAAI,EAAE,CAAA;YACZ,OAAO,CAAC,OAAO,GAAG,IAAI,CAAA;QACxB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA;IACvB,eAAe,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { createContext, useContext, useLayoutEffect, useRef } from \"react\"\n\n/**\n * True in a `Field row` whose control ends the row. It stands there beside\n * buttons and tags, so it takes their shape; a field with its label above stays\n * rounded.\n */\nexport const FieldRowContext = createContext(false)\n\n/** True when the control ends a `Field row`. */\nexport const useFieldRow = () => useContext(FieldRowContext)\n\n/** True in a `FieldGroup columns`, where every value starts at one column. */\nexport const FieldColumnsContext = createContext(false)\n\n/** True when the control's value starts at the column of a `FieldGroup columns`. */\nexport const useFieldColumns = () => useContext(FieldColumnsContext)\n\n/** The control's own `pill`, or else the shape of its row. */\nexport const useFieldRowPill = (pill: boolean | undefined) => {\n const inRow = useFieldRow()\n return pill ?? inRow\n}\n\nconst ANDROID_LOOK = '[data-platform=\"android\"]'\nconst BLANK = \" \"\n\n/**\n * In the Plex Android look a text field under its label (a vertical `Field row` with the label shown) is a field of\n * an input card: the label stands in the field while it is empty, which the styles tell by `:placeholder-shown`. That\n * needs a placeholder, so there a field without one gets a blank one; elsewhere (iOS, the desktop) nothing is added.\n * `start` gives it and follows the platform and the field's own placeholder, `sync` checks again after a render,\n * `stop` takes it back.\n */\nexport function blankPlaceholder(controlId: () => string) {\n let given: HTMLInputElement | HTMLTextAreaElement | null = null\n let observer: MutationObserver | null = null\n const release = () => {\n if (given?.getAttribute(\"placeholder\") === BLANK) given.removeAttribute(\"placeholder\")\n given = null\n }\n let watched: Element | null = null\n const sync = () => {\n if (typeof document === \"undefined\") return\n const control = document.getElementById(controlId())\n // Watch only this field's own placeholder (and, from `start`, the root's platform), never the whole document\n if (observer && control && control !== watched) {\n observer.observe(control, { attributes: true, attributeFilter: [\"placeholder\"] })\n watched = control\n }\n const input =\n (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) &&\n control.matches('[data-slot=\"input\"] > input, [data-slot=\"textarea\"] > textarea') &&\n control.closest(ANDROID_LOOK)\n ? control\n : null\n if (given && given !== input) release()\n if (input && !input.hasAttribute(\"placeholder\")) {\n input.setAttribute(\"placeholder\", BLANK)\n given = input\n }\n }\n const start = () => {\n if (!observer && typeof MutationObserver !== \"undefined\" && typeof document !== \"undefined\") {\n observer = new MutationObserver(sync)\n observer.observe(document.documentElement, { attributes: true, attributeFilter: [\"data-platform\"] })\n }\n sync()\n }\n const stop = () => {\n observer?.disconnect()\n observer = null\n watched = null\n release()\n }\n return { start, sync, stop }\n}\n\n/** `blankPlaceholder` for a Field: on while `active` (a vertical row with its label shown). */\nexport function useBlankPlaceholder(controlId: string, active: boolean) {\n const current = useRef<ReturnType<typeof blankPlaceholder> | null>(null)\n useLayoutEffect(() => {\n if (!active) return\n const blank = blankPlaceholder(() => controlId)\n blank.start()\n current.current = blank\n return () => {\n blank.stop()\n current.current = null\n }\n }, [active, controlId])\n useLayoutEffect(() => {\n current.current?.sync()\n })\n}\n"]}