@lets-events/react 11.8.1 → 12.1.0

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 (87) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -18
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +139 -11
  5. package/dist/index.d.ts +139 -11
  6. package/dist/index.js +1260 -361
  7. package/dist/index.mjs +1251 -358
  8. package/package.json +7 -2
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +125 -125
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +16 -16
  14. package/src/components/Button/styledComponents.ts +288 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +146 -136
  17. package/src/components/Calendar/styledComponents.ts +250 -209
  18. package/src/components/Card.tsx +48 -48
  19. package/src/components/CheckboxGroup.tsx +176 -176
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Drawer/index.tsx +129 -55
  22. package/src/components/Drawer/styledComponents.ts +46 -46
  23. package/src/components/Dropdown.tsx +302 -302
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +118 -118
  26. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  27. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  28. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  29. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  30. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  31. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  32. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  33. package/src/components/FormFields/CPFFormField.tsx +78 -78
  34. package/src/components/FormFields/CalendarFormField.tsx +92 -0
  35. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  36. package/src/components/FormFields/EmailFormField.tsx +27 -27
  37. package/src/components/FormFields/Form.tsx +39 -39
  38. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +37 -40
  39. package/src/components/FormFields/MultiSelectFormField.tsx +64 -55
  40. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  41. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  42. package/src/components/FormFields/RichEditorFormField.tsx +69 -0
  43. package/src/components/FormFields/SelectFormField.tsx +93 -93
  44. package/src/components/FormFields/TextAreaFormField.tsx +57 -48
  45. package/src/components/FormFields/TextFormField.tsx +112 -112
  46. package/src/components/FormFields/TimePickerFormField.tsx +88 -0
  47. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  48. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  49. package/src/components/FormFields/utils/validation.ts +23 -23
  50. package/src/components/Grid.tsx +137 -137
  51. package/src/components/Icon.tsx +47 -47
  52. package/src/components/MenuDropdown/index.tsx +38 -38
  53. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  54. package/src/components/Modal.tsx +90 -90
  55. package/src/components/MultiSelect.tsx +311 -267
  56. package/src/components/RadioGroup.tsx +210 -210
  57. package/src/components/RichEditor/QuillComponent.tsx +413 -0
  58. package/src/components/RichEditor/RichEditor.tsx +38 -0
  59. package/src/components/RichEditor/index.ts +2 -0
  60. package/src/components/RichEditor/styledComponents.ts +62 -0
  61. package/src/components/Section.tsx +33 -33
  62. package/src/components/Step.tsx +164 -164
  63. package/src/components/Switch.tsx +108 -108
  64. package/src/components/Text.tsx +38 -38
  65. package/src/components/TextField.tsx +372 -365
  66. package/src/components/TextareaField.tsx +128 -128
  67. package/src/components/TimePicker.tsx +325 -298
  68. package/src/components/Toast/components/ToastItem.tsx +41 -41
  69. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  70. package/src/components/Toast/hooks/useToast.ts +12 -12
  71. package/src/components/Toast/index.tsx +5 -5
  72. package/src/components/Toast/styles/index.ts +135 -135
  73. package/src/components/Toast/types/index.ts +46 -46
  74. package/src/components/Tooltip/index.tsx +66 -66
  75. package/src/components/Tooltip/styles.ts +77 -77
  76. package/src/hooks/useCountries.ts +41 -41
  77. package/src/hooks/useImageUpload.ts +139 -0
  78. package/src/hooks/useOnClickOutside.tsx +42 -20
  79. package/src/index.tsx +67 -55
  80. package/src/styles/index.ts +38 -38
  81. package/src/types/typographyValues.ts +178 -178
  82. package/src/utils/getNestedValue.ts +3 -3
  83. package/src/utils/states.ts +29 -29
  84. package/src/utils/uploadService.ts +180 -0
  85. package/tsconfig.json +3 -3
  86. package/tsup.config.ts +38 -0
  87. package/dist/index.css +0 -171
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,18 +1,21 @@
1
-
2
- > @lets-events/react@11.8.1 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.4.0
8
- CLI Target: es6
9
- ESM Build start
10
- CJS Build start
11
- DTS Build start
12
- ESM dist\index.mjs 323.44 KB
13
- ESM ⚡️ Build success in 653ms
14
- CJS dist\index.js 335.78 KB
15
- CJS ⚡️ Build success in 654ms
16
- DTS ⚡️ Build success in 4387ms
17
- DTS dist\index.d.mts 374.64 KB
18
- DTS dist\index.d.ts 374.64 KB
1
+
2
+
3
+ > @lets-events/react@12.1.0 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/bia_c/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 350.46 KB
14
+ ESM ⚡️ Build success in 306ms
15
+ CJS dist/index.js 364.05 KB
16
+ CJS ⚡️ Build success in 316ms
17
+ DTS Build start
18
+ DTS ⚡️ Build success in 6185ms
19
+ DTS dist/index.d.mts 379.16 KB
20
+ DTS dist/index.d.ts 379.16 KB
21
+ ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - MultSelect, RG and RichEditor adjustment
8
+
9
+ ## 12.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - RichEditor
14
+
3
15
  ## 11.8.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -13,7 +13,7 @@ import { VariantProps } from '@stitches/react';
13
13
  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
- import { FieldError, Merge, FieldErrorsImpl, FieldValues, UseFormProps, SubmitHandler, UseFormReturn, useForm } from 'react-hook-form';
16
+ import { FieldError, Merge, FieldErrorsImpl, FieldValues, UseFormProps, SubmitHandler, UseFormReturn, useForm, RegisterOptions } from 'react-hook-form';
17
17
 
18
18
  interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
19
19
  name: IconName;
@@ -2690,6 +2690,7 @@ type TextFieldProps = ComponentProps<typeof TextFieldStyled> & {
2690
2690
  fontWeight?: "regular" | "medium" | "semibold" | "bold";
2691
2691
  textAlign?: "left" | "right" | "center";
2692
2692
  mask?: MaskOptions;
2693
+ hasError?: boolean;
2693
2694
  };
2694
2695
  type TextFieldSlotProps = Omit<ComponentProps<typeof TextFieldStyled>, "color"> & {
2695
2696
  placeholder?: string;
@@ -4289,7 +4290,9 @@ type MenuDropdownProps = HTMLAttributes<HTMLDivElement> & {
4289
4290
  };
4290
4291
  declare function MenuDropdown({ children, isOpen, setIsOpen, }: MenuDropdownProps): react_jsx_runtime.JSX.Element;
4291
4292
 
4292
- declare const CalendarStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4293
+ declare const CalendarStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
4294
+ expand?: boolean | "true" | undefined;
4295
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
4293
4296
  colors: {
4294
4297
  brand50: string;
4295
4298
  brand100: string;
@@ -4664,11 +4667,14 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
4664
4667
  calendarLayout?: "label" | "dropdown" | "dropdown-months" | "dropdown-years";
4665
4668
  selected: Date | undefined;
4666
4669
  setSelected: React__default.Dispatch<React__default.SetStateAction<Date | undefined>>;
4667
- position?: "top" | "bottom";
4670
+ position?: "top" | "bottom" | "top-right" | "bottom-right";
4668
4671
  action?: boolean;
4669
4672
  actionText?: string;
4673
+ hasError?: boolean;
4674
+ expand?: boolean;
4675
+ allowPastDates?: boolean;
4670
4676
  };
4671
- declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4677
+ declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4672
4678
 
4673
4679
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4674
4680
  colors: {
@@ -5051,7 +5057,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5051
5057
  };
5052
5058
  declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element | null;
5053
5059
 
5054
- declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
5060
+ declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
5061
+ expand?: boolean | "true" | undefined;
5062
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
5055
5063
  colors: {
5056
5064
  brand50: string;
5057
5065
  brand100: string;
@@ -6901,7 +6909,9 @@ declare const InputStyled: _stitches_react_types_styled_component.StyledComponen
6901
6909
  transition: "transitions";
6902
6910
  zIndex: "zIndices";
6903
6911
  }, {}>>;
6904
- declare const TimePickerButtonStyled: _stitches_react_types_styled_component.StyledComponent<"button", {}, {}, _stitches_react_types_css_util.CSS<{}, {
6912
+ declare const TimePickerButtonStyled: _stitches_react_types_styled_component.StyledComponent<"button", {
6913
+ expand?: boolean | "true" | undefined;
6914
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
6905
6915
  colors: {
6906
6916
  brand50: string;
6907
6917
  brand100: string;
@@ -7274,9 +7284,11 @@ declare const TimePickerButtonStyled: _stitches_react_types_styled_component.Sty
7274
7284
  type TimePickerProps = {
7275
7285
  selected: string | undefined;
7276
7286
  setSelected: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
7277
- position?: "bottom" | "top";
7287
+ position?: "bottom" | "top" | "top-right" | "bottom-right";
7288
+ hasError?: boolean;
7289
+ expand?: boolean;
7278
7290
  };
7279
- declare function TimePicker({ selected, setSelected, position, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7291
+ declare function TimePicker({ selected, setSelected, position, hasError, expand, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7280
7292
 
7281
7293
  declare const AlertDialogSimpleStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<AlertDialog.ContentProps & React$1.RefAttributes<HTMLDivElement>>, {
7282
7294
  color?: "info" | "warning" | "error" | "success" | undefined;
@@ -12598,7 +12610,9 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12598
12610
  zIndex?: string;
12599
12611
  showSelectedValues?: boolean;
12600
12612
  singleSelect?: boolean;
12613
+ selectedOrientation?: "row" | "column";
12601
12614
  disabled?: boolean;
12615
+ maxHeight?: string;
12602
12616
  };
12603
12617
  declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
12604
12618
 
@@ -14152,8 +14166,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
14152
14166
  label?: string;
14153
14167
  required?: boolean;
14154
14168
  placeholder?: string;
14169
+ validate?: (value: string) => boolean | string;
14170
+ validationErrorMessage?: string;
14155
14171
  };
14156
- declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14172
+ declare const TextAreaFormField: ({ name, label, required, placeholder, validate, validationErrorMessage, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14157
14173
 
14158
14174
  type TextFormFieldProps = TextFieldProps & {
14159
14175
  name: string;
@@ -14180,8 +14196,11 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14180
14196
  name: string;
14181
14197
  label?: string;
14182
14198
  required?: boolean;
14199
+ selectedOrientation?: "row" | "column";
14200
+ zIndex?: string;
14201
+ maxHeight?: string;
14183
14202
  };
14184
- declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14203
+ declare const MultiSelectFormField: ({ name, label, required, selectedOrientation, zIndex, maxHeight, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14185
14204
 
14186
14205
  type PhoneFormFieldProps = {
14187
14206
  name: string;
@@ -14308,4 +14327,113 @@ type EmailFormFieldProps = {
14308
14327
  };
14309
14328
  declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
14310
14329
 
14311
- 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 };
14330
+ interface UploadConfig$1 {
14331
+ apiUrl: string;
14332
+ s3Bucket: string;
14333
+ s3Region: string;
14334
+ s3Url: string;
14335
+ timeout?: number;
14336
+ maxFileSize?: number;
14337
+ endpoints?: {
14338
+ presignedUrl: string;
14339
+ upload: string;
14340
+ };
14341
+ }
14342
+ interface RichEditorProps {
14343
+ value?: string;
14344
+ onChange?: (value: string) => void;
14345
+ placeholder?: string;
14346
+ label?: string;
14347
+ required?: boolean;
14348
+ disabled?: boolean;
14349
+ className?: string;
14350
+ uploadConfig: UploadConfig$1;
14351
+ }
14352
+ declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element;
14353
+
14354
+ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14355
+ name: string;
14356
+ label?: string;
14357
+ required?: boolean;
14358
+ validate?: (value: string) => boolean | string;
14359
+ validationErrorMessage?: string;
14360
+ uploadConfig: RichEditorProps["uploadConfig"];
14361
+ };
14362
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14363
+
14364
+ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14365
+ name: string;
14366
+ label?: string;
14367
+ required?: boolean;
14368
+ validate?: (value: Date | undefined) => boolean | string;
14369
+ validationErrorMessage?: string;
14370
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14371
+ allowPastDates?: boolean;
14372
+ };
14373
+ declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
14374
+
14375
+ type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
14376
+ name: string;
14377
+ label?: string;
14378
+ required?: boolean;
14379
+ validate?: (value: string | undefined) => boolean | string;
14380
+ validationErrorMessage?: string;
14381
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14382
+ };
14383
+ declare const TimePickerFormField: ({ name, label, required, validate, validationErrorMessage, rules, ...timePickerProps }: TimePickerFormFieldProps) => react_jsx_runtime.JSX.Element;
14384
+
14385
+ interface UploadConfig {
14386
+ apiUrl: string;
14387
+ s3Bucket: string;
14388
+ s3Region: string;
14389
+ s3Url: string;
14390
+ timeout?: number;
14391
+ maxFileSize?: number;
14392
+ endpoints?: {
14393
+ presignedUrl: string;
14394
+ upload: string;
14395
+ };
14396
+ }
14397
+ interface UploadResponse {
14398
+ url: string;
14399
+ filename: string;
14400
+ size: number;
14401
+ type: string;
14402
+ }
14403
+ interface UploadProgress$1 {
14404
+ amount: number;
14405
+ message: string;
14406
+ }
14407
+ declare class UploadService {
14408
+ static getPresignedUrl(filename: string, contentType: string, config: UploadConfig): Promise<string>;
14409
+ static uploadToS3(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14410
+ static uploadViaAPI(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14411
+ }
14412
+
14413
+ interface UploadProgress {
14414
+ amount: number;
14415
+ message: string;
14416
+ }
14417
+ interface UploadedFile {
14418
+ url: string;
14419
+ filename: string;
14420
+ size: number;
14421
+ type: string;
14422
+ }
14423
+ interface UseImageUploadOptions {
14424
+ onSuccess?: (file: UploadedFile) => void;
14425
+ onError?: (error: string) => void;
14426
+ onProgress?: (progress: UploadProgress) => void;
14427
+ maxFileSize?: number;
14428
+ allowedTypes?: string[];
14429
+ uploadConfig: UploadConfig;
14430
+ }
14431
+ declare const useImageUpload: (options: UseImageUploadOptions) => {
14432
+ uploadFile: (file: File) => Promise<UploadedFile | null>;
14433
+ isUploading: boolean;
14434
+ progress: UploadProgress | null;
14435
+ error: string | null;
14436
+ reset: () => void;
14437
+ };
14438
+
14439
+ 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, 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, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, 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, TimePickerFormField, type TimePickerFormFieldProps, 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, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ import { VariantProps } from '@stitches/react';
13
13
  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
- import { FieldError, Merge, FieldErrorsImpl, FieldValues, UseFormProps, SubmitHandler, UseFormReturn, useForm } from 'react-hook-form';
16
+ import { FieldError, Merge, FieldErrorsImpl, FieldValues, UseFormProps, SubmitHandler, UseFormReturn, useForm, RegisterOptions } from 'react-hook-form';
17
17
 
18
18
  interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
19
19
  name: IconName;
@@ -2690,6 +2690,7 @@ type TextFieldProps = ComponentProps<typeof TextFieldStyled> & {
2690
2690
  fontWeight?: "regular" | "medium" | "semibold" | "bold";
2691
2691
  textAlign?: "left" | "right" | "center";
2692
2692
  mask?: MaskOptions;
2693
+ hasError?: boolean;
2693
2694
  };
2694
2695
  type TextFieldSlotProps = Omit<ComponentProps<typeof TextFieldStyled>, "color"> & {
2695
2696
  placeholder?: string;
@@ -4289,7 +4290,9 @@ type MenuDropdownProps = HTMLAttributes<HTMLDivElement> & {
4289
4290
  };
4290
4291
  declare function MenuDropdown({ children, isOpen, setIsOpen, }: MenuDropdownProps): react_jsx_runtime.JSX.Element;
4291
4292
 
4292
- declare const CalendarStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4293
+ declare const CalendarStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
4294
+ expand?: boolean | "true" | undefined;
4295
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
4293
4296
  colors: {
4294
4297
  brand50: string;
4295
4298
  brand100: string;
@@ -4664,11 +4667,14 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
4664
4667
  calendarLayout?: "label" | "dropdown" | "dropdown-months" | "dropdown-years";
4665
4668
  selected: Date | undefined;
4666
4669
  setSelected: React__default.Dispatch<React__default.SetStateAction<Date | undefined>>;
4667
- position?: "top" | "bottom";
4670
+ position?: "top" | "bottom" | "top-right" | "bottom-right";
4668
4671
  action?: boolean;
4669
4672
  actionText?: string;
4673
+ hasError?: boolean;
4674
+ expand?: boolean;
4675
+ allowPastDates?: boolean;
4670
4676
  };
4671
- declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4677
+ declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4672
4678
 
4673
4679
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4674
4680
  colors: {
@@ -5051,7 +5057,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5051
5057
  };
5052
5058
  declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element | null;
5053
5059
 
5054
- declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
5060
+ declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
5061
+ expand?: boolean | "true" | undefined;
5062
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
5055
5063
  colors: {
5056
5064
  brand50: string;
5057
5065
  brand100: string;
@@ -6901,7 +6909,9 @@ declare const InputStyled: _stitches_react_types_styled_component.StyledComponen
6901
6909
  transition: "transitions";
6902
6910
  zIndex: "zIndices";
6903
6911
  }, {}>>;
6904
- declare const TimePickerButtonStyled: _stitches_react_types_styled_component.StyledComponent<"button", {}, {}, _stitches_react_types_css_util.CSS<{}, {
6912
+ declare const TimePickerButtonStyled: _stitches_react_types_styled_component.StyledComponent<"button", {
6913
+ expand?: boolean | "true" | undefined;
6914
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
6905
6915
  colors: {
6906
6916
  brand50: string;
6907
6917
  brand100: string;
@@ -7274,9 +7284,11 @@ declare const TimePickerButtonStyled: _stitches_react_types_styled_component.Sty
7274
7284
  type TimePickerProps = {
7275
7285
  selected: string | undefined;
7276
7286
  setSelected: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
7277
- position?: "bottom" | "top";
7287
+ position?: "bottom" | "top" | "top-right" | "bottom-right";
7288
+ hasError?: boolean;
7289
+ expand?: boolean;
7278
7290
  };
7279
- declare function TimePicker({ selected, setSelected, position, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7291
+ declare function TimePicker({ selected, setSelected, position, hasError, expand, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7280
7292
 
7281
7293
  declare const AlertDialogSimpleStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<AlertDialog.ContentProps & React$1.RefAttributes<HTMLDivElement>>, {
7282
7294
  color?: "info" | "warning" | "error" | "success" | undefined;
@@ -12598,7 +12610,9 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12598
12610
  zIndex?: string;
12599
12611
  showSelectedValues?: boolean;
12600
12612
  singleSelect?: boolean;
12613
+ selectedOrientation?: "row" | "column";
12601
12614
  disabled?: boolean;
12615
+ maxHeight?: string;
12602
12616
  };
12603
12617
  declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
12604
12618
 
@@ -14152,8 +14166,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
14152
14166
  label?: string;
14153
14167
  required?: boolean;
14154
14168
  placeholder?: string;
14169
+ validate?: (value: string) => boolean | string;
14170
+ validationErrorMessage?: string;
14155
14171
  };
14156
- declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14172
+ declare const TextAreaFormField: ({ name, label, required, placeholder, validate, validationErrorMessage, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14157
14173
 
14158
14174
  type TextFormFieldProps = TextFieldProps & {
14159
14175
  name: string;
@@ -14180,8 +14196,11 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14180
14196
  name: string;
14181
14197
  label?: string;
14182
14198
  required?: boolean;
14199
+ selectedOrientation?: "row" | "column";
14200
+ zIndex?: string;
14201
+ maxHeight?: string;
14183
14202
  };
14184
- declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14203
+ declare const MultiSelectFormField: ({ name, label, required, selectedOrientation, zIndex, maxHeight, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14185
14204
 
14186
14205
  type PhoneFormFieldProps = {
14187
14206
  name: string;
@@ -14308,4 +14327,113 @@ type EmailFormFieldProps = {
14308
14327
  };
14309
14328
  declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
14310
14329
 
14311
- 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 };
14330
+ interface UploadConfig$1 {
14331
+ apiUrl: string;
14332
+ s3Bucket: string;
14333
+ s3Region: string;
14334
+ s3Url: string;
14335
+ timeout?: number;
14336
+ maxFileSize?: number;
14337
+ endpoints?: {
14338
+ presignedUrl: string;
14339
+ upload: string;
14340
+ };
14341
+ }
14342
+ interface RichEditorProps {
14343
+ value?: string;
14344
+ onChange?: (value: string) => void;
14345
+ placeholder?: string;
14346
+ label?: string;
14347
+ required?: boolean;
14348
+ disabled?: boolean;
14349
+ className?: string;
14350
+ uploadConfig: UploadConfig$1;
14351
+ }
14352
+ declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element;
14353
+
14354
+ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14355
+ name: string;
14356
+ label?: string;
14357
+ required?: boolean;
14358
+ validate?: (value: string) => boolean | string;
14359
+ validationErrorMessage?: string;
14360
+ uploadConfig: RichEditorProps["uploadConfig"];
14361
+ };
14362
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14363
+
14364
+ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14365
+ name: string;
14366
+ label?: string;
14367
+ required?: boolean;
14368
+ validate?: (value: Date | undefined) => boolean | string;
14369
+ validationErrorMessage?: string;
14370
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14371
+ allowPastDates?: boolean;
14372
+ };
14373
+ declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
14374
+
14375
+ type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
14376
+ name: string;
14377
+ label?: string;
14378
+ required?: boolean;
14379
+ validate?: (value: string | undefined) => boolean | string;
14380
+ validationErrorMessage?: string;
14381
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14382
+ };
14383
+ declare const TimePickerFormField: ({ name, label, required, validate, validationErrorMessage, rules, ...timePickerProps }: TimePickerFormFieldProps) => react_jsx_runtime.JSX.Element;
14384
+
14385
+ interface UploadConfig {
14386
+ apiUrl: string;
14387
+ s3Bucket: string;
14388
+ s3Region: string;
14389
+ s3Url: string;
14390
+ timeout?: number;
14391
+ maxFileSize?: number;
14392
+ endpoints?: {
14393
+ presignedUrl: string;
14394
+ upload: string;
14395
+ };
14396
+ }
14397
+ interface UploadResponse {
14398
+ url: string;
14399
+ filename: string;
14400
+ size: number;
14401
+ type: string;
14402
+ }
14403
+ interface UploadProgress$1 {
14404
+ amount: number;
14405
+ message: string;
14406
+ }
14407
+ declare class UploadService {
14408
+ static getPresignedUrl(filename: string, contentType: string, config: UploadConfig): Promise<string>;
14409
+ static uploadToS3(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14410
+ static uploadViaAPI(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14411
+ }
14412
+
14413
+ interface UploadProgress {
14414
+ amount: number;
14415
+ message: string;
14416
+ }
14417
+ interface UploadedFile {
14418
+ url: string;
14419
+ filename: string;
14420
+ size: number;
14421
+ type: string;
14422
+ }
14423
+ interface UseImageUploadOptions {
14424
+ onSuccess?: (file: UploadedFile) => void;
14425
+ onError?: (error: string) => void;
14426
+ onProgress?: (progress: UploadProgress) => void;
14427
+ maxFileSize?: number;
14428
+ allowedTypes?: string[];
14429
+ uploadConfig: UploadConfig;
14430
+ }
14431
+ declare const useImageUpload: (options: UseImageUploadOptions) => {
14432
+ uploadFile: (file: File) => Promise<UploadedFile | null>;
14433
+ isUploading: boolean;
14434
+ progress: UploadProgress | null;
14435
+ error: string | null;
14436
+ reset: () => void;
14437
+ };
14438
+
14439
+ 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, 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, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, 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, TimePickerFormField, type TimePickerFormFieldProps, 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, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };