@lets-events/react 12.11.2 → 12.11.3
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 +24 -21
- package/CHANGELOG.md +6 -0
- package/dist/index.js +171 -139
- package/dist/index.mjs +171 -139
- package/package.json +1 -1
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +132 -132
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +85 -85
- package/src/components/Button/styledComponents.ts +361 -361
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +172 -168
- package/src/components/Calendar/styledComponents.ts +508 -480
- package/src/components/Card.tsx +74 -74
- package/src/components/CheckboxGroup.tsx +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Divider.tsx +7 -7
- package/src/components/DoubleCalendar/index.tsx +208 -204
- package/src/components/Drawer/index.tsx +113 -113
- package/src/components/Drawer/styledComponents.ts +97 -97
- package/src/components/Dropdown.tsx +302 -302
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +130 -130
- 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 +98 -98
- package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
- package/src/components/FormFields/DateAndTimeFormField.tsx +217 -217
- package/src/components/FormFields/DoubleCalendarFormField.tsx +96 -96
- 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 +88 -88
- package/src/components/FormFields/RichEditorFormField.tsx +128 -128
- package/src/components/FormFields/SelectFormField.tsx +113 -113
- package/src/components/FormFields/SwitchFormField.tsx +46 -46
- package/src/components/FormFields/TextAreaFormField.tsx +61 -61
- 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 +36 -36
- 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 +135 -135
- package/src/components/MultiSelect/index.tsx +418 -418
- package/src/components/MultiSelect/styledComponents.ts +176 -176
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/RichEditor/QuillComponent.tsx +419 -419
- package/src/components/RichEditor/RichEditor.tsx +53 -53
- package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
- package/src/components/RichEditor/editorConfig.ts +149 -149
- package/src/components/RichEditor/index.ts +3 -3
- package/src/components/RichEditor/styledComponents.ts +1175 -1175
- package/src/components/RichEditor/types.ts +12 -12
- 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 +54 -54
- package/src/components/TextField.tsx +423 -423
- package/src/components/TextareaField.tsx +116 -116
- package/src/components/TimePicker.tsx +357 -357
- 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/ToggleElement/index.tsx +58 -58
- package/src/components/Tooltip/index.tsx +126 -126
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useCountries.ts +41 -41
- package/src/hooks/useHasHover.ts +21 -21
- package/src/hooks/useImageUpload.ts +139 -139
- package/src/hooks/useMediaQuery.ts +19 -19
- package/src/hooks/useOnClickOutside.tsx +42 -42
- package/src/index.tsx +72 -72
- package/src/styles/index.ts +41 -41
- 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/.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,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
[34mCLI[39m
|
|
8
|
-
[34mCLI[39m tsup
|
|
9
|
-
[34mCLI[39m
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[32mCJS[39m
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
|
|
2
|
+
> @lets-events/react@12.11.3 build
|
|
3
|
+
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.tsx
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.0
|
|
8
|
+
[34mCLI[39m Using tsup config: C:\Users\Cazuza\Desktop\Web\design-system\packages\react\tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es6
|
|
10
|
+
[34mESM[39m Build start
|
|
11
|
+
[34mCJS[39m Build start
|
|
12
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m423.24 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 1314ms
|
|
14
|
+
[32mCJS[39m [1mdist\index.js [22m[32m439.36 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 1314ms
|
|
16
|
+
[34mDTS[39m Build start
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 7050ms
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m411.19 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m411.19 KB[39m
|
|
20
|
+
npm notice
|
|
21
|
+
npm notice New minor version of npm available! 11.5.1 -> 11.19.1
|
|
22
|
+
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.19.1
|
|
23
|
+
npm notice To update run: npm install -g npm@11.19.1
|
|
24
|
+
npm notice
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -7936,6 +7936,27 @@ var CalendarStyled = styled("div", {
|
|
|
7936
7936
|
}
|
|
7937
7937
|
}
|
|
7938
7938
|
});
|
|
7939
|
+
var calendarMobileCentered = {
|
|
7940
|
+
position: "fixed",
|
|
7941
|
+
top: "50%",
|
|
7942
|
+
left: "50%",
|
|
7943
|
+
right: "auto",
|
|
7944
|
+
bottom: "auto",
|
|
7945
|
+
transform: "translate(-50%, -50%)",
|
|
7946
|
+
maxWidth: "calc(100vw - 32px)",
|
|
7947
|
+
maxHeight: "90vh",
|
|
7948
|
+
overflowY: "auto"
|
|
7949
|
+
};
|
|
7950
|
+
var CalendarOverlayStyled = styled("div", {
|
|
7951
|
+
display: "none",
|
|
7952
|
+
"@media (max-width: 748px)": {
|
|
7953
|
+
display: "block",
|
|
7954
|
+
position: "fixed",
|
|
7955
|
+
inset: 0,
|
|
7956
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
7957
|
+
zIndex: 999998
|
|
7958
|
+
}
|
|
7959
|
+
});
|
|
7939
7960
|
var CalendarButtonStyled = styled("button", {
|
|
7940
7961
|
backgroundColor: "transparent",
|
|
7941
7962
|
border: "none",
|
|
@@ -7969,23 +7990,28 @@ var CalendarContentStyled = styled("div", {
|
|
|
7969
7990
|
position: "absolute",
|
|
7970
7991
|
backgroundColor: "$neutral50",
|
|
7971
7992
|
zIndex: "999999",
|
|
7993
|
+
"@media (max-width: 748px)": calendarMobileCentered,
|
|
7972
7994
|
variants: {
|
|
7973
7995
|
position: {
|
|
7974
7996
|
top: {
|
|
7975
7997
|
bottom: "110%",
|
|
7976
|
-
left: "0"
|
|
7998
|
+
left: "0",
|
|
7999
|
+
"@media (max-width: 748px)": calendarMobileCentered
|
|
7977
8000
|
},
|
|
7978
8001
|
bottom: {
|
|
7979
8002
|
top: "110%",
|
|
7980
|
-
left: "0"
|
|
8003
|
+
left: "0",
|
|
8004
|
+
"@media (max-width: 748px)": calendarMobileCentered
|
|
7981
8005
|
},
|
|
7982
8006
|
"top-right": {
|
|
7983
8007
|
bottom: "110%",
|
|
7984
|
-
right: "0"
|
|
8008
|
+
right: "0",
|
|
8009
|
+
"@media (max-width: 748px)": calendarMobileCentered
|
|
7985
8010
|
},
|
|
7986
8011
|
"bottom-right": {
|
|
7987
8012
|
top: "110%",
|
|
7988
|
-
right: "0"
|
|
8013
|
+
right: "0",
|
|
8014
|
+
"@media (max-width: 748px)": calendarMobileCentered
|
|
7989
8015
|
}
|
|
7990
8016
|
}
|
|
7991
8017
|
}
|
|
@@ -8463,60 +8489,63 @@ function Calendar(_a) {
|
|
|
8463
8489
|
console.warn("Data inv\xE1lida inserida no input:", masked);
|
|
8464
8490
|
}
|
|
8465
8491
|
};
|
|
8466
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.
|
|
8467
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
type: "button",
|
|
8472
|
-
onClick: () => setShowCalendar((prev) => !prev),
|
|
8473
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8474
|
-
TextField,
|
|
8475
|
-
{
|
|
8476
|
-
placeholder: "00/00/0000",
|
|
8477
|
-
type: "text",
|
|
8478
|
-
value: inputValue,
|
|
8479
|
-
onChange: handleInputChange,
|
|
8480
|
-
inputMode: "numeric",
|
|
8481
|
-
textAlign: "right",
|
|
8482
|
-
color: hasError ? "error" : "default",
|
|
8483
|
-
disabled,
|
|
8484
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon_default, { name: "calendar", size: "xl", color: "#4C4F54" }) })
|
|
8485
|
-
}
|
|
8486
|
-
)
|
|
8487
|
-
}
|
|
8488
|
-
),
|
|
8489
|
-
showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarContentStyled, { position, children: [
|
|
8490
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DayPickerWrapperStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8491
|
-
import_react_day_picker.DayPicker,
|
|
8492
|
-
{
|
|
8493
|
-
mode: "single",
|
|
8494
|
-
captionLayout: calendarLayout,
|
|
8495
|
-
selected,
|
|
8496
|
-
onSelect: setSelected,
|
|
8497
|
-
required: true,
|
|
8498
|
-
locale: ptBR,
|
|
8499
|
-
disabled: disabledDays.length > 0 ? disabledDays : void 0,
|
|
8500
|
-
startMonth: allowPastDates ? void 0 : today,
|
|
8501
|
-
endMonth: resolvedMaxDate
|
|
8502
|
-
}
|
|
8503
|
-
) }) }),
|
|
8504
|
-
action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { actionAlign, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8505
|
-
Button,
|
|
8492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
|
|
8493
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarOverlayStyled, { onClick: () => setShowCalendar(false) }),
|
|
8494
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
|
|
8495
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8496
|
+
CalendarButtonStyled,
|
|
8506
8497
|
{
|
|
8507
|
-
|
|
8508
|
-
color: "brand",
|
|
8498
|
+
expand,
|
|
8509
8499
|
type: "button",
|
|
8510
|
-
onClick: () =>
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8500
|
+
onClick: () => setShowCalendar((prev) => !prev),
|
|
8501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8502
|
+
TextField,
|
|
8503
|
+
{
|
|
8504
|
+
placeholder: "00/00/0000",
|
|
8505
|
+
type: "text",
|
|
8506
|
+
value: inputValue,
|
|
8507
|
+
onChange: handleInputChange,
|
|
8508
|
+
inputMode: "numeric",
|
|
8509
|
+
textAlign: "right",
|
|
8510
|
+
color: hasError ? "error" : "default",
|
|
8511
|
+
disabled,
|
|
8512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon_default, { name: "calendar", size: "xl", color: "#4C4F54" }) })
|
|
8513
|
+
}
|
|
8514
|
+
)
|
|
8516
8515
|
}
|
|
8517
|
-
)
|
|
8518
|
-
|
|
8519
|
-
|
|
8516
|
+
),
|
|
8517
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarContentStyled, { position, children: [
|
|
8518
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DayPickerWrapperStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8519
|
+
import_react_day_picker.DayPicker,
|
|
8520
|
+
{
|
|
8521
|
+
mode: "single",
|
|
8522
|
+
captionLayout: calendarLayout,
|
|
8523
|
+
selected,
|
|
8524
|
+
onSelect: setSelected,
|
|
8525
|
+
required: true,
|
|
8526
|
+
locale: ptBR,
|
|
8527
|
+
disabled: disabledDays.length > 0 ? disabledDays : void 0,
|
|
8528
|
+
startMonth: allowPastDates ? void 0 : today,
|
|
8529
|
+
endMonth: resolvedMaxDate
|
|
8530
|
+
}
|
|
8531
|
+
) }) }),
|
|
8532
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { actionAlign, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8533
|
+
Button,
|
|
8534
|
+
{
|
|
8535
|
+
variant: "text",
|
|
8536
|
+
color: "brand",
|
|
8537
|
+
type: "button",
|
|
8538
|
+
onClick: () => {
|
|
8539
|
+
setShowCalendar(false);
|
|
8540
|
+
},
|
|
8541
|
+
size: "medium",
|
|
8542
|
+
fontWeight: "medium",
|
|
8543
|
+
children: actionText != null ? actionText : "Aplicar"
|
|
8544
|
+
}
|
|
8545
|
+
) })
|
|
8546
|
+
] })
|
|
8547
|
+
] }))
|
|
8548
|
+
] });
|
|
8520
8549
|
}
|
|
8521
8550
|
|
|
8522
8551
|
// src/components/DoubleCalendar/index.tsx
|
|
@@ -8582,89 +8611,71 @@ function DoubleCalendar(_a) {
|
|
|
8582
8611
|
setEndValue("");
|
|
8583
8612
|
}
|
|
8584
8613
|
}, [selected]);
|
|
8585
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.
|
|
8586
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
type: "button",
|
|
8591
|
-
onClick: () => setShowCalendar((prev) => {
|
|
8592
|
-
const next = !prev;
|
|
8593
|
-
if (!prev) initialSelectedRef.current = selected;
|
|
8594
|
-
return next;
|
|
8595
|
-
}),
|
|
8596
|
-
disabled,
|
|
8597
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", gap: "8px", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8598
|
-
TextField,
|
|
8599
|
-
{
|
|
8600
|
-
placeholder: "00/00/0000 - 00/00/0000",
|
|
8601
|
-
type: "text",
|
|
8602
|
-
value: `${startValue || "00/00/0000"} - ${endValue || "00/00/0000"}`,
|
|
8603
|
-
readOnly: true,
|
|
8604
|
-
inputMode: "numeric",
|
|
8605
|
-
textAlign: "right",
|
|
8606
|
-
color: hasError ? "error" : "default",
|
|
8607
|
-
disabled,
|
|
8608
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon_default, { name: "calendar", size: "xl", color: "#4C4F54" }) })
|
|
8609
|
-
}
|
|
8610
|
-
) })
|
|
8611
|
-
}
|
|
8612
|
-
),
|
|
8613
|
-
showContainer && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarContentStyled, { position, children: [
|
|
8614
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DayPickerWrapperStyledToDoubleCalendar, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8615
|
-
import_react_day_picker2.DayPicker,
|
|
8614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
8615
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalendarOverlayStyled, { onClick: () => setShowCalendar(false) }),
|
|
8616
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
|
|
8617
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8618
|
+
CalendarButtonStyled,
|
|
8616
8619
|
{
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
disabled
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8620
|
+
expand,
|
|
8621
|
+
type: "button",
|
|
8622
|
+
onClick: () => setShowCalendar((prev) => {
|
|
8623
|
+
const next = !prev;
|
|
8624
|
+
if (!prev) initialSelectedRef.current = selected;
|
|
8625
|
+
return next;
|
|
8626
|
+
}),
|
|
8627
|
+
disabled,
|
|
8628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", gap: "8px", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8629
|
+
TextField,
|
|
8630
|
+
{
|
|
8631
|
+
placeholder: "00/00/0000 - 00/00/0000",
|
|
8632
|
+
type: "text",
|
|
8633
|
+
value: `${startValue || "00/00/0000"} - ${endValue || "00/00/0000"}`,
|
|
8634
|
+
readOnly: true,
|
|
8635
|
+
inputMode: "numeric",
|
|
8636
|
+
textAlign: "right",
|
|
8637
|
+
color: hasError ? "error" : "default",
|
|
8638
|
+
disabled,
|
|
8639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon_default, { name: "calendar", size: "xl", color: "#4C4F54" }) })
|
|
8640
|
+
}
|
|
8641
|
+
) })
|
|
8642
|
+
}
|
|
8643
|
+
),
|
|
8644
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarContentStyled, { position, children: [
|
|
8645
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DayPickerWrapperStyledToDoubleCalendar, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8646
|
+
import_react_day_picker2.DayPicker,
|
|
8633
8647
|
{
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
children: "Cancelar"
|
|
8648
|
+
mode: "range",
|
|
8649
|
+
numberOfMonths: 2,
|
|
8650
|
+
captionLayout: calendarLayout,
|
|
8651
|
+
selected,
|
|
8652
|
+
onSelect: setSelected,
|
|
8653
|
+
required: true,
|
|
8654
|
+
locale: ptBR,
|
|
8655
|
+
disabled: disabledDays.length > 0 ? disabledDays : void 0,
|
|
8656
|
+
fromMonth: allowPastDates ? void 0 : today,
|
|
8657
|
+
toMonth: resolvedMaxDate
|
|
8645
8658
|
}
|
|
8646
|
-
),
|
|
8647
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
style: { display: "flex", justifyContent: "center", padding: "1rem", width: "100%" },
|
|
8667
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8659
|
+
) }) }),
|
|
8660
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarFooterStyled, { children: [
|
|
8661
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { textAlign: "center", padding: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: `${(selected == null ? void 0 : selected.from) ? format2(selected.from, "dd/MM/yyyy") : "00/00/0000"} \u2014 ${(selected == null ? void 0 : selected.to) ? format2(selected.to, "dd/MM/yyyy") : "00/00/0000"}` }) }),
|
|
8662
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8663
|
+
Button,
|
|
8664
|
+
{
|
|
8665
|
+
style: { margin: "0 0.5rem" },
|
|
8666
|
+
variant: "text",
|
|
8667
|
+
color: "neutral",
|
|
8668
|
+
type: "button",
|
|
8669
|
+
onClick: () => {
|
|
8670
|
+
setSelected(initialSelectedRef.current);
|
|
8671
|
+
setShowCalendar(false);
|
|
8672
|
+
},
|
|
8673
|
+
size: "medium",
|
|
8674
|
+
fontWeight: "regular",
|
|
8675
|
+
children: "Cancelar"
|
|
8676
|
+
}
|
|
8677
|
+
),
|
|
8678
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8668
8679
|
Button,
|
|
8669
8680
|
{
|
|
8670
8681
|
style: { margin: "0 0.5rem" },
|
|
@@ -8679,10 +8690,31 @@ function DoubleCalendar(_a) {
|
|
|
8679
8690
|
children: actionText != null ? actionText : "Aplicar"
|
|
8680
8691
|
}
|
|
8681
8692
|
)
|
|
8682
|
-
}
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8693
|
+
] }),
|
|
8694
|
+
simpleAction && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8695
|
+
"div",
|
|
8696
|
+
{
|
|
8697
|
+
style: { display: "flex", justifyContent: "center", padding: "1rem", width: "100%" },
|
|
8698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8699
|
+
Button,
|
|
8700
|
+
{
|
|
8701
|
+
style: { margin: "0 0.5rem" },
|
|
8702
|
+
variant: "text",
|
|
8703
|
+
color: "brand",
|
|
8704
|
+
type: "button",
|
|
8705
|
+
onClick: () => {
|
|
8706
|
+
setShowCalendar(false);
|
|
8707
|
+
},
|
|
8708
|
+
size: "medium",
|
|
8709
|
+
fontWeight: "medium",
|
|
8710
|
+
children: actionText != null ? actionText : "Aplicar"
|
|
8711
|
+
}
|
|
8712
|
+
)
|
|
8713
|
+
}
|
|
8714
|
+
) })
|
|
8715
|
+
] })
|
|
8716
|
+
] }))
|
|
8717
|
+
] });
|
|
8686
8718
|
}
|
|
8687
8719
|
|
|
8688
8720
|
// src/components/Drawer/index.tsx
|