@plexui/ui 0.48.0 → 0.49.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.
Files changed (37) hide show
  1. package/dist/es/components/Dialog/Dialog.js +86 -7
  2. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  3. package/dist/es/components/Dialog/index.js.map +1 -1
  4. package/dist/es/components/Field/Field.js +2 -2
  5. package/dist/es/components/Field/Field.js.map +1 -1
  6. package/dist/es/components/FileUpload/FileUpload.js +3 -2
  7. package/dist/es/components/FileUpload/FileUpload.js.map +1 -1
  8. package/dist/es/components/Icon/index.js +2 -0
  9. package/dist/es/components/Icon/index.js.map +1 -1
  10. package/dist/es/components/Icon/svg/ZoomIn.js +5 -0
  11. package/dist/es/components/Icon/svg/ZoomIn.js.map +1 -0
  12. package/dist/es/components/Icon/svg/ZoomOut.js +5 -0
  13. package/dist/es/components/Icon/svg/ZoomOut.js.map +1 -0
  14. package/dist/es/components/Popover/Popover.js +21 -2
  15. package/dist/es/components/Popover/Popover.js.map +1 -1
  16. package/dist/es/components/Slider/Slider.js +9 -3
  17. package/dist/es/components/Slider/Slider.js.map +1 -1
  18. package/dist/es/components/Sortable/Sortable.js +2 -2
  19. package/dist/es/components/Sortable/Sortable.js.map +1 -1
  20. package/dist/es/components/Sortable/index.js.map +1 -1
  21. package/dist/es/components/Tabs/Tabs.js +1 -1
  22. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  23. package/dist/es/lib/sortable.js +16 -4
  24. package/dist/es/lib/sortable.js.map +1 -1
  25. package/dist/types/components/Dialog/Dialog.d.ts +20 -1
  26. package/dist/types/components/Dialog/index.d.ts +1 -1
  27. package/dist/types/components/Field/Field.d.ts +12 -4
  28. package/dist/types/components/FileUpload/FileUpload.d.ts +11 -0
  29. package/dist/types/components/Icon/index.d.ts +2 -0
  30. package/dist/types/components/Icon/svg/ZoomIn.d.ts +6 -0
  31. package/dist/types/components/Icon/svg/ZoomOut.d.ts +6 -0
  32. package/dist/types/components/Popover/Popover.d.ts +7 -0
  33. package/dist/types/components/Slider/Slider.d.ts +9 -0
  34. package/dist/types/components/Sortable/Sortable.d.ts +13 -2
  35. package/dist/types/components/Sortable/index.d.ts +1 -1
  36. package/dist/types/lib/sortable.d.ts +3 -0
  37. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC1G,OAAO,EAAoE,MAAM,aAAa,CAAA;AAC9F,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,CAAC,MAAM,gDAAgD,CAAA;AA6G9D,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAmB,EAAE,QAAQ,GAAG,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,KAAK,EA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ACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AACd,wBAAwB;AACxB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { ToggleGroup } from \"radix-ui\"\nimport {\n Children,\n cloneElement,\n createContext,\n Fragment,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ReactElement,\n type ReactNode,\n} from \"react\"\nimport { useResizeObserver } from \"usehooks-ts\"\nimport { handlePressableMouseEnter, prefersReducedMotion, waitForAnimationFrame } from \"../../lib/helpers\"\nimport { type ControlSize, type SemanticColors, type Sizes, type Variants } from \"../../types\"\nimport { CheckMd, ChevronDownMd } from \"../Icon\"\nimport { LoadingIndicator } from \"../Indicator\"\nimport { Menu } from \"../Menu\"\nimport { visibleTabCount } from \"./overflow\"\nimport { equalizeSegments, watchSegments } from \"./segments\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\nexport type TabsProps<T extends string> = {\n /**\n * Controlled value for the group\n */\n \"value\": T\n /** Callback for when a new value is selected */\n \"onChange\"?: (nextValue: T) => void\n /** Callback any time the control is clicked (even if a new value was not selected) */\n \"onClick\"?: () => void\n /**\n * Text read aloud to screen readers when the control is focused\n */\n \"aria-label\": string\n /**\n * Visual variant of the tab group\n * - `\"segmented\"` — background container with sliding highlight (default)\n * - `\"underline\"` — no background, animated line indicator under active tab\n * @default \"segmented\"\n */\n \"variant\"?: TabsVariant\n /**\n * Orientation of the tab layout\n * @default \"horizontal\"\n */\n \"orientation\"?: TabsOrientation\n /**\n * Controls the size of the tabs\n *\n * | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl |\n * | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |\n * | `22px` | `24px` | `26px` | `28px` | `32px` | `36px` | `40px` | `44px` | `48px` |\n *\n * On a phone horizontal tabs take the two sizes of the iOS 27 segmented control: `sm` and smaller the small 32px\n * one, `md` and larger the large 48px one (49px with `mobileMaterial=\"flat\"`).\n *\n * @default md\n */\n \"size\"?: ControlSize\n /**\n * Controls gutter on the edges of the button, defaults to value from `size`.\n *\n * | 2xs | xs | sm | md | lg | xl |\n * | ------ | ------ | ------ | ------ | ------ | ------ |\n * | `6px` | `8px` | `10px` | `12px` | `14px` | `16px` |\n */\n \"gutterSize\"?: Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">\n /** Disable the entire group */\n \"disabled\"?: boolean\n /**\n * Display the control as a block element with equal width segments\n * @default false\n */\n \"block\"?: boolean\n /**\n * Determines if the tabs should be a fully rounded pill shape.\n * Only applies to the `\"segmented\"` variant.\n * @default true\n */\n \"pill\"?: boolean\n /**\n * Flush underline style — removes tab padding so the indicator\n * matches the text width exactly, uses gap for spacing, and\n * removes the bottom border.\n * Only applies to the `\"underline\"` variant.\n * @default false\n */\n \"flush\"?: boolean\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or the tabs that do not fit move into a menu at the\n * end of the strip (`menu`). The menu button shows the active tab's name\n * when it is one of the hidden ones. Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n \"overflow\"?: \"scroll\" | \"menu\"\n /**\n * Text of the menu button with `overflow=\"menu\"`\n * @default \"More\"\n */\n \"overflowLabel\"?: string\n /**\n * Phone surface of horizontal tabs. On a phone the large control (`md` and larger) is the glass capsule of iOS 27\n * apps and the small one (`sm` and smaller) the plain capsule of SwiftUI's segmented Picker; `flat` gives the large\n * one the plain look of SwiftUI's `.controlSize(.large)`, and `glass` gives the small one `.glassEffect()`, as the\n * Button prop of the same name does for a button. Inside a phone Toolbar the control is the large glass one\n * anyway. Desktop keeps the chosen variant.\n * @default \"glass\" at md and larger, \"flat\" at sm and smaller\n */\n \"mobileMaterial\"?: \"glass\" | \"flat\"\n /**\n * Widths of the segments of horizontal tabs on a phone, as UISegmentedControl sets them. `equal` gives every\n * segment the widest one's width, its default; `content` gives each its label and the same air around it, as\n * `apportionsSegmentWidthsByContent` does, for a compact control. Equal segments that do not fit take their labels'\n * widths anyway; where those still do not fit, the air beside each label narrows, to 4px, and what still does not\n * fit scrolls. A `block` control fills its row either way. Desktop tabs always take their labels' widths.\n * @default \"equal\"\n */\n \"mobileSegmentWidth\"?: \"equal\" | \"content\"\n \"className\"?: string\n \"children\": React.ReactNode\n}\n\n/** Vertical tabs are a list on a phone, where the selected row shows a checkmark */\nconst TabsVerticalContext = createContext(false)\n\nexport const Tabs = <T extends string>({ overflow = \"scroll\", overflowLabel = \"More\", ...props }: TabsProps<T>) => {\n if (overflow === \"menu\" && !props.block && props.orientation !== \"vertical\") {\n return <OverflowTabs {...props} overflowLabel={overflowLabel} />\n }\n return <TabsRoot {...props} />\n}\n\nconst TabsRoot = <T extends string>({\n value,\n onChange,\n children,\n variant = \"segmented\",\n orientation = \"horizontal\",\n block,\n pill = true,\n flush,\n size = \"md\",\n gutterSize,\n mobileMaterial,\n mobileSegmentWidth,\n className,\n onClick,\n ...restProps\n}: Omit<TabsProps<T>, \"overflow\" | \"overflowLabel\">) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const thumbRef = useRef<HTMLDivElement>(null)\n const prevSizeRef = useRef(size)\n const prevValueRef = useRef(value)\n const isVertical = orientation === \"vertical\"\n\n const applyThumbSizing = useCallback(\n (attemptScroll: boolean) => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n // Get selected node\n const activeNode = root?.querySelector<HTMLDivElement>('[data-state=\"on\"]')\n\n // Impossible\n if (!activeNode) {\n return\n }\n\n if (isVertical) {\n const rootHeight = root.clientHeight\n let targetHeight = Math.floor(activeNode.clientHeight)\n const targetOffset = activeNode.offsetTop\n\n // Detect subpixel edge case\n if (rootHeight - (targetHeight + targetOffset) < 2) {\n targetHeight = targetHeight - 1\n }\n\n thumb.style.height = `${Math.floor(targetHeight)}px`\n thumb.style.width = \"\"\n thumb.style.transform = `translateY(${targetOffset}px)`\n\n // Scroll into view if needed\n if (root.scrollHeight > rootHeight) {\n const buffer = rootHeight * 0.15\n const scrollTop = root.scrollTop\n const top = activeNode.offsetTop\n const bottom = top + targetHeight\n if (top < scrollTop + buffer || bottom > scrollTop + rootHeight - buffer) {\n if (attemptScroll) {\n // Scroll the control only: scrollIntoView also scrolls the page to it (a switch to Phone\n // re-rendered a control far down the page and slid the page to it, owner 08.11)\n root.scrollTo({ top: top - (rootHeight - targetHeight) / 2, behavior: prefersReducedMotion() ? \"auto\" : \"smooth\" })\n }\n }\n }\n } else {\n const rootWidth = root.clientWidth\n let targetWidth = Math.floor(activeNode.clientWidth)\n const targetOffset = activeNode.offsetLeft\n\n // Detect if the thumb is moving too far to the edge of the container.\n // This would most commonly be due to subpixel widths adding up to excessive distance.\n if (rootWidth - (targetWidth + targetOffset) < 2) {\n targetWidth = targetWidth - 1\n }\n\n thumb.style.width = `${Math.floor(targetWidth)}px`\n thumb.style.height = \"\"\n thumb.style.transform = `translateX(${targetOffset}px)`\n\n // If the control is scrollable, ensure the active option is visible\n if (root.scrollWidth > rootWidth) {\n // Only scroll items near the edge, but not the inner 2/3.\n const buffer = rootWidth * 0.15\n const scrollLeft = root.scrollLeft\n const left = activeNode.offsetLeft\n const right = left + targetWidth\n if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n if (attemptScroll) {\n // Scroll the control only: scrollIntoView also scrolls the page to it (a switch to Phone\n // re-rendered a control far down the page and slid the page to it, owner 08.11)\n root.scrollTo({ left: left - (rootWidth - targetWidth) / 2, behavior: prefersReducedMotion() ? \"auto\" : \"smooth\" })\n }\n }\n }\n }\n },\n [isVertical],\n )\n\n useResizeObserver({\n // @ts-expect-error(2322) -- bug in types: https://github.com/juliencrn/usehooks-ts/issues/663\n ref: rootRef,\n onResize: () => {\n const thumb = thumbRef.current\n\n if (!thumb) {\n return\n }\n\n // Perform the size update instantly\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n },\n })\n\n // Tabs added, removed, reordered or relabelled move the active tab without\n // resizing the group: measure again, instantly, like a resize\n useEffect(() => {\n const root = rootRef.current\n if (!root || typeof MutationObserver === \"undefined\") return\n const observer = new MutationObserver(() => {\n const thumb = thumbRef.current\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { childList: true, characterData: true, subtree: true })\n return () => observer.disconnect()\n }, [applyThumbSizing])\n\n // A phone's segmented control at its own width gives every segment the widest one's width, as UISegmentedControl\n // does in iOS 27.2; where that does not fit, each segment takes its label and the same air around it, as\n // apportionsSegmentWidthsByContent does (ref-app segmented-hug, 13.11). A grid that hugs its content cannot take the\n // widest track for each by itself, so this measures it. Runs before the thumb measures (declared first).\n useLayoutEffect(() => {\n equalizeSegments(rootRef.current, thumbRef.current)\n })\n\n useEffect(() => {\n const root = rootRef.current\n if (!root) return\n // The room, the breakpoint or the font changes. The segments can change without the control changing size, so the\n // thumb follows them here, instantly, like a resize.\n return watchSegments(root, () => thumbRef.current, () => {\n const thumb = thumbRef.current\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n })\n }, [applyThumbSizing])\n\n const transitionProperty = isVertical\n ? \"height var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter)), transform var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter))\"\n : \"width var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter)), transform var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter))\"\n\n useLayoutEffect(() => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n const sizeChanged = prevSizeRef.current !== size\n prevSizeRef.current = size\n const valueChanged = prevValueRef.current !== value\n prevValueRef.current = value\n\n if (sizeChanged) {\n // Size changed - disable transition, wait for CSS, then apply sizing\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n\n waitForAnimationFrame(() => {\n applyThumbSizing(false)\n waitForAnimationFrame(() => {\n thumb.style.transition = currentTransition\n })\n })\n } else if (thumb.style.transition) {\n // Normal update (value change, etc.): the thumb leaves with the label's colour\n const from = valueChanged ? thumbBox(thumb) : null\n applyThumbSizing(true)\n if (valueChanged) playThumbLens(thumb, from)\n } else {\n // First measure: apply transition after initial calculation is set\n waitForAnimationFrame(() => {\n applyThumbSizing(false)\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n })\n }\n // mobileSegmentWidth moves the segments with nothing else changing: the thumb follows them\n }, [applyThumbSizing, value, size, gutterSize, pill, flush, mobileSegmentWidth, transitionProperty])\n\n const handleValueChange = (nextValue: T) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue && onChange) onChange(nextValue)\n }\n\n // Only apply pill for segmented variant\n const isPill = variant === \"segmented\" && pill\n // Only apply flush for underline variant\n const isFlush = variant === \"underline\" && flush\n\n return (\n <ToggleGroup.Root\n ref={rootRef}\n className={clsx(s.Tabs, className)}\n type=\"single\"\n value={value}\n loop={false}\n onValueChange={handleValueChange}\n onClick={onClick}\n data-variant={variant}\n data-orientation={orientation}\n data-block={block ? \"\" : undefined}\n data-pill={isPill ? \"\" : undefined}\n data-flush={isFlush ? \"\" : undefined}\n data-size={size}\n data-gutter-size={gutterSize}\n data-mobile-material={mobileMaterial}\n data-mobile-segment-width={mobileSegmentWidth}\n data-disabled={restProps.disabled ? \"\" : undefined}\n {...restProps}\n >\n <div className={s.TabsThumb} ref={thumbRef} />\n <TabsVerticalContext.Provider value={isVertical}>{children}</TabsVerticalContext.Provider>\n </ToggleGroup.Root>\n )\n}\n\n/**\n * Badge configuration for Tabs.Tab\n */\nexport type TabsBadgeProp =\n | React.ReactNode\n | {\n content: React.ReactNode\n color?: SemanticColors<\n \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\"\n >\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\nexport type TabProps = {\n /**\n * Tab value\n */\n \"value\": string\n /**\n * Text read aloud to screen readers when the tab is focused\n */\n \"aria-label\"?: string\n /**\n * Text content to render in the tab\n */\n \"children\"?: React.ReactNode\n /**\n * Icon to render before the text content\n */\n \"icon\"?: React.ReactNode\n /**\n * Badge to render after the text content.\n * Can be a simple value or an object with content, color, variant, and loading options.\n * @example badge={5}\n * @example badge={{ content: 5, color: \"danger\" }}\n */\n \"badge\"?: TabsBadgeProp\n /**\n * Disable the individual tab\n */\n \"disabled\"?: boolean\n}\n\n// Type guard for badge object form\nconst isBadgeObject = (\n badge: TabsBadgeProp,\n): badge is Exclude<TabsBadgeProp, React.ReactNode> & { content: React.ReactNode } => {\n return badge != null && typeof badge === \"object\" && \"content\" in badge\n}\n\n/** True when an icon draws text of its own: a string, a number, or a fragment or array holding one */\n\n/** A text icon (\"☀\") stands in an element, as an icon component does, so a phone can hide it beside a label: each\n * text in a fragment or array gets its own span and the elements beside it stay in place. An empty one draws\n * nothing. */\n// Arrays and fragments always go through Children.map, with or without text, so their children keep the same keys\n// when a text child comes or goes; a fragment keeps its element and key, so a new key still remounts its icons.\n/** On a phone the large control's selection travels as a lens of glass, as iOS 27.2 draws it. Recorded frame by frame\n * 11.11 (ref-app segmented-bar-text4, a toolbar Picker of Day, Week, Month and Year switched Day to Year and back,\n * after the owner's «анимация не правильная и стиль» and «day<->year пробуй переключать»; segmented-bar-symbols, a\n * segment away, before it): the gray selection clears into a lens within 45ms, taller than the capsule (11pt) and\n * wider the faster it goes (36pt at 200ms), and carries across; it lands as the gray selection again by 300ms,\n * pressed against its segment's far side (7pt narrower, 6pt taller and its centre 2.5% of the way past at 430ms), and\n * springs back by 750ms while the label under it dims to 76% and comes back. The centre's path is a share of the\n * distance and the growth is in points, as both recordings show: as much growth a segment away as three. touch.css\n * names the lens's growth on the large control only, so everywhere else the selection just slides with its\n * transition. CSS has no refraction, so the lens is its rim, its tint and the capsule's edge seen through it. */\nlet lensRun = 0\nconst LENS_ID = \"segmented-control-lens\"\nconst LENS_DURATION = 750\n// At each measured frame: [ms, the centre's share of the distance, share of the growth's width, share of its height]\nconst LENS_PATH = [\n [0, 0, 0, 0],\n [10, 0.014, 0.036, 0.065],\n [32, 0.077, 0.13, 0.19],\n [47, 0.169, 0.22, 0.44],\n [70, 0.378, 0.44, 0.87],\n [92, 0.478, 0.52, 1],\n [125, 0.647, 0.7, 0.93],\n [150, 0.773, 0.85, 0.87],\n [182, 0.856, 0.96, 0.93],\n [205, 0.9, 1, 1],\n [227, 0.932, 0.96, 0.93],\n [245, 0.951, 0.8, 0.44],\n [262, 0.964, 0.67, 0.31],\n [295, 0.989, 0.37, 0.31],\n [330, 1.005, 0.13, 0.31],\n [363, 1.016, -0.02, 0.37],\n [395, 1.023, -0.13, 0.5],\n [430, 1.025, -0.19, 0.56],\n [497, 1.022, -0.19, 0.56],\n [545, 1.018, -0.17, 0.37],\n [597, 1.014, -0.11, 0.25],\n [647, 1.007, -0.075, 0.12],\n [697, 1.004, -0.036, 0],\n [750, 1, 0, 0],\n] as const\n// The selected label's opacity as the lens lands: [ms, opacity]\nconst LENS_LABEL = [\n [0, 1],\n [380, 1],\n [428, 0.77],\n [460, 0.76],\n [515, 0.85],\n [580, 0.93],\n [650, 0.98],\n [713, 1],\n [750, 1],\n] as const\ntype ThumbBox = { x: number; width: number }\ntype LensRun = { from: ThumbBox; to: ThumbBox; move: Animation; label?: Animation }\nconst lensRuns = new WeakMap<HTMLElement, LensRun>()\nconst round = (value: number) => Math.round(value * 100) / 100\n// The box the lens draws at a time of its run\nconst lensBox = ({ from, to }: LensRun, ms: number, growth: number): ThumbBox => {\n const next = LENS_PATH.findIndex(([time]) => time >= ms)\n const at = next < 0 ? LENS_PATH.length - 1 : Math.max(1, next)\n const [t0, share0, wide0] = LENS_PATH[at - 1]\n const [t1, share1, wide1] = LENS_PATH[Math.min(at, LENS_PATH.length - 1)]\n const k = t1 > t0 ? Math.min(1, Math.max(0, (ms - t0) / (t1 - t0))) : 1\n const share = share0 + (share1 - share0) * k\n const width = from.width + (to.width - from.width) * Math.min(share, 1) + growth * (wide0 + (wide1 - wide0) * k)\n return { x: from.x + from.width / 2 + (to.x + to.width / 2 - from.x - from.width / 2) * share - width / 2, width }\n}\n/** Where a horizontal thumb is drawn, from its control's left edge: where the script set it, or where a lens still\n * on its way has it, so a switch mid-flight sets off from there */\nconst thumbBox = (thumb: HTMLElement): ThumbBox | null => {\n const offset = /^translateX\\((-?[\\d.]+)px\\)$/.exec(thumb.style.transform)\n const width = parseFloat(thumb.style.width)\n if (!offset || !(width > 0)) return null\n const run = lensRuns.get(thumb)\n const ms = Number(run?.move.currentTime)\n if (run && (run.move.playState === \"running\" || run.move.playState === \"paused\") && ms >= 0) {\n const growth = lensGrowth(getComputedStyle(thumb))\n if (growth) return lensBox(run, ms, growth[0])\n }\n return { x: parseFloat(offset[1]), width }\n}\n// The lens's growth at its widest and tallest, which touch.css names on the large control only\nconst lensGrowth = (style: CSSStyleDeclaration) => {\n const [wide = Number.NaN, tall = wide] = style.getPropertyValue(\"--segmented-control-thumb-lens-outset\").trim().split(/\\s+/).map(parseFloat)\n return wide >= 0 && tall >= 0 ? ([wide, tall] as const) : null\n}\nconst playThumbLens = (thumb: HTMLElement, from: ThumbBox | null) => {\n if (typeof thumb.animate !== \"function\") return\n // A lens still on its way ends first, so the thumb's own fill and edge are read below (and none outlives a switch\n // to reduced motion)\n thumb.getAnimations().forEach((animation) => {\n if (animation.id === LENS_ID) animation.cancel()\n })\n lensRuns.get(thumb)?.label?.cancel()\n lensRuns.delete(thumb)\n if (!from || prefersReducedMotion()) return\n const style = getComputedStyle(thumb)\n const growth = lensGrowth(style)\n const to = thumbBox(thumb)\n const top = parseFloat(style.top)\n const bottom = parseFloat(style.bottom)\n if (!growth || !to || !Number.isFinite(top) || !Number.isFinite(bottom)) return\n const [wide, tall] = growth\n const timing = { id: LENS_ID, duration: LENS_DURATION }\n const run: LensRun = { from, to, move: undefined as unknown as Animation }\n // The thumb's box at each frame replaces its own while the lens runs (its transition is overridden); the height\n // grows about the middle\n run.move = thumb.animate(\n LENS_PATH.map(([ms, , , high]) => {\n const box = lensBox(run, ms, wide)\n const grown = (tall * high) / 2\n return {\n offset: ms / LENS_DURATION,\n transform: `translateX(${round(box.x)}px)`,\n width: `${round(Math.max(1, box.width))}px`,\n top: `${round(top - grown)}px`,\n bottom: `${round(bottom - grown)}px`,\n }\n }),\n timing,\n )\n const lens = {\n backgroundColor: style.getPropertyValue(\"--segmented-control-thumb-lens-background\").trim(),\n boxShadow: style.getPropertyValue(\"--segmented-control-thumb-lens-shadow\").trim(),\n }\n const rest = { backgroundColor: style.backgroundColor, boxShadow: style.boxShadow }\n // The gray clears as the lens lifts (45ms) and comes back as it lands (250 to 300ms)\n const fill = thumb.animate(\n [\n { offset: 0, ...rest },\n { offset: 45 / LENS_DURATION, ...lens },\n { offset: 250 / LENS_DURATION, ...lens },\n { offset: 300 / LENS_DURATION, ...rest },\n { offset: 1, ...rest },\n ],\n timing,\n )\n const root = thumb.parentElement\n const selected = root?.querySelector<HTMLElement>('[data-state=\"on\"]')\n if (selected && typeof selected.animate === \"function\") {\n run.label = selected.animate(\n LENS_LABEL.map(([ms, opacity]) => ({ offset: ms / LENS_DURATION, opacity })),\n timing,\n )\n }\n lensRuns.set(thumb, run)\n // The frame a switch is drawn in also lays out whatever the switch changes around the control, which can take a\n // few frames' time; the lens holds its first frame until then and sets off from the next, so none of its way is\n // skipped (a tap's first 45ms were, recorded in Safari 11.11)\n if (typeof requestAnimationFrame === \"function\") {\n const held = [run.move, fill, run.label].filter((animation): animation is Animation => typeof animation?.pause === \"function\")\n held.forEach((animation) => animation.pause())\n requestAnimationFrame(() => {\n held.forEach((animation) => {\n if (animation.playState === \"paused\") animation.play()\n })\n })\n }\n // The lens reaches past the capsule, which clips what scrolls in it: a control whose segments all fit lets it out\n // for the switch\n if (!root || root.scrollWidth > root.clientWidth + 1) return\n const id = String(++lensRun)\n root.setAttribute(\"data-lens\", id)\n const done = () => {\n if (root.getAttribute(\"data-lens\") === id) root.removeAttribute(\"data-lens\")\n }\n if (run.move?.finished) run.move.finished.then(done, done)\n else done()\n}\n\nconst renderTabIcon = (icon: React.ReactNode): React.ReactNode => {\n if (icon === \"\") return null\n if (typeof icon === \"string\" || typeof icon === \"number\") return <span>{icon}</span>\n if (Array.isArray(icon)) return Children.map(icon, renderTabIcon)\n if (isValidElement<{ children?: React.ReactNode }>(icon) && icon.type === Fragment) {\n return cloneElement(icon, undefined, Children.map(icon.props.children, renderTabIcon))\n }\n return icon\n}\n\nconst Tab = ({ children, icon, badge, ...restProps }: TabProps) => {\n // Normalize badge prop\n const badgeProps = badge != null ? (isBadgeObject(badge) ? badge : { content: badge }) : null\n const vertical = useContext(TabsVerticalContext)\n\n return (\n <ToggleGroup.Item\n className={s.Tab}\n {...restProps}\n onPointerEnter={handlePressableMouseEnter}\n >\n <span className={s.TabContent}>\n {renderTabIcon(icon)}\n {children && <span className={s.TabLabel}>{children}</span>}\n {badgeProps && (\n <span\n className={s.TabBadge}\n data-color={badgeProps.color ?? \"secondary\"}\n data-variant={badgeProps.variant ?? \"soft\"}\n data-pill={badgeProps.pill ? \"\" : undefined}\n >\n {badgeProps.loading ? <LoadingIndicator /> : badgeProps.content}\n </span>\n )}\n </span>\n {vertical && <CheckMd className={s.TabCheckmark} aria-hidden=\"true\" />}\n </ToggleGroup.Item>\n )\n}\n\n// =============================================\n// overflow=\"menu\"\n// =============================================\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype TabElement = ReactElement<TabProps>\n\n/** The tabs among the children, through fragments */\nconst tabElements = (children: ReactNode): TabElement[] =>\n Children.toArray(children).flatMap((child) => {\n if (!isValidElement<{ children?: ReactNode }>(child)) return []\n return child.type === Fragment ? tabElements(child.props.children) : [child as TabElement]\n })\n\nconst plainText = (node: unknown): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(plainText).join(\"\")\n if (isValidElement<{ children?: ReactNode }>(node)) return plainText(node.props.children)\n return \"\"\n}\n\nconst badgeText = (badge: TabsBadgeProp | undefined) =>\n badge != null && isBadgeObject(badge) ? plainText(badge.content) : plainText(badge)\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (item: TabElement) => plainText(item.props.children) || item.props[\"aria-label\"] || item.props.value\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (items: TabElement[]) =>\n items\n .map((item) =>\n [item.props.value, plainText(item.props.children), badgeText(item.props.badge), item.props.icon != null].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * `Menu.Trigger` sets `data-state` (open or closed) on its child, while a tab\n * keeps `on` or `off` in the same attribute and the thumb finds the active tab\n * by it. The menu's value does not reach the tab; its handlers and\n * `aria-haspopup` / `aria-expanded` do.\n */\nconst MoreTab = (props: TabProps & { \"data-state\"?: string }) => {\n const restProps = { ...props }\n delete restProps[\"data-state\"]\n return <Tab {...restProps} />\n}\n\nconst OverflowTabs = <T extends string>({\n children,\n value,\n onChange,\n overflowLabel,\n ...restProps\n}: Omit<TabsProps<T>, \"overflow\"> & { overflowLabel: string }) => {\n const items = tabElements(children)\n // The strip's own props size the tabs and the menu button too\n const { size, variant, gutterSize, pill, flush, mobileMaterial, mobileSegmentWidth } = restProps\n const signature = [overflowLabel, size, variant, gutterSize, pill, flush, mobileMaterial, mobileSegmentWidth, tabsSignature(items)].join(\"\\u0002\")\n const activeIndex = items.findIndex((item) => item.props.value === value)\n\n // null while the measuring pass renders every tab and the menu button\n const [visibleCount, setVisibleCount] = useState<number | null>(null)\n const [known, setKnown] = useState({ signature, activeIndex })\n const hostRef = useRef<HTMLDivElement>(null)\n const measuringRef = useRef(true)\n const boxWidthRef = useRef(-1)\n\n // New tabs measure again. A new active tab measures again when it moves\n // under the menu button or back out: the button carries the hidden one's name\n if (known.signature !== signature || known.activeIndex !== activeIndex) {\n const crossed =\n visibleCount !== null && (known.activeIndex >= visibleCount || activeIndex >= visibleCount)\n setKnown({ signature, activeIndex })\n if (visibleCount !== null && (known.signature !== signature || crossed)) setVisibleCount(null)\n }\n\n useLayoutEffect(() => {\n measuringRef.current = visibleCount === null\n }, [visibleCount])\n\n useLayoutEffect(() => {\n if (visibleCount !== null) return\n const root = hostRef.current?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n // The measuring pass renders every tab, then the menu button\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== items.length + 1) return\n\n const widths = buttons.map((button) => button.getBoundingClientRect().width)\n const moreButton = buttons[buttons.length - 1]\n const moreWidth = widths.pop() ?? 0\n const style = getComputedStyle(root)\n const available =\n root.getBoundingClientRect().width -\n (Number.parseFloat(style.paddingLeft) || 0) -\n (Number.parseFloat(style.paddingRight) || 0)\n const gap = Number.parseFloat(style.columnGap) || 0\n boxWidthRef.current = hostRef.current?.parentElement?.clientWidth ?? -1\n\n // A hidden strip has no width to decide by: show every tab, and measure\n // when it appears (the observer sees the width change)\n if (available <= 0) {\n // Resolve the zero-width measuring pass before paint; the resize observer\n // restarts measurement when this hidden strip becomes visible.\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setVisibleCount(items.length)\n return\n }\n\n // The button with the active tab's name: that tab's width plus the chevron\n const chevron = moreButton?.querySelector(\"svg\")\n const chevronWidth = chevron?.getBoundingClientRect().width ?? 0\n const labelGap = chevron?.parentElement ? Number.parseFloat(getComputedStyle(chevron.parentElement).columnGap) || 0 : 0\n const activeWidth = activeIndex < 0 ? 0 : (widths[activeIndex] ?? 0) + chevronWidth + labelGap\n\n // This result depends on committed DOM widths. Apply it before first paint\n // so the temporary full strip never flashes before overflowing tabs move.\n setVisibleCount(visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available))\n }, [visibleCount, items.length, activeIndex])\n\n // The width to fit is the container's, not the strip's: the strip shrinks\n // to its content. Reports during a measuring pass are skipped, since the\n // full strip may be pushing its container wider\n useEffect(() => {\n const box = hostRef.current?.parentElement\n if (!box || typeof ResizeObserver === \"undefined\") return\n const observer = new ResizeObserver(() => {\n if (measuringRef.current) return\n const width = box.clientWidth\n if (width === boxWidthRef.current) return\n boxWidthRef.current = width\n setVisibleCount(null)\n })\n observer.observe(box)\n return () => observer.disconnect()\n }, [])\n\n const measuring = visibleCount === null\n const shown = measuring ? items : items.slice(0, visibleCount)\n const hidden = measuring ? [] : items.slice(visibleCount)\n const hiddenActive = hidden.find((item) => item.props.value === value) ?? null\n\n return (\n <div ref={hostRef} className={s.OverflowHost}>\n <Menu>\n <TabsRoot<string>\n {...restProps}\n data-overflow=\"menu\"\n value={hiddenActive ? MORE_VALUE : value}\n onChange={(next) => {\n // Pressing the menu button opens the menu; it is not a tab\n if (next !== MORE_VALUE) onChange?.(next as T)\n }}\n >\n {/* Keyed by value: tabs from different fragments may share a key */}\n {shown.map((item) => cloneElement(item, { key: item.props.value }))}\n {(measuring || hidden.length > 0) && (\n <Menu.Trigger>\n <MoreTab value={MORE_VALUE}>\n <span className={s.OverflowLabel}>\n {hiddenActive ? tabLabel(hiddenActive) : overflowLabel}\n <ChevronDownMd />\n </span>\n </MoreTab>\n </Menu.Trigger>\n )}\n </TabsRoot>\n <Menu.Content align=\"end\" minWidth=\"auto\">\n <Menu.RadioGroup<string> value={value} onChange={(next) => onChange?.(next as T)}>\n {hidden.map((item) => {\n const count = badgeText(item.props.badge)\n return (\n <Menu.RadioItem<string>\n key={item.props.value}\n value={item.props.value}\n disabled={restProps.disabled || item.props.disabled}\n >\n {item.props.icon}\n {item.props.children ?? item.props[\"aria-label\"] ?? item.props.value}\n {/* A tab's count moves into the menu with it */}\n {count !== \"\" && <span className={s.OverflowBadge}>{count}</span>}\n </Menu.RadioItem>\n )\n })}\n </Menu.RadioGroup>\n </Menu.Content>\n </Menu>\n </div>\n )\n}\n\n// Attach sub-components\nTabs.Tab = Tab\n// Backward-compat alias\nTabs.Option = Tab\n"]}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC1G,OAAO,EAAoE,MAAM,aAAa,CAAA;AAC9F,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,CAAC,MAAM,gDAAgD,CAAA;AA6G9D,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG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AClB,CAAA;wBACH,CAAC,CAAC,GACc,GACL,IACV,GACH,CACP,CAAA;AACH,CAAC,CAAA;AAED,wBAAwB;AACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AACd,wBAAwB;AACxB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { ToggleGroup } from \"radix-ui\"\nimport {\n Children,\n cloneElement,\n createContext,\n Fragment,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ReactElement,\n type ReactNode,\n} from \"react\"\nimport { useResizeObserver } from \"usehooks-ts\"\nimport { handlePressableMouseEnter, prefersReducedMotion, waitForAnimationFrame } from \"../../lib/helpers\"\nimport { type ControlSize, type SemanticColors, type Sizes, type Variants } from \"../../types\"\nimport { CheckMd, ChevronDownMd } from \"../Icon\"\nimport { LoadingIndicator } from \"../Indicator\"\nimport { Menu } from \"../Menu\"\nimport { visibleTabCount } from \"./overflow\"\nimport { equalizeSegments, watchSegments } from \"./segments\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\nexport type TabsProps<T extends string> = {\n /**\n * Controlled value for the group\n */\n \"value\": T\n /** Callback for when a new value is selected */\n \"onChange\"?: (nextValue: T) => void\n /** Callback any time the control is clicked (even if a new value was not selected) */\n \"onClick\"?: () => void\n /**\n * Text read aloud to screen readers when the control is focused\n */\n \"aria-label\": string\n /**\n * Visual variant of the tab group\n * - `\"segmented\"` — background container with sliding highlight (default)\n * - `\"underline\"` — no background, animated line indicator under active tab\n * @default \"segmented\"\n */\n \"variant\"?: TabsVariant\n /**\n * Orientation of the tab layout\n * @default \"horizontal\"\n */\n \"orientation\"?: TabsOrientation\n /**\n * Controls the size of the tabs\n *\n * | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl |\n * | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |\n * | `22px` | `24px` | `26px` | `28px` | `32px` | `36px` | `40px` | `44px` | `48px` |\n *\n * On a phone horizontal tabs take the two sizes of the iOS 27 segmented control: `sm` and smaller the small 32px\n * one, `md` and larger the large 48px one (49px with `mobileMaterial=\"flat\"`).\n *\n * @default md\n */\n \"size\"?: ControlSize\n /**\n * Controls gutter on the edges of the button, defaults to value from `size`.\n *\n * | 2xs | xs | sm | md | lg | xl |\n * | ------ | ------ | ------ | ------ | ------ | ------ |\n * | `6px` | `8px` | `10px` | `12px` | `14px` | `16px` |\n */\n \"gutterSize\"?: Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">\n /** Disable the entire group */\n \"disabled\"?: boolean\n /**\n * Display the control as a block element with equal width segments\n * @default false\n */\n \"block\"?: boolean\n /**\n * Determines if the tabs should be a fully rounded pill shape.\n * Only applies to the `\"segmented\"` variant.\n * @default true\n */\n \"pill\"?: boolean\n /**\n * Flush underline style — removes tab padding so the indicator\n * matches the text width exactly, uses gap for spacing, and\n * removes the bottom border.\n * Only applies to the `\"underline\"` variant.\n * @default false\n */\n \"flush\"?: boolean\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or the tabs that do not fit move into a menu at the\n * end of the strip (`menu`). The menu button shows the active tab's name\n * when it is one of the hidden ones. Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n \"overflow\"?: \"scroll\" | \"menu\"\n /**\n * Text of the menu button with `overflow=\"menu\"`\n * @default \"More\"\n */\n \"overflowLabel\"?: string\n /**\n * Phone surface of horizontal tabs. On a phone the large control (`md` and larger) is the glass capsule of iOS 27\n * apps and the small one (`sm` and smaller) the plain capsule of SwiftUI's segmented Picker; `flat` gives the large\n * one the plain look of SwiftUI's `.controlSize(.large)`, and `glass` gives the small one `.glassEffect()`, as the\n * Button prop of the same name does for a button. Inside a phone Toolbar the control is the large glass one\n * anyway. Desktop keeps the chosen variant.\n * @default \"glass\" at md and larger, \"flat\" at sm and smaller\n */\n \"mobileMaterial\"?: \"glass\" | \"flat\"\n /**\n * Widths of the segments of horizontal tabs on a phone, as UISegmentedControl sets them. `equal` gives every\n * segment the widest one's width, its default; `content` gives each its label and the same air around it, as\n * `apportionsSegmentWidthsByContent` does, for a compact control. Equal segments that do not fit take their labels'\n * widths anyway; where those still do not fit, the air beside each label narrows, to 4px, and what still does not\n * fit scrolls. A `block` control fills its row either way. Desktop tabs always take their labels' widths.\n * @default \"equal\"\n */\n \"mobileSegmentWidth\"?: \"equal\" | \"content\"\n \"className\"?: string\n \"children\": React.ReactNode\n}\n\n/** Vertical tabs are a list on a phone, where the selected row shows a checkmark */\nconst TabsVerticalContext = createContext(false)\n\nexport const Tabs = <T extends string>({ overflow = \"scroll\", overflowLabel = \"More\", ...props }: TabsProps<T>) => {\n if (overflow === \"menu\" && !props.block && props.orientation !== \"vertical\") {\n return <OverflowTabs {...props} overflowLabel={overflowLabel} />\n }\n return <TabsRoot {...props} />\n}\n\nconst TabsRoot = <T extends string>({\n value,\n onChange,\n children,\n variant = \"segmented\",\n orientation = \"horizontal\",\n block,\n pill = true,\n flush,\n size = \"md\",\n gutterSize,\n mobileMaterial,\n mobileSegmentWidth,\n className,\n onClick,\n ...restProps\n}: Omit<TabsProps<T>, \"overflow\" | \"overflowLabel\">) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const thumbRef = useRef<HTMLDivElement>(null)\n const prevSizeRef = useRef(size)\n const prevValueRef = useRef(value)\n const isVertical = orientation === \"vertical\"\n\n const applyThumbSizing = useCallback(\n (attemptScroll: boolean) => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n // Get selected node\n const activeNode = root?.querySelector<HTMLDivElement>('[data-state=\"on\"]')\n\n // Impossible\n if (!activeNode) {\n return\n }\n\n if (isVertical) {\n const rootHeight = root.clientHeight\n let targetHeight = Math.floor(activeNode.clientHeight)\n const targetOffset = activeNode.offsetTop\n\n // Detect subpixel edge case\n if (rootHeight - (targetHeight + targetOffset) < 2) {\n targetHeight = targetHeight - 1\n }\n\n thumb.style.height = `${Math.floor(targetHeight)}px`\n thumb.style.width = \"\"\n thumb.style.transform = `translateY(${targetOffset}px)`\n\n // Scroll into view if needed\n if (root.scrollHeight > rootHeight) {\n const buffer = rootHeight * 0.15\n const scrollTop = root.scrollTop\n const top = activeNode.offsetTop\n const bottom = top + targetHeight\n if (top < scrollTop + buffer || bottom > scrollTop + rootHeight - buffer) {\n if (attemptScroll) {\n // Scroll the control only: scrollIntoView also scrolls the page to it (a switch to Phone\n // re-rendered a control far down the page and slid the page to it, owner 08.11)\n root.scrollTo({ top: top - (rootHeight - targetHeight) / 2, behavior: prefersReducedMotion() ? \"auto\" : \"smooth\" })\n }\n }\n }\n } else {\n const rootWidth = root.clientWidth\n let targetWidth = Math.floor(activeNode.clientWidth)\n const targetOffset = activeNode.offsetLeft\n\n // Detect if the thumb is moving too far to the edge of the container.\n // This would most commonly be due to subpixel widths adding up to excessive distance.\n if (rootWidth - (targetWidth + targetOffset) < 2) {\n targetWidth = targetWidth - 1\n }\n\n thumb.style.width = `${Math.floor(targetWidth)}px`\n thumb.style.height = \"\"\n thumb.style.transform = `translateX(${targetOffset}px)`\n\n // If the control is scrollable, ensure the active option is visible\n if (root.scrollWidth > rootWidth) {\n // Only scroll items near the edge, but not the inner 2/3.\n const buffer = rootWidth * 0.15\n const scrollLeft = root.scrollLeft\n const left = activeNode.offsetLeft\n const right = left + targetWidth\n if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n if (attemptScroll) {\n // Scroll the control only: scrollIntoView also scrolls the page to it (a switch to Phone\n // re-rendered a control far down the page and slid the page to it, owner 08.11)\n root.scrollTo({ left: left - (rootWidth - targetWidth) / 2, behavior: prefersReducedMotion() ? \"auto\" : \"smooth\" })\n }\n }\n }\n }\n },\n [isVertical],\n )\n\n useResizeObserver({\n // @ts-expect-error(2322) -- bug in types: https://github.com/juliencrn/usehooks-ts/issues/663\n ref: rootRef,\n onResize: () => {\n const thumb = thumbRef.current\n\n if (!thumb) {\n return\n }\n\n // Perform the size update instantly\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n },\n })\n\n // Tabs added, removed, reordered or relabelled move the active tab without\n // resizing the group: measure again, instantly, like a resize\n useEffect(() => {\n const root = rootRef.current\n if (!root || typeof MutationObserver === \"undefined\") return\n const observer = new MutationObserver(() => {\n const thumb = thumbRef.current\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { childList: true, characterData: true, subtree: true })\n return () => observer.disconnect()\n }, [applyThumbSizing])\n\n // A phone's segmented control at its own width gives every segment the widest one's width, as UISegmentedControl\n // does in iOS 27.2; where that does not fit, each segment takes its label and the same air around it, as\n // apportionsSegmentWidthsByContent does (ref-app segmented-hug, 13.11). A grid that hugs its content cannot take the\n // widest track for each by itself, so this measures it. Runs before the thumb measures (declared first).\n useLayoutEffect(() => {\n equalizeSegments(rootRef.current, thumbRef.current)\n })\n\n useEffect(() => {\n const root = rootRef.current\n if (!root) return\n // The room, the breakpoint or the font changes. The segments can change without the control changing size, so the\n // thumb follows them here, instantly, like a resize.\n return watchSegments(root, () => thumbRef.current, () => {\n const thumb = thumbRef.current\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n })\n }, [applyThumbSizing])\n\n const transitionProperty = isVertical\n ? \"height var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter)), transform var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter))\"\n : \"width var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter)), transform var(--tabs-thumb-transition-duration, 200ms) var(--tabs-thumb-transition-easing, var(--cubic-enter))\"\n\n useLayoutEffect(() => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n const sizeChanged = prevSizeRef.current !== size\n prevSizeRef.current = size\n const valueChanged = prevValueRef.current !== value\n prevValueRef.current = value\n\n if (sizeChanged) {\n // Size changed - disable transition, wait for CSS, then apply sizing\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n\n waitForAnimationFrame(() => {\n applyThumbSizing(false)\n waitForAnimationFrame(() => {\n thumb.style.transition = currentTransition\n })\n })\n } else if (thumb.style.transition) {\n // Normal update (value change, etc.): the thumb leaves with the label's colour\n const from = valueChanged ? thumbBox(thumb) : null\n applyThumbSizing(true)\n if (valueChanged) playThumbLens(thumb, from)\n } else {\n // First measure: apply transition after initial calculation is set\n waitForAnimationFrame(() => {\n applyThumbSizing(false)\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n })\n }\n // mobileSegmentWidth moves the segments with nothing else changing: the thumb follows them\n }, [applyThumbSizing, value, size, gutterSize, pill, flush, mobileSegmentWidth, transitionProperty])\n\n const handleValueChange = (nextValue: T) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue && onChange) onChange(nextValue)\n }\n\n // Only apply pill for segmented variant\n const isPill = variant === \"segmented\" && pill\n // Only apply flush for underline variant\n const isFlush = variant === \"underline\" && flush\n\n return (\n <ToggleGroup.Root\n ref={rootRef}\n className={clsx(s.Tabs, className)}\n type=\"single\"\n value={value}\n loop={false}\n onValueChange={handleValueChange}\n onClick={onClick}\n data-variant={variant}\n data-orientation={orientation}\n data-block={block ? \"\" : undefined}\n data-pill={isPill ? \"\" : undefined}\n data-flush={isFlush ? \"\" : undefined}\n data-size={size}\n data-gutter-size={gutterSize}\n data-mobile-material={mobileMaterial}\n data-mobile-segment-width={mobileSegmentWidth}\n data-disabled={restProps.disabled ? \"\" : undefined}\n {...restProps}\n >\n <div className={s.TabsThumb} ref={thumbRef} />\n <TabsVerticalContext.Provider value={isVertical}>{children}</TabsVerticalContext.Provider>\n </ToggleGroup.Root>\n )\n}\n\n/**\n * Badge configuration for Tabs.Tab\n */\nexport type TabsBadgeProp =\n | React.ReactNode\n | {\n content: React.ReactNode\n color?: SemanticColors<\n \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\"\n >\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\nexport type TabProps = {\n /**\n * Tab value\n */\n \"value\": string\n /**\n * Text read aloud to screen readers when the tab is focused\n */\n \"aria-label\"?: string\n /**\n * Text content to render in the tab\n */\n \"children\"?: React.ReactNode\n /**\n * Icon to render before the text content\n */\n \"icon\"?: React.ReactNode\n /**\n * Badge to render after the text content.\n * Can be a simple value or an object with content, color, variant, and loading options.\n * @example badge={5}\n * @example badge={{ content: 5, color: \"danger\" }}\n */\n \"badge\"?: TabsBadgeProp\n /**\n * Disable the individual tab\n */\n \"disabled\"?: boolean\n}\n\n// Type guard for badge object form\nconst isBadgeObject = (\n badge: TabsBadgeProp,\n): badge is Exclude<TabsBadgeProp, React.ReactNode> & { content: React.ReactNode } => {\n return badge != null && typeof badge === \"object\" && \"content\" in badge\n}\n\n/** True when an icon draws text of its own: a string, a number, or a fragment or array holding one */\n\n/** A text icon (\"☀\") stands in an element, as an icon component does, so a phone can hide it beside a label: each\n * text in a fragment or array gets its own span and the elements beside it stay in place. An empty one draws\n * nothing. */\n// Arrays and fragments always go through Children.map, with or without text, so their children keep the same keys\n// when a text child comes or goes; a fragment keeps its element and key, so a new key still remounts its icons.\n/** On a phone the large control's selection travels as a lens of glass, as iOS 27.2 draws it. Recorded frame by frame\n * 11.11 (ref-app segmented-bar-text4, a toolbar Picker of Day, Week, Month and Year switched Day to Year and back,\n * after the owner's «анимация не правильная и стиль» and «day<->year пробуй переключать»; segmented-bar-symbols, a\n * segment away, before it): the gray selection clears into a lens within 45ms, taller than the capsule (11pt) and\n * wider the faster it goes (36pt at 200ms), and carries across; it lands as the gray selection again by 300ms,\n * pressed against its segment's far side (7pt narrower, 6pt taller and its centre 2.5% of the way past at 430ms), and\n * springs back by 750ms while the label under it dims to 76% and comes back. The centre's path is a share of the\n * distance and the growth is in points, as both recordings show: as much growth a segment away as three. touch.css\n * names the lens's growth on the large control only, so everywhere else the selection just slides with its\n * transition. CSS has no refraction, so the lens is its rim, its tint and the capsule's edge seen through it. */\nlet lensRun = 0\nconst LENS_ID = \"segmented-control-lens\"\nconst LENS_DURATION = 750\n// At each measured frame: [ms, the centre's share of the distance, share of the growth's width, share of its height]\nconst LENS_PATH = [\n [0, 0, 0, 0],\n [10, 0.014, 0.036, 0.065],\n [32, 0.077, 0.13, 0.19],\n [47, 0.169, 0.22, 0.44],\n [70, 0.378, 0.44, 0.87],\n [92, 0.478, 0.52, 1],\n [125, 0.647, 0.7, 0.93],\n [150, 0.773, 0.85, 0.87],\n [182, 0.856, 0.96, 0.93],\n [205, 0.9, 1, 1],\n [227, 0.932, 0.96, 0.93],\n [245, 0.951, 0.8, 0.44],\n [262, 0.964, 0.67, 0.31],\n [295, 0.989, 0.37, 0.31],\n [330, 1.005, 0.13, 0.31],\n [363, 1.016, -0.02, 0.37],\n [395, 1.023, -0.13, 0.5],\n [430, 1.025, -0.19, 0.56],\n [497, 1.022, -0.19, 0.56],\n [545, 1.018, -0.17, 0.37],\n [597, 1.014, -0.11, 0.25],\n [647, 1.007, -0.075, 0.12],\n [697, 1.004, -0.036, 0],\n [750, 1, 0, 0],\n] as const\n// The selected label's opacity as the lens lands: [ms, opacity]\nconst LENS_LABEL = [\n [0, 1],\n [380, 1],\n [428, 0.77],\n [460, 0.76],\n [515, 0.85],\n [580, 0.93],\n [650, 0.98],\n [713, 1],\n [750, 1],\n] as const\ntype ThumbBox = { x: number; width: number }\ntype LensRun = { from: ThumbBox; to: ThumbBox; move: Animation; label?: Animation }\nconst lensRuns = new WeakMap<HTMLElement, LensRun>()\nconst round = (value: number) => Math.round(value * 100) / 100\n// The box the lens draws at a time of its run\nconst lensBox = ({ from, to }: LensRun, ms: number, growth: number): ThumbBox => {\n const next = LENS_PATH.findIndex(([time]) => time >= ms)\n const at = next < 0 ? LENS_PATH.length - 1 : Math.max(1, next)\n const [t0, share0, wide0] = LENS_PATH[at - 1]\n const [t1, share1, wide1] = LENS_PATH[Math.min(at, LENS_PATH.length - 1)]\n const k = t1 > t0 ? Math.min(1, Math.max(0, (ms - t0) / (t1 - t0))) : 1\n const share = share0 + (share1 - share0) * k\n const width = from.width + (to.width - from.width) * Math.min(share, 1) + growth * (wide0 + (wide1 - wide0) * k)\n return { x: from.x + from.width / 2 + (to.x + to.width / 2 - from.x - from.width / 2) * share - width / 2, width }\n}\n/** Where a horizontal thumb is drawn, from its control's left edge: where the script set it, or where a lens still\n * on its way has it, so a switch mid-flight sets off from there */\nconst thumbBox = (thumb: HTMLElement): ThumbBox | null => {\n const offset = /^translateX\\((-?[\\d.]+)px\\)$/.exec(thumb.style.transform)\n const width = parseFloat(thumb.style.width)\n if (!offset || !(width > 0)) return null\n const run = lensRuns.get(thumb)\n const ms = Number(run?.move.currentTime)\n if (run && (run.move.playState === \"running\" || run.move.playState === \"paused\") && ms >= 0) {\n const growth = lensGrowth(getComputedStyle(thumb))\n if (growth) return lensBox(run, ms, growth[0])\n }\n return { x: parseFloat(offset[1]), width }\n}\n// The lens's growth at its widest and tallest, which touch.css names on the large control only\nconst lensGrowth = (style: CSSStyleDeclaration) => {\n const [wide = Number.NaN, tall = wide] = style.getPropertyValue(\"--segmented-control-thumb-lens-outset\").trim().split(/\\s+/).map(parseFloat)\n return wide >= 0 && tall >= 0 ? ([wide, tall] as const) : null\n}\nconst playThumbLens = (thumb: HTMLElement, from: ThumbBox | null) => {\n if (typeof thumb.animate !== \"function\") return\n // A lens still on its way ends first, so the thumb's own fill and edge are read below (and none outlives a switch\n // to reduced motion)\n thumb.getAnimations().forEach((animation) => {\n if (animation.id === LENS_ID) animation.cancel()\n })\n lensRuns.get(thumb)?.label?.cancel()\n lensRuns.delete(thumb)\n if (!from || prefersReducedMotion()) return\n const style = getComputedStyle(thumb)\n const growth = lensGrowth(style)\n const to = thumbBox(thumb)\n const top = parseFloat(style.top)\n const bottom = parseFloat(style.bottom)\n if (!growth || !to || !Number.isFinite(top) || !Number.isFinite(bottom)) return\n const [wide, tall] = growth\n const timing = { id: LENS_ID, duration: LENS_DURATION }\n const run: LensRun = { from, to, move: undefined as unknown as Animation }\n // The thumb's box at each frame replaces its own while the lens runs (its transition is overridden); the height\n // grows about the middle\n run.move = thumb.animate(\n LENS_PATH.map(([ms, , , high]) => {\n const box = lensBox(run, ms, wide)\n const grown = (tall * high) / 2\n return {\n offset: ms / LENS_DURATION,\n transform: `translateX(${round(box.x)}px)`,\n width: `${round(Math.max(1, box.width))}px`,\n top: `${round(top - grown)}px`,\n bottom: `${round(bottom - grown)}px`,\n }\n }),\n timing,\n )\n const lens = {\n backgroundColor: style.getPropertyValue(\"--segmented-control-thumb-lens-background\").trim(),\n boxShadow: style.getPropertyValue(\"--segmented-control-thumb-lens-shadow\").trim(),\n }\n const rest = { backgroundColor: style.backgroundColor, boxShadow: style.boxShadow }\n // The gray clears as the lens lifts (45ms) and comes back as it lands (250 to 300ms)\n const fill = thumb.animate(\n [\n { offset: 0, ...rest },\n { offset: 45 / LENS_DURATION, ...lens },\n { offset: 250 / LENS_DURATION, ...lens },\n { offset: 300 / LENS_DURATION, ...rest },\n { offset: 1, ...rest },\n ],\n timing,\n )\n const root = thumb.parentElement\n const selected = root?.querySelector<HTMLElement>('[data-state=\"on\"]')\n if (selected && typeof selected.animate === \"function\") {\n run.label = selected.animate(\n LENS_LABEL.map(([ms, opacity]) => ({ offset: ms / LENS_DURATION, opacity })),\n timing,\n )\n }\n lensRuns.set(thumb, run)\n // The frame a switch is drawn in also lays out whatever the switch changes around the control, which can take a\n // few frames' time; the lens holds its first frame until then and sets off from the next, so none of its way is\n // skipped (a tap's first 45ms were, recorded in Safari 11.11)\n if (typeof requestAnimationFrame === \"function\") {\n const held = [run.move, fill, run.label].filter((animation): animation is Animation => typeof animation?.pause === \"function\")\n held.forEach((animation) => animation.pause())\n requestAnimationFrame(() => {\n held.forEach((animation) => {\n if (animation.playState === \"paused\") animation.play()\n })\n })\n }\n // The lens reaches past the capsule, which clips what scrolls in it: a control whose segments all fit lets it out\n // for the switch\n if (!root || root.scrollWidth > root.clientWidth + 1) return\n const id = String(++lensRun)\n root.setAttribute(\"data-lens\", id)\n const done = () => {\n if (root.getAttribute(\"data-lens\") === id) root.removeAttribute(\"data-lens\")\n }\n if (run.move?.finished) run.move.finished.then(done, done)\n else done()\n}\n\nconst renderTabIcon = (icon: React.ReactNode): React.ReactNode => {\n if (icon === \"\") return null\n if (typeof icon === \"string\" || typeof icon === \"number\") return <span>{icon}</span>\n if (Array.isArray(icon)) return Children.map(icon, renderTabIcon)\n if (isValidElement<{ children?: React.ReactNode }>(icon) && icon.type === Fragment) {\n return cloneElement(icon, undefined, Children.map(icon.props.children, renderTabIcon))\n }\n return icon\n}\n\nconst Tab = ({ children, icon, badge, ...restProps }: TabProps) => {\n // Normalize badge prop\n const badgeProps = badge != null ? (isBadgeObject(badge) ? badge : { content: badge }) : null\n const vertical = useContext(TabsVerticalContext)\n\n return (\n <ToggleGroup.Item\n className={s.Tab}\n {...restProps}\n onPointerEnter={handlePressableMouseEnter}\n >\n <span className={s.TabContent}>\n {renderTabIcon(icon)}\n {children && <span className={s.TabLabel}>{children}</span>}\n {badgeProps && (\n <span\n className={s.TabBadge}\n data-slot=\"tab-badge\"\n data-color={badgeProps.color ?? \"secondary\"}\n data-variant={badgeProps.variant ?? \"soft\"}\n data-pill={badgeProps.pill ? \"\" : undefined}\n >\n {badgeProps.loading ? <LoadingIndicator /> : badgeProps.content}\n </span>\n )}\n </span>\n {vertical && <CheckMd className={s.TabCheckmark} aria-hidden=\"true\" />}\n </ToggleGroup.Item>\n )\n}\n\n// =============================================\n// overflow=\"menu\"\n// =============================================\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype TabElement = ReactElement<TabProps>\n\n/** The tabs among the children, through fragments */\nconst tabElements = (children: ReactNode): TabElement[] =>\n Children.toArray(children).flatMap((child) => {\n if (!isValidElement<{ children?: ReactNode }>(child)) return []\n return child.type === Fragment ? tabElements(child.props.children) : [child as TabElement]\n })\n\nconst plainText = (node: unknown): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(plainText).join(\"\")\n if (isValidElement<{ children?: ReactNode }>(node)) return plainText(node.props.children)\n return \"\"\n}\n\nconst badgeText = (badge: TabsBadgeProp | undefined) =>\n badge != null && isBadgeObject(badge) ? plainText(badge.content) : plainText(badge)\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (item: TabElement) => plainText(item.props.children) || item.props[\"aria-label\"] || item.props.value\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (items: TabElement[]) =>\n items\n .map((item) =>\n [item.props.value, plainText(item.props.children), badgeText(item.props.badge), item.props.icon != null].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * `Menu.Trigger` sets `data-state` (open or closed) on its child, while a tab\n * keeps `on` or `off` in the same attribute and the thumb finds the active tab\n * by it. The menu's value does not reach the tab; its handlers and\n * `aria-haspopup` / `aria-expanded` do.\n */\nconst MoreTab = (props: TabProps & { \"data-state\"?: string }) => {\n const restProps = { ...props }\n delete restProps[\"data-state\"]\n return <Tab {...restProps} />\n}\n\nconst OverflowTabs = <T extends string>({\n children,\n value,\n onChange,\n overflowLabel,\n ...restProps\n}: Omit<TabsProps<T>, \"overflow\"> & { overflowLabel: string }) => {\n const items = tabElements(children)\n // The strip's own props size the tabs and the menu button too\n const { size, variant, gutterSize, pill, flush, mobileMaterial, mobileSegmentWidth } = restProps\n const signature = [overflowLabel, size, variant, gutterSize, pill, flush, mobileMaterial, mobileSegmentWidth, tabsSignature(items)].join(\"\\u0002\")\n const activeIndex = items.findIndex((item) => item.props.value === value)\n\n // null while the measuring pass renders every tab and the menu button\n const [visibleCount, setVisibleCount] = useState<number | null>(null)\n const [known, setKnown] = useState({ signature, activeIndex })\n const hostRef = useRef<HTMLDivElement>(null)\n const measuringRef = useRef(true)\n const boxWidthRef = useRef(-1)\n\n // New tabs measure again. A new active tab measures again when it moves\n // under the menu button or back out: the button carries the hidden one's name\n if (known.signature !== signature || known.activeIndex !== activeIndex) {\n const crossed =\n visibleCount !== null && (known.activeIndex >= visibleCount || activeIndex >= visibleCount)\n setKnown({ signature, activeIndex })\n if (visibleCount !== null && (known.signature !== signature || crossed)) setVisibleCount(null)\n }\n\n useLayoutEffect(() => {\n measuringRef.current = visibleCount === null\n }, [visibleCount])\n\n useLayoutEffect(() => {\n if (visibleCount !== null) return\n const root = hostRef.current?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n // The measuring pass renders every tab, then the menu button\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== items.length + 1) return\n\n const widths = buttons.map((button) => button.getBoundingClientRect().width)\n const moreButton = buttons[buttons.length - 1]\n const moreWidth = widths.pop() ?? 0\n const style = getComputedStyle(root)\n const available =\n root.getBoundingClientRect().width -\n (Number.parseFloat(style.paddingLeft) || 0) -\n (Number.parseFloat(style.paddingRight) || 0)\n const gap = Number.parseFloat(style.columnGap) || 0\n boxWidthRef.current = hostRef.current?.parentElement?.clientWidth ?? -1\n\n // A hidden strip has no width to decide by: show every tab, and measure\n // when it appears (the observer sees the width change)\n if (available <= 0) {\n // Resolve the zero-width measuring pass before paint; the resize observer\n // restarts measurement when this hidden strip becomes visible.\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setVisibleCount(items.length)\n return\n }\n\n // The button with the active tab's name: that tab's width plus the chevron\n const chevron = moreButton?.querySelector(\"svg\")\n const chevronWidth = chevron?.getBoundingClientRect().width ?? 0\n const labelGap = chevron?.parentElement ? Number.parseFloat(getComputedStyle(chevron.parentElement).columnGap) || 0 : 0\n const activeWidth = activeIndex < 0 ? 0 : (widths[activeIndex] ?? 0) + chevronWidth + labelGap\n\n // This result depends on committed DOM widths. Apply it before first paint\n // so the temporary full strip never flashes before overflowing tabs move.\n setVisibleCount(visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available))\n }, [visibleCount, items.length, activeIndex])\n\n // The width to fit is the container's, not the strip's: the strip shrinks\n // to its content. Reports during a measuring pass are skipped, since the\n // full strip may be pushing its container wider\n useEffect(() => {\n const box = hostRef.current?.parentElement\n if (!box || typeof ResizeObserver === \"undefined\") return\n const observer = new ResizeObserver(() => {\n if (measuringRef.current) return\n const width = box.clientWidth\n if (width === boxWidthRef.current) return\n boxWidthRef.current = width\n setVisibleCount(null)\n })\n observer.observe(box)\n return () => observer.disconnect()\n }, [])\n\n const measuring = visibleCount === null\n const shown = measuring ? items : items.slice(0, visibleCount)\n const hidden = measuring ? [] : items.slice(visibleCount)\n const hiddenActive = hidden.find((item) => item.props.value === value) ?? null\n\n return (\n <div ref={hostRef} className={s.OverflowHost}>\n <Menu>\n <TabsRoot<string>\n {...restProps}\n data-overflow=\"menu\"\n value={hiddenActive ? MORE_VALUE : value}\n onChange={(next) => {\n // Pressing the menu button opens the menu; it is not a tab\n if (next !== MORE_VALUE) onChange?.(next as T)\n }}\n >\n {/* Keyed by value: tabs from different fragments may share a key */}\n {shown.map((item) => cloneElement(item, { key: item.props.value }))}\n {(measuring || hidden.length > 0) && (\n <Menu.Trigger>\n <MoreTab value={MORE_VALUE}>\n <span className={s.OverflowLabel}>\n {hiddenActive ? tabLabel(hiddenActive) : overflowLabel}\n <ChevronDownMd />\n </span>\n </MoreTab>\n </Menu.Trigger>\n )}\n </TabsRoot>\n <Menu.Content align=\"end\" minWidth=\"auto\">\n <Menu.RadioGroup<string> value={value} onChange={(next) => onChange?.(next as T)}>\n {hidden.map((item) => {\n const count = badgeText(item.props.badge)\n return (\n <Menu.RadioItem<string>\n key={item.props.value}\n value={item.props.value}\n disabled={restProps.disabled || item.props.disabled}\n >\n {item.props.icon}\n {item.props.children ?? item.props[\"aria-label\"] ?? item.props.value}\n {/* A tab's count moves into the menu with it */}\n {count !== \"\" && <span className={s.OverflowBadge}>{count}</span>}\n </Menu.RadioItem>\n )\n })}\n </Menu.RadioGroup>\n </Menu.Content>\n </Menu>\n </div>\n )\n}\n\n// Attach sub-components\nTabs.Tab = Tab\n// Backward-compat alias\nTabs.Option = Tab\n"]}
@@ -43,12 +43,18 @@ const lineInset = (list) => {
43
43
  };
44
44
  /** A head row or an empty message stands among the items and is not one of them */
45
45
  const itemsOf = (list) => [...list.children].filter((item) => !item.hasAttribute(STATIC));
46
- /** The lists a drag from this one can reach, in the order of the page */
46
+ const reachOf = (list) => {
47
+ const { reach } = list.dataset;
48
+ return reach === "list" || reach === "targets" ? reach : "group";
49
+ };
50
+ /** The lists a drag from this one can reach, in the order of the page. A list that keeps its items to itself or only
51
+ * hands them to targets takes none from the others either. */
47
52
  const listsOf = (list) => {
48
53
  const { group } = list.dataset;
49
- if (!group)
54
+ if (!group || reachOf(list) !== "group")
50
55
  return [list];
51
- return [...document.querySelectorAll(`[data-sortable][data-group="${CSS.escape(group)}"]:not([data-disabled])`)];
56
+ return [...document.querySelectorAll(`[data-sortable][data-group="${CSS.escape(group)}"]:not([data-disabled])`)]
57
+ .filter((entry) => entry === list || reachOf(entry) === "group");
52
58
  };
53
59
  /** Grips stand in a table, elsewhere only when the list asks for them */
54
60
  const showsHandles = (list) => (list.dataset.handles ?? String(list.tagName === "TBODY")) === "true";
@@ -303,13 +309,16 @@ function startDrag(event, list, source, layout, immediate, commit, link) {
303
309
  window.removeEventListener("keydown", onKey, true);
304
310
  window.removeEventListener("touchmove", blockScroll);
305
311
  }
312
+ // Only onto a target: the list has no gaps to drop in, so nothing parts, no line shows and a drop elsewhere puts
313
+ // the item back
314
+ const onlyTargets = reachOf(list) === "targets";
306
315
  function measure() {
307
316
  return listsOf(list).map((entry) => {
308
317
  const items = itemsOf(entry);
309
318
  entry.setAttribute("data-dragging", "");
310
319
  return {
311
320
  list: entry, items,
312
- slots: layout === "grid" ? gridSlots(entry, items) : listSlots(entry, items),
321
+ slots: onlyTargets ? [] : layout === "grid" ? gridSlots(entry, items) : listSlots(entry, items),
313
322
  scrollLeft: entry.scrollLeft, scrollTop: entry.scrollTop,
314
323
  };
315
324
  });
@@ -579,6 +588,9 @@ export async function sortableKeyDown(event, list, commit, link) {
579
588
  const source = itemOf(list, target);
580
589
  if (!source || source.hasAttribute(STATIC) || (target !== source && !target.closest(HANDLE)))
581
590
  return;
591
+ // A list that only hands its items to targets has no order to change
592
+ if (reachOf(list) === "targets")
593
+ return;
582
594
  const items = itemsOf(list);
583
595
  const from = items.indexOf(source);
584
596
  const to = from + step;