@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
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
|
-
[32mCJS[39m
|
|
14
|
-
[
|
|
15
|
-
[32mESM[39m
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @lets-events/react@12.2.8 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[32m394.03 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 600ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m380.08 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 602ms
|
|
17
|
+
DTS Build start
|
|
18
|
+
DTS ⚡️ Build success in 9746ms
|
|
19
|
+
DTS dist/index.d.mts 389.25 KB
|
|
20
|
+
DTS dist/index.d.ts 389.25 KB
|
|
21
|
+
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -4673,8 +4673,9 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4673
4673
|
hasError?: boolean;
|
|
4674
4674
|
expand?: boolean;
|
|
4675
4675
|
allowPastDates?: boolean;
|
|
4676
|
+
maxYearsFromNow?: number;
|
|
4676
4677
|
};
|
|
4677
|
-
declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4678
|
+
declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4678
4679
|
|
|
4679
4680
|
declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
|
|
4680
4681
|
colors: {
|
|
@@ -14759,8 +14760,9 @@ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> &
|
|
|
14759
14760
|
validationErrorMessage?: string;
|
|
14760
14761
|
rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
14761
14762
|
allowPastDates?: boolean;
|
|
14763
|
+
maxYearsFromNow?: number;
|
|
14762
14764
|
};
|
|
14763
|
-
declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14765
|
+
declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, maxYearsFromNow, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14764
14766
|
|
|
14765
14767
|
type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
|
|
14766
14768
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4673,8 +4673,9 @@ type CalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
|
4673
4673
|
hasError?: boolean;
|
|
4674
4674
|
expand?: boolean;
|
|
4675
4675
|
allowPastDates?: boolean;
|
|
4676
|
+
maxYearsFromNow?: number;
|
|
4676
4677
|
};
|
|
4677
|
-
declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4678
|
+
declare function Calendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4678
4679
|
|
|
4679
4680
|
declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {}, {}, _stitches_react_types_css_util.CSS<{}, {
|
|
4680
4681
|
colors: {
|
|
@@ -14759,8 +14760,9 @@ type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> &
|
|
|
14759
14760
|
validationErrorMessage?: string;
|
|
14760
14761
|
rules?: Omit<RegisterOptions<FieldValues, string>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
14761
14762
|
allowPastDates?: boolean;
|
|
14763
|
+
maxYearsFromNow?: number;
|
|
14762
14764
|
};
|
|
14763
|
-
declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14765
|
+
declare const CalendarFormField: ({ name, label, required, validate, validationErrorMessage, rules, onChange, allowPastDates, maxYearsFromNow, ...calendarProps }: CalendarFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14764
14766
|
|
|
14765
14767
|
type TimePickerFormFieldProps = Omit<TimePickerProps, "selected" | "setSelected"> & {
|
|
14766
14768
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -7981,7 +7981,8 @@ function Calendar(_a) {
|
|
|
7981
7981
|
position = "bottom",
|
|
7982
7982
|
hasError,
|
|
7983
7983
|
expand,
|
|
7984
|
-
allowPastDates = false
|
|
7984
|
+
allowPastDates = false,
|
|
7985
|
+
maxYearsFromNow = 20
|
|
7985
7986
|
} = _b, props = __objRest(_b, [
|
|
7986
7987
|
"action",
|
|
7987
7988
|
"actionText",
|
|
@@ -7991,7 +7992,8 @@ function Calendar(_a) {
|
|
|
7991
7992
|
"position",
|
|
7992
7993
|
"hasError",
|
|
7993
7994
|
"expand",
|
|
7994
|
-
"allowPastDates"
|
|
7995
|
+
"allowPastDates",
|
|
7996
|
+
"maxYearsFromNow"
|
|
7995
7997
|
]);
|
|
7996
7998
|
const [inputValue, setInputValue] = (0, import_react7.useState)("");
|
|
7997
7999
|
const [showContainer, setShowCalendar] = (0, import_react7.useState)(false);
|
|
@@ -8000,7 +8002,7 @@ function Calendar(_a) {
|
|
|
8000
8002
|
setShowCalendar(false);
|
|
8001
8003
|
});
|
|
8002
8004
|
const today = /* @__PURE__ */ new Date();
|
|
8003
|
-
const maxDate = addYears(today,
|
|
8005
|
+
const maxDate = addYears(today, maxYearsFromNow);
|
|
8004
8006
|
(0, import_react7.useEffect)(() => {
|
|
8005
8007
|
if (selected) {
|
|
8006
8008
|
setInputValue(format2(selected, "dd/MM/yyyy"));
|
|
@@ -9705,7 +9707,9 @@ var MultiSelect = import_react16.default.forwardRef(
|
|
|
9705
9707
|
ButtonSelectAllStyled,
|
|
9706
9708
|
{
|
|
9707
9709
|
css: itemStyle,
|
|
9708
|
-
onClick: (e) =>
|
|
9710
|
+
onClick: (e) => {
|
|
9711
|
+
handleSelectAll(e), setIsOpen(false);
|
|
9712
|
+
},
|
|
9709
9713
|
type: "button",
|
|
9710
9714
|
children: [
|
|
9711
9715
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: allOptionsSelected ? "checked" : "" }),
|
|
@@ -12679,7 +12683,8 @@ var CalendarFormField = (_a) => {
|
|
|
12679
12683
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
12680
12684
|
rules,
|
|
12681
12685
|
onChange,
|
|
12682
|
-
allowPastDates
|
|
12686
|
+
allowPastDates,
|
|
12687
|
+
maxYearsFromNow = 20
|
|
12683
12688
|
} = _b, calendarProps = __objRest(_b, [
|
|
12684
12689
|
"name",
|
|
12685
12690
|
"label",
|
|
@@ -12688,7 +12693,8 @@ var CalendarFormField = (_a) => {
|
|
|
12688
12693
|
"validationErrorMessage",
|
|
12689
12694
|
"rules",
|
|
12690
12695
|
"onChange",
|
|
12691
|
-
"allowPastDates"
|
|
12696
|
+
"allowPastDates",
|
|
12697
|
+
"maxYearsFromNow"
|
|
12692
12698
|
]);
|
|
12693
12699
|
const handleValidate = (0, import_react23.useCallback)(
|
|
12694
12700
|
(value) => {
|
|
@@ -12735,7 +12741,8 @@ var CalendarFormField = (_a) => {
|
|
|
12735
12741
|
handleCalendarChange(date);
|
|
12736
12742
|
},
|
|
12737
12743
|
hasError: haveError,
|
|
12738
|
-
allowPastDates
|
|
12744
|
+
allowPastDates,
|
|
12745
|
+
maxYearsFromNow
|
|
12739
12746
|
}, calendarProps)
|
|
12740
12747
|
),
|
|
12741
12748
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorFormMessage, { message: errorMsg })
|
package/dist/index.mjs
CHANGED
|
@@ -7870,7 +7870,8 @@ function Calendar(_a) {
|
|
|
7870
7870
|
position = "bottom",
|
|
7871
7871
|
hasError,
|
|
7872
7872
|
expand,
|
|
7873
|
-
allowPastDates = false
|
|
7873
|
+
allowPastDates = false,
|
|
7874
|
+
maxYearsFromNow = 20
|
|
7874
7875
|
} = _b, props = __objRest(_b, [
|
|
7875
7876
|
"action",
|
|
7876
7877
|
"actionText",
|
|
@@ -7880,7 +7881,8 @@ function Calendar(_a) {
|
|
|
7880
7881
|
"position",
|
|
7881
7882
|
"hasError",
|
|
7882
7883
|
"expand",
|
|
7883
|
-
"allowPastDates"
|
|
7884
|
+
"allowPastDates",
|
|
7885
|
+
"maxYearsFromNow"
|
|
7884
7886
|
]);
|
|
7885
7887
|
const [inputValue, setInputValue] = useState2("");
|
|
7886
7888
|
const [showContainer, setShowCalendar] = useState2(false);
|
|
@@ -7889,7 +7891,7 @@ function Calendar(_a) {
|
|
|
7889
7891
|
setShowCalendar(false);
|
|
7890
7892
|
});
|
|
7891
7893
|
const today = /* @__PURE__ */ new Date();
|
|
7892
|
-
const maxDate = addYears(today,
|
|
7894
|
+
const maxDate = addYears(today, maxYearsFromNow);
|
|
7893
7895
|
useEffect3(() => {
|
|
7894
7896
|
if (selected) {
|
|
7895
7897
|
setInputValue(format2(selected, "dd/MM/yyyy"));
|
|
@@ -9598,7 +9600,9 @@ var MultiSelect = React9.forwardRef(
|
|
|
9598
9600
|
ButtonSelectAllStyled,
|
|
9599
9601
|
{
|
|
9600
9602
|
css: itemStyle,
|
|
9601
|
-
onClick: (e) =>
|
|
9603
|
+
onClick: (e) => {
|
|
9604
|
+
handleSelectAll(e), setIsOpen(false);
|
|
9605
|
+
},
|
|
9602
9606
|
type: "button",
|
|
9603
9607
|
children: [
|
|
9604
9608
|
/* @__PURE__ */ jsx26("div", { className: allOptionsSelected ? "checked" : "" }),
|
|
@@ -12577,7 +12581,8 @@ var CalendarFormField = (_a) => {
|
|
|
12577
12581
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
12578
12582
|
rules,
|
|
12579
12583
|
onChange,
|
|
12580
|
-
allowPastDates
|
|
12584
|
+
allowPastDates,
|
|
12585
|
+
maxYearsFromNow = 20
|
|
12581
12586
|
} = _b, calendarProps = __objRest(_b, [
|
|
12582
12587
|
"name",
|
|
12583
12588
|
"label",
|
|
@@ -12586,7 +12591,8 @@ var CalendarFormField = (_a) => {
|
|
|
12586
12591
|
"validationErrorMessage",
|
|
12587
12592
|
"rules",
|
|
12588
12593
|
"onChange",
|
|
12589
|
-
"allowPastDates"
|
|
12594
|
+
"allowPastDates",
|
|
12595
|
+
"maxYearsFromNow"
|
|
12590
12596
|
]);
|
|
12591
12597
|
const handleValidate = useCallback5(
|
|
12592
12598
|
(value) => {
|
|
@@ -12633,7 +12639,8 @@ var CalendarFormField = (_a) => {
|
|
|
12633
12639
|
handleCalendarChange(date);
|
|
12634
12640
|
},
|
|
12635
12641
|
hasError: haveError,
|
|
12636
|
-
allowPastDates
|
|
12642
|
+
allowPastDates,
|
|
12643
|
+
maxYearsFromNow
|
|
12637
12644
|
}, calendarProps)
|
|
12638
12645
|
),
|
|
12639
12646
|
/* @__PURE__ */ jsx54(ErrorFormMessage, { message: errorMsg })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lets-events/react",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -47,4 +47,4 @@
|
|
|
47
47
|
"react-hook-form": "^7.57.0",
|
|
48
48
|
"react-quilljs": "^2.0.5"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|