@lets-events/react 12.10.7 → 12.10.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.10.7 build
3
+ > @lets-events/react@12.10.8 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
- ESM dist/index.mjs 415.81 KB
14
- ESM ⚡️ Build success in 569ms
15
- CJS dist/index.js 431.44 KB
16
- CJS ⚡️ Build success in 570ms
13
+ CJS dist/index.js 431.62 KB
14
+ CJS ⚡️ Build success in 301ms
15
+ ESM dist/index.mjs 415.97 KB
16
+ ESM ⚡️ Build success in 301ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 58622ms
19
- DTS dist/index.d.mts 405.26 KB
20
- DTS dist/index.d.ts 405.26 KB
18
+ DTS ⚡️ Build success in 6076ms
19
+ DTS dist/index.d.mts 405.30 KB
20
+ DTS dist/index.d.ts 405.30 KB
21
21
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.10.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Drawer actionButton Prop
8
+
3
9
  ## 12.10.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -5142,8 +5142,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5142
5142
  goBackAction?: () => void;
5143
5143
  zIndex?: number;
5144
5144
  clickOutsideAvailable?: boolean;
5145
+ actionButton?: ReactNode;
5145
5146
  };
5146
- declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, }: DrawerProps): react_jsx_runtime.JSX.Element;
5147
+ declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, }: DrawerProps): react_jsx_runtime.JSX.Element;
5147
5148
 
5148
5149
  declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
5149
5150
  expand?: boolean | "true" | undefined;
package/dist/index.d.ts CHANGED
@@ -5142,8 +5142,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5142
5142
  goBackAction?: () => void;
5143
5143
  zIndex?: number;
5144
5144
  clickOutsideAvailable?: boolean;
5145
+ actionButton?: ReactNode;
5145
5146
  };
5146
- declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, }: DrawerProps): react_jsx_runtime.JSX.Element;
5147
+ declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, }: DrawerProps): react_jsx_runtime.JSX.Element;
5147
5148
 
5148
5149
  declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
5149
5150
  expand?: boolean | "true" | undefined;
package/dist/index.js CHANGED
@@ -8770,7 +8770,8 @@ function Drawer({
8770
8770
  goBackIcon,
8771
8771
  goBackAction,
8772
8772
  zIndex = 1e3,
8773
- clickOutsideAvailable = true
8773
+ clickOutsideAvailable = true,
8774
+ actionButton = null
8774
8775
  }) {
8775
8776
  (0, import_react10.useEffect)(() => {
8776
8777
  if (isOpen) {
@@ -8822,7 +8823,10 @@ function Drawer({
8822
8823
  goBackIcon && goBackIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GoBackButtonStyled, { type: "button", onClick: goBackAction, children: goBackIcon }),
8823
8824
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerHeaderTitle, { children: title })
8824
8825
  ] }),
8825
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
8826
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Flex, { gap: 8, children: [
8827
+ actionButton && actionButton,
8828
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
8829
+ ] })
8826
8830
  ] }),
8827
8831
  isOpen ? children : null
8828
8832
  ]
package/dist/index.mjs CHANGED
@@ -8653,7 +8653,8 @@ function Drawer({
8653
8653
  goBackIcon,
8654
8654
  goBackAction,
8655
8655
  zIndex = 1e3,
8656
- clickOutsideAvailable = true
8656
+ clickOutsideAvailable = true,
8657
+ actionButton = null
8657
8658
  }) {
8658
8659
  useEffect5(() => {
8659
8660
  if (isOpen) {
@@ -8705,7 +8706,10 @@ function Drawer({
8705
8706
  goBackIcon && goBackIcon && /* @__PURE__ */ jsx17(GoBackButtonStyled, { type: "button", onClick: goBackAction, children: goBackIcon }),
8706
8707
  /* @__PURE__ */ jsx17(DrawerHeaderTitle, { children: title })
8707
8708
  ] }),
8708
- /* @__PURE__ */ jsx17(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ jsx17(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
8709
+ /* @__PURE__ */ jsxs9(Flex, { gap: 8, children: [
8710
+ actionButton && actionButton,
8711
+ /* @__PURE__ */ jsx17(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ jsx17(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
8712
+ ] })
8709
8713
  ] }),
8710
8714
  isOpen ? children : null
8711
8715
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.10.7",
3
+ "version": "12.10.8",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -24,6 +24,7 @@ export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
24
24
  goBackAction?: () => void;
25
25
  zIndex?: number;
26
26
  clickOutsideAvailable?: boolean;
27
+ actionButton?: ReactNode;
27
28
  };
28
29
 
29
30
  export function Drawer({
@@ -37,6 +38,7 @@ export function Drawer({
37
38
  goBackAction,
38
39
  zIndex = 1000,
39
40
  clickOutsideAvailable = true,
41
+ actionButton = null,
40
42
  }: DrawerProps) {
41
43
  useEffect(() => {
42
44
  if (isOpen) {
@@ -91,9 +93,12 @@ export function Drawer({
91
93
  )}
92
94
  <DrawerHeaderTitle>{title}</DrawerHeaderTitle>
93
95
  </Flex>
94
- <DrawerHeaderCloseButton onClick={onClose}>
95
- <Icon size={"xl"} color="$dark600" name="xmark" />
96
- </DrawerHeaderCloseButton>
96
+ <Flex gap={8}>
97
+ {actionButton && actionButton}
98
+ <DrawerHeaderCloseButton onClick={onClose}>
99
+ <Icon size={"xl"} color="$dark600" name="xmark" />
100
+ </DrawerHeaderCloseButton>
101
+ </Flex>
97
102
  </DrawerHeaderDiv>
98
103
  {isOpen ? children : null}
99
104
  </DrawerContainerStyled>