@lets-events/react 11.5.2 → 11.5.3

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,5 +1,5 @@
1
1
 
2
- > @lets-events/react@11.5.2 build
2
+ > @lets-events/react@11.5.3 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist\index.js 303.05 KB
12
- CJS ⚡️ Build success in 229ms
13
- ESM dist\index.mjs 292.77 KB
14
- ESM ⚡️ Build success in 230ms
11
+ ESM dist\index.mjs 290.84 KB
12
+ ESM ⚡️ Build success in 213ms
13
+ CJS dist\index.js 301.02 KB
14
+ CJS ⚡️ Build success in 214ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4079ms
17
- DTS dist\index.d.mts 388.35 KB
18
- DTS dist\index.d.ts 388.35 KB
16
+ DTS ⚡️ Build success in 3966ms
17
+ DTS dist\index.d.mts 388.27 KB
18
+ DTS dist\index.d.ts 388.27 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 11.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - rm react international phone
8
+
3
9
  ## 11.5.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -14,7 +14,6 @@ import { MaskOptions, format, unformat } from '@react-input/mask';
14
14
  import { Dialog } from 'radix-ui';
15
15
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
16
  import { FieldError, Merge, FieldErrorsImpl, UseFormProps, SubmitHandler, FieldValues } from 'react-hook-form';
17
- import { PhoneInputProps } from 'react-international-phone';
18
17
 
19
18
  interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
20
19
  name: IconName;
@@ -14908,7 +14907,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14908
14907
  };
14909
14908
  declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14910
14909
 
14911
- type PhoneFormFieldProps = PhoneInputProps & {
14910
+ type PhoneFormFieldProps = {
14912
14911
  name: string;
14913
14912
  label?: string;
14914
14913
  required?: boolean;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,6 @@ import { MaskOptions, format, unformat } from '@react-input/mask';
14
14
  import { Dialog } from 'radix-ui';
15
15
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
16
  import { FieldError, Merge, FieldErrorsImpl, UseFormProps, SubmitHandler, FieldValues } from 'react-hook-form';
17
- import { PhoneInputProps } from 'react-international-phone';
18
17
 
19
18
  interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
20
19
  name: IconName;
@@ -14908,7 +14907,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14908
14907
  };
14909
14908
  declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14910
14909
 
14911
- type PhoneFormFieldProps = PhoneInputProps & {
14910
+ type PhoneFormFieldProps = {
14912
14911
  name: string;
14913
14912
  label?: string;
14914
14913
  required?: boolean;
package/dist/index.js CHANGED
@@ -9789,79 +9789,7 @@ var MultiSelectFormField = (_a) => {
9789
9789
 
9790
9790
  // src/components/FormFields/PhoneFormField.tsx
9791
9791
  var import_react_hook_form5 = require("react-hook-form");
9792
- var import_react_international_phone = require("react-international-phone");
9793
- var import_style = require("react-international-phone/style.css");
9794
9792
  var import_jsx_runtime36 = require("react/jsx-runtime");
9795
- var PhoneFormInput = styled(import_react_international_phone.PhoneInput, {
9796
- $$borderColor: "$colors$neutral300",
9797
- boxSizing: "border-box",
9798
- borderRadius: "$sm",
9799
- display: "flex",
9800
- flex: 1,
9801
- fontFamily: "$default",
9802
- color: "$dark500",
9803
- img: {
9804
- width: "$18",
9805
- height: "$18",
9806
- marginLeft: "$8"
9807
- },
9808
- ul: {
9809
- border: "none"
9810
- },
9811
- input: {
9812
- height: "$40 !important",
9813
- flex: 1,
9814
- borderColor: "$$borderColor !important",
9815
- borderTopRightRadius: "$sm !important",
9816
- borderBottomRightRadius: "$sm !important",
9817
- fontSize: "inherit !important",
9818
- "&:focus": {
9819
- $$borderColor: "$colors$brand300"
9820
- }
9821
- },
9822
- button: {
9823
- height: "$40 !important",
9824
- borderRight: "none",
9825
- borderTopLeftRadius: "$sm !important",
9826
- borderBottomLeftRadius: "$sm !important",
9827
- borderColor: "$$borderColor !important",
9828
- marginRight: "0 !important",
9829
- "&:active": {
9830
- $$borderColor: "$colors$brand300"
9831
- },
9832
- div: {
9833
- padding: "auto $12",
9834
- gap: " $8px"
9835
- }
9836
- },
9837
- "&:has(input:disabled)": {
9838
- backgroundColor: "$dark100",
9839
- color: "$dark400",
9840
- $$borderColor: "$colors$dark200",
9841
- cursor: "not-allowed",
9842
- img: {
9843
- opacity: 0.6
9844
- },
9845
- button: {
9846
- $$borderColor: "$colors$dark200"
9847
- }
9848
- },
9849
- variants: {
9850
- typography: typographyValues,
9851
- color: {
9852
- default: {
9853
- $$borderColor: "$colors$neutral300"
9854
- },
9855
- error: {
9856
- $$borderColor: "$colors$error600"
9857
- }
9858
- }
9859
- },
9860
- defaultVariants: {
9861
- typography: "labelSmall",
9862
- color: "default"
9863
- }
9864
- });
9865
9793
  var PhoneFormField = (_a) => {
9866
9794
  var _b = _a, {
9867
9795
  name,
@@ -9896,17 +9824,6 @@ var PhoneFormField = (_a) => {
9896
9824
  haveError
9897
9825
  }
9898
9826
  ),
9899
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
9900
- PhoneFormInput,
9901
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, register(name, { required })), {
9902
- defaultCountry,
9903
- value: watch(name),
9904
- color: haveError ? "error" : "default",
9905
- onChange: handlePhoneChange
9906
- }), props), {
9907
- "aria-labelledby": `${name}-label`
9908
- })
9909
- ),
9910
9827
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorFormMessage, { message: errorMsg })
9911
9828
  ] });
9912
9829
  };
package/dist/index.mjs CHANGED
@@ -9700,79 +9700,7 @@ var MultiSelectFormField = (_a) => {
9700
9700
 
9701
9701
  // src/components/FormFields/PhoneFormField.tsx
9702
9702
  import { useFormContext as useFormContext4 } from "react-hook-form";
9703
- import { PhoneInput } from "react-international-phone";
9704
- import "react-international-phone/style.css";
9705
9703
  import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
9706
- var PhoneFormInput = styled(PhoneInput, {
9707
- $$borderColor: "$colors$neutral300",
9708
- boxSizing: "border-box",
9709
- borderRadius: "$sm",
9710
- display: "flex",
9711
- flex: 1,
9712
- fontFamily: "$default",
9713
- color: "$dark500",
9714
- img: {
9715
- width: "$18",
9716
- height: "$18",
9717
- marginLeft: "$8"
9718
- },
9719
- ul: {
9720
- border: "none"
9721
- },
9722
- input: {
9723
- height: "$40 !important",
9724
- flex: 1,
9725
- borderColor: "$$borderColor !important",
9726
- borderTopRightRadius: "$sm !important",
9727
- borderBottomRightRadius: "$sm !important",
9728
- fontSize: "inherit !important",
9729
- "&:focus": {
9730
- $$borderColor: "$colors$brand300"
9731
- }
9732
- },
9733
- button: {
9734
- height: "$40 !important",
9735
- borderRight: "none",
9736
- borderTopLeftRadius: "$sm !important",
9737
- borderBottomLeftRadius: "$sm !important",
9738
- borderColor: "$$borderColor !important",
9739
- marginRight: "0 !important",
9740
- "&:active": {
9741
- $$borderColor: "$colors$brand300"
9742
- },
9743
- div: {
9744
- padding: "auto $12",
9745
- gap: " $8px"
9746
- }
9747
- },
9748
- "&:has(input:disabled)": {
9749
- backgroundColor: "$dark100",
9750
- color: "$dark400",
9751
- $$borderColor: "$colors$dark200",
9752
- cursor: "not-allowed",
9753
- img: {
9754
- opacity: 0.6
9755
- },
9756
- button: {
9757
- $$borderColor: "$colors$dark200"
9758
- }
9759
- },
9760
- variants: {
9761
- typography: typographyValues,
9762
- color: {
9763
- default: {
9764
- $$borderColor: "$colors$neutral300"
9765
- },
9766
- error: {
9767
- $$borderColor: "$colors$error600"
9768
- }
9769
- }
9770
- },
9771
- defaultVariants: {
9772
- typography: "labelSmall",
9773
- color: "default"
9774
- }
9775
- });
9776
9704
  var PhoneFormField = (_a) => {
9777
9705
  var _b = _a, {
9778
9706
  name,
@@ -9807,17 +9735,6 @@ var PhoneFormField = (_a) => {
9807
9735
  haveError
9808
9736
  }
9809
9737
  ),
9810
- /* @__PURE__ */ jsx36(
9811
- PhoneFormInput,
9812
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, register(name, { required })), {
9813
- defaultCountry,
9814
- value: watch(name),
9815
- color: haveError ? "error" : "default",
9816
- onChange: handlePhoneChange
9817
- }), props), {
9818
- "aria-labelledby": `${name}-label`
9819
- })
9820
- ),
9821
9738
  /* @__PURE__ */ jsx36(ErrorFormMessage, { message: errorMsg })
9822
9739
  ] });
9823
9740
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "11.5.2",
3
+ "version": "11.5.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -40,7 +40,6 @@
40
40
  "npm": "^11.4.2",
41
41
  "radix-ui": "^1.4.2",
42
42
  "react-day-picker": "^9.6.7",
43
- "react-hook-form": "^7.57.0",
44
- "react-international-phone": "^4.5.0"
43
+ "react-hook-form": "^7.57.0"
45
44
  }
46
45
  }
@@ -1,96 +1,96 @@
1
- import { useFormContext } from 'react-hook-form'
2
- import { Flex } from '../Flex'
3
- import { FormLabel } from './FormLabel'
4
- import { ErrorFormMessage } from './ErrorFormMessage'
5
- import { PhoneInput, PhoneInputProps } from 'react-international-phone'
6
- import { styled } from '../../styles'
7
- import { typographyValues } from '../../types/typographyValues'
8
- import 'react-international-phone/style.css'
1
+ import { useFormContext } from "react-hook-form";
2
+ import { Flex } from "../Flex";
3
+ import { FormLabel } from "./FormLabel";
4
+ import { ErrorFormMessage } from "./ErrorFormMessage";
5
+ // import { PhoneInput, PhoneInputProps } from 'react-international-phone'
6
+ import { styled } from "../../styles";
7
+ import { typographyValues } from "../../types/typographyValues";
8
+ // import 'react-international-phone/style.css'
9
9
 
10
- export type PhoneFormFieldProps = PhoneInputProps & {
11
- name: string
12
- label?: string
13
- required?: boolean
14
- defaultCountry?: string
15
- }
16
- const PhoneFormInput = styled(PhoneInput, {
17
- $$borderColor: '$colors$neutral300',
18
- boxSizing: 'border-box',
19
- borderRadius: '$sm',
20
- display: 'flex',
21
- flex: 1,
22
- fontFamily: '$default',
23
- color: '$dark500',
10
+ export type PhoneFormFieldProps = {
11
+ name: string;
12
+ label?: string;
13
+ required?: boolean;
14
+ defaultCountry?: string;
15
+ };
16
+ // const PhoneFormInput = styled(PhoneInput, {
17
+ // $$borderColor: '$colors$neutral300',
18
+ // boxSizing: 'border-box',
19
+ // borderRadius: '$sm',
20
+ // display: 'flex',
21
+ // flex: 1,
22
+ // fontFamily: '$default',
23
+ // color: '$dark500',
24
24
 
25
- img: {
26
- width: '$18',
27
- height: '$18',
28
- marginLeft: '$8',
29
- },
30
- ul: {
31
- border: 'none',
32
- },
33
- input: {
34
- height: '$40 !important',
35
- flex: 1,
36
- borderColor: '$$borderColor !important',
37
- borderTopRightRadius: '$sm !important',
38
- borderBottomRightRadius: '$sm !important',
39
- fontSize: 'inherit !important',
40
- '&:focus': {
41
- $$borderColor: '$colors$brand300',
42
- },
43
- },
44
- button: {
45
- height: '$40 !important',
46
- borderRight: 'none',
47
- borderTopLeftRadius: '$sm !important',
48
- borderBottomLeftRadius: '$sm !important',
49
- borderColor: '$$borderColor !important',
50
- marginRight: '0 !important',
51
- '&:active': {
52
- $$borderColor: '$colors$brand300',
53
- },
54
- div: {
55
- padding: 'auto $12',
56
- gap: ' $8px',
57
- },
58
- },
25
+ // img: {
26
+ // width: '$18',
27
+ // height: '$18',
28
+ // marginLeft: '$8',
29
+ // },
30
+ // ul: {
31
+ // border: 'none',
32
+ // },
33
+ // input: {
34
+ // height: '$40 !important',
35
+ // flex: 1,
36
+ // borderColor: '$$borderColor !important',
37
+ // borderTopRightRadius: '$sm !important',
38
+ // borderBottomRightRadius: '$sm !important',
39
+ // fontSize: 'inherit !important',
40
+ // '&:focus': {
41
+ // $$borderColor: '$colors$brand300',
42
+ // },
43
+ // },
44
+ // button: {
45
+ // height: '$40 !important',
46
+ // borderRight: 'none',
47
+ // borderTopLeftRadius: '$sm !important',
48
+ // borderBottomLeftRadius: '$sm !important',
49
+ // borderColor: '$$borderColor !important',
50
+ // marginRight: '0 !important',
51
+ // '&:active': {
52
+ // $$borderColor: '$colors$brand300',
53
+ // },
54
+ // div: {
55
+ // padding: 'auto $12',
56
+ // gap: ' $8px',
57
+ // },
58
+ // },
59
59
 
60
- '&:has(input:disabled)': {
61
- backgroundColor: '$dark100',
62
- color: '$dark400',
63
- $$borderColor: '$colors$dark200',
64
- cursor: 'not-allowed',
65
- img: {
66
- opacity: 0.6,
67
- },
68
- button: {
69
- $$borderColor: '$colors$dark200',
70
- },
71
- },
72
- variants: {
73
- typography: typographyValues,
74
- color: {
75
- default: {
76
- $$borderColor: '$colors$neutral300',
77
- },
78
- error: {
79
- $$borderColor: '$colors$error600',
80
- },
81
- },
82
- },
83
- defaultVariants: {
84
- typography: 'labelSmall',
85
- color: 'default',
86
- },
87
- })
60
+ // '&:has(input:disabled)': {
61
+ // backgroundColor: '$dark100',
62
+ // color: '$dark400',
63
+ // $$borderColor: '$colors$dark200',
64
+ // cursor: 'not-allowed',
65
+ // img: {
66
+ // opacity: 0.6,
67
+ // },
68
+ // button: {
69
+ // $$borderColor: '$colors$dark200',
70
+ // },
71
+ // },
72
+ // variants: {
73
+ // typography: typographyValues,
74
+ // color: {
75
+ // default: {
76
+ // $$borderColor: '$colors$neutral300',
77
+ // },
78
+ // error: {
79
+ // $$borderColor: '$colors$error600',
80
+ // },
81
+ // },
82
+ // },
83
+ // defaultVariants: {
84
+ // typography: 'labelSmall',
85
+ // color: 'default',
86
+ // },
87
+ // })
88
88
 
89
89
  export const PhoneFormField = ({
90
90
  name,
91
91
  label,
92
92
  required,
93
- defaultCountry = 'br',
93
+ defaultCountry = "br",
94
94
  ...props
95
95
  }: PhoneFormFieldProps) => {
96
96
  const {
@@ -98,24 +98,24 @@ export const PhoneFormField = ({
98
98
  formState: { errors },
99
99
  setValue,
100
100
  watch,
101
- } = useFormContext()
101
+ } = useFormContext();
102
102
 
103
- const haveError = !!errors[name]
104
- const errorMsg = errors[name]?.message
103
+ const haveError = !!errors[name];
104
+ const errorMsg = errors[name]?.message;
105
105
 
106
106
  const handlePhoneChange = (phone: string) => {
107
- setValue(name, phone)
108
- }
107
+ setValue(name, phone);
108
+ };
109
109
 
110
110
  return (
111
- <Flex direction={'column'}>
111
+ <Flex direction={"column"}>
112
112
  <FormLabel
113
113
  name={name}
114
114
  label={label}
115
115
  required={required}
116
116
  haveError={haveError}
117
117
  />
118
- <PhoneFormInput
118
+ {/* <PhoneFormInput
119
119
  {...register(name, { required })}
120
120
  defaultCountry={defaultCountry}
121
121
  value={watch(name)}
@@ -123,8 +123,8 @@ export const PhoneFormField = ({
123
123
  onChange={handlePhoneChange}
124
124
  {...props}
125
125
  aria-labelledby={`${name}-label`}
126
- />
126
+ /> */}
127
127
  <ErrorFormMessage message={errorMsg} />
128
128
  </Flex>
129
- )
130
- }
129
+ );
130
+ };