@kerfjs/ui 5.0.0-beta.121 → 5.0.0-beta.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/ai/component-catalog.json +5 -8
  2. package/ai/component-composition.json +0 -2
  3. package/ai/components/README.md +1 -1
  4. package/ai/components/document-baseline.md +2 -2
  5. package/ai/components/tabs.md +3 -4
  6. package/ai/public-api-signatures-v1.md +3 -6
  7. package/ai/skill.md +4 -4
  8. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  9. package/dist/{chunk-BSNKDW4X.js → chunk-ROEBKSIY.js} +1 -4
  10. package/dist/chunk-ROEBKSIY.js.map +1 -0
  11. package/dist/{chunk-HJWFHJ3Z.js → chunk-WPP5Q4A5.js} +10 -82
  12. package/dist/chunk-WPP5Q4A5.js.map +1 -0
  13. package/dist/{chunk-7AK5I7U7.js → chunk-YWLDLNAV.js} +1 -1
  14. package/dist/{chunk-7AK5I7U7.js.map → chunk-YWLDLNAV.js.map} +1 -1
  15. package/dist/index.js +3 -3
  16. package/dist/styles/components/collections/list-header/list-header.css +11 -25
  17. package/dist/styles/components/navigation/tab-bar/tab-bar.css +15 -17
  18. package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +1 -58
  19. package/dist/styles/document.css +9 -0
  20. package/dist/styles/list-header.css +11 -25
  21. package/dist/styles/tab-bar-item.css +1 -58
  22. package/dist/styles/tab-bar.css +15 -17
  23. package/dist/tab-bar-item.d.ts +1 -4
  24. package/dist/tab-bar-item.js +1 -1
  25. package/dist/tab-bar.d.ts +1 -1
  26. package/dist/tab-bar.js +1 -1
  27. package/dist/wire-tab-bars.js +1 -1
  28. package/docs/component-contract.md +6 -7
  29. package/docs/component-selection.md +11 -19
  30. package/docs/design/sketch/Kerf-UI.sketch +0 -0
  31. package/docs/design/sketch/README.md +73 -0
  32. package/docs/design/sketch/advanced/README.md +75 -0
  33. package/docs/design/sketch/button/README.md +270 -0
  34. package/docs/design/sketch/content/README.md +70 -0
  35. package/docs/design/sketch/coverage.md +157 -0
  36. package/docs/design/sketch/forms/README.md +97 -0
  37. package/docs/design/sketch/lists/README.md +65 -0
  38. package/docs/design/sketch/toolbar/README.md +73 -0
  39. package/docs/design/sketch/unified/README.md +69 -0
  40. package/docs/design/sketch/unified/pages/advanced.png +0 -0
  41. package/docs/design/sketch/unified/pages/button.png +0 -0
  42. package/docs/design/sketch/unified/pages/content.png +0 -0
  43. package/docs/design/sketch/unified/pages/forms.png +0 -0
  44. package/docs/design/sketch/unified/pages/lists.png +0 -0
  45. package/docs/design/sketch/unified/pages/toolbar.png +0 -0
  46. package/docs/design/sketch-runner.md +87 -0
  47. package/docs/design/templates/list-header/action-dark.svg +1 -1
  48. package/docs/design/templates/list-header/action.svg +1 -1
  49. package/docs/design/templates/list-header/toggle-collapsed-dark.svg +1 -1
  50. package/docs/design/templates/list-header/toggle-collapsed.svg +1 -1
  51. package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
  52. package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
  53. package/docs/design/templates/list-header-dark.svg +1 -1
  54. package/docs/design/templates/list-header.svg +1 -1
  55. package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
  56. package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
  57. package/docs/design/templates/tab-bar-dark.svg +1 -1
  58. package/docs/design/templates/tab-bar.svg +1 -1
  59. package/docs/design/templates.md +9 -0
  60. package/docs/document-baseline.md +5 -0
  61. package/docs/interaction-conventions.md +1 -1
  62. package/docs/layout.md +7 -6
  63. package/docs/ux-demo.md +1 -1
  64. package/docs/webawesome-migration.md +10 -2
  65. package/llms.txt +5 -4
  66. package/package.json +17 -6
  67. package/dist/chunk-BSNKDW4X.js.map +0 -1
  68. package/dist/chunk-HJWFHJ3Z.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/navigation/tab-bar/wiring/wire-tab-bars.ts"],"names":["target"],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AAqB,SAAS,CAAA;AAChE,IAAA,iBAAA,CAAkB,UAAA,EAAW;AAC7B,IAAA,cAAA,EAAgB,UAAA,EAAW;AAC3B,IAAA,KAAA,MAAW,SAAS,UAAA,EAAY;AAC9B,MAAA,KAAA,CAAM,KAAA,CAAM,eAAe,8BAA8B,CAAA;AAAA,IAC3D;AACA,IAAA,UAAA,CAAW,KAAA,EAAM;AACjB,IAAA,YAAA,CAAa,KAAA,EAAM;AACnB,IAAA,KAAA,EAAM;AACN,IAAA,IAAA,CAAK,mBAAA,CAAoB,aAAa,WAAW,CAAA;AACjD,IAAA,IAAA,CAAK,mBAAA,CAAoB,YAAY,UAAU,CAAA;AAC/C,IAAA,IAAA,CAAK,mBAAA,CAAoB,QAAQ,MAAM,CAAA;AACvC,IAAA,IAAA,CAAK,mBAAA,CAAoB,WAAW,KAAK,CAAA;AACzC,IAAA,IAAA,CAAK,mBAAA,CAAoB,WAAW,SAAS,CAAA;AAC7C,IAAA,IAAA,CAAK,mBAAA,CAAoB,WAAW,SAAS,CAAA;AAC7C,IAAA,IAAA,CAAK,mBAAA,CAAoB,WAAA,EAAa,gBAAA,EAAkB,IAAI,CAAA;AAAA,EAC9D,CAAA;AACF","file":"chunk-WPP5Q4A5.js","sourcesContent":["import type { TabActivation } from '../tab-bar.js';\n\nexport type TabReorderSource = 'pointer' | 'keyboard';\nexport type TabDropPosition = 'before' | 'after';\n\nexport interface TabReorder {\n barId: string;\n sourceId: string;\n targetId: string;\n position: TabDropPosition;\n source: TabReorderSource;\n}\n\nexport type { TabActivation } from '../tab-bar.js';\n\nexport interface WireTabBarsOptions {\n onReorder: (change: TabReorder) => void;\n /**\n * How arrow / Home / End keys activate tabs (default `'automatic'`):\n * - `'automatic'` moves roving focus **and** selects the focused tab (clicks it).\n * - `'manual'` moves roving focus only; the user selects with Enter / Space / click\n * (the ARIA Tabs manual-activation pattern). Use this when activation is a heavy or\n * side-effecting action (e.g. a tab that loads a project) so arrowing through the\n * strip doesn't trigger it on every tab.\n *\n * A per-bar `data-tab-activation=\"manual\" | \"automatic\"` attribute (see the `TabBar`\n * `activation` prop) overrides this option for that strip.\n */\n activation?: TabActivation;\n}\n\ntype TabRoot = HTMLElement;\ntype TabBarRoot = HTMLElement;\n\nconst AUTO_SCROLL_EDGE_PX = 56;\nconst AUTO_SCROLL_MIN_PX_PER_SECOND = 180;\nconst AUTO_SCROLL_MAX_PX_PER_SECOND = 900;\n\nexport function reorderTabs<T>(\n items: readonly T[],\n getId: (item: T) => string,\n sourceId: string,\n targetId: string,\n position: TabDropPosition,\n): T[] {\n if (sourceId === targetId) return [...items];\n const source = items.find((item) => getId(item) === sourceId);\n if (!source || !items.some((item) => getId(item) === targetId))\n return [...items];\n const remaining = items.filter((item) => getId(item) !== sourceId);\n const targetIndex = remaining.findIndex((item) => getId(item) === targetId);\n remaining.splice(targetIndex + (position === 'after' ? 1 : 0), 0, source);\n return remaining;\n}\n\nfunction tabRoot(target: EventTarget | null): TabRoot | undefined {\n return target instanceof Element\n ? (target.closest<TabRoot>('[data-component=\"tab-bar-item\"]') ?? undefined)\n : undefined;\n}\n\nfunction tabBar(tab: TabRoot): TabBarRoot | undefined {\n return tab.closest<TabBarRoot>('[data-component=\"tab-bar\"]') ?? undefined;\n}\n\nfunction tabId(tab: TabRoot): string | undefined {\n return tab.dataset.tabId || undefined;\n}\n\nfunction tabEnabled(tab: TabRoot): boolean {\n return (\n tab.querySelector<HTMLButtonElement>('[role=\"tab\"]')?.disabled === false\n );\n}\n\nfunction barId(bar: TabBarRoot): string | undefined {\n return bar.dataset.tabBarId || undefined;\n}\n\nfunction positionFor(event: DragEvent, tab: TabRoot): TabDropPosition {\n const bounds = tab.getBoundingClientRect();\n return event.clientX < bounds.left + bounds.width / 2 ? 'before' : 'after';\n}\n\nfunction tabsIn(bar: TabBarRoot): HTMLButtonElement[] {\n return [\n ...bar.querySelectorAll<HTMLButtonElement>(\n '[data-kui-tab-list] [role=\"tab\"]:not(:disabled)',\n ),\n ];\n}\n\nfunction reveal(tab: HTMLElement | null | undefined): void {\n tab?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n}\n\n/**\n * Scroll a tab's own strip, and nothing else, so the tab is fully visible.\n * Used for selection changes the application makes without focus (adding and\n * selecting a tab): unlike `scrollIntoView`, it never scrolls the page to a\n * bar that is out of view.\n */\nfunction revealInStrip(tab: HTMLElement): void {\n const strip = tab.closest<HTMLElement>('[data-kui-tab-list]');\n if (!strip || strip.scrollWidth <= strip.clientWidth) return;\n const bounds = strip.getBoundingClientRect();\n const snap = strip.dataset.snapTabs === 'true';\n const box = snap\n ? (tab.closest<HTMLElement>('.kui-tab-bar-item')?.getBoundingClientRect() ??\n tab.getBoundingClientRect())\n : tab.getBoundingClientRect();\n if (\n strip.ownerDocument.defaultView?.getComputedStyle(strip).direction === 'rtl'\n ) {\n const right = bounds.right;\n if (snap) strip.scrollLeft += box.right - right;\n else if (box.right > right) strip.scrollLeft += box.right - right;\n else if (box.left < bounds.left)\n strip.scrollLeft -= Math.min(bounds.left - box.left, right - box.right);\n return;\n }\n const left = bounds.left;\n if (snap) strip.scrollLeft += box.left - left;\n else if (box.left < left) strip.scrollLeft -= left - box.left;\n else if (box.right > bounds.right)\n strip.scrollLeft += Math.min(box.right - bounds.right, box.left - left);\n}\n\nconst TAB_BAR = '[data-component=\"tab-bar\"]';\nconst TAB_LIST = '[data-kui-tab-list]';\n\n/** The selected tab button of every bar below each scope, keyed by bar. */\nfunction selectedTabs(scopes: Iterable<ParentNode>) {\n const selected = new Map<TabBarRoot, HTMLElement>();\n for (const scope of scopes)\n scope\n .querySelectorAll<HTMLElement>(\n `${TAB_LIST} [role=\"tab\"][aria-selected=\"true\"]`,\n )\n .forEach((button) => {\n const tab = tabRoot(button);\n const bar = tab && tabBar(tab);\n if (bar && !selected.has(bar)) selected.set(bar, button);\n });\n return selected;\n}\n\n/** `node` itself when it matches `selector`, plus its matching descendants. */\nfunction selfAndBelow<T extends Element>(node: Node, selector: string): T[] {\n if (!(node instanceof Element)) return [];\n const found = [...node.querySelectorAll<T>(selector)];\n if (node.matches(selector)) found.unshift(node as T);\n return found;\n}\n\n/**\n * The tab bars a batch of mutation records can have changed. A mutation\n * inside a bar touches that bar; an inserted subtree touches the bars it\n * brings; a `dir` change touches every bar below its element. Mutations\n * elsewhere in the root — terminal output, list morphs, streamed content —\n * touch nothing and cost one `closest` per record.\n */\nfunction touchedBars(records: readonly MutationRecord[]) {\n const bars = new Set<TabBarRoot>();\n for (const record of records) {\n const target =\n record.target instanceof Element\n ? record.target\n : record.target.parentElement;\n const owner = target?.closest<TabBarRoot>(TAB_BAR);\n if (owner) bars.add(owner);\n else if (record.attributeName === 'dir' && target)\n for (const bar of selfAndBelow<TabBarRoot>(target, TAB_BAR))\n bars.add(bar);\n record.addedNodes.forEach((node) => {\n for (const bar of selfAndBelow<TabBarRoot>(node, TAB_BAR)) bars.add(bar);\n });\n }\n return bars;\n}\n\n/** Wire reordering and keyboard navigation while leaving controlled state in the application. */\nexport function wireTabBars(\n root: HTMLElement | Document,\n { onReorder, activation = 'automatic' }: WireTabBarsOptions,\n): () => void {\n const ownerDocument = (\n root.nodeType === 9 ? (root as Document) : root.ownerDocument\n )!;\n const view = ownerDocument.defaultView!;\n const snapExtras = new WeakMap<HTMLElement, number>();\n const snapStrips = new Set<HTMLElement>();\n const snapObserved = new Set<HTMLElement>();\n let snapFrame: number | undefined;\n const scheduleSnapSync = () => {\n if (disposed || snapFrame !== undefined) return;\n snapFrame = view.requestAnimationFrame(() => {\n snapFrame = undefined;\n if (!disposed) syncSnapInRoot();\n });\n };\n const resizeObserver = view.ResizeObserver\n ? new view.ResizeObserver((entries: ResizeObserverEntry[]) => {\n if (disposed) return;\n let snap = false;\n for (const { target } of entries) {\n if (snapObserved.has(target as HTMLElement)) snap = true;\n }\n if (snap) scheduleSnapSync();\n })\n : undefined;\n const observeSnap = (element: HTMLElement) => {\n if (snapObserved.has(element)) return;\n resizeObserver?.observe(element);\n snapObserved.add(element);\n };\n const syncSnap = (strip: HTMLElement) => {\n const previousExtra = snapExtras.get(strip) ?? 0;\n if (strip.dataset.snapTabs !== 'true') {\n strip.style.removeProperty('--kui-tab-bar-snap-end-extra');\n snapExtras.delete(strip);\n snapStrips.delete(strip);\n return;\n }\n snapStrips.add(strip);\n observeSnap(strip);\n const tabs = [\n ...strip.querySelectorAll<HTMLElement>(':scope > .kui-tab-bar-item'),\n ];\n tabs.forEach(observeSnap);\n const last = tabs.at(-1);\n const bounds = strip.getBoundingClientRect();\n const rtl = view.getComputedStyle(strip).direction === 'rtl';\n const baseMaximum = Math.max(\n 0,\n strip.scrollWidth - strip.clientWidth - previousExtra,\n );\n let extra = 0;\n if (baseMaximum > 0 && last) {\n const lastBox = last.getBoundingClientRect();\n const desired = rtl\n ? -(strip.scrollLeft + lastBox.right - bounds.right)\n : strip.scrollLeft + lastBox.left - bounds.left;\n extra = Math.max(0, desired - baseMaximum);\n }\n if (Math.abs(extra - previousExtra) >= 0.5) {\n strip.style.setProperty('--kui-tab-bar-snap-end-extra', `${extra}px`);\n snapExtras.set(strip, extra);\n // The room is scroll content after the last tab, so writing it never\n // resizes the strip and no ResizeObserver notification follows. A room\n // measured during layout is re-measured next frame until it holds.\n scheduleSnapSync();\n }\n };\n /** Release observers and inline geometry of strips that left the root. */\n const releaseDetached = () => {\n for (const element of snapObserved)\n if (!root.contains(element)) {\n resizeObserver?.unobserve(element);\n snapObserved.delete(element);\n }\n for (const strip of snapStrips)\n if (!root.contains(strip)) {\n strip.style.removeProperty('--kui-tab-bar-snap-end-extra');\n snapStrips.delete(strip);\n }\n };\n const syncSnapInRoot = () => {\n releaseDetached();\n root.querySelectorAll<HTMLElement>(TAB_LIST).forEach(syncSnap);\n };\n // CSS snap settles direct gestures in most engines. WebKit can leave a\n // programmatic smooth scroll between snap points, so normalize its final\n // position to the nearest whole tab at the strip edge.\n const onStripScrollEnd = (event: Event) => {\n const strip = event.target;\n if (\n !(strip instanceof HTMLElement) ||\n !strip.matches('[data-kui-tab-list][data-snap-tabs=\"true\"]') ||\n Math.abs(strip.scrollLeft) < 0.5\n )\n return;\n const peers = [\n ...strip.querySelectorAll<HTMLElement>(':scope > .kui-tab-bar-item'),\n ];\n if (!peers.length) return;\n const bounds = strip.getBoundingClientRect();\n const rtl = view.getComputedStyle(strip).direction === 'rtl';\n const edge = rtl ? bounds.right : bounds.left;\n const distances = peers.map((peer) => {\n const box = peer.getBoundingClientRect();\n return rtl ? box.right - edge : box.left - edge;\n });\n const closest = distances.reduce((best, distance) =>\n Math.abs(distance) < Math.abs(best) ? distance : best,\n );\n if (Math.abs(closest) > 0.5) strip.scrollLeft += closest;\n };\n let autoScroll:\n | {\n strip: HTMLElement;\n velocity: number;\n frame: number | undefined;\n previousTime: number | undefined;\n }\n | undefined;\n const stopAutoScroll = () => {\n if (!autoScroll) return;\n if (autoScroll.frame !== undefined)\n view.cancelAnimationFrame(autoScroll.frame);\n delete autoScroll.strip.dataset.tabAutoscroll;\n autoScroll = undefined;\n };\n const runAutoScroll = (time: number) => {\n const current = autoScroll;\n if (!current) return;\n current.frame = undefined;\n const elapsed =\n current.previousTime === undefined\n ? 1000 / 60\n : Math.min(40, Math.max(1, time - current.previousTime));\n current.previousTime = time;\n const maximum = Math.max(\n 0,\n current.strip.scrollWidth - current.strip.clientWidth,\n );\n const previous = current.strip.scrollLeft;\n current.strip.scrollLeft = Math.max(\n 0,\n Math.min(maximum, previous + (current.velocity * elapsed) / 1000),\n );\n if (current.strip.scrollLeft === previous) {\n stopAutoScroll();\n return;\n }\n current.frame = view.requestAnimationFrame(runAutoScroll);\n };\n const updateAutoScroll = (event: DragEvent, strip: HTMLElement) => {\n if (strip.scrollWidth <= strip.clientWidth) {\n stopAutoScroll();\n return;\n }\n const bounds = strip.getBoundingClientRect();\n const edge = Math.min(AUTO_SCROLL_EDGE_PX, bounds.width / 3);\n const startDistance = event.clientX - bounds.left;\n const endDistance = bounds.right - event.clientX;\n let direction = 0;\n let strength = 0;\n if (startDistance >= 0 && startDistance < edge) {\n direction = -1;\n strength = 1 - startDistance / edge;\n } else if (endDistance >= 0 && endDistance < edge) {\n direction = 1;\n strength = 1 - endDistance / edge;\n }\n if (direction === 0) {\n stopAutoScroll();\n return;\n }\n const maximum = Math.max(0, strip.scrollWidth - strip.clientWidth);\n if (\n (direction < 0 && strip.scrollLeft <= 0) ||\n (direction > 0 && strip.scrollLeft >= maximum)\n ) {\n stopAutoScroll();\n return;\n }\n const speed =\n AUTO_SCROLL_MIN_PX_PER_SECOND +\n (AUTO_SCROLL_MAX_PX_PER_SECOND - AUTO_SCROLL_MIN_PX_PER_SECOND) *\n strength *\n strength;\n if (autoScroll?.strip !== strip) stopAutoScroll();\n autoScroll ??= {\n strip,\n velocity: 0,\n frame: undefined,\n previousTime: undefined,\n };\n autoScroll.velocity = direction * speed;\n strip.dataset.tabAutoscroll = direction < 0 ? 'start' : 'end';\n autoScroll.frame ??= view.requestAnimationFrame(runAutoScroll);\n };\n let dragged: { barId: string; tabId: string; tab: TabRoot } | undefined;\n const clearDropPositions = () =>\n root\n .querySelectorAll<HTMLElement>('[data-tab-drop-position]')\n .forEach((tab) => delete tab.dataset.tabDropPosition);\n const clear = () => {\n stopAutoScroll();\n dragged = undefined;\n root\n .querySelectorAll<HTMLElement>(\n '[data-tab-dragging], [data-tab-drop-position]',\n )\n .forEach((tab) => {\n delete tab.dataset.tabDragging;\n delete tab.dataset.tabDropPosition;\n });\n };\n let disposed = false;\n const afterControlledRender = (sourceBarId: string, sourceTabId: string) =>\n globalThis.queueMicrotask(() => {\n if (disposed) return;\n const tab = [\n ...root.querySelectorAll<TabRoot>('[data-component=\"tab-bar-item\"]'),\n ].find((candidate) => {\n const candidateBar = tabBar(candidate);\n return (\n tabId(candidate) === sourceTabId &&\n candidateBar !== undefined &&\n barId(candidateBar) === sourceBarId\n );\n });\n const button = tab?.querySelector<HTMLButtonElement>('[role=\"tab\"]');\n if (button && !button.disabled) {\n button.focus();\n reveal(button);\n }\n });\n\n const onDragStart = (event: Event) => {\n const dragEvent = event as DragEvent;\n const tab = tabRoot(event.target);\n const bar = tab && tabBar(tab);\n const sourceId = tab && tabId(tab);\n const sourceBarId = bar && barId(bar);\n if (\n !tab ||\n !tabEnabled(tab) ||\n tab.getAttribute('draggable') !== 'true' ||\n !sourceId ||\n !sourceBarId\n )\n return;\n dragged = { barId: sourceBarId, tabId: sourceId, tab };\n tab.dataset.tabDragging = 'true';\n if (dragEvent.dataTransfer) {\n dragEvent.dataTransfer.effectAllowed = 'move';\n dragEvent.dataTransfer.setData(\n 'application/x-kerf-tab',\n `${sourceBarId}:${sourceId}`,\n );\n }\n };\n const onDragOver = (event: Event) => {\n const dragEvent = event as DragEvent;\n const tab = tabRoot(event.target);\n const bar =\n event.target instanceof Element\n ? (event.target.closest<TabBarRoot>('[data-component=\"tab-bar\"]') ??\n undefined)\n : undefined;\n const targetId = tab && tabId(tab);\n const targetBarId = bar && barId(bar);\n if (!dragged || !bar || targetBarId !== dragged.barId) {\n stopAutoScroll();\n clearDropPositions();\n return;\n }\n dragEvent.preventDefault();\n const strip = bar.querySelector<HTMLElement>('[data-kui-tab-list]');\n if (strip) updateAutoScroll(dragEvent, strip);\n else stopAutoScroll();\n clearDropPositions();\n if (!tab || !tabEnabled(tab) || !targetId || targetId === dragged.tabId)\n return;\n tab.dataset.tabDropPosition = positionFor(dragEvent, tab);\n if (dragEvent.dataTransfer) dragEvent.dataTransfer.dropEffect = 'move';\n };\n const onDrop = (event: Event) => {\n const dragEvent = event as DragEvent;\n const tab = tabRoot(event.target);\n const bar = tab && tabBar(tab);\n const targetId = tab && tabId(tab);\n const targetBarId = bar && barId(bar);\n if (\n !dragged ||\n !dragged.tab.isConnected ||\n !tabEnabled(dragged.tab) ||\n !tab ||\n !tabEnabled(tab) ||\n !targetId ||\n targetId === dragged.tabId ||\n targetBarId !== dragged.barId\n ) {\n clear();\n return;\n }\n dragEvent.preventDefault();\n const change: TabReorder = {\n barId: dragged.barId,\n sourceId: dragged.tabId,\n targetId,\n position: positionFor(dragEvent, tab),\n source: 'pointer',\n };\n clear();\n onReorder(change);\n afterControlledRender(change.barId, change.sourceId);\n };\n const onKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n const button =\n event.target instanceof Element\n ? event.target.closest<HTMLButtonElement>('[role=\"tab\"]')\n : null;\n const tab = button && tabRoot(button);\n const bar = tab && tabBar(tab);\n if (!button || button.disabled || !tab || !bar) return;\n if (keyboardEvent.key === 'Delete' || keyboardEvent.key === 'Backspace') {\n const close = tab.querySelector<HTMLButtonElement>(\n '.kui-tab-bar-item__close',\n );\n if (!close) return;\n keyboardEvent.preventDefault();\n close.click();\n return;\n }\n const tabs = tabsIn(bar);\n const current = tabs.indexOf(button);\n if (current < 0) return;\n if (\n keyboardEvent.altKey &&\n keyboardEvent.shiftKey &&\n (keyboardEvent.key === 'ArrowLeft' || keyboardEvent.key === 'ArrowRight')\n ) {\n const target =\n tabs[current + (keyboardEvent.key === 'ArrowLeft' ? -1 : 1)];\n const sourceId = tabId(tab);\n const targetRoot = target && tabRoot(target);\n const targetId = targetRoot && tabId(targetRoot);\n const sourceBarId = barId(bar);\n if (\n !target ||\n !sourceId ||\n !targetId ||\n !sourceBarId ||\n tab.getAttribute('draggable') !== 'true'\n )\n return;\n keyboardEvent.preventDefault();\n onReorder({\n barId: sourceBarId,\n sourceId,\n targetId,\n position: keyboardEvent.key === 'ArrowLeft' ? 'before' : 'after',\n source: 'keyboard',\n });\n afterControlledRender(sourceBarId, sourceId);\n return;\n }\n let next: number | undefined;\n if (keyboardEvent.key === 'ArrowRight') next = (current + 1) % tabs.length;\n else if (keyboardEvent.key === 'ArrowLeft')\n next = (current - 1 + tabs.length) % tabs.length;\n else if (keyboardEvent.key === 'Home') next = 0;\n else if (keyboardEvent.key === 'End') next = tabs.length - 1;\n if (next === undefined) return;\n keyboardEvent.preventDefault();\n // A per-bar data-tab-activation attribute overrides the wireTabBars option.\n const perBar = bar.dataset.tabActivation;\n const mode: TabActivation =\n perBar === 'manual' || perBar === 'automatic' ? perBar : activation;\n const target = tabs[next]!;\n target.focus();\n // Manual activation moves roving focus only; the user selects with Enter / Space\n // (native on the tab <button>) or click. Automatic also selects the focused tab.\n if (mode === 'automatic') {\n target.click();\n // Activation can synchronously replace the controlled strip. Resolve the\n // logical tab again after rendering instead of leaving focus on a dead node.\n if (!target.isConnected)\n afterControlledRender(\n bar.dataset.tabBarId!,\n tabRoot(target)!.dataset.tabId!,\n );\n }\n reveal(target);\n };\n const onFocusIn = (event: Event) => {\n const tab =\n event.target instanceof HTMLElement &&\n event.target.matches('[role=\"tab\"]')\n ? event.target\n : undefined;\n reveal(tab);\n };\n\n root.addEventListener('dragstart', onDragStart);\n root.addEventListener('dragover', onDragOver);\n root.addEventListener('drop', onDrop);\n root.addEventListener('dragend', clear);\n root.addEventListener('keydown', onKeyDown);\n root.addEventListener('focusin', onFocusIn);\n root.addEventListener('scrollend', onStripScrollEnd, true);\n syncSnapInRoot();\n root\n .querySelectorAll<HTMLElement>(\n '[data-kui-tab-list] [role=\"tab\"][aria-selected=\"true\"]',\n )\n .forEach(reveal);\n\n // Reveal a tab the application selects without focus (for example a tab it\n // adds and selects) once its controlled render lands. Only a change of a\n // bar's selected tab reveals, so a re-render that keeps the selection never\n // pulls a strip the user scrolled back to it.\n const selectedIds = new Map<string, string>();\n const recordSelection = (scopes: Iterable<ParentNode>) => {\n const changed: HTMLElement[] = [];\n for (const [bar, button] of selectedTabs(scopes)) {\n const id = barId(bar);\n const tab = tabRoot(button);\n const selectedId = tab && tabId(tab);\n if (!id || !selectedId) continue;\n if (selectedIds.has(id) && selectedIds.get(id) !== selectedId)\n changed.push(button);\n selectedIds.set(id, selectedId);\n }\n return changed;\n };\n recordSelection([root]);\n // Only the bars the records touched are re-measured: this observer watches\n // the whole application root, so most of its batches are unrelated content.\n const selectionObserver = new view.MutationObserver((records) => {\n if (disposed) return;\n // A removal anywhere may have taken a strip with it; releasing walks only\n // the few strips and tabs this wiring tracks.\n if (records.some((record) => record.removedNodes.length)) releaseDetached();\n const bars = touchedBars(records);\n if (!bars.size) return;\n const strips = [...bars].flatMap((bar) =>\n selfAndBelow<HTMLElement>(bar, TAB_LIST),\n );\n strips.forEach(syncSnap);\n for (const button of recordSelection(bars))\n if (ownerDocument.activeElement !== button) revealInStrip(button);\n });\n selectionObserver.observe(root, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['aria-selected', 'dir', 'data-snap-tabs'],\n });\n\n return () => {\n disposed = true;\n if (snapFrame !== undefined) view.cancelAnimationFrame(snapFrame);\n selectionObserver.disconnect();\n resizeObserver?.disconnect();\n for (const strip of snapStrips) {\n strip.style.removeProperty('--kui-tab-bar-snap-end-extra');\n }\n snapStrips.clear();\n snapObserved.clear();\n clear();\n root.removeEventListener('dragstart', onDragStart);\n root.removeEventListener('dragover', onDragOver);\n root.removeEventListener('drop', onDrop);\n root.removeEventListener('dragend', clear);\n root.removeEventListener('keydown', onKeyDown);\n root.removeEventListener('focusin', onFocusIn);\n root.removeEventListener('scrollend', onStripScrollEnd, true);\n };\n}\n"]}
@@ -52,4 +52,4 @@ function TabBar({
52
52
 
53
53
  export { TabBar };
54
54
 
55
- //# sourceMappingURL=chunk-7AK5I7U7.js.map
55
+ //# sourceMappingURL=chunk-YWLDLNAV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/navigation/tab-bar/tab-bar.tsx"],"names":[],"mappings":";;;AA6CO,SAAS,MAAA,CAAO;AAAA,EACrB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,UAAA;AAAA,EACA,UAAA,GAAa,WAAA;AAAA,EACb,YAAA,GAAe,MAAA;AAAA,EACf,UAAA;AAAA,EACA,iBAAA,GAAoB,UAAA;AAAA,EACpB,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAgB;AACd,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,YAAA,EAAe,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACvC,gBAAA,EAAe,SAAA;AAAA,MACf,iBAAA,EAAiB,EAAA;AAAA,MACjB,qBAAA,EAAqB,UAAA;AAAA,MACrB,iBAAA,EAAiB,UAAA;AAAA,MACjB,mBAAA,EAAmB,YAAA;AAAA,MACnB,mBAAA,EAAmB,UAAA;AAAA,MACnB,yBAAA,EAAyB,iBAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,sBAAA,EAAwB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBACvD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,mBAAA;AAAA,YACN,IAAA,EAAK,SAAA;AAAA,YACL,YAAA,EAAY,KAAA;AAAA,YACZ,mBAAA,EAAiB,IAAA;AAAA,YACjB,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,YAEnC;AAAA;AAAA,SACH;AAAA,QACC,QAAA,oBAAY,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAyB,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,QACzD,GAAA,oBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,oBAAoB,QAAA,EAAA,GAAA,EAAI;AAAA;AAAA;AAAA,GAC7C;AAEJ","file":"chunk-7AK5I7U7.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\n\nexport type TabActivation = 'automatic' | 'manual';\nexport type TabBarAllocation = 'intrinsic' | 'fill';\nexport type TabBarPresentation = 'rail' | 'segmented' | 'inspector';\nexport type TabBarTrailingPlacement = 'separate' | 'adjacent';\n/** Tablist width where segmented TabBarItems switch to icon-only. */\nexport type TabBarIconOnlyAt = 'wide' | 'narrow' | 'compact';\n\nexport interface TabBarProps {\n id: string;\n label: string;\n children: KerfUiContent;\n leading?: KerfUiContent;\n /** Tab-local action: one ToolbarControlGroup, Kerf Button, or Web Awesome button. */\n trailing?: KerfUiContent;\n /**\n * Action pinned to the far edge of the bar. Combine with an adjacent `trailing`\n * action when the tab-local and workspace-level actions must remain distinct.\n * Accepts one ToolbarControlGroup, Kerf Button, or Web Awesome button.\n */\n end?: KerfUiContent;\n className?: string;\n /**\n * Keyboard activation mode for this strip, emitted as `data-tab-activation` for\n * `wireTabBars` to read (overrides its `activation` option). `'automatic'` (default)\n * selects on arrow / Home / End; `'manual'` moves roving focus only and the user\n * selects with Enter / Space / click — use it when selecting a tab is a heavy action.\n */\n activation?: TabActivation;\n /** How available strip width is allocated across child TabBarItems. */\n allocation?: TabBarAllocation;\n /** Named strip chrome for application rails, segmented tabs, or inspectors. */\n presentation?: TabBarPresentation;\n /** Switch segmented TabBarItems to icon-only at tablist widths of 832, 704, or 448px. Each tab needs a leading icon. */\n iconOnlyAt?: TabBarIconOnlyAt;\n /** Keep a trailing action beside the final tab or at the far edge of the bar. */\n trailingPlacement?: TabBarTrailingPlacement;\n /** Settle scrolling peers at whole-tab starts; wireTabBars measures a pinned leading tab's inset. */\n snapTabs?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Render a controlled tab strip. The application owns selection, order, and persistence. */\nexport function TabBar({\n id,\n label,\n children,\n leading,\n trailing,\n end,\n className = '',\n activation,\n allocation = 'intrinsic',\n presentation = 'rail',\n iconOnlyAt,\n trailingPlacement = 'separate',\n snapTabs = false,\n slot,\n}: TabBarProps) {\n return (\n <nav\n class={`kui-tab-bar ${className}`.trim()}\n data-component=\"tab-bar\"\n data-tab-bar-id={id}\n data-tab-activation={activation}\n data-allocation={allocation}\n data-presentation={presentation}\n data-icon-only-at={iconOnlyAt}\n data-trailing-placement={trailingPlacement}\n aria-label={label}\n slot={slot}\n >\n {leading && <div class=\"kui-tab-bar__leading\">{leading}</div>}\n <div\n class=\"kui-tab-bar__tabs\"\n role=\"tablist\"\n aria-label={label}\n data-kui-tab-list\n data-snap-tabs={snapTabs ? 'true' : undefined}\n >\n {children}\n </div>\n {trailing && <div class=\"kui-tab-bar__trailing\">{trailing}</div>}\n {end && <div class=\"kui-tab-bar__end\">{end}</div>}\n </nav>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/components/navigation/tab-bar/tab-bar.tsx"],"names":[],"mappings":";;;AA6CO,SAAS,MAAA,CAAO;AAAA,EACrB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,UAAA;AAAA,EACA,UAAA,GAAa,WAAA;AAAA,EACb,YAAA,GAAe,MAAA;AAAA,EACf,UAAA;AAAA,EACA,iBAAA,GAAoB,UAAA;AAAA,EACpB,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAgB;AACd,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,YAAA,EAAe,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACvC,gBAAA,EAAe,SAAA;AAAA,MACf,iBAAA,EAAiB,EAAA;AAAA,MACjB,qBAAA,EAAqB,UAAA;AAAA,MACrB,iBAAA,EAAiB,UAAA;AAAA,MACjB,mBAAA,EAAmB,YAAA;AAAA,MACnB,mBAAA,EAAmB,UAAA;AAAA,MACnB,yBAAA,EAAyB,iBAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,sBAAA,EAAwB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBACvD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,mBAAA;AAAA,YACN,IAAA,EAAK,SAAA;AAAA,YACL,YAAA,EAAY,KAAA;AAAA,YACZ,mBAAA,EAAiB,IAAA;AAAA,YACjB,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,YAEnC;AAAA;AAAA,SACH;AAAA,QACC,QAAA,oBAAY,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAyB,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,QACzD,GAAA,oBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,oBAAoB,QAAA,EAAA,GAAA,EAAI;AAAA;AAAA;AAAA,GAC7C;AAEJ","file":"chunk-YWLDLNAV.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\n\nexport type TabActivation = 'automatic' | 'manual';\nexport type TabBarAllocation = 'intrinsic' | 'fill';\nexport type TabBarPresentation = 'rail' | 'segmented' | 'inspector';\nexport type TabBarTrailingPlacement = 'separate' | 'adjacent';\n/** Tablist width where segmented TabBarItems switch to icon-only. */\nexport type TabBarIconOnlyAt = 'wide' | 'narrow' | 'compact';\n\nexport interface TabBarProps {\n id: string;\n label: string;\n children: KerfUiContent;\n leading?: KerfUiContent;\n /** Tab-local action: one ToolbarControlGroup, Kerf Button, or Web Awesome button. */\n trailing?: KerfUiContent;\n /**\n * Action pinned to the far edge of the bar. Combine with an adjacent `trailing`\n * action when the tab-local and workspace-level actions must remain distinct.\n * Accepts one ToolbarControlGroup, Kerf Button, or Web Awesome button.\n */\n end?: KerfUiContent;\n className?: string;\n /**\n * Keyboard activation mode for this strip, emitted as `data-tab-activation` for\n * `wireTabBars` to read (overrides its `activation` option). `'automatic'` (default)\n * selects on arrow / Home / End; `'manual'` moves roving focus only and the user\n * selects with Enter / Space / click — use it when selecting a tab is a heavy action.\n */\n activation?: TabActivation;\n /** How available strip width is allocated across child TabBarItems. */\n allocation?: TabBarAllocation;\n /** Named strip chrome for application rails, segmented tabs, or inspectors. */\n presentation?: TabBarPresentation;\n /** Switch segmented TabBarItems to icon-only at tablist widths of 832, 704, or 448px. Each tab needs a leading icon. */\n iconOnlyAt?: TabBarIconOnlyAt;\n /** Keep a trailing action beside the final tab or at the far edge of the bar. */\n trailingPlacement?: TabBarTrailingPlacement;\n /** Settle scrolling peers at whole-tab starts; the first visible tab aligns with the strip edge. */\n snapTabs?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Render a controlled tab strip. The application owns selection, order, and persistence. */\nexport function TabBar({\n id,\n label,\n children,\n leading,\n trailing,\n end,\n className = '',\n activation,\n allocation = 'intrinsic',\n presentation = 'rail',\n iconOnlyAt,\n trailingPlacement = 'separate',\n snapTabs = false,\n slot,\n}: TabBarProps) {\n return (\n <nav\n class={`kui-tab-bar ${className}`.trim()}\n data-component=\"tab-bar\"\n data-tab-bar-id={id}\n data-tab-activation={activation}\n data-allocation={allocation}\n data-presentation={presentation}\n data-icon-only-at={iconOnlyAt}\n data-trailing-placement={trailingPlacement}\n aria-label={label}\n slot={slot}\n >\n {leading && <div class=\"kui-tab-bar__leading\">{leading}</div>}\n <div\n class=\"kui-tab-bar__tabs\"\n role=\"tablist\"\n aria-label={label}\n data-kui-tab-list\n data-snap-tabs={snapTabs ? 'true' : undefined}\n >\n {children}\n </div>\n {trailing && <div class=\"kui-tab-bar__trailing\">{trailing}</div>}\n {end && <div class=\"kui-tab-bar__end\">{end}</div>}\n </nav>\n );\n}\n"]}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { wireToolbarVisibility } from './chunk-2GOCOLQL.js';
2
- export { reorderTabs, wireTabBars } from './chunk-HJWFHJ3Z.js';
2
+ export { reorderTabs, wireTabBars } from './chunk-WPP5Q4A5.js';
3
3
  export { wireSearchFields } from './chunk-UMNHJSIO.js';
4
4
  export { wireTextFields } from './chunk-KC6WUSNS.js';
5
5
  export { fileMatchesAccept, wireFilePickers } from './chunk-KK3S5OTW.js';
@@ -18,8 +18,8 @@ export { TextField } from './chunk-N2K3QGSX.js';
18
18
  export { ValuePreview } from './chunk-F653O57X.js';
19
19
  export { ValueTable, ValueTableRow } from './chunk-DZJ4GBSP.js';
20
20
  export { SunkenPanel } from './chunk-D5RGM3XA.js';
21
- export { TabBarItem } from './chunk-BSNKDW4X.js';
22
- export { TabBar } from './chunk-7AK5I7U7.js';
21
+ export { TabBarItem } from './chunk-ROEBKSIY.js';
22
+ export { TabBar } from './chunk-YWLDLNAV.js';
23
23
  export { applySelection, isApplePlatform, selectionGesture } from './chunk-GXSX6Q6O.js';
24
24
  export { Spacer } from './chunk-YMUIQRWK.js';
25
25
  export { SplitButton } from './chunk-TI2GV36S.js';
@@ -136,11 +136,13 @@
136
136
  /* The fitted square is the visual and hover surface; the pointer target is at
137
137
  least 44px in both dimensions. A transparent, out-of-flow layer extends the
138
138
  button's hit area evenly around the square without moving layout or painting
139
- anything, and hovering it lights the unchanged fitted square. Standard headers
140
- are 44px tall and reserve the 4px inline slot at the logical end, so the
141
- extension stays inside the header; the leading 4px falls in the 8px gap before
142
- the dormant title. Offsets are from the padding box, hence the extra 1px for the
143
- border. */
139
+ anything, and hovering it lights the unchanged fitted square. The action is a
140
+ bordered control, so its border box ends flush at the header's 8px inline
141
+ margin, on the outer edge of the selected ListItem rows below it and of a
142
+ Pane header's trailing ToolbarControlGroup. Standard headers are 44px tall;
143
+ the trailing 4px of the extension falls in that inline margin and the leading
144
+ 4px in the 8px gap before the dormant title. Offsets are from the padding box,
145
+ hence the extra 1px for the border. */
144
146
  .kui-list-header__action::before {
145
147
  --_kui-list-header-action-hit-outset: min(
146
148
  0px,
@@ -158,25 +160,6 @@
158
160
  inset-block: -1px;
159
161
  }
160
162
 
161
- /* Trailing icon actions share one axis: a toolbar control centers its glyph in a
162
- 44px group slot flush with the 8px inline margin, so the fitted action centers
163
- itself in a slot of that same size instead of sitting flush at the margin
164
- (which put its glyph ~4px outside a Pane header's trailing toolbar glyph). The
165
- slot, not the button, grows by the difference, so the fitted hover square and
166
- its 18px visual are unchanged. Inline headers carry no outer geometry. */
167
- .kui-list-header:not([data-inline="true"]) > .kui-list-header__action {
168
- margin-inline-end: max(
169
- 0px,
170
- calc(
171
- (
172
- var(--kui-toolbar-group-size, calc(2px + 2.625rem)) -
173
- var(--_kui-list-header-action-size)
174
- ) /
175
- 2
176
- )
177
- );
178
- }
179
-
180
163
  .kui-list-header__toggle {
181
164
  padding: var(--kui-layout-item-padding, 0.5rem);
182
165
  appearance: none;
@@ -184,8 +167,11 @@
184
167
  cursor: pointer;
185
168
  }
186
169
 
170
+ /* A toggle's disclosure arrow is a borderless nested glyph, so it aligns with
171
+ the nested content of the ListItem rows below: the layer hugs its 18px glyph
172
+ and ends on the toggle's 1px border + 8px padding, the same inset as a row's
173
+ trailing icon, instead of centering it 3px inside a 24px box. */
187
174
  .kui-list-header__action-layer {
188
- width: 1.5rem;
189
175
  height: 1.5rem;
190
176
  margin-inline-start: auto;
191
177
  flex: none;
@@ -30,10 +30,7 @@
30
30
  box-sizing: border-box;
31
31
  border: var(--kui-tab-bar-strip-border-width, 1px) solid
32
32
  var(--kui-tab-bar-border);
33
- border-radius: var(
34
- --kui-tab-bar-strip-radius,
35
- var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
36
- );
33
+ border-radius: var(--kui-tab-bar-strip-radius, 0);
37
34
  background: var(
38
35
  --kui-tab-bar-strip-background,
39
36
  var(--kui-tab-bar-background)
@@ -53,7 +50,6 @@
53
50
  }
54
51
  .kui-tab-bar__tabs[data-snap-tabs="true"] {
55
52
  scroll-snap-type: x mandatory;
56
- scroll-padding-inline-start: var(--kui-tab-bar-snap-inset, 0px);
57
53
  }
58
54
  /* The snap end room is scrollable content after the last tab, not padding on
59
55
  the strip: padding is part of the strip's box, which a flex item cannot
@@ -78,6 +74,12 @@
78
74
  --kui-tab-bar-background: var(--kui-color-neutral-fill-quiet);
79
75
  --kui-tab-bar-border: var(--kui-color-neutral-border-quiet);
80
76
  }
77
+ .kui-tab-bar[data-presentation="segmented"] .kui-tab-bar__tabs {
78
+ border-radius: var(
79
+ --kui-tab-bar-strip-radius,
80
+ var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
81
+ );
82
+ }
81
83
  /* A segmented strip's outer ends follow the pill track: a compact tab is inset
82
84
  from the track's ends by the same distance as from its top and bottom, so
83
85
  each end is concentric with the track. TabBarItem rounds its own outer corners
@@ -164,12 +166,12 @@
164
166
  margin-inline-start: calc(-1px - var(--kui-toolbar-gap, 0.5rem));
165
167
  }
166
168
 
167
- .kui-tab-bar[data-presentation="rail"]:dir(ltr):not(
168
- :has(> .kui-tab-bar__tabs > .kui-tab-bar-item[data-pinned="true"])
169
- ):has(> .kui-tab-bar__tabs[data-scroll-overflow*="l"])::before,
170
- .kui-tab-bar[data-presentation="rail"]:dir(rtl):not(
171
- :has(> .kui-tab-bar__tabs > .kui-tab-bar-item[data-pinned="true"])
172
- ):has(> .kui-tab-bar__tabs[data-scroll-overflow*="r"])::before,
169
+ .kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
170
+ > .kui-tab-bar__tabs[data-scroll-overflow*="l"]
171
+ )::before,
172
+ .kui-tab-bar[data-presentation="rail"]:dir(rtl):has(
173
+ > .kui-tab-bar__tabs[data-scroll-overflow*="r"]
174
+ )::before,
173
175
  .kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
174
176
  > .kui-tab-bar__tabs[data-scroll-overflow*="r"]
175
177
  )::after,
@@ -183,9 +185,7 @@
183
185
  }
184
186
 
185
187
  .kui-tab-bar:not([data-presentation="rail"])
186
- > .kui-tab-bar__tabs[data-scroll-overflow*="l"]:not(
187
- :dir(ltr):has(> .kui-tab-bar-item[data-pinned="true"])
188
- ) {
188
+ > .kui-tab-bar__tabs[data-scroll-overflow*="l"] {
189
189
  border-left-color: var(
190
190
  --kui-tab-bar-divider-color,
191
191
  var(--kui-color-neutral-border-normal)
@@ -193,9 +193,7 @@
193
193
  }
194
194
 
195
195
  .kui-tab-bar:not([data-presentation="rail"])
196
- > .kui-tab-bar__tabs[data-scroll-overflow*="r"]:not(
197
- :dir(rtl):has(> .kui-tab-bar-item[data-pinned="true"])
198
- ) {
196
+ > .kui-tab-bar__tabs[data-scroll-overflow*="r"] {
199
197
  border-right-color: var(
200
198
  --kui-tab-bar-divider-color,
201
199
  var(--kui-color-neutral-border-normal)
@@ -29,66 +29,9 @@
29
29
  align-items: center;
30
30
  flex: none;
31
31
  }
32
- .kui-tab-bar-item[data-pinned="true"] {
33
- position: sticky;
34
- z-index: 1;
35
- inset-inline-start: 0;
36
- background: var(
37
- --kui-tab-bar-item-pinned-background,
38
- var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
39
- );
40
- }
41
- .kui-tab-bar__tabs[data-snap-tabs="true"]
42
- > .kui-tab-bar-item:not([data-pinned="true"]) {
32
+ .kui-tab-bar__tabs[data-snap-tabs="true"] > .kui-tab-bar-item {
43
33
  scroll-snap-align: start;
44
34
  }
45
- .kui-tab-bar-item[data-pinned="true"]::before {
46
- content: "";
47
- position: absolute;
48
- z-index: -1;
49
- inset-block: 0;
50
- inset-inline-start: calc(
51
- -1 *
52
- (
53
- var(--kui-tab-bar-strip-padding, 1px) +
54
- var(--kui-tab-bar-strip-border-width, 1px)
55
- )
56
- );
57
- inset-inline-end: 0;
58
- /* Keep the opaque scroll backing inside the tab's pill silhouette so it
59
- cannot square off a selected tab's trailing corner and shadow. */
60
- border-radius: inherit;
61
- background: var(
62
- --kui-tab-bar-item-pinned-background,
63
- var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
64
- );
65
- }
66
- /* The leading overflow line belongs after the pinned tab, where its scrolling
67
- peers disappear. Reuse the opaque backing so drag indicators can still use
68
- ::after. */
69
- .kui-tab-bar__tabs:dir(ltr)[data-scroll-overflow*="l"]
70
- > .kui-tab-bar-item[data-pinned="true"]::before,
71
- .kui-tab-bar__tabs:dir(rtl)[data-scroll-overflow*="r"]
72
- > .kui-tab-bar-item[data-pinned="true"]::before {
73
- inset-inline-end: -1px;
74
- border-inline-end: 1px solid
75
- var(--kui-tab-bar-divider-color, var(--kui-color-neutral-border-normal));
76
- }
77
- .kui-tab-bar[data-presentation="segmented"]
78
- .kui-tab-bar-item[data-pinned="true"],
79
- .kui-tab-bar[data-presentation="inspector"]
80
- .kui-tab-bar-item[data-pinned="true"] {
81
- --_kui-tab-bar-item-pinned-default-background: var(
82
- --kui-tab-bar-strip-background,
83
- var(--kui-color-neutral-fill-quiet)
84
- );
85
- }
86
- .kui-tab-bar-item[data-pinned="true"]:not([data-selected="true"]):hover {
87
- background: var(
88
- --kui-tab-bar-item-pinned-hover-background,
89
- var(--kui-color-neutral-fill-quiet)
90
- );
91
- }
92
35
  .kui-tab-bar-item[data-size="compact"] {
93
36
  height: 2rem;
94
37
  }
@@ -20,6 +20,15 @@ body {
20
20
  background: var(--kui-color-surface-lowered);
21
21
  font-family: var(--kui-font-sans);
22
22
  line-height: 1.45;
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ text-size-adjust: none;
26
+ -webkit-text-size-adjust: none;
27
+ -moz-text-size-adjust: none;
28
+ }
29
+
30
+ :where(strong, b) {
31
+ font-weight: var(--wa-font-weight-bold, 600);
23
32
  }
24
33
 
25
34
  /* Opt-in viewport lock for a full-viewport application shell: the dynamic
@@ -136,11 +136,13 @@
136
136
  /* The fitted square is the visual and hover surface; the pointer target is at
137
137
  least 44px in both dimensions. A transparent, out-of-flow layer extends the
138
138
  button's hit area evenly around the square without moving layout or painting
139
- anything, and hovering it lights the unchanged fitted square. Standard headers
140
- are 44px tall and reserve the 4px inline slot at the logical end, so the
141
- extension stays inside the header; the leading 4px falls in the 8px gap before
142
- the dormant title. Offsets are from the padding box, hence the extra 1px for the
143
- border. */
139
+ anything, and hovering it lights the unchanged fitted square. The action is a
140
+ bordered control, so its border box ends flush at the header's 8px inline
141
+ margin, on the outer edge of the selected ListItem rows below it and of a
142
+ Pane header's trailing ToolbarControlGroup. Standard headers are 44px tall;
143
+ the trailing 4px of the extension falls in that inline margin and the leading
144
+ 4px in the 8px gap before the dormant title. Offsets are from the padding box,
145
+ hence the extra 1px for the border. */
144
146
  .kui-list-header__action::before {
145
147
  --_kui-list-header-action-hit-outset: min(
146
148
  0px,
@@ -158,25 +160,6 @@
158
160
  inset-block: -1px;
159
161
  }
160
162
 
161
- /* Trailing icon actions share one axis: a toolbar control centers its glyph in a
162
- 44px group slot flush with the 8px inline margin, so the fitted action centers
163
- itself in a slot of that same size instead of sitting flush at the margin
164
- (which put its glyph ~4px outside a Pane header's trailing toolbar glyph). The
165
- slot, not the button, grows by the difference, so the fitted hover square and
166
- its 18px visual are unchanged. Inline headers carry no outer geometry. */
167
- .kui-list-header:not([data-inline="true"]) > .kui-list-header__action {
168
- margin-inline-end: max(
169
- 0px,
170
- calc(
171
- (
172
- var(--kui-toolbar-group-size, calc(2px + 2.625rem)) -
173
- var(--_kui-list-header-action-size)
174
- ) /
175
- 2
176
- )
177
- );
178
- }
179
-
180
163
  .kui-list-header__toggle {
181
164
  padding: var(--kui-layout-item-padding, 0.5rem);
182
165
  appearance: none;
@@ -184,8 +167,11 @@
184
167
  cursor: pointer;
185
168
  }
186
169
 
170
+ /* A toggle's disclosure arrow is a borderless nested glyph, so it aligns with
171
+ the nested content of the ListItem rows below: the layer hugs its 18px glyph
172
+ and ends on the toggle's 1px border + 8px padding, the same inset as a row's
173
+ trailing icon, instead of centering it 3px inside a 24px box. */
187
174
  .kui-list-header__action-layer {
188
- width: 1.5rem;
189
175
  height: 1.5rem;
190
176
  margin-inline-start: auto;
191
177
  flex: none;
@@ -29,66 +29,9 @@
29
29
  align-items: center;
30
30
  flex: none;
31
31
  }
32
- .kui-tab-bar-item[data-pinned="true"] {
33
- position: sticky;
34
- z-index: 1;
35
- inset-inline-start: 0;
36
- background: var(
37
- --kui-tab-bar-item-pinned-background,
38
- var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
39
- );
40
- }
41
- .kui-tab-bar__tabs[data-snap-tabs="true"]
42
- > .kui-tab-bar-item:not([data-pinned="true"]) {
32
+ .kui-tab-bar__tabs[data-snap-tabs="true"] > .kui-tab-bar-item {
43
33
  scroll-snap-align: start;
44
34
  }
45
- .kui-tab-bar-item[data-pinned="true"]::before {
46
- content: "";
47
- position: absolute;
48
- z-index: -1;
49
- inset-block: 0;
50
- inset-inline-start: calc(
51
- -1 *
52
- (
53
- var(--kui-tab-bar-strip-padding, 1px) +
54
- var(--kui-tab-bar-strip-border-width, 1px)
55
- )
56
- );
57
- inset-inline-end: 0;
58
- /* Keep the opaque scroll backing inside the tab's pill silhouette so it
59
- cannot square off a selected tab's trailing corner and shadow. */
60
- border-radius: inherit;
61
- background: var(
62
- --kui-tab-bar-item-pinned-background,
63
- var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
64
- );
65
- }
66
- /* The leading overflow line belongs after the pinned tab, where its scrolling
67
- peers disappear. Reuse the opaque backing so drag indicators can still use
68
- ::after. */
69
- .kui-tab-bar__tabs:dir(ltr)[data-scroll-overflow*="l"]
70
- > .kui-tab-bar-item[data-pinned="true"]::before,
71
- .kui-tab-bar__tabs:dir(rtl)[data-scroll-overflow*="r"]
72
- > .kui-tab-bar-item[data-pinned="true"]::before {
73
- inset-inline-end: -1px;
74
- border-inline-end: 1px solid
75
- var(--kui-tab-bar-divider-color, var(--kui-color-neutral-border-normal));
76
- }
77
- .kui-tab-bar[data-presentation="segmented"]
78
- .kui-tab-bar-item[data-pinned="true"],
79
- .kui-tab-bar[data-presentation="inspector"]
80
- .kui-tab-bar-item[data-pinned="true"] {
81
- --_kui-tab-bar-item-pinned-default-background: var(
82
- --kui-tab-bar-strip-background,
83
- var(--kui-color-neutral-fill-quiet)
84
- );
85
- }
86
- .kui-tab-bar-item[data-pinned="true"]:not([data-selected="true"]):hover {
87
- background: var(
88
- --kui-tab-bar-item-pinned-hover-background,
89
- var(--kui-color-neutral-fill-quiet)
90
- );
91
- }
92
35
  .kui-tab-bar-item[data-size="compact"] {
93
36
  height: 2rem;
94
37
  }
@@ -30,10 +30,7 @@
30
30
  box-sizing: border-box;
31
31
  border: var(--kui-tab-bar-strip-border-width, 1px) solid
32
32
  var(--kui-tab-bar-border);
33
- border-radius: var(
34
- --kui-tab-bar-strip-radius,
35
- var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
36
- );
33
+ border-radius: var(--kui-tab-bar-strip-radius, 0);
37
34
  background: var(
38
35
  --kui-tab-bar-strip-background,
39
36
  var(--kui-tab-bar-background)
@@ -53,7 +50,6 @@
53
50
  }
54
51
  .kui-tab-bar__tabs[data-snap-tabs="true"] {
55
52
  scroll-snap-type: x mandatory;
56
- scroll-padding-inline-start: var(--kui-tab-bar-snap-inset, 0px);
57
53
  }
58
54
  /* The snap end room is scrollable content after the last tab, not padding on
59
55
  the strip: padding is part of the strip's box, which a flex item cannot
@@ -78,6 +74,12 @@
78
74
  --kui-tab-bar-background: var(--kui-color-neutral-fill-quiet);
79
75
  --kui-tab-bar-border: var(--kui-color-neutral-border-quiet);
80
76
  }
77
+ .kui-tab-bar[data-presentation="segmented"] .kui-tab-bar__tabs {
78
+ border-radius: var(
79
+ --kui-tab-bar-strip-radius,
80
+ var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
81
+ );
82
+ }
81
83
  /* A segmented strip's outer ends follow the pill track: a compact tab is inset
82
84
  from the track's ends by the same distance as from its top and bottom, so
83
85
  each end is concentric with the track. TabBarItem rounds its own outer corners
@@ -164,12 +166,12 @@
164
166
  margin-inline-start: calc(-1px - var(--kui-toolbar-gap, 0.5rem));
165
167
  }
166
168
 
167
- .kui-tab-bar[data-presentation="rail"]:dir(ltr):not(
168
- :has(> .kui-tab-bar__tabs > .kui-tab-bar-item[data-pinned="true"])
169
- ):has(> .kui-tab-bar__tabs[data-scroll-overflow*="l"])::before,
170
- .kui-tab-bar[data-presentation="rail"]:dir(rtl):not(
171
- :has(> .kui-tab-bar__tabs > .kui-tab-bar-item[data-pinned="true"])
172
- ):has(> .kui-tab-bar__tabs[data-scroll-overflow*="r"])::before,
169
+ .kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
170
+ > .kui-tab-bar__tabs[data-scroll-overflow*="l"]
171
+ )::before,
172
+ .kui-tab-bar[data-presentation="rail"]:dir(rtl):has(
173
+ > .kui-tab-bar__tabs[data-scroll-overflow*="r"]
174
+ )::before,
173
175
  .kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
174
176
  > .kui-tab-bar__tabs[data-scroll-overflow*="r"]
175
177
  )::after,
@@ -183,9 +185,7 @@
183
185
  }
184
186
 
185
187
  .kui-tab-bar:not([data-presentation="rail"])
186
- > .kui-tab-bar__tabs[data-scroll-overflow*="l"]:not(
187
- :dir(ltr):has(> .kui-tab-bar-item[data-pinned="true"])
188
- ) {
188
+ > .kui-tab-bar__tabs[data-scroll-overflow*="l"] {
189
189
  border-left-color: var(
190
190
  --kui-tab-bar-divider-color,
191
191
  var(--kui-color-neutral-border-normal)
@@ -193,9 +193,7 @@
193
193
  }
194
194
 
195
195
  .kui-tab-bar:not([data-presentation="rail"])
196
- > .kui-tab-bar__tabs[data-scroll-overflow*="r"]:not(
197
- :dir(rtl):has(> .kui-tab-bar-item[data-pinned="true"])
198
- ) {
196
+ > .kui-tab-bar__tabs[data-scroll-overflow*="r"] {
199
197
  border-right-color: var(
200
198
  --kui-tab-bar-divider-color,
201
199
  var(--kui-color-neutral-border-normal)
@@ -11,7 +11,6 @@ type TabBarItemRootAttributes = Readonly<Record<`data-${string}`, string | undef
11
11
  'data-attention'?: never;
12
12
  'data-drop-target'?: never;
13
13
  'data-name-overflow'?: never;
14
- 'data-pinned'?: never;
15
14
  'data-disabled'?: never;
16
15
  }>;
17
16
  type TabBarItemPresentation = 'pill' | 'segmented' | 'icon-only';
@@ -31,8 +30,6 @@ interface TabBarItemProps {
31
30
  attention?: boolean;
32
31
  /** Highlight this tab as the target of a drag over its content. */
33
32
  dropTarget?: boolean;
34
- /** Keep the leading tab visible within its TabBar tablist while peers scroll. */
35
- pinned?: boolean;
36
33
  closable?: boolean;
37
34
  draggable?: boolean;
38
35
  leading?: KerfUiContent;
@@ -67,6 +64,6 @@ interface TabBarItemProps {
67
64
  /** Native named-slot assignment when composed inside a web component. */
68
65
  slot?: string;
69
66
  }
70
- declare function TabBarItem({ id, name, selected, disabled, tabId, panelId, attention, dropTarget, pinned, closable, draggable, leading, trailing, presentation, size, labelMaxWidth, nameOverflow, closeIcon, selectAction, closeAction, className, placeholder, pending, rootAttributes, slot, }: TabBarItemProps): SafeHtml;
67
+ declare function TabBarItem({ id, name, selected, disabled, tabId, panelId, attention, dropTarget, closable, draggable, leading, trailing, presentation, size, labelMaxWidth, nameOverflow, closeIcon, selectAction, closeAction, className, placeholder, pending, rootAttributes, slot, }: TabBarItemProps): SafeHtml;
71
68
 
72
69
  export { TabBarItem, type TabBarItemNameOverflow, type TabBarItemPresentation, type TabBarItemProps, type TabBarItemSize };
@@ -1,4 +1,4 @@
1
- export { TabBarItem } from './chunk-BSNKDW4X.js';
1
+ export { TabBarItem } from './chunk-ROEBKSIY.js';
2
2
 
3
3
 
4
4
 
package/dist/tab-bar.d.ts CHANGED
@@ -36,7 +36,7 @@ interface TabBarProps {
36
36
  iconOnlyAt?: TabBarIconOnlyAt;
37
37
  /** Keep a trailing action beside the final tab or at the far edge of the bar. */
38
38
  trailingPlacement?: TabBarTrailingPlacement;
39
- /** Settle scrolling peers at whole-tab starts; wireTabBars measures a pinned leading tab's inset. */
39
+ /** Settle scrolling peers at whole-tab starts; the first visible tab aligns with the strip edge. */
40
40
  snapTabs?: boolean;
41
41
  /** Native named-slot assignment when composed inside a web component. */
42
42
  slot?: string;
package/dist/tab-bar.js CHANGED
@@ -1,3 +1,3 @@
1
- export { TabBar } from './chunk-7AK5I7U7.js';
1
+ export { TabBar } from './chunk-YWLDLNAV.js';
2
2
 
3
3
  //# sourceMappingURL=tab-bar.js.map
@@ -1,3 +1,3 @@
1
- export { reorderTabs, wireTabBars } from './chunk-HJWFHJ3Z.js';
1
+ export { reorderTabs, wireTabBars } from './chunk-WPP5Q4A5.js';
2
2
 
3
3
  //# sourceMappingURL=wire-tab-bars.js.map