@alexandregme/zljs 1.13.0 → 1.13.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.
@@ -23,7 +23,7 @@ var FormProvider = ({
23
23
  import { useFormContext } from "react-hook-form";
24
24
 
25
25
  // core/forms/input/input.tsx
26
- import { forwardRef, useId } from "react";
26
+ import { useId } from "react";
27
27
 
28
28
  // core/forms/error/error.styles.ts
29
29
  import { tv } from "tailwind-variants";
@@ -54,51 +54,50 @@ var input = tv2({
54
54
 
55
55
  // core/forms/input/input.tsx
56
56
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
57
- var Input = forwardRef(
58
- ({
59
- label: labelText,
60
- "aria-label": ariaLabel,
61
- name,
62
- type = "text",
63
- placeholder,
64
- autoComplete,
65
- value,
66
- error: error2,
67
- disabled,
68
- required,
69
- onChange,
70
- onBlur,
71
- onKeyDown
72
- }, ref) => {
73
- const id = useId();
74
- const errorId = `${id}-error`;
75
- return /* @__PURE__ */ jsxs("div", { className: wrapper(), children: [
76
- labelText && /* @__PURE__ */ jsx3("label", { htmlFor: id, className: label(), children: labelText }),
77
- /* @__PURE__ */ jsx3(
78
- "input",
79
- {
80
- ref,
81
- id,
82
- name,
83
- type,
84
- placeholder,
85
- autoComplete,
86
- value,
87
- disabled,
88
- required,
89
- onChange,
90
- onBlur,
91
- onKeyDown,
92
- "aria-label": ariaLabel,
93
- "aria-invalid": error2 ? true : void 0,
94
- "aria-describedby": error2 ? errorId : void 0,
95
- className: input()
96
- }
97
- ),
98
- error2 && /* @__PURE__ */ jsx3(Error, { id: errorId, message: error2 })
99
- ] });
100
- }
101
- );
57
+ var Input = ({
58
+ label: labelText,
59
+ "aria-label": ariaLabel,
60
+ name,
61
+ type = "text",
62
+ placeholder,
63
+ autoComplete,
64
+ value,
65
+ error: error2,
66
+ disabled,
67
+ required,
68
+ onChange,
69
+ onBlur,
70
+ onKeyDown,
71
+ ref
72
+ }) => {
73
+ const id = useId();
74
+ const errorId = `${id}-error`;
75
+ return /* @__PURE__ */ jsxs("div", { className: wrapper(), children: [
76
+ labelText && /* @__PURE__ */ jsx3("label", { htmlFor: id, className: label(), children: labelText }),
77
+ /* @__PURE__ */ jsx3(
78
+ "input",
79
+ {
80
+ ref,
81
+ id,
82
+ name,
83
+ type,
84
+ placeholder,
85
+ autoComplete,
86
+ value,
87
+ disabled,
88
+ required,
89
+ onChange,
90
+ onBlur,
91
+ onKeyDown,
92
+ "aria-label": ariaLabel,
93
+ "aria-invalid": error2 ? true : void 0,
94
+ "aria-describedby": error2 ? errorId : void 0,
95
+ className: input()
96
+ }
97
+ ),
98
+ error2 && /* @__PURE__ */ jsx3(Error, { id: errorId, message: error2 })
99
+ ] });
100
+ };
102
101
 
103
102
  // core/rhf/form-input/form-input.tsx
104
103
  import { jsx as jsx4 } from "react/jsx-runtime";
package/dist/index.d.ts CHANGED
@@ -117,9 +117,10 @@ type InputProps = InputName & {
117
117
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
118
118
  onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
119
119
  onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
120
+ ref?: Ref<HTMLInputElement>;
120
121
  };
121
122
 
122
- declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
123
+ declare const Input: ({ label: labelText, "aria-label": ariaLabel, name, type, placeholder, autoComplete, value, error, disabled, required, onChange, onBlur, onKeyDown, ref, }: InputProps) => react.JSX.Element;
123
124
 
124
125
  type RadioName = {
125
126
  label: string;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  FormInput,
5
5
  FormProvider,
6
6
  Input
7
- } from "./chunk-2RTPRD3E.js";
7
+ } from "./chunk-VW4GICIJ.js";
8
8
 
9
9
  // core/icon/icon.tsx
10
10
  import * as LucideIcons from "lucide-react";
package/dist/rhf/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  FormInput,
4
4
  FormProvider
5
- } from "../chunk-2RTPRD3E.js";
5
+ } from "../chunk-VW4GICIJ.js";
6
6
  export {
7
7
  FormInput,
8
8
  FormProvider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandregme/zljs",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).",
5
5
  "keywords": [
6
6
  "react",