@julo-ui/input
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -215,3 +215,4 @@ "use strict"; | ||
leftElement, | ||
rightElement | ||
rightElement, | ||
isElementExist | ||
} = validChildren.reduce( | ||
@@ -225,2 +226,5 @@ (prevValue, child) => { | ||
}, | ||
...(child.type.id === "input-left-element" || child.type.id === "input-right-element") && { | ||
isElementExist: true | ||
}, | ||
...child.type.id === "input-left-addon" && { leftAddon: true }, | ||
@@ -240,3 +244,4 @@ ...child.type.id === "input-right-addon" && { rightAddon: true }, | ||
leftElement: false, | ||
rightElement: false | ||
rightElement: false, | ||
isElementExist: false | ||
} | ||
@@ -254,3 +259,3 @@ ); | ||
rightElement, | ||
isOnlyElement: !isAddonExist | ||
isOnlyElement: !isAddonExist && isElementExist | ||
}), | ||
@@ -264,3 +269,3 @@ ...isTextArea2 && { isResizeable: false } | ||
isTextArea && inputGroupWithTextAreaCx, | ||
isAddonExist ? inputGroupWithAddonCx : inputGroupWithElementCx | ||
isAddonExist ? inputGroupWithAddonCx : isElementExist ? inputGroupWithElementCx : null | ||
].filter(Boolean); | ||
@@ -267,0 +272,0 @@ return { clones, extendedInputGroupCx }; |
@@ -213,3 +213,4 @@ "use strict"; | ||
leftElement, | ||
rightElement | ||
rightElement, | ||
isElementExist | ||
} = validChildren.reduce( | ||
@@ -223,2 +224,5 @@ (prevValue, child) => { | ||
}, | ||
...(child.type.id === "input-left-element" || child.type.id === "input-right-element") && { | ||
isElementExist: true | ||
}, | ||
...child.type.id === "input-left-addon" && { leftAddon: true }, | ||
@@ -238,3 +242,4 @@ ...child.type.id === "input-right-addon" && { rightAddon: true }, | ||
leftElement: false, | ||
rightElement: false | ||
rightElement: false, | ||
isElementExist: false | ||
} | ||
@@ -252,3 +257,3 @@ ); | ||
rightElement, | ||
isOnlyElement: !isAddonExist | ||
isOnlyElement: !isAddonExist && isElementExist | ||
}), | ||
@@ -262,3 +267,3 @@ ...isTextArea2 && { isResizeable: false } | ||
isTextArea && inputGroupWithTextAreaCx, | ||
isAddonExist ? inputGroupWithAddonCx : inputGroupWithElementCx | ||
isAddonExist ? inputGroupWithAddonCx : isElementExist ? inputGroupWithElementCx : null | ||
].filter(Boolean); | ||
@@ -265,0 +270,0 @@ return { clones, extendedInputGroupCx }; |
@@ -147,3 +147,4 @@ "use strict"; | ||
leftElement, | ||
rightElement | ||
rightElement, | ||
isElementExist | ||
} = validChildren.reduce( | ||
@@ -157,2 +158,5 @@ (prevValue, child) => { | ||
}, | ||
...(child.type.id === "input-left-element" || child.type.id === "input-right-element") && { | ||
isElementExist: true | ||
}, | ||
...child.type.id === "input-left-addon" && { leftAddon: true }, | ||
@@ -172,3 +176,4 @@ ...child.type.id === "input-right-addon" && { rightAddon: true }, | ||
leftElement: false, | ||
rightElement: false | ||
rightElement: false, | ||
isElementExist: false | ||
} | ||
@@ -186,3 +191,3 @@ ); | ||
rightElement, | ||
isOnlyElement: !isAddonExist | ||
isOnlyElement: !isAddonExist && isElementExist | ||
}), | ||
@@ -196,3 +201,3 @@ ...isTextArea2 && { isResizeable: false } | ||
isTextArea && inputGroupWithTextAreaCx, | ||
isAddonExist ? inputGroupWithAddonCx : inputGroupWithElementCx | ||
isAddonExist ? inputGroupWithAddonCx : isElementExist ? inputGroupWithElementCx : null | ||
].filter(Boolean); | ||
@@ -199,0 +204,0 @@ return { clones, extendedInputGroupCx }; |
@@ -294,3 +294,4 @@ "use strict"; | ||
leftElement, | ||
rightElement | ||
rightElement, | ||
isElementExist | ||
} = validChildren.reduce( | ||
@@ -304,2 +305,5 @@ (prevValue, child) => { | ||
}, | ||
...(child.type.id === "input-left-element" || child.type.id === "input-right-element") && { | ||
isElementExist: true | ||
}, | ||
...child.type.id === "input-left-addon" && { leftAddon: true }, | ||
@@ -319,3 +323,4 @@ ...child.type.id === "input-right-addon" && { rightAddon: true }, | ||
leftElement: false, | ||
rightElement: false | ||
rightElement: false, | ||
isElementExist: false | ||
} | ||
@@ -333,3 +338,3 @@ ); | ||
rightElement, | ||
isOnlyElement: !isAddonExist | ||
isOnlyElement: !isAddonExist && isElementExist | ||
}), | ||
@@ -343,3 +348,3 @@ ...isTextArea2 && { isResizeable: false } | ||
isTextArea && inputGroupWithTextAreaCx, | ||
isAddonExist ? inputGroupWithAddonCx : inputGroupWithElementCx | ||
isAddonExist ? inputGroupWithAddonCx : isElementExist ? inputGroupWithElementCx : null | ||
].filter(Boolean); | ||
@@ -346,0 +351,0 @@ return { clones, extendedInputGroupCx }; |
{ | ||
"name": "@julo-ui/input", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "A React Component for Input Text Field", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106477
3197