@lets-events/react 12.2.5 → 12.2.6
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 +7 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +24 -4
- package/dist/index.mjs +24 -4
- package/package.json +1 -1
- 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 +146 -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 +92 -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 -98
- 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 -444
- package/src/components/RichEditor/RichEditor.tsx +49 -48
- 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
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,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[34mCLI[39m
|
|
7
|
-
[34mCLI[39m
|
|
8
|
-
[34mCLI[39m
|
|
9
|
-
[34mCLI[39m
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[32mCJS[39m
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @lets-events/react@12.2.6 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/bia3003/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[32m393.82 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 285ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m379.87 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 286ms
|
|
17
|
+
DTS Build start
|
|
18
|
+
DTS ⚡️ Build success in 5185ms
|
|
19
|
+
DTS dist/index.d.mts 389.16 KB
|
|
20
|
+
DTS dist/index.d.ts 389.16 KB
|
|
21
|
+
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -5055,7 +5055,7 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5055
5055
|
title: string;
|
|
5056
5056
|
children?: ReactNode;
|
|
5057
5057
|
goBackIcon?: ReactNode;
|
|
5058
|
-
goBackAction
|
|
5058
|
+
goBackAction?: () => void;
|
|
5059
5059
|
};
|
|
5060
5060
|
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5061
5061
|
|
|
@@ -14734,6 +14734,7 @@ interface RichEditorProps {
|
|
|
14734
14734
|
simpleVersion?: boolean;
|
|
14735
14735
|
onCharacterCountChange?: (count: number) => void;
|
|
14736
14736
|
maxLength?: number;
|
|
14737
|
+
disableVideo?: boolean;
|
|
14737
14738
|
}
|
|
14738
14739
|
declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
|
|
14739
14740
|
|
|
@@ -14744,9 +14745,11 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
|
14744
14745
|
validate?: (value: string) => boolean | string;
|
|
14745
14746
|
maxLength?: number;
|
|
14746
14747
|
validationErrorMessage?: string;
|
|
14748
|
+
simpleVersion?: boolean;
|
|
14747
14749
|
uploadConfig: RichEditorProps["uploadConfig"];
|
|
14750
|
+
disableVideo?: boolean;
|
|
14748
14751
|
};
|
|
14749
|
-
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14752
|
+
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14750
14753
|
|
|
14751
14754
|
type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
|
|
14752
14755
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -5055,7 +5055,7 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5055
5055
|
title: string;
|
|
5056
5056
|
children?: ReactNode;
|
|
5057
5057
|
goBackIcon?: ReactNode;
|
|
5058
|
-
goBackAction
|
|
5058
|
+
goBackAction?: () => void;
|
|
5059
5059
|
};
|
|
5060
5060
|
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5061
5061
|
|
|
@@ -14734,6 +14734,7 @@ interface RichEditorProps {
|
|
|
14734
14734
|
simpleVersion?: boolean;
|
|
14735
14735
|
onCharacterCountChange?: (count: number) => void;
|
|
14736
14736
|
maxLength?: number;
|
|
14737
|
+
disableVideo?: boolean;
|
|
14737
14738
|
}
|
|
14738
14739
|
declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
|
|
14739
14740
|
|
|
@@ -14744,9 +14745,11 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
|
14744
14745
|
validate?: (value: string) => boolean | string;
|
|
14745
14746
|
maxLength?: number;
|
|
14746
14747
|
validationErrorMessage?: string;
|
|
14748
|
+
simpleVersion?: boolean;
|
|
14747
14749
|
uploadConfig: RichEditorProps["uploadConfig"];
|
|
14750
|
+
disableVideo?: boolean;
|
|
14748
14751
|
};
|
|
14749
|
-
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14752
|
+
declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14750
14753
|
|
|
14751
14754
|
type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
|
|
14752
14755
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1814,7 +1814,7 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1814
1814
|
outlinedBgColor: {
|
|
1815
1815
|
neutral: {},
|
|
1816
1816
|
transparent: {
|
|
1817
|
-
|
|
1817
|
+
backgroundColor: "transparent"
|
|
1818
1818
|
}
|
|
1819
1819
|
},
|
|
1820
1820
|
radii: {
|
|
@@ -12171,6 +12171,7 @@ var QuillComponent = ({
|
|
|
12171
12171
|
className,
|
|
12172
12172
|
uploadConfig,
|
|
12173
12173
|
simpleVersion = false,
|
|
12174
|
+
disableVideo = false,
|
|
12174
12175
|
onCharacterCountChange,
|
|
12175
12176
|
maxLength
|
|
12176
12177
|
}) => {
|
|
@@ -12201,6 +12202,18 @@ var QuillComponent = ({
|
|
|
12201
12202
|
clipboard: {
|
|
12202
12203
|
matchVisual: false
|
|
12203
12204
|
}
|
|
12205
|
+
} : disableVideo ? {
|
|
12206
|
+
toolbar: [
|
|
12207
|
+
[{ header: [1, 2, false] }],
|
|
12208
|
+
["bold", "italic", "underline", "strike"],
|
|
12209
|
+
[{ color: [] }, { background: [] }],
|
|
12210
|
+
[{ align: [] }],
|
|
12211
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
12212
|
+
["link", "image"]
|
|
12213
|
+
],
|
|
12214
|
+
clipboard: {
|
|
12215
|
+
matchVisual: false
|
|
12216
|
+
}
|
|
12204
12217
|
} : {
|
|
12205
12218
|
toolbar: [
|
|
12206
12219
|
[{ header: [1, 2, false] }],
|
|
@@ -12360,6 +12373,7 @@ var QuillComponent = ({
|
|
|
12360
12373
|
quill.insertText(index, url, "link", url);
|
|
12361
12374
|
quill.setSelection(index + url.length, 0);
|
|
12362
12375
|
}
|
|
12376
|
+
onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
|
|
12363
12377
|
setLinkUrl("");
|
|
12364
12378
|
setShowLinkModal(false);
|
|
12365
12379
|
}, [linkUrl, quill]);
|
|
@@ -12396,6 +12410,7 @@ var QuillComponent = ({
|
|
|
12396
12410
|
const insertIndex = selection ? selection.index : quill.getLength();
|
|
12397
12411
|
quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
|
|
12398
12412
|
quill.setSelection(insertIndex + 1, 0);
|
|
12413
|
+
onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
|
|
12399
12414
|
setVideoUrl("");
|
|
12400
12415
|
setShowVideoModal(false);
|
|
12401
12416
|
}, [videoUrl, quill]);
|
|
@@ -12580,14 +12595,18 @@ var RichEditorFormField = (_a) => {
|
|
|
12580
12595
|
required,
|
|
12581
12596
|
validate,
|
|
12582
12597
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
12583
|
-
maxLength
|
|
12598
|
+
maxLength,
|
|
12599
|
+
simpleVersion = false,
|
|
12600
|
+
disableVideo = false
|
|
12584
12601
|
} = _b, props = __objRest(_b, [
|
|
12585
12602
|
"name",
|
|
12586
12603
|
"label",
|
|
12587
12604
|
"required",
|
|
12588
12605
|
"validate",
|
|
12589
12606
|
"validationErrorMessage",
|
|
12590
|
-
"maxLength"
|
|
12607
|
+
"maxLength",
|
|
12608
|
+
"simpleVersion",
|
|
12609
|
+
"disableVideo"
|
|
12591
12610
|
]);
|
|
12592
12611
|
const { field, fieldState } = (0, import_react_hook_form12.useController)({
|
|
12593
12612
|
name,
|
|
@@ -12639,7 +12658,8 @@ var RichEditorFormField = (_a) => {
|
|
|
12639
12658
|
onChange: field.onChange,
|
|
12640
12659
|
"aria-labelledby": `${name}-label`,
|
|
12641
12660
|
onCharacterCountChange: handleCharacterCountChange,
|
|
12642
|
-
maxLength
|
|
12661
|
+
maxLength,
|
|
12662
|
+
disableVideo
|
|
12643
12663
|
})
|
|
12644
12664
|
),
|
|
12645
12665
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorFormMessage, { message: errorMsg })
|
package/dist/index.mjs
CHANGED
|
@@ -1699,7 +1699,7 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1699
1699
|
outlinedBgColor: {
|
|
1700
1700
|
neutral: {},
|
|
1701
1701
|
transparent: {
|
|
1702
|
-
|
|
1702
|
+
backgroundColor: "transparent"
|
|
1703
1703
|
}
|
|
1704
1704
|
},
|
|
1705
1705
|
radii: {
|
|
@@ -12069,6 +12069,7 @@ var QuillComponent = ({
|
|
|
12069
12069
|
className,
|
|
12070
12070
|
uploadConfig,
|
|
12071
12071
|
simpleVersion = false,
|
|
12072
|
+
disableVideo = false,
|
|
12072
12073
|
onCharacterCountChange,
|
|
12073
12074
|
maxLength
|
|
12074
12075
|
}) => {
|
|
@@ -12099,6 +12100,18 @@ var QuillComponent = ({
|
|
|
12099
12100
|
clipboard: {
|
|
12100
12101
|
matchVisual: false
|
|
12101
12102
|
}
|
|
12103
|
+
} : disableVideo ? {
|
|
12104
|
+
toolbar: [
|
|
12105
|
+
[{ header: [1, 2, false] }],
|
|
12106
|
+
["bold", "italic", "underline", "strike"],
|
|
12107
|
+
[{ color: [] }, { background: [] }],
|
|
12108
|
+
[{ align: [] }],
|
|
12109
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
12110
|
+
["link", "image"]
|
|
12111
|
+
],
|
|
12112
|
+
clipboard: {
|
|
12113
|
+
matchVisual: false
|
|
12114
|
+
}
|
|
12102
12115
|
} : {
|
|
12103
12116
|
toolbar: [
|
|
12104
12117
|
[{ header: [1, 2, false] }],
|
|
@@ -12258,6 +12271,7 @@ var QuillComponent = ({
|
|
|
12258
12271
|
quill.insertText(index, url, "link", url);
|
|
12259
12272
|
quill.setSelection(index + url.length, 0);
|
|
12260
12273
|
}
|
|
12274
|
+
onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
|
|
12261
12275
|
setLinkUrl("");
|
|
12262
12276
|
setShowLinkModal(false);
|
|
12263
12277
|
}, [linkUrl, quill]);
|
|
@@ -12294,6 +12308,7 @@ var QuillComponent = ({
|
|
|
12294
12308
|
const insertIndex = selection ? selection.index : quill.getLength();
|
|
12295
12309
|
quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
|
|
12296
12310
|
quill.setSelection(insertIndex + 1, 0);
|
|
12311
|
+
onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
|
|
12297
12312
|
setVideoUrl("");
|
|
12298
12313
|
setShowVideoModal(false);
|
|
12299
12314
|
}, [videoUrl, quill]);
|
|
@@ -12478,14 +12493,18 @@ var RichEditorFormField = (_a) => {
|
|
|
12478
12493
|
required,
|
|
12479
12494
|
validate,
|
|
12480
12495
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
12481
|
-
maxLength
|
|
12496
|
+
maxLength,
|
|
12497
|
+
simpleVersion = false,
|
|
12498
|
+
disableVideo = false
|
|
12482
12499
|
} = _b, props = __objRest(_b, [
|
|
12483
12500
|
"name",
|
|
12484
12501
|
"label",
|
|
12485
12502
|
"required",
|
|
12486
12503
|
"validate",
|
|
12487
12504
|
"validationErrorMessage",
|
|
12488
|
-
"maxLength"
|
|
12505
|
+
"maxLength",
|
|
12506
|
+
"simpleVersion",
|
|
12507
|
+
"disableVideo"
|
|
12489
12508
|
]);
|
|
12490
12509
|
const { field, fieldState } = useController3({
|
|
12491
12510
|
name,
|
|
@@ -12537,7 +12556,8 @@ var RichEditorFormField = (_a) => {
|
|
|
12537
12556
|
onChange: field.onChange,
|
|
12538
12557
|
"aria-labelledby": `${name}-label`,
|
|
12539
12558
|
onCharacterCountChange: handleCharacterCountChange,
|
|
12540
|
-
maxLength
|
|
12559
|
+
maxLength,
|
|
12560
|
+
disableVideo
|
|
12541
12561
|
})
|
|
12542
12562
|
),
|
|
12543
12563
|
/* @__PURE__ */ jsx53(ErrorFormMessage, { message: errorMsg })
|