@arkyn/components 1.4.43 → 1.4.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.
@@ -68,12 +68,12 @@ function PhoneInput(props) {
68
68
  .replaceAll(")", "")
69
69
  .trim();
70
70
  }
71
- function inputValue() {
71
+ function inputValue(props) {
72
72
  let returnValue = currentCountry.code;
73
73
  if (currentCountry.prefix)
74
74
  returnValue += `-${currentCountry.prefix}`;
75
75
  returnValue += " ";
76
- returnValue += removeNumberMasks(value);
76
+ returnValue += removeNumberMasks(props || value);
77
77
  return returnValue;
78
78
  }
79
79
  return (_jsxs(PhoneInputContainer, { id: id, disabled: disabled, isError: isError, isLoading: isLoading, isFocused: isFocused, readOnly: readOnly, size: size, variant: variant, className: className, onFocus: handleContainerFocus, children: [_jsx(PhoneInputCountrySelector, { currentCountry: currentCountry, onClick: handleOpenCountryOptions, size: size }), _jsxs(PhoneInputCountryOptionsContainer, { isOpen: showCountryOptions, search: search, placeholder: searchCountryPlaceholder, onSearch: setSearch, children: [countries
@@ -85,7 +85,7 @@ function PhoneInput(props) {
85
85
  }, isActive: country.iso === currentCountry.iso, size: size }, country.iso))), countries.filter((country) => filterCountryFunction(country))
86
86
  .length === 0 && _jsx("p", { children: notFoundCountryText })] }), _jsx(PhoneInputCountriesOverlay, { isOpen: showCountryOptions, onClick: handleCloseCountryOptions }), _jsx(PhoneInputMask, { ref: inputPhoneMaskRef, currentCountry: currentCountry, value: value, onChange: (e) => {
87
87
  setValue(e);
88
- onChange && onChange(inputValue());
88
+ onChange && onChange(inputValue(e));
89
89
  }, disabled: disabled, onBlur: handleInputBlur, onFocus: handleInputFocus, size: size }), _jsx("input", { ref: inputRef, type: "hidden", name: name, value: inputValue() })] }));
90
90
  }
91
91
  export { PhoneInput };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "1.4.43",
3
+ "version": "1.4.44",
4
4
  "main": "./dist/bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Lucas Gonçalves",
@@ -97,11 +97,11 @@ function PhoneInput(props: PhoneInputProps) {
97
97
  .trim();
98
98
  }
99
99
 
100
- function inputValue() {
100
+ function inputValue(props?: string) {
101
101
  let returnValue = currentCountry.code;
102
102
  if (currentCountry.prefix) returnValue += `-${currentCountry.prefix}`;
103
103
  returnValue += " ";
104
- returnValue += removeNumberMasks(value);
104
+ returnValue += removeNumberMasks(props || value);
105
105
  return returnValue;
106
106
  }
107
107
 
@@ -161,7 +161,7 @@ function PhoneInput(props: PhoneInputProps) {
161
161
  value={value}
162
162
  onChange={(e) => {
163
163
  setValue(e);
164
- onChange && onChange(inputValue());
164
+ onChange && onChange(inputValue(e));
165
165
  }}
166
166
  disabled={disabled}
167
167
  onBlur={handleInputBlur}