@lets-events/react 11.8.1 → 12.0.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 +6 -0
  4. package/dist/index.d.mts +122 -6
  5. package/dist/index.d.ts +122 -6
  6. package/dist/index.js +976 -237
  7. package/dist/index.mjs +970 -237
  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 +287 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +139 -136
  17. package/src/components/Calendar/styledComponents.ts +209 -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 +55 -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 +89 -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 +40 -40
  39. package/src/components/FormFields/MultiSelectFormField.tsx +61 -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 +266 -267
  56. package/src/components/RadioGroup.tsx +210 -210
  57. package/src/components/RichEditor/QuillComponent.tsx +415 -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 +301 -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 +20 -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.0.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
+ CJS dist/index.js 358.73 KB
14
+ CJS ⚡️ Build success in 264ms
15
+ ESM dist/index.mjs 345.15 KB
16
+ ESM ⚡️ Build success in 265ms
17
+ DTS Build start
18
+ DTS ⚡️ Build success in 4971ms
19
+ DTS dist/index.d.mts 378.77 KB
20
+ DTS dist/index.d.ts 378.77 KB
21
+ ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - RichEditor
8
+
3
9
  ## 11.8.1
4
10
 
5
11
  ### 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;
@@ -4667,8 +4668,9 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
4667
4668
  position?: "top" | "bottom";
4668
4669
  action?: boolean;
4669
4670
  actionText?: string;
4671
+ hasError?: boolean;
4670
4672
  };
4671
- declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4673
+ declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4672
4674
 
4673
4675
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4674
4676
  colors: {
@@ -7275,8 +7277,9 @@ type TimePickerProps = {
7275
7277
  selected: string | undefined;
7276
7278
  setSelected: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
7277
7279
  position?: "bottom" | "top";
7280
+ hasError?: boolean;
7278
7281
  };
7279
- declare function TimePicker({ selected, setSelected, position, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7282
+ declare function TimePicker({ selected, setSelected, position, hasError, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7280
7283
 
7281
7284
  declare const AlertDialogSimpleStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<AlertDialog.ContentProps & React$1.RefAttributes<HTMLDivElement>>, {
7282
7285
  color?: "info" | "warning" | "error" | "success" | undefined;
@@ -12598,6 +12601,7 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12598
12601
  zIndex?: string;
12599
12602
  showSelectedValues?: boolean;
12600
12603
  singleSelect?: boolean;
12604
+ selectedOrientation?: "row" | "column";
12601
12605
  disabled?: boolean;
12602
12606
  };
12603
12607
  declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
@@ -14152,8 +14156,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
14152
14156
  label?: string;
14153
14157
  required?: boolean;
14154
14158
  placeholder?: string;
14159
+ validate?: (value: string) => boolean | string;
14160
+ validationErrorMessage?: string;
14155
14161
  };
14156
- declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14162
+ declare const TextAreaFormField: ({ name, label, required, placeholder, validate, validationErrorMessage, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14157
14163
 
14158
14164
  type TextFormFieldProps = TextFieldProps & {
14159
14165
  name: string;
@@ -14180,8 +14186,10 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14180
14186
  name: string;
14181
14187
  label?: string;
14182
14188
  required?: boolean;
14189
+ selectedOrientation?: "row" | "column";
14190
+ zIndex?: string;
14183
14191
  };
14184
- declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14192
+ declare const MultiSelectFormField: ({ name, label, required, selectedOrientation, zIndex, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14185
14193
 
14186
14194
  type PhoneFormFieldProps = {
14187
14195
  name: string;
@@ -14308,4 +14316,112 @@ type EmailFormFieldProps = {
14308
14316
  };
14309
14317
  declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
14310
14318
 
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 };
14319
+ interface UploadConfig$1 {
14320
+ apiUrl: string;
14321
+ s3Bucket: string;
14322
+ s3Region: string;
14323
+ s3Url: string;
14324
+ timeout?: number;
14325
+ maxFileSize?: number;
14326
+ endpoints?: {
14327
+ presignedUrl: string;
14328
+ upload: string;
14329
+ };
14330
+ }
14331
+ interface RichEditorProps {
14332
+ value?: string;
14333
+ onChange?: (value: string) => void;
14334
+ placeholder?: string;
14335
+ label?: string;
14336
+ required?: boolean;
14337
+ disabled?: boolean;
14338
+ className?: string;
14339
+ uploadConfig: UploadConfig$1;
14340
+ }
14341
+ declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element;
14342
+
14343
+ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14344
+ name: string;
14345
+ label?: string;
14346
+ required?: boolean;
14347
+ validate?: (value: string) => boolean | string;
14348
+ validationErrorMessage?: string;
14349
+ uploadConfig: RichEditorProps["uploadConfig"];
14350
+ };
14351
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14352
+
14353
+ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14354
+ name: string;
14355
+ label?: string;
14356
+ required?: boolean;
14357
+ validate?: (value: Date | undefined) => boolean | string;
14358
+ validationErrorMessage?: string;
14359
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14360
+ };
14361
+ declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
14362
+
14363
+ type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
14364
+ name: string;
14365
+ label?: string;
14366
+ required?: boolean;
14367
+ validate?: (value: string | undefined) => boolean | string;
14368
+ validationErrorMessage?: string;
14369
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14370
+ };
14371
+ declare const TimePickerFormField: ({ name, label, required, validate, validationErrorMessage, rules, ...timePickerProps }: TimePickerFormFieldProps) => react_jsx_runtime.JSX.Element;
14372
+
14373
+ interface UploadConfig {
14374
+ apiUrl: string;
14375
+ s3Bucket: string;
14376
+ s3Region: string;
14377
+ s3Url: string;
14378
+ timeout?: number;
14379
+ maxFileSize?: number;
14380
+ endpoints?: {
14381
+ presignedUrl: string;
14382
+ upload: string;
14383
+ };
14384
+ }
14385
+ interface UploadResponse {
14386
+ url: string;
14387
+ filename: string;
14388
+ size: number;
14389
+ type: string;
14390
+ }
14391
+ interface UploadProgress$1 {
14392
+ amount: number;
14393
+ message: string;
14394
+ }
14395
+ declare class UploadService {
14396
+ static getPresignedUrl(filename: string, contentType: string, config: UploadConfig): Promise<string>;
14397
+ static uploadToS3(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14398
+ static uploadViaAPI(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14399
+ }
14400
+
14401
+ interface UploadProgress {
14402
+ amount: number;
14403
+ message: string;
14404
+ }
14405
+ interface UploadedFile {
14406
+ url: string;
14407
+ filename: string;
14408
+ size: number;
14409
+ type: string;
14410
+ }
14411
+ interface UseImageUploadOptions {
14412
+ onSuccess?: (file: UploadedFile) => void;
14413
+ onError?: (error: string) => void;
14414
+ onProgress?: (progress: UploadProgress) => void;
14415
+ maxFileSize?: number;
14416
+ allowedTypes?: string[];
14417
+ uploadConfig: UploadConfig;
14418
+ }
14419
+ declare const useImageUpload: (options: UseImageUploadOptions) => {
14420
+ uploadFile: (file: File) => Promise<UploadedFile | null>;
14421
+ isUploading: boolean;
14422
+ progress: UploadProgress | null;
14423
+ error: string | null;
14424
+ reset: () => void;
14425
+ };
14426
+
14427
+ 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;
@@ -4667,8 +4668,9 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
4667
4668
  position?: "top" | "bottom";
4668
4669
  action?: boolean;
4669
4670
  actionText?: string;
4671
+ hasError?: boolean;
4670
4672
  };
4671
- declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4673
+ declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
4672
4674
 
4673
4675
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
4674
4676
  colors: {
@@ -7275,8 +7277,9 @@ type TimePickerProps = {
7275
7277
  selected: string | undefined;
7276
7278
  setSelected: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
7277
7279
  position?: "bottom" | "top";
7280
+ hasError?: boolean;
7278
7281
  };
7279
- declare function TimePicker({ selected, setSelected, position, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7282
+ declare function TimePicker({ selected, setSelected, position, hasError, }: TimePickerProps): react_jsx_runtime.JSX.Element;
7280
7283
 
7281
7284
  declare const AlertDialogSimpleStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<AlertDialog.ContentProps & React$1.RefAttributes<HTMLDivElement>>, {
7282
7285
  color?: "info" | "warning" | "error" | "success" | undefined;
@@ -12598,6 +12601,7 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12598
12601
  zIndex?: string;
12599
12602
  showSelectedValues?: boolean;
12600
12603
  singleSelect?: boolean;
12604
+ selectedOrientation?: "row" | "column";
12601
12605
  disabled?: boolean;
12602
12606
  };
12603
12607
  declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
@@ -14152,8 +14156,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
14152
14156
  label?: string;
14153
14157
  required?: boolean;
14154
14158
  placeholder?: string;
14159
+ validate?: (value: string) => boolean | string;
14160
+ validationErrorMessage?: string;
14155
14161
  };
14156
- declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14162
+ declare const TextAreaFormField: ({ name, label, required, placeholder, validate, validationErrorMessage, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
14157
14163
 
14158
14164
  type TextFormFieldProps = TextFieldProps & {
14159
14165
  name: string;
@@ -14180,8 +14186,10 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
14180
14186
  name: string;
14181
14187
  label?: string;
14182
14188
  required?: boolean;
14189
+ selectedOrientation?: "row" | "column";
14190
+ zIndex?: string;
14183
14191
  };
14184
- declare const MultiSelectFormField: ({ name, label, required, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14192
+ declare const MultiSelectFormField: ({ name, label, required, selectedOrientation, zIndex, ...rest }: MultiSelectFormFieldProps) => react_jsx_runtime.JSX.Element;
14185
14193
 
14186
14194
  type PhoneFormFieldProps = {
14187
14195
  name: string;
@@ -14308,4 +14316,112 @@ type EmailFormFieldProps = {
14308
14316
  };
14309
14317
  declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
14310
14318
 
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 };
14319
+ interface UploadConfig$1 {
14320
+ apiUrl: string;
14321
+ s3Bucket: string;
14322
+ s3Region: string;
14323
+ s3Url: string;
14324
+ timeout?: number;
14325
+ maxFileSize?: number;
14326
+ endpoints?: {
14327
+ presignedUrl: string;
14328
+ upload: string;
14329
+ };
14330
+ }
14331
+ interface RichEditorProps {
14332
+ value?: string;
14333
+ onChange?: (value: string) => void;
14334
+ placeholder?: string;
14335
+ label?: string;
14336
+ required?: boolean;
14337
+ disabled?: boolean;
14338
+ className?: string;
14339
+ uploadConfig: UploadConfig$1;
14340
+ }
14341
+ declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element;
14342
+
14343
+ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14344
+ name: string;
14345
+ label?: string;
14346
+ required?: boolean;
14347
+ validate?: (value: string) => boolean | string;
14348
+ validationErrorMessage?: string;
14349
+ uploadConfig: RichEditorProps["uploadConfig"];
14350
+ };
14351
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14352
+
14353
+ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14354
+ name: string;
14355
+ label?: string;
14356
+ required?: boolean;
14357
+ validate?: (value: Date | undefined) => boolean | string;
14358
+ validationErrorMessage?: string;
14359
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14360
+ };
14361
+ declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
14362
+
14363
+ type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
14364
+ name: string;
14365
+ label?: string;
14366
+ required?: boolean;
14367
+ validate?: (value: string | undefined) => boolean | string;
14368
+ validationErrorMessage?: string;
14369
+ rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
14370
+ };
14371
+ declare const TimePickerFormField: ({ name, label, required, validate, validationErrorMessage, rules, ...timePickerProps }: TimePickerFormFieldProps) => react_jsx_runtime.JSX.Element;
14372
+
14373
+ interface UploadConfig {
14374
+ apiUrl: string;
14375
+ s3Bucket: string;
14376
+ s3Region: string;
14377
+ s3Url: string;
14378
+ timeout?: number;
14379
+ maxFileSize?: number;
14380
+ endpoints?: {
14381
+ presignedUrl: string;
14382
+ upload: string;
14383
+ };
14384
+ }
14385
+ interface UploadResponse {
14386
+ url: string;
14387
+ filename: string;
14388
+ size: number;
14389
+ type: string;
14390
+ }
14391
+ interface UploadProgress$1 {
14392
+ amount: number;
14393
+ message: string;
14394
+ }
14395
+ declare class UploadService {
14396
+ static getPresignedUrl(filename: string, contentType: string, config: UploadConfig): Promise<string>;
14397
+ static uploadToS3(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14398
+ static uploadViaAPI(file: File, config: UploadConfig, onProgress?: (progress: UploadProgress$1) => void): Promise<UploadResponse>;
14399
+ }
14400
+
14401
+ interface UploadProgress {
14402
+ amount: number;
14403
+ message: string;
14404
+ }
14405
+ interface UploadedFile {
14406
+ url: string;
14407
+ filename: string;
14408
+ size: number;
14409
+ type: string;
14410
+ }
14411
+ interface UseImageUploadOptions {
14412
+ onSuccess?: (file: UploadedFile) => void;
14413
+ onError?: (error: string) => void;
14414
+ onProgress?: (progress: UploadProgress) => void;
14415
+ maxFileSize?: number;
14416
+ allowedTypes?: string[];
14417
+ uploadConfig: UploadConfig;
14418
+ }
14419
+ declare const useImageUpload: (options: UseImageUploadOptions) => {
14420
+ uploadFile: (file: File) => Promise<UploadedFile | null>;
14421
+ isUploading: boolean;
14422
+ progress: UploadProgress | null;
14423
+ error: string | null;
14424
+ reset: () => void;
14425
+ };
14426
+
14427
+ 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 };