@lets-events/react 11.8.0 → 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.
- package/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +21 -18
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +124 -6
- package/dist/index.d.ts +124 -6
- package/dist/index.js +1033 -276
- package/dist/index.mjs +1027 -276
- package/package.json +7 -2
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +125 -125
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +16 -16
- package/src/components/Button/styledComponents.ts +287 -287
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +139 -136
- package/src/components/Calendar/styledComponents.ts +209 -209
- package/src/components/Card.tsx +48 -48
- package/src/components/CheckboxGroup.tsx +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Drawer/index.tsx +55 -55
- package/src/components/Drawer/styledComponents.ts +46 -46
- package/src/components/Dropdown.tsx +302 -302
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
- package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
- package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
- package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
- package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
- package/src/components/FormFields/BirthDateFormField.tsx +84 -84
- package/src/components/FormFields/CNPJFormField.tsx +87 -87
- package/src/components/FormFields/CPFFormField.tsx +78 -78
- package/src/components/FormFields/CalendarFormField.tsx +89 -0
- package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
- package/src/components/FormFields/EmailFormField.tsx +27 -27
- package/src/components/FormFields/Form.tsx +39 -39
- package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +40 -40
- package/src/components/FormFields/MultiSelectFormField.tsx +61 -55
- package/src/components/FormFields/PhoneFormField.tsx +40 -40
- package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
- package/src/components/FormFields/RichEditorFormField.tsx +69 -0
- package/src/components/FormFields/SelectFormField.tsx +93 -93
- package/src/components/FormFields/TextAreaFormField.tsx +57 -48
- package/src/components/FormFields/TextFormField.tsx +112 -112
- package/src/components/FormFields/TimePickerFormField.tsx +88 -0
- package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
- package/src/components/FormFields/utils/validation.ts +23 -23
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +38 -38
- package/src/components/MenuDropdown/styledComponents.ts +31 -31
- package/src/components/Modal.tsx +90 -90
- package/src/components/MultiSelect.tsx +266 -252
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/RichEditor/QuillComponent.tsx +415 -0
- package/src/components/RichEditor/RichEditor.tsx +38 -0
- package/src/components/RichEditor/index.ts +2 -0
- package/src/components/RichEditor/styledComponents.ts +62 -0
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +38 -38
- package/src/components/TextField.tsx +372 -365
- package/src/components/TextareaField.tsx +128 -128
- package/src/components/TimePicker.tsx +301 -298
- package/src/components/Toast/components/ToastItem.tsx +41 -41
- package/src/components/Toast/components/ToastProvider.tsx +63 -63
- package/src/components/Toast/hooks/useToast.ts +12 -12
- package/src/components/Toast/index.tsx +5 -5
- package/src/components/Toast/styles/index.ts +135 -135
- package/src/components/Toast/types/index.ts +46 -46
- package/src/components/Tooltip/index.tsx +66 -66
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useCountries.ts +41 -41
- package/src/hooks/useImageUpload.ts +139 -0
- package/src/hooks/useOnClickOutside.tsx +20 -20
- package/src/index.tsx +67 -55
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/src/utils/getNestedValue.ts +3 -3
- package/src/utils/states.ts +29 -29
- package/src/utils/uploadService.ts +180 -0
- package/tsconfig.json +3 -3
- package/tsup.config.ts +38 -0
- 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
|
}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[34mCLI[39m
|
|
7
|
-
[34mCLI[39m
|
|
8
|
-
[34mCLI[39m
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[32mCJS[39m [1mdist
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @lets-events/react@12.0.0 build
|
|
4
|
+
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
5
|
+
|
|
6
|
+
[1G[0K[34mCLI[39m Building entry: src/index.tsx
|
|
7
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
+
[34mCLI[39m tsup v8.5.0
|
|
9
|
+
[34mCLI[39m Using tsup config: /home/bia_c/lets/design-system/packages/react/tsup.config.ts
|
|
10
|
+
[34mCLI[39m Target: es6
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[34mCJS[39m Build start
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m358.73 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 264ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m345.15 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ 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
|
+
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
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;
|
|
@@ -12215,6 +12218,7 @@ declare function Tooltip({ children, content, delayDuration, side, }: TooltipPro
|
|
|
12215
12218
|
|
|
12216
12219
|
declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
12217
12220
|
color?: "default" | "error" | undefined;
|
|
12221
|
+
disabled?: boolean | "true" | undefined;
|
|
12218
12222
|
}, {}, _stitches_react_types_css_util.CSS<{}, {
|
|
12219
12223
|
colors: {
|
|
12220
12224
|
brand50: string;
|
|
@@ -12597,6 +12601,8 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
|
|
|
12597
12601
|
zIndex?: string;
|
|
12598
12602
|
showSelectedValues?: boolean;
|
|
12599
12603
|
singleSelect?: boolean;
|
|
12604
|
+
selectedOrientation?: "row" | "column";
|
|
12605
|
+
disabled?: boolean;
|
|
12600
12606
|
};
|
|
12601
12607
|
declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
12602
12608
|
|
|
@@ -14150,8 +14156,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
|
|
|
14150
14156
|
label?: string;
|
|
14151
14157
|
required?: boolean;
|
|
14152
14158
|
placeholder?: string;
|
|
14159
|
+
validate?: (value: string) => boolean | string;
|
|
14160
|
+
validationErrorMessage?: string;
|
|
14153
14161
|
};
|
|
14154
|
-
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;
|
|
14155
14163
|
|
|
14156
14164
|
type TextFormFieldProps = TextFieldProps & {
|
|
14157
14165
|
name: string;
|
|
@@ -14178,8 +14186,10 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14178
14186
|
name: string;
|
|
14179
14187
|
label?: string;
|
|
14180
14188
|
required?: boolean;
|
|
14189
|
+
selectedOrientation?: "row" | "column";
|
|
14190
|
+
zIndex?: string;
|
|
14181
14191
|
};
|
|
14182
|
-
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;
|
|
14183
14193
|
|
|
14184
14194
|
type PhoneFormFieldProps = {
|
|
14185
14195
|
name: string;
|
|
@@ -14306,4 +14316,112 @@ type EmailFormFieldProps = {
|
|
|
14306
14316
|
};
|
|
14307
14317
|
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14308
14318
|
|
|
14309
|
-
|
|
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;
|
|
@@ -12215,6 +12218,7 @@ declare function Tooltip({ children, content, delayDuration, side, }: TooltipPro
|
|
|
12215
12218
|
|
|
12216
12219
|
declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
12217
12220
|
color?: "default" | "error" | undefined;
|
|
12221
|
+
disabled?: boolean | "true" | undefined;
|
|
12218
12222
|
}, {}, _stitches_react_types_css_util.CSS<{}, {
|
|
12219
12223
|
colors: {
|
|
12220
12224
|
brand50: string;
|
|
@@ -12597,6 +12601,8 @@ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
|
|
|
12597
12601
|
zIndex?: string;
|
|
12598
12602
|
showSelectedValues?: boolean;
|
|
12599
12603
|
singleSelect?: boolean;
|
|
12604
|
+
selectedOrientation?: "row" | "column";
|
|
12605
|
+
disabled?: boolean;
|
|
12600
12606
|
};
|
|
12601
12607
|
declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
12602
12608
|
|
|
@@ -14150,8 +14156,10 @@ type TextAreaFormFieldProps = TextareaFieldProps & {
|
|
|
14150
14156
|
label?: string;
|
|
14151
14157
|
required?: boolean;
|
|
14152
14158
|
placeholder?: string;
|
|
14159
|
+
validate?: (value: string) => boolean | string;
|
|
14160
|
+
validationErrorMessage?: string;
|
|
14153
14161
|
};
|
|
14154
|
-
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;
|
|
14155
14163
|
|
|
14156
14164
|
type TextFormFieldProps = TextFieldProps & {
|
|
14157
14165
|
name: string;
|
|
@@ -14178,8 +14186,10 @@ type MultiSelectFormFieldProps = MultiSelectProps & {
|
|
|
14178
14186
|
name: string;
|
|
14179
14187
|
label?: string;
|
|
14180
14188
|
required?: boolean;
|
|
14189
|
+
selectedOrientation?: "row" | "column";
|
|
14190
|
+
zIndex?: string;
|
|
14181
14191
|
};
|
|
14182
|
-
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;
|
|
14183
14193
|
|
|
14184
14194
|
type PhoneFormFieldProps = {
|
|
14185
14195
|
name: string;
|
|
@@ -14306,4 +14316,112 @@ type EmailFormFieldProps = {
|
|
|
14306
14316
|
};
|
|
14307
14317
|
declare const EmailFormField: ({ name, label, required, placeholder, }: EmailFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14308
14318
|
|
|
14309
|
-
|
|
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 };
|