@arkyn/components 1.4.57 → 1.5.0

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.
@@ -26,7 +26,7 @@ function PhoneInput(props: PhoneInputProps) {
26
26
  onChange,
27
27
  searchCountryPlaceholder = "Pesquisar país",
28
28
  notFoundCountryText = "Nenhum país encontrado",
29
- value: fixedValue,
29
+ ...rest
30
30
  } = props;
31
31
 
32
32
  const defaultData = getDefaultFormatPhoneNumber(defaultValue);
@@ -35,9 +35,6 @@ function PhoneInput(props: PhoneInputProps) {
35
35
  const [search, setSearch] = useState("");
36
36
  const [showCountryOptions, setShowCountryOptions] = useState(false);
37
37
  const [value, setValue] = useState(defaultData.formattedNumber || "");
38
- const usedValue = fixedValue
39
- ? getDefaultFormatPhoneNumber(fixedValue).formattedNumber
40
- : value;
41
38
 
42
39
  const [currentCountry, setCurrentCountry] = useState<CountryType>(() => {
43
40
  if (defaultData.country) return defaultData.country;
@@ -104,7 +101,7 @@ function PhoneInput(props: PhoneInputProps) {
104
101
  let returnValue = currentCountry.code;
105
102
  if (currentCountry.prefix) returnValue += `-${currentCountry.prefix}`;
106
103
  returnValue += " ";
107
- returnValue += removeNumberMasks(props || usedValue);
104
+ returnValue += removeNumberMasks(props || value);
108
105
  return returnValue;
109
106
  }
110
107
 
@@ -161,7 +158,7 @@ function PhoneInput(props: PhoneInputProps) {
161
158
  <PhoneInputMask
162
159
  ref={inputPhoneMaskRef}
163
160
  currentCountry={currentCountry}
164
- value={usedValue}
161
+ value={value}
165
162
  onChange={(e) => {
166
163
  setValue(e);
167
164
  onChange && onChange(inputValue(e));
package/vite.config.js CHANGED
@@ -13,7 +13,6 @@ export default defineConfig({
13
13
  "lucide-react",
14
14
  "react",
15
15
  "react-dom",
16
- "@arkyn/components",
17
16
  ],
18
17
  output: { format: "esm" },
19
18
  },