@plexui/vue 0.1.11 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GASN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAChG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,CAAC,MAAM,gDAAgD,CAAA;AAyC9D,MAAM,cAAc,GAAmC,MAAM,CAAC,YAAY,CAAC,CAAA;AAM3E,+DAA+D;AAC/D,MAAM,WAAW,GAAG,CAAC,KAA0B,EAAE,GAAmB,EAAE,QAAoC,EAAE,EAAE;IAC5G,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAA0D,CAAA;IACnF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,IAAI,GAAG,KAAK,gBAAgB,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC,WAAW,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;QA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Component,\n h,\n inject,\n isVNode,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n ref,\n shallowRef,\n watch,\n type Component,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport type { ControlSize, SemanticColors, Sizes, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter, waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport ChevronDownMd from \"../Icon/svg/ChevronDownMd.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport { Menu, MenuContent, MenuRadioGroup, MenuRadioItem, MenuTrigger } from \"../Menu/index.js\"\nimport { fitCount, visibleTabCount } from \"./overflow.js\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\n// Vue port of packages/ui/src/components/Tabs/Tabs.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n//\n// React builds on Radix ToggleGroup (type=\"single\"). Reka's ToggleGroupItem\n// renders Toggle semantics (`aria-pressed`, `data-active`, no `role=\"radio\"`)\n// and runs its click toggle before handlers the caller passes, so the\n// single-select part of Radix ToggleGroup/Toggle (about twenty lines) is\n// inlined here, and keyboard focus comes from Reka's RovingFocusGroup and\n// RovingFocusItem, the same roving tabindex Radix ToggleGroup uses.\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\n/** Content React accepts as a ReactNode, in Vue terms */\ntype TabsContent = string | number | VNode | VNodeArrayChildren\n\n/** Badge configuration for TabsTab: a plain value, or an object with content and styling */\nexport type TabsBadgeProp =\n | string\n | number\n | VNode\n | {\n content: TabsContent\n color?: SemanticColors<\"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\">\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\n/** Icon for TabsTab: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type TabsIconProp = string | VNode | Component\n\ntype TabsContextValue = {\n value: ComputedRef<string>\n disabled: ComputedRef<boolean>\n setValue: (nextValue: string) => void\n}\n\nconst TabsContextKey: InjectionKey<TabsContextValue> = Symbol(\"PlexUITabs\")\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0][sizeType] : boxSize[sizeType]\n}\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// Events a caller's handler called preventDefault() on. React's synthetic\n// event reports that call in `defaultPrevented` even when the native event is\n// not cancelable (focus), for every later handler of the same event.\nconst preventedEvents = new WeakSet<Event>()\n\nconst isPrevented = (event: Event) => event.defaultPrevented || preventedEvents.has(event)\n\nconst callCallerHandlers = (handlers: unknown, event: Event) => {\n if (!handlers) return\n const preventDefault = event.preventDefault\n event.preventDefault = () => {\n preventedEvents.add(event)\n preventDefault.call(event)\n }\n try {\n callHandlers(handlers, event)\n } finally {\n Reflect.deleteProperty(event, \"preventDefault\")\n }\n}\n\n// Internal: the element Tabs and TabsTab render through Reka's\n// RovingFocusGroup and RovingFocusItem with `asChild`. Reka merges its\n// handlers into these attrs and would run them before the caller's. Radix\n// composes them the other way (composeEventHandlers): the caller's handler\n// runs first, and Radix skips its own once the event is default-prevented.\n// So the caller's listeners for the `composed` events arrive separately in\n// `listeners` and are composed that way here.\nconst RovingElement = defineComponent({\n name: \"TabsRovingElement\",\n inheritAttrs: false,\n props: {\n as: { type: String, required: true },\n elementRef: Object as PropType<Ref<HTMLElement | null>>,\n /** Events whose Reka handler Radix composes after the caller's */\n composed: { type: Array as PropType<string[]>, required: true },\n /** The caller's listeners for the `composed` events */\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const handlers: Record<string, (event: Event) => void> = {}\n for (const key of props.composed) {\n const caller = props.listeners[key]\n const internal = attrs[key]\n handlers[key] = (event: Event) => {\n callCallerHandlers(caller, event)\n if (!isPrevented(event)) callHandlers(internal, event)\n }\n }\n return h(props.as, { ...attrs, ...handlers, ref: props.elementRef }, slots.default?.())\n }\n },\n})\n\n/** Splits the caller's listeners for `keys` from the other attributes. */\nconst splitListeners = (attrs: Record<string, unknown>, keys: string[]) => {\n const listeners: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n if (keys.includes(key)) listeners[key] = value\n else rest[key] = value\n }\n return { listeners, rest }\n}\n\n// Radix RovingFocusGroup composes mousedown, focus and blur; its items\n// mousedown and focus (keydown too, which Reka already leaves to the caller)\nconst GROUP_COMPOSED = [\"onMousedown\", \"onFocus\", \"onBlur\"]\nconst ITEM_COMPOSED = [\"onMousedown\", \"onFocus\"]\n\nconst tabsProps = {\n /** Controlled value for the group. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: 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: { type: String as PropType<TabsVariant>, default: \"segmented\" },\n /** Orientation of the tab layout. @default \"horizontal\" */\n orientation: { type: String as PropType<TabsOrientation>, default: \"horizontal\" },\n /** Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the tabs, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disable the entire group. @default false */\n disabled: { type: Boolean, default: false },\n /** Display the control as a block element with equal width segments. @default false */\n block: { type: Boolean, default: false },\n /** Fully rounded pill shape. Only applies to the `\"segmented\"` variant. @default true */\n pill: { type: Boolean, default: true },\n /**\n * Flush underline style: no tab padding, so the indicator matches the text\n * width, gap spacing and no bottom border. Only applies to the `\"underline\"` variant.\n * @default false\n */\n flush: { type: Boolean, default: false },\n}\n\nconst tabsEmits = {\n /** A new value was selected (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\n /** Any click on the control, even if a new value was not selected */\n \"click\": (_event: MouseEvent) => true,\n}\n\n// The group itself. `Tabs` renders it as it is, or measures and splits it\n// for `overflow=\"menu\"`\nconst TabsComponent = defineComponent({\n name: \"TabsRoot\",\n inheritAttrs: false,\n props: tabsProps,\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const rootRef = ref<HTMLDivElement | null>(null)\n const thumbRef = ref<HTMLDivElement | null>(null)\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n let prevSize = props.size\n\n // Radix useControllableState: `value` undefined means uncontrolled, starting empty\n const uncontrolledValue = ref(\"\")\n const currentValue = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const handleValueChange = (nextValue: string) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue) {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) handleValueChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports uncontrolled changes from an effect, after the click has\n // finished bubbling (so the group's `click` comes first)\n watch(uncontrolledValue, handleValueChange, { flush: \"post\" })\n\n provide(TabsContextKey, {\n value: currentValue,\n disabled: computed(() => props.disabled),\n setValue,\n })\n\n const applyThumbSizing = (isVertical: boolean, attemptScroll: boolean) => {\n const root = rootRef.value\n const thumb = thumbRef.value\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 activeNode.scrollIntoView({ block: \"center\", inline: \"nearest\", behavior: \"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 activeNode.scrollIntoView({ block: \"nearest\", inline: \"center\", behavior: \"smooth\" })\n }\n }\n }\n }\n }\n\n // React's useLayoutEffect on [value, size, gutterSize, pill, flush, isVertical].\n // `value` is the prop, so an uncontrolled selection does not move the thumb\n // until the next resize, exactly as in React.\n const syncThumb = () => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n const isVertical = props.orientation === \"vertical\"\n const transitionProperty = isVertical\n ? \"height 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n : \"width 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n\n const sizeChanged = prevSize !== props.size\n prevSize = props.size\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(isVertical, false)\n waitForAnimationFrame(() => {\n thumb.style.transition = currentTransition\n })\n })\n } else {\n // Normal update (value change, etc.)\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, !!thumb.style.transition)\n\n // Apply transition after initial calculation is set\n if (!thumb.style.transition) {\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n }\n })\n }\n }\n\n watch(\n [\n () => props.value,\n () => props.size,\n () => props.gutterSize,\n () => props.pill,\n () => props.flush,\n () => props.orientation === \"vertical\",\n ],\n syncThumb,\n { flush: \"post\" },\n )\n\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n syncThumb()\n\n // usehooks-ts useResizeObserver: only fires when the content box changed\n const root = rootRef.value\n if (!root || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n\n const thumb = thumbRef.value\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(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { box: \"content-box\" })\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 let mutationObserver: MutationObserver | undefined\n onMounted(() => {\n const root = rootRef.value\n if (!root || typeof MutationObserver === \"undefined\") return\n mutationObserver = new MutationObserver(() => {\n const thumb = thumbRef.value\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n mutationObserver.observe(root, { childList: true, characterData: true, subtree: true })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n mutationObserver?.disconnect()\n })\n\n // Radix moves focus into the group onto the selected tab, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? []).map((item) => item.ref)\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"on\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, GROUP_COMPOSED)\n // Only apply pill for segmented variant\n const isPill = props.variant === \"segmented\" && props.pill\n // Only apply flush for underline variant\n const isFlush = props.variant === \"underline\" && props.flush\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: false,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"div\",\n \"elementRef\": rootRef,\n \"composed\": GROUP_COMPOSED,\n \"listeners\": listeners,\n \"class\": [s.Tabs, className],\n // `dir` comes from RovingFocusGroup (\"ltr\" unless set), like Radix\n // Radix ToggleGroup type=\"single\" (radix-ui 1.8) is a radiogroup\n \"role\": \"radiogroup\",\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n \"data-variant\": props.variant,\n \"data-orientation\": props.orientation,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": isPill ? \"\" : undefined,\n \"data-flush\": isFlush ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n ...restAttrs,\n },\n { default: () => [h(\"div\", { class: s.TabsThumb, ref: thumbRef }), slots.default?.()] },\n ),\n },\n )\n }\n },\n})\n\n\nconst useTabsContext = () => {\n const context = inject(TabsContextKey, null)\n\n if (!context) {\n throw new Error(\"`TabsTab` must be used within `Tabs`\")\n }\n\n return context\n}\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (!isVNode(node)) return node != null && typeof node !== \"boolean\" && String(node) !== \"\"\n if (node.type === Comment) return false\n if (node.type === Text) return String(node.children ?? \"\") !== \"\"\n if (Array.isArray(node.children) && typeof node.type === \"symbol\") return hasContent(node.children as VNode[])\n return true\n })\n\nconst isBadgeObject = (badge: TabsBadgeProp | undefined): badge is Extract<TabsBadgeProp, { content: unknown }> =>\n badge != null && typeof badge === \"object\" && \"content\" in badge\n\nconst renderIcon = (icon: TabsIconProp | undefined) => {\n if (icon == null || typeof icon === \"string\" || isVNode(icon)) return icon\n return h(icon)\n}\n\nconst TabComponent = defineComponent({\n name: \"TabsTab\",\n inheritAttrs: false,\n props: {\n /** Tab value */\n value: { type: String, required: true },\n /** Icon before the text content: a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Object, Function] as PropType<TabsIconProp>,\n /**\n * Badge after the text content: a plain value, or an object with\n * `content`, `color`, `variant`, `pill` and `loading`. The `badge` slot\n * replaces the content and keeps the object's styling.\n */\n badge: { type: [String, Number, Object] as PropType<TabsBadgeProp>, default: undefined },\n /** Disable the individual tab */\n disabled: { type: Boolean, default: undefined },\n },\n setup(props, { slots, attrs }) {\n const context = useTabsContext()\n\n return () => {\n const disabled = context.disabled.value || !!props.disabled\n const selected = context.value.value\n const pressed = !!selected && selected === props.value\n const { onClick, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, ITEM_COMPOSED)\n\n // Normalize badge prop; the slot replaces its content\n const badgeSlot = slots.badge?.()\n const badgeObject = isBadgeObject(props.badge) ? props.badge : undefined\n const badgeProps = hasContent(badgeSlot)\n ? { ...badgeObject, content: badgeSlot }\n : props.badge != null\n ? (badgeObject ?? { content: props.badge as TabsContent })\n : null\n\n const children = slots.default?.()\n const iconSlot = slots.icon?.()\n\n // Radix Toggle: the caller's click handler runs first and can cancel the toggle\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled) return\n callHandlers(onClick, event)\n if (event.defaultPrevented) return\n context.setValue(pressed ? \"\" : props.value)\n }\n\n return h(\n RovingFocusItem,\n { asChild: true, focusable: !disabled, active: pressed },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"button\",\n \"composed\": ITEM_COMPOSED,\n \"listeners\": listeners,\n // Radix Toggle defaults, then the single-select radio semantics\n \"type\": \"button\",\n \"data-state\": pressed ? \"on\" : \"off\",\n \"data-disabled\": disabled ? \"\" : undefined,\n \"role\": \"radio\",\n \"aria-checked\": pressed,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n // Caller attributes win, as React spreads them after `className`\n \"class\": s.Tab,\n ...restAttrs,\n \"disabled\": disabled,\n \"onPointerenter\": handlePressableMouseEnter,\n \"onClick\": handleClick,\n },\n {\n default: () => [\n h(\"span\", { class: s.TabContent }, [\n hasContent(iconSlot) ? iconSlot : renderIcon(props.icon),\n hasContent(children) ? h(\"span\", null, children) : null,\n badgeProps\n ? h(\n \"span\",\n {\n \"class\": s.TabBadge,\n \"data-color\": badgeProps.color ?? \"secondary\",\n \"data-variant\": badgeProps.variant ?? \"soft\",\n \"data-pill\": badgeProps.pill ? \"\" : undefined,\n },\n badgeProps.loading ? [h(LoadingIndicator)] : [badgeProps.content as VNodeArrayChildren[number]],\n )\n : null,\n ]),\n ],\n },\n ),\n },\n )\n }\n },\n})\n\ntype TabOwnProps = InstanceType<typeof TabComponent>[\"$props\"]\n\n/** TabsTab props; other attributes (`aria-label`, ...) fall through to the button. */\nexport type TabProps = TabOwnProps & { \"aria-label\"?: string }\n\nexport const TabsTab = TabComponent as typeof TabComponent & { new (): { $props: TabProps } }\n\n/** Backward-compat alias of `TabsTab`, like React's `Tabs.Option` */\nexport const TabsOption: typeof TabsTab = TabsTab\n\n// ---------------------------------------------------------------------------\n// overflow=\"menu\" (React's OverflowTabs)\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype Slots = Record<string, ((...args: unknown[]) => VNodeArrayChildren) | undefined>\n\n/** The TabsTab vnodes of a default slot, through fragments (`v-for`, `<template>`) */\nconst tabVNodes = (nodes: VNodeArrayChildren | undefined): VNode[] =>\n (nodes ?? []).flatMap((node) => {\n if (!isVNode(node)) return []\n if (node.type === Fragment && Array.isArray(node.children)) return tabVNodes(node.children as VNodeArrayChildren)\n return node.type === TabComponent ? [node] : []\n })\n\nconst slotsOf = (node: VNode) => (node.children && typeof node.children === \"object\" && !Array.isArray(node.children) ? (node.children as Slots) : {})\n\n/** A tab's slot content; a vnode's raw slot may return a string or nothing */\nconst slotContent = (node: VNode, name: string): VNodeArrayChildren => {\n const content = slotsOf(node)[name]?.() as VNodeArrayChildren | VNodeArrayChildren[number] | undefined\n if (content == null) return []\n return Array.isArray(content) ? content : [content]\n}\n\nconst labelContent = (node: VNode) => slotContent(node, \"default\")\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 (isVNode(node)) {\n if (node.type === Comment) return \"\"\n if (typeof node.children === \"string\") return node.children\n if (Array.isArray(node.children)) return plainText(node.children)\n return plainText(labelContent(node))\n }\n return \"\"\n}\n\nconst tabProps = (node: VNode) => (node.props ?? {}) as Record<string, unknown>\n\n/** Slot content that renders something: text, or a vnode other than a comment */\nconst filled = (nodes: VNodeArrayChildren) =>\n plainText(nodes) !== \"\" || nodes.some((node) => isVNode(node) && node.type !== Comment)\n\nconst badgeText = (badge: unknown) => (isBadgeObject(badge as TabsBadgeProp) ? plainText((badge as { content: unknown }).content) : plainText(badge))\n\n/** A tab's icon: the `icon` slot, else the prop */\nconst tabIcon = (node: VNode) => {\n const iconSlot = slotContent(node, \"icon\")\n return filled(iconSlot) ? iconSlot : renderIcon(tabProps(node).icon as TabsIconProp | undefined)\n}\n\n/** A tab's count as text: the `badge` slot, else the prop */\nconst tabCount = (node: VNode) => plainText(slotContent(node, \"badge\")) || badgeText(tabProps(node).badge)\n\n/** A raw vnode prop holds a boolean attribute as written: `<TabsTab disabled>` is \"\" */\nconst tabDisabled = (node: VNode) => {\n const disabled = tabProps(node).disabled\n return disabled != null && disabled !== false\n}\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (node: VNode) =>\n plainText(labelContent(node)) || (tabProps(node)[\"aria-label\"] as string | undefined) || String(tabProps(node).value)\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (nodes: VNode[]) =>\n nodes\n .map((node) =>\n [\n tabProps(node).value,\n plainText(labelContent(node)),\n tabCount(node),\n tabProps(node).icon != null || slotsOf(node).icon != null,\n ].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * MenuTrigger 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 = defineComponent({\n name: \"TabsMoreTab\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { \"data-state\": _menuState, ...rest } = attrs\n return h(TabComponent, rest as TabProps, slots)\n }\n },\n})\n\nconst TabsPublic = defineComponent({\n name: \"Tabs\",\n inheritAttrs: false,\n props: {\n ...tabsProps,\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or they move into a menu at its end (`menu`). The\n * menu button shows the active tab's name when it is a hidden one.\n * Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n overflow: { type: String as PropType<\"scroll\" | \"menu\">, default: \"scroll\" },\n /** Text of the menu button with `overflow=\"menu\"`. @default \"More\" */\n overflowLabel: { type: String, default: \"More\" },\n },\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const hostRef = ref<HTMLDivElement | null>(null)\n // Uncontrolled like the group: `value` unset starts empty\n const uncontrolledValue = ref(\"\")\n const current = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n const select = (next: string) => {\n if (props.value === undefined) uncontrolledValue.value = next\n emit(\"update:value\", next)\n emit(\"change\", next)\n }\n\n // { count: null } while the measuring pass renders every tab and the\n // menu button; a new object each time, so an unchanged count still renders\n const measured = shallowRef<{ count: number | null }>({ count: null })\n let measuredSignature = \"\"\n let measuredActive = -1\n let lastRender = { measuring: true, signature: \"\", activeIndex: -1, length: 0 }\n let boxWidth = -1\n\n const measure = () => {\n if (!lastRender.measuring) return\n const root = hostRef.value?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== lastRender.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 boxWidth = hostRef.value?.parentElement?.clientWidth ?? -1\n measuredSignature = lastRender.signature\n measuredActive = lastRender.activeIndex\n\n if (available <= 0) {\n measured.value = { count: lastRender.length }\n return\n }\n\n const { activeIndex } = lastRender\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 measured.value = { count: visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available) }\n }\n\n // The width to fit is the container's; reports during a measuring pass\n // are skipped. The menu strip may appear or go after mount, with `overflow`\n let observer: ResizeObserver | undefined\n let observed: HTMLElement | null = null\n const observeBox = () => {\n const box = hostRef.value?.parentElement ?? null\n if (box === observed) return\n observer?.disconnect()\n observer = undefined\n observed = box\n if (!box || typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(() => {\n if (lastRender.measuring) return\n const width = box.clientWidth\n if (width === boxWidth) return\n boxWidth = width\n measured.value = { count: null }\n })\n observer.observe(box)\n }\n onMounted(() => {\n measure()\n observeBox()\n })\n onUpdated(() => {\n measure()\n observeBox()\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n const forward = {\n \"onUpdate:value\": (value: string) => emit(\"update:value\", value),\n \"onChange\": (value: string) => emit(\"change\", value),\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n }\n\n return () => {\n const { overflow, overflowLabel, ...rootProps } = props\n if (overflow !== \"menu\" || props.block || props.orientation === \"vertical\") {\n return h(TabsComponent, { ...rootProps, ...attrs, ...forward }, slots)\n }\n\n const items = tabVNodes(slots.default?.() as VNodeArrayChildren | undefined)\n // The strip's own props size the tabs and the menu button too\n const signature = [overflowLabel, props.size, props.variant, props.gutterSize, props.pill, props.flush, tabsSignature(items)].join(\n \"\\u0002\",\n )\n const activeIndex = items.findIndex((item) => tabProps(item).value === current.value)\n const { count } = measured.value\n // New tabs measure again; so does an active tab that moves under the\n // menu button or back out, since the button carries the hidden one's name\n const stale =\n count !== null &&\n (signature !== measuredSignature ||\n (activeIndex !== measuredActive && (measuredActive >= count || activeIndex >= count)))\n const measuring = count === null || stale\n lastRender = { measuring, signature, activeIndex, length: items.length }\n\n const shown = measuring ? items : items.slice(0, count)\n const hidden = measuring ? [] : items.slice(count)\n const hiddenActive = hidden.find((item) => tabProps(item).value === current.value) ?? null\n\n const strip = h(\n TabsComponent,\n {\n ...rootProps,\n ...attrs,\n \"data-overflow\": \"menu\",\n \"value\": hiddenActive ? MORE_VALUE : current.value,\n // Pressing the menu button opens the menu; it is not a tab\n \"onUpdate:value\": (next: string) => {\n if (next !== MORE_VALUE) select(next)\n },\n \"onClick\": forward.onClick,\n },\n {\n default: () => [\n ...shown,\n measuring || hidden.length > 0\n ? h(MenuTrigger, null, {\n default: () =>\n h(MoreTab, { value: MORE_VALUE }, {\n default: () => [\n h(\"span\", { class: s.OverflowLabel }, [hiddenActive ? tabLabel(hiddenActive) : overflowLabel, h(ChevronDownMd)]),\n ],\n }),\n })\n : null,\n ],\n },\n )\n\n return h(\"div\", { ref: hostRef, class: s.OverflowHost }, [\n h(Menu, null, {\n default: () => [\n strip,\n h(MenuContent, { align: \"end\", minWidth: \"auto\" }, {\n default: () =>\n h(MenuRadioGroup, { \"value\": current.value, \"onUpdate:value\": select }, {\n default: () =>\n hidden.map((item) => {\n const itemProps = tabProps(item)\n const count = tabCount(item)\n const label = labelContent(item)\n return h(\n MenuRadioItem,\n {\n key: String(itemProps.value),\n value: String(itemProps.value),\n disabled: props.disabled || tabDisabled(item),\n },\n {\n default: () => [\n tabIcon(item),\n filled(label)\n ? label\n : ((itemProps[\"aria-label\"] as string | undefined) ?? String(itemProps.value)),\n // A tab's count moves into the menu with it\n count !== \"\" ? h(\"span\", { class: s.OverflowBadge }, count) : null,\n ],\n },\n )\n }),\n }),\n }),\n ],\n }),\n ])\n }\n },\n})\n\ntype TabsOwnProps = InstanceType<typeof TabsPublic>[\"$props\"]\n\n/** Tabs props plus the attributes that fall through to the group element, as in React. */\nexport type TabsProps = TabsOwnProps & Omit<HTMLAttributes, keyof TabsOwnProps> & { \"aria-label\"?: string }\n\nexport const Tabs = TabsPublic as typeof TabsPublic & { new (): { $props: TabsProps } }\n"]}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GASN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAChG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,CAAC,MAAM,gDAAgD,CAAA;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CAAC;4CAChF,4CAA4C;4CAC5C,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;yCACnE;qCACF,CACF,CAAA;gCACH,CAAC,CAAC;6BACL,CAAC;yBACL,CAAC;qBACH;iBACF,CAAC;aACH,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAOF,MAAM,CAAC,MAAM,IAAI,GAAG,UAAmE,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n Text,\n computed,\n defineComponent,\n h,\n inject,\n isVNode,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n ref,\n shallowRef,\n watch,\n type Component,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport type { ControlSize, SemanticColors, Sizes, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter, waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport ChevronDownMd from \"../Icon/svg/ChevronDownMd.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport { Menu, MenuContent, MenuRadioGroup, MenuRadioItem, MenuTrigger } from \"../Menu/index.js\"\nimport { fitCount, visibleTabCount } from \"./overflow.js\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\n// Vue port of packages/ui/src/components/Tabs/Tabs.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n//\n// React builds on Radix ToggleGroup (type=\"single\"). Reka's ToggleGroupItem\n// renders Toggle semantics (`aria-pressed`, `data-active`, no `role=\"radio\"`)\n// and runs its click toggle before handlers the caller passes, so the\n// single-select part of Radix ToggleGroup/Toggle (about twenty lines) is\n// inlined here, and keyboard focus comes from Reka's RovingFocusGroup and\n// RovingFocusItem, the same roving tabindex Radix ToggleGroup uses.\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\n/** Content React accepts as a ReactNode, in Vue terms */\ntype TabsContent = string | number | VNode | VNodeArrayChildren\n\n/** Badge configuration for TabsTab: a plain value, or an object with content and styling */\nexport type TabsBadgeProp =\n | string\n | number\n | VNode\n | {\n content: TabsContent\n color?: SemanticColors<\"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\">\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\n/** Icon for TabsTab: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type TabsIconProp = string | VNode | Component\n\ntype TabsContextValue = {\n value: ComputedRef<string>\n disabled: ComputedRef<boolean>\n setValue: (nextValue: string) => void\n}\n\nconst TabsContextKey: InjectionKey<TabsContextValue> = Symbol(\"PlexUITabs\")\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0][sizeType] : boxSize[sizeType]\n}\n\n// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// Events a caller's handler called preventDefault() on. React's synthetic\n// event reports that call in `defaultPrevented` even when the native event is\n// not cancelable (focus), for every later handler of the same event.\nconst preventedEvents = new WeakSet<Event>()\n\nconst isPrevented = (event: Event) => event.defaultPrevented || preventedEvents.has(event)\n\nconst callCallerHandlers = (handlers: unknown, event: Event) => {\n if (!handlers) return\n const preventDefault = event.preventDefault\n event.preventDefault = () => {\n preventedEvents.add(event)\n preventDefault.call(event)\n }\n try {\n callHandlers(handlers, event)\n } finally {\n Reflect.deleteProperty(event, \"preventDefault\")\n }\n}\n\n// Internal: the element Tabs and TabsTab render through Reka's\n// RovingFocusGroup and RovingFocusItem with `asChild`. Reka merges its\n// handlers into these attrs and would run them before the caller's. Radix\n// composes them the other way (composeEventHandlers): the caller's handler\n// runs first, and Radix skips its own once the event is default-prevented.\n// So the caller's listeners for the `composed` events arrive separately in\n// `listeners` and are composed that way here.\nconst RovingElement = defineComponent({\n name: \"TabsRovingElement\",\n inheritAttrs: false,\n props: {\n as: { type: String, required: true },\n elementRef: Object as PropType<Ref<HTMLElement | null>>,\n /** Events whose Reka handler Radix composes after the caller's */\n composed: { type: Array as PropType<string[]>, required: true },\n /** The caller's listeners for the `composed` events */\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const handlers: Record<string, (event: Event) => void> = {}\n for (const key of props.composed) {\n const caller = props.listeners[key]\n const internal = attrs[key]\n handlers[key] = (event: Event) => {\n callCallerHandlers(caller, event)\n if (!isPrevented(event)) callHandlers(internal, event)\n }\n }\n return h(props.as, { ...attrs, ...handlers, ref: props.elementRef }, slots.default?.())\n }\n },\n})\n\n/** Splits the caller's listeners for `keys` from the other attributes. */\nconst splitListeners = (attrs: Record<string, unknown>, keys: string[]) => {\n const listeners: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n if (keys.includes(key)) listeners[key] = value\n else rest[key] = value\n }\n return { listeners, rest }\n}\n\n// Radix RovingFocusGroup composes mousedown, focus and blur; its items\n// mousedown and focus (keydown too, which Reka already leaves to the caller)\nconst GROUP_COMPOSED = [\"onMousedown\", \"onFocus\", \"onBlur\"]\nconst ITEM_COMPOSED = [\"onMousedown\", \"onFocus\"]\n\nconst tabsProps = {\n /** Controlled value for the group. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: 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: { type: String as PropType<TabsVariant>, default: \"segmented\" },\n /** Orientation of the tab layout. @default \"horizontal\" */\n orientation: { type: String as PropType<TabsOrientation>, default: \"horizontal\" },\n /** Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the tabs, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disable the entire group. @default false */\n disabled: { type: Boolean, default: false },\n /** Display the control as a block element with equal width segments. @default false */\n block: { type: Boolean, default: false },\n /** Fully rounded pill shape. Only applies to the `\"segmented\"` variant. @default true */\n pill: { type: Boolean, default: true },\n /**\n * Flush underline style: no tab padding, so the indicator matches the text\n * width, gap spacing and no bottom border. Only applies to the `\"underline\"` variant.\n * @default false\n */\n flush: { type: Boolean, default: false },\n}\n\nconst tabsEmits = {\n /** A new value was selected (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\n /** Any click on the control, even if a new value was not selected */\n \"click\": (_event: MouseEvent) => true,\n}\n\n// The group itself. `Tabs` renders it as it is, or measures and splits it\n// for `overflow=\"menu\"`\nconst TabsComponent = defineComponent({\n name: \"TabsRoot\",\n inheritAttrs: false,\n props: tabsProps,\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const rootRef = ref<HTMLDivElement | null>(null)\n const thumbRef = ref<HTMLDivElement | null>(null)\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n let prevSize = props.size\n\n // Radix useControllableState: `value` undefined means uncontrolled, starting empty\n const uncontrolledValue = ref(\"\")\n const currentValue = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const handleValueChange = (nextValue: string) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue) {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) handleValueChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports uncontrolled changes from an effect, after the click has\n // finished bubbling (so the group's `click` comes first)\n watch(uncontrolledValue, handleValueChange, { flush: \"post\" })\n\n provide(TabsContextKey, {\n value: currentValue,\n disabled: computed(() => props.disabled),\n setValue,\n })\n\n const applyThumbSizing = (isVertical: boolean, attemptScroll: boolean) => {\n const root = rootRef.value\n const thumb = thumbRef.value\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 activeNode.scrollIntoView({ block: \"center\", inline: \"nearest\", behavior: \"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 activeNode.scrollIntoView({ block: \"nearest\", inline: \"center\", behavior: \"smooth\" })\n }\n }\n }\n }\n }\n\n // React's useLayoutEffect on [value, size, gutterSize, pill, flush, isVertical].\n // `value` is the prop, so an uncontrolled selection does not move the thumb\n // until the next resize, exactly as in React.\n const syncThumb = () => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n const isVertical = props.orientation === \"vertical\"\n const transitionProperty = isVertical\n ? \"height 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n : \"width 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n\n const sizeChanged = prevSize !== props.size\n prevSize = props.size\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(isVertical, 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 applyThumbSizing(isVertical, true)\n } else {\n // First measure: apply transition after initial calculation is set\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, false)\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n })\n }\n }\n\n watch(\n [\n () => props.value,\n () => props.size,\n () => props.gutterSize,\n () => props.pill,\n () => props.flush,\n () => props.orientation === \"vertical\",\n ],\n syncThumb,\n { flush: \"post\" },\n )\n\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n syncThumb()\n\n // usehooks-ts useResizeObserver: only fires when the content box changed\n const root = rootRef.value\n if (!root || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n\n const thumb = thumbRef.value\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(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { box: \"content-box\" })\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 let mutationObserver: MutationObserver | undefined\n onMounted(() => {\n const root = rootRef.value\n if (!root || typeof MutationObserver === \"undefined\") return\n mutationObserver = new MutationObserver(() => {\n const thumb = thumbRef.value\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n mutationObserver.observe(root, { childList: true, characterData: true, subtree: true })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n mutationObserver?.disconnect()\n })\n\n // Radix moves focus into the group onto the selected tab, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? []).map((item) => item.ref)\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"on\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, GROUP_COMPOSED)\n // Only apply pill for segmented variant\n const isPill = props.variant === \"segmented\" && props.pill\n // Only apply flush for underline variant\n const isFlush = props.variant === \"underline\" && props.flush\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: false,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"div\",\n \"elementRef\": rootRef,\n \"composed\": GROUP_COMPOSED,\n \"listeners\": listeners,\n \"class\": [s.Tabs, className],\n // `dir` comes from RovingFocusGroup (\"ltr\" unless set), like Radix\n // Radix ToggleGroup type=\"single\" (radix-ui 1.8) is a radiogroup\n \"role\": \"radiogroup\",\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n \"data-variant\": props.variant,\n \"data-orientation\": props.orientation,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": isPill ? \"\" : undefined,\n \"data-flush\": isFlush ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n ...restAttrs,\n },\n { default: () => [h(\"div\", { class: s.TabsThumb, ref: thumbRef }), slots.default?.()] },\n ),\n },\n )\n }\n },\n})\n\n\nconst useTabsContext = () => {\n const context = inject(TabsContextKey, null)\n\n if (!context) {\n throw new Error(\"`TabsTab` must be used within `Tabs`\")\n }\n\n return context\n}\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (!isVNode(node)) return node != null && typeof node !== \"boolean\" && String(node) !== \"\"\n if (node.type === Comment) return false\n if (node.type === Text) return String(node.children ?? \"\") !== \"\"\n if (Array.isArray(node.children) && typeof node.type === \"symbol\") return hasContent(node.children as VNode[])\n return true\n })\n\nconst isBadgeObject = (badge: TabsBadgeProp | undefined): badge is Extract<TabsBadgeProp, { content: unknown }> =>\n badge != null && typeof badge === \"object\" && \"content\" in badge\n\nconst renderIcon = (icon: TabsIconProp | undefined) => {\n if (icon == null || typeof icon === \"string\" || isVNode(icon)) return icon\n return h(icon)\n}\n\nconst TabComponent = defineComponent({\n name: \"TabsTab\",\n inheritAttrs: false,\n props: {\n /** Tab value */\n value: { type: String, required: true },\n /** Icon before the text content: a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Object, Function] as PropType<TabsIconProp>,\n /**\n * Badge after the text content: a plain value, or an object with\n * `content`, `color`, `variant`, `pill` and `loading`. The `badge` slot\n * replaces the content and keeps the object's styling.\n */\n badge: { type: [String, Number, Object] as PropType<TabsBadgeProp>, default: undefined },\n /** Disable the individual tab */\n disabled: { type: Boolean, default: undefined },\n },\n setup(props, { slots, attrs }) {\n const context = useTabsContext()\n\n return () => {\n const disabled = context.disabled.value || !!props.disabled\n const selected = context.value.value\n const pressed = !!selected && selected === props.value\n const { onClick, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, ITEM_COMPOSED)\n\n // Normalize badge prop; the slot replaces its content\n const badgeSlot = slots.badge?.()\n const badgeObject = isBadgeObject(props.badge) ? props.badge : undefined\n const badgeProps = hasContent(badgeSlot)\n ? { ...badgeObject, content: badgeSlot }\n : props.badge != null\n ? (badgeObject ?? { content: props.badge as TabsContent })\n : null\n\n const children = slots.default?.()\n const iconSlot = slots.icon?.()\n\n // Radix Toggle: the caller's click handler runs first and can cancel the toggle\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled) return\n callHandlers(onClick, event)\n if (event.defaultPrevented) return\n context.setValue(pressed ? \"\" : props.value)\n }\n\n return h(\n RovingFocusItem,\n { asChild: true, focusable: !disabled, active: pressed },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"button\",\n \"composed\": ITEM_COMPOSED,\n \"listeners\": listeners,\n // Radix Toggle defaults, then the single-select radio semantics\n \"type\": \"button\",\n \"data-state\": pressed ? \"on\" : \"off\",\n \"data-disabled\": disabled ? \"\" : undefined,\n \"role\": \"radio\",\n \"aria-checked\": pressed,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n // Caller attributes win, as React spreads them after `className`\n \"class\": s.Tab,\n ...restAttrs,\n \"disabled\": disabled,\n \"onPointerenter\": handlePressableMouseEnter,\n \"onClick\": handleClick,\n },\n {\n default: () => [\n h(\"span\", { class: s.TabContent }, [\n hasContent(iconSlot) ? iconSlot : renderIcon(props.icon),\n hasContent(children) ? h(\"span\", null, children) : null,\n badgeProps\n ? h(\n \"span\",\n {\n \"class\": s.TabBadge,\n \"data-color\": badgeProps.color ?? \"secondary\",\n \"data-variant\": badgeProps.variant ?? \"soft\",\n \"data-pill\": badgeProps.pill ? \"\" : undefined,\n },\n badgeProps.loading ? [h(LoadingIndicator)] : [badgeProps.content as VNodeArrayChildren[number]],\n )\n : null,\n ]),\n ],\n },\n ),\n },\n )\n }\n },\n})\n\ntype TabOwnProps = InstanceType<typeof TabComponent>[\"$props\"]\n\n/** TabsTab props; other attributes (`aria-label`, ...) fall through to the button. */\nexport type TabProps = TabOwnProps & { \"aria-label\"?: string }\n\nexport const TabsTab = TabComponent as typeof TabComponent & { new (): { $props: TabProps } }\n\n/** Backward-compat alias of `TabsTab`, like React's `Tabs.Option` */\nexport const TabsOption: typeof TabsTab = TabsTab\n\n// ---------------------------------------------------------------------------\n// overflow=\"menu\" (React's OverflowTabs)\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype Slots = Record<string, ((...args: unknown[]) => VNodeArrayChildren) | undefined>\n\n/** The TabsTab vnodes of a default slot, through fragments (`v-for`, `<template>`) */\nconst tabVNodes = (nodes: VNodeArrayChildren | undefined): VNode[] =>\n (nodes ?? []).flatMap((node) => {\n if (!isVNode(node)) return []\n if (node.type === Fragment && Array.isArray(node.children)) return tabVNodes(node.children as VNodeArrayChildren)\n return node.type === TabComponent ? [node] : []\n })\n\nconst slotsOf = (node: VNode) => (node.children && typeof node.children === \"object\" && !Array.isArray(node.children) ? (node.children as Slots) : {})\n\n/** A tab's slot content; a vnode's raw slot may return a string or nothing */\nconst slotContent = (node: VNode, name: string): VNodeArrayChildren => {\n const content = slotsOf(node)[name]?.() as VNodeArrayChildren | VNodeArrayChildren[number] | undefined\n if (content == null) return []\n return Array.isArray(content) ? content : [content]\n}\n\nconst labelContent = (node: VNode) => slotContent(node, \"default\")\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 (isVNode(node)) {\n if (node.type === Comment) return \"\"\n if (typeof node.children === \"string\") return node.children\n if (Array.isArray(node.children)) return plainText(node.children)\n return plainText(labelContent(node))\n }\n return \"\"\n}\n\nconst tabProps = (node: VNode) => (node.props ?? {}) as Record<string, unknown>\n\n/** Slot content that renders something: text, or a vnode other than a comment */\nconst filled = (nodes: VNodeArrayChildren) =>\n plainText(nodes) !== \"\" || nodes.some((node) => isVNode(node) && node.type !== Comment)\n\nconst badgeText = (badge: unknown) => (isBadgeObject(badge as TabsBadgeProp) ? plainText((badge as { content: unknown }).content) : plainText(badge))\n\n/** A tab's icon: the `icon` slot, else the prop */\nconst tabIcon = (node: VNode) => {\n const iconSlot = slotContent(node, \"icon\")\n return filled(iconSlot) ? iconSlot : renderIcon(tabProps(node).icon as TabsIconProp | undefined)\n}\n\n/** A tab's count as text: the `badge` slot, else the prop */\nconst tabCount = (node: VNode) => plainText(slotContent(node, \"badge\")) || badgeText(tabProps(node).badge)\n\n/** A raw vnode prop holds a boolean attribute as written: `<TabsTab disabled>` is \"\" */\nconst tabDisabled = (node: VNode) => {\n const disabled = tabProps(node).disabled\n return disabled != null && disabled !== false\n}\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (node: VNode) =>\n plainText(labelContent(node)) || (tabProps(node)[\"aria-label\"] as string | undefined) || String(tabProps(node).value)\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (nodes: VNode[]) =>\n nodes\n .map((node) =>\n [\n tabProps(node).value,\n plainText(labelContent(node)),\n tabCount(node),\n tabProps(node).icon != null || slotsOf(node).icon != null,\n ].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * MenuTrigger 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 = defineComponent({\n name: \"TabsMoreTab\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { \"data-state\": _menuState, ...rest } = attrs\n return h(TabComponent, rest as TabProps, slots)\n }\n },\n})\n\nconst TabsPublic = defineComponent({\n name: \"Tabs\",\n inheritAttrs: false,\n props: {\n ...tabsProps,\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or they move into a menu at its end (`menu`). The\n * menu button shows the active tab's name when it is a hidden one.\n * Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n overflow: { type: String as PropType<\"scroll\" | \"menu\">, default: \"scroll\" },\n /** Text of the menu button with `overflow=\"menu\"`. @default \"More\" */\n overflowLabel: { type: String, default: \"More\" },\n },\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const hostRef = ref<HTMLDivElement | null>(null)\n // Uncontrolled like the group: `value` unset starts empty\n const uncontrolledValue = ref(\"\")\n const current = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n const select = (next: string) => {\n if (props.value === undefined) uncontrolledValue.value = next\n emit(\"update:value\", next)\n emit(\"change\", next)\n }\n\n // { count: null } while the measuring pass renders every tab and the\n // menu button; a new object each time, so an unchanged count still renders\n const measured = shallowRef<{ count: number | null }>({ count: null })\n let measuredSignature = \"\"\n let measuredActive = -1\n let lastRender = { measuring: true, signature: \"\", activeIndex: -1, length: 0 }\n let boxWidth = -1\n\n const measure = () => {\n if (!lastRender.measuring) return\n const root = hostRef.value?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== lastRender.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 boxWidth = hostRef.value?.parentElement?.clientWidth ?? -1\n measuredSignature = lastRender.signature\n measuredActive = lastRender.activeIndex\n\n if (available <= 0) {\n measured.value = { count: lastRender.length }\n return\n }\n\n const { activeIndex } = lastRender\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 measured.value = { count: visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available) }\n }\n\n // The width to fit is the container's; reports during a measuring pass\n // are skipped. The menu strip may appear or go after mount, with `overflow`\n let observer: ResizeObserver | undefined\n let observed: HTMLElement | null = null\n const observeBox = () => {\n const box = hostRef.value?.parentElement ?? null\n if (box === observed) return\n observer?.disconnect()\n observer = undefined\n observed = box\n if (!box || typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(() => {\n if (lastRender.measuring) return\n const width = box.clientWidth\n if (width === boxWidth) return\n boxWidth = width\n measured.value = { count: null }\n })\n observer.observe(box)\n }\n onMounted(() => {\n measure()\n observeBox()\n })\n onUpdated(() => {\n measure()\n observeBox()\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n const forward = {\n \"onUpdate:value\": (value: string) => emit(\"update:value\", value),\n \"onChange\": (value: string) => emit(\"change\", value),\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n }\n\n return () => {\n const { overflow, overflowLabel, ...rootProps } = props\n if (overflow !== \"menu\" || props.block || props.orientation === \"vertical\") {\n return h(TabsComponent, { ...rootProps, ...attrs, ...forward }, slots)\n }\n\n const items = tabVNodes(slots.default?.() as VNodeArrayChildren | undefined)\n // The strip's own props size the tabs and the menu button too\n const signature = [overflowLabel, props.size, props.variant, props.gutterSize, props.pill, props.flush, tabsSignature(items)].join(\n \"\\u0002\",\n )\n const activeIndex = items.findIndex((item) => tabProps(item).value === current.value)\n const { count } = measured.value\n // New tabs measure again; so does an active tab that moves under the\n // menu button or back out, since the button carries the hidden one's name\n const stale =\n count !== null &&\n (signature !== measuredSignature ||\n (activeIndex !== measuredActive && (measuredActive >= count || activeIndex >= count)))\n const measuring = count === null || stale\n lastRender = { measuring, signature, activeIndex, length: items.length }\n\n const shown = measuring ? items : items.slice(0, count)\n const hidden = measuring ? [] : items.slice(count)\n const hiddenActive = hidden.find((item) => tabProps(item).value === current.value) ?? null\n\n const strip = h(\n TabsComponent,\n {\n ...rootProps,\n ...attrs,\n \"data-overflow\": \"menu\",\n \"value\": hiddenActive ? MORE_VALUE : current.value,\n // Pressing the menu button opens the menu; it is not a tab\n \"onUpdate:value\": (next: string) => {\n if (next !== MORE_VALUE) select(next)\n },\n \"onClick\": forward.onClick,\n },\n {\n default: () => [\n ...shown,\n measuring || hidden.length > 0\n ? h(MenuTrigger, null, {\n default: () =>\n h(MoreTab, { value: MORE_VALUE }, {\n default: () => [\n h(\"span\", { class: s.OverflowLabel }, [hiddenActive ? tabLabel(hiddenActive) : overflowLabel, h(ChevronDownMd)]),\n ],\n }),\n })\n : null,\n ],\n },\n )\n\n return h(\"div\", { ref: hostRef, class: s.OverflowHost }, [\n h(Menu, null, {\n default: () => [\n strip,\n h(MenuContent, { align: \"end\", minWidth: \"auto\" }, {\n default: () =>\n h(MenuRadioGroup, { \"value\": current.value, \"onUpdate:value\": select }, {\n default: () =>\n hidden.map((item) => {\n const itemProps = tabProps(item)\n const count = tabCount(item)\n const label = labelContent(item)\n return h(\n MenuRadioItem,\n {\n key: String(itemProps.value),\n value: String(itemProps.value),\n disabled: props.disabled || tabDisabled(item),\n },\n {\n default: () => [\n tabIcon(item),\n filled(label)\n ? label\n : ((itemProps[\"aria-label\"] as string | undefined) ?? String(itemProps.value)),\n // A tab's count moves into the menu with it\n count !== \"\" ? h(\"span\", { class: s.OverflowBadge }, count) : null,\n ],\n },\n )\n }),\n }),\n }),\n ],\n }),\n ])\n }\n },\n})\n\ntype TabsOwnProps = InstanceType<typeof TabsPublic>[\"$props\"]\n\n/** Tabs props plus the attributes that fall through to the group element, as in React. */\nexport type TabsProps = TabsOwnProps & Omit<HTMLAttributes, keyof TabsOwnProps> & { \"aria-label\"?: string }\n\nexport const Tabs = TabsPublic as typeof TabsPublic & { new (): { $props: TabsProps } }\n"]}
@@ -26,6 +26,8 @@ export const TagInput = defineComponent({
26
26
  id: String,
27
27
  /** Corresponds with Input height when rows=1. @default "xl" */
28
28
  size: { type: String, default: "xl" },
29
+ /** Visual style. `ghost` has no frame, for a field that its container already frames. @default "outline" */
30
+ variant: { type: String, default: "outline" },
29
31
  /** Placeholder text for the input */
30
32
  placeholder: { type: String, default: "" },
31
33
  /** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */
@@ -345,6 +347,7 @@ export const TagInput = defineComponent({
345
347
  "onFocusin": handleFocus,
346
348
  "onFocusout": handleBlur,
347
349
  "data-size": props.size,
350
+ "data-variant": props.variant,
348
351
  "data-focused": focused.value ? "" : undefined,
349
352
  "data-empty": tags.value.size === 0 ? "" : undefined,
350
353
  "data-pill": props.pill ? "" : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../../src/components/TagInput/TagInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,QAAQ,EACR,eAAe,EACf,SAAS,EACT,GAAG,EACH,UAAU,EACV,KAAK,GAEN,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACpC,OAAO,CAAC,MAAM,wDAAwD,CAAA;AAOtE,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,EAAE,CAAA;AACpC,mEAAmE;AACnE,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAC/B,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,2EAA2E;IAC3E,wEAAwE;IACxE,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,uFAAuF;QACvF,YAAY,EAAE,EAAE,IAAI,EAAE,KAAwB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;QACnE,gEAAgE;QAChE,KAAK,EAAE,KAAwB;QAC/B,qDAAqD;QACrD,EAAE,EAAE,MAAM;QACV,+DAA+D;QAC/D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoE,EAAE,OAAO,EAAE,IAAI,EAAE;QACnG,qCAAqC;QACrC,WAAW,EAAE,EAAE,IAAI,EAA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AAC,KAAK;oCACzB,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;oCAClF,OAAO,EAAE,WAAW;oCACpB,SAAS,EAAE,kBAAkB;oCAC7B,WAAW,EAAE,eAAe,CAAC,KAAK;oCAClC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE;oCACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ;iCACzB,CAAC;6BACH,CAAC;yBACH,CAAC;wBACJ,CAAC,CAAC,IAAI;iBACT,CAAC;aACH,CACF;YACD,uDAAuD;YACvD,KAAK,CAAC,OAAO;gBACX,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpH,CAAC,CAAC,IAAI;SACT,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n type PropType,\n} from \"vue\"\nimport type { Sizes } from \"@plexui/styles/types\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/TagInput/TagInput.module.css\"\n\nexport type Tag = {\n value: string\n valid: boolean\n}\n\n// How many pixels to reserve on the right of the input as a buffer before wrapping to the next line\nconst INPUT_CURSOR_TOLERANCE_PX = 10\n// The total space reserved on either side of the input for padding\nconst CONTAINER_PADDING_PX = 24\nconst SHAKE_ANIMATION_DURATION_MS = 500\n\n/**\n * Port of packages/ui/src/components/TagInput/TagInput.tsx. Controlled with\n * `value` (`v-model:value`), uncontrolled with `defaultValue`; every change\n * emits `update:value` and `change` with the new tag list.\n */\nexport const TagInput = defineComponent({\n name: \"TagInput\",\n // React's TagInput takes no extra attributes (Field's aria-describedby and\n // aria-invalid are ignored); the render has several roots, so drop them\n inheritAttrs: false,\n props: {\n /** The state of the tag input when it is initially rendered, used when uncontrolled */\n defaultValue: { type: Array as PropType<Tag[]>, default: () => [] },\n /** The value of the tag input, used to control the tag input */\n value: Array as PropType<Tag[]>,\n /** Allows the tag input to be targeted with `for` */\n id: String,\n /** Corresponds with Input height when rows=1. @default \"xl\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\">>, default: \"xl\" },\n /** Placeholder text for the input */\n placeholder: { type: String, default: \"\" },\n /** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */\n validator: Function as PropType<(value: string) => boolean>,\n /** The maximum number of tags allowed before the input is disabled; displays a counter below the input */\n maxTags: Number,\n /** Whether to focus this input on mount */\n autoFocus: { type: Boolean, default: false },\n /** The minimum number of rows for the tag input. @default 1 */\n rows: { type: Number, default: 1 },\n /** Controls what characters will count towards creating a new tag. @default [\",\", \" \"] */\n delimiters: { type: Array as PropType<string[]>, default: () => [\",\", \" \"] },\n /** Disables the tag input visually and from interactions */\n disabled: { type: Boolean, default: undefined },\n /** Fully-rounded container and chips, matching `Input pill` */\n pill: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (_tags: Tag[]) => true,\n \"change\": (_tags: Tag[]) => true,\n },\n setup(props, { emit }) {\n // Shallow, like React state: emitted lists hold the caller's tag objects, not proxies\n const internalTags = shallowRef<Tag[]>(props.defaultValue)\n const value = computed(() => props.value ?? internalTags.value)\n const isControlled = computed(() => props.value !== undefined)\n const tags = computed(() => new Map(value.value.map((tag) => [tag.value, tag])))\n\n const currentInput = ref(\"\")\n const focused = ref(props.autoFocus)\n const selectedTag = ref<string | null>(null)\n const duplicateTags = ref(new Set<string>())\n const inputWidth = ref(0)\n\n const inputRef = ref<HTMLInputElement | null>(null)\n const containerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLSpanElement | null>(null)\n\n const showInput = computed(() => !props.maxTags || tags.value.size < props.maxTags)\n const placeholderText = computed(() => (tags.value.size === 0 ? props.placeholder : undefined))\n\n // Handle focusing the correct part of the tag input\n watch(\n [focused, selectedTag, showInput],\n () => {\n if (!focused.value || !containerRef.value) {\n return\n }\n const defaultFocusEl = inputRef.value ?? containerRef.value\n if (selectedTag.value === null) {\n defaultFocusEl.focus()\n } else {\n const selectedTagElement = containerRef.value.querySelector(\n `[data-tag=\"${CSS.escape(selectedTag.value)}\"]`,\n ) as HTMLElement | null\n if (selectedTagElement) {\n selectedTagElement.focus()\n } else {\n defaultFocusEl.focus()\n }\n }\n },\n { flush: \"post\" },\n )\n\n // Position the real input inside the container (see the React source for the reasoning)\n let observer: ResizeObserver | undefined\n const measure = () => {\n observer?.disconnect()\n const container = containerRef.value\n const measureEl = measureRef.value\n if (!container || !measureEl) {\n return\n }\n\n const recompute = () => {\n const containerRect = container.getBoundingClientRect()\n const tagElements = Array.from(container.querySelectorAll(\"[data-tag]\")) as HTMLDivElement[]\n\n // Grab the right edge of the last tag if it exists, otherwise the left edge of the container\n const leftBound =\n tagElements.length > 0\n ? tagElements[tagElements.length - 1]!.getBoundingClientRect().right\n : containerRect.left\n\n measureEl.textContent = currentInput.value || placeholderText.value || \"\"\n\n // By padding the text width, we ensure the input wraps to the next line\n // before we get to the point where we start to overflow\n const textWidth = measureEl.getBoundingClientRect().width + INPUT_CURSOR_TOLERANCE_PX\n const remainingSpace = containerRect.right - leftBound - CONTAINER_PADDING_PX\n\n if (textWidth <= remainingSpace) {\n inputWidth.value = remainingSpace\n } else {\n // We are going to flow to a new line, so recalculate remaining space based on the container size\n inputWidth.value = containerRect.right - containerRect.left - CONTAINER_PADDING_PX\n }\n }\n\n recompute()\n observer = new ResizeObserver(recompute)\n observer.observe(container)\n container.querySelectorAll(\"[data-tag]\").forEach((chip) => observer!.observe(chip))\n }\n onMounted(measure)\n watch([currentInput, placeholderText, tags], measure, { flush: \"post\" })\n\n const setTags = (newTags: Tag[]) => {\n emit(\"update:value\", newTags)\n emit(\"change\", newTags)\n if (!isControlled.value) {\n internalTags.value = newTags\n }\n }\n\n // Adds every value in one update: a paste of \"a,b\" must not compute\n // each addition from the same stale `tags` snapshot.\n const addTags = (tagValues: string[]) => {\n const next = new Map(tags.value)\n let changed = false\n for (const tagValue of tagValues) {\n if (props.maxTags && next.size >= props.maxTags) {\n break\n }\n const trimmed = tagValue.trim()\n if (!trimmed) {\n continue\n }\n if (next.has(trimmed)) {\n duplicateTags.value = new Set(duplicateTags.value).add(trimmed)\n setTimeout(() => {\n const remaining = new Set(duplicateTags.value)\n remaining.delete(trimmed)\n duplicateTags.value = remaining\n }, SHAKE_ANIMATION_DURATION_MS)\n continue\n }\n const validTag = props.validator?.(trimmed) ?? true\n next.set(trimmed, { value: trimmed, valid: validTag })\n changed = true\n }\n if (!changed) {\n return\n }\n setTags(Array.from(next.values()))\n }\n\n const addTag = (tagValue: string) => addTags([tagValue])\n\n const removeTag = (tag: string) => {\n if (props.disabled) {\n return\n }\n const next = new Map(tags.value)\n next.delete(tag)\n setTags(Array.from(next.values()))\n if (selectedTag.value === tag) {\n selectedTag.value = null\n }\n }\n\n const selectPreviousTag = () => {\n if (tags.value.size === 0) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n if (selectedTag.value === null) {\n selectedTag.value = tagList[tagList.length - 1]!\n } else {\n const prevIndex = tagList.indexOf(selectedTag.value)\n selectedTag.value = tagList[Math.max(0, prevIndex - 1)]!\n }\n }\n\n const selectNextTag = () => {\n if (selectedTag.value === null) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n const index = tagList.indexOf(selectedTag.value) + 1\n selectedTag.value = index < tagList.length ? tagList[index]! : null\n }\n\n const isEmptyStartingSelection = () => {\n const input = inputRef.value\n if (!input) {\n return true\n }\n return input.selectionStart === 0 && input.selectionEnd === 0\n }\n\n const handleContainerBlur = () => {\n focused.value = false\n selectedTag.value = null\n // A disabled tag input keeps the pending text instead of committing it\n if (currentInput.value && !props.disabled) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n\n const handleContainerKeyDown = (e: KeyboardEvent) => {\n // A tag can keep focus while the input turns disabled: no selecting or removing then\n if (props.disabled) {\n return\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") {\n if (isEmptyStartingSelection()) {\n e.preventDefault()\n selectPreviousTag()\n }\n } else if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") {\n if (selectedTag.value !== null) {\n e.preventDefault()\n selectNextTag()\n }\n } else if (e.key === \"Backspace\") {\n if (selectedTag.value !== null) {\n removeTag(selectedTag.value)\n } else if (isEmptyStartingSelection()) {\n selectPreviousTag()\n }\n }\n }\n\n const handleInputKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || props.delimiters.includes(e.key)) {\n e.preventDefault()\n if (currentInput.value) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n } else if (e.key === \"Tab\") {\n if (currentInput.value) {\n e.preventDefault()\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n }\n\n const handlePaste = (e: ClipboardEvent) => {\n const text = e.clipboardData?.getData(\"Text\") ?? \"\"\n let parts = [text]\n\n // Split by all delimiters\n for (const delimiter of props.delimiters) {\n const newParts: string[] = []\n for (const segment of parts) {\n newParts.push(...segment.split(delimiter))\n }\n parts = newParts\n }\n\n // Remove empty parts\n parts = parts.filter(Boolean)\n\n if (parts.length > 1) {\n e.preventDefault()\n addTags(parts)\n }\n }\n\n const handleContainerMouseDown = (e: MouseEvent) => {\n // All clicks in the container focus the container\n focused.value = true\n\n // If the click is on a tag pill, the tag's click handler focuses it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n\n // Since we know we didn't click a tag, clear any selected tag\n selectedTag.value = null\n\n // If this click is outside of the input, prevent it from \"stealing\" focus from the input\n const input = inputRef.value\n if (e.target && e.target instanceof Element && input && !input.contains(e.target)) {\n e.preventDefault()\n\n const { left, right, top, bottom } = input.getBoundingClientRect()\n const { clientX, clientY } = e\n\n // If this is the first click, clear the selection. Otherwise, select the input contents\n if (e.detail === 1) {\n if (clientY < top || clientX < left) {\n // \"Before\" the input: top/left\n input.setSelectionRange(0, 0)\n } else if (clientY > bottom || clientX > right) {\n // \"After\" the input: bottom/right\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n } else {\n input.select()\n }\n }\n }\n\n const handleFocus = (e: FocusEvent) => {\n // If the focus is on a tag pill, the click handler for the tag handles it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n focused.value = true\n }\n\n const handleBlur = (e: FocusEvent) => {\n // If there is no related target, don't remove focus (clicks inside the container)\n if (!e.relatedTarget || !(e.relatedTarget instanceof Node)) {\n return\n }\n // Don't clear focus if focus is only moved elsewhere within the container\n if (containerRef.value && containerRef.value.contains(e.relatedTarget)) {\n // If we just tabbed into the input, clear the selected tag\n if (inputRef.value && inputRef.value.contains(e.relatedTarget)) {\n selectedTag.value = null\n }\n return\n }\n handleContainerBlur()\n }\n\n // usehooks-ts' useOnClickOutside: mousedown outside the container\n const handleDocumentMouseDown = (e: MouseEvent) => {\n const container = containerRef.value\n if (!container || !(e.target instanceof Node) || container.contains(e.target)) return\n handleContainerBlur()\n }\n onMounted(() => document.addEventListener(\"mousedown\", handleDocumentMouseDown))\n onBeforeUnmount(() => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseDown)\n observer?.disconnect()\n })\n\n // Focus on mount when requested, like React's initial `focused` state\n onMounted(() => {\n if (focused.value) void nextTick(() => (inputRef.value ?? containerRef.value)?.focus())\n })\n\n return () => [\n h(\n \"div\",\n {\n \"class\": s.Container,\n \"ref\": containerRef,\n \"onKeydown\": handleContainerKeyDown,\n \"onMousedown\": handleContainerMouseDown,\n \"onFocusin\": handleFocus,\n \"onFocusout\": handleBlur,\n \"data-size\": props.size,\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-empty\": tags.value.size === 0 ? \"\" : undefined,\n \"data-pill\": props.pill ? \"\" : undefined,\n // At maxTags the input is gone, so the container becomes the tab stop;\n // arrow keys and Backspace then select and remove tags from here\n \"tabindex\": showInput.value || props.disabled ? -1 : 0,\n \"style\": toCssVariables({ \"min-rows\": String(props.rows) }),\n \"data-disabled\": props.disabled ? \"\" : undefined,\n },\n [\n h(\"div\", { class: s.TagInput }, [\n ...Array.from(tags.value.values()).map((tag) =>\n h(\n \"div\",\n {\n \"key\": tag.value,\n \"class\": s.Tag,\n \"tabindex\": -1,\n \"onClick\": () => (selectedTag.value = tag.value),\n \"data-tag\": tag.value,\n \"data-invalid\": !tag.valid ? \"\" : undefined,\n \"data-duplicate\": duplicateTags.value.has(tag.value) ? \"\" : undefined,\n },\n [\n h(\"span\", { class: \"overflow-hidden text-ellipsis\", title: tag.value }, [\n h(\"span\", { class: s.TagValue }, tag.value),\n ]),\n h(\n \"div\",\n { \"class\": s.TagRemove, \"onClick\": () => removeTag(tag.value), \"role\": \"button\", \"aria-label\": \"Remove item\" },\n [h(X)],\n ),\n ],\n ),\n ),\n showInput.value\n ? h(\"div\", { class: s.InputContainer }, [\n // Hidden element to measure input width\n h(\"span\", { ref: measureRef, class: s.InputMeasure }),\n h(\"div\", { class: s.InputWrapper }, [\n h(\"input\", {\n id: props.id,\n class: s.Input,\n ref: inputRef,\n value: currentInput.value,\n onInput: (e: Event) => (currentInput.value = (e.target as HTMLInputElement).value),\n onPaste: handlePaste,\n onKeydown: handleInputKeyDown,\n placeholder: placeholderText.value,\n style: { width: `${inputWidth.value}px` },\n disabled: props.disabled,\n }),\n ]),\n ])\n : null,\n ]),\n ],\n ),\n // 0 means no limit, as for the input above: no counter\n props.maxTags\n ? h(\"div\", { class: s.Limit }, [String(tags.value.size), h(\"span\", { class: \"mx-px\" }, \"/\"), String(props.maxTags)])\n : null,\n ]\n },\n})\n\nexport type TagInputProps = InstanceType<typeof TagInput>[\"$props\"]\n"]}
1
+ {"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../../src/components/TagInput/TagInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,QAAQ,EACR,eAAe,EACf,SAAS,EACT,GAAG,EACH,UAAU,EACV,KAAK,GAEN,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACpC,OAAO,CAAC,MAAM,wDAAwD,CAAA;AAOtE,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,EAAE,CAAA;AACpC,mEAAmE;AACnE,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAC/B,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,2EAA2E;IAC3E,wEAAwE;IACxE,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,uFAAuF;QACvF,YAAY,EAAE,EAAE,IAAI,EAAE,KAAwB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;QACnE,gEAAgE;QAChE,KAAK,EAAE,KAAwB;QAC/B,qDAAqD;QACrD,EAAE,EAAE,MAAM;QACV,+DAA+D;QAC/D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoE,EAAE,OAAO,EAAE,IAAI,EAAE;QACnG,4GAA4G;QAC5G,OAAO,EAAE,EAAE,IAAI,EAAE,MAAiD,EAAE,OAAO,EAAE,SAAS,EAAE;QACxF,qCAAqC;QACrC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,wGAAwG;QACxG,S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,EAAE,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;oCAClF,OAAO,EAAE,WAAW;oCACpB,SAAS,EAAE,kBAAkB;oCAC7B,WAAW,EAAE,eAAe,CAAC,KAAK;oCAClC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE;oCACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ;iCACzB,CAAC;6BACH,CAAC;yBACH,CAAC;wBACJ,CAAC,CAAC,IAAI;iBACT,CAAC;aACH,CACF;YACD,uDAAuD;YACvD,KAAK,CAAC,OAAO;gBACX,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpH,CAAC,CAAC,IAAI;SACT,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n type PropType,\n} from \"vue\"\nimport type { Sizes, Variants } from \"@plexui/styles/types\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/TagInput/TagInput.module.css\"\n\nexport type Tag = {\n value: string\n valid: boolean\n}\n\n// How many pixels to reserve on the right of the input as a buffer before wrapping to the next line\nconst INPUT_CURSOR_TOLERANCE_PX = 10\n// The total space reserved on either side of the input for padding\nconst CONTAINER_PADDING_PX = 24\nconst SHAKE_ANIMATION_DURATION_MS = 500\n\n/**\n * Port of packages/ui/src/components/TagInput/TagInput.tsx. Controlled with\n * `value` (`v-model:value`), uncontrolled with `defaultValue`; every change\n * emits `update:value` and `change` with the new tag list.\n */\nexport const TagInput = defineComponent({\n name: \"TagInput\",\n // React's TagInput takes no extra attributes (Field's aria-describedby and\n // aria-invalid are ignored); the render has several roots, so drop them\n inheritAttrs: false,\n props: {\n /** The state of the tag input when it is initially rendered, used when uncontrolled */\n defaultValue: { type: Array as PropType<Tag[]>, default: () => [] },\n /** The value of the tag input, used to control the tag input */\n value: Array as PropType<Tag[]>,\n /** Allows the tag input to be targeted with `for` */\n id: String,\n /** Corresponds with Input height when rows=1. @default \"xl\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\">>, default: \"xl\" },\n /** Visual style. `ghost` has no frame, for a field that its container already frames. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"outline\" | \"ghost\">>, default: \"outline\" },\n /** Placeholder text for the input */\n placeholder: { type: String, default: \"\" },\n /** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */\n validator: Function as PropType<(value: string) => boolean>,\n /** The maximum number of tags allowed before the input is disabled; displays a counter below the input */\n maxTags: Number,\n /** Whether to focus this input on mount */\n autoFocus: { type: Boolean, default: false },\n /** The minimum number of rows for the tag input. @default 1 */\n rows: { type: Number, default: 1 },\n /** Controls what characters will count towards creating a new tag. @default [\",\", \" \"] */\n delimiters: { type: Array as PropType<string[]>, default: () => [\",\", \" \"] },\n /** Disables the tag input visually and from interactions */\n disabled: { type: Boolean, default: undefined },\n /** Fully-rounded container and chips, matching `Input pill` */\n pill: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (_tags: Tag[]) => true,\n \"change\": (_tags: Tag[]) => true,\n },\n setup(props, { emit }) {\n // Shallow, like React state: emitted lists hold the caller's tag objects, not proxies\n const internalTags = shallowRef<Tag[]>(props.defaultValue)\n const value = computed(() => props.value ?? internalTags.value)\n const isControlled = computed(() => props.value !== undefined)\n const tags = computed(() => new Map(value.value.map((tag) => [tag.value, tag])))\n\n const currentInput = ref(\"\")\n const focused = ref(props.autoFocus)\n const selectedTag = ref<string | null>(null)\n const duplicateTags = ref(new Set<string>())\n const inputWidth = ref(0)\n\n const inputRef = ref<HTMLInputElement | null>(null)\n const containerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLSpanElement | null>(null)\n\n const showInput = computed(() => !props.maxTags || tags.value.size < props.maxTags)\n const placeholderText = computed(() => (tags.value.size === 0 ? props.placeholder : undefined))\n\n // Handle focusing the correct part of the tag input\n watch(\n [focused, selectedTag, showInput],\n () => {\n if (!focused.value || !containerRef.value) {\n return\n }\n const defaultFocusEl = inputRef.value ?? containerRef.value\n if (selectedTag.value === null) {\n defaultFocusEl.focus()\n } else {\n const selectedTagElement = containerRef.value.querySelector(\n `[data-tag=\"${CSS.escape(selectedTag.value)}\"]`,\n ) as HTMLElement | null\n if (selectedTagElement) {\n selectedTagElement.focus()\n } else {\n defaultFocusEl.focus()\n }\n }\n },\n { flush: \"post\" },\n )\n\n // Position the real input inside the container (see the React source for the reasoning)\n let observer: ResizeObserver | undefined\n const measure = () => {\n observer?.disconnect()\n const container = containerRef.value\n const measureEl = measureRef.value\n if (!container || !measureEl) {\n return\n }\n\n const recompute = () => {\n const containerRect = container.getBoundingClientRect()\n const tagElements = Array.from(container.querySelectorAll(\"[data-tag]\")) as HTMLDivElement[]\n\n // Grab the right edge of the last tag if it exists, otherwise the left edge of the container\n const leftBound =\n tagElements.length > 0\n ? tagElements[tagElements.length - 1]!.getBoundingClientRect().right\n : containerRect.left\n\n measureEl.textContent = currentInput.value || placeholderText.value || \"\"\n\n // By padding the text width, we ensure the input wraps to the next line\n // before we get to the point where we start to overflow\n const textWidth = measureEl.getBoundingClientRect().width + INPUT_CURSOR_TOLERANCE_PX\n const remainingSpace = containerRect.right - leftBound - CONTAINER_PADDING_PX\n\n if (textWidth <= remainingSpace) {\n inputWidth.value = remainingSpace\n } else {\n // We are going to flow to a new line, so recalculate remaining space based on the container size\n inputWidth.value = containerRect.right - containerRect.left - CONTAINER_PADDING_PX\n }\n }\n\n recompute()\n observer = new ResizeObserver(recompute)\n observer.observe(container)\n container.querySelectorAll(\"[data-tag]\").forEach((chip) => observer!.observe(chip))\n }\n onMounted(measure)\n watch([currentInput, placeholderText, tags], measure, { flush: \"post\" })\n\n const setTags = (newTags: Tag[]) => {\n emit(\"update:value\", newTags)\n emit(\"change\", newTags)\n if (!isControlled.value) {\n internalTags.value = newTags\n }\n }\n\n // Adds every value in one update: a paste of \"a,b\" must not compute\n // each addition from the same stale `tags` snapshot.\n const addTags = (tagValues: string[]) => {\n const next = new Map(tags.value)\n let changed = false\n for (const tagValue of tagValues) {\n if (props.maxTags && next.size >= props.maxTags) {\n break\n }\n const trimmed = tagValue.trim()\n if (!trimmed) {\n continue\n }\n if (next.has(trimmed)) {\n duplicateTags.value = new Set(duplicateTags.value).add(trimmed)\n setTimeout(() => {\n const remaining = new Set(duplicateTags.value)\n remaining.delete(trimmed)\n duplicateTags.value = remaining\n }, SHAKE_ANIMATION_DURATION_MS)\n continue\n }\n const validTag = props.validator?.(trimmed) ?? true\n next.set(trimmed, { value: trimmed, valid: validTag })\n changed = true\n }\n if (!changed) {\n return\n }\n setTags(Array.from(next.values()))\n }\n\n const addTag = (tagValue: string) => addTags([tagValue])\n\n const removeTag = (tag: string) => {\n if (props.disabled) {\n return\n }\n const next = new Map(tags.value)\n next.delete(tag)\n setTags(Array.from(next.values()))\n if (selectedTag.value === tag) {\n selectedTag.value = null\n }\n }\n\n const selectPreviousTag = () => {\n if (tags.value.size === 0) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n if (selectedTag.value === null) {\n selectedTag.value = tagList[tagList.length - 1]!\n } else {\n const prevIndex = tagList.indexOf(selectedTag.value)\n selectedTag.value = tagList[Math.max(0, prevIndex - 1)]!\n }\n }\n\n const selectNextTag = () => {\n if (selectedTag.value === null) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n const index = tagList.indexOf(selectedTag.value) + 1\n selectedTag.value = index < tagList.length ? tagList[index]! : null\n }\n\n const isEmptyStartingSelection = () => {\n const input = inputRef.value\n if (!input) {\n return true\n }\n return input.selectionStart === 0 && input.selectionEnd === 0\n }\n\n const handleContainerBlur = () => {\n focused.value = false\n selectedTag.value = null\n // A disabled tag input keeps the pending text instead of committing it\n if (currentInput.value && !props.disabled) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n\n const handleContainerKeyDown = (e: KeyboardEvent) => {\n // A tag can keep focus while the input turns disabled: no selecting or removing then\n if (props.disabled) {\n return\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") {\n if (isEmptyStartingSelection()) {\n e.preventDefault()\n selectPreviousTag()\n }\n } else if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") {\n if (selectedTag.value !== null) {\n e.preventDefault()\n selectNextTag()\n }\n } else if (e.key === \"Backspace\") {\n if (selectedTag.value !== null) {\n removeTag(selectedTag.value)\n } else if (isEmptyStartingSelection()) {\n selectPreviousTag()\n }\n }\n }\n\n const handleInputKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || props.delimiters.includes(e.key)) {\n e.preventDefault()\n if (currentInput.value) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n } else if (e.key === \"Tab\") {\n if (currentInput.value) {\n e.preventDefault()\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n }\n\n const handlePaste = (e: ClipboardEvent) => {\n const text = e.clipboardData?.getData(\"Text\") ?? \"\"\n let parts = [text]\n\n // Split by all delimiters\n for (const delimiter of props.delimiters) {\n const newParts: string[] = []\n for (const segment of parts) {\n newParts.push(...segment.split(delimiter))\n }\n parts = newParts\n }\n\n // Remove empty parts\n parts = parts.filter(Boolean)\n\n if (parts.length > 1) {\n e.preventDefault()\n addTags(parts)\n }\n }\n\n const handleContainerMouseDown = (e: MouseEvent) => {\n // All clicks in the container focus the container\n focused.value = true\n\n // If the click is on a tag pill, the tag's click handler focuses it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n\n // Since we know we didn't click a tag, clear any selected tag\n selectedTag.value = null\n\n // If this click is outside of the input, prevent it from \"stealing\" focus from the input\n const input = inputRef.value\n if (e.target && e.target instanceof Element && input && !input.contains(e.target)) {\n e.preventDefault()\n\n const { left, right, top, bottom } = input.getBoundingClientRect()\n const { clientX, clientY } = e\n\n // If this is the first click, clear the selection. Otherwise, select the input contents\n if (e.detail === 1) {\n if (clientY < top || clientX < left) {\n // \"Before\" the input: top/left\n input.setSelectionRange(0, 0)\n } else if (clientY > bottom || clientX > right) {\n // \"After\" the input: bottom/right\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n } else {\n input.select()\n }\n }\n }\n\n const handleFocus = (e: FocusEvent) => {\n // If the focus is on a tag pill, the click handler for the tag handles it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n focused.value = true\n }\n\n const handleBlur = (e: FocusEvent) => {\n // If there is no related target, don't remove focus (clicks inside the container)\n if (!e.relatedTarget || !(e.relatedTarget instanceof Node)) {\n return\n }\n // Don't clear focus if focus is only moved elsewhere within the container\n if (containerRef.value && containerRef.value.contains(e.relatedTarget)) {\n // If we just tabbed into the input, clear the selected tag\n if (inputRef.value && inputRef.value.contains(e.relatedTarget)) {\n selectedTag.value = null\n }\n return\n }\n handleContainerBlur()\n }\n\n // usehooks-ts' useOnClickOutside: mousedown outside the container\n const handleDocumentMouseDown = (e: MouseEvent) => {\n const container = containerRef.value\n if (!container || !(e.target instanceof Node) || container.contains(e.target)) return\n handleContainerBlur()\n }\n onMounted(() => document.addEventListener(\"mousedown\", handleDocumentMouseDown))\n onBeforeUnmount(() => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseDown)\n observer?.disconnect()\n })\n\n // Focus on mount when requested, like React's initial `focused` state\n onMounted(() => {\n if (focused.value) void nextTick(() => (inputRef.value ?? containerRef.value)?.focus())\n })\n\n return () => [\n h(\n \"div\",\n {\n \"class\": s.Container,\n \"ref\": containerRef,\n \"onKeydown\": handleContainerKeyDown,\n \"onMousedown\": handleContainerMouseDown,\n \"onFocusin\": handleFocus,\n \"onFocusout\": handleBlur,\n \"data-size\": props.size,\n \"data-variant\": props.variant,\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-empty\": tags.value.size === 0 ? \"\" : undefined,\n \"data-pill\": props.pill ? \"\" : undefined,\n // At maxTags the input is gone, so the container becomes the tab stop;\n // arrow keys and Backspace then select and remove tags from here\n \"tabindex\": showInput.value || props.disabled ? -1 : 0,\n \"style\": toCssVariables({ \"min-rows\": String(props.rows) }),\n \"data-disabled\": props.disabled ? \"\" : undefined,\n },\n [\n h(\"div\", { class: s.TagInput }, [\n ...Array.from(tags.value.values()).map((tag) =>\n h(\n \"div\",\n {\n \"key\": tag.value,\n \"class\": s.Tag,\n \"tabindex\": -1,\n \"onClick\": () => (selectedTag.value = tag.value),\n \"data-tag\": tag.value,\n \"data-invalid\": !tag.valid ? \"\" : undefined,\n \"data-duplicate\": duplicateTags.value.has(tag.value) ? \"\" : undefined,\n },\n [\n h(\"span\", { class: \"overflow-hidden text-ellipsis\", title: tag.value }, [\n h(\"span\", { class: s.TagValue }, tag.value),\n ]),\n h(\n \"div\",\n { \"class\": s.TagRemove, \"onClick\": () => removeTag(tag.value), \"role\": \"button\", \"aria-label\": \"Remove item\" },\n [h(X)],\n ),\n ],\n ),\n ),\n showInput.value\n ? h(\"div\", { class: s.InputContainer }, [\n // Hidden element to measure input width\n h(\"span\", { ref: measureRef, class: s.InputMeasure }),\n h(\"div\", { class: s.InputWrapper }, [\n h(\"input\", {\n id: props.id,\n class: s.Input,\n ref: inputRef,\n value: currentInput.value,\n onInput: (e: Event) => (currentInput.value = (e.target as HTMLInputElement).value),\n onPaste: handlePaste,\n onKeydown: handleInputKeyDown,\n placeholder: placeholderText.value,\n style: { width: `${inputWidth.value}px` },\n disabled: props.disabled,\n }),\n ]),\n ])\n : null,\n ]),\n ],\n ),\n // 0 means no limit, as for the input above: no counter\n props.maxTags\n ? h(\"div\", { class: s.Limit }, [String(tags.value.size), h(\"span\", { class: \"mx-px\" }, \"/\"), String(props.maxTags)])\n : null,\n ]\n },\n})\n\nexport type TagInputProps = InstanceType<typeof TagInput>[\"$props\"]\n"]}