@lets-events/react 12.10.9 → 12.10.10
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 +11 -3
- package/dist/index.mjs +11 -3
- package/package.json +1 -1
- package/src/components/Drawer/index.tsx +9 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lets-events/react@12.10.
|
|
3
|
+
> @lets-events/react@12.10.10 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[32m416.44 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 505ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m432.14 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 506ms
|
|
17
17
|
DTS Build start
|
|
18
|
-
DTS ⚡️ Build success in
|
|
19
|
-
DTS dist/index.d.mts 405.
|
|
20
|
-
DTS dist/index.d.ts 405.
|
|
18
|
+
DTS ⚡️ Build success in 9886ms
|
|
19
|
+
DTS dist/index.d.mts 405.45 KB
|
|
20
|
+
DTS dist/index.d.ts 405.45 KB
|
|
21
21
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -5134,6 +5134,7 @@ declare const DrawerOverlayStyled: _stitches_react_types_styled_component.Styled
|
|
|
5134
5134
|
type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
5135
5135
|
isOpen: boolean;
|
|
5136
5136
|
onClose: () => void;
|
|
5137
|
+
closeAriaLabel?: string;
|
|
5137
5138
|
width?: string;
|
|
5138
5139
|
backgroundColor?: keyof Colors;
|
|
5139
5140
|
title: string;
|
|
@@ -5143,8 +5144,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5143
5144
|
zIndex?: number;
|
|
5144
5145
|
clickOutsideAvailable?: boolean;
|
|
5145
5146
|
actionButton?: ReactNode;
|
|
5147
|
+
goBackAriaLabel?: string;
|
|
5146
5148
|
};
|
|
5147
|
-
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
5149
|
+
declare function Drawer({ isOpen, onClose, closeAriaLabel, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, goBackAriaLabel, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
5148
5150
|
|
|
5149
5151
|
declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
5150
5152
|
expand?: boolean | "true" | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -5134,6 +5134,7 @@ declare const DrawerOverlayStyled: _stitches_react_types_styled_component.Styled
|
|
|
5134
5134
|
type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
5135
5135
|
isOpen: boolean;
|
|
5136
5136
|
onClose: () => void;
|
|
5137
|
+
closeAriaLabel?: string;
|
|
5137
5138
|
width?: string;
|
|
5138
5139
|
backgroundColor?: keyof Colors;
|
|
5139
5140
|
title: string;
|
|
@@ -5143,8 +5144,9 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
5143
5144
|
zIndex?: number;
|
|
5144
5145
|
clickOutsideAvailable?: boolean;
|
|
5145
5146
|
actionButton?: ReactNode;
|
|
5147
|
+
goBackAriaLabel?: string;
|
|
5146
5148
|
};
|
|
5147
|
-
declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
5149
|
+
declare function Drawer({ isOpen, onClose, closeAriaLabel, width, backgroundColor, title, children, goBackIcon, goBackAction, zIndex, clickOutsideAvailable, actionButton, goBackAriaLabel, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
5148
5150
|
|
|
5149
5151
|
declare const TimePickerStyled: _stitches_react_types_styled_component.StyledComponent<"div", {
|
|
5150
5152
|
expand?: boolean | "true" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -8763,6 +8763,7 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
8763
8763
|
function Drawer({
|
|
8764
8764
|
isOpen,
|
|
8765
8765
|
onClose,
|
|
8766
|
+
closeAriaLabel = "Fechar",
|
|
8766
8767
|
width,
|
|
8767
8768
|
backgroundColor,
|
|
8768
8769
|
title,
|
|
@@ -8771,7 +8772,8 @@ function Drawer({
|
|
|
8771
8772
|
goBackAction,
|
|
8772
8773
|
zIndex = 1e3,
|
|
8773
8774
|
clickOutsideAvailable = true,
|
|
8774
|
-
actionButton = null
|
|
8775
|
+
actionButton = null,
|
|
8776
|
+
goBackAriaLabel = "Voltar"
|
|
8775
8777
|
}) {
|
|
8776
8778
|
(0, import_react10.useEffect)(() => {
|
|
8777
8779
|
if (isOpen) {
|
|
@@ -8820,12 +8822,18 @@ function Drawer({
|
|
|
8820
8822
|
children: [
|
|
8821
8823
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerHeaderDiv, { children: [
|
|
8822
8824
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Flex, { gap: 8, align: "center", children: [
|
|
8823
|
-
goBackIcon &&
|
|
8825
|
+
goBackIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(GoBackButtonStyled, { type: "button", onClick: goBackAction, "aria-label": goBackAriaLabel, children: [
|
|
8826
|
+
goBackIcon,
|
|
8827
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "none" }, children: goBackAriaLabel })
|
|
8828
|
+
] }),
|
|
8824
8829
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerHeaderTitle, { children: title })
|
|
8825
8830
|
] }),
|
|
8826
8831
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Flex, { gap: 8, children: [
|
|
8827
8832
|
actionButton && actionButton,
|
|
8828
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerHeaderCloseButton, { onClick: onClose, "aria-label": closeAriaLabel, children: [
|
|
8834
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }),
|
|
8835
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "none" }, children: closeAriaLabel })
|
|
8836
|
+
] })
|
|
8829
8837
|
] })
|
|
8830
8838
|
] }),
|
|
8831
8839
|
isOpen ? children : null
|
package/dist/index.mjs
CHANGED
|
@@ -8646,6 +8646,7 @@ import { Fragment, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
8646
8646
|
function Drawer({
|
|
8647
8647
|
isOpen,
|
|
8648
8648
|
onClose,
|
|
8649
|
+
closeAriaLabel = "Fechar",
|
|
8649
8650
|
width,
|
|
8650
8651
|
backgroundColor,
|
|
8651
8652
|
title,
|
|
@@ -8654,7 +8655,8 @@ function Drawer({
|
|
|
8654
8655
|
goBackAction,
|
|
8655
8656
|
zIndex = 1e3,
|
|
8656
8657
|
clickOutsideAvailable = true,
|
|
8657
|
-
actionButton = null
|
|
8658
|
+
actionButton = null,
|
|
8659
|
+
goBackAriaLabel = "Voltar"
|
|
8658
8660
|
}) {
|
|
8659
8661
|
useEffect5(() => {
|
|
8660
8662
|
if (isOpen) {
|
|
@@ -8703,12 +8705,18 @@ function Drawer({
|
|
|
8703
8705
|
children: [
|
|
8704
8706
|
/* @__PURE__ */ jsxs9(DrawerHeaderDiv, { children: [
|
|
8705
8707
|
/* @__PURE__ */ jsxs9(Flex, { gap: 8, align: "center", children: [
|
|
8706
|
-
goBackIcon &&
|
|
8708
|
+
goBackIcon && /* @__PURE__ */ jsxs9(GoBackButtonStyled, { type: "button", onClick: goBackAction, "aria-label": goBackAriaLabel, children: [
|
|
8709
|
+
goBackIcon,
|
|
8710
|
+
/* @__PURE__ */ jsx17("span", { style: { display: "none" }, children: goBackAriaLabel })
|
|
8711
|
+
] }),
|
|
8707
8712
|
/* @__PURE__ */ jsx17(DrawerHeaderTitle, { children: title })
|
|
8708
8713
|
] }),
|
|
8709
8714
|
/* @__PURE__ */ jsxs9(Flex, { gap: 8, children: [
|
|
8710
8715
|
actionButton && actionButton,
|
|
8711
|
-
/* @__PURE__ */
|
|
8716
|
+
/* @__PURE__ */ jsxs9(DrawerHeaderCloseButton, { onClick: onClose, "aria-label": closeAriaLabel, children: [
|
|
8717
|
+
/* @__PURE__ */ jsx17(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }),
|
|
8718
|
+
/* @__PURE__ */ jsx17("span", { style: { display: "none" }, children: closeAriaLabel })
|
|
8719
|
+
] })
|
|
8712
8720
|
] })
|
|
8713
8721
|
] }),
|
|
8714
8722
|
isOpen ? children : null
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
GoBackButtonStyled,
|
|
11
11
|
DrawerWrapper,
|
|
12
12
|
} from "./styledComponents";
|
|
13
|
-
import { useOnClickOutside } from "../../hooks/useOnClickOutside";
|
|
14
13
|
import { Flex } from "../Flex";
|
|
15
14
|
|
|
16
15
|
export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
17
16
|
isOpen: boolean;
|
|
18
17
|
onClose: () => void;
|
|
18
|
+
closeAriaLabel?: string;
|
|
19
19
|
width?: string;
|
|
20
20
|
backgroundColor?: keyof Colors;
|
|
21
21
|
title: string;
|
|
@@ -25,11 +25,13 @@ export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
|
25
25
|
zIndex?: number;
|
|
26
26
|
clickOutsideAvailable?: boolean;
|
|
27
27
|
actionButton?: ReactNode;
|
|
28
|
+
goBackAriaLabel?: string;
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
export function Drawer({
|
|
31
32
|
isOpen,
|
|
32
33
|
onClose,
|
|
34
|
+
closeAriaLabel = "Fechar",
|
|
33
35
|
width,
|
|
34
36
|
backgroundColor,
|
|
35
37
|
title,
|
|
@@ -39,6 +41,7 @@ export function Drawer({
|
|
|
39
41
|
zIndex = 1000,
|
|
40
42
|
clickOutsideAvailable = true,
|
|
41
43
|
actionButton = null,
|
|
44
|
+
goBackAriaLabel = "Voltar",
|
|
42
45
|
}: DrawerProps) {
|
|
43
46
|
useEffect(() => {
|
|
44
47
|
if (isOpen) {
|
|
@@ -86,17 +89,19 @@ export function Drawer({
|
|
|
86
89
|
>
|
|
87
90
|
<DrawerHeaderDiv>
|
|
88
91
|
<Flex gap={8} align="center">
|
|
89
|
-
{goBackIcon &&
|
|
90
|
-
<GoBackButtonStyled type="button" onClick={goBackAction}>
|
|
92
|
+
{goBackIcon && (
|
|
93
|
+
<GoBackButtonStyled type="button" onClick={goBackAction} aria-label={goBackAriaLabel}>
|
|
91
94
|
{goBackIcon}
|
|
95
|
+
<span style={{ display: "none" }}>{goBackAriaLabel}</span>
|
|
92
96
|
</GoBackButtonStyled>
|
|
93
97
|
)}
|
|
94
98
|
<DrawerHeaderTitle>{title}</DrawerHeaderTitle>
|
|
95
99
|
</Flex>
|
|
96
100
|
<Flex gap={8}>
|
|
97
101
|
{actionButton && actionButton}
|
|
98
|
-
<DrawerHeaderCloseButton onClick={onClose}>
|
|
102
|
+
<DrawerHeaderCloseButton onClick={onClose} aria-label={closeAriaLabel}>
|
|
99
103
|
<Icon size={"xl"} color="$dark600" name="xmark" />
|
|
104
|
+
<span style={{ display: "none" }}>{closeAriaLabel}</span>
|
|
100
105
|
</DrawerHeaderCloseButton>
|
|
101
106
|
</Flex>
|
|
102
107
|
</DrawerHeaderDiv>
|