@lets-events/react 12.11.4 → 12.11.5

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.11.4 build
3
+ > @lets-events/react@12.11.5 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 439.40 KB
14
- CJS ⚡️ Build success in 524ms
15
- ESM dist/index.mjs 423.28 KB
16
- ESM ⚡️ Build success in 525ms
13
+ ESM dist/index.mjs 423.54 KB
14
+ ESM ⚡️ Build success in -258293ms
15
+ CJS dist/index.js 439.68 KB
16
+ CJS ⚡️ Build success in -258292ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 11253ms
18
+ DTS ⚡️ Build success in 7027ms
19
19
  DTS dist/index.d.mts 411.19 KB
20
20
  DTS dist/index.d.ts 411.19 KB
21
21
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.11.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Drawer overflow
8
+
3
9
  ## 12.11.4
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -8721,12 +8721,20 @@ function DoubleCalendar(_a) {
8721
8721
  var import_react10 = require("react");
8722
8722
 
8723
8723
  // src/components/Drawer/styledComponents.ts
8724
- var DrawerOverlayStyled = styled("div", {
8724
+ var viewportHeight = {
8725
+ height: "100vh",
8726
+ minHeight: "100vh",
8727
+ "@supports (height: 100dvh)": {
8728
+ height: "100dvh",
8729
+ minHeight: "100dvh"
8730
+ }
8731
+ };
8732
+ var DrawerOverlayStyled = styled("div", __spreadProps(__spreadValues({
8725
8733
  position: "fixed",
8726
8734
  top: 0,
8727
8735
  right: 0,
8728
- width: "100vw",
8729
- height: "100dvh",
8736
+ width: "100vw"
8737
+ }, viewportHeight), {
8730
8738
  background: "rgba(0, 0, 0, 0.4)",
8731
8739
  transition: "opacity 200ms ease",
8732
8740
  variants: {
@@ -8740,48 +8748,44 @@ var DrawerOverlayStyled = styled("div", {
8740
8748
  }
8741
8749
  }
8742
8750
  }
8743
- });
8744
- var DrawerWrapper = styled("div", {
8751
+ }));
8752
+ var DrawerWrapper = styled("div", __spreadProps(__spreadValues({
8745
8753
  position: "fixed",
8746
8754
  top: 0,
8747
- right: 0,
8748
- height: "100dvh",
8749
- minHeight: "100vh",
8755
+ right: 0
8756
+ }, viewportHeight), {
8750
8757
  overflow: "hidden",
8758
+ transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
8751
8759
  variants: {
8752
8760
  open: {
8753
- true: {},
8761
+ true: {
8762
+ transform: "translateX(0) scale(1)"
8763
+ },
8754
8764
  false: {
8755
- pointerEvents: "none"
8765
+ pointerEvents: "none",
8766
+ transform: "translateX(110%) scale(0.98)"
8756
8767
  }
8757
8768
  }
8758
8769
  }
8759
- });
8770
+ }));
8760
8771
  var DrawerContainerStyled = styled("div", {
8761
- position: "absolute",
8762
- top: 0,
8763
- right: 0,
8764
- height: "100dvh",
8765
- minHeight: "100vh",
8772
+ width: "100%",
8773
+ height: "100%",
8766
8774
  background: "$neutral50",
8767
8775
  display: "flex",
8768
8776
  flexDirection: "column",
8769
8777
  boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
8778
+ overflow: "hidden",
8779
+ boxSizing: "border-box"
8780
+ });
8781
+ var DrawerBodyStyled = styled("div", {
8782
+ flex: 1,
8783
+ minHeight: 0,
8770
8784
  overflowY: "auto",
8771
- width: "100%",
8772
- boxSizing: "border-box",
8773
- transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
8774
- paddingBottom: "1.5rem",
8775
- variants: {
8776
- open: {
8777
- true: {
8778
- transform: "translateX(0) scale(1)"
8779
- },
8780
- false: {
8781
- transform: "translateX(110%) scale(0.98)"
8782
- }
8783
- }
8784
- }
8785
+ WebkitOverflowScrolling: "touch",
8786
+ touchAction: "pan-y",
8787
+ overscrollBehavior: "contain",
8788
+ paddingBottom: "1.5rem"
8785
8789
  });
8786
8790
  var DrawerHeaderDiv = styled("div", {
8787
8791
  display: "flex",
@@ -8789,7 +8793,8 @@ var DrawerHeaderDiv = styled("div", {
8789
8793
  alignItems: "center",
8790
8794
  borderBottom: "1px solid $neutral300",
8791
8795
  padding: "1.5rem 1rem",
8792
- position: "relative"
8796
+ position: "relative",
8797
+ flexShrink: 0
8793
8798
  });
8794
8799
  var DrawerHeaderTitle = styled("h2", {
8795
8800
  fontSize: "1.125rem",
@@ -8867,7 +8872,6 @@ function Drawer({
8867
8872
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
8868
8873
  DrawerContainerStyled,
8869
8874
  {
8870
- open: isOpen,
8871
8875
  css: {
8872
8876
  backgroundColor: colors[backgroundColor != null ? backgroundColor : "neutral50"]
8873
8877
  },
@@ -8888,7 +8892,7 @@ function Drawer({
8888
8892
  ] })
8889
8893
  ] })
8890
8894
  ] }),
8891
- isOpen ? children : null
8895
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerBodyStyled, { children }) : null
8892
8896
  ]
8893
8897
  }
8894
8898
  )
package/dist/index.mjs CHANGED
@@ -8604,12 +8604,20 @@ function DoubleCalendar(_a) {
8604
8604
  import { useEffect as useEffect5 } from "react";
8605
8605
 
8606
8606
  // src/components/Drawer/styledComponents.ts
8607
- var DrawerOverlayStyled = styled("div", {
8607
+ var viewportHeight = {
8608
+ height: "100vh",
8609
+ minHeight: "100vh",
8610
+ "@supports (height: 100dvh)": {
8611
+ height: "100dvh",
8612
+ minHeight: "100dvh"
8613
+ }
8614
+ };
8615
+ var DrawerOverlayStyled = styled("div", __spreadProps(__spreadValues({
8608
8616
  position: "fixed",
8609
8617
  top: 0,
8610
8618
  right: 0,
8611
- width: "100vw",
8612
- height: "100dvh",
8619
+ width: "100vw"
8620
+ }, viewportHeight), {
8613
8621
  background: "rgba(0, 0, 0, 0.4)",
8614
8622
  transition: "opacity 200ms ease",
8615
8623
  variants: {
@@ -8623,48 +8631,44 @@ var DrawerOverlayStyled = styled("div", {
8623
8631
  }
8624
8632
  }
8625
8633
  }
8626
- });
8627
- var DrawerWrapper = styled("div", {
8634
+ }));
8635
+ var DrawerWrapper = styled("div", __spreadProps(__spreadValues({
8628
8636
  position: "fixed",
8629
8637
  top: 0,
8630
- right: 0,
8631
- height: "100dvh",
8632
- minHeight: "100vh",
8638
+ right: 0
8639
+ }, viewportHeight), {
8633
8640
  overflow: "hidden",
8641
+ transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
8634
8642
  variants: {
8635
8643
  open: {
8636
- true: {},
8644
+ true: {
8645
+ transform: "translateX(0) scale(1)"
8646
+ },
8637
8647
  false: {
8638
- pointerEvents: "none"
8648
+ pointerEvents: "none",
8649
+ transform: "translateX(110%) scale(0.98)"
8639
8650
  }
8640
8651
  }
8641
8652
  }
8642
- });
8653
+ }));
8643
8654
  var DrawerContainerStyled = styled("div", {
8644
- position: "absolute",
8645
- top: 0,
8646
- right: 0,
8647
- height: "100dvh",
8648
- minHeight: "100vh",
8655
+ width: "100%",
8656
+ height: "100%",
8649
8657
  background: "$neutral50",
8650
8658
  display: "flex",
8651
8659
  flexDirection: "column",
8652
8660
  boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
8661
+ overflow: "hidden",
8662
+ boxSizing: "border-box"
8663
+ });
8664
+ var DrawerBodyStyled = styled("div", {
8665
+ flex: 1,
8666
+ minHeight: 0,
8653
8667
  overflowY: "auto",
8654
- width: "100%",
8655
- boxSizing: "border-box",
8656
- transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
8657
- paddingBottom: "1.5rem",
8658
- variants: {
8659
- open: {
8660
- true: {
8661
- transform: "translateX(0) scale(1)"
8662
- },
8663
- false: {
8664
- transform: "translateX(110%) scale(0.98)"
8665
- }
8666
- }
8667
- }
8668
+ WebkitOverflowScrolling: "touch",
8669
+ touchAction: "pan-y",
8670
+ overscrollBehavior: "contain",
8671
+ paddingBottom: "1.5rem"
8668
8672
  });
8669
8673
  var DrawerHeaderDiv = styled("div", {
8670
8674
  display: "flex",
@@ -8672,7 +8676,8 @@ var DrawerHeaderDiv = styled("div", {
8672
8676
  alignItems: "center",
8673
8677
  borderBottom: "1px solid $neutral300",
8674
8678
  padding: "1.5rem 1rem",
8675
- position: "relative"
8679
+ position: "relative",
8680
+ flexShrink: 0
8676
8681
  });
8677
8682
  var DrawerHeaderTitle = styled("h2", {
8678
8683
  fontSize: "1.125rem",
@@ -8750,7 +8755,6 @@ function Drawer({
8750
8755
  children: /* @__PURE__ */ jsxs9(
8751
8756
  DrawerContainerStyled,
8752
8757
  {
8753
- open: isOpen,
8754
8758
  css: {
8755
8759
  backgroundColor: colors[backgroundColor != null ? backgroundColor : "neutral50"]
8756
8760
  },
@@ -8771,7 +8775,7 @@ function Drawer({
8771
8775
  ] })
8772
8776
  ] })
8773
8777
  ] }),
8774
- isOpen ? children : null
8778
+ isOpen ? /* @__PURE__ */ jsx17(DrawerBodyStyled, { children }) : null
8775
8779
  ]
8776
8780
  }
8777
8781
  )
@@ -8781,7 +8785,7 @@ function Drawer({
8781
8785
  }
8782
8786
 
8783
8787
  // src/components/TimePicker.tsx
8784
- import { useCallback, useEffect as useEffect6, useRef as useRef6, useState as useState5 } from "react";
8788
+ import { useCallback, useEffect as useEffect6, useRef as useRef5, useState as useState5 } from "react";
8785
8789
  import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
8786
8790
  var TimePickerStyled = styled("div", {
8787
8791
  position: "relative",
@@ -8925,7 +8929,7 @@ function TimePicker({
8925
8929
  const [rawHours, setRawHours] = useState5("00");
8926
8930
  const [rawMinutes, setRawMinutes] = useState5("00");
8927
8931
  const [isOpen, setIsOpen] = useState5(false);
8928
- const dropdownRef = useRef6(null);
8932
+ const dropdownRef = useRef5(null);
8929
8933
  useOnClickOutside(dropdownRef, () => setIsOpen(false));
8930
8934
  useEffect6(() => {
8931
8935
  const { parsedHours, parsedMinutes } = parseTime(selected);
@@ -9668,7 +9672,7 @@ function Card(_a) {
9668
9672
 
9669
9673
  // src/components/TextareaField.tsx
9670
9674
  import { TextArea as TextAreaRadix } from "@radix-ui/themes";
9671
- import React9, { useRef as useRef7, useState as useState6, useEffect as useEffect7 } from "react";
9675
+ import React9, { useRef as useRef6, useState as useState6, useEffect as useEffect7 } from "react";
9672
9676
  import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
9673
9677
  var TextareaFieldStyle = styled(TextAreaRadix, {
9674
9678
  display: "flex",
@@ -9721,7 +9725,7 @@ var TextareaContainer = styled("div", {
9721
9725
  });
9722
9726
  var TextareaField = React9.forwardRef((_a, forwardedRef) => {
9723
9727
  var _b = _a, { maxLength, color, top = "-1.75rem" } = _b, props = __objRest(_b, ["maxLength", "color", "top"]);
9724
- const inputRef = useRef7(null);
9728
+ const inputRef = useRef6(null);
9725
9729
  const [remaining, setRemaining] = useState6(maxLength);
9726
9730
  useEffect7(() => {
9727
9731
  var _a2;
@@ -10081,7 +10085,7 @@ function Tooltip({
10081
10085
  }
10082
10086
 
10083
10087
  // src/components/MultiSelect/index.tsx
10084
- import React11, { useCallback as useCallback3, useRef as useRef9, useState as useState12 } from "react";
10088
+ import React11, { useCallback as useCallback3, useRef as useRef8, useState as useState12 } from "react";
10085
10089
  import { DropdownMenu as DropdownMenu4, Theme as Theme3 } from "@radix-ui/themes";
10086
10090
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
10087
10091
  import {
@@ -10295,7 +10299,7 @@ var MultiSelect = React11.forwardRef(
10295
10299
  helperTextAfterField = ""
10296
10300
  }, fowardedRef) => {
10297
10301
  const [isOpen, setIsOpen] = useState12(false);
10298
- const triggerRef = useRef9(null);
10302
+ const triggerRef = useRef8(null);
10299
10303
  const [allOptionsSelected, setAllOptionsSelected] = useState12(false);
10300
10304
  const isMobile = useMediaQuery(MOBILE_BREAKPOINT);
10301
10305
  const hasSections = !!(optionsBySection == null ? void 0 : optionsBySection.length);
@@ -12003,7 +12007,7 @@ import { useController as useController3 } from "react-hook-form";
12003
12007
  import { useEffect as useEffect12, useState as useState16 } from "react";
12004
12008
 
12005
12009
  // src/components/RichEditor/QuillComponent.tsx
12006
- import { useState as useState15, useRef as useRef10, useEffect as useEffect11, useCallback as useCallback5 } from "react";
12010
+ import { useState as useState15, useRef as useRef9, useEffect as useEffect11, useCallback as useCallback5 } from "react";
12007
12011
  import { useQuill } from "react-quilljs";
12008
12012
 
12009
12013
  // src/utils/uploadService.ts
@@ -13210,8 +13214,8 @@ var QuillComponent = ({
13210
13214
  const [videoUrl, setVideoUrl] = useState15("");
13211
13215
  const [showLinkModal, setShowLinkModal] = useState15(false);
13212
13216
  const [linkUrl, setLinkUrl] = useState15("");
13213
- const videoModalRef = useRef10(null);
13214
- const linkModalRef = useRef10(null);
13217
+ const videoModalRef = useRef9(null);
13218
+ const linkModalRef = useRef9(null);
13215
13219
  const { addToast, removeToast } = useToast();
13216
13220
  const formatHTML = (html) => {
13217
13221
  const parser = new DOMParser();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.11.4",
3
+ "version": "12.11.5",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -1,9 +1,10 @@
1
- import { ComponentProps, ReactNode, useEffect, useRef } from "react";
1
+ import { ComponentProps, ReactNode, useEffect } from "react";
2
2
  import { colors, Colors } from "@lets-events/tokens";
3
3
  import Icon from "../Icon";
4
4
  import {
5
5
  DrawerOverlayStyled,
6
6
  DrawerContainerStyled,
7
+ DrawerBodyStyled,
7
8
  DrawerHeaderDiv,
8
9
  DrawerHeaderTitle,
9
10
  DrawerHeaderCloseButton,
@@ -82,7 +83,6 @@ export function Drawer({
82
83
  open={isOpen}
83
84
  >
84
85
  <DrawerContainerStyled
85
- open={isOpen}
86
86
  css={{
87
87
  backgroundColor: colors[backgroundColor ?? "neutral50"],
88
88
  }}
@@ -105,7 +105,7 @@ export function Drawer({
105
105
  </DrawerHeaderCloseButton>
106
106
  </Flex>
107
107
  </DrawerHeaderDiv>
108
- {isOpen ? children : null}
108
+ {isOpen ? <DrawerBodyStyled>{children}</DrawerBodyStyled> : null}
109
109
  </DrawerContainerStyled>
110
110
  </DrawerWrapper>
111
111
  </>
@@ -1,13 +1,21 @@
1
1
  import { styled } from "../../styles";
2
2
 
3
+ const viewportHeight = {
4
+ height: "100vh",
5
+ minHeight: "100vh",
6
+ "@supports (height: 100dvh)": {
7
+ height: "100dvh",
8
+ minHeight: "100dvh",
9
+ },
10
+ };
11
+
3
12
  export const DrawerOverlayStyled = styled("div", {
4
13
  position: "fixed",
5
14
  top: 0,
6
15
  right: 0,
7
16
  width: "100vw",
8
- height: "100dvh",
17
+ ...viewportHeight,
9
18
  background: "rgba(0, 0, 0, 0.4)",
10
-
11
19
  transition: "opacity 200ms ease",
12
20
 
13
21
  variants: {
@@ -27,47 +35,42 @@ export const DrawerWrapper = styled("div", {
27
35
  position: "fixed",
28
36
  top: 0,
29
37
  right: 0,
30
- height: "100dvh",
31
- minHeight: "100vh",
38
+ ...viewportHeight,
32
39
  overflow: "hidden",
40
+ transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
33
41
 
34
42
  variants: {
35
43
  open: {
36
- true: {},
44
+ true: {
45
+ transform: "translateX(0) scale(1)",
46
+ },
37
47
  false: {
38
48
  pointerEvents: "none",
49
+ transform: "translateX(110%) scale(0.98)",
39
50
  },
40
51
  },
41
52
  },
42
53
  });
43
54
 
44
55
  export const DrawerContainerStyled = styled("div", {
45
- position: "absolute",
46
- top: 0,
47
- right: 0,
48
- height: "100dvh",
49
- minHeight: "100vh",
56
+ width: "100%",
57
+ height: "100%",
50
58
  background: "$neutral50",
51
59
  display: "flex",
52
60
  flexDirection: "column",
53
61
  boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
54
- overflowY: "auto",
55
- width: "100%",
56
- boxSizing: 'border-box',
57
- transition: "transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)",
62
+ overflow: "hidden",
63
+ boxSizing: "border-box",
64
+ });
58
65
 
66
+ export const DrawerBodyStyled = styled("div", {
67
+ flex: 1,
68
+ minHeight: 0,
69
+ overflowY: "auto",
70
+ WebkitOverflowScrolling: "touch",
71
+ touchAction: "pan-y",
72
+ overscrollBehavior: "contain",
59
73
  paddingBottom: "1.5rem",
60
-
61
- variants: {
62
- open: {
63
- true: {
64
- transform: "translateX(0) scale(1)",
65
- },
66
- false: {
67
- transform: "translateX(110%) scale(0.98)",
68
- },
69
- },
70
- },
71
74
  });
72
75
 
73
76
  export const DrawerHeaderDiv = styled("div", {
@@ -77,6 +80,7 @@ export const DrawerHeaderDiv = styled("div", {
77
80
  borderBottom: "1px solid $neutral300",
78
81
  padding: "1.5rem 1rem",
79
82
  position: "relative",
83
+ flexShrink: 0,
80
84
  });
81
85
 
82
86
  export const DrawerHeaderTitle = styled("h2", {
@@ -86,11 +90,13 @@ export const DrawerHeaderTitle = styled("h2", {
86
90
  color: "$dark800",
87
91
  margin: "0",
88
92
  });
93
+
89
94
  export const DrawerHeaderCloseButton = styled("button", {
90
95
  background: "none",
91
96
  border: "none",
92
97
  cursor: "pointer",
93
98
  });
99
+
94
100
  export const GoBackButtonStyled = styled("button", {
95
101
  background: "none",
96
102
  padding: "0",