@farmzone/fz-react-ui 1.1.5 → 1.1.7

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/dist/index.cjs CHANGED
@@ -482,6 +482,8 @@ function Input2(props) {
482
482
  leftIcon,
483
483
  rightIcon,
484
484
  showPasswordToggle = true,
485
+ clearable = false,
486
+ onClear,
485
487
  onChange,
486
488
  ...rest
487
489
  } = props;
@@ -511,7 +513,16 @@ function Input2(props) {
511
513
  const shouldShowPasswordToggle = type === "password" && showPasswordToggle;
512
514
  const actualType = type === "password" && showPassword ? "text" : type;
513
515
  const handlePasswordToggle = () => setShowPassword((prev) => !prev);
514
- const finalRightIcon = rightIcon || (shouldShowPasswordToggle ? /* @__PURE__ */ jsxRuntime.jsx(
516
+ const handleClear = () => onClear?.();
517
+ const shouldShowClearButton = clearable && !disabled && typeof rest.value === "string" && rest.value.length > 0;
518
+ const finalRightIcon = rightIcon || (shouldShowClearButton ? /* @__PURE__ */ jsxRuntime.jsx(
519
+ "div",
520
+ {
521
+ onClick: handleClear,
522
+ className: "text-muted-foreground hover:text-foreground cursor-pointer transition-colors",
523
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { className: "h-4 w-4" })
524
+ }
525
+ ) : null) || (shouldShowPasswordToggle ? /* @__PURE__ */ jsxRuntime.jsx(
515
526
  "div",
516
527
  {
517
528
  onClick: handlePasswordToggle,
@@ -977,6 +988,29 @@ function SelectScrollDownButton({
977
988
  }
978
989
  );
979
990
  }
991
+ function SelectOptionVisual(props) {
992
+ const { icon, avatarUrl, avatarAlt, fallbackLabel } = props;
993
+ const [hasAvatarError, setHasAvatarError] = React6.useState(false);
994
+ const handleAvatarError = () => setHasAvatarError(true);
995
+ if (avatarUrl && !hasAvatarError) {
996
+ return /* @__PURE__ */ jsxRuntime.jsx(
997
+ "img",
998
+ {
999
+ src: avatarUrl,
1000
+ alt: avatarAlt ?? "",
1001
+ className: "size-5 shrink-0 rounded-full object-cover",
1002
+ onError: handleAvatarError
1003
+ }
1004
+ );
1005
+ }
1006
+ if (avatarUrl && hasAvatarError) {
1007
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-5 shrink-0 items-center justify-center rounded-full bg-gray-200 text-[10px] font-medium text-gray-500", children: fallbackLabel?.charAt(0).toUpperCase() ?? "?" });
1008
+ }
1009
+ if (icon) {
1010
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-4 shrink-0 items-center justify-center text-gray-500", children: icon });
1011
+ }
1012
+ return null;
1013
+ }
980
1014
 
981
1015
  // src/components/Select/config/default.ts
982
1016
  var SELECT_BORDER_COLORS = {
@@ -1068,7 +1102,18 @@ function Select2(props) {
1068
1102
  itemClassName,
1069
1103
  option.disabled && cn("opacity-50 cursor-not-allowed text-gray-300 bg-white", disabledItemClassName)
1070
1104
  ),
1071
- children: option.label
1105
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-full min-w-0 items-center gap-2", children: [
1106
+ /* @__PURE__ */ jsxRuntime.jsx(
1107
+ SelectOptionVisual,
1108
+ {
1109
+ icon: option.icon,
1110
+ avatarUrl: option.avatarUrl,
1111
+ avatarAlt: option.avatarAlt,
1112
+ fallbackLabel: typeof option.label === "string" ? option.label : void 0
1113
+ }
1114
+ ),
1115
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label })
1116
+ ] })
1072
1117
  },
1073
1118
  String(option.value)
1074
1119
  )) })
@@ -7884,6 +7929,9 @@ function PageFilter(props) {
7884
7929
  const handleInputChange = (key) => (e) => {
7885
7930
  onChange({ [key]: e.target.value });
7886
7931
  };
7932
+ const handleInputClear = (key) => () => {
7933
+ onChange({ [key]: "" });
7934
+ };
7887
7935
  const handleSelectChange = (key, autoSubmit) => (value) => {
7888
7936
  onChange({ [key]: value });
7889
7937
  if (autoSubmit) pendingAutoSubmitRef.current = { key, value };
@@ -7928,6 +7976,8 @@ function PageFilter(props) {
7928
7976
  if (e.key === "Enter") handleSubmit();
7929
7977
  },
7930
7978
  leftIcon: option.leftIcon !== false ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { size: 16 }) : void 0,
7979
+ clearable: option.canReset ?? true,
7980
+ onClear: handleInputClear(optionKey),
7931
7981
  className: option.className
7932
7982
  }
7933
7983
  ) }, String(optionKey));
@@ -8023,15 +8073,15 @@ var VARIANT_STYLES = {
8023
8073
  inactiveText: "font-normal",
8024
8074
  indicator: "bg-blue-500",
8025
8075
  closeBtn: "rounded hover:bg-gray-300/60",
8026
- closeBtnWH: "w-3.5 h-3.5",
8027
- closeBtnSize: 10,
8076
+ closeBtnWH: "w-4 h-4",
8077
+ closeBtnSize: 12,
8028
8078
  plusBtnArea: "border-l border-gray-100 bg-white",
8029
8079
  plusBtn: "text-gray-400 hover:text-gray-600 hover:bg-gray-100",
8030
8080
  fadeOpacity: 0.12,
8031
- tabPy: "py-1.5",
8032
- tabPx: "px-3",
8033
- tabTextSize: "text-xs",
8034
- scrollPadding: "px-3 pt-1.5",
8081
+ tabHeight: "h-[38px]",
8082
+ tabPx: "px-4",
8083
+ tabTextSize: "text-sm",
8084
+ scrollPadding: "px-3 pt-2",
8035
8085
  rounded: "rounded-t-md"
8036
8086
  },
8037
8087
  dark: {
@@ -8042,15 +8092,15 @@ var VARIANT_STYLES = {
8042
8092
  inactiveText: "font-normal",
8043
8093
  indicator: "bg-indigo-400",
8044
8094
  closeBtn: "rounded hover:bg-gray-600/60",
8045
- closeBtnWH: "w-3.5 h-3.5",
8046
- closeBtnSize: 10,
8095
+ closeBtnWH: "w-4 h-4",
8096
+ closeBtnSize: 12,
8047
8097
  plusBtnArea: "border-l border-gray-700 bg-gray-900",
8048
8098
  plusBtn: "text-gray-500 hover:text-gray-300 hover:bg-gray-700",
8049
8099
  fadeOpacity: 0.4,
8050
- tabPy: "py-1.5",
8051
- tabPx: "px-3",
8052
- tabTextSize: "text-xs",
8053
- scrollPadding: "px-3 pt-1.5",
8100
+ tabHeight: "h-[38px]",
8101
+ tabPx: "px-4",
8102
+ tabTextSize: "text-sm",
8103
+ scrollPadding: "px-3 pt-2",
8054
8104
  rounded: "rounded-t-md"
8055
8105
  },
8056
8106
  "system-light": {
@@ -8066,7 +8116,7 @@ var VARIANT_STYLES = {
8066
8116
  plusBtnArea: "border-l border-gray-300 bg-gray-200",
8067
8117
  plusBtn: "text-slate-400 hover:text-slate-600 hover:bg-gray-300",
8068
8118
  fadeOpacity: 0.15,
8069
- tabPy: "py-2.5",
8119
+ tabHeight: "h-[38px]",
8070
8120
  tabPx: "px-5",
8071
8121
  tabTextSize: "text-sm",
8072
8122
  scrollPadding: "px-3 pt-2",
@@ -8085,7 +8135,7 @@ var VARIANT_STYLES = {
8085
8135
  plusBtnArea: "border-l border-slate-700 bg-slate-900",
8086
8136
  plusBtn: "text-slate-400 hover:text-slate-200 hover:bg-slate-700",
8087
8137
  fadeOpacity: 0.45,
8088
- tabPy: "py-2.5",
8138
+ tabHeight: "h-[38px]",
8089
8139
  tabPx: "px-5",
8090
8140
  tabTextSize: "text-sm",
8091
8141
  scrollPadding: "px-4 pt-2",
@@ -8097,6 +8147,65 @@ function easedFade(dir, opacity) {
8097
8147
  const c = (t) => `rgba(0,0,0,${(opacity * t).toFixed(3)})`;
8098
8148
  return `linear-gradient(${dir}, ${c(1)} 0%, ${c(0.72)} 20%, ${c(0.38)} 45%, ${c(0.1)} 70%, transparent 100%)`;
8099
8149
  }
8150
+ var MENU_ITEM_CLASSNAME = "flex w-full cursor-pointer items-center gap-2 rounded-md border-none bg-transparent px-2 py-1.5 text-left text-[13px] whitespace-nowrap text-gray-900 hover:bg-gray-100";
8151
+ function TabIconMenu(props) {
8152
+ const { icon, items, label } = props;
8153
+ const [open, setOpen] = React6.useState(false);
8154
+ if (items.length === 0) {
8155
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4.5 w-4.5 items-center justify-center", children: icon });
8156
+ }
8157
+ const showMore = (base) => open ? "flex" : base;
8158
+ return /* @__PURE__ */ jsxRuntime.jsx(
8159
+ SimplePopover,
8160
+ {
8161
+ open,
8162
+ onOpenChange: setOpen,
8163
+ align: "start",
8164
+ contentClassName: "w-auto min-w-28 p-1",
8165
+ trigger: /* @__PURE__ */ jsxRuntime.jsxs(
8166
+ "button",
8167
+ {
8168
+ type: "button",
8169
+ "aria-label": `${label} \uBA54\uB274`,
8170
+ className: "group/tab-menu relative flex h-4.5 w-4.5 cursor-pointer items-center justify-center rounded border-none bg-transparent p-0",
8171
+ children: [
8172
+ icon != null && /* @__PURE__ */ jsxRuntime.jsx(
8173
+ "span",
8174
+ {
8175
+ className: `flex items-center justify-center ${open ? "invisible" : "group-hover/tab-menu:invisible"}`,
8176
+ children: icon
8177
+ }
8178
+ ),
8179
+ /* @__PURE__ */ jsxRuntime.jsx(
8180
+ "span",
8181
+ {
8182
+ className: `absolute inset-0 items-center justify-center rounded bg-gray-200 text-gray-700 ${icon != null ? showMore("hidden group-hover/tab-menu:flex") : "flex"}`,
8183
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { size: 14 })
8184
+ }
8185
+ )
8186
+ ]
8187
+ }
8188
+ ),
8189
+ children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
8190
+ "button",
8191
+ {
8192
+ type: "button",
8193
+ onClick: () => {
8194
+ setOpen(false);
8195
+ item.onSelect();
8196
+ },
8197
+ className: MENU_ITEM_CLASSNAME,
8198
+ style: item.selected ? { backgroundColor: "#F3F4F6" } : void 0,
8199
+ children: [
8200
+ item.icon != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center text-gray-500", children: item.icon }),
8201
+ item.label
8202
+ ]
8203
+ },
8204
+ item.key
8205
+ ))
8206
+ }
8207
+ );
8208
+ }
8100
8209
  function clusterTabs(tabs, getTabGroup) {
8101
8210
  const clusters = [];
8102
8211
  const clusterByGroupKey = /* @__PURE__ */ new Map();
@@ -8164,8 +8273,13 @@ function MultiTabPill(props) {
8164
8273
  draggable = false,
8165
8274
  onPointerDown,
8166
8275
  dropIndicator = null,
8167
- isDraggingThis = false
8276
+ isDraggingThis = false,
8277
+ icon,
8278
+ menuItems,
8279
+ groupColor
8168
8280
  } = props;
8281
+ const hasPrefix = icon != null || (menuItems?.length ?? 0) > 0;
8282
+ const outlinedByGroup = isActive && !!groupColor;
8169
8283
  return /* @__PURE__ */ jsxRuntime.jsxs(
8170
8284
  "div",
8171
8285
  {
@@ -8175,7 +8289,7 @@ function MultiTabPill(props) {
8175
8289
  if (!isActive) onClick();
8176
8290
  },
8177
8291
  className: `
8178
- group relative flex items-center gap-1.5 ${s.tabPx} ${s.tabPy} flex-shrink-0
8292
+ group relative flex items-center gap-1.5 ${s.tabPx} ${s.tabHeight} flex-shrink-0
8179
8293
  ${s.rounded} border border-b-0 select-none
8180
8294
  transition-colors duration-100
8181
8295
  ${isActive ? s.activeTab : s.inactiveTab}
@@ -8183,7 +8297,9 @@ function MultiTabPill(props) {
8183
8297
  ${isDraggingThis ? "opacity-40" : ""}
8184
8298
  ${dropIndicator === "before" ? "[box-shadow:inset_2px_0_0_0_#3b82f6]" : ""}
8185
8299
  ${dropIndicator === "after" ? "[box-shadow:inset_-2px_0_0_0_#3b82f6]" : ""}
8300
+ ${outlinedByGroup ? "z-[2]" : ""}
8186
8301
  `,
8302
+ style: outlinedByGroup ? { borderColor: groupColor } : void 0,
8187
8303
  children: [
8188
8304
  isActive && /* @__PURE__ */ jsxRuntime.jsx(
8189
8305
  "div",
@@ -8192,6 +8308,15 @@ function MultiTabPill(props) {
8192
8308
  style: accentColor ? { backgroundColor: accentColor } : void 0
8193
8309
  }
8194
8310
  ),
8311
+ hasPrefix && /* @__PURE__ */ jsxRuntime.jsx(
8312
+ "span",
8313
+ {
8314
+ className: "flex flex-shrink-0 items-center",
8315
+ onPointerDown: (e) => e.stopPropagation(),
8316
+ onClick: (e) => e.stopPropagation(),
8317
+ children: /* @__PURE__ */ jsxRuntime.jsx(TabIconMenu, { icon, items: menuItems ?? [], label: tab.label })
8318
+ }
8319
+ ),
8195
8320
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${s.tabTextSize} max-w-35 truncate leading-none ${isActive ? s.activeText : s.inactiveText}`, children: tab.label }),
8196
8321
  showClose && /* @__PURE__ */ jsxRuntime.jsx(
8197
8322
  "button",
@@ -8223,7 +8348,9 @@ function MultiTabBar(props) {
8223
8348
  onTabsReorder,
8224
8349
  variant = "light",
8225
8350
  primaryColor,
8226
- getTabGroup
8351
+ getTabGroup,
8352
+ getTabIcon,
8353
+ getTabMenuItems
8227
8354
  } = props;
8228
8355
  const s = VARIANT_STYLES[variant];
8229
8356
  const scrollRef = React6.useRef(null);
@@ -8486,9 +8613,9 @@ function MultiTabBar(props) {
8486
8613
  const draggingGroupColor = draggingGroupKey ? groupColors.get(draggingGroupKey) : void 0;
8487
8614
  const ghost = draggingGroupKey && draggingGroupCluster?.group ? {
8488
8615
  label: draggingGroupCluster.group.label,
8489
- bg: (draggingGroupColor ?? TAB_PALETTE[0]).bg,
8490
- border: (draggingGroupColor ?? TAB_PALETTE[0]).border,
8491
- color: (draggingGroupColor ?? TAB_PALETTE[0]).base
8616
+ bg: (draggingGroupColor ?? TAB_PALETTE[0]).base,
8617
+ border: (draggingGroupColor ?? TAB_PALETTE[0]).base,
8618
+ color: "white"
8492
8619
  } : draggingTab ? { label: draggingTab.label, bg: "white", border: draggingColor ?? "#e5e7eb", color: "#111827" } : null;
8493
8620
  if (tabs.length === 0) return null;
8494
8621
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -8539,7 +8666,9 @@ function MultiTabBar(props) {
8539
8666
  draggable: reorderEnabled,
8540
8667
  isDraggingThis: tab.id === draggingId,
8541
8668
  dropIndicator: isDropTarget ? dropSide : isGroupDropTarget2 ? groupDropSide : null,
8542
- onPointerDown: (e) => handlePointerDown(e, tab.id)
8669
+ onPointerDown: (e) => handlePointerDown(e, tab.id),
8670
+ icon: getTabIcon?.(tab),
8671
+ menuItems: getTabMenuItems?.(tab)
8543
8672
  },
8544
8673
  tab.id
8545
8674
  );
@@ -8548,76 +8677,76 @@ function MultiTabBar(props) {
8548
8677
  const { key, label } = cluster.group;
8549
8678
  const color = groupColors.get(key) ?? TAB_PALETTE[0];
8550
8679
  const collapsed = collapsedGroups.has(key);
8551
- const groupHasActiveTab = cluster.tabs.some((t) => t.id === activeTabId);
8552
8680
  const isGroupDropTarget = groupDropTargetKey === `group:${key}`;
8553
8681
  const isDraggingThisGroup = draggingGroupKey === key;
8554
8682
  return /* @__PURE__ */ jsxRuntime.jsxs(
8555
8683
  "div",
8556
8684
  {
8557
8685
  ref: (el) => registerGroupRef(key, el),
8558
- className: "flex shrink-0 flex-col items-stretch",
8686
+ className: `relative flex shrink-0 items-end gap-0.5 ${isDraggingThisGroup ? "opacity-40" : ""} ${isGroupDropTarget && groupDropSide === "before" ? "[box-shadow:inset_2px_0_0_0_#3b82f6]" : ""} ${isGroupDropTarget && groupDropSide === "after" ? "[box-shadow:inset_-2px_0_0_0_#3b82f6]" : ""}`,
8559
8687
  children: [
8560
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
8561
- /* @__PURE__ */ jsxRuntime.jsxs(
8562
- "button",
8688
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${s.tabHeight} shrink-0 items-center px-1`, children: /* @__PURE__ */ jsxRuntime.jsxs(
8689
+ "button",
8690
+ {
8691
+ type: "button",
8692
+ onClick: () => {
8693
+ if (suppressClickRef.current) return;
8694
+ toggleGroupCollapsed(key);
8695
+ },
8696
+ onPointerDown: reorderEnabled ? (e) => handleGroupPointerDown(e, key) : void 0,
8697
+ "aria-expanded": !collapsed,
8698
+ title: collapsed ? "\uD558\uC704 \uD0ED \uD3BC\uCE58\uAE30" : "\uD558\uC704 \uD0ED \uC811\uAE30",
8699
+ className: `flex h-6.5 items-center gap-1 rounded-lg px-2.5 text-sm font-semibold whitespace-nowrap text-white select-none ${reorderEnabled ? isDraggingThisGroup ? "cursor-grabbing" : "cursor-grab" : "cursor-pointer"}`,
8700
+ style: { backgroundColor: color.base },
8701
+ children: [
8702
+ collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: 14 }),
8703
+ label,
8704
+ canClose && /* @__PURE__ */ jsxRuntime.jsx(
8705
+ lucideReact.X,
8706
+ {
8707
+ size: 14,
8708
+ onClick: (e) => {
8709
+ e.stopPropagation();
8710
+ cluster.tabs.forEach((t) => onTabClose(t.id));
8711
+ }
8712
+ }
8713
+ )
8714
+ ]
8715
+ }
8716
+ ) }),
8717
+ !collapsed && cluster.tabs.map((tab) => {
8718
+ const isDropTarget = dropTargetId === tab.id;
8719
+ const isTabGroupDropTarget = groupDropTargetKey === `tab:${tab.id}`;
8720
+ return /* @__PURE__ */ jsxRuntime.jsx(
8721
+ MultiTabPill,
8563
8722
  {
8564
- type: "button",
8723
+ tab,
8724
+ isActive: tab.id === activeTabId,
8725
+ showClose: canClose,
8726
+ accentColor: color.base,
8727
+ style: s,
8565
8728
  onClick: () => {
8566
8729
  if (suppressClickRef.current) return;
8567
- toggleGroupCollapsed(key);
8568
- },
8569
- onPointerDown: reorderEnabled ? (e) => handleGroupPointerDown(e, key) : void 0,
8570
- "aria-expanded": !collapsed,
8571
- title: collapsed ? "\uD558\uC704 \uD0ED \uD3BC\uCE58\uAE30" : "\uD558\uC704 \uD0ED \uC811\uAE30",
8572
- className: `flex items-center gap-1 rounded-md border px-2.5 py-1 text-xs font-bold whitespace-nowrap select-none ${reorderEnabled ? isDraggingThisGroup ? "cursor-grabbing" : "cursor-grab" : "cursor-pointer"} ${isDraggingThisGroup ? "opacity-40" : ""} ${isGroupDropTarget && groupDropSide === "before" ? "[box-shadow:inset_2px_0_0_0_#3b82f6]" : ""} ${isGroupDropTarget && groupDropSide === "after" ? "[box-shadow:inset_-2px_0_0_0_#3b82f6]" : ""}`,
8573
- style: { backgroundColor: color.bg, borderColor: color.border, color: color.base },
8574
- children: [
8575
- collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: 12 }),
8576
- label,
8577
- canClose && /* @__PURE__ */ jsxRuntime.jsx(
8578
- lucideReact.X,
8579
- {
8580
- size: 12,
8581
- onClick: (e) => {
8582
- e.stopPropagation();
8583
- cluster.tabs.forEach((t) => onTabClose(t.id));
8584
- }
8585
- }
8586
- )
8587
- ]
8588
- }
8589
- ),
8590
- !collapsed && cluster.tabs.map((tab) => {
8591
- const isDropTarget = dropTargetId === tab.id;
8592
- const isTabGroupDropTarget = groupDropTargetKey === `tab:${tab.id}`;
8593
- return /* @__PURE__ */ jsxRuntime.jsx(
8594
- MultiTabPill,
8595
- {
8596
- tab,
8597
- isActive: tab.id === activeTabId,
8598
- showClose: canClose,
8599
- accentColor: color.base,
8600
- style: s,
8601
- onClick: () => {
8602
- if (suppressClickRef.current) return;
8603
- onTabClick(tab.id);
8604
- },
8605
- onClose: () => onTabClose(tab.id),
8606
- registerRef: registerTabRef,
8607
- draggable: reorderEnabled,
8608
- isDraggingThis: tab.id === draggingId,
8609
- dropIndicator: isDropTarget ? dropSide : isTabGroupDropTarget ? groupDropSide : null,
8610
- onPointerDown: (e) => handlePointerDown(e, tab.id)
8730
+ onTabClick(tab.id);
8611
8731
  },
8612
- tab.id
8613
- );
8614
- })
8615
- ] }),
8616
- /* @__PURE__ */ jsxRuntime.jsx(
8732
+ onClose: () => onTabClose(tab.id),
8733
+ registerRef: registerTabRef,
8734
+ draggable: reorderEnabled,
8735
+ isDraggingThis: tab.id === draggingId,
8736
+ dropIndicator: isDropTarget ? dropSide : isTabGroupDropTarget ? groupDropSide : null,
8737
+ onPointerDown: (e) => handlePointerDown(e, tab.id),
8738
+ icon: getTabIcon?.(tab),
8739
+ menuItems: getTabMenuItems?.(tab),
8740
+ groupColor: color.base
8741
+ },
8742
+ tab.id
8743
+ );
8744
+ }),
8745
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsx(
8617
8746
  "div",
8618
8747
  {
8619
- className: "mt-1 h-0.75 rounded-full",
8620
- style: { backgroundColor: color.base, opacity: groupHasActiveTab ? 1 : 0.35 }
8748
+ className: "pointer-events-none absolute right-0 bottom-0 left-1 z-[1] h-0.5 rounded-l-full",
8749
+ style: { backgroundColor: color.base }
8621
8750
  }
8622
8751
  )
8623
8752
  ]
@@ -8643,7 +8772,9 @@ function MultiTabBar(props) {
8643
8772
  draggable: reorderEnabled,
8644
8773
  isDraggingThis: tab.id === draggingId,
8645
8774
  dropIndicator: isDropTarget ? dropSide : null,
8646
- onPointerDown: (e) => handlePointerDown(e, tab.id)
8775
+ onPointerDown: (e) => handlePointerDown(e, tab.id),
8776
+ icon: getTabIcon?.(tab),
8777
+ menuItems: getTabMenuItems?.(tab)
8647
8778
  },
8648
8779
  tab.id
8649
8780
  );
@@ -8671,7 +8802,7 @@ function MultiTabBar(props) {
8671
8802
  /* @__PURE__ */ jsxRuntime.jsx(
8672
8803
  "div",
8673
8804
  {
8674
- className: "pointer-events-none fixed z-50 flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-bold whitespace-nowrap shadow-lg",
8805
+ className: "pointer-events-none fixed z-50 flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-bold whitespace-nowrap shadow-lg",
8675
8806
  style: {
8676
8807
  left: dragPos.x + 12,
8677
8808
  top: dragPos.y + 12,