@farmzone/fz-react-ui 1.1.8 → 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.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,