@alfadocs/ui-kit-debug 1.41.1 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/_chunks/{calendar-workspace-Bx8xxvic.js → calendar-workspace-DhXqqu-D.js} +1981 -1968
  2. package/dist/_chunks/calendar-workspace-DhXqqu-D.js.map +1 -0
  3. package/dist/_chunks/control-room-rail-Cv7GpMqX.js +354 -0
  4. package/dist/_chunks/control-room-rail-Cv7GpMqX.js.map +1 -0
  5. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js → marketplace-app-shell-DdwPj03y.js} +3 -3
  6. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js.map → marketplace-app-shell-DdwPj03y.js.map} +1 -1
  7. package/dist/_chunks/{notes-panel-Daq5T_cS.js → notes-panel-CRAovkjx.js} +84 -68
  8. package/dist/_chunks/notes-panel-CRAovkjx.js.map +1 -0
  9. package/dist/_chunks/{sidebar-ClTY9lLI.js → sidebar-DbZXLl8h.js} +2 -2
  10. package/dist/_chunks/{sidebar-ClTY9lLI.js.map → sidebar-DbZXLl8h.js.map} +1 -1
  11. package/dist/_chunks/tab-bar-Cw9UK18Z.js +228 -0
  12. package/dist/_chunks/tab-bar-Cw9UK18Z.js.map +1 -0
  13. package/dist/_chunks/{tool-rail-D89USYE6.js → tool-rail-CCFqDfAn.js} +282 -276
  14. package/dist/_chunks/tool-rail-CCFqDfAn.js.map +1 -0
  15. package/dist/_chunks/use-edge-resize-BHesP0kg.js +149 -0
  16. package/dist/_chunks/use-edge-resize-BHesP0kg.js.map +1 -0
  17. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js +72 -0
  18. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js.map +1 -0
  19. package/dist/agent-catalog.json +1 -1
  20. package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
  21. package/dist/components/control-room-rail/control-room-rail.d.ts.map +1 -1
  22. package/dist/components/control-room-rail/index.js +1 -1
  23. package/dist/components/notes-panel/index.js +1 -1
  24. package/dist/components/notes-panel/notes-panel.d.ts +32 -0
  25. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  26. package/dist/components/sidebar/index.js +1 -1
  27. package/dist/components/tab-bar/index.js +1 -1
  28. package/dist/components/tool-rail/index.js +1 -1
  29. package/dist/components/tool-rail/tool-rail.d.ts +16 -0
  30. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  31. package/dist/hooks/index.d.ts +2 -0
  32. package/dist/hooks/index.d.ts.map +1 -1
  33. package/dist/hooks/index.js +35 -32
  34. package/dist/hooks/index.js.map +1 -1
  35. package/dist/hooks/use-edge-resize.d.ts +13 -1
  36. package/dist/hooks/use-edge-resize.d.ts.map +1 -1
  37. package/dist/index.js +6 -6
  38. package/dist/patterns/calendar/calendar.journey.d.ts +11 -0
  39. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  40. package/dist/patterns/calendar/calendar.sheets.d.ts +20 -0
  41. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  42. package/dist/patterns/calendar/index.js +1 -1
  43. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  44. package/dist/tokens.css +1 -1
  45. package/package.json +1 -1
  46. package/dist/_chunks/calendar-workspace-Bx8xxvic.js.map +0 -1
  47. package/dist/_chunks/control-room-rail-CnNZusR5.js +0 -337
  48. package/dist/_chunks/control-room-rail-CnNZusR5.js.map +0 -1
  49. package/dist/_chunks/notes-panel-Daq5T_cS.js.map +0 -1
  50. package/dist/_chunks/tab-bar-rDkLiaA6.js +0 -268
  51. package/dist/_chunks/tab-bar-rDkLiaA6.js.map +0 -1
  52. package/dist/_chunks/tool-rail-D89USYE6.js.map +0 -1
  53. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +0 -139
  54. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js.map +0 -1
  55. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +0 -32
  56. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js.map +0 -1
@@ -0,0 +1,228 @@
1
+ import { jsx as a, jsxs as d, Fragment as D } from "react/jsx-runtime";
2
+ import { forwardRef as F, Fragment as O } from "react";
3
+ import { c } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { B as M } from "./badge-BudgzTe_.js";
6
+ import { D as o } from "./dropdown-menu-DU-Hrf33.js";
7
+ import { u as P } from "./use-media-query-CcAx5SMM.js";
8
+ import { u as Q, a as q } from "./use-scroll-overflow-UbLrUfBo.js";
9
+ import { C as G } from "./chevron-down-DWE7GSq9.js";
10
+ import { C as H } from "./check-DrFSN__t.js";
11
+ import { C as I } from "./chevron-left-B8cOyH-V.js";
12
+ import { C as J } from "./chevron-right-I9AeSxH2.js";
13
+ function K(r) {
14
+ return r > 99 ? "99+" : String(r);
15
+ }
16
+ const U = c("ds:shrink-0", {
17
+ variants: {
18
+ position: {
19
+ top: "ds:pt-[var(--spacing-md)]",
20
+ bottom: "ds:pb-[var(--spacing-md)]"
21
+ },
22
+ fill: {
23
+ false: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
24
+ true: ""
25
+ }
26
+ },
27
+ defaultVariants: { position: "top", fill: !1 }
28
+ }), W = "ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]", X = [
29
+ "ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]",
30
+ "ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]",
31
+ "ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]",
32
+ "ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]",
33
+ "ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]",
34
+ "ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]",
35
+ "ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]",
36
+ "ds:motion-reduce:[mask-image:none]",
37
+ "ds:[.theme-accessible_&]:[mask-image:none]",
38
+ "ds:forced-colors:[mask-image:none]"
39
+ ].join(" "), Y = c(
40
+ "ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
41
+ {
42
+ variants: {
43
+ fill: { false: "ds:shrink-0", true: "ds:w-full" }
44
+ },
45
+ defaultVariants: { fill: !1 }
46
+ }
47
+ ), w = c(
48
+ "ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]",
49
+ {
50
+ variants: {
51
+ fill: {
52
+ // Responsive: label under the icon below `sm`, beside it at `sm`+.
53
+ false: "ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]",
54
+ // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never
55
+ // shrinks below its label (labels never overlap); if the full set can't
56
+ // fit, the pill scrolls instead.
57
+ true: "ds:flex-1 ds:basis-0 ds:flex-col"
58
+ }
59
+ },
60
+ defaultVariants: { fill: !1 }
61
+ }
62
+ ), N = "ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4", Z = "ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]", L = "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", y = "ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", S = "ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]", ss = "ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]", z = "ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100", as = F(
63
+ ({
64
+ items: r,
65
+ id: B,
66
+ ariaLabel: f,
67
+ onSelect: n,
68
+ renderLink: u,
69
+ fill: t = !1,
70
+ position: T = "top",
71
+ collapseToMenu: p = !1,
72
+ className: v
73
+ }, $) => {
74
+ const { t: g } = E(), j = P("(max-width: 640px)"), { containerRef: A, contentRef: _, isOverflowing: R } = Q(p), b = p && (j || R), {
75
+ ref: V,
76
+ canScrollStart: m,
77
+ canScrollEnd: h,
78
+ scrollByPage: x
79
+ } = q(!b), e = r.find((s) => s.isActive) ?? r[0];
80
+ return /* @__PURE__ */ a(
81
+ "div",
82
+ {
83
+ ref: $,
84
+ "data-component": "tab-bar",
85
+ "data-component-id": B,
86
+ className: `${U({ position: T, fill: t })}${v ? ` ${v}` : ""}`,
87
+ children: /* @__PURE__ */ d("div", { className: "ds:relative", children: [
88
+ /* @__PURE__ */ a("div", { ref: A, className: W, children: b ? /* @__PURE__ */ a("nav", { "aria-label": f, className: "ds:w-full", children: /* @__PURE__ */ d(o.Root, { children: [
89
+ /* @__PURE__ */ d(o.Trigger, { className: L, children: [
90
+ e != null && e.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: N, children: e.icon }) : null,
91
+ /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:truncate ds:text-start", children: e == null ? void 0 : e.label }),
92
+ /* @__PURE__ */ a(
93
+ G,
94
+ {
95
+ "aria-hidden": "true",
96
+ className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
97
+ }
98
+ )
99
+ ] }),
100
+ /* @__PURE__ */ a(
101
+ o.Content,
102
+ {
103
+ align: "start",
104
+ className: "ds:min-w-[12rem]",
105
+ children: r.map((s) => /* @__PURE__ */ a(
106
+ o.Item,
107
+ {
108
+ "data-tab-id": s.id,
109
+ startIcon: s.icon,
110
+ endIcon: s.isActive ? /* @__PURE__ */ a(
111
+ H,
112
+ {
113
+ "aria-hidden": "true",
114
+ className: "ds:text-[color:var(--accent)]"
115
+ }
116
+ ) : void 0,
117
+ "aria-current": s.isActive ? "page" : void 0,
118
+ onSelect: () => {
119
+ s.href ? window.location.assign(s.href) : n == null || n(s.id);
120
+ },
121
+ children: s.label
122
+ },
123
+ s.id
124
+ ))
125
+ }
126
+ )
127
+ ] }) }) : /* @__PURE__ */ a(
128
+ "div",
129
+ {
130
+ ref: V,
131
+ "data-fade-start": m ? "true" : void 0,
132
+ "data-fade-end": h ? "true" : void 0,
133
+ className: X,
134
+ children: /* @__PURE__ */ a(
135
+ "nav",
136
+ {
137
+ ref: _,
138
+ "aria-label": f,
139
+ className: Y({ fill: t }),
140
+ children: r.map((s) => {
141
+ const C = typeof s.badgeCount == "number" && s.badgeCount > 0 ? s.badgeCount : void 0, i = s.isActive ? "page" : void 0, l = /* @__PURE__ */ d(D, { children: [
142
+ s.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: N, children: s.icon }) : null,
143
+ /* @__PURE__ */ d("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
144
+ /* @__PURE__ */ a("span", { className: Z, children: s.label }),
145
+ C !== void 0 ? /* @__PURE__ */ a(M, { variant: "neutral", children: K(C) }) : null
146
+ ] })
147
+ ] });
148
+ if (s.href !== void 0) {
149
+ const k = w({ fill: t });
150
+ return u ? /* @__PURE__ */ a(O, { children: u({
151
+ href: s.href,
152
+ className: k,
153
+ children: l,
154
+ "aria-current": i,
155
+ "data-tab-id": s.id,
156
+ onClick: s.onClick
157
+ }) }, s.id) : /* @__PURE__ */ a(
158
+ "a",
159
+ {
160
+ href: s.href,
161
+ "data-tab-id": s.id,
162
+ "aria-current": i,
163
+ className: k,
164
+ ...s.onClick ? { onClick: s.onClick } : {},
165
+ children: l
166
+ },
167
+ s.id
168
+ );
169
+ }
170
+ return /* @__PURE__ */ a(
171
+ "button",
172
+ {
173
+ type: "button",
174
+ "data-tab-id": s.id,
175
+ "aria-current": i,
176
+ className: w({ fill: t }),
177
+ onClick: () => n == null ? void 0 : n(s.id),
178
+ children: l
179
+ },
180
+ s.id
181
+ );
182
+ })
183
+ }
184
+ )
185
+ }
186
+ ) }),
187
+ m ? /* @__PURE__ */ a(
188
+ "button",
189
+ {
190
+ type: "button",
191
+ "aria-label": g("navigation.tabBar.scrollBack"),
192
+ onClick: () => x(-1),
193
+ className: `${y} ${S}`,
194
+ children: /* @__PURE__ */ a(
195
+ I,
196
+ {
197
+ "aria-hidden": "true",
198
+ className: z
199
+ }
200
+ )
201
+ }
202
+ ) : null,
203
+ h ? /* @__PURE__ */ a(
204
+ "button",
205
+ {
206
+ type: "button",
207
+ "aria-label": g("navigation.tabBar.scrollForward"),
208
+ onClick: () => x(1),
209
+ className: `${y} ${ss}`,
210
+ children: /* @__PURE__ */ a(
211
+ J,
212
+ {
213
+ "aria-hidden": "true",
214
+ className: z
215
+ }
216
+ )
217
+ }
218
+ ) : null
219
+ ] })
220
+ }
221
+ );
222
+ }
223
+ );
224
+ as.displayName = "TabBar";
225
+ export {
226
+ as as T
227
+ };
228
+ //# sourceMappingURL=tab-bar-Cw9UK18Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-bar-Cw9UK18Z.js","sources":["../../src/components/tab-bar/tab-bar.tsx"],"sourcesContent":["/**\n * TabBar — a floating-pill bar of page-level navigation tabs.\n *\n * Each tab is an icon + label (+ optional count badge); the active tab is\n * marked with `aria-current=\"page\"` and an `--accent` underline. The bar is a\n * glassy `--card` pill that floats on whatever canvas the consumer provides\n * (the strip area itself is transparent, so it blends with the surrounding\n * surface).\n *\n * Two layouts:\n * - default (`fill` off): content-width tabs that **centre** when they fit and\n * scroll from the inline-start (`safe center`) when they overflow, with a\n * gutter preserved at both ends. The label stacks under the icon below `sm`.\n * Use this when the tab set is open-ended (e.g. a marketplace app's routes).\n * - `fill`: equal-width tabs that fill the bar and always stack the label under\n * the icon — a fixed, always-visible set that fits any column width without\n * scrolling (e.g. a patient portal's handful of sections).\n *\n * Tabs render as links when given an `href` (real navigation) or as buttons\n * otherwise (in-app view switching via `onSelect`). Use it as a header (top,\n * default) for section navigation; `position=\"bottom\"` floats it from the\n * bottom edge for a footer.\n *\n * With `collapseToMenu`, the strip folds into a single DropdownMenu whenever the\n * tabs don't fit — below the `sm` breakpoint OR when they overflow their\n * container at any width (a narrow column on a wide screen, e.g. a page squeezed\n * between two sidebars, clips the tabs just the same as a small viewport).\n *\n * SPA / consumer-router links: pass `renderLink` and TabBar hands each `href`\n * tab off to your router's `<Link>` instead of rendering its own `<a>` — the\n * embedded MarketplaceAppShell strip uses this so a tab click is a client-side\n * route change, not a full page navigation. The kit forwards the same\n * `className` + `aria-current` so the accent-underline active styling and the\n * `aria-current=\"page\"` marker survive in both modes. With `renderLink`\n * omitted the output is the plain `<a href>` exactly as before.\n */\nimport { forwardRef, Fragment, type MouseEvent, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Check, ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Badge } from '../badge';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useScrollOverflow } from '../../hooks/use-scroll-overflow';\nimport { useOverflowCollapse } from '../../hooks/use-overflow-collapse';\n\nexport interface TabBarItem {\n /** Stable id; also the value handed to `onSelect` for button tabs. */\n id: string;\n /** Pre-translated label — consumers localise their own nav copy. */\n label: string;\n /** Optional leading icon (a lucide-react element or equivalent), tinted with `--accent`. */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the tab as the current page (`aria-current='page'` + accent underline). */\n isActive?: boolean;\n /** When set, the tab renders as a link to this href; otherwise it's a button. */\n href?: string;\n /**\n * Optional click handler threaded onto the link tab's `<a>` (or, when\n * `renderLink` is supplied, available to the consumer's router element). Use\n * it to intercept a same-origin click and route client-side without a full\n * navigation. Only applies to `href` (link) tabs — button tabs use `onSelect`.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the kit hands to `renderLink` for each `href` tab. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the active\n * accent-underline styling) and `aria-current` (`'page'` on the active tab).\n */\nexport interface TabBarRenderLinkProps {\n /** The tab's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's tab classes (CVA output) — apply verbatim to the link element. */\n className: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active tab, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n /**\n * The tab's stable `TabBarItem.id`, as the agent / automation DOM hook.\n * Spread it onto your router link (`{...rest}`) so the tab stays addressable\n * by `[data-tab-id]` the same way the kit's own `<a>` / `<button>` tabs are —\n * see PRS §26 §6.\n */\n 'data-tab-id'?: string;\n /** Optional per-item click handler (the item's `onClick`), if supplied. */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\nexport interface TabBarProps {\n /** The tabs, in order. */\n items: TabBarItem[];\n /**\n * Opaque instance id, emitted on the strip as `data-component-id`. Pass it\n * when more than one TabBar can be on screen so an agent / automation tool\n * can scope its `[data-tab-id]` lookup to one bar (PRS §26 §6).\n */\n id?: string;\n /** Accessible name for the `<nav>` landmark. */\n ariaLabel: string;\n /** Fires with the tab `id` when a button tab (one without `href`) is chosen. */\n onSelect?: (id: string) => void;\n /**\n * Render an `href` tab via the consumer's router instead of the kit's own\n * `<a>`. TabBar calls it for each link tab and renders the returned node; the\n * consumer returns their `<Link to={href}>` carrying the supplied `className`\n * + `aria-current` so the active accent underline and the `aria-current=\"page\"`\n * marker are preserved. Use it for SPA navigation (e.g. the MarketplaceAppShell\n * strip) so a tab click is a client-side route change, not a full page load.\n * Omit it to render the plain `<a href>` exactly as before. Button tabs (no\n * `href`) ignore `renderLink` and continue to use `onSelect`.\n */\n renderLink?: (props: TabBarRenderLinkProps) => ReactNode;\n /**\n * Equal-width tabs that fill the bar and always stack the label under the\n * icon (for a fixed, always-visible set). Off (default) = content-width tabs\n * that centre when they fit and scroll when they overflow.\n */\n fill?: boolean;\n /**\n * Float side. `'top'` (default) gutters from the top edge for a header;\n * `'bottom'` gutters from the bottom edge for a footer.\n */\n position?: 'top' | 'bottom';\n /**\n * Collapse the tab strip into a single DropdownMenu whenever the tabs don't\n * fit — below the `sm` breakpoint (≤640px) OR when they overflow their\n * container at any viewport width (a narrow column between two sidebars clips\n * the tabs the same as a small screen). The trigger shows the active tab; the\n * menu lists them all. Off (default) keeps the content-width / scroll\n * behaviour at every width, so existing consumers are unaffected. Designed for\n * button (`onSelect`) tabs; in the collapsed menu an `href` tab navigates with\n * a full page load, so `renderLink` (SPA routing) and a per-item `onClick`\n * apply only to the expanded strip.\n */\n collapseToMenu?: boolean;\n /** Extra classes merged onto the outer strip (e.g. sticky/fixed positioning). */\n className?: string;\n}\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\n/* Transparent strip area — provides the floating gutter on the active side. The\n default layout also insets the pill horizontally so it reads as a floating\n strip; `fill` drops that inset so the pill spans the full width and aligns\n with the consumer's content (e.g. a portal's cards). */\nconst stripVariants = cva('ds:shrink-0', {\n variants: {\n position: {\n top: 'ds:pt-[var(--spacing-md)]',\n bottom: 'ds:pb-[var(--spacing-md)]',\n },\n fill: {\n false: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n true: '',\n },\n },\n defaultVariants: { position: 'top', fill: false },\n});\n\n/* The pill is the glass chrome — the bordered, blurred, rounded surface. The\n scrollable tab row is a separate inner element (`pillScrollClasses`) so the\n edge-fade mask touches only the tabs, never the pill's border. It is also the\n overflow-collapse MEASUREMENT container: it stays mounted in both the scroll\n and the dropdown render, and (carrying no padding) its `clientWidth` is\n exactly the width the tab row has to fit. */\nconst pillClasses =\n 'ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]';\n\n/* The inner scroll container. `safe center` centres the tabs when they fit but\n falls back to start-alignment the moment they overflow, so the row stays fully\n scrollable end to end. Inline-edge MASK: the leading / trailing edge fades only\n when tabs are hidden past it (`data-fade-start` / `data-fade-end`), so a clipped\n tab dissolves into the glass under the accent chevron — alpha-based, so no seam\n with the translucent pill. Logical via `--tabbar-mask-*` (RTL-mapped); `black`\n is the mask-opaque sentinel, not a colour. Disabled under reduced motion, the\n accessible theme, and forced-colors so content is never hidden from those\n users. `--tabbar-fade-distance` (default `--spacing-lg`) is per-instance. */\nconst pillScrollClasses = [\n 'ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]',\n 'ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]',\n 'ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]',\n 'ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]',\n 'ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n].join(' ');\n\n/* The nav's inline padding is the start/end gutter — it scrolls WITH the tabs,\n so the gutter survives a full scroll. Content width (`shrink-0`) by default so\n it overflows and scrolls; `w-full` in fill mode so the tabs spread to fit. */\nconst navVariants = cva(\n 'ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n {\n variants: {\n fill: { false: 'ds:shrink-0', true: 'ds:w-full' },\n },\n defaultVariants: { fill: false },\n },\n);\n\n/* Each tab is a centred flex box so the icon + label sit centred on both axes.\n Regular weight; the active state is carried by the accent underline + accent\n icon, not a heavier weight. */\nconst tabVariants = cva(\n 'ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',\n {\n variants: {\n fill: {\n // Responsive: label under the icon below `sm`, beside it at `sm`+.\n false: 'ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]',\n // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never\n // shrinks below its label (labels never overlap); if the full set can't\n // fit, the pill scrolls instead.\n true: 'ds:flex-1 ds:basis-0 ds:flex-col',\n },\n },\n defaultVariants: { fill: false },\n },\n);\n\nconst iconClasses =\n 'ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4';\n\n/* The accent underline rides the label text itself (not the whole tab), so it\n never reaches the icon or badge and never has to propagate through flex. */\nconst labelClasses =\n 'ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]';\n\n/* The mobile collapse trigger — a full-width button styled like a tab, showing\n the active tab's icon + label with a trailing chevron. */\nconst menuTriggerClasses =\n 'ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Scroll affordance — an accent chevron pinned to a scrollable edge of the pill,\n shown only when there are tabs hidden past that edge. No button chrome: the\n edge tab fades into the glass via the inner scroll's mask (above); the chevron\n just points the way and pages the strip on click. A `--min-target-size` hit\n area keeps it tappable. Block axis spans the pill (`top`/`bottom` px-inset past\n the border); the inline edge (`start`/`end`) and the chevron flip mirror RTL. */\nconst scrollAffordanceClasses =\n 'ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Pin the chevron to its inline edge, over the faded tab. */\nconst scrollAffordanceStartClasses =\n 'ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]';\n\nconst scrollAffordanceEndClasses =\n 'ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]';\n\n/* The chevron is the only visible mark — accent-tinted (matching the tab icons),\n mirrored under RTL. Decorative (`aria-hidden`); the button carries the label. */\nconst scrollChevronClasses =\n 'ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100';\n\nexport const TabBar = forwardRef<HTMLDivElement, TabBarProps>(\n (\n {\n items,\n id,\n ariaLabel,\n onSelect,\n renderLink,\n fill = false,\n position = 'top',\n collapseToMenu = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Collapse is twofold, OR'd: the documented mobile floor (≤sm) AND actual\n // container overflow (a narrow column on a wide screen clips the tabs just\n // the same). Both hooks run every render (hook order); only consulted when\n // collapseToMenu is on. The pill (containerRef) stays mounted across the\n // collapse so the overflow hook can still tell when the column has grown\n // back; the tab row (contentRef) carries the natural width.\n const isNarrow = useMediaQuery('(max-width: 640px)');\n const { containerRef, contentRef, isOverflowing } = useOverflowCollapse<\n HTMLDivElement,\n HTMLElement\n >(collapseToMenu);\n const isDropdown = collapseToMenu && (isNarrow || isOverflowing);\n\n // Edge scroll affordances for the scroll layout. Disabled in dropdown mode\n // (no scroll box), so the observer tears down / re-attaches across the flip.\n const {\n ref: pillRef,\n canScrollStart,\n canScrollEnd,\n scrollByPage,\n } = useScrollOverflow<HTMLDivElement>(!isDropdown);\n\n const activeItem = items.find((item) => item.isActive) ?? items[0];\n\n return (\n <div\n ref={ref}\n data-component=\"tab-bar\"\n data-component-id={id}\n className={`${stripVariants({ position, fill })}${className ? ` ${className}` : ''}`}\n >\n {/* Relative wrapper: the scroll affordances are absolutely positioned\n against it, NOT inside the scroll box (absolute children of a scroller\n scroll away with the content). */}\n <div className=\"ds:relative\">\n {/* The pill doubles as the overflow-collapse measurement container —\n rendered in BOTH branches (same element, same width) so the hook\n can keep measuring after the tab row is swapped for the menu. */}\n <div ref={containerRef} className={pillClasses}>\n {isDropdown ? (\n <nav aria-label={ariaLabel} className=\"ds:w-full\">\n <DropdownMenu.Root>\n <DropdownMenu.Trigger className={menuTriggerClasses}>\n {activeItem?.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {activeItem.icon}\n </span>\n ) : null}\n <span className=\"ds:flex-1 ds:truncate ds:text-start\">\n {activeItem?.label}\n </span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]\"\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n align=\"start\"\n className=\"ds:min-w-[12rem]\"\n >\n {items.map((item) => (\n <DropdownMenu.Item\n key={item.id}\n data-tab-id={item.id}\n startIcon={item.icon}\n endIcon={\n item.isActive ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:text-[color:var(--accent)]\"\n />\n ) : undefined\n }\n aria-current={item.isActive ? 'page' : undefined}\n onSelect={() => {\n if (item.href) {\n window.location.assign(item.href);\n } else {\n onSelect?.(item.id);\n }\n }}\n >\n {item.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </nav>\n ) : (\n <div\n ref={pillRef}\n data-fade-start={canScrollStart ? 'true' : undefined}\n data-fade-end={canScrollEnd ? 'true' : undefined}\n className={pillScrollClasses}\n >\n <nav\n ref={contentRef}\n aria-label={ariaLabel}\n className={navVariants({ fill })}\n >\n {items.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const ariaCurrent = item.isActive ? 'page' : undefined;\n const inner = (\n <>\n {item.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {item.icon}\n </span>\n ) : null}\n {/* Label + badge stay paired; they sit under the icon when\n the tab stacks to a column. */}\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className={labelClasses}>{item.label}</span>\n {badge !== undefined ? (\n <Badge variant=\"neutral\">\n {formatBadgeCount(badge)}\n </Badge>\n ) : null}\n </span>\n </>\n );\n if (item.href !== undefined) {\n const tabClassName = tabVariants({ fill });\n // Consumer-router mode: hand the tab to the consumer's <Link>,\n // forwarding the same className + aria-current (+ the item's\n // onClick) so the active styling and `aria-current=\"page\"`\n // marker carry over and clicking routes client-side.\n if (renderLink) {\n return (\n <Fragment key={item.id}>\n {renderLink({\n href: item.href,\n className: tabClassName,\n children: inner,\n 'aria-current': ariaCurrent,\n 'data-tab-id': item.id,\n onClick: item.onClick,\n })}\n </Fragment>\n );\n }\n // Default: plain anchor — byte-identical to before when no\n // per-item onClick is supplied (onClick is omitted entirely,\n // not passed as undefined, so the rendered <a> is unchanged).\n return (\n <a\n key={item.id}\n href={item.href}\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabClassName}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </a>\n );\n }\n return (\n <button\n key={item.id}\n type=\"button\"\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabVariants({ fill })}\n onClick={() => onSelect?.(item.id)}\n >\n {inner}\n </button>\n );\n })}\n </nav>\n </div>\n )}\n </div>\n {canScrollStart ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollBack')}\n onClick={() => scrollByPage(-1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceStartClasses}`}\n >\n <ChevronLeft\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n {canScrollEnd ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollForward')}\n onClick={() => scrollByPage(1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceEndClasses}`}\n >\n <ChevronRight\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n </div>\n </div>\n );\n },\n);\nTabBar.displayName = 'TabBar';\n"],"names":["formatBadgeCount","count","stripVariants","cva","pillClasses","pillScrollClasses","navVariants","tabVariants","iconClasses","labelClasses","menuTriggerClasses","scrollAffordanceClasses","scrollAffordanceStartClasses","scrollAffordanceEndClasses","scrollChevronClasses","TabBar","forwardRef","items","id","ariaLabel","onSelect","renderLink","fill","position","collapseToMenu","className","ref","t","useTranslation","isNarrow","useMediaQuery","containerRef","contentRef","isOverflowing","useOverflowCollapse","isDropdown","pillRef","canScrollStart","canScrollEnd","scrollByPage","useScrollOverflow","activeItem","item","jsx","jsxs","DropdownMenu","ChevronDown","Check","badge","ariaCurrent","inner","Fragment","Badge","tabClassName","ChevronLeft","ChevronRight"],"mappings":";;;;;;;;;;;;AAiJA,SAASA,EAAiBC,GAAuB;AAC/C,SAAOA,IAAQ,KAAK,QAAQ,OAAOA,CAAK;AAC1C;AAMA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