@youngonesworks/ui 0.1.86 → 0.1.87

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,6 +26,7 @@ interface PhoneInputSelectProps {
26
26
  inputClass?: string;
27
27
  disabled?: boolean;
28
28
  label?: string | ReactNode;
29
+ placeholder?: string;
29
30
  }
30
- export declare const PhoneNumberInput: ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, className, inputClass, label, disabled, }: PhoneInputSelectProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const PhoneNumberInput: ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, placeholder, className, inputClass, label, disabled, }: PhoneInputSelectProps) => import("react/jsx-runtime").JSX.Element;
31
32
  export {};
package/dist/index.cjs CHANGED
@@ -1798,7 +1798,7 @@ PasswordInput.displayName = "PasswordInput";
1798
1798
 
1799
1799
  //#endregion
1800
1800
  //#region src/components/phoneNumberInput/index.tsx
1801
- const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid = true, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, className, inputClass, label, disabled }) => {
1801
+ const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid = true, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, placeholder, className, inputClass, label, disabled }) => {
1802
1802
  const handlePhoneChange = (0, react.useCallback)((value, country) => {
1803
1803
  if (!value || typeof country !== "object" || country === null || !("dialCode" in country)) return;
1804
1804
  const dialCode = `+${country.dialCode}`;
@@ -1846,6 +1846,7 @@ const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid
1846
1846
  "gb",
1847
1847
  "fr"
1848
1848
  ],
1849
+ placeholder,
1849
1850
  autoFormat: false,
1850
1851
  isValid: isValid && !phoneNumberExtensionError && !phoneNumberError,
1851
1852
  value: `${(phoneNumberExt?.ext || "").replace(/^\+/, "")}${phoneNumberExt?.number || ""}`,