@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.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", finalRightIcon && "pr-10", getStatusStyles(), className),
565
+ className: cn("w-full", leftIcon && "pl-10", hasRightSlot && "pr-10", getStatusStyles(), className),
565
566
  placeholder,
566
567
  disabled,
567
568
  ref,