react-simple-phone-input 1.0.8-beta → 1.0.9-beta

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/cjs/index.js CHANGED
@@ -4024,7 +4024,7 @@ const getCountryByFilter = (onlyCountry, excludeCountry, preferredCountry) => {
4024
4024
  };
4025
4025
 
4026
4026
  function useOnClickOutside(ref, handler) {
4027
- react.exports.useEffect(() => {
4027
+ React.useEffect(() => {
4028
4028
  const listener = (event) => {
4029
4029
  if (!ref.current || ref.current.contains(event.target)) {
4030
4030
  return;
@@ -4041,11 +4041,11 @@ function useOnClickOutside(ref, handler) {
4041
4041
  }
4042
4042
 
4043
4043
  const PhoneInput = ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon = true, dialCodeInputField = false, search = true, searchPlaceholder = "Search country", showSearchIcon = true, searchIconComponent, searchProps, searchNotFound = "Not found" }) => {
4044
- const [selected, setSelected] = react.exports.useState({});
4045
- const [isDropdown, setDropdown] = react.exports.useState(false);
4046
- const [inputValue, setInputValue] = react.exports.useState(value || "");
4047
- const [countryDataInfo, setCountryData] = react.exports.useState(countryData);
4048
- const ref = react.exports.useRef();
4044
+ const [selected, setSelected] = React.useState({});
4045
+ const [isDropdown, setDropdown] = React.useState(false);
4046
+ const [inputValue, setInputValue] = React.useState(value || "");
4047
+ const [countryDataInfo, setCountryData] = React.useState(countryData);
4048
+ const ref = React.useRef();
4049
4049
  useOnClickOutside(ref, () => setDropdown(false));
4050
4050
  //Handler
4051
4051
  const handleChange = (e) => {
@@ -4075,7 +4075,7 @@ const PhoneInput = ({ placeholder, country, onChange, value, iconComponent, inpu
4075
4075
  setSelected(item);
4076
4076
  setDropdown(false);
4077
4077
  };
4078
- react.exports.useMemo(() => {
4078
+ React.useMemo(() => {
4079
4079
  if (dialCodeInputField) {
4080
4080
  const result = inputValue === null || inputValue === void 0 ? void 0 : inputValue.replace(selected.callingCode, getDefaultCountry(country).callingCode);
4081
4081
  console.log(result);
@@ -4083,7 +4083,7 @@ const PhoneInput = ({ placeholder, country, onChange, value, iconComponent, inpu
4083
4083
  }
4084
4084
  setSelected(getDefaultCountry(country));
4085
4085
  }, [country, dialCodeInputField]);
4086
- react.exports.useMemo(() => {
4086
+ React.useMemo(() => {
4087
4087
  setCountryData(getCountryByFilter(onlyCountries, excludeCountries, preferredCountries));
4088
4088
  }, [onlyCountries, excludeCountries, preferredCountries]);
4089
4089
  return (React.createElement("div", { className: "simple-phone-input-sri198-container" },