@lets-events/react 12.10.2 → 12.10.4

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.10.2 build
3
+ > @lets-events/react@12.10.4 build
4
4
  > tsup src/index.tsx --format esm,cjs --dts --external react
5
5
 
6
6
  CLI Building entry: src/index.tsx
@@ -10,12 +10,12 @@
10
10
  CLI Target: es6
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 426.31 KB
14
- CJS ⚡️ Build success in 356ms
15
- ESM dist/index.mjs 410.72 KB
16
- ESM ⚡️ Build success in 358ms
13
+ ESM dist/index.mjs 411.50 KB
14
+ ESM ⚡️ Build success in 519ms
15
+ CJS dist/index.js 427.16 KB
16
+ CJS ⚡️ Build success in 521ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 6877ms
19
- DTS dist/index.d.mts 404.95 KB
20
- DTS dist/index.d.ts 404.95 KB
18
+ DTS ⚡️ Build success in 9718ms
19
+ DTS dist/index.d.mts 404.99 KB
20
+ DTS dist/index.d.ts 404.99 KB
21
21
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.10.4
4
+
5
+ ### Patch Changes
6
+
7
+ - simpleAction prop
8
+
9
+ ## 12.10.3
10
+
11
+ ### Patch Changes
12
+
13
+ - fix
14
+
3
15
  ## 12.10.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -4743,6 +4743,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
4743
4743
  setSelected: React__default.Dispatch<React__default.SetStateAction<DateRange>>;
4744
4744
  position?: "top" | "bottom" | "top-right" | "bottom-right";
4745
4745
  action?: boolean;
4746
+ simpleAction?: boolean;
4746
4747
  actionText?: string;
4747
4748
  hasError?: boolean;
4748
4749
  expand?: boolean;
@@ -4751,7 +4752,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
4751
4752
  maxDate?: Date;
4752
4753
  disabled?: boolean;
4753
4754
  };
4754
- declare function DoubleCalendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
4755
+ declare function DoubleCalendar({ action, actionText, simpleAction, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
4755
4756
 
4756
4757
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
4757
4758
  open?: boolean | "false" | "true" | undefined;
package/dist/index.d.ts CHANGED
@@ -4743,6 +4743,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
4743
4743
  setSelected: React__default.Dispatch<React__default.SetStateAction<DateRange>>;
4744
4744
  position?: "top" | "bottom" | "top-right" | "bottom-right";
4745
4745
  action?: boolean;
4746
+ simpleAction?: boolean;
4746
4747
  actionText?: string;
4747
4748
  hasError?: boolean;
4748
4749
  expand?: boolean;
@@ -4751,7 +4752,7 @@ type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
4751
4752
  maxDate?: Date;
4752
4753
  disabled?: boolean;
4753
4754
  };
4754
- declare function DoubleCalendar({ action, actionText, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
4755
+ declare function DoubleCalendar({ action, actionText, simpleAction, calendarLayout, selected, setSelected, position, hasError, expand, allowPastDates, maxYearsFromNow, maxDate, disabled, ...props }: DoubleCalendarProps): react_jsx_runtime.JSX.Element;
4755
4756
 
4756
4757
  declare const DrawerOverlayStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
4757
4758
  open?: boolean | "false" | "true" | undefined;
package/dist/index.js CHANGED
@@ -8476,6 +8476,7 @@ function DoubleCalendar(_a) {
8476
8476
  var _b = _a, {
8477
8477
  action,
8478
8478
  actionText,
8479
+ simpleAction,
8479
8480
  calendarLayout,
8480
8481
  selected,
8481
8482
  setSelected,
@@ -8489,6 +8490,7 @@ function DoubleCalendar(_a) {
8489
8490
  } = _b, props = __objRest(_b, [
8490
8491
  "action",
8491
8492
  "actionText",
8493
+ "simpleAction",
8492
8494
  "calendarLayout",
8493
8495
  "selected",
8494
8496
  "setSelected",
@@ -8606,7 +8608,28 @@ function DoubleCalendar(_a) {
8606
8608
  children: actionText != null ? actionText : "Aplicar"
8607
8609
  }
8608
8610
  )
8609
- ] })
8611
+ ] }),
8612
+ simpleAction && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8613
+ "div",
8614
+ {
8615
+ style: { display: "flex", justifyContent: "center", padding: "1rem", width: "100%" },
8616
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8617
+ Button,
8618
+ {
8619
+ style: { margin: "0 0.5rem" },
8620
+ variant: "text",
8621
+ color: "brand",
8622
+ type: "button",
8623
+ onClick: () => {
8624
+ setShowCalendar(false);
8625
+ },
8626
+ size: "medium",
8627
+ fontWeight: "medium",
8628
+ children: actionText != null ? actionText : "Aplicar"
8629
+ }
8630
+ )
8631
+ }
8632
+ ) })
8610
8633
  ] })
8611
8634
  ] })) });
8612
8635
  }
@@ -8747,7 +8770,10 @@ function Drawer({
8747
8770
  css: {
8748
8771
  zIndex: zIndex + 1,
8749
8772
  width: width != null ? width : "34.25rem",
8750
- maxWidth: "100%"
8773
+ maxWidth: "100%",
8774
+ "@md": {
8775
+ width: "100%"
8776
+ }
8751
8777
  },
8752
8778
  open: isOpen,
8753
8779
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
package/dist/index.mjs CHANGED
@@ -8359,6 +8359,7 @@ function DoubleCalendar(_a) {
8359
8359
  var _b = _a, {
8360
8360
  action,
8361
8361
  actionText,
8362
+ simpleAction,
8362
8363
  calendarLayout,
8363
8364
  selected,
8364
8365
  setSelected,
@@ -8372,6 +8373,7 @@ function DoubleCalendar(_a) {
8372
8373
  } = _b, props = __objRest(_b, [
8373
8374
  "action",
8374
8375
  "actionText",
8376
+ "simpleAction",
8375
8377
  "calendarLayout",
8376
8378
  "selected",
8377
8379
  "setSelected",
@@ -8489,7 +8491,28 @@ function DoubleCalendar(_a) {
8489
8491
  children: actionText != null ? actionText : "Aplicar"
8490
8492
  }
8491
8493
  )
8492
- ] })
8494
+ ] }),
8495
+ simpleAction && /* @__PURE__ */ jsx16(CalendarFooterStyled, { children: /* @__PURE__ */ jsx16(
8496
+ "div",
8497
+ {
8498
+ style: { display: "flex", justifyContent: "center", padding: "1rem", width: "100%" },
8499
+ children: /* @__PURE__ */ jsx16(
8500
+ Button,
8501
+ {
8502
+ style: { margin: "0 0.5rem" },
8503
+ variant: "text",
8504
+ color: "brand",
8505
+ type: "button",
8506
+ onClick: () => {
8507
+ setShowCalendar(false);
8508
+ },
8509
+ size: "medium",
8510
+ fontWeight: "medium",
8511
+ children: actionText != null ? actionText : "Aplicar"
8512
+ }
8513
+ )
8514
+ }
8515
+ ) })
8493
8516
  ] })
8494
8517
  ] })) });
8495
8518
  }
@@ -8630,7 +8653,10 @@ function Drawer({
8630
8653
  css: {
8631
8654
  zIndex: zIndex + 1,
8632
8655
  width: width != null ? width : "34.25rem",
8633
- maxWidth: "100%"
8656
+ maxWidth: "100%",
8657
+ "@md": {
8658
+ width: "100%"
8659
+ }
8634
8660
  },
8635
8661
  open: isOpen,
8636
8662
  children: /* @__PURE__ */ jsxs9(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.10.2",
3
+ "version": "12.10.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -23,6 +23,7 @@ export type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
23
23
  setSelected: React.Dispatch<React.SetStateAction<DateRange>>;
24
24
  position?: "top" | "bottom" | "top-right" | "bottom-right";
25
25
  action?: boolean;
26
+ simpleAction?: boolean;
26
27
  actionText?: string;
27
28
  hasError?: boolean;
28
29
  expand?: boolean;
@@ -35,6 +36,7 @@ export type DoubleCalendarProps = ComponentProps<typeof CalendarStyled> & {
35
36
  export function DoubleCalendar({
36
37
  action,
37
38
  actionText,
39
+ simpleAction,
38
40
  calendarLayout,
39
41
  selected,
40
42
  setSelected,
@@ -172,6 +174,26 @@ export function DoubleCalendar({
172
174
  </Button>
173
175
  </CalendarFooterStyled>
174
176
  )}
177
+ {simpleAction && (
178
+ <CalendarFooterStyled>
179
+ <div
180
+ style={{ display: "flex", justifyContent: "center", padding: "1rem", width: "100%" }}>
181
+ <Button
182
+ style={{ margin: "0 0.5rem" }}
183
+ variant="text"
184
+ color="brand"
185
+ type="button"
186
+ onClick={() => {
187
+ setShowCalendar(false);
188
+ }}
189
+ size={"medium"}
190
+ fontWeight="medium"
191
+ >
192
+ {actionText ?? "Aplicar"}
193
+ </Button>
194
+ </div>
195
+ </CalendarFooterStyled>
196
+ )}
175
197
  </CalendarContentStyled>
176
198
  )}
177
199
  </CalendarStyled>
@@ -69,7 +69,10 @@ export function Drawer({
69
69
  css={{
70
70
  zIndex: zIndex + 1,
71
71
  width: width ?? "34.25rem",
72
- maxWidth: "100%"
72
+ maxWidth: "100%",
73
+ "@md": {
74
+ width: "100%",
75
+ }
73
76
  }}
74
77
  open={isOpen}
75
78
  >