@entro314labs/react-arc-tabs 1.0.10 → 1.0.12

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.
package/README.md CHANGED
@@ -128,6 +128,7 @@ export default function Page() {
128
128
  - `fit?: "content" | "equal"`
129
129
  - `motionPreset?: "none" | "subtle" | "expressive"`
130
130
  - `motionDuration?: number`
131
+ - `seamGap?: number | string` (vertical distance between active tab and panel; default `0` for a fused shape)
131
132
  - `notch?: number | string` (controls inverted corner curve size)
132
133
  - `keepMounted?: boolean`
133
134
  - `ariaLabel?: string`
package/dist/ArcTabs.css CHANGED
@@ -1,6 +1,7 @@
1
1
  .arc-tabs {
2
2
  --arc-radius: 14px;
3
3
  --arc-gap: 2px;
4
+ --arc-seam-gap: 0px;
4
5
  --arc-border-width: 1px;
5
6
  --arc-notch: clamp(8px, calc(var(--arc-radius) * 0.72), 14px);
6
7
  --arc-motion-duration: 260ms;
@@ -42,7 +43,7 @@
42
43
  gap: var(--arc-gap);
43
44
  list-style: none;
44
45
  margin: 0;
45
- padding: calc(var(--arc-gap) * 0.6) calc(var(--arc-gap) * 0.6) var(--arc-gap);
46
+ padding: calc(var(--arc-gap) * 0.6) calc(var(--arc-gap) * 0.6) var(--arc-seam-gap);
46
47
  border: var(--arc-border-width) solid var(--arc-panel-border);
47
48
  border-bottom: none;
48
49
  border-top-left-radius: var(--arc-radius);
@@ -54,8 +55,8 @@
54
55
 
55
56
  .arc-tabs__list-scroll {
56
57
  position: relative;
57
- margin-bottom: calc(var(--arc-notch) * -1);
58
- padding-bottom: var(--arc-notch);
58
+ margin-bottom: calc((var(--arc-notch) + var(--arc-seam-gap)) * -1);
59
+ padding-bottom: calc(var(--arc-notch) + var(--arc-seam-gap));
59
60
  overflow-x: auto;
60
61
  overflow-y: visible;
61
62
  scrollbar-width: thin;
@@ -77,14 +78,14 @@
77
78
  top: 0;
78
79
  z-index: 1;
79
80
  width: var(--arc-indicator-w, 0px);
80
- height: calc(100% - var(--arc-gap));
81
+ height: calc(100% - var(--arc-seam-gap));
81
82
  border-top-left-radius: var(--arc-radius);
82
83
  border-top-right-radius: var(--arc-radius);
83
84
  border-bottom-left-radius: 0;
84
85
  border-bottom-right-radius: 0;
85
86
  transform: translateX(var(--arc-indicator-x, 0px));
86
87
  background: var(--arc-panel-bg);
87
- box-shadow: 0 var(--arc-gap) 0 var(--arc-panel-bg);
88
+ box-shadow: 0 var(--arc-seam-gap) 0 var(--arc-panel-bg);
88
89
  opacity: 0;
89
90
  pointer-events: none;
90
91
  transition:
@@ -176,34 +177,43 @@
176
177
  .arc-tabs__tab::after {
177
178
  content: '';
178
179
  position: absolute;
179
- bottom: 0;
180
- width: var(--arc-notch);
181
- height: var(--arc-notch);
182
180
  opacity: 0;
183
181
  pointer-events: none;
184
- transform: translateY(var(--arc-gap));
185
182
  transition:
186
183
  opacity var(--arc-motion-duration) var(--arc-motion-easing),
187
184
  transform var(--arc-motion-duration) var(--arc-motion-easing);
188
185
  }
189
186
 
190
187
  .arc-tabs__tab::before {
188
+ bottom: 0;
191
189
  left: calc(var(--arc-notch) * -1);
192
- background: radial-gradient(
193
- circle var(--arc-notch) at 100% 0%,
194
- transparent calc(var(--arc-notch) - 0.5px),
195
- var(--arc-panel-bg) calc(var(--arc-notch) + 0.5px)
196
- );
190
+ width: calc(100% + (var(--arc-notch) * 2));
191
+ height: calc(var(--arc-seam-gap) + var(--arc-border-width));
192
+ transform: translateY(100%);
193
+ background:
194
+ linear-gradient(var(--arc-panel-bg), var(--arc-panel-bg))
195
+ center top / calc(100% - (var(--arc-notch) * 2) + 1px) 100% no-repeat;
197
196
  }
198
197
 
199
198
  .arc-tabs__tab::after {
200
- right: calc(var(--arc-notch) * -1);
201
- left: auto;
202
- background: radial-gradient(
203
- circle var(--arc-notch) at 0% 0%,
204
- transparent calc(var(--arc-notch) - 0.5px),
205
- var(--arc-panel-bg) calc(var(--arc-notch) + 0.5px)
206
- );
199
+ bottom: 0;
200
+ left: calc(var(--arc-notch) * -1);
201
+ width: calc(100% + (var(--arc-notch) * 2));
202
+ height: var(--arc-notch);
203
+ transform: translateY(calc(100% + var(--arc-seam-gap)));
204
+ background:
205
+ radial-gradient(
206
+ circle var(--arc-notch) at 100% 0%,
207
+ transparent var(--arc-notch),
208
+ var(--arc-panel-bg) calc(var(--arc-notch) + 0.5px)
209
+ )
210
+ left top / var(--arc-notch) var(--arc-notch) no-repeat,
211
+ radial-gradient(
212
+ circle var(--arc-notch) at 0% 0%,
213
+ transparent var(--arc-notch),
214
+ var(--arc-panel-bg) calc(var(--arc-notch) + 0.5px)
215
+ )
216
+ right top / var(--arc-notch) var(--arc-notch) no-repeat;
207
217
  }
208
218
 
209
219
  .arc-tabs__tab[aria-selected='true']::before,
@@ -218,9 +228,6 @@
218
228
  background: var(--arc-panel-bg);
219
229
  border-bottom-left-radius: 0;
220
230
  border-bottom-right-radius: 0;
221
- box-shadow:
222
- 0 var(--arc-gap) 0 var(--arc-panel-bg),
223
- 0 calc(var(--arc-gap) + var(--arc-border-width)) 0 var(--arc-panel-bg);
224
231
  }
225
232
 
226
233
  .arc-tabs__icon {
package/dist/index.cjs CHANGED
@@ -71,6 +71,7 @@ function ArcTabs({
71
71
  panelClassName,
72
72
  radius,
73
73
  gap,
74
+ seamGap,
74
75
  notch,
75
76
  panelPadding,
76
77
  accentColor,
@@ -343,6 +344,13 @@ function ArcTabs({
343
344
  if (gap !== void 0) {
344
345
  cssVars["--arc-gap"] = `${gap}px`;
345
346
  }
347
+ const seamGapValue = toCssSize(seamGap);
348
+ const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, "--arc-seam-gap");
349
+ if (seamGapValue !== void 0) {
350
+ cssVars["--arc-seam-gap"] = seamGapValue;
351
+ } else if (!hasCustomSeamGap) {
352
+ cssVars["--arc-seam-gap"] = "0px";
353
+ }
346
354
  const notchValue = toCssSize(notch);
347
355
  const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, "--arc-notch");
348
356
  if (notchValue !== void 0) {
@@ -379,6 +387,7 @@ function ArcTabs({
379
387
  style,
380
388
  radius,
381
389
  gap,
390
+ seamGap,
382
391
  notch,
383
392
  panelPadding,
384
393
  accentColor,
@@ -567,6 +576,7 @@ function ArcTabsTailwind({
567
576
  panelClassName,
568
577
  radius,
569
578
  gap,
579
+ seamGap,
570
580
  notch,
571
581
  panelPadding,
572
582
  accentColor,
@@ -840,6 +850,13 @@ function ArcTabsTailwind({
840
850
  if (gap !== void 0) {
841
851
  cssVars["--arc-gap"] = `${gap}px`;
842
852
  }
853
+ const seamGapValue = toCssSize2(seamGap);
854
+ const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, "--arc-seam-gap");
855
+ if (seamGapValue !== void 0) {
856
+ cssVars["--arc-seam-gap"] = seamGapValue;
857
+ } else if (!hasCustomSeamGap) {
858
+ cssVars["--arc-seam-gap"] = "0px";
859
+ }
843
860
  const notchValue = toCssSize2(notch);
844
861
  const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, "--arc-notch");
845
862
  if (notchValue !== void 0) {
@@ -876,6 +893,7 @@ function ArcTabsTailwind({
876
893
  style,
877
894
  radius,
878
895
  gap,
896
+ seamGap,
879
897
  notch,
880
898
  panelPadding,
881
899
  accentColor,
@@ -888,16 +906,16 @@ function ArcTabsTailwind({
888
906
  items.length
889
907
  ]);
890
908
  const rootClassName = joinClassNames2(
891
- "arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]",
909
+ "arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-seam-gap:0px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]",
892
910
  classNames?.root,
893
911
  className
894
912
  );
895
913
  const listClassName = joinClassNames2(
896
- "relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate",
914
+ "relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-seam-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate",
897
915
  classNames?.list,
898
916
  tabsClassName
899
917
  );
900
- const listScrollClassName = "relative -mb-[var(--arc-notch)] overflow-x-auto overflow-y-visible pb-[var(--arc-notch)] [scrollbar-width:thin]";
918
+ const listScrollClassName = "relative -mb-[calc(var(--arc-notch)+var(--arc-seam-gap))] overflow-x-auto overflow-y-visible pb-[calc(var(--arc-notch)+var(--arc-seam-gap))] [scrollbar-width:thin]";
901
919
  const panelsClassName = joinClassNames2(
902
920
  "relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
903
921
  classNames?.panels,
@@ -926,7 +944,7 @@ function ArcTabsTailwind({
926
944
  [indicator.x, indicator.width]
927
945
  );
928
946
  const indicatorClassName = joinClassNames2(
929
- "pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
947
+ "pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-seam-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-seam-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
930
948
  indicator.ready && "opacity-100",
931
949
  classNames?.indicator
932
950
  );
@@ -963,11 +981,11 @@ function ArcTabsTailwind({
963
981
  classNames?.item
964
982
  );
965
983
  const tabClassName = joinClassNames2(
966
- "relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-notch)] before:w-[var(--arc-notch)] before:translate-y-[var(--arc-gap)] before:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:right-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[var(--arc-notch)] after:translate-y-[var(--arc-gap)] after:bg-[radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
984
+ "relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[calc(var(--arc-seam-gap)+var(--arc-border-width))] before:w-[calc(100%+var(--arc-notch)*2)] before:translate-y-full before:bg-[linear-gradient(var(--arc-panel-bg),_var(--arc-panel-bg))_center_top/calc(100%-var(--arc-notch)*2+1px)_100%_no-repeat] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:left-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[calc(100%+var(--arc-notch)*2)] after:translate-y-[calc(100%+var(--arc-seam-gap))] after:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
967
985
  sizeClassMap[size],
968
986
  fit === "equal" && "w-full justify-center",
969
987
  selected ? joinClassNames2(
970
- "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg),0_calc(var(--arc-gap)+var(--arc-border-width))_0_var(--arc-panel-bg)]",
988
+ "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100",
971
989
  "bg-[var(--arc-panel-bg)]"
972
990
  ) : "enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]",
973
991
  selected ? classNames?.tabSelected : classNames?.tabUnselected,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/ArcTabs.tsx","../src/ArcTabsTailwind.tsx"],"sourcesContent":["export { ArcTabs } from './ArcTabs'\nexport { ArcTabsTailwind } from './ArcTabsTailwind'\nexport type {\n ArcTabItem,\n ArcTabsActivationMode,\n ArcTabsFit,\n ArcTabsMotionPreset,\n ArcTabsProps,\n ArcTabsRenderState,\n ArcTabsSize,\n} from './ArcTabs'\nexport type { ArcTabsTailwindClassNames, ArcTabsTailwindProps } from './ArcTabsTailwind'\n","'use client'\n\nimport * as React from 'react'\n\nexport interface ArcTabItem {\n id: string\n label: React.ReactNode\n content: React.ReactNode\n disabled?: boolean\n icon?: React.ReactNode\n badge?: React.ReactNode\n}\n\nexport type ArcTabsActivationMode = 'automatic' | 'manual'\nexport type ArcTabsSize = 'sm' | 'md' | 'lg'\nexport type ArcTabsFit = 'content' | 'equal'\nexport type ArcTabsMotionPreset = 'none' | 'subtle' | 'expressive'\n\nexport interface ArcTabsRenderState {\n index: number\n selected: boolean\n disabled: boolean\n}\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n items: ArcTabItem[]\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, item: ArcTabItem, index: number) => void\n activationMode?: ArcTabsActivationMode\n keepMounted?: boolean\n size?: ArcTabsSize\n fit?: ArcTabsFit\n motionPreset?: ArcTabsMotionPreset\n motionDuration?: number\n ariaLabel?: string\n listId?: string\n tabsClassName?: string\n panelClassName?: string\n radius?: number\n gap?: number\n notch?: number | string\n panelPadding?: number | string\n accentColor?: string\n tabBackground?: string\n tabHoverBackground?: string\n panelBackground?: string\n panelBorderColor?: string\n emptyState?: React.ReactNode\n renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nexport function ArcTabs({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n ...rest\n}: ArcTabsProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n /* Panel top-corner rounding: when the active tab is NOT at the edge,\n the panel corner on that side gets a radius for a smoother visual connection */\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs',\n `arc-tabs--size-${size}`,\n `arc-tabs--fit-${fit}`,\n `arc-tabs--motion-${motionPreset}`,\n hasInteracted && 'arc-tabs--has-interacted',\n panelDirection !== 'none' && `arc-tabs--direction-${panelDirection}`,\n className,\n )\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? <span className=\"arc-tabs__icon\">{item.icon}</span> : null}\n <span className=\"arc-tabs__text\">{item.label}</span>\n {item.badge !== undefined ? <span className=\"arc-tabs__badge\">{item.badge}</span> : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n return (\n <div className={rootClassName} style={themedStyle} {...rest}>\n <div ref={listScrollRef} className=\"arc-tabs__list-scroll\">\n <ul\n ref={listRef}\n className={joinClassNames('arc-tabs__list', tabsClassName)}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={joinClassNames('arc-tabs__active-indicator', indicator.ready && 'is-ready')}\n style={indicatorStyle}\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n return (\n <li\n className={joinClassNames('arc-tabs__item', selected && 'arc-tabs__item--selected')}\n key={item.id}\n role=\"presentation\"\n >\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className=\"arc-tabs__tab\"\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={joinClassNames('arc-tabs__panels', panelClassName)}>\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n","'use client'\n\nimport * as React from 'react'\n\nimport type { ArcTabItem, ArcTabsProps, ArcTabsRenderState, ArcTabsSize } from './ArcTabs'\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsTailwindClassNames {\n root?: string\n list?: string\n indicator?: string\n item?: string\n tab?: string\n tabSelected?: string\n tabUnselected?: string\n tabDisabled?: string\n icon?: string\n text?: string\n badge?: string\n panels?: string\n panel?: string\n}\n\nexport interface ArcTabsTailwindProps extends ArcTabsProps {\n classNames?: ArcTabsTailwindClassNames\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nconst sizeClassMap: Record<ArcTabsSize, string> = {\n sm: 'min-h-9 px-3 py-1.5 text-sm',\n md: 'min-h-10 px-4 py-2 text-[0.95rem]',\n lg: 'min-h-12 px-5 py-2.5 text-base',\n}\n\nexport function ArcTabsTailwind({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n classNames,\n ...rest\n}: ArcTabsTailwindProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]',\n classNames?.root,\n className,\n )\n\n const listClassName = joinClassNames(\n 'relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate',\n classNames?.list,\n tabsClassName,\n )\n\n const listScrollClassName =\n 'relative -mb-[var(--arc-notch)] overflow-x-auto overflow-y-visible pb-[var(--arc-notch)] [scrollbar-width:thin]'\n\n const panelsClassName = joinClassNames(\n 'relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]',\n classNames?.panels,\n panelClassName,\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? (\n <span className={joinClassNames('inline-flex leading-none', classNames?.icon)}>\n {item.icon}\n </span>\n ) : null}\n <span className={joinClassNames('inline-block', classNames?.text)}>{item.label}</span>\n {item.badge !== undefined ? (\n <span\n className={joinClassNames(\n 'inline-flex min-w-5 items-center justify-center rounded-full bg-[var(--arc-accent)] px-1.5 py-0.5 text-[0.72em] font-bold text-white/95',\n classNames?.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const indicatorClassName = joinClassNames(\n 'pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]',\n indicator.ready && 'opacity-100',\n classNames?.indicator,\n )\n\n return (\n <div className={rootClassName} style={themedStyle} data-slot=\"root\" {...rest}>\n <div ref={listScrollRef} className={listScrollClassName} data-slot=\"list-scroll\">\n <ul\n ref={listRef}\n className={listClassName}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n data-slot=\"list\"\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={indicatorClassName}\n style={indicatorStyle}\n data-slot=\"indicator\"\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n const itemClassName = joinClassNames(\n fit === 'equal'\n ? selected\n ? 'relative z-[4] min-w-0 flex-1'\n : 'relative z-[2] min-w-0 flex-1'\n : selected\n ? 'relative z-[4] shrink-0'\n : 'relative z-[2] shrink-0',\n classNames?.item,\n )\n\n const tabClassName = joinClassNames(\n \"relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-notch)] before:w-[var(--arc-notch)] before:translate-y-[var(--arc-gap)] before:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:right-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[var(--arc-notch)] after:translate-y-[var(--arc-gap)] after:bg-[radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]\",\n sizeClassMap[size],\n fit === 'equal' && 'w-full justify-center',\n selected\n ? joinClassNames(\n 'z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg),0_calc(var(--arc-gap)+var(--arc-border-width))_0_var(--arc-panel-bg)]',\n 'bg-[var(--arc-panel-bg)]',\n )\n : 'enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]',\n selected ? classNames?.tabSelected : classNames?.tabUnselected,\n disabled && classNames?.tabDisabled,\n classNames?.tab,\n )\n\n return (\n <li className={itemClassName} key={item.id} role=\"presentation\" data-slot=\"item\">\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className={tabClassName}\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n data-slot=\"tab\"\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={panelsClassName} data-slot=\"panels\">\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n data-slot=\"panel\"\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n data-slot=\"panel\"\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,YAAuB;AAyfnB;AAp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AAA;AAAA,UAd1B,KAAK;AAAA,QAeZ;AAAA,MAEJ,CAAC,IACD;AAAA,MAEH,MAAM,SAAS,KAAK,iBAAiB,UAAa,CAAC,cAClD;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,CAAC,SAAS;AACb,2BAAe,UAAU;AAAA,UAC3B;AAAA,UACA,IAAI,GAAG,MAAM,UAAU,aAAa;AAAA,UACpC,WAAWA,gBAAe,gBAAgB,YAAY,KAAK;AAAA,UAC3D,MAAK;AAAA,UACL,mBAAiB,GAAG,MAAM,QAAQ,aAAa;AAAA,UAC/C,eAAa;AAAA,UACb,aAAU;AAAA,UAET,6BAAmB,cAAc;AAAA,YAChC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAU,QAAQ,aAAa,QAAQ;AAAA,UACzC,CAAC;AAAA;AAAA,MACH,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":["React","import_jsx_runtime","joinClassNames","toCssSize","findFirstEnabledIndex","getEnabledIndices","getNextEnabledIndex"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/ArcTabs.tsx","../src/ArcTabsTailwind.tsx"],"sourcesContent":["export { ArcTabs } from './ArcTabs'\nexport { ArcTabsTailwind } from './ArcTabsTailwind'\nexport type {\n ArcTabItem,\n ArcTabsActivationMode,\n ArcTabsFit,\n ArcTabsMotionPreset,\n ArcTabsProps,\n ArcTabsRenderState,\n ArcTabsSize,\n} from './ArcTabs'\nexport type { ArcTabsTailwindClassNames, ArcTabsTailwindProps } from './ArcTabsTailwind'\n","'use client'\n\nimport * as React from 'react'\n\nexport interface ArcTabItem {\n id: string\n label: React.ReactNode\n content: React.ReactNode\n disabled?: boolean\n icon?: React.ReactNode\n badge?: React.ReactNode\n}\n\nexport type ArcTabsActivationMode = 'automatic' | 'manual'\nexport type ArcTabsSize = 'sm' | 'md' | 'lg'\nexport type ArcTabsFit = 'content' | 'equal'\nexport type ArcTabsMotionPreset = 'none' | 'subtle' | 'expressive'\n\nexport interface ArcTabsRenderState {\n index: number\n selected: boolean\n disabled: boolean\n}\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n items: ArcTabItem[]\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, item: ArcTabItem, index: number) => void\n activationMode?: ArcTabsActivationMode\n keepMounted?: boolean\n size?: ArcTabsSize\n fit?: ArcTabsFit\n motionPreset?: ArcTabsMotionPreset\n motionDuration?: number\n ariaLabel?: string\n listId?: string\n tabsClassName?: string\n panelClassName?: string\n radius?: number\n gap?: number\n seamGap?: number | string\n notch?: number | string\n panelPadding?: number | string\n accentColor?: string\n tabBackground?: string\n tabHoverBackground?: string\n panelBackground?: string\n panelBorderColor?: string\n emptyState?: React.ReactNode\n renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nexport function ArcTabs({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n ...rest\n}: ArcTabsProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const seamGapValue = toCssSize(seamGap)\n const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, '--arc-seam-gap')\n if (seamGapValue !== undefined) {\n cssVars['--arc-seam-gap'] = seamGapValue\n } else if (!hasCustomSeamGap) {\n cssVars['--arc-seam-gap'] = '0px'\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n /* Panel top-corner rounding: when the active tab is NOT at the edge,\n the panel corner on that side gets a radius for a smoother visual connection */\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs',\n `arc-tabs--size-${size}`,\n `arc-tabs--fit-${fit}`,\n `arc-tabs--motion-${motionPreset}`,\n hasInteracted && 'arc-tabs--has-interacted',\n panelDirection !== 'none' && `arc-tabs--direction-${panelDirection}`,\n className,\n )\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? <span className=\"arc-tabs__icon\">{item.icon}</span> : null}\n <span className=\"arc-tabs__text\">{item.label}</span>\n {item.badge !== undefined ? <span className=\"arc-tabs__badge\">{item.badge}</span> : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n return (\n <div className={rootClassName} style={themedStyle} {...rest}>\n <div ref={listScrollRef} className=\"arc-tabs__list-scroll\">\n <ul\n ref={listRef}\n className={joinClassNames('arc-tabs__list', tabsClassName)}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={joinClassNames('arc-tabs__active-indicator', indicator.ready && 'is-ready')}\n style={indicatorStyle}\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n return (\n <li\n className={joinClassNames('arc-tabs__item', selected && 'arc-tabs__item--selected')}\n key={item.id}\n role=\"presentation\"\n >\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className=\"arc-tabs__tab\"\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={joinClassNames('arc-tabs__panels', panelClassName)}>\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n","'use client'\n\nimport * as React from 'react'\n\nimport type { ArcTabItem, ArcTabsProps, ArcTabsRenderState, ArcTabsSize } from './ArcTabs'\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsTailwindClassNames {\n root?: string\n list?: string\n indicator?: string\n item?: string\n tab?: string\n tabSelected?: string\n tabUnselected?: string\n tabDisabled?: string\n icon?: string\n text?: string\n badge?: string\n panels?: string\n panel?: string\n}\n\nexport interface ArcTabsTailwindProps extends ArcTabsProps {\n classNames?: ArcTabsTailwindClassNames\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nconst sizeClassMap: Record<ArcTabsSize, string> = {\n sm: 'min-h-9 px-3 py-1.5 text-sm',\n md: 'min-h-10 px-4 py-2 text-[0.95rem]',\n lg: 'min-h-12 px-5 py-2.5 text-base',\n}\n\nexport function ArcTabsTailwind({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n classNames,\n ...rest\n}: ArcTabsTailwindProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const seamGapValue = toCssSize(seamGap)\n const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, '--arc-seam-gap')\n if (seamGapValue !== undefined) {\n cssVars['--arc-seam-gap'] = seamGapValue\n } else if (!hasCustomSeamGap) {\n cssVars['--arc-seam-gap'] = '0px'\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-seam-gap:0px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]',\n classNames?.root,\n className,\n )\n\n const listClassName = joinClassNames(\n 'relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-seam-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate',\n classNames?.list,\n tabsClassName,\n )\n\n const listScrollClassName =\n 'relative -mb-[calc(var(--arc-notch)+var(--arc-seam-gap))] overflow-x-auto overflow-y-visible pb-[calc(var(--arc-notch)+var(--arc-seam-gap))] [scrollbar-width:thin]'\n\n const panelsClassName = joinClassNames(\n 'relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]',\n classNames?.panels,\n panelClassName,\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? (\n <span className={joinClassNames('inline-flex leading-none', classNames?.icon)}>\n {item.icon}\n </span>\n ) : null}\n <span className={joinClassNames('inline-block', classNames?.text)}>{item.label}</span>\n {item.badge !== undefined ? (\n <span\n className={joinClassNames(\n 'inline-flex min-w-5 items-center justify-center rounded-full bg-[var(--arc-accent)] px-1.5 py-0.5 text-[0.72em] font-bold text-white/95',\n classNames?.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const indicatorClassName = joinClassNames(\n 'pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-seam-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-seam-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]',\n indicator.ready && 'opacity-100',\n classNames?.indicator,\n )\n\n return (\n <div className={rootClassName} style={themedStyle} data-slot=\"root\" {...rest}>\n <div ref={listScrollRef} className={listScrollClassName} data-slot=\"list-scroll\">\n <ul\n ref={listRef}\n className={listClassName}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n data-slot=\"list\"\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={indicatorClassName}\n style={indicatorStyle}\n data-slot=\"indicator\"\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n const itemClassName = joinClassNames(\n fit === 'equal'\n ? selected\n ? 'relative z-[4] min-w-0 flex-1'\n : 'relative z-[2] min-w-0 flex-1'\n : selected\n ? 'relative z-[4] shrink-0'\n : 'relative z-[2] shrink-0',\n classNames?.item,\n )\n\n const tabClassName = joinClassNames(\n \"relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[calc(var(--arc-seam-gap)+var(--arc-border-width))] before:w-[calc(100%+var(--arc-notch)*2)] before:translate-y-full before:bg-[linear-gradient(var(--arc-panel-bg),_var(--arc-panel-bg))_center_top/calc(100%-var(--arc-notch)*2+1px)_100%_no-repeat] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:left-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[calc(100%+var(--arc-notch)*2)] after:translate-y-[calc(100%+var(--arc-seam-gap))] after:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]\",\n sizeClassMap[size],\n fit === 'equal' && 'w-full justify-center',\n selected\n ? joinClassNames(\n 'z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100',\n 'bg-[var(--arc-panel-bg)]',\n )\n : 'enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]',\n selected ? classNames?.tabSelected : classNames?.tabUnselected,\n disabled && classNames?.tabDisabled,\n classNames?.tab,\n )\n\n return (\n <li className={itemClassName} key={item.id} role=\"presentation\" data-slot=\"item\">\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className={tabClassName}\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n data-slot=\"tab\"\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={panelsClassName} data-slot=\"panels\">\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n data-slot=\"panel\"\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n data-slot=\"panel\"\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AACzB,cAAM,WAAW,UAAU;AAC3B,cAAM,WAAW,QAAQ,KAAK,QAAQ;AACtC,cAAM,QAAQ,GAAG,MAAM,QAAQ,KAAK;AACpC,cAAM,UAAU,GAAG,MAAM,UAAU,KAAK;AACxC,cAAM,QAA4B,EAAE,OAAO,UAAU,SAAS;AAE9D,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,KAAK,CAAC,SAAS;AACb,kBAAI,UAAU;AACZ,+BAAe,UAAU;AAAA,cAC3B;AAAA,YACF;AAAA,YACA,IAAI;AAAA,YACJ,WAAWA,gBAAe,gBAAgB,YAAY,KAAK;AAAA,YAC3D,MAAK;AAAA,YACL,mBAAiB;AAAA,YACjB,eAAa,CAAC;AAAA,YACd,QAAQ,CAAC;AAAA,YACT,aAAU;AAAA,YAET,6BAAmB,MAAM,KAAK;AAAA;AAAA,UAd1B,KAAK;AAAA,QAeZ;AAAA,MAEJ,CAAC,IACD;AAAA,MAEH,MAAM,SAAS,KAAK,iBAAiB,UAAa,CAAC,cAClD;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,CAAC,SAAS;AACb,2BAAe,UAAU;AAAA,UAC3B;AAAA,UACA,IAAI,GAAG,MAAM,UAAU,aAAa;AAAA,UACpC,WAAWA,gBAAe,gBAAgB,YAAY,KAAK;AAAA,UAC3D,MAAK;AAAA,UACL,mBAAiB,GAAG,MAAM,QAAQ,aAAa;AAAA,UAC/C,eAAa;AAAA,UACb,aAAU;AAAA,UAET,6BAAmB,cAAc;AAAA,YAChC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAU,QAAQ,aAAa,QAAQ;AAAA,UACzC,CAAC;AAAA;AAAA,MACH,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":["React","import_jsx_runtime","joinClassNames","toCssSize","findFirstEnabledIndex","getEnabledIndices","getNextEnabledIndex"]}
package/dist/index.d.cts CHANGED
@@ -35,6 +35,7 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
35
35
  panelClassName?: string;
36
36
  radius?: number;
37
37
  gap?: number;
38
+ seamGap?: number | string;
38
39
  notch?: number | string;
39
40
  panelPadding?: number | string;
40
41
  accentColor?: string;
@@ -46,7 +47,7 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
46
47
  renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
47
48
  renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
48
49
  }
49
- declare function ArcTabs({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
50
+ declare function ArcTabs({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, seamGap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
50
51
 
51
52
  interface ArcTabsTailwindClassNames {
52
53
  root?: string;
@@ -66,6 +67,6 @@ interface ArcTabsTailwindClassNames {
66
67
  interface ArcTabsTailwindProps extends ArcTabsProps {
67
68
  classNames?: ArcTabsTailwindClassNames;
68
69
  }
69
- declare function ArcTabsTailwind({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
70
+ declare function ArcTabsTailwind({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, seamGap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
70
71
 
71
72
  export { type ArcTabItem, ArcTabs, type ArcTabsActivationMode, type ArcTabsFit, type ArcTabsMotionPreset, type ArcTabsProps, type ArcTabsRenderState, type ArcTabsSize, ArcTabsTailwind, type ArcTabsTailwindClassNames, type ArcTabsTailwindProps };
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
35
35
  panelClassName?: string;
36
36
  radius?: number;
37
37
  gap?: number;
38
+ seamGap?: number | string;
38
39
  notch?: number | string;
39
40
  panelPadding?: number | string;
40
41
  accentColor?: string;
@@ -46,7 +47,7 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
46
47
  renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
47
48
  renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
48
49
  }
49
- declare function ArcTabs({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
50
+ declare function ArcTabs({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, seamGap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
50
51
 
51
52
  interface ArcTabsTailwindClassNames {
52
53
  root?: string;
@@ -66,6 +67,6 @@ interface ArcTabsTailwindClassNames {
66
67
  interface ArcTabsTailwindProps extends ArcTabsProps {
67
68
  classNames?: ArcTabsTailwindClassNames;
68
69
  }
69
- declare function ArcTabsTailwind({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
70
+ declare function ArcTabsTailwind({ items, value, defaultValue, onValueChange, activationMode, keepMounted, size, fit, motionPreset, motionDuration, ariaLabel, listId, tabsClassName, panelClassName, radius, gap, seamGap, notch, panelPadding, accentColor, tabBackground, tabHoverBackground, panelBackground, panelBorderColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
70
71
 
71
72
  export { type ArcTabItem, ArcTabs, type ArcTabsActivationMode, type ArcTabsFit, type ArcTabsMotionPreset, type ArcTabsProps, type ArcTabsRenderState, type ArcTabsSize, ArcTabsTailwind, type ArcTabsTailwindClassNames, type ArcTabsTailwindProps };
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ function ArcTabs({
34
34
  panelClassName,
35
35
  radius,
36
36
  gap,
37
+ seamGap,
37
38
  notch,
38
39
  panelPadding,
39
40
  accentColor,
@@ -306,6 +307,13 @@ function ArcTabs({
306
307
  if (gap !== void 0) {
307
308
  cssVars["--arc-gap"] = `${gap}px`;
308
309
  }
310
+ const seamGapValue = toCssSize(seamGap);
311
+ const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, "--arc-seam-gap");
312
+ if (seamGapValue !== void 0) {
313
+ cssVars["--arc-seam-gap"] = seamGapValue;
314
+ } else if (!hasCustomSeamGap) {
315
+ cssVars["--arc-seam-gap"] = "0px";
316
+ }
309
317
  const notchValue = toCssSize(notch);
310
318
  const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, "--arc-notch");
311
319
  if (notchValue !== void 0) {
@@ -342,6 +350,7 @@ function ArcTabs({
342
350
  style,
343
351
  radius,
344
352
  gap,
353
+ seamGap,
345
354
  notch,
346
355
  panelPadding,
347
356
  accentColor,
@@ -530,6 +539,7 @@ function ArcTabsTailwind({
530
539
  panelClassName,
531
540
  radius,
532
541
  gap,
542
+ seamGap,
533
543
  notch,
534
544
  panelPadding,
535
545
  accentColor,
@@ -803,6 +813,13 @@ function ArcTabsTailwind({
803
813
  if (gap !== void 0) {
804
814
  cssVars["--arc-gap"] = `${gap}px`;
805
815
  }
816
+ const seamGapValue = toCssSize2(seamGap);
817
+ const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, "--arc-seam-gap");
818
+ if (seamGapValue !== void 0) {
819
+ cssVars["--arc-seam-gap"] = seamGapValue;
820
+ } else if (!hasCustomSeamGap) {
821
+ cssVars["--arc-seam-gap"] = "0px";
822
+ }
806
823
  const notchValue = toCssSize2(notch);
807
824
  const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, "--arc-notch");
808
825
  if (notchValue !== void 0) {
@@ -839,6 +856,7 @@ function ArcTabsTailwind({
839
856
  style,
840
857
  radius,
841
858
  gap,
859
+ seamGap,
842
860
  notch,
843
861
  panelPadding,
844
862
  accentColor,
@@ -851,16 +869,16 @@ function ArcTabsTailwind({
851
869
  items.length
852
870
  ]);
853
871
  const rootClassName = joinClassNames2(
854
- "arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]",
872
+ "arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-seam-gap:0px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]",
855
873
  classNames?.root,
856
874
  className
857
875
  );
858
876
  const listClassName = joinClassNames2(
859
- "relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate",
877
+ "relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-seam-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate",
860
878
  classNames?.list,
861
879
  tabsClassName
862
880
  );
863
- const listScrollClassName = "relative -mb-[var(--arc-notch)] overflow-x-auto overflow-y-visible pb-[var(--arc-notch)] [scrollbar-width:thin]";
881
+ const listScrollClassName = "relative -mb-[calc(var(--arc-notch)+var(--arc-seam-gap))] overflow-x-auto overflow-y-visible pb-[calc(var(--arc-notch)+var(--arc-seam-gap))] [scrollbar-width:thin]";
864
882
  const panelsClassName = joinClassNames2(
865
883
  "relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
866
884
  classNames?.panels,
@@ -889,7 +907,7 @@ function ArcTabsTailwind({
889
907
  [indicator.x, indicator.width]
890
908
  );
891
909
  const indicatorClassName = joinClassNames2(
892
- "pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
910
+ "pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-seam-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-seam-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
893
911
  indicator.ready && "opacity-100",
894
912
  classNames?.indicator
895
913
  );
@@ -926,11 +944,11 @@ function ArcTabsTailwind({
926
944
  classNames?.item
927
945
  );
928
946
  const tabClassName = joinClassNames2(
929
- "relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-notch)] before:w-[var(--arc-notch)] before:translate-y-[var(--arc-gap)] before:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:right-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[var(--arc-notch)] after:translate-y-[var(--arc-gap)] after:bg-[radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
947
+ "relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[calc(var(--arc-seam-gap)+var(--arc-border-width))] before:w-[calc(100%+var(--arc-notch)*2)] before:translate-y-full before:bg-[linear-gradient(var(--arc-panel-bg),_var(--arc-panel-bg))_center_top/calc(100%-var(--arc-notch)*2+1px)_100%_no-repeat] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:left-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[calc(100%+var(--arc-notch)*2)] after:translate-y-[calc(100%+var(--arc-seam-gap))] after:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
930
948
  sizeClassMap[size],
931
949
  fit === "equal" && "w-full justify-center",
932
950
  selected ? joinClassNames2(
933
- "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg),0_calc(var(--arc-gap)+var(--arc-border-width))_0_var(--arc-panel-bg)]",
951
+ "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100",
934
952
  "bg-[var(--arc-panel-bg)]"
935
953
  ) : "enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]",
936
954
  selected ? classNames?.tabSelected : classNames?.tabUnselected,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ArcTabs.tsx","../src/ArcTabsTailwind.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nexport interface ArcTabItem {\n id: string\n label: React.ReactNode\n content: React.ReactNode\n disabled?: boolean\n icon?: React.ReactNode\n badge?: React.ReactNode\n}\n\nexport type ArcTabsActivationMode = 'automatic' | 'manual'\nexport type ArcTabsSize = 'sm' | 'md' | 'lg'\nexport type ArcTabsFit = 'content' | 'equal'\nexport type ArcTabsMotionPreset = 'none' | 'subtle' | 'expressive'\n\nexport interface ArcTabsRenderState {\n index: number\n selected: boolean\n disabled: boolean\n}\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n items: ArcTabItem[]\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, item: ArcTabItem, index: number) => void\n activationMode?: ArcTabsActivationMode\n keepMounted?: boolean\n size?: ArcTabsSize\n fit?: ArcTabsFit\n motionPreset?: ArcTabsMotionPreset\n motionDuration?: number\n ariaLabel?: string\n listId?: string\n tabsClassName?: string\n panelClassName?: string\n radius?: number\n gap?: number\n notch?: number | string\n panelPadding?: number | string\n accentColor?: string\n tabBackground?: string\n tabHoverBackground?: string\n panelBackground?: string\n panelBorderColor?: string\n emptyState?: React.ReactNode\n renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nexport function ArcTabs({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n ...rest\n}: ArcTabsProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n /* Panel top-corner rounding: when the active tab is NOT at the edge,\n the panel corner on that side gets a radius for a smoother visual connection */\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs',\n `arc-tabs--size-${size}`,\n `arc-tabs--fit-${fit}`,\n `arc-tabs--motion-${motionPreset}`,\n hasInteracted && 'arc-tabs--has-interacted',\n panelDirection !== 'none' && `arc-tabs--direction-${panelDirection}`,\n className,\n )\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? <span className=\"arc-tabs__icon\">{item.icon}</span> : null}\n <span className=\"arc-tabs__text\">{item.label}</span>\n {item.badge !== undefined ? <span className=\"arc-tabs__badge\">{item.badge}</span> : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n return (\n <div className={rootClassName} style={themedStyle} {...rest}>\n <div ref={listScrollRef} className=\"arc-tabs__list-scroll\">\n <ul\n ref={listRef}\n className={joinClassNames('arc-tabs__list', tabsClassName)}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={joinClassNames('arc-tabs__active-indicator', indicator.ready && 'is-ready')}\n style={indicatorStyle}\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n return (\n <li\n className={joinClassNames('arc-tabs__item', selected && 'arc-tabs__item--selected')}\n key={item.id}\n role=\"presentation\"\n >\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className=\"arc-tabs__tab\"\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={joinClassNames('arc-tabs__panels', panelClassName)}>\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n","'use client'\n\nimport * as React from 'react'\n\nimport type { ArcTabItem, ArcTabsProps, ArcTabsRenderState, ArcTabsSize } from './ArcTabs'\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsTailwindClassNames {\n root?: string\n list?: string\n indicator?: string\n item?: string\n tab?: string\n tabSelected?: string\n tabUnselected?: string\n tabDisabled?: string\n icon?: string\n text?: string\n badge?: string\n panels?: string\n panel?: string\n}\n\nexport interface ArcTabsTailwindProps extends ArcTabsProps {\n classNames?: ArcTabsTailwindClassNames\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nconst sizeClassMap: Record<ArcTabsSize, string> = {\n sm: 'min-h-9 px-3 py-1.5 text-sm',\n md: 'min-h-10 px-4 py-2 text-[0.95rem]',\n lg: 'min-h-12 px-5 py-2.5 text-base',\n}\n\nexport function ArcTabsTailwind({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n classNames,\n ...rest\n}: ArcTabsTailwindProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]',\n classNames?.root,\n className,\n )\n\n const listClassName = joinClassNames(\n 'relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate',\n classNames?.list,\n tabsClassName,\n )\n\n const listScrollClassName =\n 'relative -mb-[var(--arc-notch)] overflow-x-auto overflow-y-visible pb-[var(--arc-notch)] [scrollbar-width:thin]'\n\n const panelsClassName = joinClassNames(\n 'relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]',\n classNames?.panels,\n panelClassName,\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? (\n <span className={joinClassNames('inline-flex leading-none', classNames?.icon)}>\n {item.icon}\n </span>\n ) : null}\n <span className={joinClassNames('inline-block', classNames?.text)}>{item.label}</span>\n {item.badge !== undefined ? (\n <span\n className={joinClassNames(\n 'inline-flex min-w-5 items-center justify-center rounded-full bg-[var(--arc-accent)] px-1.5 py-0.5 text-[0.72em] font-bold text-white/95',\n classNames?.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const indicatorClassName = joinClassNames(\n 'pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]',\n indicator.ready && 'opacity-100',\n classNames?.indicator,\n )\n\n return (\n <div className={rootClassName} style={themedStyle} data-slot=\"root\" {...rest}>\n <div ref={listScrollRef} className={listScrollClassName} data-slot=\"list-scroll\">\n <ul\n ref={listRef}\n className={listClassName}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n data-slot=\"list\"\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={indicatorClassName}\n style={indicatorStyle}\n data-slot=\"indicator\"\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n const itemClassName = joinClassNames(\n fit === 'equal'\n ? selected\n ? 'relative z-[4] min-w-0 flex-1'\n : 'relative z-[2] min-w-0 flex-1'\n : selected\n ? 'relative z-[4] shrink-0'\n : 'relative z-[2] shrink-0',\n classNames?.item,\n )\n\n const tabClassName = joinClassNames(\n \"relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-notch)] before:w-[var(--arc-notch)] before:translate-y-[var(--arc-gap)] before:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:right-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[var(--arc-notch)] after:translate-y-[var(--arc-gap)] after:bg-[radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_calc(var(--arc-notch)-0.5px),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]\",\n sizeClassMap[size],\n fit === 'equal' && 'w-full justify-center',\n selected\n ? joinClassNames(\n 'z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 [box-shadow:0_var(--arc-gap)_0_var(--arc-panel-bg),0_calc(var(--arc-gap)+var(--arc-border-width))_0_var(--arc-panel-bg)]',\n 'bg-[var(--arc-panel-bg)]',\n )\n : 'enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]',\n selected ? classNames?.tabSelected : classNames?.tabUnselected,\n disabled && classNames?.tabDisabled,\n classNames?.tab,\n )\n\n return (\n <li className={itemClassName} key={item.id} role=\"presentation\" data-slot=\"item\">\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className={tabClassName}\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n data-slot=\"tab\"\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={panelsClassName} data-slot=\"panels\">\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n data-slot=\"panel\"\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n data-slot=\"panel\"\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n"],"mappings":";AAEA,YAAY,WAAW;AAyfnB,mBACe,KADf;AApcJ,IAAM,iBAAiB,IAAI,UACzB,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AAEhC,IAAM,YAAY,CAAC,UACjB,OAAO,UAAU,WAAW,GAAG,KAAK,OAAO;AAE7C,IAAM,wBAAwB,CAAC,UAAwB,MAAM,UAAU,CAAC,SAAS,CAAC,KAAK,Q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AAM,SAAS,KAAK,iBAAiB,UAAa,CAAC,cAClD,gBAAAF;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,CAAC,SAAS;AACb,2BAAe,UAAU;AAAA,UAC3B;AAAA,UACA,IAAI,GAAG,MAAM,UAAU,aAAa;AAAA,UACpC,WAAWE,gBAAe,gBAAgB,YAAY,KAAK;AAAA,UAC3D,MAAK;AAAA,UACL,mBAAiB,GAAG,MAAM,QAAQ,aAAa;AAAA,UAC/C,eAAa;AAAA,UACb,aAAU;AAAA,UAET,6BAAmB,cAAc;AAAA,YAChC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAU,QAAQ,aAAa,QAAQ;AAAA,UACzC,CAAC;AAAA;AAAA,MACH,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":["React","Fragment","jsx","jsxs","joinClassNames","toCssSize","findFirstEnabledIndex","getEnabledIndices","getNextEnabledIndex"]}
1
+ {"version":3,"sources":["../src/ArcTabs.tsx","../src/ArcTabsTailwind.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nexport interface ArcTabItem {\n id: string\n label: React.ReactNode\n content: React.ReactNode\n disabled?: boolean\n icon?: React.ReactNode\n badge?: React.ReactNode\n}\n\nexport type ArcTabsActivationMode = 'automatic' | 'manual'\nexport type ArcTabsSize = 'sm' | 'md' | 'lg'\nexport type ArcTabsFit = 'content' | 'equal'\nexport type ArcTabsMotionPreset = 'none' | 'subtle' | 'expressive'\n\nexport interface ArcTabsRenderState {\n index: number\n selected: boolean\n disabled: boolean\n}\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n items: ArcTabItem[]\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, item: ArcTabItem, index: number) => void\n activationMode?: ArcTabsActivationMode\n keepMounted?: boolean\n size?: ArcTabsSize\n fit?: ArcTabsFit\n motionPreset?: ArcTabsMotionPreset\n motionDuration?: number\n ariaLabel?: string\n listId?: string\n tabsClassName?: string\n panelClassName?: string\n radius?: number\n gap?: number\n seamGap?: number | string\n notch?: number | string\n panelPadding?: number | string\n accentColor?: string\n tabBackground?: string\n tabHoverBackground?: string\n panelBackground?: string\n panelBorderColor?: string\n emptyState?: React.ReactNode\n renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nexport function ArcTabs({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n ...rest\n}: ArcTabsProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const seamGapValue = toCssSize(seamGap)\n const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, '--arc-seam-gap')\n if (seamGapValue !== undefined) {\n cssVars['--arc-seam-gap'] = seamGapValue\n } else if (!hasCustomSeamGap) {\n cssVars['--arc-seam-gap'] = '0px'\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n /* Panel top-corner rounding: when the active tab is NOT at the edge,\n the panel corner on that side gets a radius for a smoother visual connection */\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs',\n `arc-tabs--size-${size}`,\n `arc-tabs--fit-${fit}`,\n `arc-tabs--motion-${motionPreset}`,\n hasInteracted && 'arc-tabs--has-interacted',\n panelDirection !== 'none' && `arc-tabs--direction-${panelDirection}`,\n className,\n )\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? <span className=\"arc-tabs__icon\">{item.icon}</span> : null}\n <span className=\"arc-tabs__text\">{item.label}</span>\n {item.badge !== undefined ? <span className=\"arc-tabs__badge\">{item.badge}</span> : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n return (\n <div className={rootClassName} style={themedStyle} {...rest}>\n <div ref={listScrollRef} className=\"arc-tabs__list-scroll\">\n <ul\n ref={listRef}\n className={joinClassNames('arc-tabs__list', tabsClassName)}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={joinClassNames('arc-tabs__active-indicator', indicator.ready && 'is-ready')}\n style={indicatorStyle}\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n return (\n <li\n className={joinClassNames('arc-tabs__item', selected && 'arc-tabs__item--selected')}\n key={item.id}\n role=\"presentation\"\n >\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className=\"arc-tabs__tab\"\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={joinClassNames('arc-tabs__panels', panelClassName)}>\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className=\"arc-tabs__panel\"\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n","'use client'\n\nimport * as React from 'react'\n\nimport type { ArcTabItem, ArcTabsProps, ArcTabsRenderState, ArcTabsSize } from './ArcTabs'\n\ntype CSSVarStyle = React.CSSProperties & Record<`--${string}`, string | number>\n\nexport interface ArcTabsTailwindClassNames {\n root?: string\n list?: string\n indicator?: string\n item?: string\n tab?: string\n tabSelected?: string\n tabUnselected?: string\n tabDisabled?: string\n icon?: string\n text?: string\n badge?: string\n panels?: string\n panel?: string\n}\n\nexport interface ArcTabsTailwindProps extends ArcTabsProps {\n classNames?: ArcTabsTailwindClassNames\n}\n\nconst joinClassNames = (...parts: Array<string | undefined | false | null>) =>\n parts.filter(Boolean).join(' ')\n\nconst toCssSize = (value: number | string | undefined) =>\n typeof value === 'number' ? `${value}px` : value\n\nconst findFirstEnabledIndex = (items: ArcTabItem[]) => items.findIndex((item) => !item.disabled)\n\nconst getEnabledIndices = (items: ArcTabItem[]) =>\n items.reduce<number[]>((acc, item, index) => {\n if (!item.disabled) acc.push(index)\n return acc\n }, [])\n\nconst getNextEnabledIndex = (enabledIndices: number[], currentIndex: number, direction: 1 | -1) => {\n if (!enabledIndices.length) return -1\n\n const currentPosition = enabledIndices.indexOf(currentIndex)\n if (currentPosition === -1) {\n return direction === 1 ? (enabledIndices[0] ?? -1) : (enabledIndices.at(-1) ?? -1)\n }\n\n const nextPosition = (currentPosition + direction + enabledIndices.length) % enabledIndices.length\n return enabledIndices[nextPosition] ?? -1\n}\n\nconst sizeClassMap: Record<ArcTabsSize, string> = {\n sm: 'min-h-9 px-3 py-1.5 text-sm',\n md: 'min-h-10 px-4 py-2 text-[0.95rem]',\n lg: 'min-h-12 px-5 py-2.5 text-base',\n}\n\nexport function ArcTabsTailwind({\n items,\n value,\n defaultValue,\n onValueChange,\n activationMode = 'automatic',\n keepMounted = true,\n size = 'md',\n fit = 'content',\n motionPreset = 'subtle',\n motionDuration = 260,\n ariaLabel = 'Tabs',\n listId,\n tabsClassName,\n panelClassName,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n emptyState = null,\n renderTabLabel,\n renderPanel,\n className,\n style,\n classNames,\n ...rest\n}: ArcTabsTailwindProps) {\n const reactId = React.useId()\n const baseId = React.useMemo(\n () => (listId ?? `arc-tabs-${reactId}`).replace(/:/g, ''),\n [listId, reactId],\n )\n\n const isControlled = value !== undefined\n\n const firstEnabledIndex = React.useMemo(() => findFirstEnabledIndex(items), [items])\n\n const [uncontrolledValue, setUncontrolledValue] = React.useState<string | undefined>(() => {\n const requested = defaultValue\n const requestedMatch = items.find((item) => !item.disabled && item.id === requested)\n if (requestedMatch) return requestedMatch.id\n return firstEnabledIndex >= 0 ? items[firstEnabledIndex]?.id : undefined\n })\n\n const rawValue = isControlled ? value : uncontrolledValue\n\n const strictSelectedIndex = React.useMemo(\n () => items.findIndex((item) => !item.disabled && item.id === rawValue),\n [items, rawValue],\n )\n\n const selectedIndex = strictSelectedIndex >= 0 ? strictSelectedIndex : firstEnabledIndex\n\n const selectedItem = selectedIndex >= 0 ? items[selectedIndex] : undefined\n\n React.useEffect(() => {\n if (isControlled) return\n if (strictSelectedIndex !== -1) return\n\n if (firstEnabledIndex !== -1) {\n const fallbackId = items[firstEnabledIndex]?.id\n setUncontrolledValue(fallbackId)\n } else {\n setUncontrolledValue(undefined)\n }\n }, [isControlled, strictSelectedIndex, firstEnabledIndex, items])\n\n const [focusedIndex, setFocusedIndex] = React.useState<number>(selectedIndex)\n\n React.useEffect(() => {\n if (selectedIndex === -1) {\n setFocusedIndex(-1)\n return\n }\n\n if (focusedIndex < 0 || focusedIndex >= items.length || items[focusedIndex]?.disabled) {\n setFocusedIndex(selectedIndex)\n }\n }, [focusedIndex, selectedIndex, items])\n\n const enabledIndices = React.useMemo(() => getEnabledIndices(items), [items])\n\n const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const listScrollRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const activePanelRef = React.useRef<HTMLElement | null>(null)\n const hasMountedRef = React.useRef(false)\n const previousSelectedIndexRef = React.useRef(selectedIndex)\n\n const [hasInteracted, setHasInteracted] = React.useState(false)\n const [panelDirection, setPanelDirection] = React.useState<'forward' | 'backward' | 'none'>(\n 'none',\n )\n const [indicator, setIndicator] = React.useState({\n x: 0,\n width: 0,\n ready: false,\n })\n\n const effectiveMotionDuration = motionPreset === 'none' ? 0 : Math.max(0, motionDuration)\n const showSlidingIndicator = motionPreset === 'expressive' && selectedIndex >= 0\n\n React.useEffect(() => {\n tabRefs.current = tabRefs.current.slice(0, items.length)\n }, [items.length])\n\n React.useEffect(() => {\n const previous = previousSelectedIndexRef.current\n\n if (!hasMountedRef.current) {\n hasMountedRef.current = true\n previousSelectedIndexRef.current = selectedIndex\n return\n }\n\n if (previous !== selectedIndex) {\n setHasInteracted(true)\n\n if (selectedIndex >= 0 && previous >= 0) {\n setPanelDirection(selectedIndex > previous ? 'forward' : 'backward')\n }\n }\n\n previousSelectedIndexRef.current = selectedIndex\n }, [selectedIndex])\n\n const focusTabIndex = React.useCallback((index: number) => {\n if (index < 0) return\n setFocusedIndex(index)\n tabRefs.current[index]?.focus()\n }, [])\n\n const selectTab = React.useCallback(\n (index: number) => {\n const item = items[index]\n if (!item || item.disabled) return\n if (index === selectedIndex) {\n setFocusedIndex(index)\n return\n }\n\n setHasInteracted(true)\n if (selectedIndex >= 0) {\n setPanelDirection(index > selectedIndex ? 'forward' : 'backward')\n }\n\n if (!isControlled) {\n setUncontrolledValue(item.id)\n }\n\n setFocusedIndex(index)\n onValueChange?.(item.id, item, index)\n },\n [items, selectedIndex, isControlled, onValueChange],\n )\n\n const syncIndicator = React.useCallback(() => {\n if (!showSlidingIndicator) {\n setIndicator((previous) =>\n previous.ready || previous.width !== 0 || previous.x !== 0\n ? { x: 0, width: 0, ready: false }\n : previous,\n )\n return\n }\n\n const selectedTab = selectedIndex >= 0 ? (tabRefs.current[selectedIndex] ?? null) : null\n const listElement = listRef.current\n\n if (!listElement || !selectedTab) return\n\n const nextX = selectedTab.offsetLeft\n const nextWidth = selectedTab.offsetWidth\n\n setIndicator((previous) => {\n const changedX = Math.abs(previous.x - nextX) > 0.5\n const changedWidth = Math.abs(previous.width - nextWidth) > 0.5\n if (!changedX && !changedWidth && previous.ready) {\n return previous\n }\n\n return {\n x: nextX,\n width: nextWidth,\n ready: true,\n }\n })\n }, [selectedIndex, showSlidingIndicator])\n\n React.useEffect(() => {\n syncIndicator()\n }, [syncIndicator, items.length, size, fit])\n\n React.useEffect(() => {\n if (!showSlidingIndicator) return\n\n const listElement = listRef.current\n const listScrollElement = listScrollRef.current\n if (!listElement) return\n\n const onResize = () => {\n syncIndicator()\n }\n\n const frame = requestAnimationFrame(syncIndicator)\n\n let observer: ResizeObserver | null = null\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n syncIndicator()\n })\n observer.observe(listElement)\n if (listScrollElement) {\n observer.observe(listScrollElement)\n }\n tabRefs.current.forEach((tabElement) => {\n if (tabElement) observer?.observe(tabElement)\n })\n }\n\n window.addEventListener('resize', onResize)\n\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('resize', onResize)\n observer?.disconnect()\n }\n }, [showSlidingIndicator, syncIndicator, items.length])\n\n React.useEffect(() => {\n if (!hasInteracted || motionPreset === 'none' || effectiveMotionDuration <= 0) {\n return\n }\n\n const panelElement = activePanelRef.current\n if (!panelElement || typeof panelElement.animate !== 'function') {\n return\n }\n\n if (\n typeof globalThis.window !== 'undefined' &&\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n ) {\n return\n }\n\n const offsetX =\n motionPreset === 'expressive'\n ? panelDirection === 'forward'\n ? 20\n : panelDirection === 'backward'\n ? -20\n : 0\n : 0\n\n const offsetY = motionPreset === 'expressive' ? 10 : 6\n const startScale = motionPreset === 'expressive' ? 0.985 : 0.995\n\n const animation = panelElement.animate(\n [\n {\n opacity: 0,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0) scale(${startScale})`,\n filter: 'blur(1px)',\n },\n {\n opacity: 1,\n transform: 'translate3d(0, 0, 0) scale(1)',\n filter: 'blur(0px)',\n },\n ],\n {\n duration: effectiveMotionDuration,\n easing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n fill: 'both',\n },\n )\n\n return () => {\n animation.cancel()\n }\n }, [selectedIndex, hasInteracted, motionPreset, panelDirection, effectiveMotionDuration])\n\n const handleTabKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {\n if (!enabledIndices.length) return\n\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault()\n const next = getNextEnabledIndex(enabledIndices, index, 1)\n if (next !== -1) {\n focusTabIndex(next)\n if (activationMode === 'automatic') selectTab(next)\n }\n break\n }\n case 'ArrowLeft': {\n event.preventDefault()\n const previous = getNextEnabledIndex(enabledIndices, index, -1)\n if (previous !== -1) {\n focusTabIndex(previous)\n if (activationMode === 'automatic') selectTab(previous)\n }\n break\n }\n case 'Home': {\n event.preventDefault()\n const first = enabledIndices[0]\n if (first !== undefined) {\n focusTabIndex(first)\n if (activationMode === 'automatic') selectTab(first)\n }\n break\n }\n case 'End': {\n event.preventDefault()\n const last = enabledIndices.at(-1)\n if (last !== undefined) {\n focusTabIndex(last)\n if (activationMode === 'automatic') selectTab(last)\n }\n break\n }\n case 'Enter':\n case ' ':\n case 'Spacebar': {\n if (activationMode === 'manual') {\n event.preventDefault()\n selectTab(index)\n }\n break\n }\n default:\n break\n }\n },\n [activationMode, enabledIndices, focusTabIndex, selectTab],\n )\n\n const themedStyle = React.useMemo<React.CSSProperties>(() => {\n const cssVars: CSSVarStyle = { ...style }\n\n if (radius !== undefined) {\n cssVars['--arc-radius'] = `${radius}px`\n }\n if (gap !== undefined) {\n cssVars['--arc-gap'] = `${gap}px`\n }\n\n const seamGapValue = toCssSize(seamGap)\n const hasCustomSeamGap = Object.prototype.hasOwnProperty.call(cssVars, '--arc-seam-gap')\n if (seamGapValue !== undefined) {\n cssVars['--arc-seam-gap'] = seamGapValue\n } else if (!hasCustomSeamGap) {\n cssVars['--arc-seam-gap'] = '0px'\n }\n\n const notchValue = toCssSize(notch)\n const hasCustomNotch = Object.prototype.hasOwnProperty.call(cssVars, '--arc-notch')\n if (notchValue !== undefined) {\n cssVars['--arc-notch'] = notchValue\n } else if (!hasCustomNotch) {\n cssVars['--arc-notch'] = 'clamp(8px, calc(var(--arc-radius) * 0.72), 14px)'\n }\n\n const panelPaddingValue = toCssSize(panelPadding)\n if (panelPaddingValue !== undefined) {\n cssVars['--arc-panel-padding'] = panelPaddingValue\n }\n if (accentColor) {\n cssVars['--arc-accent'] = accentColor\n }\n if (tabBackground) {\n cssVars['--arc-tab-bg'] = tabBackground\n }\n if (tabHoverBackground) {\n cssVars['--arc-tab-hover-bg'] = tabHoverBackground\n }\n if (panelBackground) {\n cssVars['--arc-panel-bg'] = panelBackground\n }\n if (panelBorderColor) {\n cssVars['--arc-panel-border'] = panelBorderColor\n }\n cssVars['--arc-motion-duration'] = `${effectiveMotionDuration}ms`\n\n const isFirst = selectedIndex === 0\n const isLast = selectedIndex === items.length - 1\n cssVars['--arc-panel-tl-radius'] = isFirst ? '0px' : 'var(--arc-radius)'\n cssVars['--arc-panel-tr-radius'] = isLast ? '0px' : 'var(--arc-radius)'\n\n return cssVars\n }, [\n style,\n radius,\n gap,\n seamGap,\n notch,\n panelPadding,\n accentColor,\n tabBackground,\n tabHoverBackground,\n panelBackground,\n panelBorderColor,\n effectiveMotionDuration,\n selectedIndex,\n items.length,\n ])\n\n const rootClassName = joinClassNames(\n 'arc-tabs-tw w-full text-[var(--arc-text)] [--arc-radius:14px] [--arc-gap:2px] [--arc-seam-gap:0px] [--arc-border-width:1px] [--arc-accent:#5b4ff1] [--arc-text:#171a2c] [--arc-tab-bg:#e7ebff] [--arc-strip-bg:#edf1ff] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] dark:[--arc-text:#edf1ff] dark:[--arc-tab-bg:#2c3555] dark:[--arc-strip-bg:#26304d] dark:[--arc-tab-hover-bg:#374268] dark:[--arc-panel-bg:#1c243b] dark:[--arc-panel-border:#46527e]',\n classNames?.root,\n className,\n )\n\n const listClassName = joinClassNames(\n 'relative m-0 flex min-w-full list-none items-end gap-[var(--arc-gap)] overflow-visible rounded-t-[var(--arc-radius)] border border-b-0 border-[var(--arc-panel-border)] bg-[var(--arc-strip-bg)] px-[calc(var(--arc-gap)*0.6)] pb-[var(--arc-seam-gap)] pt-[calc(var(--arc-gap)*0.6)] isolate',\n classNames?.list,\n tabsClassName,\n )\n\n const listScrollClassName =\n 'relative -mb-[calc(var(--arc-notch)+var(--arc-seam-gap))] overflow-x-auto overflow-y-visible pb-[calc(var(--arc-notch)+var(--arc-seam-gap))] [scrollbar-width:thin]'\n\n const panelsClassName = joinClassNames(\n 'relative z-[2] mt-0 rounded-bl-[var(--arc-radius)] rounded-br-[var(--arc-radius)] rounded-tl-[var(--arc-panel-tl-radius)] rounded-tr-[var(--arc-panel-tr-radius)] border border-t-0 border-[var(--arc-panel-border)] bg-[var(--arc-panel-bg)] p-[var(--arc-panel-padding)] shadow-[0_12px_32px_rgba(15,23,42,0.12)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]',\n classNames?.panels,\n panelClassName,\n )\n\n const renderDefaultLabel = (item: ArcTabItem) => (\n <>\n {item.icon ? (\n <span className={joinClassNames('inline-flex leading-none', classNames?.icon)}>\n {item.icon}\n </span>\n ) : null}\n <span className={joinClassNames('inline-block', classNames?.text)}>{item.label}</span>\n {item.badge !== undefined ? (\n <span\n className={joinClassNames(\n 'inline-flex min-w-5 items-center justify-center rounded-full bg-[var(--arc-accent)] px-1.5 py-0.5 text-[0.72em] font-bold text-white/95',\n classNames?.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </>\n )\n\n const renderPanelContent = (item: ArcTabItem, state: ArcTabsRenderState) =>\n renderPanel ? renderPanel(item, state) : item.content\n\n const indicatorStyle = React.useMemo<CSSVarStyle>(\n () => ({\n '--arc-indicator-x': `${indicator.x}px`,\n '--arc-indicator-w': `${indicator.width}px`,\n }),\n [indicator.x, indicator.width],\n )\n\n const indicatorClassName = joinClassNames(\n 'pointer-events-none absolute left-0 top-0 z-[1] h-[calc(100%-var(--arc-seam-gap))] w-[var(--arc-indicator-w)] translate-x-[var(--arc-indicator-x)] rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] opacity-0 [box-shadow:0_var(--arc-seam-gap)_0_var(--arc-panel-bg)] transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]',\n indicator.ready && 'opacity-100',\n classNames?.indicator,\n )\n\n return (\n <div className={rootClassName} style={themedStyle} data-slot=\"root\" {...rest}>\n <div ref={listScrollRef} className={listScrollClassName} data-slot=\"list-scroll\">\n <ul\n ref={listRef}\n className={listClassName}\n role=\"tablist\"\n aria-label={ariaLabel}\n id={`${baseId}-list`}\n data-slot=\"list\"\n >\n {showSlidingIndicator ? (\n <li\n aria-hidden=\"true\"\n role=\"presentation\"\n className={indicatorClassName}\n style={indicatorStyle}\n data-slot=\"indicator\"\n />\n ) : null}\n\n {items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n const tabIndexValue = disabled\n ? -1\n : focusedIndex === index || (focusedIndex === -1 && selected)\n ? 0\n : -1\n\n const itemClassName = joinClassNames(\n fit === 'equal'\n ? selected\n ? 'relative z-[4] min-w-0 flex-1'\n : 'relative z-[2] min-w-0 flex-1'\n : selected\n ? 'relative z-[4] shrink-0'\n : 'relative z-[2] shrink-0',\n classNames?.item,\n )\n\n const tabClassName = joinClassNames(\n \"relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--arc-radius)] border border-[var(--arc-panel-border)] bg-[var(--arc-tab-bg)] text-inherit font-semibold leading-none select-none transition-[background-color,color,transform,border-color,box-shadow] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--arc-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--arc-panel-bg)] disabled:cursor-not-allowed disabled:opacity-45 before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[calc(var(--arc-seam-gap)+var(--arc-border-width))] before:w-[calc(100%+var(--arc-notch)*2)] before:translate-y-full before:bg-[linear-gradient(var(--arc-panel-bg),_var(--arc-panel-bg))_center_top/calc(100%-var(--arc-notch)*2+1px)_100%_no-repeat] before:opacity-0 before:content-[''] before:transition-[opacity,transform] before:[transition-duration:var(--arc-motion-duration)] before:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] after:pointer-events-none after:absolute after:bottom-0 after:left-[calc(var(--arc-notch)*-1)] after:h-[var(--arc-notch)] after:w-[calc(100%+var(--arc-notch)*2)] after:translate-y-[calc(100%+var(--arc-seam-gap))] after:bg-[radial-gradient(circle_var(--arc-notch)_at_100%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_transparent_var(--arc-notch),_var(--arc-panel-bg)_calc(var(--arc-notch)+0.5px))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:opacity-0 after:content-[''] after:transition-[opacity,transform] after:[transition-duration:var(--arc-motion-duration)] after:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)]\",\n sizeClassMap[size],\n fit === 'equal' && 'w-full justify-center',\n selected\n ? joinClassNames(\n 'z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100',\n 'bg-[var(--arc-panel-bg)]',\n )\n : 'enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]',\n selected ? classNames?.tabSelected : classNames?.tabUnselected,\n disabled && classNames?.tabDisabled,\n classNames?.tab,\n )\n\n return (\n <li className={itemClassName} key={item.id} role=\"presentation\" data-slot=\"item\">\n <button\n id={tabId}\n ref={(node) => {\n tabRefs.current[index] = node\n }}\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n aria-controls={panelId}\n tabIndex={tabIndexValue}\n disabled={disabled}\n className={tabClassName}\n onFocus={() => {\n setFocusedIndex(index)\n }}\n onClick={() => {\n selectTab(index)\n }}\n onKeyDown={(event) => {\n handleTabKeyDown(event, index)\n }}\n data-slot=\"tab\"\n >\n {renderTabLabel ? renderTabLabel(item, state) : renderDefaultLabel(item)}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n <div className={panelsClassName} data-slot=\"panels\">\n {items.length === 0 && emptyState}\n\n {items.length > 0 && selectedItem === undefined && emptyState}\n\n {items.length > 0 && selectedItem !== undefined && keepMounted\n ? items.map((item, index) => {\n const selected = index === selectedIndex\n const disabled = Boolean(item.disabled)\n const tabId = `${baseId}-tab-${index}`\n const panelId = `${baseId}-panel-${index}`\n const state: ArcTabsRenderState = { index, selected, disabled }\n\n return (\n <section\n key={item.id}\n ref={(node) => {\n if (selected) {\n activePanelRef.current = node\n }\n }}\n id={panelId}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={tabId}\n aria-hidden={!selected}\n hidden={!selected}\n data-slot=\"panel\"\n >\n {renderPanelContent(item, state)}\n </section>\n )\n })\n : null}\n\n {items.length > 0 && selectedItem !== undefined && !keepMounted ? (\n <section\n ref={(node) => {\n activePanelRef.current = node\n }}\n id={`${baseId}-panel-${selectedIndex}`}\n className={joinClassNames('outline-none', classNames?.panel)}\n role=\"tabpanel\"\n aria-labelledby={`${baseId}-tab-${selectedIndex}`}\n aria-hidden={false}\n data-slot=\"panel\"\n >\n {renderPanelContent(selectedItem, {\n index: selectedIndex,\n selected: true,\n disabled: Boolean(selectedItem.disabled),\n })}\n </section>\n ) : null}\n </div>\n </div>\n )\n}\n"],"mappings":";AAEA,YAAY,WAAW;AAogBnB,mBACe,KADf;AA9cJ,IAAM,iBAAiB,IAAI,UACzB,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AAEhC,IAAM,YAAY,CAAC,UACjB,OAAO,UAAU,WAAW,GAAG,KAAK,OAAO;AAE7C,IAAM,wBAAwB,CAAC,UAAwB,MAAM,UAAU,CAAC,SAAS,CAAC,KAAK,QAAQ;AAE/F,IAAM,oBAAoB,CAAC,UACzB,MAAM,OAAiB,CAAC,KAAK,MAAM,UAAU;AAC3C,MAAI,CAAC,KAAK,SAAU,KAAI,KAAK,KAAK;AAClC,S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AAK,CAAC,SAAS;AACb,kBAAI,UAAU;AACZ,+BAAe,UAAU;AAAA,cAC3B;AAAA,YACF;AAAA,YACA,IAAI;AAAA,YACJ,WAAWE,gBAAe,gBAAgB,YAAY,KAAK;AAAA,YAC3D,MAAK;AAAA,YACL,mBAAiB;AAAA,YACjB,eAAa,CAAC;AAAA,YACd,QAAQ,CAAC;AAAA,YACT,aAAU;AAAA,YAET,6BAAmB,MAAM,KAAK;AAAA;AAAA,UAd1B,KAAK;AAAA,QAeZ;AAAA,MAEJ,CAAC,IACD;AAAA,MAEH,MAAM,SAAS,KAAK,iBAAiB,UAAa,CAAC,cAClD,gBAAAF;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,CAAC,SAAS;AACb,2BAAe,UAAU;AAAA,UAC3B;AAAA,UACA,IAAI,GAAG,MAAM,UAAU,aAAa;AAAA,UACpC,WAAWE,gBAAe,gBAAgB,YAAY,KAAK;AAAA,UAC3D,MAAK;AAAA,UACL,mBAAiB,GAAG,MAAM,QAAQ,aAAa;AAAA,UAC/C,eAAa;AAAA,UACb,aAAU;AAAA,UAET,6BAAmB,cAAc;AAAA,YAChC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAU,QAAQ,aAAa,QAAQ;AAAA,UACzC,CAAC;AAAA;AAAA,MACH,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":["React","Fragment","jsx","jsxs","joinClassNames","toCssSize","findFirstEnabledIndex","getEnabledIndices","getNextEnabledIndex"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entro314labs/react-arc-tabs",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "description": "Reusable arc-style tabs component for React and Next.js projects",
6
6
  "keywords": [