@lets-events/react 12.10.8 → 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 +12 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +14 -5
- package/dist/index.mjs +14 -5
- package/package.json +1 -1
- package/src/components/Drawer/index.tsx +9 -4
- package/src/components/FormFields/RadioGroupFormField.tsx +3 -1
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;
|
|
@@ -15230,8 +15232,9 @@ type RadioGroupFormFieldProps = {
|
|
|
15230
15232
|
color?: "blue" | "success" | "error";
|
|
15231
15233
|
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
15232
15234
|
disabled?: boolean;
|
|
15235
|
+
orientation?: 'horizontal' | 'vertical';
|
|
15233
15236
|
};
|
|
15234
|
-
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15237
|
+
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, orientation, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15235
15238
|
|
|
15236
15239
|
type Option$1 = {
|
|
15237
15240
|
label: string;
|
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;
|
|
@@ -15230,8 +15232,9 @@ type RadioGroupFormFieldProps = {
|
|
|
15230
15232
|
color?: "blue" | "success" | "error";
|
|
15231
15233
|
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
15232
15234
|
disabled?: boolean;
|
|
15235
|
+
orientation?: 'horizontal' | 'vertical';
|
|
15233
15236
|
};
|
|
15234
|
-
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15237
|
+
declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, orientation, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15235
15238
|
|
|
15236
15239
|
type Option$1 = {
|
|
15237
15240
|
label: string;
|
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
|
|
@@ -11727,7 +11735,8 @@ var RadioGroupFormField = ({
|
|
|
11727
11735
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
11728
11736
|
color = "blue",
|
|
11729
11737
|
fontWeight = "regular",
|
|
11730
|
-
disabled = false
|
|
11738
|
+
disabled = false,
|
|
11739
|
+
orientation = "vertical"
|
|
11731
11740
|
}) => {
|
|
11732
11741
|
const {
|
|
11733
11742
|
control,
|
|
@@ -11764,7 +11773,7 @@ var RadioGroupFormField = ({
|
|
|
11764
11773
|
color: haveError ? "error" : color,
|
|
11765
11774
|
fontWeight,
|
|
11766
11775
|
disabled,
|
|
11767
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Flex, { direction: "column", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioItem, { value: option.value, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { typography: "labelSmall", children: option.label }) }, option.value)) })
|
|
11776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Flex, { direction: orientation === "horizontal" ? "row" : "column", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioItem, { value: option.value, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { typography: "labelSmall", children: option.label }) }, option.value)) })
|
|
11768
11777
|
}
|
|
11769
11778
|
)
|
|
11770
11779
|
}
|
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
|
|
@@ -11619,7 +11627,8 @@ var RadioGroupFormField = ({
|
|
|
11619
11627
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
11620
11628
|
color = "blue",
|
|
11621
11629
|
fontWeight = "regular",
|
|
11622
|
-
disabled = false
|
|
11630
|
+
disabled = false,
|
|
11631
|
+
orientation = "vertical"
|
|
11623
11632
|
}) => {
|
|
11624
11633
|
const {
|
|
11625
11634
|
control,
|
|
@@ -11656,7 +11665,7 @@ var RadioGroupFormField = ({
|
|
|
11656
11665
|
color: haveError ? "error" : color,
|
|
11657
11666
|
fontWeight,
|
|
11658
11667
|
disabled,
|
|
11659
|
-
children: /* @__PURE__ */ jsx49(Flex, { direction: "column", children: options.map((option) => /* @__PURE__ */ jsx49(RadioItem, { value: option.value, children: /* @__PURE__ */ jsx49(Text, { typography: "labelSmall", children: option.label }) }, option.value)) })
|
|
11668
|
+
children: /* @__PURE__ */ jsx49(Flex, { direction: orientation === "horizontal" ? "row" : "column", children: options.map((option) => /* @__PURE__ */ jsx49(RadioItem, { value: option.value, children: /* @__PURE__ */ jsx49(Text, { typography: "labelSmall", children: option.label }) }, option.value)) })
|
|
11660
11669
|
}
|
|
11661
11670
|
)
|
|
11662
11671
|
}
|
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>
|
|
@@ -21,6 +21,7 @@ export type RadioGroupFormFieldProps = {
|
|
|
21
21
|
color?: "blue" | "success" | "error";
|
|
22
22
|
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
23
23
|
disabled?: boolean;
|
|
24
|
+
orientation?: 'horizontal' | 'vertical';
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const RadioGroupFormField = ({
|
|
@@ -33,6 +34,7 @@ export const RadioGroupFormField = ({
|
|
|
33
34
|
color = "blue",
|
|
34
35
|
fontWeight = "regular",
|
|
35
36
|
disabled = false,
|
|
37
|
+
orientation = 'vertical',
|
|
36
38
|
}: RadioGroupFormFieldProps) => {
|
|
37
39
|
const {
|
|
38
40
|
control,
|
|
@@ -69,7 +71,7 @@ export const RadioGroupFormField = ({
|
|
|
69
71
|
fontWeight={fontWeight}
|
|
70
72
|
disabled={disabled}
|
|
71
73
|
>
|
|
72
|
-
<Flex direction=
|
|
74
|
+
<Flex direction={orientation === 'horizontal' ? 'row' : 'column'}>
|
|
73
75
|
{options.map((option) => (
|
|
74
76
|
<RadioItem key={option.value} value={option.value}>
|
|
75
77
|
<Text typography={"labelSmall"}>{option.label}</Text>
|