@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.
package/dist/index.js
CHANGED
|
@@ -1776,7 +1776,7 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
1776
1776
|
|
|
1777
1777
|
//#endregion
|
|
1778
1778
|
//#region src/components/phoneNumberInput/index.tsx
|
|
1779
|
-
const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid = true, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, className, label, disabled }) => {
|
|
1779
|
+
const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid = true, phoneNumberError, phoneNumberExtensionError, phoneNumberField, phoneNumberExtField, placeholder, className, inputClass, label, disabled }) => {
|
|
1780
1780
|
const handlePhoneChange = useCallback((value, country) => {
|
|
1781
1781
|
if (!value || typeof country !== "object" || country === null || !("dialCode" in country)) return;
|
|
1782
1782
|
const dialCode = `+${country.dialCode}`;
|
|
@@ -1812,8 +1812,8 @@ const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid
|
|
|
1812
1812
|
}) : label,
|
|
1813
1813
|
/* @__PURE__ */ jsx(PhoneInput, {
|
|
1814
1814
|
inputProps: {
|
|
1815
|
-
name:
|
|
1816
|
-
id:
|
|
1815
|
+
name: phoneNumberField,
|
|
1816
|
+
id: phoneNumberField,
|
|
1817
1817
|
required: true,
|
|
1818
1818
|
disabled
|
|
1819
1819
|
},
|
|
@@ -1824,13 +1824,15 @@ const PhoneNumberInput = ({ setValue, setPhoneNumberExt, phoneNumberExt, isValid
|
|
|
1824
1824
|
"gb",
|
|
1825
1825
|
"fr"
|
|
1826
1826
|
],
|
|
1827
|
+
placeholder,
|
|
1827
1828
|
autoFormat: false,
|
|
1828
1829
|
isValid: isValid && !phoneNumberExtensionError && !phoneNumberError,
|
|
1829
1830
|
value: `${(phoneNumberExt?.ext || "").replace(/^\+/, "")}${phoneNumberExt?.number || ""}`,
|
|
1830
1831
|
onChange: handlePhoneChange,
|
|
1831
1832
|
countryCodeEditable: false,
|
|
1832
1833
|
enableSearch: false,
|
|
1833
|
-
disableSearchIcon: true
|
|
1834
|
+
disableSearchIcon: true,
|
|
1835
|
+
inputClass
|
|
1834
1836
|
}),
|
|
1835
1837
|
(phoneNumberExtensionError || phoneNumberError) && /* @__PURE__ */ jsx("span", {
|
|
1836
1838
|
className: "text-xs font-normal text-red-500",
|