@mw-kit/mw-ui 1.7.42 → 1.7.44
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.modern.js
CHANGED
|
@@ -15200,7 +15200,10 @@ var Component = React__default.forwardRef(function (props, ref) {
|
|
|
15200
15200
|
var value = props.value,
|
|
15201
15201
|
setValue = props.setValue;
|
|
15202
15202
|
|
|
15203
|
-
var _useState = useState('')
|
|
15203
|
+
var _useState = useState(!value ? '' : function () {
|
|
15204
|
+
var details = getPhoneDetails(value);
|
|
15205
|
+
return details ? details.masked : '';
|
|
15206
|
+
}),
|
|
15204
15207
|
inputValue = _useState[0],
|
|
15205
15208
|
setInputValue = _useState[1];
|
|
15206
15209
|
|
|
@@ -15259,13 +15262,14 @@ var Component = React__default.forwardRef(function (props, ref) {
|
|
|
15259
15262
|
var v = inputValue.replace(/\D+/g, '').substring(0, country.charLimit);
|
|
15260
15263
|
setValue(country.ddi + " " + v);
|
|
15261
15264
|
}, [inputValue]);
|
|
15265
|
+
var placeholder = props.placeholder && props.placeholder[country.iso] ? props.placeholder[country.iso] : country.placeholder;
|
|
15262
15266
|
return React__default.createElement(RelativeContainer$3, {
|
|
15263
15267
|
ref: useOnClickOut(function () {
|
|
15264
15268
|
return setOpen(false);
|
|
15265
15269
|
})
|
|
15266
15270
|
}, React__default.createElement(Input$1, Object.assign({}, props, {
|
|
15267
15271
|
type: 'text',
|
|
15268
|
-
placeholder:
|
|
15272
|
+
placeholder: placeholder,
|
|
15269
15273
|
mask: mask,
|
|
15270
15274
|
value: inputValue,
|
|
15271
15275
|
setValue: setInputValue,
|