@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.
Files changed (96) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -19
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +8 -3
  5. package/dist/index.d.ts +8 -3
  6. package/dist/index.js +187 -77
  7. package/dist/index.mjs +187 -77
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +123 -123
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +74 -74
  14. package/src/components/Button/styledComponents.ts +361 -361
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +168 -168
  17. package/src/components/Calendar/styledComponents.ts +480 -480
  18. package/src/components/Card.tsx +67 -67
  19. package/src/components/CheckboxGroup.tsx +176 -176
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Divider.tsx +7 -7
  22. package/src/components/DoubleCalendar/index.tsx +204 -182
  23. package/src/components/Drawer/index.tsx +103 -103
  24. package/src/components/Drawer/styledComponents.ts +97 -97
  25. package/src/components/Dropdown.tsx +302 -302
  26. package/src/components/Filter.tsx +164 -164
  27. package/src/components/Flex.tsx +118 -118
  28. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  29. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  30. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  31. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  32. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  33. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  34. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  35. package/src/components/FormFields/CPFFormField.tsx +78 -78
  36. package/src/components/FormFields/CalendarFormField.tsx +98 -98
  37. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  38. package/src/components/FormFields/DateAndTimeFormField.tsx +217 -217
  39. package/src/components/FormFields/DoubleCalendarFormField.tsx +96 -96
  40. package/src/components/FormFields/EmailFormField.tsx +27 -27
  41. package/src/components/FormFields/Form.tsx +39 -39
  42. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
  43. package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
  44. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  45. package/src/components/FormFields/RadioGroupFormField.tsx +86 -86
  46. package/src/components/FormFields/RichEditorFormField.tsx +105 -103
  47. package/src/components/FormFields/SelectFormField.tsx +113 -113
  48. package/src/components/FormFields/SwitchFormField.tsx +46 -46
  49. package/src/components/FormFields/TextAreaFormField.tsx +61 -61
  50. package/src/components/FormFields/TextFormField.tsx +112 -112
  51. package/src/components/FormFields/TimePickerFormField.tsx +88 -88
  52. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  53. package/src/components/FormFields/subComponents/FormLabel.tsx +36 -36
  54. package/src/components/FormFields/utils/validation.ts +23 -23
  55. package/src/components/Grid.tsx +137 -137
  56. package/src/components/Icon.tsx +47 -47
  57. package/src/components/MenuDropdown/index.tsx +38 -38
  58. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  59. package/src/components/Modal.tsx +110 -110
  60. package/src/components/MultiSelect/index.tsx +305 -305
  61. package/src/components/MultiSelect/styledComponents.ts +160 -160
  62. package/src/components/RadioGroup.tsx +210 -210
  63. package/src/components/RichEditor/QuillComponent.tsx +415 -468
  64. package/src/components/RichEditor/RichEditor.tsx +53 -49
  65. package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
  66. package/src/components/RichEditor/editorConfig.ts +149 -0
  67. package/src/components/RichEditor/index.ts +3 -3
  68. package/src/components/RichEditor/styledComponents.ts +1175 -1170
  69. package/src/components/RichEditor/types.ts +12 -0
  70. package/src/components/Section.tsx +33 -33
  71. package/src/components/Step.tsx +164 -164
  72. package/src/components/Switch.tsx +108 -108
  73. package/src/components/Text.tsx +38 -38
  74. package/src/components/TextField.tsx +372 -372
  75. package/src/components/TextareaField.tsx +116 -116
  76. package/src/components/TimePicker.tsx +357 -357
  77. package/src/components/Toast/components/ToastItem.tsx +41 -41
  78. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  79. package/src/components/Toast/hooks/useToast.ts +12 -12
  80. package/src/components/Toast/index.tsx +5 -5
  81. package/src/components/Toast/styles/index.ts +135 -135
  82. package/src/components/Toast/types/index.ts +46 -46
  83. package/src/components/ToggleElement/index.tsx +58 -58
  84. package/src/components/Tooltip/index.tsx +73 -73
  85. package/src/components/Tooltip/styles.ts +77 -77
  86. package/src/hooks/useCountries.ts +41 -41
  87. package/src/hooks/useImageUpload.ts +139 -139
  88. package/src/hooks/useOnClickOutside.tsx +42 -42
  89. package/src/index.tsx +72 -72
  90. package/src/styles/index.ts +41 -41
  91. package/src/types/typographyValues.ts +178 -178
  92. package/src/utils/getNestedValue.ts +3 -3
  93. package/src/utils/states.ts +29 -29
  94. package/src/utils/uploadService.ts +180 -180
  95. package/tsconfig.json +3 -3
  96. 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
  }
@@ -1,19 +1,21 @@
1
-
2
- > @lets-events/react@12.10.3 build
3
- > tsup src/index.tsx --format esm,cjs --dts --external react
4
-
5
- CLI Building entry: src/index.tsx
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.0
8
- CLI Using tsup config: C:\Users\Cazuza\Desktop\Web\design-system\packages\react\tsup.config.ts
9
- CLI Target: es6
10
- ESM Build start
11
- CJS Build start
12
- CJS dist\index.js 426.36 KB
13
- CJS ⚡️ Build success in 351ms
14
- ESM dist\index.mjs 410.78 KB
15
- ESM ⚡️ Build success in 351ms
16
- DTS Build start
17
- DTS ⚡️ Build success in 5390ms
18
- DTS dist\index.d.mts 404.95 KB
19
- DTS dist\index.d.ts 404.95 KB
1
+
2
+
3
+ > @lets-events/react@12.10.5 build
4
+ > tsup src/index.tsx --format esm,cjs --dts --external react
5
+
6
+ CLI Building entry: src/index.tsx
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.0
9
+ CLI Using tsup config: /home/bia3003/Lets/design-system/packages/react/tsup.config.ts
10
+ CLI Target: es6
11
+ ESM Build start
12
+ CJS Build start
13
+ ESM dist/index.mjs 413.82 KB
14
+ ESM ⚡️ Build success in 395ms
15
+ CJS dist/index.js 429.48 KB
16
+ CJS ⚡️ 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
+ ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.10.5
4
+
5
+ ### Patch Changes
6
+
7
+ - rich editor props
8
+
9
+ ## 12.10.4
10
+
11
+ ### Patch Changes
12
+
13
+ - simpleAction prop
14
+
3
15
  ## 12.10.3
4
16
 
5
17
  ### Patch Changes
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 = simpleVersion ? {
12931
- toolbar: [
12932
- [{ header: [1, 2, false] }],
12933
- ["bold", "italic", "underline"],
12934
- [{ color: [] }, { background: [] }],
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
- toolbar.addHandler("link", () => setShowLinkModal(true));
13059
- toolbar.addHandler("video", () => setShowVideoModal(true));
13060
- toolbar.addHandler("image", () => {
13061
- const input = document.createElement("input");
13062
- input.setAttribute("type", "file");
13063
- input.setAttribute("accept", "image/*");
13064
- input.click();
13065
- input.onchange = () => __async(null, null, function* () {
13066
- var _a;
13067
- const file = (_a = input.files) == null ? void 0 : _a[0];
13068
- if (file) {
13069
- yield handleImageUpload(file);
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,