@lets-events/react 12.10.3 → 12.10.5
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/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +21 -19
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +187 -77
- package/dist/index.mjs +187 -77
- package/package.json +1 -1
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +123 -123
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +74 -74
- package/src/components/Button/styledComponents.ts +361 -361
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +168 -168
- package/src/components/Calendar/styledComponents.ts +480 -480
- package/src/components/Card.tsx +67 -67
- package/src/components/CheckboxGroup.tsx +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Divider.tsx +7 -7
- package/src/components/DoubleCalendar/index.tsx +204 -182
- package/src/components/Drawer/index.tsx +103 -103
- package/src/components/Drawer/styledComponents.ts +97 -97
- package/src/components/Dropdown.tsx +302 -302
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
- package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
- package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
- package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
- package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
- package/src/components/FormFields/BirthDateFormField.tsx +84 -84
- package/src/components/FormFields/CNPJFormField.tsx +87 -87
- package/src/components/FormFields/CPFFormField.tsx +78 -78
- package/src/components/FormFields/CalendarFormField.tsx +98 -98
- package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
- package/src/components/FormFields/DateAndTimeFormField.tsx +217 -217
- package/src/components/FormFields/DoubleCalendarFormField.tsx +96 -96
- package/src/components/FormFields/EmailFormField.tsx +27 -27
- package/src/components/FormFields/Form.tsx +39 -39
- package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
- package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
- package/src/components/FormFields/PhoneFormField.tsx +40 -40
- package/src/components/FormFields/RadioGroupFormField.tsx +86 -86
- package/src/components/FormFields/RichEditorFormField.tsx +105 -103
- package/src/components/FormFields/SelectFormField.tsx +113 -113
- package/src/components/FormFields/SwitchFormField.tsx +46 -46
- package/src/components/FormFields/TextAreaFormField.tsx +61 -61
- package/src/components/FormFields/TextFormField.tsx +112 -112
- package/src/components/FormFields/TimePickerFormField.tsx +88 -88
- package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/subComponents/FormLabel.tsx +36 -36
- package/src/components/FormFields/utils/validation.ts +23 -23
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +38 -38
- package/src/components/MenuDropdown/styledComponents.ts +31 -31
- package/src/components/Modal.tsx +110 -110
- package/src/components/MultiSelect/index.tsx +305 -305
- package/src/components/MultiSelect/styledComponents.ts +160 -160
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/RichEditor/QuillComponent.tsx +415 -468
- package/src/components/RichEditor/RichEditor.tsx +53 -49
- package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
- package/src/components/RichEditor/editorConfig.ts +149 -0
- package/src/components/RichEditor/index.ts +3 -3
- package/src/components/RichEditor/styledComponents.ts +1175 -1170
- package/src/components/RichEditor/types.ts +12 -0
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +38 -38
- package/src/components/TextField.tsx +372 -372
- package/src/components/TextareaField.tsx +116 -116
- package/src/components/TimePicker.tsx +357 -357
- package/src/components/Toast/components/ToastItem.tsx +41 -41
- package/src/components/Toast/components/ToastProvider.tsx +63 -63
- package/src/components/Toast/hooks/useToast.ts +12 -12
- package/src/components/Toast/index.tsx +5 -5
- package/src/components/Toast/styles/index.ts +135 -135
- package/src/components/Toast/types/index.ts +46 -46
- package/src/components/ToggleElement/index.tsx +58 -58
- package/src/components/Tooltip/index.tsx +73 -73
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useCountries.ts +41 -41
- package/src/hooks/useImageUpload.ts +139 -139
- package/src/hooks/useOnClickOutside.tsx +42 -42
- package/src/index.tsx +72 -72
- package/src/styles/index.ts +41 -41
- package/src/types/typographyValues.ts +178 -178
- package/src/utils/getNestedValue.ts +3 -3
- package/src/utils/states.ts +29 -29
- package/src/utils/uploadService.ts +180 -180
- package/tsconfig.json +3 -3
- package/tsup.config.ts +38 -38
package/.eslintrc.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@lets-events/eslint-config"
|
|
1
|
+
{
|
|
2
|
+
"extends": "@lets-events/eslint-config"
|
|
3
3
|
}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[34mCLI[39m
|
|
7
|
-
[34mCLI[39m
|
|
8
|
-
[34mCLI[39m
|
|
9
|
-
[34mCLI[39m
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[32mESM[39m
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @lets-events/react@12.10.5 build
|
|
4
|
+
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
5
|
+
|
|
6
|
+
[1G[0K[34mCLI[39m Building entry: src/index.tsx
|
|
7
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
+
[34mCLI[39m tsup v8.5.0
|
|
9
|
+
[34mCLI[39m Using tsup config: /home/bia3003/Lets/design-system/packages/react/tsup.config.ts
|
|
10
|
+
[34mCLI[39m Target: es6
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[34mCJS[39m Build start
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m413.82 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 395ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m429.48 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 395ms
|
|
17
|
+
DTS Build start
|
|
18
|
+
DTS ⚡️ Build success in 8590ms
|
|
19
|
+
DTS dist/index.d.mts 405.26 KB
|
|
20
|
+
DTS dist/index.d.ts 405.26 KB
|
|
21
|
+
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -4743,6 +4743,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4743
4743
|
setSelected: React__default.Dispatch<React__default.SetStateAction<DateRange>>;
|
|
4744
4744
|
position?: "top" | "bottom" | "top-right" | "bottom-right";
|
|
4745
4745
|
action?: boolean;
|
|
4746
|
+
simpleAction?: boolean;
|
|
4746
4747
|
actionText?: string;
|
|
4747
4748
|
hasError?: boolean;
|
|
4748
4749
|
expand?: boolean;
|
|
@@ -4751,7 +4752,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4751
4752
|
maxDate?: Date;
|
|
4752
4753
|
disabled?: boolean;
|
|
4753
4754
|
};
|
|
4754
|
-
declare function DoubleCalendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
|
|
4755
|
+
declare function DoubleCalendar({ action, actionText, simpleAction, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
|
|
4755
4756
|
|
|
4756
4757
|
declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
4757
4758
|
open?: boolean | "false" | "true" | undefined;
|
|
@@ -15295,6 +15296,8 @@ type EmailFormFieldProps = {
|
|
|
15295
15296
|
};
|
|
15296
15297
|
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15297
15298
|
|
|
15299
|
+
type RichEditorElement = "header" | "bold" | "italic" | "underline" | "color" | "background" | "align" | "list" | "link" | "image" | "video";
|
|
15300
|
+
|
|
15298
15301
|
interface UploadConfig$1 {
|
|
15299
15302
|
apiUrl: string;
|
|
15300
15303
|
s3Bucket: string;
|
|
@@ -15316,6 +15319,7 @@ interface RichEditorProps {
|
|
|
15316
15319
|
className?: string;
|
|
15317
15320
|
uploadConfig?: UploadConfig$1;
|
|
15318
15321
|
simpleVersion?: boolean;
|
|
15322
|
+
richEditorElements?: RichEditorElement[];
|
|
15319
15323
|
onCharacterCountChange?: (count: number) => void;
|
|
15320
15324
|
maxLength?: number;
|
|
15321
15325
|
disableVideo?: boolean;
|
|
@@ -15337,8 +15341,9 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
|
15337
15341
|
simpleVersion?: boolean;
|
|
15338
15342
|
uploadConfig?: RichEditorProps["uploadConfig"];
|
|
15339
15343
|
disableVideo?: boolean;
|
|
15344
|
+
richEditorElements?: RichEditorElement[];
|
|
15340
15345
|
};
|
|
15341
|
-
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15346
|
+
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, richEditorElements, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15342
15347
|
|
|
15343
15348
|
type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
|
|
15344
15349
|
name: string;
|
|
@@ -15446,4 +15451,4 @@ declare const useImageUpload: (options: UseImageUploadOptions) => {
|
|
|
15446
15451
|
reset: () => void;
|
|
15447
15452
|
};
|
|
15448
15453
|
|
|
15449
|
-
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, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, DateAndTimeFormField, type DateAndTimeFormFieldProps, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, 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, type IconProps, 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, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, 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, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, ToggleElement, type ToggleElementProps, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
|
15454
|
+
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, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, DateAndTimeFormField, type DateAndTimeFormFieldProps, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, 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, type IconProps, 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, RichEditor, type RichEditorElement, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, 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, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, ToggleElement, type ToggleElementProps, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -4743,6 +4743,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4743
4743
|
setSelected: React__default.Dispatch<React__default.SetStateAction<DateRange>>;
|
|
4744
4744
|
position?: "top" | "bottom" | "top-right" | "bottom-right";
|
|
4745
4745
|
action?: boolean;
|
|
4746
|
+
simpleAction?: boolean;
|
|
4746
4747
|
actionText?: string;
|
|
4747
4748
|
hasError?: boolean;
|
|
4748
4749
|
expand?: boolean;
|
|
@@ -4751,7 +4752,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4751
4752
|
maxDate?: Date;
|
|
4752
4753
|
disabled?: boolean;
|
|
4753
4754
|
};
|
|
4754
|
-
declare function DoubleCalendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
|
|
4755
|
+
declare function DoubleCalendar({ action, actionText, simpleAction, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
|
|
4755
4756
|
|
|
4756
4757
|
declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
4757
4758
|
open?: boolean | "false" | "true" | undefined;
|
|
@@ -15295,6 +15296,8 @@ type EmailFormFieldProps = {
|
|
|
15295
15296
|
};
|
|
15296
15297
|
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15297
15298
|
|
|
15299
|
+
type RichEditorElement = "header" | "bold" | "italic" | "underline" | "color" | "background" | "align" | "list" | "link" | "image" | "video";
|
|
15300
|
+
|
|
15298
15301
|
interface UploadConfig$1 {
|
|
15299
15302
|
apiUrl: string;
|
|
15300
15303
|
s3Bucket: string;
|
|
@@ -15316,6 +15319,7 @@ interface RichEditorProps {
|
|
|
15316
15319
|
className?: string;
|
|
15317
15320
|
uploadConfig?: UploadConfig$1;
|
|
15318
15321
|
simpleVersion?: boolean;
|
|
15322
|
+
richEditorElements?: RichEditorElement[];
|
|
15319
15323
|
onCharacterCountChange?: (count: number) => void;
|
|
15320
15324
|
maxLength?: number;
|
|
15321
15325
|
disableVideo?: boolean;
|
|
@@ -15337,8 +15341,9 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
|
15337
15341
|
simpleVersion?: boolean;
|
|
15338
15342
|
uploadConfig?: RichEditorProps["uploadConfig"];
|
|
15339
15343
|
disableVideo?: boolean;
|
|
15344
|
+
richEditorElements?: RichEditorElement[];
|
|
15340
15345
|
};
|
|
15341
|
-
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15346
|
+
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, richEditorElements, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15342
15347
|
|
|
15343
15348
|
type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
|
|
15344
15349
|
name: string;
|
|
@@ -15446,4 +15451,4 @@ declare const useImageUpload: (options: UseImageUploadOptions) => {
|
|
|
15446
15451
|
reset: () => void;
|
|
15447
15452
|
};
|
|
15448
15453
|
|
|
15449
|
-
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, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, DateAndTimeFormField, type DateAndTimeFormFieldProps, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, 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, type IconProps, 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, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, 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, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, ToggleElement, type ToggleElementProps, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
|
15454
|
+
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, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, DateAndTimeFormField, type DateAndTimeFormFieldProps, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, 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, type IconProps, 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, RichEditor, type RichEditorElement, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, 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, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, ToggleElement, type ToggleElementProps, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
package/dist/index.js
CHANGED
|
@@ -8476,6 +8476,7 @@ function DoubleCalendar(_a) {
|
|
|
8476
8476
|
var _b = _a, {
|
|
8477
8477
|
action,
|
|
8478
8478
|
actionText,
|
|
8479
|
+
simpleAction,
|
|
8479
8480
|
calendarLayout,
|
|
8480
8481
|
selected,
|
|
8481
8482
|
setSelected,
|
|
@@ -8489,6 +8490,7 @@ function DoubleCalendar(_a) {
|
|
|
8489
8490
|
} = _b, props = __objRest(_b, [
|
|
8490
8491
|
"action",
|
|
8491
8492
|
"actionText",
|
|
8493
|
+
"simpleAction",
|
|
8492
8494
|
"calendarLayout",
|
|
8493
8495
|
"selected",
|
|
8494
8496
|
"setSelected",
|
|
@@ -8606,7 +8608,28 @@ function DoubleCalendar(_a) {
|
|
|
8606
8608
|
children: actionText != null ? actionText : "Aplicar"
|
|
8607
8609
|
}
|
|
8608
8610
|
)
|
|
8609
|
-
] })
|
|
8611
|
+
] }),
|
|
8612
|
+
simpleAction && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8613
|
+
"div",
|
|
8614
|
+
{
|
|
8615
|
+
style: { display: "flex", justifyContent: "center", padding: "1rem", width: "100%" },
|
|
8616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8617
|
+
Button,
|
|
8618
|
+
{
|
|
8619
|
+
style: { margin: "0 0.5rem" },
|
|
8620
|
+
variant: "text",
|
|
8621
|
+
color: "brand",
|
|
8622
|
+
type: "button",
|
|
8623
|
+
onClick: () => {
|
|
8624
|
+
setShowCalendar(false);
|
|
8625
|
+
},
|
|
8626
|
+
size: "medium",
|
|
8627
|
+
fontWeight: "medium",
|
|
8628
|
+
children: actionText != null ? actionText : "Aplicar"
|
|
8629
|
+
}
|
|
8630
|
+
)
|
|
8631
|
+
}
|
|
8632
|
+
) })
|
|
8610
8633
|
] })
|
|
8611
8634
|
] })) });
|
|
8612
8635
|
}
|
|
@@ -12898,9 +12921,141 @@ var QuillEditor = styled("div", {
|
|
|
12898
12921
|
// Container snow
|
|
12899
12922
|
"& .ql-container.ql-snow": {
|
|
12900
12923
|
border: "1px solid #ccc"
|
|
12924
|
+
},
|
|
12925
|
+
"& button.ql-list:first-child": {
|
|
12926
|
+
borderLeft: "1px solid #C2C3C7",
|
|
12927
|
+
paddingLeft: "16px",
|
|
12928
|
+
width: "38px"
|
|
12901
12929
|
}
|
|
12902
12930
|
});
|
|
12903
12931
|
|
|
12932
|
+
// src/components/RichEditor/editorConfig.ts
|
|
12933
|
+
var TEXT_FORMATS = ["bold", "italic", "underline"];
|
|
12934
|
+
var MEDIA_FORMATS = ["link", "image", "video"];
|
|
12935
|
+
var buildToolbarFromElements = (elements) => {
|
|
12936
|
+
const toolbar = [];
|
|
12937
|
+
if (elements.includes("header")) {
|
|
12938
|
+
toolbar.push([{ header: [1, 2, false] }]);
|
|
12939
|
+
}
|
|
12940
|
+
const textGroup = elements.filter(
|
|
12941
|
+
(element) => TEXT_FORMATS.includes(element)
|
|
12942
|
+
);
|
|
12943
|
+
if (textGroup.length > 0) {
|
|
12944
|
+
toolbar.push(textGroup);
|
|
12945
|
+
}
|
|
12946
|
+
const colorGroup = [];
|
|
12947
|
+
if (elements.includes("color")) colorGroup.push({ color: [] });
|
|
12948
|
+
if (elements.includes("background")) colorGroup.push({ background: [] });
|
|
12949
|
+
if (colorGroup.length > 0) {
|
|
12950
|
+
toolbar.push(colorGroup);
|
|
12951
|
+
}
|
|
12952
|
+
if (elements.includes("align")) {
|
|
12953
|
+
toolbar.push([{ align: [] }]);
|
|
12954
|
+
}
|
|
12955
|
+
if (elements.includes("list")) {
|
|
12956
|
+
toolbar.push([{ list: "ordered" }, { list: "bullet" }]);
|
|
12957
|
+
}
|
|
12958
|
+
const mediaGroup = elements.filter(
|
|
12959
|
+
(element) => MEDIA_FORMATS.includes(element)
|
|
12960
|
+
);
|
|
12961
|
+
if (mediaGroup.length > 0) {
|
|
12962
|
+
toolbar.push(mediaGroup);
|
|
12963
|
+
}
|
|
12964
|
+
return toolbar;
|
|
12965
|
+
};
|
|
12966
|
+
var buildFormatsFromElements = (elements) => elements;
|
|
12967
|
+
var getEditorModulesAndFormats = (richEditorElements, simpleVersion = false, disableVideo = false) => {
|
|
12968
|
+
const clipboard = { matchVisual: false };
|
|
12969
|
+
if (richEditorElements && richEditorElements.length > 0) {
|
|
12970
|
+
return {
|
|
12971
|
+
modules: {
|
|
12972
|
+
toolbar: buildToolbarFromElements(richEditorElements),
|
|
12973
|
+
clipboard
|
|
12974
|
+
},
|
|
12975
|
+
formats: buildFormatsFromElements(richEditorElements)
|
|
12976
|
+
};
|
|
12977
|
+
}
|
|
12978
|
+
if (simpleVersion) {
|
|
12979
|
+
return {
|
|
12980
|
+
modules: {
|
|
12981
|
+
toolbar: [
|
|
12982
|
+
[{ header: [1, 2, false] }],
|
|
12983
|
+
["bold", "italic", "underline"],
|
|
12984
|
+
[{ color: [] }, { background: [] }],
|
|
12985
|
+
[{ align: [] }],
|
|
12986
|
+
[{ list: "ordered" }, { list: "bullet" }]
|
|
12987
|
+
],
|
|
12988
|
+
clipboard
|
|
12989
|
+
},
|
|
12990
|
+
formats: [
|
|
12991
|
+
"header",
|
|
12992
|
+
"bold",
|
|
12993
|
+
"italic",
|
|
12994
|
+
"underline",
|
|
12995
|
+
"color",
|
|
12996
|
+
"background",
|
|
12997
|
+
"align",
|
|
12998
|
+
"list"
|
|
12999
|
+
]
|
|
13000
|
+
};
|
|
13001
|
+
}
|
|
13002
|
+
if (disableVideo) {
|
|
13003
|
+
return {
|
|
13004
|
+
modules: {
|
|
13005
|
+
toolbar: [
|
|
13006
|
+
[{ header: [1, 2, false] }],
|
|
13007
|
+
["bold", "italic", "underline", "strike"],
|
|
13008
|
+
[{ color: [] }, { background: [] }],
|
|
13009
|
+
[{ align: [] }],
|
|
13010
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
13011
|
+
["link", "image"]
|
|
13012
|
+
],
|
|
13013
|
+
clipboard
|
|
13014
|
+
},
|
|
13015
|
+
formats: [
|
|
13016
|
+
"header",
|
|
13017
|
+
"bold",
|
|
13018
|
+
"italic",
|
|
13019
|
+
"underline",
|
|
13020
|
+
"strike",
|
|
13021
|
+
"color",
|
|
13022
|
+
"background",
|
|
13023
|
+
"align",
|
|
13024
|
+
"list",
|
|
13025
|
+
"link",
|
|
13026
|
+
"image"
|
|
13027
|
+
]
|
|
13028
|
+
};
|
|
13029
|
+
}
|
|
13030
|
+
return {
|
|
13031
|
+
modules: {
|
|
13032
|
+
toolbar: [
|
|
13033
|
+
[{ header: [1, 2, false] }],
|
|
13034
|
+
["bold", "italic", "underline", "strike"],
|
|
13035
|
+
[{ color: [] }, { background: [] }],
|
|
13036
|
+
[{ align: [] }],
|
|
13037
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
13038
|
+
["link", "image", "video"]
|
|
13039
|
+
],
|
|
13040
|
+
clipboard
|
|
13041
|
+
},
|
|
13042
|
+
formats: [
|
|
13043
|
+
"header",
|
|
13044
|
+
"bold",
|
|
13045
|
+
"italic",
|
|
13046
|
+
"underline",
|
|
13047
|
+
"strike",
|
|
13048
|
+
"color",
|
|
13049
|
+
"background",
|
|
13050
|
+
"align",
|
|
13051
|
+
"list",
|
|
13052
|
+
"link",
|
|
13053
|
+
"image",
|
|
13054
|
+
"video"
|
|
13055
|
+
]
|
|
13056
|
+
};
|
|
13057
|
+
};
|
|
13058
|
+
|
|
12904
13059
|
// src/components/RichEditor/QuillComponent.tsx
|
|
12905
13060
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12906
13061
|
var QuillComponent = ({
|
|
@@ -12912,6 +13067,7 @@ var QuillComponent = ({
|
|
|
12912
13067
|
uploadConfig,
|
|
12913
13068
|
simpleVersion = false,
|
|
12914
13069
|
disableVideo = false,
|
|
13070
|
+
richEditorElements,
|
|
12915
13071
|
onCharacterCountChange,
|
|
12916
13072
|
maxLength
|
|
12917
13073
|
}) => {
|
|
@@ -12927,65 +13083,11 @@ var QuillComponent = ({
|
|
|
12927
13083
|
const doc = parser.parseFromString(html, "text/html");
|
|
12928
13084
|
return doc.body.innerHTML;
|
|
12929
13085
|
};
|
|
12930
|
-
const modules
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
[{ align: [] }],
|
|
12936
|
-
[{ list: "ordered" }, { list: "bullet" }]
|
|
12937
|
-
],
|
|
12938
|
-
clipboard: {
|
|
12939
|
-
matchVisual: false
|
|
12940
|
-
}
|
|
12941
|
-
} : disableVideo ? {
|
|
12942
|
-
toolbar: [
|
|
12943
|
-
[{ header: [1, 2, false] }],
|
|
12944
|
-
["bold", "italic", "underline", "strike"],
|
|
12945
|
-
[{ color: [] }, { background: [] }],
|
|
12946
|
-
[{ align: [] }],
|
|
12947
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
12948
|
-
["link", "image"]
|
|
12949
|
-
],
|
|
12950
|
-
clipboard: {
|
|
12951
|
-
matchVisual: false
|
|
12952
|
-
}
|
|
12953
|
-
} : {
|
|
12954
|
-
toolbar: [
|
|
12955
|
-
[{ header: [1, 2, false] }],
|
|
12956
|
-
["bold", "italic", "underline", "strike"],
|
|
12957
|
-
[{ color: [] }, { background: [] }],
|
|
12958
|
-
[{ align: [] }],
|
|
12959
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
12960
|
-
["link", "image", "video"]
|
|
12961
|
-
],
|
|
12962
|
-
clipboard: {
|
|
12963
|
-
matchVisual: false
|
|
12964
|
-
}
|
|
12965
|
-
};
|
|
12966
|
-
const formats = simpleVersion ? [
|
|
12967
|
-
"header",
|
|
12968
|
-
"bold",
|
|
12969
|
-
"italic",
|
|
12970
|
-
"underline",
|
|
12971
|
-
"color",
|
|
12972
|
-
"background",
|
|
12973
|
-
"align",
|
|
12974
|
-
"list"
|
|
12975
|
-
] : [
|
|
12976
|
-
"header",
|
|
12977
|
-
"bold",
|
|
12978
|
-
"italic",
|
|
12979
|
-
"underline",
|
|
12980
|
-
"strike",
|
|
12981
|
-
"color",
|
|
12982
|
-
"background",
|
|
12983
|
-
"align",
|
|
12984
|
-
"list",
|
|
12985
|
-
"link",
|
|
12986
|
-
"image",
|
|
12987
|
-
"video"
|
|
12988
|
-
];
|
|
13086
|
+
const { modules, formats } = getEditorModulesAndFormats(
|
|
13087
|
+
richEditorElements,
|
|
13088
|
+
simpleVersion,
|
|
13089
|
+
disableVideo
|
|
13090
|
+
);
|
|
12989
13091
|
const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
|
|
12990
13092
|
theme: "snow",
|
|
12991
13093
|
modules,
|
|
@@ -13055,21 +13157,27 @@ var QuillComponent = ({
|
|
|
13055
13157
|
});
|
|
13056
13158
|
const toolbar = quill.getModule("toolbar");
|
|
13057
13159
|
if (toolbar) {
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13160
|
+
if (formats.includes("link")) {
|
|
13161
|
+
toolbar.addHandler("link", () => setShowLinkModal(true));
|
|
13162
|
+
}
|
|
13163
|
+
if (formats.includes("video")) {
|
|
13164
|
+
toolbar.addHandler("video", () => setShowVideoModal(true));
|
|
13165
|
+
}
|
|
13166
|
+
if (formats.includes("image")) {
|
|
13167
|
+
toolbar.addHandler("image", () => {
|
|
13168
|
+
const input = document.createElement("input");
|
|
13169
|
+
input.setAttribute("type", "file");
|
|
13170
|
+
input.setAttribute("accept", "image/*");
|
|
13171
|
+
input.click();
|
|
13172
|
+
input.onchange = () => __async(null, null, function* () {
|
|
13173
|
+
var _a;
|
|
13174
|
+
const file = (_a = input.files) == null ? void 0 : _a[0];
|
|
13175
|
+
if (file) {
|
|
13176
|
+
yield handleImageUpload(file);
|
|
13177
|
+
}
|
|
13178
|
+
});
|
|
13071
13179
|
});
|
|
13072
|
-
}
|
|
13180
|
+
}
|
|
13073
13181
|
}
|
|
13074
13182
|
setTimeout(() => {
|
|
13075
13183
|
var _a, _b;
|
|
@@ -13093,7 +13201,7 @@ var QuillComponent = ({
|
|
|
13093
13201
|
}
|
|
13094
13202
|
}, 2e3);
|
|
13095
13203
|
}
|
|
13096
|
-
}, [quill, onChange, handleImageUpload, onCharacterCountChange]);
|
|
13204
|
+
}, [quill, onChange, handleImageUpload, onCharacterCountChange, formats]);
|
|
13097
13205
|
(0, import_react23.useEffect)(() => {
|
|
13098
13206
|
if (quill) {
|
|
13099
13207
|
quill.enable(!disabled);
|
|
@@ -13357,7 +13465,8 @@ var RichEditorFormField = (_a) => {
|
|
|
13357
13465
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
13358
13466
|
maxLength,
|
|
13359
13467
|
simpleVersion = false,
|
|
13360
|
-
disableVideo = false
|
|
13468
|
+
disableVideo = false,
|
|
13469
|
+
richEditorElements
|
|
13361
13470
|
} = _b, props = __objRest(_b, [
|
|
13362
13471
|
"name",
|
|
13363
13472
|
"label",
|
|
@@ -13366,7 +13475,8 @@ var RichEditorFormField = (_a) => {
|
|
|
13366
13475
|
"validationErrorMessage",
|
|
13367
13476
|
"maxLength",
|
|
13368
13477
|
"simpleVersion",
|
|
13369
|
-
"disableVideo"
|
|
13478
|
+
"disableVideo",
|
|
13479
|
+
"richEditorElements"
|
|
13370
13480
|
]);
|
|
13371
13481
|
const { field, fieldState } = (0, import_react_hook_form12.useController)({
|
|
13372
13482
|
name,
|