@lets-events/react 12.2.7 → 12.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +21 -19
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +14 -7
- package/dist/index.mjs +14 -7
- package/package.json +2 -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 +300 -300
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +148 -146
- package/src/components/Calendar/styledComponents.ts +250 -250
- 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 +138 -138
- package/src/components/Drawer/styledComponents.ts +52 -52
- 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 +95 -92
- 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 +32 -32
- package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
- package/src/components/FormFields/PhoneFormField.tsx +40 -40
- package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
- package/src/components/FormFields/RichEditorFormField.tsx +102 -102
- package/src/components/FormFields/SelectFormField.tsx +93 -93
- package/src/components/FormFields/SwitchFormField.tsx +46 -46
- package/src/components/FormFields/TextAreaFormField.tsx +57 -57
- package/src/components/FormFields/TextFormField.tsx +112 -112
- package/src/components/FormFields/TimePickerFormField.tsx +88 -88
- package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/subComponents/FormLabel.tsx +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/index.tsx +243 -243
- package/src/components/MultiSelect/styledComponents.ts +160 -160
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/RichEditor/QuillComponent.tsx +458 -458
- package/src/components/RichEditor/RichEditor.tsx +49 -49
- package/src/components/RichEditor/index.ts +2 -2
- package/src/components/RichEditor/styledComponents.ts +1151 -1151
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +38 -38
- package/src/components/TextField.tsx +372 -372
- package/src/components/TextareaField.tsx +127 -127
- package/src/components/TimePicker.tsx +328 -328
- 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 -139
- package/src/hooks/useOnClickOutside.tsx +42 -42
- package/src/index.tsx +68 -68
- 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 -180
- package/tsconfig.json +3 -3
- package/tsup.config.ts +38 -38
- package/dist/index.css +0 -171
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { ToastProvider } from "../Toast";
|
|
3
|
-
import QuillComponent from "./QuillComponent";
|
|
4
|
-
|
|
5
|
-
export interface UploadConfig {
|
|
6
|
-
apiUrl: string;
|
|
7
|
-
s3Bucket: string;
|
|
8
|
-
s3Region: string;
|
|
9
|
-
s3Url: string;
|
|
10
|
-
timeout?: number;
|
|
11
|
-
maxFileSize?: number;
|
|
12
|
-
endpoints?: {
|
|
13
|
-
presignedUrl: string;
|
|
14
|
-
upload: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface RichEditorProps {
|
|
19
|
-
value?: string;
|
|
20
|
-
onChange?: (value: string) => void;
|
|
21
|
-
placeholder?: string;
|
|
22
|
-
label?: string;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
className?: string;
|
|
25
|
-
uploadConfig?: UploadConfig;
|
|
26
|
-
simpleVersion?: boolean;
|
|
27
|
-
onCharacterCountChange?: (count: number) => void;
|
|
28
|
-
maxLength?: number;
|
|
29
|
-
disableVideo?: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const RichEditor = (props: RichEditorProps) => {
|
|
33
|
-
const [isClient, setIsClient] = useState(false);
|
|
34
|
-
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
setIsClient(typeof window !== "undefined");
|
|
37
|
-
}, []);
|
|
38
|
-
|
|
39
|
-
if (!isClient) return null;
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div>
|
|
43
|
-
<ToastProvider>
|
|
44
|
-
<QuillComponent {...props} />
|
|
45
|
-
</ToastProvider>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { ToastProvider } from "../Toast";
|
|
3
|
+
import QuillComponent from "./QuillComponent";
|
|
4
|
+
|
|
5
|
+
export interface UploadConfig {
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
s3Bucket: string;
|
|
8
|
+
s3Region: string;
|
|
9
|
+
s3Url: string;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
maxFileSize?: number;
|
|
12
|
+
endpoints?: {
|
|
13
|
+
presignedUrl: string;
|
|
14
|
+
upload: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface RichEditorProps {
|
|
19
|
+
value?: string;
|
|
20
|
+
onChange?: (value: string) => void;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
uploadConfig?: UploadConfig;
|
|
26
|
+
simpleVersion?: boolean;
|
|
27
|
+
onCharacterCountChange?: (count: number) => void;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
disableVideo?: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const RichEditor = (props: RichEditorProps) => {
|
|
33
|
+
const [isClient, setIsClient] = useState(false);
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
setIsClient(typeof window !== "undefined");
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
if (!isClient) return null;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div>
|
|
43
|
+
<ToastProvider>
|
|
44
|
+
<QuillComponent {...props} />
|
|
45
|
+
</ToastProvider>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
50
|
export default RichEditor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as RichEditor } from "./RichEditor";
|
|
2
|
-
export type { RichEditorProps } from "./RichEditor";
|
|
1
|
+
export { default as RichEditor } from "./RichEditor";
|
|
2
|
+
export type { RichEditorProps } from "./RichEditor";
|