@farmzone/fz-react-ui 1.1.7 → 1.1.9

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.d.cts CHANGED
@@ -1116,11 +1116,13 @@ interface MultiTabBarProps {
1116
1116
  *
1117
1117
  * - 항목 배열을 반환한 탭: 아이콘에 마우스를 올리면 더보기 아이콘으로 바뀌고, 클릭하면 항목들이
1118
1118
  * Popover 메뉴로 열립니다(아이콘이 없는 탭이면 더보기 아이콘이 항상 보입니다).
1119
- * - null/undefined/빈 배열을 반환한 탭: 더보기 버튼 없이 아이콘만 표시됩니다.
1119
+ * - null/undefined/빈 배열을 반환한 탭: 더보기 버튼 없이 아이콘만 표시되고, 아이콘은 라벨과
1120
+ * 똑같이 동작합니다(클릭 시 탭 전환, 드래그, 커서).
1120
1121
  *
1121
1122
  * 예) 특정 탭에만 메뉴 제공: `getTabMenuItems={(tab) => (tab.id === "settings" ? items : null)}`
1122
1123
  *
1123
- * 아이콘·메뉴 영역의 클릭·포인터 이벤트는 탭 전환이나 드래그로 이어지지 않습니다.
1124
+ * 메뉴가 있는 탭에서는 아이콘·메뉴 영역의 클릭·포인터 이벤트가 탭 전환이나 드래그로 이어지지
1125
+ * 않습니다.
1124
1126
  */
1125
1127
  getTabMenuItems?: (tab: MultiTab) => Array<MultiTabMenuItem> | null | undefined;
1126
1128
  }
package/dist/index.d.ts CHANGED
@@ -1116,11 +1116,13 @@ interface MultiTabBarProps {
1116
1116
  *
1117
1117
  * - 항목 배열을 반환한 탭: 아이콘에 마우스를 올리면 더보기 아이콘으로 바뀌고, 클릭하면 항목들이
1118
1118
  * Popover 메뉴로 열립니다(아이콘이 없는 탭이면 더보기 아이콘이 항상 보입니다).
1119
- * - null/undefined/빈 배열을 반환한 탭: 더보기 버튼 없이 아이콘만 표시됩니다.
1119
+ * - null/undefined/빈 배열을 반환한 탭: 더보기 버튼 없이 아이콘만 표시되고, 아이콘은 라벨과
1120
+ * 똑같이 동작합니다(클릭 시 탭 전환, 드래그, 커서).
1120
1121
  *
1121
1122
  * 예) 특정 탭에만 메뉴 제공: `getTabMenuItems={(tab) => (tab.id === "settings" ? items : null)}`
1122
1123
  *
1123
- * 아이콘·메뉴 영역의 클릭·포인터 이벤트는 탭 전환이나 드래그로 이어지지 않습니다.
1124
+ * 메뉴가 있는 탭에서는 아이콘·메뉴 영역의 클릭·포인터 이벤트가 탭 전환이나 드래그로 이어지지
1125
+ * 않습니다.
1124
1126
  */
1125
1127
  getTabMenuItems?: (tab: MultiTab) => Array<MultiTabMenuItem> | null | undefined;
1126
1128
  }
package/dist/index.js CHANGED
@@ -478,6 +478,7 @@ function Input2(props) {
478
478
  const handlePasswordToggle = () => setShowPassword((prev) => !prev);
479
479
  const handleClear = () => onClear?.();
480
480
  const shouldShowClearButton = clearable && !disabled && typeof rest.value === "string" && rest.value.length > 0;
481
+ const hasRightSlot = Boolean(rightIcon) || clearable && !disabled || shouldShowPasswordToggle;
481
482
  const finalRightIcon = rightIcon || (shouldShowClearButton ? /* @__PURE__ */ jsx(
482
483
  "div",
483
484
  {
@@ -524,7 +525,7 @@ function Input2(props) {
524
525
  {
525
526
  id: inputId,
526
527
  type: actualType === "money" || actualType === "number" ? "text" : actualType,
527
- className: cn("w-full", leftIcon && "pl-10", finalRightIcon && "pr-10", getStatusStyles(), className),
528
+ className: cn("w-full", leftIcon && "pl-10", hasRightSlot && "pr-10", getStatusStyles(), className),
528
529
  placeholder,
529
530
  disabled,
530
531
  ref,
@@ -8241,7 +8242,8 @@ function MultiTabPill(props) {
8241
8242
  menuItems,
8242
8243
  groupColor
8243
8244
  } = props;
8244
- const hasPrefix = icon != null || (menuItems?.length ?? 0) > 0;
8245
+ const hasMenu = (menuItems?.length ?? 0) > 0;
8246
+ const hasPrefix = icon != null || hasMenu;
8245
8247
  const outlinedByGroup = isActive && !!groupColor;
8246
8248
  return /* @__PURE__ */ jsxs(
8247
8249
  "div",
@@ -8271,7 +8273,7 @@ function MultiTabPill(props) {
8271
8273
  style: accentColor ? { backgroundColor: accentColor } : void 0
8272
8274
  }
8273
8275
  ),
8274
- hasPrefix && /* @__PURE__ */ jsx(
8276
+ hasPrefix && (hasMenu ? /* @__PURE__ */ jsx(
8275
8277
  "span",
8276
8278
  {
8277
8279
  className: "flex flex-shrink-0 items-center",
@@ -8279,7 +8281,7 @@ function MultiTabPill(props) {
8279
8281
  onClick: (e) => e.stopPropagation(),
8280
8282
  children: /* @__PURE__ */ jsx(TabIconMenu, { icon, items: menuItems ?? [], label: tab.label })
8281
8283
  }
8282
- ),
8284
+ ) : /* @__PURE__ */ jsx("span", { className: "flex flex-shrink-0 items-center [&_*]:cursor-[inherit]!", children: /* @__PURE__ */ jsx(TabIconMenu, { icon, items: [], label: tab.label }) })),
8283
8285
  /* @__PURE__ */ jsx("span", { className: `${s.tabTextSize} max-w-35 truncate leading-none ${isActive ? s.activeText : s.inactiveText}`, children: tab.label }),
8284
8286
  showClose && /* @__PURE__ */ jsx(
8285
8287
  "button",