@lets-events/react 11.5.3 → 11.5.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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +15 -10
- package/dist/index.mjs +15 -10
- package/package.json +1 -1
- package/src/components/FormFields/TextAreaFormField.tsx +3 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@11.5.
|
|
2
|
+
> @lets-events/react@11.5.4 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m290.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist\index.js [22m[32m301.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m290.94 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 223ms
|
|
13
|
+
[32mCJS[39m [1mdist\index.js [22m[32m301.13 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 223ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist\index.d.mts [22m[32m388.
|
|
18
|
-
[32mDTS[39m [1mdist\index.d.ts [22m[32m388.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3952ms
|
|
17
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m388.25 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m388.25 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -14877,14 +14877,13 @@ type FormLabelProps = {
|
|
|
14877
14877
|
};
|
|
14878
14878
|
declare const FormLabel: ({ name, label, haveError, required, }: FormLabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
14879
14879
|
|
|
14880
|
-
type TextAreaFormFieldProps = {
|
|
14880
|
+
type TextAreaFormFieldProps = TextareaFieldProps & {
|
|
14881
14881
|
name: string;
|
|
14882
14882
|
label?: string;
|
|
14883
14883
|
required?: boolean;
|
|
14884
14884
|
placeholder?: string;
|
|
14885
|
-
fieldProps?: TextareaFieldProps;
|
|
14886
14885
|
};
|
|
14887
|
-
declare const TextAreaFormField: ({ name, label, required, placeholder,
|
|
14886
|
+
declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14888
14887
|
|
|
14889
14888
|
type TextFormFieldProps = {
|
|
14890
14889
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -14877,14 +14877,13 @@ type FormLabelProps = {
|
|
|
14877
14877
|
};
|
|
14878
14878
|
declare const FormLabel: ({ name, label, haveError, required, }: FormLabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
14879
14879
|
|
|
14880
|
-
type TextAreaFormFieldProps = {
|
|
14880
|
+
type TextAreaFormFieldProps = TextareaFieldProps & {
|
|
14881
14881
|
name: string;
|
|
14882
14882
|
label?: string;
|
|
14883
14883
|
required?: boolean;
|
|
14884
14884
|
placeholder?: string;
|
|
14885
|
-
fieldProps?: TextareaFieldProps;
|
|
14886
14885
|
};
|
|
14887
|
-
declare const TextAreaFormField: ({ name, label, required, placeholder,
|
|
14886
|
+
declare const TextAreaFormField: ({ name, label, required, placeholder, ...props }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
14888
14887
|
|
|
14889
14888
|
type TextFormFieldProps = {
|
|
14890
14889
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -9650,20 +9650,25 @@ var FormLabel = ({
|
|
|
9650
9650
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9651
9651
|
var import_react_hook_form = require("react-hook-form");
|
|
9652
9652
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
9653
|
-
var TextAreaFormField = ({
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
}
|
|
9660
|
-
|
|
9653
|
+
var TextAreaFormField = (_a) => {
|
|
9654
|
+
var _b = _a, {
|
|
9655
|
+
name,
|
|
9656
|
+
label,
|
|
9657
|
+
required,
|
|
9658
|
+
placeholder
|
|
9659
|
+
} = _b, props = __objRest(_b, [
|
|
9660
|
+
"name",
|
|
9661
|
+
"label",
|
|
9662
|
+
"required",
|
|
9663
|
+
"placeholder"
|
|
9664
|
+
]);
|
|
9665
|
+
var _a2;
|
|
9661
9666
|
const {
|
|
9662
9667
|
register,
|
|
9663
9668
|
formState: { errors }
|
|
9664
9669
|
} = (0, import_react_hook_form.useFormContext)();
|
|
9665
9670
|
const haveError = !!errors[name];
|
|
9666
|
-
const errorMsg = (
|
|
9671
|
+
const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
|
|
9667
9672
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
|
|
9668
9673
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9669
9674
|
FormLabel,
|
|
@@ -9676,7 +9681,7 @@ var TextAreaFormField = ({
|
|
|
9676
9681
|
),
|
|
9677
9682
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9678
9683
|
TextareaField,
|
|
9679
|
-
__spreadProps(__spreadValues(__spreadValues({},
|
|
9684
|
+
__spreadProps(__spreadValues(__spreadValues({}, props), register(name, { required })), {
|
|
9680
9685
|
placeholder,
|
|
9681
9686
|
color: haveError ? "error" : "default",
|
|
9682
9687
|
"aria-labelledby": `${name}-label`
|
package/dist/index.mjs
CHANGED
|
@@ -9558,20 +9558,25 @@ var FormLabel = ({
|
|
|
9558
9558
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9559
9559
|
import { useFormContext } from "react-hook-form";
|
|
9560
9560
|
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9561
|
-
var TextAreaFormField = ({
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
}
|
|
9568
|
-
|
|
9561
|
+
var TextAreaFormField = (_a) => {
|
|
9562
|
+
var _b = _a, {
|
|
9563
|
+
name,
|
|
9564
|
+
label,
|
|
9565
|
+
required,
|
|
9566
|
+
placeholder
|
|
9567
|
+
} = _b, props = __objRest(_b, [
|
|
9568
|
+
"name",
|
|
9569
|
+
"label",
|
|
9570
|
+
"required",
|
|
9571
|
+
"placeholder"
|
|
9572
|
+
]);
|
|
9573
|
+
var _a2;
|
|
9569
9574
|
const {
|
|
9570
9575
|
register,
|
|
9571
9576
|
formState: { errors }
|
|
9572
9577
|
} = useFormContext();
|
|
9573
9578
|
const haveError = !!errors[name];
|
|
9574
|
-
const errorMsg = (
|
|
9579
|
+
const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
|
|
9575
9580
|
return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
|
|
9576
9581
|
/* @__PURE__ */ jsx32(
|
|
9577
9582
|
FormLabel,
|
|
@@ -9584,7 +9589,7 @@ var TextAreaFormField = ({
|
|
|
9584
9589
|
),
|
|
9585
9590
|
/* @__PURE__ */ jsx32(
|
|
9586
9591
|
TextareaField,
|
|
9587
|
-
__spreadProps(__spreadValues(__spreadValues({},
|
|
9592
|
+
__spreadProps(__spreadValues(__spreadValues({}, props), register(name, { required })), {
|
|
9588
9593
|
placeholder,
|
|
9589
9594
|
color: haveError ? "error" : "default",
|
|
9590
9595
|
"aria-labelledby": `${name}-label`
|
package/package.json
CHANGED
|
@@ -4,12 +4,11 @@ import { FormLabel } from "./FormLabel";
|
|
|
4
4
|
import { ErrorFormMessage } from "./ErrorFormMessage";
|
|
5
5
|
import { TextareaField, TextareaFieldProps } from "../TextareaField";
|
|
6
6
|
|
|
7
|
-
export type TextAreaFormFieldProps = {
|
|
7
|
+
export type TextAreaFormFieldProps = TextareaFieldProps & {
|
|
8
8
|
name: string;
|
|
9
9
|
label?: string;
|
|
10
10
|
required?: boolean;
|
|
11
11
|
placeholder?: string;
|
|
12
|
-
fieldProps?: TextareaFieldProps;
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
export const TextAreaFormField = ({
|
|
@@ -17,7 +16,7 @@ export const TextAreaFormField = ({
|
|
|
17
16
|
label,
|
|
18
17
|
required,
|
|
19
18
|
placeholder,
|
|
20
|
-
|
|
19
|
+
...props
|
|
21
20
|
}: TextAreaFormFieldProps) => {
|
|
22
21
|
const {
|
|
23
22
|
register,
|
|
@@ -37,7 +36,7 @@ export const TextAreaFormField = ({
|
|
|
37
36
|
haveError={haveError}
|
|
38
37
|
/>
|
|
39
38
|
<TextareaField
|
|
40
|
-
{...
|
|
39
|
+
{...props}
|
|
41
40
|
{...register(name, { required })}
|
|
42
41
|
placeholder={placeholder}
|
|
43
42
|
color={haveError ? "error" : "default"}
|