@lets-events/react 11.6.3 → 11.6.4
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -83
- package/dist/index.mjs +0 -83
- package/package.json +2 -3
- package/src/components/FormFields/PhoneFormField.tsx +75 -75
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lets-events/react@11.6.
|
|
3
|
+
> @lets-events/react@11.6.4 build
|
|
4
4
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
5
5
|
|
|
6
6
|
[1G[0K[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
[34mCLI[39m Target: es6
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m328.80 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 293ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m316.57 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 294ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
18
|
-
DTS dist/index.d.mts 392.
|
|
19
|
-
DTS dist/index.d.ts 392.
|
|
17
|
+
DTS ⚡️ Build success in 5873ms
|
|
18
|
+
DTS dist/index.d.mts 392.64 KB
|
|
19
|
+
DTS dist/index.d.ts 392.64 KB
|
|
20
20
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
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, FieldValues, UseFormProps, SubmitHandler, useForm } 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;
|
|
@@ -14917,7 +14916,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14917
14916
|
};
|
|
14918
14917
|
declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14919
14918
|
|
|
14920
|
-
type PhoneFormFieldProps =
|
|
14919
|
+
type PhoneFormFieldProps = {
|
|
14921
14920
|
name: string;
|
|
14922
14921
|
label?: string;
|
|
14923
14922
|
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, FieldValues, UseFormProps, SubmitHandler, useForm } 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;
|
|
@@ -14917,7 +14916,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14917
14916
|
};
|
|
14918
14917
|
declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14919
14918
|
|
|
14920
|
-
type PhoneFormFieldProps =
|
|
14919
|
+
type PhoneFormFieldProps = {
|
|
14921
14920
|
name: string;
|
|
14922
14921
|
label?: string;
|
|
14923
14922
|
required?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -9864,79 +9864,7 @@ var MultiSelectFormField = (_a) => {
|
|
|
9864
9864
|
|
|
9865
9865
|
// src/components/FormFields/PhoneFormField.tsx
|
|
9866
9866
|
var import_react_hook_form5 = require("react-hook-form");
|
|
9867
|
-
var import_react_international_phone = require("react-international-phone");
|
|
9868
|
-
var import_style = require("react-international-phone/style.css");
|
|
9869
9867
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9870
|
-
var PhoneFormInput = styled(import_react_international_phone.PhoneInput, {
|
|
9871
|
-
$$borderColor: "$colors$neutral300",
|
|
9872
|
-
boxSizing: "border-box",
|
|
9873
|
-
borderRadius: "$sm",
|
|
9874
|
-
display: "flex",
|
|
9875
|
-
flex: 1,
|
|
9876
|
-
fontFamily: "$default",
|
|
9877
|
-
color: "$dark500",
|
|
9878
|
-
img: {
|
|
9879
|
-
width: "$18",
|
|
9880
|
-
height: "$18",
|
|
9881
|
-
marginLeft: "$8"
|
|
9882
|
-
},
|
|
9883
|
-
ul: {
|
|
9884
|
-
border: "none"
|
|
9885
|
-
},
|
|
9886
|
-
input: {
|
|
9887
|
-
height: "$40 !important",
|
|
9888
|
-
flex: 1,
|
|
9889
|
-
borderColor: "$$borderColor !important",
|
|
9890
|
-
borderTopRightRadius: "$sm !important",
|
|
9891
|
-
borderBottomRightRadius: "$sm !important",
|
|
9892
|
-
fontSize: "inherit !important",
|
|
9893
|
-
"&:focus": {
|
|
9894
|
-
$$borderColor: "$colors$brand300"
|
|
9895
|
-
}
|
|
9896
|
-
},
|
|
9897
|
-
button: {
|
|
9898
|
-
height: "$40 !important",
|
|
9899
|
-
borderRight: "none",
|
|
9900
|
-
borderTopLeftRadius: "$sm !important",
|
|
9901
|
-
borderBottomLeftRadius: "$sm !important",
|
|
9902
|
-
borderColor: "$$borderColor !important",
|
|
9903
|
-
marginRight: "0 !important",
|
|
9904
|
-
"&:active": {
|
|
9905
|
-
$$borderColor: "$colors$brand300"
|
|
9906
|
-
},
|
|
9907
|
-
div: {
|
|
9908
|
-
padding: "auto $12",
|
|
9909
|
-
gap: " $8px"
|
|
9910
|
-
}
|
|
9911
|
-
},
|
|
9912
|
-
"&:has(input:disabled)": {
|
|
9913
|
-
backgroundColor: "$dark100",
|
|
9914
|
-
color: "$dark400",
|
|
9915
|
-
$$borderColor: "$colors$dark200",
|
|
9916
|
-
cursor: "not-allowed",
|
|
9917
|
-
img: {
|
|
9918
|
-
opacity: 0.6
|
|
9919
|
-
},
|
|
9920
|
-
button: {
|
|
9921
|
-
$$borderColor: "$colors$dark200"
|
|
9922
|
-
}
|
|
9923
|
-
},
|
|
9924
|
-
variants: {
|
|
9925
|
-
typography: typographyValues,
|
|
9926
|
-
color: {
|
|
9927
|
-
default: {
|
|
9928
|
-
$$borderColor: "$colors$neutral300"
|
|
9929
|
-
},
|
|
9930
|
-
error: {
|
|
9931
|
-
$$borderColor: "$colors$error600"
|
|
9932
|
-
}
|
|
9933
|
-
}
|
|
9934
|
-
},
|
|
9935
|
-
defaultVariants: {
|
|
9936
|
-
typography: "labelSmall",
|
|
9937
|
-
color: "default"
|
|
9938
|
-
}
|
|
9939
|
-
});
|
|
9940
9868
|
var PhoneFormField = (_a) => {
|
|
9941
9869
|
var _b = _a, {
|
|
9942
9870
|
name,
|
|
@@ -9971,17 +9899,6 @@ var PhoneFormField = (_a) => {
|
|
|
9971
9899
|
haveError
|
|
9972
9900
|
}
|
|
9973
9901
|
),
|
|
9974
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
9975
|
-
PhoneFormInput,
|
|
9976
|
-
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9977
|
-
defaultCountry,
|
|
9978
|
-
value: watch(name),
|
|
9979
|
-
color: haveError ? "error" : "default",
|
|
9980
|
-
onChange: handlePhoneChange
|
|
9981
|
-
}), props), {
|
|
9982
|
-
"aria-labelledby": `${name}-label`
|
|
9983
|
-
})
|
|
9984
|
-
),
|
|
9985
9902
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9986
9903
|
] });
|
|
9987
9904
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -9765,79 +9765,7 @@ var MultiSelectFormField = (_a) => {
|
|
|
9765
9765
|
|
|
9766
9766
|
// src/components/FormFields/PhoneFormField.tsx
|
|
9767
9767
|
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
9768
|
-
import { PhoneInput } from "react-international-phone";
|
|
9769
|
-
import "react-international-phone/style.css";
|
|
9770
9768
|
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9771
|
-
var PhoneFormInput = styled(PhoneInput, {
|
|
9772
|
-
$$borderColor: "$colors$neutral300",
|
|
9773
|
-
boxSizing: "border-box",
|
|
9774
|
-
borderRadius: "$sm",
|
|
9775
|
-
display: "flex",
|
|
9776
|
-
flex: 1,
|
|
9777
|
-
fontFamily: "$default",
|
|
9778
|
-
color: "$dark500",
|
|
9779
|
-
img: {
|
|
9780
|
-
width: "$18",
|
|
9781
|
-
height: "$18",
|
|
9782
|
-
marginLeft: "$8"
|
|
9783
|
-
},
|
|
9784
|
-
ul: {
|
|
9785
|
-
border: "none"
|
|
9786
|
-
},
|
|
9787
|
-
input: {
|
|
9788
|
-
height: "$40 !important",
|
|
9789
|
-
flex: 1,
|
|
9790
|
-
borderColor: "$$borderColor !important",
|
|
9791
|
-
borderTopRightRadius: "$sm !important",
|
|
9792
|
-
borderBottomRightRadius: "$sm !important",
|
|
9793
|
-
fontSize: "inherit !important",
|
|
9794
|
-
"&:focus": {
|
|
9795
|
-
$$borderColor: "$colors$brand300"
|
|
9796
|
-
}
|
|
9797
|
-
},
|
|
9798
|
-
button: {
|
|
9799
|
-
height: "$40 !important",
|
|
9800
|
-
borderRight: "none",
|
|
9801
|
-
borderTopLeftRadius: "$sm !important",
|
|
9802
|
-
borderBottomLeftRadius: "$sm !important",
|
|
9803
|
-
borderColor: "$$borderColor !important",
|
|
9804
|
-
marginRight: "0 !important",
|
|
9805
|
-
"&:active": {
|
|
9806
|
-
$$borderColor: "$colors$brand300"
|
|
9807
|
-
},
|
|
9808
|
-
div: {
|
|
9809
|
-
padding: "auto $12",
|
|
9810
|
-
gap: " $8px"
|
|
9811
|
-
}
|
|
9812
|
-
},
|
|
9813
|
-
"&:has(input:disabled)": {
|
|
9814
|
-
backgroundColor: "$dark100",
|
|
9815
|
-
color: "$dark400",
|
|
9816
|
-
$$borderColor: "$colors$dark200",
|
|
9817
|
-
cursor: "not-allowed",
|
|
9818
|
-
img: {
|
|
9819
|
-
opacity: 0.6
|
|
9820
|
-
},
|
|
9821
|
-
button: {
|
|
9822
|
-
$$borderColor: "$colors$dark200"
|
|
9823
|
-
}
|
|
9824
|
-
},
|
|
9825
|
-
variants: {
|
|
9826
|
-
typography: typographyValues,
|
|
9827
|
-
color: {
|
|
9828
|
-
default: {
|
|
9829
|
-
$$borderColor: "$colors$neutral300"
|
|
9830
|
-
},
|
|
9831
|
-
error: {
|
|
9832
|
-
$$borderColor: "$colors$error600"
|
|
9833
|
-
}
|
|
9834
|
-
}
|
|
9835
|
-
},
|
|
9836
|
-
defaultVariants: {
|
|
9837
|
-
typography: "labelSmall",
|
|
9838
|
-
color: "default"
|
|
9839
|
-
}
|
|
9840
|
-
});
|
|
9841
9769
|
var PhoneFormField = (_a) => {
|
|
9842
9770
|
var _b = _a, {
|
|
9843
9771
|
name,
|
|
@@ -9872,17 +9800,6 @@ var PhoneFormField = (_a) => {
|
|
|
9872
9800
|
haveError
|
|
9873
9801
|
}
|
|
9874
9802
|
),
|
|
9875
|
-
/* @__PURE__ */ jsx36(
|
|
9876
|
-
PhoneFormInput,
|
|
9877
|
-
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9878
|
-
defaultCountry,
|
|
9879
|
-
value: watch(name),
|
|
9880
|
-
color: haveError ? "error" : "default",
|
|
9881
|
-
onChange: handlePhoneChange
|
|
9882
|
-
}), props), {
|
|
9883
|
-
"aria-labelledby": `${name}-label`
|
|
9884
|
-
})
|
|
9885
|
-
),
|
|
9886
9803
|
/* @__PURE__ */ jsx36(ErrorFormMessage, { message: errorMsg })
|
|
9887
9804
|
] });
|
|
9888
9805
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lets-events/react",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"npm": "^11.4.2",
|
|
42
42
|
"radix-ui": "^1.4.2",
|
|
43
43
|
"react-day-picker": "^9.6.7",
|
|
44
|
-
"react-hook-form": "^7.57.0"
|
|
45
|
-
"react-international-phone": "^4.5.0"
|
|
44
|
+
"react-hook-form": "^7.57.0"
|
|
46
45
|
}
|
|
47
46
|
}
|
|
@@ -2,89 +2,89 @@ import { useController, useFormContext } from "react-hook-form";
|
|
|
2
2
|
import { Flex } from "../Flex";
|
|
3
3
|
import { FormLabel } from "./FormLabel";
|
|
4
4
|
import { ErrorFormMessage } from "./ErrorFormMessage";
|
|
5
|
-
import { PhoneInput, PhoneInputProps } from "react-international-phone";
|
|
5
|
+
// import { PhoneInput, PhoneInputProps } from "react-international-phone";
|
|
6
6
|
import { styled } from "../../styles";
|
|
7
7
|
import { typographyValues } from "../../types/typographyValues";
|
|
8
|
-
import "react-international-phone/style.css";
|
|
8
|
+
// import "react-international-phone/style.css";
|
|
9
9
|
|
|
10
|
-
export type PhoneFormFieldProps =
|
|
10
|
+
export type PhoneFormFieldProps = {
|
|
11
11
|
name: string;
|
|
12
12
|
label?: string;
|
|
13
13
|
required?: boolean;
|
|
14
14
|
defaultCountry?: string;
|
|
15
15
|
};
|
|
16
|
-
const PhoneFormInput = styled(PhoneInput, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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,
|
|
@@ -115,7 +115,7 @@ export const PhoneFormField = ({
|
|
|
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,7 +123,7 @@ 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
129
|
);
|