@entro314labs/react-arc-tabs 1.0.16 → 1.0.17

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
@@ -130,6 +130,7 @@ export default function Page() {
130
130
  - `motionDuration?: number`
131
131
  - `seamGap?: number | string` (vertical distance between active tab and panel; default `0` for a fused shape)
132
132
  - `notch?: number | string` (controls inverted corner curve size)
133
+ - `cutoutColor?: string` (color of the concave seam cutouts; defaults to strip background)
133
134
  - `keepMounted?: boolean`
134
135
  - `ariaLabel?: string`
135
136
 
package/dist/ArcTabs.css CHANGED
@@ -16,6 +16,7 @@
16
16
  --arc-text: #171a2c;
17
17
  --arc-tab-bg: #e7ebff;
18
18
  --arc-strip-bg: #edf1ff;
19
+ --arc-cutout-bg: var(--arc-strip-bg);
19
20
  --arc-tab-hover-bg: #dce3ff;
20
21
  --arc-panel-bg: #ffffff;
21
22
  --arc-panel-border: #cfd6f5;
@@ -108,11 +109,11 @@
108
109
  bottom: 0;
109
110
  left: calc(var(--arc-notch) * -1);
110
111
  width: calc(100% + (var(--arc-notch) * 2));
111
- height: calc(var(--arc-seam-gap) + var(--arc-border-width));
112
+ height: var(--arc-seam-gap);
112
113
  transform: translateY(100%);
113
114
  background:
114
115
  linear-gradient(var(--arc-panel-bg), var(--arc-panel-bg))
115
- center top / calc(100% - (var(--arc-notch) * 2) + 1px) 100% no-repeat;
116
+ center top / calc(100% - (var(--arc-notch) * 2)) 100% no-repeat;
116
117
  }
117
118
 
118
119
  .arc-tabs__active-indicator::after {
@@ -124,13 +125,13 @@
124
125
  background:
125
126
  radial-gradient(
126
127
  circle var(--arc-notch) at 100% 0%,
127
- var(--arc-strip-bg) calc(var(--arc-notch) - 0.5px),
128
+ var(--arc-cutout-bg) calc(var(--arc-notch) - 0.5px),
128
129
  transparent var(--arc-notch)
129
130
  )
130
131
  left top / var(--arc-notch) var(--arc-notch) no-repeat,
131
132
  radial-gradient(
132
133
  circle var(--arc-notch) at 0% 0%,
133
- var(--arc-strip-bg) calc(var(--arc-notch) - 0.5px),
134
+ var(--arc-cutout-bg) calc(var(--arc-notch) - 0.5px),
134
135
  transparent var(--arc-notch)
135
136
  )
136
137
  right top / var(--arc-notch) var(--arc-notch) no-repeat;
@@ -230,11 +231,11 @@
230
231
  bottom: 0;
231
232
  left: calc(var(--arc-notch) * -1);
232
233
  width: calc(100% + (var(--arc-notch) * 2));
233
- height: calc(var(--arc-seam-gap) + var(--arc-border-width));
234
+ height: var(--arc-seam-gap);
234
235
  transform: translateY(100%);
235
236
  background:
236
237
  linear-gradient(var(--arc-panel-bg), var(--arc-panel-bg))
237
- center top / calc(100% - (var(--arc-notch) * 2) + 1px) 100% no-repeat;
238
+ center top / calc(100% - (var(--arc-notch) * 2)) 100% no-repeat;
238
239
  }
239
240
 
240
241
  .arc-tabs__tab::after {
@@ -246,13 +247,13 @@
246
247
  background:
247
248
  radial-gradient(
248
249
  circle var(--arc-notch) at 100% 0%,
249
- var(--arc-strip-bg) calc(var(--arc-notch) - 0.5px),
250
+ var(--arc-cutout-bg) calc(var(--arc-notch) - 0.5px),
250
251
  transparent var(--arc-notch)
251
252
  )
252
253
  left top / var(--arc-notch) var(--arc-notch) no-repeat,
253
254
  radial-gradient(
254
255
  circle var(--arc-notch) at 0% 0%,
255
- var(--arc-strip-bg) calc(var(--arc-notch) - 0.5px),
256
+ var(--arc-cutout-bg) calc(var(--arc-notch) - 0.5px),
256
257
  transparent var(--arc-notch)
257
258
  )
258
259
  right top / var(--arc-notch) var(--arc-notch) no-repeat;
@@ -267,6 +268,7 @@
267
268
  z-index: 3;
268
269
  color: color-mix(in srgb, var(--arc-accent) 85%, black 15%);
269
270
  border-color: var(--arc-panel-bg);
271
+ border-bottom-width: 0;
270
272
  background: var(--arc-panel-bg);
271
273
  border-bottom-left-radius: 0;
272
274
  border-bottom-right-radius: 0;
@@ -305,6 +307,7 @@
305
307
  border-top-right-radius: var(--arc-panel-tr-radius);
306
308
  border-bottom-left-radius: var(--arc-radius);
307
309
  border-bottom-right-radius: var(--arc-radius);
310
+ overflow: hidden;
308
311
  background: var(--arc-panel-bg);
309
312
  padding: var(--arc-panel-padding);
310
313
  box-shadow: var(--arc-surface-shadow);
@@ -318,6 +321,7 @@
318
321
  }
319
322
 
320
323
  .arc-tabs__panel {
324
+ border-radius: inherit;
321
325
  outline: none;
322
326
  }
323
327
 
package/dist/index.cjs CHANGED
@@ -79,6 +79,7 @@ function ArcTabs({
79
79
  tabHoverBackground,
80
80
  panelBackground,
81
81
  panelBorderColor,
82
+ cutoutColor,
82
83
  emptyState = null,
83
84
  renderTabLabel,
84
85
  renderPanel,
@@ -377,6 +378,12 @@ function ArcTabs({
377
378
  if (panelBorderColor) {
378
379
  cssVars["--arc-panel-border"] = panelBorderColor;
379
380
  }
381
+ const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, "--arc-cutout-bg");
382
+ if (cutoutColor) {
383
+ cssVars["--arc-cutout-bg"] = cutoutColor;
384
+ } else if (!hasCustomCutoutColor) {
385
+ cssVars["--arc-cutout-bg"] = "var(--arc-strip-bg)";
386
+ }
380
387
  cssVars["--arc-motion-duration"] = `${effectiveMotionDuration}ms`;
381
388
  const isFirst = selectedIndex === 0;
382
389
  const isLast = selectedIndex === items.length - 1;
@@ -395,6 +402,7 @@ function ArcTabs({
395
402
  tabHoverBackground,
396
403
  panelBackground,
397
404
  panelBorderColor,
405
+ cutoutColor,
398
406
  effectiveMotionDuration,
399
407
  selectedIndex,
400
408
  items.length
@@ -584,6 +592,7 @@ function ArcTabsTailwind({
584
592
  tabHoverBackground,
585
593
  panelBackground,
586
594
  panelBorderColor,
595
+ cutoutColor,
587
596
  emptyState = null,
588
597
  renderTabLabel,
589
598
  renderPanel,
@@ -883,6 +892,12 @@ function ArcTabsTailwind({
883
892
  if (panelBorderColor) {
884
893
  cssVars["--arc-panel-border"] = panelBorderColor;
885
894
  }
895
+ const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, "--arc-cutout-bg");
896
+ if (cutoutColor) {
897
+ cssVars["--arc-cutout-bg"] = cutoutColor;
898
+ } else if (!hasCustomCutoutColor) {
899
+ cssVars["--arc-cutout-bg"] = "var(--arc-strip-bg)";
900
+ }
886
901
  cssVars["--arc-motion-duration"] = `${effectiveMotionDuration}ms`;
887
902
  const isFirst = selectedIndex === 0;
888
903
  const isLast = selectedIndex === items.length - 1;
@@ -901,12 +916,13 @@ function ArcTabsTailwind({
901
916
  tabHoverBackground,
902
917
  panelBackground,
903
918
  panelBorderColor,
919
+ cutoutColor,
904
920
  effectiveMotionDuration,
905
921
  selectedIndex,
906
922
  items.length
907
923
  ]);
908
924
  const rootClassName = joinClassNames2(
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] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]",
925
+ "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-cutout-bg:var(--arc-strip-bg)] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]",
910
926
  classNames?.root,
911
927
  className
912
928
  );
@@ -917,7 +933,7 @@ function ArcTabsTailwind({
917
933
  );
918
934
  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]";
919
935
  const panelsClassName = joinClassNames2(
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-[var(--arc-surface-shadow)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
936
+ "relative z-[2] mt-0 overflow-hidden 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-[var(--arc-surface-shadow)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
921
937
  classNames?.panels,
922
938
  panelClassName
923
939
  );
@@ -944,7 +960,7 @@ function ArcTabsTailwind({
944
960
  [indicator.x, indicator.width]
945
961
  );
946
962
  const indicatorClassName = joinClassNames2(
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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] 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:content-[''] 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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']",
963
+ "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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-seam-gap)] 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)_100%_no-repeat] before:content-[''] 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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']",
948
964
  indicator.ready && "opacity-100",
949
965
  classNames?.indicator
950
966
  );
@@ -981,11 +997,11 @@ function ArcTabsTailwind({
981
997
  classNames?.item
982
998
  );
983
999
  const tabClassName = joinClassNames2(
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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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)]",
1000
+ "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-seam-gap)] 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)_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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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)]",
985
1001
  sizeClassMap[size],
986
1002
  fit === "equal" && "w-full justify-center",
987
1003
  selected ? joinClassNames2(
988
- "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]",
1004
+ "z-[3] rounded-b-none border-b-0 border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]",
989
1005
  "bg-[var(--arc-panel-bg)]"
990
1006
  ) : "enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]",
991
1007
  selected ? classNames?.tabSelected : classNames?.tabUnselected,
@@ -1041,7 +1057,7 @@ function ArcTabsTailwind({
1041
1057
  }
1042
1058
  },
1043
1059
  id: panelId,
1044
- className: joinClassNames2("outline-none", classNames?.panel),
1060
+ className: joinClassNames2("outline-none rounded-[inherit]", classNames?.panel),
1045
1061
  role: "tabpanel",
1046
1062
  "aria-labelledby": tabId,
1047
1063
  "aria-hidden": !selected,
@@ -1059,7 +1075,7 @@ function ArcTabsTailwind({
1059
1075
  activePanelRef.current = node;
1060
1076
  },
1061
1077
  id: `${baseId}-panel-${selectedIndex}`,
1062
- className: joinClassNames2("outline-none", classNames?.panel),
1078
+ className: joinClassNames2("outline-none rounded-[inherit]", classNames?.panel),
1063
1079
  role: "tabpanel",
1064
1080
  "aria-labelledby": `${baseId}-tab-${selectedIndex}`,
1065
1081
  "aria-hidden": false,
@@ -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 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] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]',\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-[var(--arc-surface-shadow)] 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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] 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:content-[''] 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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']\",\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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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 shadow-[var(--arc-surface-shadow)]',\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;AAogBnB;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,SAAO;AACT,GAAG,CAAC,CAAC;AAEP,IAAM,sBAAsB,CAAC,gBAA0B,cAAsB,cAAsB;AACjG,MAAI,CAAC,eAAe,OAAQ,QAAO;AAEnC,QAAM,kBAAkB,eAAe,QAAQ,YAAY;AAC3D,MAAI,oBAAoB,IAAI;AAC1B,WAAO,cAAc,IAAK,eAAe,CAAC,KAAK,KAAO,eAAe,GAAG,EAAE,KAAK;AAAA,EACjF;AAEA,QAAM,gBAAgB,kBAAkB,YAAY,eAAe,UAAU,eAAe;AAC5F,SAAO,eAAe,YAAY,KAAK;AACzC;AAEO,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,OAAO;AAAA,EACP,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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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 cutoutColor?: 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 cutoutColor,\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 const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, '--arc-cutout-bg')\n if (cutoutColor) {\n cssVars['--arc-cutout-bg'] = cutoutColor\n } else if (!hasCustomCutoutColor) {\n cssVars['--arc-cutout-bg'] = 'var(--arc-strip-bg)'\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 cutoutColor,\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 cutoutColor,\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 const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, '--arc-cutout-bg')\n if (cutoutColor) {\n cssVars['--arc-cutout-bg'] = cutoutColor\n } else if (!hasCustomCutoutColor) {\n cssVars['--arc-cutout-bg'] = 'var(--arc-strip-bg)'\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 cutoutColor,\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-cutout-bg:var(--arc-strip-bg)] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]',\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 overflow-hidden 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-[var(--arc-surface-shadow)] 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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-seam-gap)] 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)_100%_no-repeat] before:content-[''] 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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']\",\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-seam-gap)] 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)_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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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-b-0 border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]',\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 rounded-[inherit]', 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 rounded-[inherit]', 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;AA6gBnB;AAtdJ,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,SAAO;AACT,GAAG,CAAC,CAAC;AAEP,IAAM,sBAAsB,CAAC,gBAA0B,cAAsB,cAAsB;AACjG,MAAI,CAAC,eAAe,OAAQ,QAAO;AAEnC,QAAM,kBAAkB,eAAe,QAAQ,YAAY;AAC3D,MAAI,oBAAoB,IAAI;AAC1B,WAAO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4B,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,kCAAkC,YAAY,KAAK;AAAA,YAC7E,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,kCAAkC,YAAY,KAAK;AAAA,UAC7E,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
@@ -43,11 +43,12 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
43
43
  tabHoverBackground?: string;
44
44
  panelBackground?: string;
45
45
  panelBorderColor?: string;
46
+ cutoutColor?: string;
46
47
  emptyState?: React.ReactNode;
47
48
  renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
48
49
  renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
49
50
  }
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;
51
+ 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, cutoutColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
51
52
 
52
53
  interface ArcTabsTailwindClassNames {
53
54
  root?: string;
@@ -67,6 +68,6 @@ interface ArcTabsTailwindClassNames {
67
68
  interface ArcTabsTailwindProps extends ArcTabsProps {
68
69
  classNames?: ArcTabsTailwindClassNames;
69
70
  }
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;
71
+ 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, cutoutColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
71
72
 
72
73
  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
@@ -43,11 +43,12 @@ interface ArcTabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'child
43
43
  tabHoverBackground?: string;
44
44
  panelBackground?: string;
45
45
  panelBorderColor?: string;
46
+ cutoutColor?: string;
46
47
  emptyState?: React.ReactNode;
47
48
  renderTabLabel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
48
49
  renderPanel?: (item: ArcTabItem, state: ArcTabsRenderState) => React.ReactNode;
49
50
  }
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;
51
+ 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, cutoutColor, emptyState, renderTabLabel, renderPanel, className, style, ...rest }: ArcTabsProps): react_jsx_runtime.JSX.Element;
51
52
 
52
53
  interface ArcTabsTailwindClassNames {
53
54
  root?: string;
@@ -67,6 +68,6 @@ interface ArcTabsTailwindClassNames {
67
68
  interface ArcTabsTailwindProps extends ArcTabsProps {
68
69
  classNames?: ArcTabsTailwindClassNames;
69
70
  }
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;
71
+ 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, cutoutColor, emptyState, renderTabLabel, renderPanel, className, style, classNames, ...rest }: ArcTabsTailwindProps): react_jsx_runtime.JSX.Element;
71
72
 
72
73
  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
@@ -42,6 +42,7 @@ function ArcTabs({
42
42
  tabHoverBackground,
43
43
  panelBackground,
44
44
  panelBorderColor,
45
+ cutoutColor,
45
46
  emptyState = null,
46
47
  renderTabLabel,
47
48
  renderPanel,
@@ -340,6 +341,12 @@ function ArcTabs({
340
341
  if (panelBorderColor) {
341
342
  cssVars["--arc-panel-border"] = panelBorderColor;
342
343
  }
344
+ const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, "--arc-cutout-bg");
345
+ if (cutoutColor) {
346
+ cssVars["--arc-cutout-bg"] = cutoutColor;
347
+ } else if (!hasCustomCutoutColor) {
348
+ cssVars["--arc-cutout-bg"] = "var(--arc-strip-bg)";
349
+ }
343
350
  cssVars["--arc-motion-duration"] = `${effectiveMotionDuration}ms`;
344
351
  const isFirst = selectedIndex === 0;
345
352
  const isLast = selectedIndex === items.length - 1;
@@ -358,6 +365,7 @@ function ArcTabs({
358
365
  tabHoverBackground,
359
366
  panelBackground,
360
367
  panelBorderColor,
368
+ cutoutColor,
361
369
  effectiveMotionDuration,
362
370
  selectedIndex,
363
371
  items.length
@@ -547,6 +555,7 @@ function ArcTabsTailwind({
547
555
  tabHoverBackground,
548
556
  panelBackground,
549
557
  panelBorderColor,
558
+ cutoutColor,
550
559
  emptyState = null,
551
560
  renderTabLabel,
552
561
  renderPanel,
@@ -846,6 +855,12 @@ function ArcTabsTailwind({
846
855
  if (panelBorderColor) {
847
856
  cssVars["--arc-panel-border"] = panelBorderColor;
848
857
  }
858
+ const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, "--arc-cutout-bg");
859
+ if (cutoutColor) {
860
+ cssVars["--arc-cutout-bg"] = cutoutColor;
861
+ } else if (!hasCustomCutoutColor) {
862
+ cssVars["--arc-cutout-bg"] = "var(--arc-strip-bg)";
863
+ }
849
864
  cssVars["--arc-motion-duration"] = `${effectiveMotionDuration}ms`;
850
865
  const isFirst = selectedIndex === 0;
851
866
  const isLast = selectedIndex === items.length - 1;
@@ -864,12 +879,13 @@ function ArcTabsTailwind({
864
879
  tabHoverBackground,
865
880
  panelBackground,
866
881
  panelBorderColor,
882
+ cutoutColor,
867
883
  effectiveMotionDuration,
868
884
  selectedIndex,
869
885
  items.length
870
886
  ]);
871
887
  const rootClassName = joinClassNames2(
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] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]",
888
+ "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-cutout-bg:var(--arc-strip-bg)] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]",
873
889
  classNames?.root,
874
890
  className
875
891
  );
@@ -880,7 +896,7 @@ function ArcTabsTailwind({
880
896
  );
881
897
  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]";
882
898
  const panelsClassName = joinClassNames2(
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-[var(--arc-surface-shadow)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
899
+ "relative z-[2] mt-0 overflow-hidden 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-[var(--arc-surface-shadow)] transition-[border-radius] duration-[var(--arc-motion-duration)] ease-[cubic-bezier(0.22,1,0.36,1)]",
884
900
  classNames?.panels,
885
901
  panelClassName
886
902
  );
@@ -907,7 +923,7 @@ function ArcTabsTailwind({
907
923
  [indicator.x, indicator.width]
908
924
  );
909
925
  const indicatorClassName = joinClassNames2(
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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] 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:content-[''] 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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']",
926
+ "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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-seam-gap)] 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)_100%_no-repeat] before:content-[''] 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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']",
911
927
  indicator.ready && "opacity-100",
912
928
  classNames?.indicator
913
929
  );
@@ -944,11 +960,11 @@ function ArcTabsTailwind({
944
960
  classNames?.item
945
961
  );
946
962
  const tabClassName = joinClassNames2(
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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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)]",
963
+ "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-seam-gap)] 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)_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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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)]",
948
964
  sizeClassMap[size],
949
965
  fit === "equal" && "w-full justify-center",
950
966
  selected ? joinClassNames2(
951
- "z-[3] rounded-b-none border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]",
967
+ "z-[3] rounded-b-none border-b-0 border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]",
952
968
  "bg-[var(--arc-panel-bg)]"
953
969
  ) : "enabled:hover:bg-[var(--arc-tab-hover-bg)] enabled:hover:translate-y-px enabled:active:translate-y-[2px]",
954
970
  selected ? classNames?.tabSelected : classNames?.tabUnselected,
@@ -1004,7 +1020,7 @@ function ArcTabsTailwind({
1004
1020
  }
1005
1021
  },
1006
1022
  id: panelId,
1007
- className: joinClassNames2("outline-none", classNames?.panel),
1023
+ className: joinClassNames2("outline-none rounded-[inherit]", classNames?.panel),
1008
1024
  role: "tabpanel",
1009
1025
  "aria-labelledby": tabId,
1010
1026
  "aria-hidden": !selected,
@@ -1022,7 +1038,7 @@ function ArcTabsTailwind({
1022
1038
  activePanelRef.current = node;
1023
1039
  },
1024
1040
  id: `${baseId}-panel-${selectedIndex}`,
1025
- className: joinClassNames2("outline-none", classNames?.panel),
1041
+ className: joinClassNames2("outline-none rounded-[inherit]", classNames?.panel),
1026
1042
  role: "tabpanel",
1027
1043
  "aria-labelledby": `${baseId}-tab-${selectedIndex}`,
1028
1044
  "aria-hidden": false,
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 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] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]',\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-[var(--arc-surface-shadow)] 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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] 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:content-[''] 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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']\",\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%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-strip-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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 shadow-[var(--arc-surface-shadow)]',\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,SAAO;AACT,GAAG,CAAC,CAAC;AAEP,IAAM,sBAAsB,CAAC,gBAA0B,cAAsB,cAAsB;AACjG,MAAI,CAAC,eAAe,OAAQ,QAAO;AAEnC,QAAM,kBAAkB,eAAe,QAAQ,YAAY;AAC3D,MAAI,oBAAoB,IAAI;AAC1B,WAAO,cAAc,IAAK,eAAe,CAAC,KAAK,KAAO,eAAe,GAAG,EAAE,KAAK;AAAA,EACjF;AAEA,QAAM,gBAAgB,kBAAkB,YAAY,eAAe,UAAU,eAAe;AAC5F,SAAO,eAAe,YAAY,KAAK;AACzC;AAEO,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,OAAO;AAAA,EACP,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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,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 cutoutColor?: 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 cutoutColor,\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 const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, '--arc-cutout-bg')\n if (cutoutColor) {\n cssVars['--arc-cutout-bg'] = cutoutColor\n } else if (!hasCustomCutoutColor) {\n cssVars['--arc-cutout-bg'] = 'var(--arc-strip-bg)'\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 cutoutColor,\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 cutoutColor,\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 const hasCustomCutoutColor = Object.prototype.hasOwnProperty.call(cssVars, '--arc-cutout-bg')\n if (cutoutColor) {\n cssVars['--arc-cutout-bg'] = cutoutColor\n } else if (!hasCustomCutoutColor) {\n cssVars['--arc-cutout-bg'] = 'var(--arc-strip-bg)'\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 cutoutColor,\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-cutout-bg:var(--arc-strip-bg)] [--arc-tab-hover-bg:#dce3ff] [--arc-panel-bg:#ffffff] [--arc-panel-border:#cfd6f5] [--arc-panel-padding:1rem] [--arc-motion-duration:260ms] [--arc-surface-shadow:0_12px_32px_rgba(15,23,42,0.12)] 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] dark:[--arc-surface-shadow:0_16px_40px_rgba(2,8,20,0.45)]',\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 overflow-hidden 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-[var(--arc-surface-shadow)] 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)] overflow-visible rounded-t-[var(--arc-radius)] rounded-b-none bg-[var(--arc-panel-bg)] shadow-[var(--arc-surface-shadow)] opacity-0 transition-[transform,width,opacity] [transition-duration:var(--arc-motion-duration)] [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:bottom-0 before:left-[calc(var(--arc-notch)*-1)] before:h-[var(--arc-seam-gap)] 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)_100%_no-repeat] before:content-[''] 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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_right_top/var(--arc-notch)_var(--arc-notch)_no-repeat] after:content-['']\",\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-seam-gap)] 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)_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%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_left_top/var(--arc-notch)_var(--arc-notch)_no-repeat,radial-gradient(circle_var(--arc-notch)_at_0%_0%,_var(--arc-cutout-bg)_calc(var(--arc-notch)-0.5px),_transparent_var(--arc-notch))_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-b-0 border-[var(--arc-panel-bg)] text-[var(--arc-accent)] before:opacity-100 after:opacity-100 shadow-[var(--arc-surface-shadow)]',\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 rounded-[inherit]', 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 rounded-[inherit]', 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;AA6gBnB,mBACe,KADf;AAtdJ,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,SAAO;AACT,GAAG,CAAC,CAAC;AAEP,IAAM,sBAAsB,CAAC,gBAA0B,cAAsB,cAAsB;AACjG,MAAI,CAAC,eAAe,OAAQ,QAAO;AAEnC,QAAM,kBAAkB,eAAe,QAAQ,YAAY;AAC3D,MAAI,oBAAoB,IAAI;AAC1B,WAAO,cAAc,IAAK,eAAe,CAAC,KAAK,KAAO,eAAe,GAAG,EAAE,KAAK;AAAA,EACjF;AAEA,QAAM,gBAAgB,kBAAkB,YAAY,eAAe,UAAU,eAAe;AAC5F,SAAO,eAAe,YAAY,KAAK;AACzC;AAEO,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA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AK,CAAC,SAAS;AACb,kBAAI,UAAU;AACZ,+BAAe,UAAU;AAAA,cAC3B;AAAA,YACF;AAAA,YACA,IAAI;AAAA,YACJ,WAAWE,gBAAe,kCAAkC,YAAY,KAAK;AAAA,YAC7E,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,kCAAkC,YAAY,KAAK;AAAA,UAC7E,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.16",
3
+ "version": "1.0.17",
4
4
  "private": false,
5
5
  "description": "Reusable arc-style tabs component for React and Next.js projects",
6
6
  "keywords": [