@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.
Files changed (96) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +24 -21
  3. package/CHANGELOG.md +6 -0
  4. package/dist/index.js +171 -139
  5. package/dist/index.mjs +171 -139
  6. package/package.json +1 -1
  7. package/src/components/Alert.tsx +303 -303
  8. package/src/components/Avatar.tsx +55 -55
  9. package/src/components/Badge.tsx +132 -132
  10. package/src/components/Box.tsx +3 -3
  11. package/src/components/Button/index.tsx +85 -85
  12. package/src/components/Button/styledComponents.ts +361 -361
  13. package/src/components/ButtonGroup.tsx +484 -484
  14. package/src/components/Calendar/index.tsx +172 -168
  15. package/src/components/Calendar/styledComponents.ts +508 -480
  16. package/src/components/Card.tsx +74 -74
  17. package/src/components/CheckboxGroup.tsx +176 -176
  18. package/src/components/Container.tsx +39 -39
  19. package/src/components/Divider.tsx +7 -7
  20. package/src/components/DoubleCalendar/index.tsx +208 -204
  21. package/src/components/Drawer/index.tsx +113 -113
  22. package/src/components/Drawer/styledComponents.ts +97 -97
  23. package/src/components/Dropdown.tsx +302 -302
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +130 -130
  26. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  27. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  28. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  29. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  30. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  31. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  32. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  33. package/src/components/FormFields/CPFFormField.tsx +78 -78
  34. package/src/components/FormFields/CalendarFormField.tsx +98 -98
  35. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  36. package/src/components/FormFields/DateAndTimeFormField.tsx +217 -217
  37. package/src/components/FormFields/DoubleCalendarFormField.tsx +96 -96
  38. package/src/components/FormFields/EmailFormField.tsx +27 -27
  39. package/src/components/FormFields/Form.tsx +39 -39
  40. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
  41. package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
  42. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  43. package/src/components/FormFields/RadioGroupFormField.tsx +88 -88
  44. package/src/components/FormFields/RichEditorFormField.tsx +128 -128
  45. package/src/components/FormFields/SelectFormField.tsx +113 -113
  46. package/src/components/FormFields/SwitchFormField.tsx +46 -46
  47. package/src/components/FormFields/TextAreaFormField.tsx +61 -61
  48. package/src/components/FormFields/TextFormField.tsx +112 -112
  49. package/src/components/FormFields/TimePickerFormField.tsx +88 -88
  50. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  51. package/src/components/FormFields/subComponents/FormLabel.tsx +36 -36
  52. package/src/components/FormFields/utils/validation.ts +23 -23
  53. package/src/components/Grid.tsx +137 -137
  54. package/src/components/Icon.tsx +47 -47
  55. package/src/components/MenuDropdown/index.tsx +38 -38
  56. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  57. package/src/components/Modal.tsx +135 -135
  58. package/src/components/MultiSelect/index.tsx +418 -418
  59. package/src/components/MultiSelect/styledComponents.ts +176 -176
  60. package/src/components/RadioGroup.tsx +210 -210
  61. package/src/components/RichEditor/QuillComponent.tsx +419 -419
  62. package/src/components/RichEditor/RichEditor.tsx +53 -53
  63. package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
  64. package/src/components/RichEditor/editorConfig.ts +149 -149
  65. package/src/components/RichEditor/index.ts +3 -3
  66. package/src/components/RichEditor/styledComponents.ts +1175 -1175
  67. package/src/components/RichEditor/types.ts +12 -12
  68. package/src/components/Section.tsx +33 -33
  69. package/src/components/Step.tsx +164 -164
  70. package/src/components/Switch.tsx +108 -108
  71. package/src/components/Text.tsx +54 -54
  72. package/src/components/TextField.tsx +423 -423
  73. package/src/components/TextareaField.tsx +116 -116
  74. package/src/components/TimePicker.tsx +357 -357
  75. package/src/components/Toast/components/ToastItem.tsx +41 -41
  76. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  77. package/src/components/Toast/hooks/useToast.ts +12 -12
  78. package/src/components/Toast/index.tsx +5 -5
  79. package/src/components/Toast/styles/index.ts +135 -135
  80. package/src/components/Toast/types/index.ts +46 -46
  81. package/src/components/ToggleElement/index.tsx +58 -58
  82. package/src/components/Tooltip/index.tsx +126 -126
  83. package/src/components/Tooltip/styles.ts +77 -77
  84. package/src/hooks/useCountries.ts +41 -41
  85. package/src/hooks/useHasHover.ts +21 -21
  86. package/src/hooks/useImageUpload.ts +139 -139
  87. package/src/hooks/useMediaQuery.ts +19 -19
  88. package/src/hooks/useOnClickOutside.tsx +42 -42
  89. package/src/index.tsx +72 -72
  90. package/src/styles/index.ts +41 -41
  91. package/src/types/typographyValues.ts +178 -178
  92. package/src/utils/getNestedValue.ts +3 -3
  93. package/src/utils/states.ts +29 -29
  94. package/src/utils/uploadService.ts +180 -180
  95. package/tsconfig.json +3 -3
  96. 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
  }
@@ -1,21 +1,24 @@
1
-
2
-
3
- > @lets-events/react@12.11.2 build
4
- > tsup src/index.tsx --format esm,cjs --dts --external react
5
-
6
- CLI Building entry: src/index.tsx
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.5.0
9
- CLI Using tsup config: /home/bia3003/Lets/design-system/packages/react/tsup.config.ts
10
- CLI Target: es6
11
- ESM Build start
12
- CJS Build start
13
- CJS dist/index.js 438.04 KB
14
- CJS ⚡️ Build success in 304ms
15
- ESM dist/index.mjs 421.97 KB
16
- ESM ⚡️ Build success in 306ms
17
- DTS Build start
18
- DTS ⚡️ Build success in 6512ms
19
- DTS dist/index.d.mts 411.19 KB
20
- DTS dist/index.d.ts 411.19 KB
21
- ⠙
1
+
2
+ > @lets-events/react@12.11.3 build
3
+ > tsup src/index.tsx --format esm,cjs --dts --external react
4
+
5
+ CLI Building entry: src/index.tsx
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.0
8
+ CLI Using tsup config: C:\Users\Cazuza\Desktop\Web\design-system\packages\react\tsup.config.ts
9
+ CLI Target: es6
10
+ ESM Build start
11
+ CJS Build start
12
+ ESM dist\index.mjs 423.24 KB
13
+ ESM ⚡️ Build success in 1314ms
14
+ CJS dist\index.js 439.36 KB
15
+ CJS ⚡️ Build success in 1314ms
16
+ DTS Build start
17
+ DTS ⚡️ Build success in 7050ms
18
+ DTS dist\index.d.mts 411.19 KB
19
+ DTS dist\index.d.ts 411.19 KB
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
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - mobile calendar
8
+
3
9
  ## 12.11.2
4
10
 
5
11
  ### Patch Changes
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.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
8467
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8468
- CalendarButtonStyled,
8469
- {
8470
- expand,
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
- variant: "text",
8508
- color: "brand",
8498
+ expand,
8509
8499
  type: "button",
8510
- onClick: () => {
8511
- setShowCalendar(false);
8512
- },
8513
- size: "medium",
8514
- fontWeight: "medium",
8515
- children: actionText != null ? actionText : "Aplicar"
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.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
8586
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8587
- CalendarButtonStyled,
8588
- {
8589
- expand,
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
- mode: "range",
8618
- numberOfMonths: 2,
8619
- captionLayout: calendarLayout,
8620
- selected,
8621
- onSelect: setSelected,
8622
- required: true,
8623
- locale: ptBR,
8624
- disabled: disabledDays.length > 0 ? disabledDays : void 0,
8625
- fromMonth: allowPastDates ? void 0 : today,
8626
- toMonth: resolvedMaxDate
8627
- }
8628
- ) }) }),
8629
- action && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CalendarFooterStyled, { children: [
8630
- /* @__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"}` }) }),
8631
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8632
- Button,
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
- style: { margin: "0 0.5rem" },
8635
- variant: "text",
8636
- color: "neutral",
8637
- type: "button",
8638
- onClick: () => {
8639
- setSelected(initialSelectedRef.current);
8640
- setShowCalendar(false);
8641
- },
8642
- size: "medium",
8643
- fontWeight: "regular",
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.jsx)(
8648
- Button,
8649
- {
8650
- style: { margin: "0 0.5rem" },
8651
- variant: "text",
8652
- color: "brand",
8653
- type: "button",
8654
- onClick: () => {
8655
- setShowCalendar(false);
8656
- },
8657
- size: "medium",
8658
- fontWeight: "medium",
8659
- children: actionText != null ? actionText : "Aplicar"
8660
- }
8661
- )
8662
- ] }),
8663
- simpleAction && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8664
- "div",
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