@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @lets-events/react@11.5.3 build
2
+ > @lets-events/react@11.5.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
- ESM dist\index.mjs 290.84 KB
12
- ESM ⚡️ Build success in 213ms
13
- CJS dist\index.js 301.02 KB
14
- CJS ⚡️ Build success in 214ms
11
+ ESM dist\index.mjs 290.94 KB
12
+ ESM ⚡️ Build success in 223ms
13
+ CJS dist\index.js 301.13 KB
14
+ CJS ⚡️ Build success in 223ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3966ms
17
- DTS dist\index.d.mts 388.27 KB
18
- DTS dist\index.d.ts 388.27 KB
16
+ DTS ⚡️ Build success in 3952ms
17
+ DTS dist\index.d.mts 388.25 KB
18
+ DTS dist\index.d.ts 388.25 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 11.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - add text-area-field props to form field
8
+
3
9
  ## 11.5.3
4
10
 
5
11
  ### Patch Changes
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, fieldProps, }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
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, fieldProps, }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
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
- name,
9655
- label,
9656
- required,
9657
- placeholder,
9658
- fieldProps
9659
- }) => {
9660
- var _a;
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 = (_a = errors[name]) == null ? void 0 : _a.message;
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({}, fieldProps), register(name, { required })), {
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
- name,
9563
- label,
9564
- required,
9565
- placeholder,
9566
- fieldProps
9567
- }) => {
9568
- var _a;
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 = (_a = errors[name]) == null ? void 0 : _a.message;
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({}, fieldProps), register(name, { required })), {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "11.5.3",
3
+ "version": "11.5.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -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
- fieldProps,
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
- {...fieldProps}
39
+ {...props}
41
40
  {...register(name, { required })}
42
41
  placeholder={placeholder}
43
42
  color={haveError ? "error" : "default"}