@rpcbase/ui 0.54.0 → 0.55.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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/AddressAutocompleteInput/index.tsx"],"names":[],"mappings":"AAoJA,eAAO,MAAM,wBAAwB,GAAI,qJAatC;IACD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAA;IAC/E,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAChC,4CA+PA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/AddressAutocompleteInput/index.tsx"],"names":[],"mappings":"AAoJA,eAAO,MAAM,wBAAwB,GAAI,qJAatC;IACD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAA;IAC/E,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAChC,4CAuTA,CAAA"}
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import type { CountryCode } from "libphonenumber-js";
3
+ import { type Props as SelectProps } from "react-select";
4
+ type CountryOption = {
5
+ value: CountryCode;
6
+ name: string;
7
+ dialCode: string;
8
+ label: string;
9
+ flag: string;
10
+ };
11
+ export type PhoneNumberSelectedCountry = {
12
+ code: CountryCode;
13
+ name: string;
14
+ dialCode: string;
15
+ flag: string;
16
+ };
17
+ export type PhoneNumberChangeDetails = {
18
+ formattedInternational: string;
19
+ formattedNational: string;
20
+ e164: string | null;
21
+ country: CountryCode;
22
+ countryCallingCode: string;
23
+ nationalNumber: string;
24
+ rawInput: string;
25
+ isValid: boolean;
26
+ selectedCountry: PhoneNumberSelectedCountry;
27
+ };
28
+ export type PhoneNumberInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange"> & {
29
+ value?: string;
30
+ defaultCountry?: CountryCode;
31
+ country?: CountryCode;
32
+ locale?: string | string[];
33
+ onChange?: (details: PhoneNumberChangeDetails) => void;
34
+ onCountryChange?: (country: CountryCode, selection: PhoneNumberSelectedCountry) => void;
35
+ className?: string;
36
+ inputClassName?: string;
37
+ selectProps?: Partial<SelectProps<CountryOption, false>>;
38
+ autofillShimName?: string;
39
+ };
40
+ export declare const PhoneNumberInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "defaultValue"> & {
41
+ value?: string;
42
+ defaultCountry?: CountryCode;
43
+ country?: CountryCode;
44
+ locale?: string | string[];
45
+ onChange?: (details: PhoneNumberChangeDetails) => void;
46
+ onCountryChange?: (country: CountryCode, selection: PhoneNumberSelectedCountry) => void;
47
+ className?: string;
48
+ inputClassName?: string;
49
+ selectProps?: Partial<SelectProps<CountryOption, false>>;
50
+ autofillShimName?: string;
51
+ } & React.RefAttributes<HTMLInputElement>>;
52
+ export {};
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAQrB,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;CACb,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,iBAAiB,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,WAAW,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,EAAE,0BAA0B,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,WAAW,CAAA;IAC5B,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAA;IACtD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,0BAA0B,KAAK,IAAI,CAAA;IACvF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAA;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AA4ZD,eAAO,MAAM,gBAAgB;YAtanB,MAAM;qBACG,WAAW;cAClB,WAAW;aACZ,MAAM,GAAG,MAAM,EAAE;eACf,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI;sBACpC,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,0BAA0B,KAAK,IAAI;gBAC3E,MAAM;qBACD,MAAM;kBACT,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;uBACrC,MAAM;0CA0vC1B,CAAA"}
@@ -4,5 +4,6 @@ export * from "./Checkbox";
4
4
  export * from "./Dialog";
5
5
  export * from "./Image";
6
6
  export * from "./Input";
7
+ export * from "./PhoneNumberInput";
7
8
  export * from "./header";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA"}