@youngonesworks/ui 0.1.84 → 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.
@@ -23,8 +23,10 @@ interface PhoneInputSelectProps {
23
23
  phoneNumberError: string | undefined;
24
24
  phoneNumberExtensionError?: string | undefined;
25
25
  className?: string;
26
+ inputClass?: string;
26
27
  disabled?: boolean;
27
28
  label?: string | ReactNode;
29
+ placeholder?: string;
28
30
  }
29
- export declare const PhoneNumberInput: ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, className, 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;
30
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, 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}`;
@@ -1834,8 +1834,8 @@ const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid
1834
1834
  }) : label,
1835
1835
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_phone_input_2.default, {
1836
1836
  inputProps: {
1837
- name: "phone",
1838
- id: "phoneNumber",
1837
+ name: phoneNumberField,
1838
+ id: phoneNumberField,
1839
1839
  required: true,
1840
1840
  disabled
1841
1841
  },
@@ -1846,13 +1846,15 @@ 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 || ""}`,
1852
1853
  onChange: handlePhoneChange,
1853
1854
  countryCodeEditable: false,
1854
1855
  enableSearch: false,
1855
- disableSearchIcon: true
1856
+ disableSearchIcon: true,
1857
+ inputClass
1856
1858
  }),
1857
1859
  (phoneNumberExtensionError || phoneNumberError) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1858
1860
  className: "text-xs font-normal text-red-500",