@lets-events/react 12.2.0 → 12.2.1
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +14 -2
- package/dist/index.mjs +14 -2
- package/package.json +1 -1
- package/src/components/Drawer/index.tsx +10 -1
- package/src/components/Drawer/styledComponents.ts +6 -0
- package/src/components/MultiSelect/index.tsx +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lets-events/react@12.2.
|
|
3
|
+
> @lets-events/react@12.2.1 build
|
|
4
4
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
5
5
|
|
|
6
6
|
[1G[0K[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
[34mCLI[39m Target: es6
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m378.47 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 358ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m392.42 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 360ms
|
|
17
17
|
DTS Build start
|
|
18
|
-
DTS ⚡️ Build success in
|
|
19
|
-
DTS dist/index.d.mts
|
|
20
|
-
DTS dist/index.d.ts
|
|
18
|
+
DTS ⚡️ Build success in 7045ms
|
|
19
|
+
DTS dist/index.d.mts 389.04 KB
|
|
20
|
+
DTS dist/index.d.ts 389.04 KB
|
|
21
21
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -5054,8 +5054,10 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5054
5054
|
backgroundColor?: keyof Colors;
|
|
5055
5055
|
title: string;
|
|
5056
5056
|
children?: ReactNode;
|
|
5057
|
+
goBackIcon?: ReactNode;
|
|
5058
|
+
goBackAction: () => void;
|
|
5057
5059
|
};
|
|
5058
|
-
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5060
|
+
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5059
5061
|
|
|
5060
5062
|
declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
5061
5063
|
expand?: boolean | "true" | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -5054,8 +5054,10 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5054
5054
|
backgroundColor?: keyof Colors;
|
|
5055
5055
|
title: string;
|
|
5056
5056
|
children?: ReactNode;
|
|
5057
|
+
goBackIcon?: ReactNode;
|
|
5058
|
+
goBackAction: () => void;
|
|
5057
5059
|
};
|
|
5058
|
-
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5060
|
+
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
5059
5061
|
|
|
5060
5062
|
declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
5061
5063
|
expand?: boolean | "true" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -8112,6 +8112,12 @@ var DrawerHeaderCloseButton = styled("button", {
|
|
|
8112
8112
|
border: "none",
|
|
8113
8113
|
cursor: "pointer"
|
|
8114
8114
|
});
|
|
8115
|
+
var GoBackButtonStyled = styled("button", {
|
|
8116
|
+
background: "none",
|
|
8117
|
+
padding: "0",
|
|
8118
|
+
border: "none",
|
|
8119
|
+
cursor: "pointer"
|
|
8120
|
+
});
|
|
8115
8121
|
|
|
8116
8122
|
// src/components/Drawer/index.tsx
|
|
8117
8123
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
@@ -8121,7 +8127,9 @@ function Drawer({
|
|
|
8121
8127
|
width,
|
|
8122
8128
|
backgroundColor,
|
|
8123
8129
|
title,
|
|
8124
|
-
children
|
|
8130
|
+
children,
|
|
8131
|
+
goBackIcon,
|
|
8132
|
+
goBackAction
|
|
8125
8133
|
}) {
|
|
8126
8134
|
if (!isOpen) return null;
|
|
8127
8135
|
const drawerContainerRef = (0, import_react8.useRef)(null);
|
|
@@ -8175,7 +8183,10 @@ function Drawer({
|
|
|
8175
8183
|
},
|
|
8176
8184
|
children: [
|
|
8177
8185
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DrawerHeaderDiv, { children: [
|
|
8178
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.
|
|
8186
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Flex2, { gap: 8, children: [
|
|
8187
|
+
goBackIcon && goBackIcon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GoBackButtonStyled, { type: "button", onClick: goBackAction, children: goBackIcon }),
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerHeaderTitle, { children: title })
|
|
8189
|
+
] }),
|
|
8179
8190
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
|
|
8180
8191
|
] }),
|
|
8181
8192
|
children
|
|
@@ -9682,6 +9693,7 @@ var MultiSelect = import_react16.default.forwardRef(
|
|
|
9682
9693
|
{
|
|
9683
9694
|
css: itemStyle,
|
|
9684
9695
|
onClick: (e) => handleSelectAll(e),
|
|
9696
|
+
type: "button",
|
|
9685
9697
|
children: [
|
|
9686
9698
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: allOptionsSelected ? "checked" : "" }),
|
|
9687
9699
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: selectedAllText ? selectedAllText : "Selecionar Todos" })
|
package/dist/index.mjs
CHANGED
|
@@ -8001,6 +8001,12 @@ var DrawerHeaderCloseButton = styled("button", {
|
|
|
8001
8001
|
border: "none",
|
|
8002
8002
|
cursor: "pointer"
|
|
8003
8003
|
});
|
|
8004
|
+
var GoBackButtonStyled = styled("button", {
|
|
8005
|
+
background: "none",
|
|
8006
|
+
padding: "0",
|
|
8007
|
+
border: "none",
|
|
8008
|
+
cursor: "pointer"
|
|
8009
|
+
});
|
|
8004
8010
|
|
|
8005
8011
|
// src/components/Drawer/index.tsx
|
|
8006
8012
|
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -8010,7 +8016,9 @@ function Drawer({
|
|
|
8010
8016
|
width,
|
|
8011
8017
|
backgroundColor,
|
|
8012
8018
|
title,
|
|
8013
|
-
children
|
|
8019
|
+
children,
|
|
8020
|
+
goBackIcon,
|
|
8021
|
+
goBackAction
|
|
8014
8022
|
}) {
|
|
8015
8023
|
if (!isOpen) return null;
|
|
8016
8024
|
const drawerContainerRef = useRef4(null);
|
|
@@ -8064,7 +8072,10 @@ function Drawer({
|
|
|
8064
8072
|
},
|
|
8065
8073
|
children: [
|
|
8066
8074
|
/* @__PURE__ */ jsxs7(DrawerHeaderDiv, { children: [
|
|
8067
|
-
/* @__PURE__ */
|
|
8075
|
+
/* @__PURE__ */ jsxs7(Flex2, { gap: 8, children: [
|
|
8076
|
+
goBackIcon && goBackIcon && /* @__PURE__ */ jsx16(GoBackButtonStyled, { type: "button", onClick: goBackAction, children: goBackIcon }),
|
|
8077
|
+
/* @__PURE__ */ jsx16(DrawerHeaderTitle, { children: title })
|
|
8078
|
+
] }),
|
|
8068
8079
|
/* @__PURE__ */ jsx16(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ jsx16(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
|
|
8069
8080
|
] }),
|
|
8070
8081
|
children
|
|
@@ -9575,6 +9586,7 @@ var MultiSelect = React9.forwardRef(
|
|
|
9575
9586
|
{
|
|
9576
9587
|
css: itemStyle,
|
|
9577
9588
|
onClick: (e) => handleSelectAll(e),
|
|
9589
|
+
type: "button",
|
|
9578
9590
|
children: [
|
|
9579
9591
|
/* @__PURE__ */ jsx26("div", { className: allOptionsSelected ? "checked" : "" }),
|
|
9580
9592
|
/* @__PURE__ */ jsx26(Text, { typography: "labelSmall", children: selectedAllText ? selectedAllText : "Selecionar Todos" })
|
package/package.json
CHANGED
|
@@ -7,8 +7,10 @@ import {
|
|
|
7
7
|
DrawerHeaderDiv,
|
|
8
8
|
DrawerHeaderTitle,
|
|
9
9
|
DrawerHeaderCloseButton,
|
|
10
|
+
GoBackButtonStyled,
|
|
10
11
|
} from "./styledComponents";
|
|
11
12
|
import { useOnClickOutside } from "../../hooks/useOnClickOutside";
|
|
13
|
+
import { Flex } from "../Flex";
|
|
12
14
|
|
|
13
15
|
export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
14
16
|
isOpen: boolean;
|
|
@@ -17,6 +19,8 @@ export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
17
19
|
backgroundColor?: keyof Colors;
|
|
18
20
|
title: string;
|
|
19
21
|
children?: ReactNode;
|
|
22
|
+
goBackIcon?: ReactNode;
|
|
23
|
+
goBackAction: () => void;
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
export function Drawer({
|
|
@@ -26,6 +30,8 @@ export function Drawer({
|
|
|
26
30
|
backgroundColor,
|
|
27
31
|
title,
|
|
28
32
|
children,
|
|
33
|
+
goBackIcon,
|
|
34
|
+
goBackAction
|
|
29
35
|
}: DrawerProps) {
|
|
30
36
|
if (!isOpen) return null;
|
|
31
37
|
const drawerContainerRef = useRef<HTMLDivElement>(null);
|
|
@@ -117,7 +123,10 @@ export function Drawer({
|
|
|
117
123
|
}}
|
|
118
124
|
>
|
|
119
125
|
<DrawerHeaderDiv>
|
|
120
|
-
<
|
|
126
|
+
<Flex gap={8}>
|
|
127
|
+
{(goBackIcon && goBackIcon) && <GoBackButtonStyled type="button" onClick={goBackAction}>{goBackIcon}</GoBackButtonStyled>}
|
|
128
|
+
<DrawerHeaderTitle>{title}</DrawerHeaderTitle>
|
|
129
|
+
</Flex>
|
|
121
130
|
<DrawerHeaderCloseButton onClick={onClose}>
|
|
122
131
|
<Icon size={"xl"} color="$dark600" name="xmark" />
|
|
123
132
|
</DrawerHeaderCloseButton>
|
|
@@ -170,6 +170,7 @@ export const MultiSelect = React.forwardRef<HTMLDivElement, MultiSelectProps>(
|
|
|
170
170
|
<ButtonSelectAllStyled
|
|
171
171
|
css={itemStyle}
|
|
172
172
|
onClick={(e) => handleSelectAll(e)}
|
|
173
|
+
type="button"
|
|
173
174
|
>
|
|
174
175
|
<div className={allOptionsSelected ? "checked" : ""}></div>
|
|
175
176
|
<Text typography="labelSmall">
|