@tecsinapse/cortex-react 2.0.0 → 2.1.0-beta.1

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.
@@ -0,0 +1,6 @@
1
+ import { ParsedCountry } from 'react-international-phone';
2
+ export declare const PhoneInputOption: ({ country, handleSelectCountry, disableClick, }: {
3
+ country: ParsedCountry;
4
+ handleSelectCountry: (country: ParsedCountry) => void;
5
+ disableClick?: boolean;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PhoneInputOptions: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const PhoneInputPopover: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { ParsedCountry, CountryIso2 } from 'react-international-phone';
3
+ export declare const PhoneInputRoot: ({ children, className, defaultCountry, value, onChange, }: {
4
+ children: ReactNode;
5
+ value?: string;
6
+ onChange?: (data: {
7
+ phone: string;
8
+ inputValue: string;
9
+ country: ParsedCountry;
10
+ }) => void;
11
+ className?: string;
12
+ defaultCountry?: CountryIso2;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const PhoneInputTrigger: ({ disabled, label, }: {
2
+ disabled?: boolean;
3
+ label?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { usePhoneInput } from 'react-international-phone';
2
+ export interface Country {
3
+ country: string;
4
+ iso: string;
5
+ code: string;
6
+ }
7
+ interface PhoneInputContextProps extends ReturnType<typeof usePhoneInput> {
8
+ isOpen: boolean;
9
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
10
+ triggerWidth?: number;
11
+ setTriggerWidth?: React.Dispatch<React.SetStateAction<number | undefined>>;
12
+ }
13
+ export declare const PhoneInputContext: import("react").Context<PhoneInputContextProps | null>;
14
+ export declare const usePhoneContext: () => PhoneInputContextProps;
15
+ export {};
@@ -0,0 +1,26 @@
1
+ export declare const PhoneInput: {
2
+ Root: ({ children, className, defaultCountry, value, onChange, }: {
3
+ children: import("react").ReactNode;
4
+ value?: string;
5
+ onChange?: (data: {
6
+ phone: string;
7
+ inputValue: string;
8
+ country: import("react-international-phone").ParsedCountry;
9
+ }) => void;
10
+ className?: string;
11
+ defaultCountry?: import("react-international-phone").CountryIso2;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ Popover: ({ children }: {
14
+ children: import("react").ReactNode;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ Trigger: ({ disabled, label, }: {
17
+ disabled?: boolean;
18
+ label?: string;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ Option: ({ country, handleSelectCountry, disableClick, }: {
21
+ country: import("react-international-phone").ParsedCountry;
22
+ handleSelectCountry: (country: import("react-international-phone").ParsedCountry) => void;
23
+ disableClick?: boolean;
24
+ }) => import("react/jsx-runtime").JSX.Element;
25
+ Options: () => import("react/jsx-runtime").JSX.Element;
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/cortex-react",
3
- "version": "2.0.0",
3
+ "version": "2.1.0-beta.1",
4
4
  "description": "React components based in @tecsinapse/cortex-core",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
@@ -28,6 +28,7 @@
28
28
  "react-aria": "3.38.1",
29
29
  "react-dropzone": "14.3.8",
30
30
  "react-imask": "7.6.1",
31
+ "react-international-phone": "^4.6.1",
31
32
  "react-spring": "9.7.5",
32
33
  "react-stately": "3.36.1",
33
34
  "sonner": "1.7.3",
@@ -48,5 +49,5 @@
48
49
  "react-icons": ">=5.2.0",
49
50
  "tailwindcss": "^4.1.16"
50
51
  },
51
- "gitHead": "25a54150c2580e661e539efaf85e3affaeada784"
52
+ "gitHead": "13492afebcc2d6530a30969977f7a4bc301521cf"
52
53
  }