@rpcbase/ui 0.57.0 → 0.59.0
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.
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { CountryCode } from "libphonenumber-js";
|
|
3
3
|
import { type Props as SelectProps } from "react-select";
|
|
4
|
+
export type PhoneNumberInputMessages = {
|
|
5
|
+
lengthTooLong: (countryName: string | null) => string;
|
|
6
|
+
noMatches: string;
|
|
7
|
+
selectCountryLabel: string;
|
|
8
|
+
selectedCountryLabel: (countryName: string | null) => string;
|
|
9
|
+
};
|
|
4
10
|
type CountryOption = {
|
|
5
11
|
value: CountryCode;
|
|
6
12
|
name: string;
|
|
7
13
|
dialCode: string;
|
|
8
14
|
label: string;
|
|
9
15
|
flag: string;
|
|
16
|
+
searchableTokens: string[];
|
|
17
|
+
normalizedSearchableTokens: string[];
|
|
10
18
|
};
|
|
11
19
|
export type PhoneNumberSelectedCountry = {
|
|
12
20
|
code: CountryCode;
|
|
@@ -36,6 +44,7 @@ export type PhoneNumberInputProps = Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
36
44
|
inputClassName?: string;
|
|
37
45
|
selectProps?: Partial<SelectProps<CountryOption, false>>;
|
|
38
46
|
autofillShimName?: string;
|
|
47
|
+
messages?: Partial<PhoneNumberInputMessages>;
|
|
39
48
|
};
|
|
40
49
|
export declare const PhoneNumberInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "defaultValue"> & {
|
|
41
50
|
value?: string;
|
|
@@ -48,6 +57,7 @@ export declare const PhoneNumberInput: React.ForwardRefExoticComponent<Omit<Reac
|
|
|
48
57
|
inputClassName?: string;
|
|
49
58
|
selectProps?: Partial<SelectProps<CountryOption, false>>;
|
|
50
59
|
autofillShimName?: string;
|
|
60
|
+
messages?: Partial<PhoneNumberInputMessages>;
|
|
51
61
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
52
62
|
export {};
|
|
53
63
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/PhoneNumberInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAOpD,OAAe,EAGb,KAAK,KAAK,IAAI,WAAW,EAG1B,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/PhoneNumberInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAOpD,OAAe,EAGb,KAAK,KAAK,IAAI,WAAW,EAG1B,MAAM,cAAc,CAAA;AAmBrB,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAA;IACrD,SAAS,EAAE,MAAM,CAAA;IACjB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAA;CAC7D,CAAA;AA8GD,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,Q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