@lets-events/react 12.10.7 → 12.10.9

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.9 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.69 KB
14
+ CJS ⚡️ Build success in 285ms
15
+ ESM dist/index.mjs 416.04 KB
16
+ ESM ⚡️ Build success in 286ms
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 6361ms
19
+ DTS dist/index.d.mts 405.36 KB
20
+ DTS dist/index.d.ts 405.36 KB
21
21
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.10.9
4
+
5
+ ### Patch Changes
6
+
7
+ - RadioGroupFormFieldProp
8
+
9
+ ## 12.10.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Drawer actionButton Prop
14
+
3
15
  ## 12.10.7
4
16
 
5
17
  ### 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;
@@ -15229,8 +15230,9 @@ type RadioGroupFormFieldProps = {
15229
15230
  color?: "blue" | "success" | "error";
15230
15231
  fontWeight?: "regular" | "medium" | "semibold" | "bold";
15231
15232
  disabled?: boolean;
15233
+ orientation?: 'horizontal' | 'vertical';
15232
15234
  };
15233
- declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
15235
+ declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, orientation, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
15234
15236
 
15235
15237
  type Option$1 = {
15236
15238
  label: string;
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;
@@ -15229,8 +15230,9 @@ type RadioGroupFormFieldProps = {
15229
15230
  color?: "blue" | "success" | "error";
15230
15231
  fontWeight?: "regular" | "medium" | "semibold" | "bold";
15231
15232
  disabled?: boolean;
15233
+ orientation?: 'horizontal' | 'vertical';
15232
15234
  };
15233
- declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
15235
+ declare const RadioGroupFormField: ({ name, label, options, required, defaultValue, validationErrorMessage, color, fontWeight, disabled, orientation, }: RadioGroupFormFieldProps) => react_jsx_runtime.JSX.Element;
15234
15236
 
15235
15237
  type Option$1 = {
15236
15238
  label: string;
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
  ]
@@ -11723,7 +11727,8 @@ var RadioGroupFormField = ({
11723
11727
  validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
11724
11728
  color = "blue",
11725
11729
  fontWeight = "regular",
11726
- disabled = false
11730
+ disabled = false,
11731
+ orientation = "vertical"
11727
11732
  }) => {
11728
11733
  const {
11729
11734
  control,
@@ -11760,7 +11765,7 @@ var RadioGroupFormField = ({
11760
11765
  color: haveError ? "error" : color,
11761
11766
  fontWeight,
11762
11767
  disabled,
11763
- 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)) })
11768
+ 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)) })
11764
11769
  }
11765
11770
  )
11766
11771
  }
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
  ]
@@ -11615,7 +11619,8 @@ var RadioGroupFormField = ({
11615
11619
  validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
11616
11620
  color = "blue",
11617
11621
  fontWeight = "regular",
11618
- disabled = false
11622
+ disabled = false,
11623
+ orientation = "vertical"
11619
11624
  }) => {
11620
11625
  const {
11621
11626
  control,
@@ -11652,7 +11657,7 @@ var RadioGroupFormField = ({
11652
11657
  color: haveError ? "error" : color,
11653
11658
  fontWeight,
11654
11659
  disabled,
11655
- 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)) })
11660
+ 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)) })
11656
11661
  }
11657
11662
  )
11658
11663
  }
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.9",
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>
@@ -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="column">
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>