@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.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -515,6 +515,7 @@ function Input2(props) {
|
|
|
515
515
|
const handlePasswordToggle = () => setShowPassword((prev) => !prev);
|
|
516
516
|
const handleClear = () => onClear?.();
|
|
517
517
|
const shouldShowClearButton = clearable && !disabled && typeof rest.value === "string" && rest.value.length > 0;
|
|
518
|
+
const hasRightSlot = Boolean(rightIcon) || clearable && !disabled || shouldShowPasswordToggle;
|
|
518
519
|
const finalRightIcon = rightIcon || (shouldShowClearButton ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
519
520
|
"div",
|
|
520
521
|
{
|
|
@@ -561,7 +562,7 @@ function Input2(props) {
|
|
|
561
562
|
{
|
|
562
563
|
id: inputId,
|
|
563
564
|
type: actualType === "money" || actualType === "number" ? "text" : actualType,
|
|
564
|
-
className: cn("w-full", leftIcon && "pl-10",
|
|
565
|
+
className: cn("w-full", leftIcon && "pl-10", hasRightSlot && "pr-10", getStatusStyles(), className),
|
|
565
566
|
placeholder,
|
|
566
567
|
disabled,
|
|
567
568
|
ref,
|
|
@@ -8278,7 +8279,8 @@ function MultiTabPill(props) {
|
|
|
8278
8279
|
menuItems,
|
|
8279
8280
|
groupColor
|
|
8280
8281
|
} = props;
|
|
8281
|
-
const
|
|
8282
|
+
const hasMenu = (menuItems?.length ?? 0) > 0;
|
|
8283
|
+
const hasPrefix = icon != null || hasMenu;
|
|
8282
8284
|
const outlinedByGroup = isActive && !!groupColor;
|
|
8283
8285
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8284
8286
|
"div",
|
|
@@ -8308,7 +8310,7 @@ function MultiTabPill(props) {
|
|
|
8308
8310
|
style: accentColor ? { backgroundColor: accentColor } : void 0
|
|
8309
8311
|
}
|
|
8310
8312
|
),
|
|
8311
|
-
hasPrefix && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8313
|
+
hasPrefix && (hasMenu ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8312
8314
|
"span",
|
|
8313
8315
|
{
|
|
8314
8316
|
className: "flex flex-shrink-0 items-center",
|
|
@@ -8316,7 +8318,7 @@ function MultiTabPill(props) {
|
|
|
8316
8318
|
onClick: (e) => e.stopPropagation(),
|
|
8317
8319
|
children: /* @__PURE__ */ jsxRuntime.jsx(TabIconMenu, { icon, items: menuItems ?? [], label: tab.label })
|
|
8318
8320
|
}
|
|
8319
|
-
),
|
|
8321
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-shrink-0 items-center [&_*]:cursor-[inherit]!", children: /* @__PURE__ */ jsxRuntime.jsx(TabIconMenu, { icon, items: [], label: tab.label }) })),
|
|
8320
8322
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${s.tabTextSize} max-w-35 truncate leading-none ${isActive ? s.activeText : s.inactiveText}`, children: tab.label }),
|
|
8321
8323
|
showClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8322
8324
|
"button",
|