@fanvue/ui 3.40.1 → 3.42.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 (34) hide show
  1. package/dist/cjs/components/Checkbox/Checkbox.cjs +6 -6
  2. package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  3. package/dist/cjs/components/Dialog/Dialog.cjs +63 -55
  4. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
  5. package/dist/cjs/components/Icons/CommentIcon.cjs +74 -0
  6. package/dist/cjs/components/Icons/CommentIcon.cjs.map +1 -0
  7. package/dist/cjs/components/Tabs/Tabs.cjs +26 -1
  8. package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -1
  9. package/dist/cjs/components/Tabs/TabsList.cjs +163 -22
  10. package/dist/cjs/components/Tabs/TabsList.cjs.map +1 -1
  11. package/dist/cjs/components/Tabs/TabsOverflow.cjs +123 -0
  12. package/dist/cjs/components/Tabs/TabsOverflow.cjs.map +1 -0
  13. package/dist/cjs/components/Tabs/TabsTrigger.cjs +27 -14
  14. package/dist/cjs/components/Tabs/TabsTrigger.cjs.map +1 -1
  15. package/dist/cjs/index.cjs +5 -0
  16. package/dist/cjs/index.cjs.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.mjs +6 -6
  18. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  19. package/dist/components/Dialog/Dialog.mjs +63 -55
  20. package/dist/components/Dialog/Dialog.mjs.map +1 -1
  21. package/dist/components/Icons/CommentIcon.mjs +57 -0
  22. package/dist/components/Icons/CommentIcon.mjs.map +1 -0
  23. package/dist/components/Tabs/Tabs.mjs +26 -2
  24. package/dist/components/Tabs/Tabs.mjs.map +1 -1
  25. package/dist/components/Tabs/TabsList.mjs +164 -23
  26. package/dist/components/Tabs/TabsList.mjs.map +1 -1
  27. package/dist/components/Tabs/TabsOverflow.mjs +106 -0
  28. package/dist/components/Tabs/TabsOverflow.mjs.map +1 -0
  29. package/dist/components/Tabs/TabsTrigger.mjs +27 -14
  30. package/dist/components/Tabs/TabsTrigger.mjs.map +1 -1
  31. package/dist/index.d.ts +103 -19
  32. package/dist/index.mjs +5 -0
  33. package/dist/index.mjs.map +1 -1
  34. package/package.json +1 -1
@@ -23,6 +23,61 @@ function _interopNamespaceDefault(e) {
23
23
  }
24
24
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
25
25
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
26
+ const TabsAppearanceContext = React__namespace.createContext({ appearance: "underline", size: "32" });
27
+ const PILL_EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
28
+ const PILL_STEP_MS = 360;
29
+ const PILL_STEP_MS_TOUCH = 200;
30
+ const PILL_EXTRA_STEP_MS = 220;
31
+ const PILL_MAX_MS = 1e3;
32
+ const PILL_ARRIVAL_SHARE = 0.27;
33
+ function pillStepMs(canHover) {
34
+ return canHover ? PILL_STEP_MS : PILL_STEP_MS_TOUCH;
35
+ }
36
+ function pillSlideMs(distance, canHover) {
37
+ if (!canHover) return PILL_STEP_MS_TOUCH;
38
+ return Math.min(PILL_STEP_MS + Math.max(distance - 1, 0) * PILL_EXTRA_STEP_MS, PILL_MAX_MS);
39
+ }
40
+ const prefersReducedMotion = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
41
+ function pillTarget(list, hovered, activeTab) {
42
+ return list.querySelector('[role="tab"][aria-expanded="true"]') ?? (hovered?.isConnected ? hovered : activeTab);
43
+ }
44
+ function measureTabs(list, observer) {
45
+ const boxes = /* @__PURE__ */ new Map();
46
+ const order = /* @__PURE__ */ new Map();
47
+ for (const tab of list.querySelectorAll('[role="tab"]')) {
48
+ observer?.observe(tab);
49
+ order.set(tab, order.size);
50
+ boxes.set(tab, {
51
+ left: tab.offsetLeft,
52
+ top: tab.offsetTop,
53
+ width: tab.offsetWidth,
54
+ height: tab.offsetHeight
55
+ });
56
+ }
57
+ return { boxes, order };
58
+ }
59
+ function slideFromPrevious(list, previous, next, durationMs) {
60
+ const moved = [];
61
+ for (const [tab, box] of next) {
62
+ const before = previous.get(tab);
63
+ if (!before || before.left === box.left || !(tab instanceof HTMLElement)) continue;
64
+ tab.style.transition = "none";
65
+ tab.style.transform = `translateX(${before.left - box.left}px)`;
66
+ moved.push(tab);
67
+ }
68
+ if (moved.length === 0) return;
69
+ list.getBoundingClientRect();
70
+ for (const tab of moved) {
71
+ tab.style.transition = `transform ${durationMs}ms var(--pill-ease)`;
72
+ tab.style.transform = "";
73
+ const settle = (event) => {
74
+ if (event.propertyName !== "transform") return;
75
+ tab.style.transition = "";
76
+ tab.removeEventListener("transitionend", settle);
77
+ };
78
+ tab.addEventListener("transitionend", settle);
79
+ }
80
+ }
26
81
  const alignLeftClasses = {
27
82
  always: "[&>[role=tab]]:flex-initial",
28
83
  sm: "[&>[role=tab]]:sm:flex-initial",
@@ -48,11 +103,61 @@ const TabsList = React__namespace.forwardRef(
48
103
  variant,
49
104
  flushLeft = false,
50
105
  scrollable = false,
106
+ appearance = "underline",
107
+ size = "32",
108
+ followHover = false,
109
+ onPointerOver,
110
+ onPointerLeave,
111
+ style,
51
112
  ...props
52
113
  }, ref) => {
53
114
  const innerRef = React__namespace.useRef(null);
54
115
  const indicatorRef = React__namespace.useRef(null);
55
116
  React__namespace.useImperativeHandle(ref, () => innerRef.current);
117
+ const tabBoxes = React__namespace.useRef(/* @__PURE__ */ new Map());
118
+ const resizeObserverRef = React__namespace.useRef(null);
119
+ const listWidth = React__namespace.useRef(null);
120
+ const hoveredTab = React__namespace.useRef(null);
121
+ const pillTab = React__namespace.useRef(null);
122
+ const tabOrder = React__namespace.useRef(/* @__PURE__ */ new Map());
123
+ const canHover = React__namespace.useRef(false);
124
+ const placePill = React__namespace.useCallback((tab) => {
125
+ const list = innerRef.current;
126
+ const indicator = indicatorRef.current;
127
+ if (!list || !indicator) return;
128
+ const box = tabBoxes.current.get(tab);
129
+ if (!box) return;
130
+ const from = pillTab.current;
131
+ pillTab.current = tab;
132
+ const distance = from && from !== tab ? Math.abs((tabOrder.current.get(tab) ?? 0) - (tabOrder.current.get(from) ?? 0)) : 0;
133
+ const slideMs = pillSlideMs(distance, canHover.current);
134
+ list.style.setProperty("--pill-slide", `${slideMs}ms`);
135
+ list.style.setProperty("--pill-arrive", `${Math.round(slideMs * PILL_ARRIVAL_SHARE)}ms`);
136
+ indicator.style.width = `${box.width}px`;
137
+ indicator.style.height = `${box.height}px`;
138
+ indicator.style.transform = `translate(${box.left}px, ${box.top}px)`;
139
+ for (const marked of list.querySelectorAll("[data-pill]")) {
140
+ if (marked !== tab) marked.removeAttribute("data-pill");
141
+ }
142
+ tab.setAttribute("data-pill", "");
143
+ }, []);
144
+ const layoutPill = React__namespace.useCallback(
145
+ (list, indicator, activeTab) => {
146
+ indicator.style.background = "var(--color-content-primary)";
147
+ indicator.style.inset = "0 auto auto 0";
148
+ const previous = tabBoxes.current;
149
+ const rowResized = listWidth.current !== null && listWidth.current !== list.offsetWidth;
150
+ listWidth.current = list.offsetWidth;
151
+ const { boxes, order } = measureTabs(list, resizeObserverRef.current);
152
+ tabBoxes.current = boxes;
153
+ tabOrder.current = order;
154
+ if (!rowResized && previous.size > 0 && !prefersReducedMotion()) {
155
+ slideFromPrevious(list, previous, boxes, pillStepMs(canHover.current));
156
+ }
157
+ placePill(pillTarget(list, hoveredTab.current, activeTab));
158
+ },
159
+ [placePill]
160
+ );
56
161
  const updateIndicator = React__namespace.useCallback(() => {
57
162
  const list = innerRef.current;
58
163
  const indicator = indicatorRef.current;
@@ -60,11 +165,14 @@ const TabsList = React__namespace.forwardRef(
60
165
  const activeTab = list.querySelector('[data-state="active"]');
61
166
  if (!activeTab) {
62
167
  indicator.style.opacity = "0";
168
+ list.querySelector("[data-pill]")?.removeAttribute("data-pill");
63
169
  return;
64
170
  }
65
171
  const isVertical = list.dataset.orientation === "vertical";
66
172
  indicator.style.opacity = "1";
67
- if (isVertical) {
173
+ if (appearance === "pill") {
174
+ layoutPill(list, indicator, activeTab);
175
+ } else if (isVertical) {
68
176
  indicator.style.background = "linear-gradient(180deg, var(--color-buttons-tertiary-default) 0%, var(--color-tab-active) 50%, var(--color-buttons-tertiary-default) 100%)";
69
177
  indicator.style.inset = `0 -1px auto auto`;
70
178
  indicator.style.width = "1px";
@@ -77,19 +185,42 @@ const TabsList = React__namespace.forwardRef(
77
185
  indicator.style.width = `${activeTab.offsetWidth}px`;
78
186
  indicator.style.transform = `translateX(${activeTab.offsetLeft}px)`;
79
187
  }
80
- }, []);
188
+ }, [appearance, layoutPill]);
189
+ const followsHover = appearance === "pill" && followHover;
190
+ const handlePointerOver = (event) => {
191
+ onPointerOver?.(event);
192
+ if (!followsHover || event.pointerType !== "mouse") return;
193
+ if (prefersReducedMotion()) return;
194
+ const tab = event.target.closest('[role="tab"]');
195
+ if (!tab || tab === hoveredTab.current || !event.currentTarget.contains(tab)) return;
196
+ hoveredTab.current = tab;
197
+ placePill(pillTarget(event.currentTarget, tab, tab));
198
+ };
199
+ const handlePointerLeave = (event) => {
200
+ onPointerLeave?.(event);
201
+ if (!hoveredTab.current) return;
202
+ hoveredTab.current = null;
203
+ const list = innerRef.current;
204
+ const activeTab = list?.querySelector('[data-state="active"]');
205
+ if (list && activeTab) placePill(pillTarget(list, null, activeTab));
206
+ };
81
207
  const revealActiveTab = React__namespace.useCallback(() => {
82
208
  const list = innerRef.current;
83
- if (!list || !scrollable || list.dataset.orientation === "vertical") return;
209
+ const scrolls = scrollable || appearance === "pill";
210
+ if (!list || !scrolls || list.dataset.orientation === "vertical") return;
84
211
  const activeTab = list.querySelector('[data-state="active"]');
85
212
  if (!activeTab) return;
86
213
  const overshoot = activeTab.offsetLeft + activeTab.offsetWidth - list.clientWidth;
87
214
  if (overshoot > list.scrollLeft) list.scrollLeft = overshoot;
88
- }, [scrollable]);
215
+ }, [scrollable, appearance]);
89
216
  React__namespace.useLayoutEffect(() => {
90
217
  const list = innerRef.current;
91
218
  const indicator = indicatorRef.current;
92
219
  if (!list || !indicator) return;
220
+ canHover.current = window.matchMedia?.("(hover: hover)").matches ?? false;
221
+ const resizeObserver = new ResizeObserver(updateIndicator);
222
+ resizeObserver.observe(list);
223
+ resizeObserverRef.current = resizeObserver;
93
224
  indicator.style.transitionDuration = "0s";
94
225
  updateIndicator();
95
226
  indicator.getBoundingClientRect();
@@ -98,12 +229,10 @@ const TabsList = React__namespace.forwardRef(
98
229
  const mutationObserver = new MutationObserver(updateIndicator);
99
230
  mutationObserver.observe(list, {
100
231
  attributes: true,
101
- attributeFilter: ["data-state"],
232
+ attributeFilter: ["data-state", "aria-expanded"],
102
233
  childList: true,
103
234
  subtree: true
104
235
  });
105
- const resizeObserver = new ResizeObserver(updateIndicator);
106
- resizeObserver.observe(list);
107
236
  let cancelled = false;
108
237
  if (document.fonts?.status !== "loaded") {
109
238
  document.fonts?.ready.then(() => {
@@ -116,29 +245,37 @@ const TabsList = React__namespace.forwardRef(
116
245
  cancelled = true;
117
246
  mutationObserver.disconnect();
118
247
  resizeObserver.disconnect();
248
+ resizeObserverRef.current = null;
119
249
  };
120
250
  }, [updateIndicator, revealActiveTab]);
121
- return /* @__PURE__ */ jsxRuntime.jsxs(
251
+ const isPill = appearance === "pill";
252
+ const listStyle = isPill ? { "--pill-ease": PILL_EASE, ...style } : { ...style };
253
+ return /* @__PURE__ */ jsxRuntime.jsx(TabsAppearanceContext.Provider, { value: { appearance, size }, children: /* @__PURE__ */ jsxRuntime.jsxs(
122
254
  TabsPrimitive__namespace.List,
123
255
  {
124
256
  ref: innerRef,
257
+ onPointerOver: handlePointerOver,
258
+ onPointerLeave: handlePointerLeave,
259
+ style: listStyle,
125
260
  className: cn.cn(
126
261
  // `isolate` scopes the active indicator's `z-10` to a local stacking
127
262
  // context. Without it, `relative` alone creates no stacking context, so
128
263
  // the indicator escapes and paints above page chrome (e.g. the header).
129
264
  "relative isolate",
130
- getLayoutClass(variant, fullWidth, alignLeft),
131
- // Horizontal only: in the vertical orientation the leading padding is
132
- // the row's left inset, not a label offset, so zeroing it would pull
133
- // the first label out of line with the others.
134
- flushLeft && "data-[orientation=horizontal]:[&>[role=tab]:first-child]:pl-0",
135
- // `flex-none` is what stops the tabs compressing — without it they
136
- // share the row and never overflow, so there is nothing to scroll.
137
- // The scrollbar is hidden in both engines: Firefox reads
138
- // `scrollbar-width`, WebKit and Blink the pseudo-element.
139
- scrollable && "data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:[scrollbar-width:none] data-[orientation=horizontal]:[&::-webkit-scrollbar]:hidden data-[orientation=horizontal]:[&>[role=tab]]:flex-none",
140
- "data-[orientation=horizontal]:items-center data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--color-border-primary)]",
141
- "data-[orientation=vertical]:flex-col data-[orientation=vertical]:shadow-[inset_-1px_0_0_0_var(--color-border-primary)]",
265
+ isPill ? "inline-flex w-fit max-w-full items-center gap-1 overflow-x-auto rounded-full bg-background-secondary p-1 shadow-md [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : [
266
+ getLayoutClass(variant, fullWidth, alignLeft),
267
+ // Horizontal only: in the vertical orientation the leading padding is
268
+ // the row's left inset, not a label offset, so zeroing it would pull
269
+ // the first label out of line with the others.
270
+ flushLeft && "data-[orientation=horizontal]:[&>[role=tab]:first-child]:pl-0",
271
+ // `flex-none` is what stops the tabs compressing — without it they
272
+ // share the row and never overflow, so there is nothing to scroll.
273
+ // The scrollbar is hidden in both engines: Firefox reads
274
+ // `scrollbar-width`, WebKit and Blink the pseudo-element.
275
+ scrollable && "data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:[scrollbar-width:none] data-[orientation=horizontal]:[&::-webkit-scrollbar]:hidden data-[orientation=horizontal]:[&>[role=tab]]:flex-none",
276
+ "data-[orientation=horizontal]:items-center data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--color-border-primary)]",
277
+ "data-[orientation=vertical]:flex-col data-[orientation=vertical]:shadow-[inset_-1px_0_0_0_var(--color-border-primary)]"
278
+ ],
142
279
  className
143
280
  ),
144
281
  ...props,
@@ -149,15 +286,19 @@ const TabsList = React__namespace.forwardRef(
149
286
  {
150
287
  ref: indicatorRef,
151
288
  "aria-hidden": true,
152
- className: "pointer-events-none absolute z-10 rounded-full motion-safe:transition-[transform,width,height] motion-safe:duration-200 motion-safe:ease-in-out",
289
+ className: cn.cn(
290
+ "pointer-events-none absolute rounded-full motion-safe:transition-[transform,width,height]",
291
+ isPill ? "z-5 motion-safe:duration-(--pill-slide) motion-safe:ease-(--pill-ease)" : "z-10 motion-safe:duration-200 motion-safe:ease-in-out"
292
+ ),
153
293
  style: { opacity: 0 }
154
294
  }
155
295
  )
156
296
  ]
157
297
  }
158
- );
298
+ ) });
159
299
  }
160
300
  );
161
301
  TabsList.displayName = "TabsList";
302
+ exports.TabsAppearanceContext = TabsAppearanceContext;
162
303
  exports.TabsList = TabsList;
163
304
  //# sourceMappingURL=TabsList.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabsList.cjs","sources":["../../../../src/components/Tabs/TabsList.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Breakpoint values for responsive props. */\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst alignLeftClasses: Record<Breakpoint | \"always\", string> = {\n always: \"[&>[role=tab]]:flex-initial\",\n sm: \"[&>[role=tab]]:sm:flex-initial\",\n md: \"[&>[role=tab]]:md:flex-initial\",\n lg: \"[&>[role=tab]]:lg:flex-initial\",\n xl: \"[&>[role=tab]]:xl:flex-initial\",\n};\n\nfunction getLayoutClass(\n variant: \"fill\" | \"hug\" | undefined,\n fullWidth: boolean,\n alignLeft?: boolean | Breakpoint,\n): string {\n if (variant === \"hug\") return \"inline-flex\";\n if (variant === \"fill\") return \"flex w-full [&>[role=tab]]:flex-1\";\n\n if (!fullWidth) return \"inline-flex\";\n\n const base = \"flex w-full [&>[role=tab]]:flex-1\";\n if (alignLeft === true) return `${base} ${alignLeftClasses.always}`;\n if (typeof alignLeft === \"string\") return `${base} ${alignLeftClasses[alignLeft]}`;\n return base;\n}\n\n/** Props for the {@link TabsList} component. */\nexport type TabsListProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {\n /** When `true` (the default), the tab list spans the full width of its container and each tab grows equally. Set to `false` for inline sizing. */\n fullWidth?: boolean;\n /**\n * Controls tab alignment within a full-width container.\n * - `false` (default): tabs spread evenly\n * - `true`: tabs left-aligned, sized to content\n * - `\"md\"` (breakpoint): spread on mobile, left-aligned at breakpoint and up\n */\n alignLeft?: boolean | Breakpoint;\n /** Explicit layout variant. `\"hug\"` sizes the list to its content; `\"fill\"` stretches it full-width with equal-width tabs. Takes precedence over `fullWidth`/`alignLeft`. */\n variant?: \"fill\" | \"hug\";\n /**\n * Drops the leading padding on the first tab so its label sits flush with the\n * list's left edge, lining it up with page content above or below the bar\n * (a heading, for instance) rather than being indented by the tab's own\n * padding. Spacing between tabs is unaffected. Pair with `alignLeft` or\n * `variant=\"hug\"`. @default false\n */\n flushLeft?: boolean;\n /**\n * Scrolls the row horizontally when the tabs don't fit, instead of letting\n * them compress. By default a tab may shrink until its label ellipsises,\n * which on a narrow viewport can truncate every label at once; here each tab\n * keeps its natural width and the overflow scrolls. The scrollbar itself is\n * hidden — the clipped tab at the edge is the affordance.\n *\n * Because the tabs are content-sized, they no longer spread to fill the row:\n * a set that does fit sits left-aligned, as with `alignLeft`.\n *\n * Horizontal orientation only: a vertical list already grows downwards.\n * @default false\n */\n scrollable?: boolean;\n};\n\n/** Container for {@link TabsTrigger} elements. Renders a sliding active-tab indicator that animates between tabs. */\nexport const TabsList = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.List>,\n TabsListProps\n>(\n (\n {\n className,\n children,\n fullWidth = true,\n alignLeft,\n variant,\n flushLeft = false,\n scrollable = false,\n ...props\n },\n ref,\n ) => {\n const innerRef = React.useRef<HTMLDivElement>(null);\n const indicatorRef = React.useRef<HTMLSpanElement>(null);\n\n React.useImperativeHandle(ref, () => innerRef.current as HTMLDivElement);\n\n const updateIndicator = React.useCallback(() => {\n const list = innerRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n\n const activeTab = list.querySelector<HTMLElement>('[data-state=\"active\"]');\n if (!activeTab) {\n indicator.style.opacity = \"0\";\n return;\n }\n\n const isVertical = list.dataset.orientation === \"vertical\";\n\n indicator.style.opacity = \"1\";\n\n if (isVertical) {\n indicator.style.background =\n \"linear-gradient(180deg, var(--color-buttons-tertiary-default) 0%, var(--color-tab-active) 50%, var(--color-buttons-tertiary-default) 100%)\";\n indicator.style.inset = `0 -1px auto auto`;\n indicator.style.width = \"1px\";\n indicator.style.height = `${activeTab.offsetHeight}px`;\n indicator.style.transform = `translateY(${activeTab.offsetTop}px)`;\n } else {\n indicator.style.background =\n \"linear-gradient(90deg, var(--color-buttons-tertiary-default) 0%, var(--color-tab-active) 50%, var(--color-buttons-tertiary-default) 100%)\";\n indicator.style.inset = \"auto auto 0 0\";\n indicator.style.height = \"1px\";\n indicator.style.width = `${activeTab.offsetWidth}px`;\n indicator.style.transform = `translateX(${activeTab.offsetLeft}px)`;\n }\n }, []);\n\n // Radix scrolls a tab into view when it takes focus, and mount is not focus, so\n // URL-driven state can land on a tab that is off to the right with nothing on\n // screen to say so: no indicator, and tab one showing as though it were active.\n // Assigns `scrollLeft` rather than calling `scrollIntoView`, which would also\n // scroll every ancestor and the page with it. Only ever scrolls further right, so\n // re-running it after the webfont settles corrects a short initial scroll without\n // yanking the row back from wherever the user has since dragged it.\n const revealActiveTab = React.useCallback(() => {\n const list = innerRef.current;\n if (!list || !scrollable || list.dataset.orientation === \"vertical\") return;\n const activeTab = list.querySelector<HTMLElement>('[data-state=\"active\"]');\n if (!activeTab) return;\n const overshoot = activeTab.offsetLeft + activeTab.offsetWidth - list.clientWidth;\n if (overshoot > list.scrollLeft) list.scrollLeft = overshoot;\n }, [scrollable]);\n\n React.useLayoutEffect(() => {\n const list = innerRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n\n indicator.style.transitionDuration = \"0s\";\n updateIndicator();\n indicator.getBoundingClientRect();\n indicator.style.transitionDuration = \"\";\n revealActiveTab();\n\n const mutationObserver = new MutationObserver(updateIndicator);\n mutationObserver.observe(list, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n childList: true,\n subtree: true,\n });\n\n const resizeObserver = new ResizeObserver(updateIndicator);\n resizeObserver.observe(list);\n\n let cancelled = false;\n if (document.fonts?.status !== \"loaded\") {\n document.fonts?.ready.then(() => {\n if (cancelled) return;\n updateIndicator();\n // The tabs are wider once the real font is in, so the mount-time scroll can\n // fall short of the active tab. Recomputed here against the settled layout.\n revealActiveTab();\n });\n }\n\n return () => {\n cancelled = true;\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [updateIndicator, revealActiveTab]);\n\n return (\n <TabsPrimitive.List\n ref={innerRef}\n className={cn(\n // `isolate` scopes the active indicator's `z-10` to a local stacking\n // context. Without it, `relative` alone creates no stacking context, so\n // the indicator escapes and paints above page chrome (e.g. the header).\n \"relative isolate\",\n getLayoutClass(variant, fullWidth, alignLeft),\n // Horizontal only: in the vertical orientation the leading padding is\n // the row's left inset, not a label offset, so zeroing it would pull\n // the first label out of line with the others.\n flushLeft && \"data-[orientation=horizontal]:[&>[role=tab]:first-child]:pl-0\",\n // `flex-none` is what stops the tabs compressing — without it they\n // share the row and never overflow, so there is nothing to scroll.\n // The scrollbar is hidden in both engines: Firefox reads\n // `scrollbar-width`, WebKit and Blink the pseudo-element.\n scrollable &&\n \"data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:[scrollbar-width:none] data-[orientation=horizontal]:[&::-webkit-scrollbar]:hidden data-[orientation=horizontal]:[&>[role=tab]]:flex-none\",\n \"data-[orientation=horizontal]:items-center data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--color-border-primary)]\",\n \"data-[orientation=vertical]:flex-col data-[orientation=vertical]:shadow-[inset_-1px_0_0_0_var(--color-border-primary)]\",\n className,\n )}\n {...props}\n >\n {children}\n <span\n ref={indicatorRef}\n aria-hidden\n className=\"pointer-events-none absolute z-10 rounded-full motion-safe:transition-[transform,width,height] motion-safe:duration-200 motion-safe:ease-in-out\"\n style={{ opacity: 0 }}\n />\n </TabsPrimitive.List>\n );\n },\n);\n\nTabsList.displayName = \"TabsList\";\n"],"names":["React","jsxs","TabsPrimitive","cn","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,mBAA0D;AAAA,EAC9D,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,SAAS,eACP,SACA,WACA,WACQ;AACR,MAAI,YAAY,MAAO,QAAO;AAC9B,MAAI,YAAY,OAAQ,QAAO;AAE/B,MAAI,CAAC,UAAW,QAAO;AAEvB,QAAM,OAAO;AACb,MAAI,cAAc,KAAM,QAAO,GAAG,IAAI,IAAI,iBAAiB,MAAM;AACjE,MAAI,OAAO,cAAc,SAAU,QAAO,GAAG,IAAI,IAAI,iBAAiB,SAAS,CAAC;AAChF,SAAO;AACT;AAwCO,MAAM,WAAWA,iBAAM;AAAA,EAI5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,WAAWA,iBAAM,OAAuB,IAAI;AAClD,UAAM,eAAeA,iBAAM,OAAwB,IAAI;AAEvDA,qBAAM,oBAAoB,KAAK,MAAM,SAAS,OAAyB;AAEvE,UAAM,kBAAkBA,iBAAM,YAAY,MAAM;AAC9C,YAAM,OAAO,SAAS;AACtB,YAAM,YAAY,aAAa;AAC/B,UAAI,CAAC,QAAQ,CAAC,UAAW;AAEzB,YAAM,YAAY,KAAK,c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,QACX,SAAS;AAAA,MAAA,CACV;AAED,YAAM,iBAAiB,IAAI,eAAe,eAAe;AACzD,qBAAe,QAAQ,IAAI;AAE3B,UAAI,YAAY;AAChB,UAAI,SAAS,OAAO,WAAW,UAAU;AACvC,iBAAS,OAAO,MAAM,KAAK,MAAM;AAC/B,cAAI,UAAW;AACf,0BAAA;AAGA,0BAAA;AAAA,QACF,CAAC;AAAA,MACH;AAEA,aAAO,MAAM;AACX,oBAAY;AACZ,yBAAiB,WAAA;AACjB,uBAAe,WAAA;AAAA,MACjB;AAAA,IACF,GAAG,CAAC,iBAAiB,eAAe,CAAC;AAErC,WACEC,2BAAAA;AAAAA,MAACC,yBAAc;AAAA,MAAd;AAAA,QACC,KAAK;AAAA,QACL,WAAWC,GAAAA;AAAAA;AAAAA;AAAAA;AAAAA,UAIT;AAAA,UACA,eAAe,SAAS,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA,UAI5C,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,UAKb,cACE;AAAA,UACF;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UACDC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAK;AAAA,cACL,eAAW;AAAA,cACX,WAAU;AAAA,cACV,OAAO,EAAE,SAAS,EAAA;AAAA,YAAE;AAAA,UAAA;AAAA,QACtB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,SAAS,cAAc;;"}
1
+ {"version":3,"file":"TabsList.cjs","sources":["../../../../src/components/Tabs/TabsList.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Breakpoint values for responsive props. */\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n/** Visual style of a {@link TabsList}. */\nexport type TabsListAppearance = \"underline\" | \"pill\";\n\n/** Height in pixels of each tab in a pill {@link TabsList}. */\nexport type TabsListPillSize = \"32\" | \"36\";\n\nexport const TabsAppearanceContext = React.createContext<{\n appearance: TabsListAppearance;\n size: TabsListPillSize;\n}>({ appearance: \"underline\", size: \"32\" });\n\ntype TabBox = { left: number; top: number; width: number; height: number };\n\nconst PILL_EASE = \"cubic-bezier(0.22, 1, 0.36, 1)\";\nconst PILL_STEP_MS = 360;\nconst PILL_STEP_MS_TOUCH = 200;\nconst PILL_EXTRA_STEP_MS = 220;\nconst PILL_MAX_MS = 1000;\n/** Share of a slide by which the eased pill has covered 80% of the way, so the label recolours under it. */\nconst PILL_ARRIVAL_SHARE = 0.27;\n\nfunction pillStepMs(canHover: boolean) {\n return canHover ? PILL_STEP_MS : PILL_STEP_MS_TOUCH;\n}\n\nfunction pillSlideMs(distance: number, canHover: boolean) {\n if (!canHover) return PILL_STEP_MS_TOUCH;\n return Math.min(PILL_STEP_MS + Math.max(distance - 1, 0) * PILL_EXTRA_STEP_MS, PILL_MAX_MS);\n}\n\nconst prefersReducedMotion = () =>\n window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches ?? false;\n\nfunction pillTarget(list: HTMLElement, hovered: HTMLElement | null, activeTab: HTMLElement) {\n return (\n list.querySelector<HTMLElement>('[role=\"tab\"][aria-expanded=\"true\"]') ??\n (hovered?.isConnected ? hovered : activeTab)\n );\n}\n\nfunction measureTabs(list: HTMLElement, observer: ResizeObserver | null) {\n const boxes = new Map<Element, TabBox>();\n const order = new Map<Element, number>();\n for (const tab of list.querySelectorAll<HTMLElement>('[role=\"tab\"]')) {\n observer?.observe(tab);\n order.set(tab, order.size);\n boxes.set(tab, {\n left: tab.offsetLeft,\n top: tab.offsetTop,\n width: tab.offsetWidth,\n height: tab.offsetHeight,\n });\n }\n return { boxes, order };\n}\n\nfunction slideFromPrevious(\n list: HTMLElement,\n previous: Map<Element, TabBox>,\n next: Map<Element, TabBox>,\n durationMs: number,\n) {\n const moved: HTMLElement[] = [];\n for (const [tab, box] of next) {\n const before = previous.get(tab);\n if (!before || before.left === box.left || !(tab instanceof HTMLElement)) continue;\n tab.style.transition = \"none\";\n tab.style.transform = `translateX(${before.left - box.left}px)`;\n moved.push(tab);\n }\n if (moved.length === 0) return;\n list.getBoundingClientRect();\n for (const tab of moved) {\n tab.style.transition = `transform ${durationMs}ms var(--pill-ease)`;\n tab.style.transform = \"\";\n const settle = (event: TransitionEvent) => {\n if (event.propertyName !== \"transform\") return;\n tab.style.transition = \"\";\n tab.removeEventListener(\"transitionend\", settle);\n };\n tab.addEventListener(\"transitionend\", settle);\n }\n}\n\nconst alignLeftClasses: Record<Breakpoint | \"always\", string> = {\n always: \"[&>[role=tab]]:flex-initial\",\n sm: \"[&>[role=tab]]:sm:flex-initial\",\n md: \"[&>[role=tab]]:md:flex-initial\",\n lg: \"[&>[role=tab]]:lg:flex-initial\",\n xl: \"[&>[role=tab]]:xl:flex-initial\",\n};\n\nfunction getLayoutClass(\n variant: \"fill\" | \"hug\" | undefined,\n fullWidth: boolean,\n alignLeft?: boolean | Breakpoint,\n): string {\n if (variant === \"hug\") return \"inline-flex\";\n if (variant === \"fill\") return \"flex w-full [&>[role=tab]]:flex-1\";\n\n if (!fullWidth) return \"inline-flex\";\n\n const base = \"flex w-full [&>[role=tab]]:flex-1\";\n if (alignLeft === true) return `${base} ${alignLeftClasses.always}`;\n if (typeof alignLeft === \"string\") return `${base} ${alignLeftClasses[alignLeft]}`;\n return base;\n}\n\n/** Props for the {@link TabsList} component. */\nexport type TabsListProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {\n /** When `true` (the default), the tab list spans the full width of its container and each tab grows equally. Set to `false` for inline sizing. */\n fullWidth?: boolean;\n /**\n * Controls tab alignment within a full-width container.\n * - `false` (default): tabs spread evenly\n * - `true`: tabs left-aligned, sized to content\n * - `\"md\"` (breakpoint): spread on mobile, left-aligned at breakpoint and up\n */\n alignLeft?: boolean | Breakpoint;\n /** Explicit layout variant. `\"hug\"` sizes the list to its content; `\"fill\"` stretches it full-width with equal-width tabs. Takes precedence over `fullWidth`/`alignLeft`. */\n variant?: \"fill\" | \"hug\";\n /**\n * Drops the leading padding on the first tab so its label sits flush with the\n * list's left edge, lining it up with page content above or below the bar\n * (a heading, for instance) rather than being indented by the tab's own\n * padding. Spacing between tabs is unaffected. Pair with `alignLeft` or\n * `variant=\"hug\"`. @default false\n */\n flushLeft?: boolean;\n /**\n * Scrolls the row horizontally when the tabs don't fit, instead of letting\n * them compress. By default a tab may shrink until its label ellipsises,\n * which on a narrow viewport can truncate every label at once; here each tab\n * keeps its natural width and the overflow scrolls. The scrollbar itself is\n * hidden — the clipped tab at the edge is the affordance.\n *\n * Because the tabs are content-sized, they no longer spread to fill the row:\n * a set that does fit sits left-aligned, as with `alignLeft`.\n *\n * Horizontal orientation only: a vertical list already grows downwards.\n * @default false\n */\n scrollable?: boolean;\n /**\n * `\"underline\"` marks the active tab with a line under the row. `\"pill\"` sits\n * the tabs in a rounded track, sized to its tabs, and slides a filled pill\n * behind the active one. A pill list is horizontal and ignores `fullWidth`,\n * `alignLeft`, `variant` and `flushLeft`; it scrolls when it doesn't fit.\n * @default \"underline\"\n */\n appearance?: TabsListAppearance;\n /** Height of each tab in a pill list. Ignored by the underline appearance. @default \"32\" */\n size?: TabsListPillSize;\n /**\n * Pill only: the pill follows the mouse across the tabs and settles back on the\n * selected one when the pointer leaves. Mouse only, and off when the user prefers\n * reduced motion. @default false\n */\n followHover?: boolean;\n};\n\n/** Container for {@link TabsTrigger} elements. Renders a sliding active-tab indicator that animates between tabs. */\nexport const TabsList = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.List>,\n TabsListProps\n>(\n (\n {\n className,\n children,\n fullWidth = true,\n alignLeft,\n variant,\n flushLeft = false,\n scrollable = false,\n appearance = \"underline\",\n size = \"32\",\n followHover = false,\n onPointerOver,\n onPointerLeave,\n style,\n ...props\n },\n ref,\n ) => {\n const innerRef = React.useRef<HTMLDivElement>(null);\n const indicatorRef = React.useRef<HTMLSpanElement>(null);\n\n React.useImperativeHandle(ref, () => innerRef.current as HTMLDivElement);\n\n const tabBoxes = React.useRef(new Map<Element, TabBox>());\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n const listWidth = React.useRef<number | null>(null);\n const hoveredTab = React.useRef<HTMLElement | null>(null);\n const pillTab = React.useRef<HTMLElement | null>(null);\n const tabOrder = React.useRef(new Map<Element, number>());\n const canHover = React.useRef(false);\n\n const placePill = React.useCallback((tab: HTMLElement) => {\n const list = innerRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n const box = tabBoxes.current.get(tab);\n if (!box) return;\n const from = pillTab.current;\n pillTab.current = tab;\n const distance =\n from && from !== tab\n ? Math.abs((tabOrder.current.get(tab) ?? 0) - (tabOrder.current.get(from) ?? 0))\n : 0;\n const slideMs = pillSlideMs(distance, canHover.current);\n list.style.setProperty(\"--pill-slide\", `${slideMs}ms`);\n list.style.setProperty(\"--pill-arrive\", `${Math.round(slideMs * PILL_ARRIVAL_SHARE)}ms`);\n indicator.style.width = `${box.width}px`;\n indicator.style.height = `${box.height}px`;\n indicator.style.transform = `translate(${box.left}px, ${box.top}px)`;\n for (const marked of list.querySelectorAll(\"[data-pill]\")) {\n if (marked !== tab) marked.removeAttribute(\"data-pill\");\n }\n tab.setAttribute(\"data-pill\", \"\");\n }, []);\n\n const layoutPill = React.useCallback(\n (list: HTMLElement, indicator: HTMLElement, activeTab: HTMLElement) => {\n indicator.style.background = \"var(--color-content-primary)\";\n indicator.style.inset = \"0 auto auto 0\";\n const previous = tabBoxes.current;\n const rowResized = listWidth.current !== null && listWidth.current !== list.offsetWidth;\n listWidth.current = list.offsetWidth;\n const { boxes, order } = measureTabs(list, resizeObserverRef.current);\n tabBoxes.current = boxes;\n tabOrder.current = order;\n if (!rowResized && previous.size > 0 && !prefersReducedMotion()) {\n slideFromPrevious(list, previous, boxes, pillStepMs(canHover.current));\n }\n placePill(pillTarget(list, hoveredTab.current, activeTab));\n },\n [placePill],\n );\n\n const updateIndicator = React.useCallback(() => {\n const list = innerRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n\n const activeTab = list.querySelector<HTMLElement>('[data-state=\"active\"]');\n if (!activeTab) {\n indicator.style.opacity = \"0\";\n list.querySelector(\"[data-pill]\")?.removeAttribute(\"data-pill\");\n return;\n }\n\n const isVertical = list.dataset.orientation === \"vertical\";\n\n indicator.style.opacity = \"1\";\n\n if (appearance === \"pill\") {\n layoutPill(list, indicator, activeTab);\n } else if (isVertical) {\n indicator.style.background =\n \"linear-gradient(180deg, var(--color-buttons-tertiary-default) 0%, var(--color-tab-active) 50%, var(--color-buttons-tertiary-default) 100%)\";\n indicator.style.inset = `0 -1px auto auto`;\n indicator.style.width = \"1px\";\n indicator.style.height = `${activeTab.offsetHeight}px`;\n indicator.style.transform = `translateY(${activeTab.offsetTop}px)`;\n } else {\n indicator.style.background =\n \"linear-gradient(90deg, var(--color-buttons-tertiary-default) 0%, var(--color-tab-active) 50%, var(--color-buttons-tertiary-default) 100%)\";\n indicator.style.inset = \"auto auto 0 0\";\n indicator.style.height = \"1px\";\n indicator.style.width = `${activeTab.offsetWidth}px`;\n indicator.style.transform = `translateX(${activeTab.offsetLeft}px)`;\n }\n }, [appearance, layoutPill]);\n\n const followsHover = appearance === \"pill\" && followHover;\n\n const handlePointerOver = (event: React.PointerEvent<HTMLDivElement>) => {\n onPointerOver?.(event);\n if (!followsHover || event.pointerType !== \"mouse\") return;\n if (prefersReducedMotion()) return;\n const tab = (event.target as Element).closest<HTMLElement>('[role=\"tab\"]');\n if (!tab || tab === hoveredTab.current || !event.currentTarget.contains(tab)) return;\n hoveredTab.current = tab;\n placePill(pillTarget(event.currentTarget, tab, tab));\n };\n\n const handlePointerLeave = (event: React.PointerEvent<HTMLDivElement>) => {\n onPointerLeave?.(event);\n if (!hoveredTab.current) return;\n hoveredTab.current = null;\n const list = innerRef.current;\n const activeTab = list?.querySelector<HTMLElement>('[data-state=\"active\"]');\n if (list && activeTab) placePill(pillTarget(list, null, activeTab));\n };\n\n // Radix scrolls a tab into view when it takes focus, and mount is not focus, so\n // URL-driven state can land on a tab that is off to the right with nothing on\n // screen to say so: no indicator, and tab one showing as though it were active.\n // Assigns `scrollLeft` rather than calling `scrollIntoView`, which would also\n // scroll every ancestor and the page with it. Only ever scrolls further right, so\n // re-running it after the webfont settles corrects a short initial scroll without\n // yanking the row back from wherever the user has since dragged it.\n const revealActiveTab = React.useCallback(() => {\n const list = innerRef.current;\n const scrolls = scrollable || appearance === \"pill\";\n if (!list || !scrolls || list.dataset.orientation === \"vertical\") return;\n const activeTab = list.querySelector<HTMLElement>('[data-state=\"active\"]');\n if (!activeTab) return;\n const overshoot = activeTab.offsetLeft + activeTab.offsetWidth - list.clientWidth;\n if (overshoot > list.scrollLeft) list.scrollLeft = overshoot;\n }, [scrollable, appearance]);\n\n React.useLayoutEffect(() => {\n const list = innerRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n\n canHover.current = window.matchMedia?.(\"(hover: hover)\").matches ?? false;\n\n const resizeObserver = new ResizeObserver(updateIndicator);\n resizeObserver.observe(list);\n resizeObserverRef.current = resizeObserver;\n\n indicator.style.transitionDuration = \"0s\";\n updateIndicator();\n indicator.getBoundingClientRect();\n indicator.style.transitionDuration = \"\";\n revealActiveTab();\n\n const mutationObserver = new MutationObserver(updateIndicator);\n mutationObserver.observe(list, {\n attributes: true,\n attributeFilter: [\"data-state\", \"aria-expanded\"],\n childList: true,\n subtree: true,\n });\n\n let cancelled = false;\n if (document.fonts?.status !== \"loaded\") {\n document.fonts?.ready.then(() => {\n if (cancelled) return;\n updateIndicator();\n // The tabs are wider once the real font is in, so the mount-time scroll can\n // fall short of the active tab. Recomputed here against the settled layout.\n revealActiveTab();\n });\n }\n\n return () => {\n cancelled = true;\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n resizeObserverRef.current = null;\n };\n }, [updateIndicator, revealActiveTab]);\n\n const isPill = appearance === \"pill\";\n const listStyle: React.CSSProperties & { \"--pill-ease\"?: string } = isPill\n ? { \"--pill-ease\": PILL_EASE, ...style }\n : { ...style };\n\n return (\n <TabsAppearanceContext.Provider value={{ appearance, size }}>\n <TabsPrimitive.List\n ref={innerRef}\n onPointerOver={handlePointerOver}\n onPointerLeave={handlePointerLeave}\n style={listStyle}\n className={cn(\n // `isolate` scopes the active indicator's `z-10` to a local stacking\n // context. Without it, `relative` alone creates no stacking context, so\n // the indicator escapes and paints above page chrome (e.g. the header).\n \"relative isolate\",\n isPill\n ? \"inline-flex w-fit max-w-full items-center gap-1 overflow-x-auto rounded-full bg-background-secondary p-1 shadow-md [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\"\n : [\n getLayoutClass(variant, fullWidth, alignLeft),\n // Horizontal only: in the vertical orientation the leading padding is\n // the row's left inset, not a label offset, so zeroing it would pull\n // the first label out of line with the others.\n flushLeft && \"data-[orientation=horizontal]:[&>[role=tab]:first-child]:pl-0\",\n // `flex-none` is what stops the tabs compressing — without it they\n // share the row and never overflow, so there is nothing to scroll.\n // The scrollbar is hidden in both engines: Firefox reads\n // `scrollbar-width`, WebKit and Blink the pseudo-element.\n scrollable &&\n \"data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:[scrollbar-width:none] data-[orientation=horizontal]:[&::-webkit-scrollbar]:hidden data-[orientation=horizontal]:[&>[role=tab]]:flex-none\",\n \"data-[orientation=horizontal]:items-center data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--color-border-primary)]\",\n \"data-[orientation=vertical]:flex-col data-[orientation=vertical]:shadow-[inset_-1px_0_0_0_var(--color-border-primary)]\",\n ],\n className,\n )}\n {...props}\n >\n {children}\n <span\n ref={indicatorRef}\n aria-hidden\n className={cn(\n \"pointer-events-none absolute rounded-full motion-safe:transition-[transform,width,height]\",\n isPill\n ? \"z-5 motion-safe:duration-(--pill-slide) motion-safe:ease-(--pill-ease)\"\n : \"z-10 motion-safe:duration-200 motion-safe:ease-in-out\",\n )}\n style={{ opacity: 0 }}\n />\n </TabsPrimitive.List>\n </TabsAppearanceContext.Provider>\n );\n },\n);\n\nTabsList.displayName = \"TabsList\";\n"],"names":["React","jsx","jsxs","TabsPrimitive","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAaO,MAAM,wBAAwBA,iBAAM,cAGxC,EAAE,YAAY,aAAa,MAAM,MAAM;AAI1C,MAAM,YAAY;AAClB,MAAM,eAAe;AACrB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,cAAc;AAEpB,MAAM,qBAAqB;AAE3B,SAAS,WAAW,UAAmB;AACrC,SAAO,WAAW,eAAe;AACnC;AAEA,SAAS,YAAY,UAAkB,UAAmB;AACxD,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO,KAAK,IAAI,eAAe,KAAK,IAAI,WAAW,GAAG,CAAC,IAAI,oBAAoB,WAAW;AAC5F;AAEA,MAAM,uBAAuB,MAC3B,OAAO,aAAa,kCAAkC,EAAE,WAAW;AAErE,SAAS,WAAW,MAAmB,SAA6B,WAAwB;AAC1F,SACE,KAAK,cAA2B,oCAAoC,MACnE,SAAS,cAAc,UAAU;AAEtC;AAEA,SAAS,YAAY,MAAmB,UAAiC;AACvE,QAAM,4BAAY,IAAA;AAClB,QAAM,4BAAY,IAAA;AAClB,aAAW,OAAO,KAAK,iBAA8B,cAAc,GAAG;AACpE,cAAU,QAAQ,GAAG;AACrB,UAAM,IAAI,KAAK,MAAM,IAAI;AACzB,UAAM,IAAI,KAAK;AAAA,MACb,MAAM,IAAI;AAAA,MACV,KAAK,IAAI;AAAA,MACT,OAAO,IAAI;AAAA,MACX,QAAQ,IAAI;AAAA,IAAA,CACb;AAAA,EACH;AACA,SAAO,EAAE,OAAO,MAAA;AAClB;AAEA,SAAS,kBACP,MACA,UACA,MACA,YACA;AACA,QAAM,QAAuB,CAAA;AAC7B,aAAW,CAAC,KAAK,GAAG,KAAK,MAAM;AAC7B,UAAM,SAAS,SAAS,IAAI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ACA;AAAA,UAAA;AAAA,UAEN;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UACDH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAK;AAAA,cACL,eAAW;AAAA,cACX,WAAWG,GAAAA;AAAAA,gBACT;AAAA,gBACA,SACI,2EACA;AAAA,cAAA;AAAA,cAEN,OAAO,EAAE,SAAS,EAAA;AAAA,YAAE;AAAA,UAAA;AAAA,QACtB;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;;;"}
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const React = require("react");
6
+ const cn = require("../../utils/cn.cjs");
7
+ const DropdownMenuItem = require("../DropdownMenu/DropdownMenuItem.cjs");
8
+ const DropdownMenuRoot = require("../DropdownMenu/DropdownMenuRoot.cjs");
9
+ const ChevronDownIcon = require("../Icons/ChevronDownIcon.cjs");
10
+ const Tabs = require("./Tabs.cjs");
11
+ const TabsTrigger = require("./TabsTrigger.cjs");
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== "default") {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
29
+ const OPEN_KEYS = /* @__PURE__ */ new Set(["Enter", " ", "ArrowDown"]);
30
+ const TabsOverflowItem = React__namespace.forwardRef(
31
+ ({ value, ...props }, ref) => {
32
+ const selection = React__namespace.useContext(Tabs.TabsValueContext);
33
+ const isActive = selection.value === value;
34
+ return /* @__PURE__ */ jsxRuntime.jsx(
35
+ DropdownMenuItem.DropdownMenuItem,
36
+ {
37
+ ref,
38
+ role: "menuitemradio",
39
+ "aria-checked": isActive,
40
+ selected: isActive,
41
+ onSelect: () => selection.select(value),
42
+ ...props
43
+ }
44
+ );
45
+ }
46
+ );
47
+ TabsOverflowItem.displayName = "TabsOverflowItem";
48
+ const TabsOverflow = React__namespace.forwardRef(
49
+ ({ children, ...props }, ref) => {
50
+ const items = React__namespace.Children.toArray(children).filter(
51
+ (child) => React__namespace.isValidElement(child)
52
+ );
53
+ if (items.length === 0) return null;
54
+ return /* @__PURE__ */ jsxRuntime.jsx(OverflowMenu, { ref, items, ...props, children });
55
+ }
56
+ );
57
+ TabsOverflow.displayName = "TabsOverflow";
58
+ const OverflowMenu = React__namespace.forwardRef(({ items, label, children, className, onKeyDown, onMouseDown, ...props }, ref) => {
59
+ const { value } = React__namespace.useContext(Tabs.TabsValueContext);
60
+ const [open, setOpen] = React__namespace.useState(false);
61
+ const lastInput = React__namespace.useRef("keyboard");
62
+ const activeItem = items.find((item) => item.props.value === value);
63
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuRoot.DropdownMenu, { open, onOpenChange: setOpen, children: [
64
+ /* @__PURE__ */ jsxRuntime.jsx(
65
+ TabsTrigger.TabsTrigger,
66
+ {
67
+ ref,
68
+ asChild: true,
69
+ value: activeItem ? activeItem.props.value : Tabs.OVERFLOW_TAB_VALUE,
70
+ ...!activeItem && { "aria-controls": void 0 },
71
+ className,
72
+ onMouseDown: (event) => {
73
+ onMouseDown?.(event);
74
+ event.preventDefault();
75
+ },
76
+ onKeyDown: (event) => {
77
+ onKeyDown?.(event);
78
+ if (event.defaultPrevented) return;
79
+ if (OPEN_KEYS.has(event.key)) {
80
+ lastInput.current = "keyboard";
81
+ event.preventDefault();
82
+ setOpen(true);
83
+ }
84
+ },
85
+ ...props,
86
+ children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRoot.DropdownMenuTrigger, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
87
+ activeItem ? activeItem.props.children : label,
88
+ /* @__PURE__ */ jsxRuntime.jsx(
89
+ ChevronDownIcon.ChevronDownIcon,
90
+ {
91
+ size: 16,
92
+ className: cn.cn("motion-safe:transition-transform", open && "rotate-180")
93
+ }
94
+ )
95
+ ] }) })
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsxRuntime.jsx(
99
+ DropdownMenuRoot.DropdownMenuContent,
100
+ {
101
+ align: "end",
102
+ "aria-label": typeof label === "string" ? label : void 0,
103
+ onPointerDownCapture: () => {
104
+ lastInput.current = "pointer";
105
+ },
106
+ onKeyDownCapture: () => {
107
+ lastInput.current = "keyboard";
108
+ },
109
+ onPointerDownOutside: () => {
110
+ lastInput.current = "pointer";
111
+ },
112
+ onCloseAutoFocus: (event) => {
113
+ if (lastInput.current === "pointer") event.preventDefault();
114
+ },
115
+ children
116
+ }
117
+ )
118
+ ] });
119
+ });
120
+ OverflowMenu.displayName = "OverflowMenu";
121
+ exports.TabsOverflow = TabsOverflow;
122
+ exports.TabsOverflowItem = TabsOverflowItem;
123
+ //# sourceMappingURL=TabsOverflow.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabsOverflow.cjs","sources":["../../../../src/components/Tabs/TabsOverflow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { DropdownMenuItem, type DropdownMenuItemProps } from \"../DropdownMenu/DropdownMenuItem\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"../DropdownMenu/DropdownMenuRoot\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { OVERFLOW_TAB_VALUE, TabsValueContext } from \"./Tabs\";\nimport { TabsTrigger, type TabsTriggerProps } from \"./TabsTrigger\";\n\nconst OPEN_KEYS = new Set([\"Enter\", \" \", \"ArrowDown\"]);\n\n/** Props for the {@link TabsOverflow} component. */\nexport interface TabsOverflowProps\n extends Omit<TabsTriggerProps, \"value\" | \"children\" | \"asChild\"> {\n /** Text shown on the tab while none of its items is active, e.g. \"More\". */\n label: React.ReactNode;\n /** {@link TabsOverflowItem} elements, one per tab that doesn't fit the row. */\n children?: React.ReactNode;\n}\n\n/** Props for the {@link TabsOverflowItem} component. */\nexport type TabsOverflowItemProps = Omit<DropdownMenuItemProps, \"selected\" | \"onSelect\"> & {\n /** The tab's value, as on a {@link TabsTrigger}. */\n value: string;\n};\n\n/**\n * A tab listed in a {@link TabsOverflow} menu. The active one takes the menu's\n * selected style and is announced as the checked option.\n */\nexport const TabsOverflowItem = React.forwardRef<HTMLDivElement, TabsOverflowItemProps>(\n ({ value, ...props }, ref) => {\n const selection = React.useContext(TabsValueContext);\n const isActive = selection.value === value;\n return (\n <DropdownMenuItem\n ref={ref}\n role=\"menuitemradio\"\n aria-checked={isActive}\n selected={isActive}\n onSelect={() => selection.select(value)}\n {...props}\n />\n );\n },\n);\n\nTabsOverflowItem.displayName = \"TabsOverflowItem\";\n\n/**\n * The last tab in a {@link TabsList}, opening a menu of the tabs that don't fit\n * the row. It sits in the row's arrow-key order, opens with click, Enter, Space\n * or ArrowDown, and never selects anything itself. While one of its items is\n * active it shows that item's label and is the selected tab.\n *\n * Reads and sets the value of the surrounding {@link Tabs}, controlled or not.\n * Renders nothing when it has no items.\n *\n * @example\n * ```tsx\n * <Tabs value={tab} onValueChange={setTab}>\n * <TabsList appearance=\"pill\">\n * <TabsTrigger value=\"all\">All</TabsTrigger>\n * <TabsOverflow label=\"More\">\n * <TabsOverflowItem value=\"tips\">Tips</TabsOverflowItem>\n * </TabsOverflow>\n * </TabsList>\n * </Tabs>\n * ```\n */\nexport const TabsOverflow = React.forwardRef<HTMLButtonElement, TabsOverflowProps>(\n ({ children, ...props }, ref) => {\n const items = React.Children.toArray(children).filter(\n (child): child is React.ReactElement<TabsOverflowItemProps> => React.isValidElement(child),\n );\n if (items.length === 0) return null;\n return (\n <OverflowMenu ref={ref} items={items} {...props}>\n {children}\n </OverflowMenu>\n );\n },\n);\n\nTabsOverflow.displayName = \"TabsOverflow\";\n\nconst OverflowMenu = React.forwardRef<\n HTMLButtonElement,\n TabsOverflowProps & { items: React.ReactElement<TabsOverflowItemProps>[] }\n>(({ items, label, children, className, onKeyDown, onMouseDown, ...props }, ref) => {\n const { value } = React.useContext(TabsValueContext);\n const [open, setOpen] = React.useState(false);\n\n const lastInput = React.useRef<\"pointer\" | \"keyboard\">(\"keyboard\");\n\n const activeItem = items.find((item) => item.props.value === value);\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <TabsTrigger\n ref={ref}\n asChild\n value={activeItem ? activeItem.props.value : OVERFLOW_TAB_VALUE}\n {...(!activeItem && { \"aria-controls\": undefined })}\n className={className}\n onMouseDown={(event) => {\n onMouseDown?.(event);\n event.preventDefault();\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n if (OPEN_KEYS.has(event.key)) {\n lastInput.current = \"keyboard\";\n event.preventDefault();\n setOpen(true);\n }\n }}\n {...props}\n >\n <DropdownMenuTrigger>\n <span className=\"flex items-center gap-2\">\n {activeItem ? activeItem.props.children : label}\n <ChevronDownIcon\n size={16}\n className={cn(\"motion-safe:transition-transform\", open && \"rotate-180\")}\n />\n </span>\n </DropdownMenuTrigger>\n </TabsTrigger>\n <DropdownMenuContent\n align=\"end\"\n aria-label={typeof label === \"string\" ? label : undefined}\n onPointerDownCapture={() => {\n lastInput.current = \"pointer\";\n }}\n onKeyDownCapture={() => {\n lastInput.current = \"keyboard\";\n }}\n onPointerDownOutside={() => {\n lastInput.current = \"pointer\";\n }}\n onCloseAutoFocus={(event) => {\n if (lastInput.current === \"pointer\") event.preventDefault();\n }}\n >\n {children}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n});\n\nOverflowMenu.displayName = \"OverflowMenu\";\n"],"names":["React","TabsValueContext","jsx","Dropd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BAAkB,CAAC,UAAU;AAC3B,cAAI,UAAU,YAAY,UAAW,OAAM,eAAA;AAAA,QAC7C;AAAA,QAEC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ,CAAC;AAED,aAAa,cAAc;;;"}
@@ -5,6 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const TabsPrimitive = require("@radix-ui/react-tabs");
6
6
  const React = require("react");
7
7
  const cn = require("../../utils/cn.cjs");
8
+ const TabsList = require("./TabsList.cjs");
8
9
  function _interopNamespaceDefault(e) {
9
10
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
11
  if (e) {
@@ -24,11 +25,13 @@ function _interopNamespaceDefault(e) {
24
25
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
25
26
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
26
27
  const TabsTrigger = React__namespace.forwardRef(({ className, children, asChild, ...props }, ref) => {
27
- const label = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children });
28
+ const { appearance, size } = React__namespace.useContext(TabsList.TabsAppearanceContext);
29
+ const labelClassName = cn.cn("min-w-0 truncate", appearance === "pill" && "flex items-center gap-2");
30
+ const label = /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassName, children });
28
31
  const content = asChild && React__namespace.isValidElement(children) ? React__namespace.cloneElement(
29
32
  children,
30
33
  void 0,
31
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: children.props.children })
34
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassName, children: children.props.children })
32
35
  ) : label;
33
36
  return /* @__PURE__ */ jsxRuntime.jsx(
34
37
  TabsPrimitive__namespace.Trigger,
@@ -36,21 +39,31 @@ const TabsTrigger = React__namespace.forwardRef(({ className, children, asChild,
36
39
  ref,
37
40
  asChild,
38
41
  className: cn.cn(
39
- "inline-flex min-w-0 items-center justify-center",
40
- "typography-body-default-16px-semibold cursor-pointer",
42
+ "inline-flex min-w-0 cursor-pointer items-center justify-center",
41
43
  "motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out",
42
- "data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3",
43
- "data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3",
44
- "data-[state=active]:text-content-primary",
45
- "data-[state=inactive]:text-content-tertiary",
46
- "data-[state=active]:hover:text-content-primary/70",
47
- "data-[state=inactive]:hover:text-content-primary",
48
- "data-[state=active]:active:text-content-primary/70",
49
- "data-[state=inactive]:active:text-content-primary",
50
44
  "data-disabled:pointer-events-none",
51
- "data-disabled:data-[state=active]:text-content-tertiary",
52
- "data-disabled:data-[state=inactive]:text-neutral-alphas-200",
53
45
  "focus-visible:shadow-focus-ring focus-visible:outline-none",
46
+ appearance === "pill" ? [
47
+ "relative z-0 shrink-0 gap-2 rounded-full px-4 data-pill:z-10",
48
+ size === "36" ? "h-9" : "h-8",
49
+ "typography-body-small-14px-semibold",
50
+ "motion-safe:duration-[160ms] data-pill:motion-safe:delay-(--pill-arrive)",
51
+ "text-content-secondary data-pill:text-content-primary-inverted",
52
+ "not-data-pill:hover:text-content-primary",
53
+ "data-disabled:data-[state=inactive]:text-neutral-alphas-200"
54
+ ] : [
55
+ "typography-body-default-16px-semibold",
56
+ "data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3",
57
+ "data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3",
58
+ "data-[state=active]:text-content-primary",
59
+ "data-[state=inactive]:text-content-tertiary",
60
+ "data-[state=active]:hover:text-content-primary/70",
61
+ "data-[state=inactive]:hover:text-content-primary",
62
+ "data-[state=active]:active:text-content-primary/70",
63
+ "data-[state=inactive]:active:text-content-primary",
64
+ "data-disabled:data-[state=active]:text-content-tertiary",
65
+ "data-disabled:data-[state=inactive]:text-neutral-alphas-200"
66
+ ],
54
67
  className
55
68
  ),
56
69
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"TabsTrigger.cjs","sources":["../../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/**\n * An interactive tab that activates its associated {@link TabsContent} panel.\n *\n * Renders a `<button>` by default. Pass `asChild` to render the tab as another\n * element — e.g. a router link for navigation tabs (`<TabsTrigger asChild><Link\n * href=\"…\">…</Link></TabsTrigger>`). With `asChild` the child element becomes\n * the tab itself (receiving `role=\"tab\"` and focus management), so the tab\n * stays a single interactive control rather than nesting one inside the other.\n */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, asChild, ...props }, ref) => {\n const label = <span className=\"min-w-0 truncate\">{children}</span>;\n\n // The `min-w-0 truncate` span keeps long labels ellipsised. With `asChild`\n // the consumer's element becomes the tab, so wrap *its* children in that\n // span (rather than wrapping the element) — the tab stays a single\n // interactive control (no nested link/button) while behaviour matches the\n // default button tab.\n const content =\n asChild && React.isValidElement(children)\n ? React.cloneElement(\n children,\n undefined,\n <span className=\"min-w-0 truncate\">\n {(children.props as { children?: React.ReactNode }).children}\n </span>,\n )\n : label;\n\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n asChild={asChild}\n className={cn(\n \"inline-flex min-w-0 items-center justify-center\",\n \"typography-body-default-16px-semibold cursor-pointer\",\n \"motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out\",\n \"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3\",\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3\",\n \"data-[state=active]:text-content-primary\",\n \"data-[state=inactive]:text-content-tertiary\",\n \"data-[state=active]:hover:text-content-primary/70\",\n \"data-[state=inactive]:hover:text-content-primary\",\n \"data-[state=active]:active:text-content-primary/70\",\n \"data-[state=inactive]:active:text-content-primary\",\n \"data-disabled:pointer-events-none\",\n \"data-disabled:data-[state=active]:text-content-tertiary\",\n \"data-disabled:data-[state=inactive]:text-neutral-alphas-200\",\n \"focus-visible:shadow-focus-ring focus-visible:outline-none\",\n className,\n )}\n {...props}\n >\n {content}\n </TabsPrimitive.Trigger>\n );\n});\n\nTabsTrigger.displayName = \"TabsTrigger\";\n"],"names":["React","jsx","TabsPrimitive","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,cAAcA,iBAAM,WAG/B,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAA,GAAS,QAAQ;AACrD,QAAM,QAAQC,2BAAAA,IAAC,QAAA,EAAK,WAAU,oBAAoB,UAAS;AAO3D,QAAM,UACJ,WAAWD,iBAAM,eAAe,QAAQ,IACpCA,iBAAM;AAAA,IACJ;AAAA,IACA;AAAA,mCACC,QAAA,EAAK,WAAU,oBACZ,UAAA,SAAS,MAAyC,SAAA,CACtD;AAAA,EAAA,IAEF;AAEN,SACEC,2BAAAA;AAAAA,IAACC,yBAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAWC,GAAAA;AAAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH,UAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAED,YAAY,cAAc;;"}
1
+ {"version":3,"file":"TabsTrigger.cjs","sources":["../../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { TabsAppearanceContext } from \"./TabsList\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/**\n * An interactive tab that activates its associated {@link TabsContent} panel.\n *\n * Renders a `<button>` by default. Pass `asChild` to render the tab as another\n * element — e.g. a router link for navigation tabs (`<TabsTrigger asChild><Link\n * href=\"…\">…</Link></TabsTrigger>`). With `asChild` the child element becomes\n * the tab itself (receiving `role=\"tab\"` and focus management), so the tab\n * stays a single interactive control rather than nesting one inside the other.\n *\n * Inside a `TabsList appearance=\"pill\"` the tab takes the pill styling.\n */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, asChild, ...props }, ref) => {\n const { appearance, size } = React.useContext(TabsAppearanceContext);\n const labelClassName = cn(\"min-w-0 truncate\", appearance === \"pill\" && \"flex items-center gap-2\");\n const label = <span className={labelClassName}>{children}</span>;\n\n // The `min-w-0 truncate` span keeps long labels ellipsised. With `asChild`\n // the consumer's element becomes the tab, so wrap *its* children in that\n // span (rather than wrapping the element) — the tab stays a single\n // interactive control (no nested link/button) while behaviour matches the\n // default button tab.\n const content =\n asChild && React.isValidElement(children)\n ? React.cloneElement(\n children,\n undefined,\n <span className={labelClassName}>\n {(children.props as { children?: React.ReactNode }).children}\n </span>,\n )\n : label;\n\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n asChild={asChild}\n className={cn(\n \"inline-flex min-w-0 cursor-pointer items-center justify-center\",\n \"motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out\",\n \"data-disabled:pointer-events-none\",\n \"focus-visible:shadow-focus-ring focus-visible:outline-none\",\n appearance === \"pill\"\n ? [\n \"relative z-0 shrink-0 gap-2 rounded-full px-4 data-pill:z-10\",\n size === \"36\" ? \"h-9\" : \"h-8\",\n \"typography-body-small-14px-semibold\",\n \"motion-safe:duration-[160ms] data-pill:motion-safe:delay-(--pill-arrive)\",\n \"text-content-secondary data-pill:text-content-primary-inverted\",\n \"not-data-pill:hover:text-content-primary\",\n \"data-disabled:data-[state=inactive]:text-neutral-alphas-200\",\n ]\n : [\n \"typography-body-default-16px-semibold\",\n \"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3\",\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3\",\n \"data-[state=active]:text-content-primary\",\n \"data-[state=inactive]:text-content-tertiary\",\n \"data-[state=active]:hover:text-content-primary/70\",\n \"data-[state=inactive]:hover:text-content-primary\",\n \"data-[state=active]:active:text-content-primary/70\",\n \"data-[state=inactive]:active:text-content-primary\",\n \"data-disabled:data-[state=active]:text-content-tertiary\",\n \"data-disabled:data-[state=inactive]:text-neutral-alphas-200\",\n ],\n className,\n )}\n {...props}\n >\n {content}\n </TabsPrimitive.Trigger>\n );\n});\n\nTabsTrigger.displayName = \"TabsTrigger\";\n"],"names":["React","TabsAppearanceContext","cn","jsx","TabsPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,cAAcA,iBAAM,WAG/B,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAA,GAAS,QAAQ;AACrD,QAAM,EAAE,YAAY,KAAA,IAASA,iBAAM,WAAWC,SAAAA,qBAAqB;AACnE,QAAM,iBAAiBC,GAAAA,GAAG,oBAAoB,eAAe,UAAU,yBAAyB;AAChG,QAAM,QAAQC,2BAAAA,IAAC,QAAA,EAAK,WAAW,gBAAiB,UAAS;AAOzD,QAAM,UACJ,WAAWH,iBAAM,eAAe,QAAQ,IACpCA,iBAAM;AAAA,IACJ;AAAA,IACA;AAAA,mCACC,QAAA,EAAK,WAAW,gBACb,UAAA,SAAS,MAAyC,SAAA,CACtD;AAAA,EAAA,IAEF;AAEN,SACEG,2BAAAA;AAAAA,IAACC,yBAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAWF,GAAAA;AAAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe,SACX;AAAA,UACE;AAAA,UACA,SAAS,OAAO,QAAQ;AAAA,UACxB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,IAEF;AAAA,UACE;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAEN;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH,UAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAED,YAAY,cAAc;;"}
@@ -86,6 +86,7 @@ const CloseIcon = require("./components/Icons/CloseIcon.cjs");
86
86
  const CodeIcon = require("./components/Icons/CodeIcon.cjs");
87
87
  const CogIcon = require("./components/Icons/CogIcon.cjs");
88
88
  const CoinIcon = require("./components/Icons/CoinIcon.cjs");
89
+ const CommentIcon = require("./components/Icons/CommentIcon.cjs");
89
90
  const CompassIcon = require("./components/Icons/CompassIcon.cjs");
90
91
  const CopyIcon = require("./components/Icons/CopyIcon.cjs");
91
92
  const CrossCircleIcon = require("./components/Icons/CrossCircleIcon.cjs");
@@ -260,6 +261,7 @@ const TablePagination = require("./components/Table/TablePagination.cjs");
260
261
  const Tabs = require("./components/Tabs/Tabs.cjs");
261
262
  const TabsContent = require("./components/Tabs/TabsContent.cjs");
262
263
  const TabsList = require("./components/Tabs/TabsList.cjs");
264
+ const TabsOverflow = require("./components/Tabs/TabsOverflow.cjs");
263
265
  const TabsTrigger = require("./components/Tabs/TabsTrigger.cjs");
264
266
  const TextArea = require("./components/TextArea/TextArea.cjs");
265
267
  const TextField = require("./components/TextField/TextField.cjs");
@@ -407,6 +409,7 @@ exports.CloseIcon = CloseIcon.CloseIcon;
407
409
  exports.CodeIcon = CodeIcon.CodeIcon;
408
410
  exports.CogIcon = CogIcon.CogIcon;
409
411
  exports.CoinIcon = CoinIcon.CoinIcon;
412
+ exports.CommentIcon = CommentIcon.CommentIcon;
410
413
  exports.CompassIcon = CompassIcon.CompassIcon;
411
414
  exports.CopyIcon = CopyIcon.CopyIcon;
412
415
  exports.CrossCircleIcon = CrossCircleIcon.CrossCircleIcon;
@@ -607,6 +610,8 @@ exports.TablePagination = TablePagination.TablePagination;
607
610
  exports.Tabs = Tabs.Tabs;
608
611
  exports.TabsContent = TabsContent.TabsContent;
609
612
  exports.TabsList = TabsList.TabsList;
613
+ exports.TabsOverflow = TabsOverflow.TabsOverflow;
614
+ exports.TabsOverflowItem = TabsOverflow.TabsOverflowItem;
610
615
  exports.TabsTrigger = TabsTrigger.TabsTrigger;
611
616
  exports.TextArea = TextArea.TextArea;
612
617
  exports.TextField = TextField.TextField;