@lets-events/react 11.7.2 → 11.7.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 +12 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
- package/src/components/FormFields/EmailFormField.tsx +3 -1
- package/src/components/FormFields/TextFormField.tsx +7 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@11.7.
|
|
2
|
+
> @lets-events/react@11.7.4 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mCJS[39m [1mdist\index.js [22m[32m332.14 KB[39m
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in 234ms
|
|
13
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m320.00 KB[39m
|
|
14
|
-
[32mESM[39m ⚡️ Build success in 235ms
|
|
15
11
|
[34mDTS[39m Build start
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
12
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m320.05 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 310ms
|
|
14
|
+
[32mCJS[39m [1mdist\index.js [22m[32m332.18 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 310ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4234ms
|
|
17
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m383.65 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m383.65 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -14668,7 +14668,8 @@ type EmailFormFieldProps = {
|
|
|
14668
14668
|
name: string;
|
|
14669
14669
|
label?: string;
|
|
14670
14670
|
required?: boolean;
|
|
14671
|
+
placeholder?: string;
|
|
14671
14672
|
};
|
|
14672
|
-
declare const EmailFormField: ({ name, label, required, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14673
|
+
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14673
14674
|
|
|
14674
14675
|
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, EmailFormField, type EmailFormFieldProps, 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
|
@@ -14668,7 +14668,8 @@ type EmailFormFieldProps = {
|
|
|
14668
14668
|
name: string;
|
|
14669
14669
|
label?: string;
|
|
14670
14670
|
required?: boolean;
|
|
14671
|
+
placeholder?: string;
|
|
14671
14672
|
};
|
|
14672
|
-
declare const EmailFormField: ({ name, label, required, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14673
|
+
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14673
14674
|
|
|
14674
14675
|
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, EmailFormField, type EmailFormFieldProps, 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
|
@@ -9846,7 +9846,8 @@ var TextFormField = (_a) => {
|
|
|
9846
9846
|
const handleValidate = (0, import_react17.useCallback)(
|
|
9847
9847
|
(value) => {
|
|
9848
9848
|
var _a2;
|
|
9849
|
-
if (!required && value.trim() === "")
|
|
9849
|
+
if (value === void 0 || value === null || !required && value.trim() === "")
|
|
9850
|
+
return true;
|
|
9850
9851
|
return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
|
|
9851
9852
|
},
|
|
9852
9853
|
[validate, required]
|
|
@@ -10800,7 +10801,8 @@ var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
|
10800
10801
|
var EmailFormField = ({
|
|
10801
10802
|
name,
|
|
10802
10803
|
label,
|
|
10803
|
-
required
|
|
10804
|
+
required,
|
|
10805
|
+
placeholder
|
|
10804
10806
|
}) => {
|
|
10805
10807
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10806
10808
|
TextFormField,
|
|
@@ -10808,7 +10810,7 @@ var EmailFormField = ({
|
|
|
10808
10810
|
name,
|
|
10809
10811
|
label,
|
|
10810
10812
|
required,
|
|
10811
|
-
placeholder
|
|
10813
|
+
placeholder,
|
|
10812
10814
|
type: "email",
|
|
10813
10815
|
validate: validateEmail("E-mail inv\xE1lido.")
|
|
10814
10816
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -9749,7 +9749,8 @@ var TextFormField = (_a) => {
|
|
|
9749
9749
|
const handleValidate = useCallback3(
|
|
9750
9750
|
(value) => {
|
|
9751
9751
|
var _a2;
|
|
9752
|
-
if (!required && value.trim() === "")
|
|
9752
|
+
if (value === void 0 || value === null || !required && value.trim() === "")
|
|
9753
|
+
return true;
|
|
9753
9754
|
return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
|
|
9754
9755
|
},
|
|
9755
9756
|
[validate, required]
|
|
@@ -10706,7 +10707,8 @@ import { jsx as jsx49 } from "react/jsx-runtime";
|
|
|
10706
10707
|
var EmailFormField = ({
|
|
10707
10708
|
name,
|
|
10708
10709
|
label,
|
|
10709
|
-
required
|
|
10710
|
+
required,
|
|
10711
|
+
placeholder
|
|
10710
10712
|
}) => {
|
|
10711
10713
|
return /* @__PURE__ */ jsx49(
|
|
10712
10714
|
TextFormField,
|
|
@@ -10714,7 +10716,7 @@ var EmailFormField = ({
|
|
|
10714
10716
|
name,
|
|
10715
10717
|
label,
|
|
10716
10718
|
required,
|
|
10717
|
-
placeholder
|
|
10719
|
+
placeholder,
|
|
10718
10720
|
type: "email",
|
|
10719
10721
|
validate: validateEmail("E-mail inv\xE1lido.")
|
|
10720
10722
|
}
|
package/package.json
CHANGED
|
@@ -5,19 +5,21 @@ export type EmailFormFieldProps = {
|
|
|
5
5
|
name: string;
|
|
6
6
|
label?: string;
|
|
7
7
|
required?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export const EmailFormField = ({
|
|
11
12
|
name,
|
|
12
13
|
label,
|
|
13
14
|
required,
|
|
15
|
+
placeholder,
|
|
14
16
|
}: EmailFormFieldProps) => {
|
|
15
17
|
return (
|
|
16
18
|
<TextFormField
|
|
17
19
|
name={name}
|
|
18
20
|
label={label}
|
|
19
21
|
required={required}
|
|
20
|
-
placeholder=
|
|
22
|
+
placeholder={placeholder}
|
|
21
23
|
type="email"
|
|
22
24
|
validate={validateEmail("E-mail inválido.")}
|
|
23
25
|
/>
|
|
@@ -39,8 +39,13 @@ export const TextFormField = ({
|
|
|
39
39
|
...inputProps
|
|
40
40
|
}: TextFormFieldProps) => {
|
|
41
41
|
const handleValidate = useCallback(
|
|
42
|
-
(value
|
|
43
|
-
if (
|
|
42
|
+
(value?: string) => {
|
|
43
|
+
if (
|
|
44
|
+
value === undefined ||
|
|
45
|
+
value === null ||
|
|
46
|
+
(!required && value.trim() === "")
|
|
47
|
+
)
|
|
48
|
+
return true;
|
|
44
49
|
return validate?.(value) ?? true;
|
|
45
50
|
},
|
|
46
51
|
[validate, required]
|