@lets-events/react 11.6.1 → 11.6.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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +35 -6
- package/dist/index.d.ts +35 -6
- package/dist/index.js +92 -3
- package/dist/index.mjs +92 -5
- package/package.json +3 -2
- package/src/components/Dropdown.tsx +4 -2
- package/src/components/FormFields/PhoneFormField.tsx +77 -77
- package/src/index.tsx +2 -0
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.3 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
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m330.83 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 388ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m318.50 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 389ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
18
|
-
DTS dist/index.d.mts
|
|
19
|
-
DTS dist/index.d.ts
|
|
17
|
+
DTS ⚡️ Build success in 6754ms
|
|
18
|
+
DTS dist/index.d.mts 392.72 KB
|
|
19
|
+
DTS dist/index.d.ts 392.72 KB
|
|
20
20
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ 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';
|
|
17
18
|
|
|
18
19
|
interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
|
|
19
20
|
name: IconName;
|
|
@@ -14916,7 +14917,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14916
14917
|
};
|
|
14917
14918
|
declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14918
14919
|
|
|
14919
|
-
type PhoneFormFieldProps = {
|
|
14920
|
+
type PhoneFormFieldProps = PhoneInputProps & {
|
|
14920
14921
|
name: string;
|
|
14921
14922
|
label?: string;
|
|
14922
14923
|
required?: boolean;
|
|
@@ -14972,14 +14973,14 @@ type AddressFormFieldsProps = {
|
|
|
14972
14973
|
};
|
|
14973
14974
|
declare function AddressFormFields({ name, label, required, layout, }: AddressFormFieldsProps): react_jsx_runtime.JSX.Element;
|
|
14974
14975
|
|
|
14975
|
-
type Option$
|
|
14976
|
+
type Option$2 = {
|
|
14976
14977
|
label: string;
|
|
14977
14978
|
value: string;
|
|
14978
14979
|
};
|
|
14979
14980
|
type RadioGroupFormFieldProps = {
|
|
14980
14981
|
name: string;
|
|
14981
14982
|
label: string;
|
|
14982
|
-
options: Option$
|
|
14983
|
+
options: Option$2[];
|
|
14983
14984
|
required?: boolean;
|
|
14984
14985
|
defaultValue?: string;
|
|
14985
14986
|
validationErrorMessage?: string;
|
|
@@ -14989,14 +14990,14 @@ type RadioGroupFormFieldProps = {
|
|
|
14989
14990
|
};
|
|
14990
14991
|
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14991
14992
|
|
|
14992
|
-
type Option = {
|
|
14993
|
+
type Option$1 = {
|
|
14993
14994
|
label: string;
|
|
14994
14995
|
value: string;
|
|
14995
14996
|
};
|
|
14996
14997
|
type CheckboxGroupFormFieldProps = {
|
|
14997
14998
|
name: string;
|
|
14998
14999
|
label: string;
|
|
14999
|
-
options: Option[];
|
|
15000
|
+
options: Option$1[];
|
|
15000
15001
|
required?: boolean;
|
|
15001
15002
|
validationErrorMessage?: string;
|
|
15002
15003
|
defaultValue?: string[];
|
|
@@ -15006,4 +15007,32 @@ type CheckboxGroupFormFieldProps = {
|
|
|
15006
15007
|
};
|
|
15007
15008
|
declare const CheckboxGroupFormField: ({ name, label, options, required, validationErrorMessage, defaultValue, color, fontWeight, disabled, }: CheckboxGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15008
15009
|
|
|
15009
|
-
|
|
15010
|
+
type CountryFormFieldProps = {
|
|
15011
|
+
name: string;
|
|
15012
|
+
label: string;
|
|
15013
|
+
required?: boolean;
|
|
15014
|
+
placeholder?: string;
|
|
15015
|
+
language?: "es" | "pt-BR" | "en";
|
|
15016
|
+
haveError?: boolean;
|
|
15017
|
+
};
|
|
15018
|
+
declare function CountryFormField({ name, label, required, language, }: CountryFormFieldProps): react_jsx_runtime.JSX.Element;
|
|
15019
|
+
|
|
15020
|
+
type Option = {
|
|
15021
|
+
label: string;
|
|
15022
|
+
value: string;
|
|
15023
|
+
};
|
|
15024
|
+
type SelectFormFieldProps = {
|
|
15025
|
+
name: string;
|
|
15026
|
+
label: string;
|
|
15027
|
+
required?: boolean;
|
|
15028
|
+
placeholder?: string;
|
|
15029
|
+
options: Option[];
|
|
15030
|
+
validation?: {
|
|
15031
|
+
validate?: (value: string) => boolean | string;
|
|
15032
|
+
};
|
|
15033
|
+
validationErrorMessage?: string;
|
|
15034
|
+
defaultValue?: string;
|
|
15035
|
+
};
|
|
15036
|
+
declare const SelectFormField: ({ name, label, required, placeholder, options, validation, validationErrorMessage, defaultValue, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15037
|
+
|
|
15038
|
+
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, isValidCNPJ, maskFormat, maskUnformat, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ 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';
|
|
17
18
|
|
|
18
19
|
interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
|
|
19
20
|
name: IconName;
|
|
@@ -14916,7 +14917,7 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14916
14917
|
};
|
|
14917
14918
|
declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14918
14919
|
|
|
14919
|
-
type PhoneFormFieldProps = {
|
|
14920
|
+
type PhoneFormFieldProps = PhoneInputProps & {
|
|
14920
14921
|
name: string;
|
|
14921
14922
|
label?: string;
|
|
14922
14923
|
required?: boolean;
|
|
@@ -14972,14 +14973,14 @@ type AddressFormFieldsProps = {
|
|
|
14972
14973
|
};
|
|
14973
14974
|
declare function AddressFormFields({ name, label, required, layout, }: AddressFormFieldsProps): react_jsx_runtime.JSX.Element;
|
|
14974
14975
|
|
|
14975
|
-
type Option$
|
|
14976
|
+
type Option$2 = {
|
|
14976
14977
|
label: string;
|
|
14977
14978
|
value: string;
|
|
14978
14979
|
};
|
|
14979
14980
|
type RadioGroupFormFieldProps = {
|
|
14980
14981
|
name: string;
|
|
14981
14982
|
label: string;
|
|
14982
|
-
options: Option$
|
|
14983
|
+
options: Option$2[];
|
|
14983
14984
|
required?: boolean;
|
|
14984
14985
|
defaultValue?: string;
|
|
14985
14986
|
validationErrorMessage?: string;
|
|
@@ -14989,14 +14990,14 @@ type RadioGroupFormFieldProps = {
|
|
|
14989
14990
|
};
|
|
14990
14991
|
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14991
14992
|
|
|
14992
|
-
type Option = {
|
|
14993
|
+
type Option$1 = {
|
|
14993
14994
|
label: string;
|
|
14994
14995
|
value: string;
|
|
14995
14996
|
};
|
|
14996
14997
|
type CheckboxGroupFormFieldProps = {
|
|
14997
14998
|
name: string;
|
|
14998
14999
|
label: string;
|
|
14999
|
-
options: Option[];
|
|
15000
|
+
options: Option$1[];
|
|
15000
15001
|
required?: boolean;
|
|
15001
15002
|
validationErrorMessage?: string;
|
|
15002
15003
|
defaultValue?: string[];
|
|
@@ -15006,4 +15007,32 @@ type CheckboxGroupFormFieldProps = {
|
|
|
15006
15007
|
};
|
|
15007
15008
|
declare const CheckboxGroupFormField: ({ name, label, options, required, validationErrorMessage, defaultValue, color, fontWeight, disabled, }: CheckboxGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15008
15009
|
|
|
15009
|
-
|
|
15010
|
+
type CountryFormFieldProps = {
|
|
15011
|
+
name: string;
|
|
15012
|
+
label: string;
|
|
15013
|
+
required?: boolean;
|
|
15014
|
+
placeholder?: string;
|
|
15015
|
+
language?: "es" | "pt-BR" | "en";
|
|
15016
|
+
haveError?: boolean;
|
|
15017
|
+
};
|
|
15018
|
+
declare function CountryFormField({ name, label, required, language, }: CountryFormFieldProps): react_jsx_runtime.JSX.Element;
|
|
15019
|
+
|
|
15020
|
+
type Option = {
|
|
15021
|
+
label: string;
|
|
15022
|
+
value: string;
|
|
15023
|
+
};
|
|
15024
|
+
type SelectFormFieldProps = {
|
|
15025
|
+
name: string;
|
|
15026
|
+
label: string;
|
|
15027
|
+
required?: boolean;
|
|
15028
|
+
placeholder?: string;
|
|
15029
|
+
options: Option[];
|
|
15030
|
+
validation?: {
|
|
15031
|
+
validate?: (value: string) => boolean | string;
|
|
15032
|
+
};
|
|
15033
|
+
validationErrorMessage?: string;
|
|
15034
|
+
defaultValue?: string;
|
|
15035
|
+
};
|
|
15036
|
+
declare const SelectFormField: ({ name, label, required, placeholder, options, validation, validationErrorMessage, defaultValue, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15037
|
+
|
|
15038
|
+
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, isValidCNPJ, maskFormat, maskUnformat, useToast };
|
package/dist/index.js
CHANGED
|
@@ -1062,6 +1062,7 @@ __export(index_exports, {
|
|
|
1062
1062
|
CheckboxItem: () => CheckboxItem,
|
|
1063
1063
|
Container: () => Container,
|
|
1064
1064
|
ContainerStyled: () => ContainerStyled,
|
|
1065
|
+
CountryFormField: () => CountryFormField,
|
|
1065
1066
|
Drawer: () => Drawer,
|
|
1066
1067
|
DropdownMenu: () => DropdownMenu2,
|
|
1067
1068
|
DropdownMenuItem: () => DropdownMenuItem,
|
|
@@ -1088,6 +1089,7 @@ __export(index_exports, {
|
|
|
1088
1089
|
RadioItem: () => RadioItem,
|
|
1089
1090
|
Section: () => Section,
|
|
1090
1091
|
SectionStyled: () => SectionStyled,
|
|
1092
|
+
SelectFormField: () => SelectFormField,
|
|
1091
1093
|
Step: () => Step,
|
|
1092
1094
|
StepContent: () => StepContent,
|
|
1093
1095
|
StepList: () => StepList,
|
|
@@ -3431,7 +3433,7 @@ var DropdownMenuStyled = styled("div", {
|
|
|
3431
3433
|
border: "1px solid $dark300",
|
|
3432
3434
|
borderRadius: "$xs",
|
|
3433
3435
|
padding: "$8 $12",
|
|
3434
|
-
width: "
|
|
3436
|
+
width: "100%",
|
|
3435
3437
|
display: "flex",
|
|
3436
3438
|
button: {
|
|
3437
3439
|
fontFamily: "$default",
|
|
@@ -3497,13 +3499,14 @@ var DropdownMenuContentStyled = styled(import_themes11.DropdownMenu.Content, {
|
|
|
3497
3499
|
border: "1px solid $dark300",
|
|
3498
3500
|
borderRadius: "$xs",
|
|
3499
3501
|
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08)",
|
|
3500
|
-
width: "
|
|
3502
|
+
width: "100%",
|
|
3501
3503
|
minWidth: "100%",
|
|
3502
3504
|
marginTop: "3px",
|
|
3503
3505
|
maxHeight: "400px",
|
|
3504
3506
|
height: "100%",
|
|
3505
3507
|
position: "relative",
|
|
3506
|
-
overflow: "auto"
|
|
3508
|
+
overflow: "auto",
|
|
3509
|
+
zIndex: 9999999999
|
|
3507
3510
|
});
|
|
3508
3511
|
function DropdownMenu2(_a) {
|
|
3509
3512
|
var _b = _a, {
|
|
@@ -3541,6 +3544,7 @@ function DropdownMenu2(_a) {
|
|
|
3541
3544
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3542
3545
|
DropdownMenuContentStyled,
|
|
3543
3546
|
{
|
|
3547
|
+
container: document.body,
|
|
3544
3548
|
avoidCollisions: false,
|
|
3545
3549
|
align: "start",
|
|
3546
3550
|
alignOffset: -14,
|
|
@@ -9860,7 +9864,79 @@ var MultiSelectFormField = (_a) => {
|
|
|
9860
9864
|
|
|
9861
9865
|
// src/components/FormFields/PhoneFormField.tsx
|
|
9862
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");
|
|
9863
9869
|
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
|
+
});
|
|
9864
9940
|
var PhoneFormField = (_a) => {
|
|
9865
9941
|
var _b = _a, {
|
|
9866
9942
|
name,
|
|
@@ -9895,6 +9971,17 @@ var PhoneFormField = (_a) => {
|
|
|
9895
9971
|
haveError
|
|
9896
9972
|
}
|
|
9897
9973
|
),
|
|
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
|
+
),
|
|
9898
9985
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9899
9986
|
] });
|
|
9900
9987
|
};
|
|
@@ -10714,6 +10801,7 @@ var CheckboxGroupFormField = ({
|
|
|
10714
10801
|
CheckboxItem,
|
|
10715
10802
|
Container,
|
|
10716
10803
|
ContainerStyled,
|
|
10804
|
+
CountryFormField,
|
|
10717
10805
|
Drawer,
|
|
10718
10806
|
DropdownMenu,
|
|
10719
10807
|
DropdownMenuItem,
|
|
@@ -10740,6 +10828,7 @@ var CheckboxGroupFormField = ({
|
|
|
10740
10828
|
RadioItem,
|
|
10741
10829
|
Section,
|
|
10742
10830
|
SectionStyled,
|
|
10831
|
+
SelectFormField,
|
|
10743
10832
|
Step,
|
|
10744
10833
|
StepContent,
|
|
10745
10834
|
StepList,
|
package/dist/index.mjs
CHANGED
|
@@ -3327,7 +3327,7 @@ var DropdownMenuStyled = styled("div", {
|
|
|
3327
3327
|
border: "1px solid $dark300",
|
|
3328
3328
|
borderRadius: "$xs",
|
|
3329
3329
|
padding: "$8 $12",
|
|
3330
|
-
width: "
|
|
3330
|
+
width: "100%",
|
|
3331
3331
|
display: "flex",
|
|
3332
3332
|
button: {
|
|
3333
3333
|
fontFamily: "$default",
|
|
@@ -3393,13 +3393,14 @@ var DropdownMenuContentStyled = styled(DropdownMenuRadix.Content, {
|
|
|
3393
3393
|
border: "1px solid $dark300",
|
|
3394
3394
|
borderRadius: "$xs",
|
|
3395
3395
|
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08)",
|
|
3396
|
-
width: "
|
|
3396
|
+
width: "100%",
|
|
3397
3397
|
minWidth: "100%",
|
|
3398
3398
|
marginTop: "3px",
|
|
3399
3399
|
maxHeight: "400px",
|
|
3400
3400
|
height: "100%",
|
|
3401
3401
|
position: "relative",
|
|
3402
|
-
overflow: "auto"
|
|
3402
|
+
overflow: "auto",
|
|
3403
|
+
zIndex: 9999999999
|
|
3403
3404
|
});
|
|
3404
3405
|
function DropdownMenu2(_a) {
|
|
3405
3406
|
var _b = _a, {
|
|
@@ -3437,6 +3438,7 @@ function DropdownMenu2(_a) {
|
|
|
3437
3438
|
/* @__PURE__ */ jsx11(
|
|
3438
3439
|
DropdownMenuContentStyled,
|
|
3439
3440
|
{
|
|
3441
|
+
container: document.body,
|
|
3440
3442
|
avoidCollisions: false,
|
|
3441
3443
|
align: "start",
|
|
3442
3444
|
alignOffset: -14,
|
|
@@ -9763,7 +9765,79 @@ var MultiSelectFormField = (_a) => {
|
|
|
9763
9765
|
|
|
9764
9766
|
// src/components/FormFields/PhoneFormField.tsx
|
|
9765
9767
|
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
9768
|
+
import { PhoneInput } from "react-international-phone";
|
|
9769
|
+
import "react-international-phone/style.css";
|
|
9766
9770
|
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
|
+
});
|
|
9767
9841
|
var PhoneFormField = (_a) => {
|
|
9768
9842
|
var _b = _a, {
|
|
9769
9843
|
name,
|
|
@@ -9798,6 +9872,17 @@ var PhoneFormField = (_a) => {
|
|
|
9798
9872
|
haveError
|
|
9799
9873
|
}
|
|
9800
9874
|
),
|
|
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
|
+
),
|
|
9801
9886
|
/* @__PURE__ */ jsx36(ErrorFormMessage, { message: errorMsg })
|
|
9802
9887
|
] });
|
|
9803
9888
|
};
|
|
@@ -10156,7 +10241,7 @@ function CountryFormField({
|
|
|
10156
10241
|
}
|
|
10157
10242
|
|
|
10158
10243
|
// src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx
|
|
10159
|
-
import { useController as
|
|
10244
|
+
import { useController as useController3, useFormContext as useFormContext7 } from "react-hook-form";
|
|
10160
10245
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
10161
10246
|
var PostalCodeFormField = ({
|
|
10162
10247
|
name,
|
|
@@ -10168,7 +10253,7 @@ var PostalCodeFormField = ({
|
|
|
10168
10253
|
const { control } = useFormContext7();
|
|
10169
10254
|
const {
|
|
10170
10255
|
field: { onChange, value }
|
|
10171
|
-
} =
|
|
10256
|
+
} = useController3({ name, control });
|
|
10172
10257
|
return /* @__PURE__ */ jsx43(
|
|
10173
10258
|
TextFormField,
|
|
10174
10259
|
{
|
|
@@ -10616,6 +10701,7 @@ export {
|
|
|
10616
10701
|
CheckboxItem,
|
|
10617
10702
|
Container,
|
|
10618
10703
|
ContainerStyled,
|
|
10704
|
+
CountryFormField,
|
|
10619
10705
|
Drawer,
|
|
10620
10706
|
DropdownMenu2 as DropdownMenu,
|
|
10621
10707
|
DropdownMenuItem,
|
|
@@ -10642,6 +10728,7 @@ export {
|
|
|
10642
10728
|
RadioItem,
|
|
10643
10729
|
Section,
|
|
10644
10730
|
SectionStyled,
|
|
10731
|
+
SelectFormField,
|
|
10645
10732
|
Step,
|
|
10646
10733
|
StepContent,
|
|
10647
10734
|
StepList,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lets-events/react",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -41,6 +41,7 @@
|
|
|
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"
|
|
44
|
+
"react-hook-form": "^7.57.0",
|
|
45
|
+
"react-international-phone": "^4.5.0"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -36,7 +36,7 @@ const DropdownMenuStyled = styled("div", {
|
|
|
36
36
|
border: "1px solid $dark300",
|
|
37
37
|
borderRadius: "$xs",
|
|
38
38
|
padding: "$8 $12",
|
|
39
|
-
width: "
|
|
39
|
+
width: "100%",
|
|
40
40
|
display: "flex",
|
|
41
41
|
button: {
|
|
42
42
|
fontFamily: "$default",
|
|
@@ -103,13 +103,14 @@ const DropdownMenuContentStyled = styled(DropdownMenuRadix.Content, {
|
|
|
103
103
|
border: "1px solid $dark300",
|
|
104
104
|
borderRadius: "$xs",
|
|
105
105
|
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08)",
|
|
106
|
-
width: "
|
|
106
|
+
width: "100%",
|
|
107
107
|
minWidth: "100%",
|
|
108
108
|
marginTop: "3px",
|
|
109
109
|
maxHeight: "400px",
|
|
110
110
|
height: "100%",
|
|
111
111
|
position: "relative",
|
|
112
112
|
overflow: "auto",
|
|
113
|
+
zIndex: 9999999999,
|
|
113
114
|
});
|
|
114
115
|
|
|
115
116
|
export type DropdownMenuProps = ComponentProps<
|
|
@@ -161,6 +162,7 @@ export function DropdownMenu({
|
|
|
161
162
|
</button>
|
|
162
163
|
</DropdownMenuRadix.Trigger>
|
|
163
164
|
<DropdownMenuContentStyled
|
|
165
|
+
container={document.body}
|
|
164
166
|
avoidCollisions={false}
|
|
165
167
|
align="start"
|
|
166
168
|
alignOffset={-14}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { useFormContext } from "react-hook-form";
|
|
1
|
+
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
|
-
|
|
5
|
+
import { PhoneInput, PhoneInputProps } from "react-international-phone";
|
|
6
6
|
import { styled } from "../../styles";
|
|
7
7
|
import { typographyValues } from "../../types/typographyValues";
|
|
8
|
-
|
|
8
|
+
import "react-international-phone/style.css";
|
|
9
9
|
|
|
10
|
-
export type PhoneFormFieldProps = {
|
|
10
|
+
export type PhoneFormFieldProps = PhoneInputProps & {
|
|
11
11
|
name: string;
|
|
12
12
|
label?: string;
|
|
13
13
|
required?: boolean;
|
|
14
14
|
defaultCountry?: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
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,15 +115,15 @@ export const PhoneFormField = ({
|
|
|
115
115
|
required={required}
|
|
116
116
|
haveError={haveError}
|
|
117
117
|
/>
|
|
118
|
-
|
|
118
|
+
<PhoneFormInput
|
|
119
119
|
{...register(name, { required })}
|
|
120
120
|
defaultCountry={defaultCountry}
|
|
121
121
|
value={watch(name)}
|
|
122
|
-
color={haveError ?
|
|
122
|
+
color={haveError ? "error" : "default"}
|
|
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
|
);
|
package/src/index.tsx
CHANGED
|
@@ -50,3 +50,5 @@ export * from "./components/FormFields/IdentityDocumentNumberFormField";
|
|
|
50
50
|
export * from "./components/FormFields/AddressFormFields/index";
|
|
51
51
|
export * from "./components/FormFields/RadioGroupFormField";
|
|
52
52
|
export * from "./components/FormFields/CheckboxGroupFormField";
|
|
53
|
+
export * from "./components/FormFields/AddressFormFields/CountryFormField";
|
|
54
|
+
export * from "./components/FormFields/SelectFormField";
|