@chekinapp/ui 0.0.141 → 0.0.142
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.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2906,6 +2906,7 @@ type PhoneInputProps = {
|
|
|
2906
2906
|
autoDetectCode?: boolean;
|
|
2907
2907
|
searchable?: boolean;
|
|
2908
2908
|
defaultCode?: string;
|
|
2909
|
+
defaultNumber?: string;
|
|
2909
2910
|
};
|
|
2910
2911
|
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<PhoneInputHandle>>;
|
|
2911
2912
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2906,6 +2906,7 @@ type PhoneInputProps = {
|
|
|
2906
2906
|
autoDetectCode?: boolean;
|
|
2907
2907
|
searchable?: boolean;
|
|
2908
2908
|
defaultCode?: string;
|
|
2909
|
+
defaultNumber?: string;
|
|
2909
2910
|
};
|
|
2910
2911
|
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<PhoneInputHandle>>;
|
|
2911
2912
|
|
package/dist/index.js
CHANGED
|
@@ -14229,14 +14229,15 @@ var PhoneInput = React50.forwardRef(
|
|
|
14229
14229
|
className,
|
|
14230
14230
|
autoDetectCode = true,
|
|
14231
14231
|
searchable = true,
|
|
14232
|
-
defaultCode
|
|
14232
|
+
defaultCode,
|
|
14233
|
+
defaultNumber
|
|
14233
14234
|
}, ref) {
|
|
14234
14235
|
const { t } = useTranslation33();
|
|
14235
14236
|
const groupLabelId = React50.useId();
|
|
14236
14237
|
const errorMsgId = React50.useId();
|
|
14237
14238
|
const numberInputRef = React50.useRef(null);
|
|
14238
14239
|
const [codeSearchValue, setCodeSearchValue] = React50.useState("");
|
|
14239
|
-
const safeValue = toPhoneValue(value);
|
|
14240
|
+
const safeValue = toPhoneValue(value, defaultCode, defaultNumber);
|
|
14240
14241
|
const effectiveCode = safeValue.code || defaultCode || "";
|
|
14241
14242
|
const resolvedLabel = label ?? "";
|
|
14242
14243
|
const hasExternalError = Boolean(error);
|