@livechat/design-system-react-components 1.0.0-alpha.33 → 1.0.0-alpha.35
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/dsrc.cjs.js +2 -2
- package/dist/dsrc.es.js +9 -3
- package/dist/dsrc.umd.js +2 -2
- package/package.json +3 -3
package/dist/dsrc.es.js
CHANGED
|
@@ -1801,7 +1801,7 @@ const Input = React.forwardRef((_y, ref) => {
|
|
|
1801
1801
|
]);
|
|
1802
1802
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
1803
1803
|
const [isPasswordVisible, setIsPasswordVisible] = React.useState(false);
|
|
1804
|
-
const { type } = inputProps;
|
|
1804
|
+
const { type, onFocus, onBlur } = inputProps;
|
|
1805
1805
|
const mergedClassNames = cx(className, styles$n[baseClass$u], styles$n[`${baseClass$u}--${inputSize}`], {
|
|
1806
1806
|
[styles$n[`${baseClass$u}--disabled`]]: disabled,
|
|
1807
1807
|
[styles$n[`${baseClass$u}--focused`]]: isFocused,
|
|
@@ -1818,8 +1818,14 @@ const Input = React.forwardRef((_y, ref) => {
|
|
|
1818
1818
|
}, shouldRenderLeftIcon && renderIcon(icon2, disabled), /* @__PURE__ */ React.createElement("input", __spreadProps(__spreadValues({}, inputProps), {
|
|
1819
1819
|
"data-testid": "input",
|
|
1820
1820
|
ref,
|
|
1821
|
-
onFocus: () =>
|
|
1822
|
-
|
|
1821
|
+
onFocus: (e) => {
|
|
1822
|
+
setIsFocused(true);
|
|
1823
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
1824
|
+
},
|
|
1825
|
+
onBlur: (e) => {
|
|
1826
|
+
setIsFocused(false);
|
|
1827
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
1828
|
+
},
|
|
1823
1829
|
disabled,
|
|
1824
1830
|
type: type && !isPasswordVisible ? type : "text"
|
|
1825
1831
|
})), shouldRenderRightIcon && renderIcon(icon2, disabled), type === "password" && /* @__PURE__ */ React.createElement(Button, {
|