@vygruppen/spor-react 11.3.6 → 11.3.8
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +13 -0
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/input/PhoneNumberInput.tsx +24 -7
package/dist/index.mjs
CHANGED
@@ -1097,7 +1097,7 @@ var PhoneNumberInput = forwardRef(
|
|
1097
1097
|
countryCode,
|
1098
1098
|
nationalNumber: value.nationalNumber
|
1099
1099
|
}),
|
1100
|
-
name: name ? `${name}-country-code` : "country-code",
|
1100
|
+
name: name ? typeof name !== "string" && name.countryCode ? name.countryCode : `${name}-country-code` : "country-code",
|
1101
1101
|
height: "100%",
|
1102
1102
|
width: "6.25rem",
|
1103
1103
|
variant
|
@@ -1109,7 +1109,7 @@ var PhoneNumberInput = forwardRef(
|
|
1109
1109
|
type: "tel",
|
1110
1110
|
label,
|
1111
1111
|
value: value.nationalNumber,
|
1112
|
-
name: name ? `${name}-phone-number` : "phone-number",
|
1112
|
+
name: name ? typeof name !== "string" && name.nationalNumber ? name.nationalNumber : `${name}-phone-number` : "phone-number",
|
1113
1113
|
onChange: (e) => {
|
1114
1114
|
const strippedValue = e.target.value.replace(/[^\d\s-]/g, "");
|
1115
1115
|
onChange({
|