@lets-events/react 11.0.3 → 11.0.4

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,5 +1,5 @@
1
1
 
2
- > @lets-events/react@11.0.3 build
2
+ > @lets-events/react@11.0.4 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist\index.js 283.68 KB
12
- CJS ⚡️ Build success in 226ms
13
- ESM dist\index.mjs 275.33 KB
14
- ESM ⚡️ Build success in 226ms
11
+ ESM dist\index.mjs 275.57 KB
12
+ ESM ⚡️ Build success in 232ms
13
+ CJS dist\index.js 283.95 KB
14
+ CJS ⚡️ Build success in 232ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3664ms
17
- DTS dist\index.d.mts 338.36 KB
18
- DTS dist\index.d.ts 338.36 KB
16
+ DTS ⚡️ Build success in 3634ms
17
+ DTS dist\index.d.mts 338.33 KB
18
+ DTS dist\index.d.ts 338.33 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 11.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fix textfield ref
8
+
3
9
  ## 11.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2699,7 +2699,7 @@ type TextFieldSlotProps = Omit<ComponentProps<typeof TextFieldStyled>, "color">
2699
2699
  };
2700
2700
  declare const maskFormat: typeof format;
2701
2701
  declare const maskUnformat: typeof unformat;
2702
- declare const TextField: ({ children, isValid, name, color, typography, fontWeight, addon, textAlign, mask, ref, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
2702
+ declare const TextField: react__default.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & react__default.RefAttributes<HTMLInputElement>>;
2703
2703
  declare function TextFieldSlot({ children, position, onClick, typography, fontWeight, textAlign, ...props }: TextFieldSlotProps): react_jsx_runtime.JSX.Element;
2704
2704
 
2705
2705
  declare const RadioGroupStyled: _stitches_react_types_styled_component.StyledComponent<react.ForwardRefExoticComponent<RadioGroup$1.RootProps & react.RefAttributes<HTMLDivElement>>, {
package/dist/index.d.ts CHANGED
@@ -2699,7 +2699,7 @@ type TextFieldSlotProps = Omit<ComponentProps<typeof TextFieldStyled>, "color">
2699
2699
  };
2700
2700
  declare const maskFormat: typeof format;
2701
2701
  declare const maskUnformat: typeof unformat;
2702
- declare const TextField: ({ children, isValid, name, color, typography, fontWeight, addon, textAlign, mask, ref, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
2702
+ declare const TextField: react__default.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & react__default.RefAttributes<HTMLInputElement>>;
2703
2703
  declare function TextFieldSlot({ children, position, onClick, typography, fontWeight, textAlign, ...props }: TextFieldSlotProps): react_jsx_runtime.JSX.Element;
2704
2704
 
2705
2705
  declare const RadioGroupStyled: _stitches_react_types_styled_component.StyledComponent<react.ForwardRefExoticComponent<RadioGroup$1.RootProps & react.RefAttributes<HTMLDivElement>>, {
package/dist/index.js CHANGED
@@ -2472,6 +2472,7 @@ function Avatar(_a) {
2472
2472
  }
2473
2473
 
2474
2474
  // src/components/TextField.tsx
2475
+ var import_react2 = __toESM(require("react"));
2475
2476
  var import_themes7 = require("@radix-ui/themes");
2476
2477
 
2477
2478
  // src/components/Flex.tsx
@@ -2746,71 +2747,73 @@ var InputAddon = styled(TextStyle, {
2746
2747
  });
2747
2748
  var maskFormat = import_mask.format;
2748
2749
  var maskUnformat = import_mask.unformat;
2749
- var TextField = (_a) => {
2750
- var _b = _a, {
2751
- children,
2752
- isValid: isValid2,
2753
- name,
2754
- color,
2755
- typography,
2756
- fontWeight,
2757
- addon,
2758
- textAlign = "left",
2759
- mask,
2760
- ref
2761
- } = _b, props = __objRest(_b, [
2762
- "children",
2763
- "isValid",
2764
- "name",
2765
- "color",
2766
- "typography",
2767
- "fontWeight",
2768
- "addon",
2769
- "textAlign",
2770
- "mask",
2771
- "ref"
2772
- ]);
2773
- const maskRef = mask ? (0, import_mask.useMask)(mask) : void 0;
2774
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Flex2, { gap: "0", css: { width: "100%" }, children: [
2775
- !!addon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InputAddon, { typography: "labelSmall", children: addon }),
2776
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2777
- TextFieldStyled,
2778
- __spreadProps(__spreadValues({
2779
- color,
2780
- isValid: isValid2,
2781
- name,
2782
- typography,
2783
- fontWeight,
2784
- textAlign,
2785
- ref: (r) => {
2786
- if (!r) return;
2787
- if (maskRef) maskRef.current = r;
2788
- if (ref) {
2789
- if (typeof ref === "function") ref(r);
2790
- else ref.current = r;
2791
- }
2792
- }
2793
- }, props), {
2794
- style: addon ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" } : void 0,
2795
- children: [
2796
- children,
2797
- isValid2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2798
- TextFieldSlot,
2799
- {
2800
- position: "flex-end",
2801
- name,
2802
- color,
2803
- typography,
2804
- fontWeight,
2805
- textAlign,
2806
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name: "check" })
2750
+ var TextField = import_react2.default.forwardRef(
2751
+ (_a, fowardedRef) => {
2752
+ var _b = _a, {
2753
+ children,
2754
+ isValid: isValid2,
2755
+ name,
2756
+ color,
2757
+ typography,
2758
+ fontWeight,
2759
+ addon,
2760
+ textAlign = "left",
2761
+ mask
2762
+ } = _b, props = __objRest(_b, [
2763
+ "children",
2764
+ "isValid",
2765
+ "name",
2766
+ "color",
2767
+ "typography",
2768
+ "fontWeight",
2769
+ "addon",
2770
+ "textAlign",
2771
+ "mask"
2772
+ ]);
2773
+ const maskRef = mask ? (0, import_mask.useMask)(mask) : void 0;
2774
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Flex2, { gap: "0", css: { width: "100%" }, children: [
2775
+ !!addon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InputAddon, { typography: "labelSmall", children: addon }),
2776
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2777
+ TextFieldStyled,
2778
+ __spreadProps(__spreadValues({
2779
+ color,
2780
+ isValid: isValid2,
2781
+ name,
2782
+ typography,
2783
+ fontWeight,
2784
+ textAlign,
2785
+ ref: (r) => {
2786
+ if (!r) return;
2787
+ if (maskRef) maskRef.current = r;
2788
+ if (fowardedRef) {
2789
+ if (typeof fowardedRef === "function") fowardedRef(r);
2790
+ else {
2791
+ fowardedRef.current = r;
2792
+ }
2807
2793
  }
2808
- )
2809
- ]
2810
- })
2811
- )
2812
- ] });
2813
- };
2794
+ }
2795
+ }, props), {
2796
+ style: addon ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" } : void 0,
2797
+ children: [
2798
+ children,
2799
+ isValid2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2800
+ TextFieldSlot,
2801
+ {
2802
+ position: "flex-end",
2803
+ name,
2804
+ color,
2805
+ typography,
2806
+ fontWeight,
2807
+ textAlign,
2808
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name: "check" })
2809
+ }
2810
+ )
2811
+ ]
2812
+ })
2813
+ )
2814
+ ] });
2815
+ }
2816
+ );
2814
2817
  function TextFieldSlot(_a) {
2815
2818
  var _b = _a, {
2816
2819
  children,
@@ -3518,7 +3521,7 @@ function DropdownMenuItem(_a) {
3518
3521
  }
3519
3522
 
3520
3523
  // src/components/Badge.tsx
3521
- var import_react2 = __toESM(require("react"));
3524
+ var import_react3 = __toESM(require("react"));
3522
3525
  var import_themes12 = require("@radix-ui/themes");
3523
3526
  var import_jsx_runtime12 = require("react/jsx-runtime");
3524
3527
  var BadgeStyled = styled(import_themes12.Badge, {
@@ -3625,9 +3628,9 @@ var BadgeStyled = styled(import_themes12.Badge, {
3625
3628
  });
3626
3629
  function Badge(_a) {
3627
3630
  var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
3628
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeStyled, __spreadProps(__spreadValues({}, props), { children: import_react2.default.Children.map(children, (child) => {
3629
- if (import_react2.default.isValidElement(child)) {
3630
- return import_react2.default.cloneElement(child, { size: props.size });
3631
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeStyled, __spreadProps(__spreadValues({}, props), { children: import_react3.default.Children.map(children, (child) => {
3632
+ if (import_react3.default.isValidElement(child)) {
3633
+ return import_react3.default.cloneElement(child, { size: props.size });
3631
3634
  }
3632
3635
  return child;
3633
3636
  }) }));
@@ -3702,12 +3705,12 @@ function Modal(_a) {
3702
3705
  }
3703
3706
 
3704
3707
  // src/components/Calendar/index.tsx
3705
- var import_react4 = require("react");
3708
+ var import_react5 = require("react");
3706
3709
 
3707
3710
  // src/hooks/useOnClickOutside.tsx
3708
- var import_react3 = require("react");
3711
+ var import_react4 = require("react");
3709
3712
  function useOnClickOutside(ref, handler) {
3710
- (0, import_react3.useEffect)(() => {
3713
+ (0, import_react4.useEffect)(() => {
3711
3714
  const listener = (event) => {
3712
3715
  if (!ref.current || ref.current.contains(event.target)) {
3713
3716
  return;
@@ -7844,15 +7847,15 @@ function Calendar(_a) {
7844
7847
  "setSelected",
7845
7848
  "position"
7846
7849
  ]);
7847
- const [inputValue, setInputValue] = (0, import_react4.useState)("");
7848
- const [showContainer, setShowCalendar] = (0, import_react4.useState)(false);
7849
- const dropdownRef = (0, import_react4.useRef)(null);
7850
+ const [inputValue, setInputValue] = (0, import_react5.useState)("");
7851
+ const [showContainer, setShowCalendar] = (0, import_react5.useState)(false);
7852
+ const dropdownRef = (0, import_react5.useRef)(null);
7850
7853
  useOnClickOutside(dropdownRef, () => {
7851
7854
  setShowCalendar(false);
7852
7855
  });
7853
7856
  const today = /* @__PURE__ */ new Date();
7854
7857
  const maxDate = addYears(today, 20);
7855
- (0, import_react4.useEffect)(() => {
7858
+ (0, import_react5.useEffect)(() => {
7856
7859
  if (selected) {
7857
7860
  setInputValue(format2(selected, "dd/MM/yyyy"));
7858
7861
  } else {
@@ -7929,7 +7932,7 @@ function Calendar(_a) {
7929
7932
  }
7930
7933
 
7931
7934
  // src/components/TimePicker.tsx
7932
- var import_react5 = require("react");
7935
+ var import_react6 = require("react");
7933
7936
  var import_jsx_runtime15 = require("react/jsx-runtime");
7934
7937
  var TimePickerStyled = styled("div", {
7935
7938
  position: "relative",
@@ -8033,14 +8036,14 @@ function TimePicker({
8033
8036
  setSelected,
8034
8037
  position = "bottom"
8035
8038
  }) {
8036
- const [hours, setHours] = (0, import_react5.useState)("00");
8037
- const [minutes, setMinutes] = (0, import_react5.useState)("00");
8038
- const [rawHours, setRawHours] = (0, import_react5.useState)("00");
8039
- const [rawMinutes, setRawMinutes] = (0, import_react5.useState)("00");
8040
- const [isOpen, setIsOpen] = (0, import_react5.useState)(false);
8041
- const dropdownRef = (0, import_react5.useRef)(null);
8039
+ const [hours, setHours] = (0, import_react6.useState)("00");
8040
+ const [minutes, setMinutes] = (0, import_react6.useState)("00");
8041
+ const [rawHours, setRawHours] = (0, import_react6.useState)("00");
8042
+ const [rawMinutes, setRawMinutes] = (0, import_react6.useState)("00");
8043
+ const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
8044
+ const dropdownRef = (0, import_react6.useRef)(null);
8042
8045
  useOnClickOutside(dropdownRef, () => setIsOpen(false));
8043
- const handleIncrement = (0, import_react5.useCallback)(
8046
+ const handleIncrement = (0, import_react6.useCallback)(
8044
8047
  (type) => {
8045
8048
  if (type === "hours") {
8046
8049
  const next = (parseInt(hours) + 1) % 24;
@@ -8054,7 +8057,7 @@ function TimePicker({
8054
8057
  },
8055
8058
  [hours, minutes]
8056
8059
  );
8057
- const handleDecrement = (0, import_react5.useCallback)(
8060
+ const handleDecrement = (0, import_react6.useCallback)(
8058
8061
  (type) => {
8059
8062
  if (type === "hours") {
8060
8063
  const prev = (parseInt(hours) - 1 + 24) % 24;
@@ -8576,7 +8579,7 @@ function Switch(props) {
8576
8579
  }
8577
8580
 
8578
8581
  // src/components/Step.tsx
8579
- var import_react6 = __toESM(require("react"));
8582
+ var import_react7 = __toESM(require("react"));
8580
8583
  var import_themes16 = require("@radix-ui/themes");
8581
8584
  var import_jsx_runtime18 = require("react/jsx-runtime");
8582
8585
  var StepStyled = styled("div", {
@@ -8692,9 +8695,9 @@ function StepList(_a) {
8692
8695
  "children",
8693
8696
  "currentStep"
8694
8697
  ]);
8695
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StepListStyled, __spreadProps(__spreadValues({}, props), { children: import_react6.default.Children.map(children, (child) => {
8696
- if (import_react6.default.isValidElement(child) && child.type === StepTrigger) {
8697
- return import_react6.default.cloneElement(child, { currentStep });
8698
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StepListStyled, __spreadProps(__spreadValues({}, props), { children: import_react7.default.Children.map(children, (child) => {
8699
+ if (import_react7.default.isValidElement(child) && child.type === StepTrigger) {
8700
+ return import_react7.default.cloneElement(child, { currentStep });
8698
8701
  }
8699
8702
  return child;
8700
8703
  }) }));
@@ -8751,7 +8754,7 @@ function Card(_a) {
8751
8754
 
8752
8755
  // src/components/TextareaField.tsx
8753
8756
  var import_themes18 = require("@radix-ui/themes");
8754
- var import_react7 = require("react");
8757
+ var import_react8 = require("react");
8755
8758
  var import_jsx_runtime20 = require("react/jsx-runtime");
8756
8759
  var TextareaFieldStyle = styled(import_themes18.TextArea, {
8757
8760
  display: "flex",
@@ -8810,8 +8813,8 @@ var TextareaLimitIndicator = styled("div", {
8810
8813
  });
8811
8814
  function TextareaField(_a) {
8812
8815
  var _b = _a, { maxLength } = _b, props = __objRest(_b, ["maxLength"]);
8813
- const inputRef = (0, import_react7.useRef)(null);
8814
- const badgeRef = (0, import_react7.useRef)(null);
8816
+ const inputRef = (0, import_react8.useRef)(null);
8817
+ const badgeRef = (0, import_react8.useRef)(null);
8815
8818
  if (!maxLength) {
8816
8819
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextareaContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextareaFieldStyle, __spreadProps(__spreadValues({}, props), { ref: inputRef })) });
8817
8820
  }
@@ -8834,12 +8837,12 @@ function TextareaField(_a) {
8834
8837
  }
8835
8838
 
8836
8839
  // src/components/Toast/components/ToastItem.tsx
8837
- var import_react9 = require("react");
8840
+ var import_react10 = require("react");
8838
8841
 
8839
8842
  // src/components/Toast/styles/index.ts
8840
- var import_react8 = require("@stitches/react");
8843
+ var import_react9 = require("@stitches/react");
8841
8844
  var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
8842
- var slideIn = (0, import_react8.keyframes)({
8845
+ var slideIn = (0, import_react9.keyframes)({
8843
8846
  from: {
8844
8847
  transform: "translateX(calc(100% + 25px))",
8845
8848
  opacity: 0
@@ -8849,7 +8852,7 @@ var slideIn = (0, import_react8.keyframes)({
8849
8852
  opacity: 1
8850
8853
  }
8851
8854
  });
8852
- var slideOut = (0, import_react8.keyframes)({
8855
+ var slideOut = (0, import_react9.keyframes)({
8853
8856
  from: {
8854
8857
  transform: "translateX(0)",
8855
8858
  opacity: 1
@@ -8859,7 +8862,7 @@ var slideOut = (0, import_react8.keyframes)({
8859
8862
  opacity: 0
8860
8863
  }
8861
8864
  });
8862
- var swipeOut = (0, import_react8.keyframes)({
8865
+ var swipeOut = (0, import_react9.keyframes)({
8863
8866
  from: {
8864
8867
  transform: "translateX(var(--radix-toast-swipe-end-x))",
8865
8868
  opacity: 1
@@ -8965,7 +8968,7 @@ function ToastItem({
8965
8968
  toast,
8966
8969
  onRemove
8967
8970
  }) {
8968
- const [open, setOpen] = (0, import_react9.useState)(true);
8971
+ const [open, setOpen] = (0, import_react10.useState)(true);
8969
8972
  const handleOpenChange = (open2) => {
8970
8973
  setOpen(open2);
8971
8974
  if (!open2) {
@@ -8989,17 +8992,17 @@ function ToastItem({
8989
8992
  }
8990
8993
 
8991
8994
  // src/components/Toast/components/ToastProvider.tsx
8992
- var import_react10 = require("react");
8995
+ var import_react11 = require("react");
8993
8996
  var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
8994
8997
  var import_jsx_runtime22 = require("react/jsx-runtime");
8995
- var ToastContext = (0, import_react10.createContext)(null);
8998
+ var ToastContext = (0, import_react11.createContext)(null);
8996
8999
  function ToastProvider({
8997
9000
  children,
8998
9001
  defaultDuration = 5e3,
8999
9002
  maxToasts = 5,
9000
9003
  swipeDirection = "right"
9001
9004
  }) {
9002
- const [toasts, setToasts] = (0, import_react10.useState)([]);
9005
+ const [toasts, setToasts] = (0, import_react11.useState)([]);
9003
9006
  const addToast = (toastData) => {
9004
9007
  const id = Math.random().toString(36).substr(2, 9);
9005
9008
  const newToast = __spreadProps(__spreadValues({
@@ -9035,9 +9038,9 @@ function ToastProvider({
9035
9038
  }
9036
9039
 
9037
9040
  // src/components/Toast/hooks/useToast.ts
9038
- var import_react11 = require("react");
9041
+ var import_react12 = require("react");
9039
9042
  var useToast = () => {
9040
- const context = (0, import_react11.useContext)(ToastContext);
9043
+ const context = (0, import_react12.useContext)(ToastContext);
9041
9044
  if (!context) {
9042
9045
  throw new Error("useToast deve ser usado dentro de um ToastProvider");
9043
9046
  }
package/dist/index.mjs CHANGED
@@ -2386,6 +2386,7 @@ function Avatar(_a) {
2386
2386
  }
2387
2387
 
2388
2388
  // src/components/TextField.tsx
2389
+ import React from "react";
2389
2390
  import { TextField as TextFieldRadix } from "@radix-ui/themes";
2390
2391
 
2391
2392
  // src/components/Flex.tsx
@@ -2660,71 +2661,73 @@ var InputAddon = styled(TextStyle, {
2660
2661
  });
2661
2662
  var maskFormat = format;
2662
2663
  var maskUnformat = unformat;
2663
- var TextField = (_a) => {
2664
- var _b = _a, {
2665
- children,
2666
- isValid: isValid2,
2667
- name,
2668
- color,
2669
- typography,
2670
- fontWeight,
2671
- addon,
2672
- textAlign = "left",
2673
- mask,
2674
- ref
2675
- } = _b, props = __objRest(_b, [
2676
- "children",
2677
- "isValid",
2678
- "name",
2679
- "color",
2680
- "typography",
2681
- "fontWeight",
2682
- "addon",
2683
- "textAlign",
2684
- "mask",
2685
- "ref"
2686
- ]);
2687
- const maskRef = mask ? useMask(mask) : void 0;
2688
- return /* @__PURE__ */ jsxs(Flex2, { gap: "0", css: { width: "100%" }, children: [
2689
- !!addon && /* @__PURE__ */ jsx7(InputAddon, { typography: "labelSmall", children: addon }),
2690
- /* @__PURE__ */ jsxs(
2691
- TextFieldStyled,
2692
- __spreadProps(__spreadValues({
2693
- color,
2694
- isValid: isValid2,
2695
- name,
2696
- typography,
2697
- fontWeight,
2698
- textAlign,
2699
- ref: (r) => {
2700
- if (!r) return;
2701
- if (maskRef) maskRef.current = r;
2702
- if (ref) {
2703
- if (typeof ref === "function") ref(r);
2704
- else ref.current = r;
2705
- }
2706
- }
2707
- }, props), {
2708
- style: addon ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" } : void 0,
2709
- children: [
2710
- children,
2711
- isValid2 && /* @__PURE__ */ jsx7(
2712
- TextFieldSlot,
2713
- {
2714
- position: "flex-end",
2715
- name,
2716
- color,
2717
- typography,
2718
- fontWeight,
2719
- textAlign,
2720
- children: /* @__PURE__ */ jsx7(Icon_default, { name: "check" })
2664
+ var TextField = React.forwardRef(
2665
+ (_a, fowardedRef) => {
2666
+ var _b = _a, {
2667
+ children,
2668
+ isValid: isValid2,
2669
+ name,
2670
+ color,
2671
+ typography,
2672
+ fontWeight,
2673
+ addon,
2674
+ textAlign = "left",
2675
+ mask
2676
+ } = _b, props = __objRest(_b, [
2677
+ "children",
2678
+ "isValid",
2679
+ "name",
2680
+ "color",
2681
+ "typography",
2682
+ "fontWeight",
2683
+ "addon",
2684
+ "textAlign",
2685
+ "mask"
2686
+ ]);
2687
+ const maskRef = mask ? useMask(mask) : void 0;
2688
+ return /* @__PURE__ */ jsxs(Flex2, { gap: "0", css: { width: "100%" }, children: [
2689
+ !!addon && /* @__PURE__ */ jsx7(InputAddon, { typography: "labelSmall", children: addon }),
2690
+ /* @__PURE__ */ jsxs(
2691
+ TextFieldStyled,
2692
+ __spreadProps(__spreadValues({
2693
+ color,
2694
+ isValid: isValid2,
2695
+ name,
2696
+ typography,
2697
+ fontWeight,
2698
+ textAlign,
2699
+ ref: (r) => {
2700
+ if (!r) return;
2701
+ if (maskRef) maskRef.current = r;
2702
+ if (fowardedRef) {
2703
+ if (typeof fowardedRef === "function") fowardedRef(r);
2704
+ else {
2705
+ fowardedRef.current = r;
2706
+ }
2721
2707
  }
2722
- )
2723
- ]
2724
- })
2725
- )
2726
- ] });
2727
- };
2708
+ }
2709
+ }, props), {
2710
+ style: addon ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" } : void 0,
2711
+ children: [
2712
+ children,
2713
+ isValid2 && /* @__PURE__ */ jsx7(
2714
+ TextFieldSlot,
2715
+ {
2716
+ position: "flex-end",
2717
+ name,
2718
+ color,
2719
+ typography,
2720
+ fontWeight,
2721
+ textAlign,
2722
+ children: /* @__PURE__ */ jsx7(Icon_default, { name: "check" })
2723
+ }
2724
+ )
2725
+ ]
2726
+ })
2727
+ )
2728
+ ] });
2729
+ }
2730
+ );
2728
2731
  function TextFieldSlot(_a) {
2729
2732
  var _b = _a, {
2730
2733
  children,
@@ -3432,7 +3435,7 @@ function DropdownMenuItem(_a) {
3432
3435
  }
3433
3436
 
3434
3437
  // src/components/Badge.tsx
3435
- import React from "react";
3438
+ import React2 from "react";
3436
3439
  import { Badge as BadgeRadix } from "@radix-ui/themes";
3437
3440
  import { jsx as jsx12 } from "react/jsx-runtime";
3438
3441
  var BadgeStyled = styled(BadgeRadix, {
@@ -3539,9 +3542,9 @@ var BadgeStyled = styled(BadgeRadix, {
3539
3542
  });
3540
3543
  function Badge(_a) {
3541
3544
  var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
3542
- return /* @__PURE__ */ jsx12(BadgeStyled, __spreadProps(__spreadValues({}, props), { children: React.Children.map(children, (child) => {
3543
- if (React.isValidElement(child)) {
3544
- return React.cloneElement(child, { size: props.size });
3545
+ return /* @__PURE__ */ jsx12(BadgeStyled, __spreadProps(__spreadValues({}, props), { children: React2.Children.map(children, (child) => {
3546
+ if (React2.isValidElement(child)) {
3547
+ return React2.cloneElement(child, { size: props.size });
3545
3548
  }
3546
3549
  return child;
3547
3550
  }) }));
@@ -8490,7 +8493,7 @@ function Switch(props) {
8490
8493
  }
8491
8494
 
8492
8495
  // src/components/Step.tsx
8493
- import React4 from "react";
8496
+ import React5 from "react";
8494
8497
  import { Box as Box2, Tabs as StepRadix } from "@radix-ui/themes";
8495
8498
  import { jsx as jsx18 } from "react/jsx-runtime";
8496
8499
  var StepStyled = styled("div", {
@@ -8606,9 +8609,9 @@ function StepList(_a) {
8606
8609
  "children",
8607
8610
  "currentStep"
8608
8611
  ]);
8609
- return /* @__PURE__ */ jsx18(StepListStyled, __spreadProps(__spreadValues({}, props), { children: React4.Children.map(children, (child) => {
8610
- if (React4.isValidElement(child) && child.type === StepTrigger) {
8611
- return React4.cloneElement(child, { currentStep });
8612
+ return /* @__PURE__ */ jsx18(StepListStyled, __spreadProps(__spreadValues({}, props), { children: React5.Children.map(children, (child) => {
8613
+ if (React5.isValidElement(child) && child.type === StepTrigger) {
8614
+ return React5.cloneElement(child, { currentStep });
8612
8615
  }
8613
8616
  return child;
8614
8617
  }) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -202,64 +202,71 @@ const InputAddon = styled(TextStyle, {
202
202
  export const maskFormat = format;
203
203
  export const maskUnformat = unformat;
204
204
 
205
- export const TextField = ({
206
- children,
207
- isValid,
208
- name,
209
- color,
210
- typography,
211
- fontWeight,
212
- addon,
213
- textAlign = "left",
214
- mask,
215
- ref,
216
- ...props
217
- }: TextFieldProps) => {
218
- const maskRef = mask ? useMask(mask) : undefined;
205
+ export const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
206
+ (
207
+ {
208
+ children,
209
+ isValid,
210
+ name,
211
+ color,
212
+ typography,
213
+ fontWeight,
214
+ addon,
215
+ textAlign = "left",
216
+ mask,
217
+ ...props
218
+ },
219
+ fowardedRef
220
+ ) => {
221
+ const maskRef = mask ? useMask(mask) : undefined;
219
222
 
220
- return (
221
- <Flex gap={"0"} css={{ width: "100%" }}>
222
- {!!addon && <InputAddon typography="labelSmall">{addon}</InputAddon>}
223
+ return (
224
+ <Flex gap={"0"} css={{ width: "100%" }}>
225
+ {!!addon && <InputAddon typography="labelSmall">{addon}</InputAddon>}
223
226
 
224
- <TextFieldStyled
225
- color={color}
226
- isValid={isValid}
227
- name={name}
228
- typography={typography}
229
- fontWeight={fontWeight}
230
- textAlign={textAlign}
231
- ref={(r) => {
232
- if (!r) return;
233
- if (maskRef) maskRef.current = r;
234
- if (ref) {
235
- if (typeof ref === "function") ref(r);
236
- else ref.current = r;
227
+ <TextFieldStyled
228
+ color={color}
229
+ isValid={isValid}
230
+ name={name}
231
+ typography={typography}
232
+ fontWeight={fontWeight}
233
+ textAlign={textAlign}
234
+ ref={(r) => {
235
+ if (!r) return;
236
+ if (maskRef) maskRef.current = r;
237
+
238
+ if (fowardedRef) {
239
+ if (typeof fowardedRef === "function") fowardedRef(r);
240
+ else {
241
+ fowardedRef.current = r;
242
+ }
243
+ }
244
+ }}
245
+ {...props}
246
+ style={
247
+ addon
248
+ ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" }
249
+ : undefined
237
250
  }
238
- }}
239
- {...props}
240
- style={
241
- addon
242
- ? { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" }
243
- : undefined
244
- }
245
- >
246
- {children}
247
- {isValid && (
248
- <TextFieldSlot
249
- position="flex-end"
250
- name={name}
251
- color={color as TextFieldSlotProps["color"]}
252
- typography={typography}
253
- fontWeight={fontWeight}
254
- textAlign={textAlign}
255
- >
256
- <Icon name="check" />
257
- </TextFieldSlot>
258
- )}
259
- </TextFieldStyled>
260
- </Flex>
261
- );
262
- };
251
+ >
252
+ {children}
253
+ {isValid && (
254
+ <TextFieldSlot
255
+ position="flex-end"
256
+ name={name}
257
+ color={color as TextFieldSlotProps["color"]}
258
+ typography={typography}
259
+ fontWeight={fontWeight}
260
+ textAlign={textAlign}
261
+ >
262
+ <Icon name="check" />
263
+ </TextFieldSlot>
264
+ )}
265
+ </TextFieldStyled>
266
+ </Flex>
267
+ );
268
+ }
269
+ );
263
270
 
264
271
  export function TextFieldSlot({
265
272
  children,