@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.
- package/dist/{chunk-2RTPRD3E.js → chunk-VW4GICIJ.js} +45 -46
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/rhf/index.js +1 -1
- package/package.json +1 -1
|
@@ -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 {
|
|
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 =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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:
|
|
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
package/dist/rhf/index.js
CHANGED