@sikka/hawa 0.27.20-next → 0.27.21-next
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/blocks/index.d.mts +2 -2
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/index.js +9 -7
- package/dist/blocks/index.mjs +9 -7
- package/dist/blocks/misc/index.d.mts +2 -2
- package/dist/blocks/misc/index.d.ts +2 -2
- package/dist/blocks/misc/index.js +9 -7
- package/dist/blocks/misc/index.mjs +9 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -7
- package/dist/index.mjs +9 -7
- package/package.json +1 -1
package/dist/blocks/index.d.mts
CHANGED
@@ -353,14 +353,14 @@ type ContactFormProps = {
|
|
353
353
|
formId?: string;
|
354
354
|
formAutoComplete?: "on" | "off";
|
355
355
|
size?: "sm" | "default";
|
356
|
-
onSubmit
|
356
|
+
onSubmit: (e: ContactFormData) => void;
|
357
|
+
customFields?: CustomField[];
|
357
358
|
texts?: {
|
358
359
|
submit: string;
|
359
360
|
name: TextInputType;
|
360
361
|
email: TextInputType;
|
361
362
|
message: TextInputType;
|
362
363
|
};
|
363
|
-
customFields?: CustomField[];
|
364
364
|
};
|
365
365
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
366
366
|
|
package/dist/blocks/index.d.ts
CHANGED
@@ -353,14 +353,14 @@ type ContactFormProps = {
|
|
353
353
|
formId?: string;
|
354
354
|
formAutoComplete?: "on" | "off";
|
355
355
|
size?: "sm" | "default";
|
356
|
-
onSubmit
|
356
|
+
onSubmit: (e: ContactFormData) => void;
|
357
|
+
customFields?: CustomField[];
|
357
358
|
texts?: {
|
358
359
|
submit: string;
|
359
360
|
name: TextInputType;
|
360
361
|
email: TextInputType;
|
361
362
|
message: TextInputType;
|
362
363
|
};
|
363
|
-
customFields?: CustomField[];
|
364
364
|
};
|
365
365
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
366
366
|
|
package/dist/blocks/index.js
CHANGED
@@ -5594,7 +5594,7 @@ var ContactForm = ({
|
|
5594
5594
|
size = "default",
|
5595
5595
|
texts,
|
5596
5596
|
formId,
|
5597
|
-
formAutoComplete,
|
5597
|
+
formAutoComplete = "off",
|
5598
5598
|
onSubmit,
|
5599
5599
|
customFields
|
5600
5600
|
}) => {
|
@@ -5621,9 +5621,11 @@ var ContactForm = ({
|
|
5621
5621
|
)
|
5622
5622
|
});
|
5623
5623
|
const contactFormSchema = z8.object({
|
5624
|
-
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
5625
|
-
email: z8.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
5626
|
-
message: z8.string({
|
5624
|
+
name: z8.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
5625
|
+
email: z8.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
5626
|
+
message: z8.string({
|
5627
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
5628
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
5627
5629
|
});
|
5628
5630
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
5629
5631
|
(acc, curr) => {
|
@@ -5694,7 +5696,7 @@ var ContactForm = ({
|
|
5694
5696
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5695
5697
|
Input,
|
5696
5698
|
{
|
5697
|
-
label: texts == null ? void 0 : texts.name.label,
|
5699
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
5698
5700
|
id: texts == null ? void 0 : texts.name.label,
|
5699
5701
|
...field,
|
5700
5702
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -5714,7 +5716,7 @@ var ContactForm = ({
|
|
5714
5716
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5715
5717
|
Input,
|
5716
5718
|
{
|
5717
|
-
label: texts == null ? void 0 : texts.email.label,
|
5719
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
5718
5720
|
id: texts == null ? void 0 : texts.email.label,
|
5719
5721
|
...field,
|
5720
5722
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -5774,7 +5776,7 @@ var ContactForm = ({
|
|
5774
5776
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5775
5777
|
Textarea,
|
5776
5778
|
{
|
5777
|
-
label: texts == null ? void 0 : texts.message.label,
|
5779
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
5778
5780
|
id: texts == null ? void 0 : texts.message.label,
|
5779
5781
|
textareaProps: {
|
5780
5782
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
package/dist/blocks/index.mjs
CHANGED
@@ -1747,7 +1747,7 @@ var ContactForm = ({
|
|
1747
1747
|
size = "default",
|
1748
1748
|
texts,
|
1749
1749
|
formId,
|
1750
|
-
formAutoComplete,
|
1750
|
+
formAutoComplete = "off",
|
1751
1751
|
onSubmit,
|
1752
1752
|
customFields
|
1753
1753
|
}) => {
|
@@ -1774,9 +1774,11 @@ var ContactForm = ({
|
|
1774
1774
|
)
|
1775
1775
|
});
|
1776
1776
|
const contactFormSchema = z8.object({
|
1777
|
-
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
1778
|
-
email: z8.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
1779
|
-
message: z8.string({
|
1777
|
+
name: z8.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
1778
|
+
email: z8.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
1779
|
+
message: z8.string({
|
1780
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
1781
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
1780
1782
|
});
|
1781
1783
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
1782
1784
|
(acc, curr) => {
|
@@ -1847,7 +1849,7 @@ var ContactForm = ({
|
|
1847
1849
|
return /* @__PURE__ */ React20.createElement(
|
1848
1850
|
Input,
|
1849
1851
|
{
|
1850
|
-
label: texts == null ? void 0 : texts.name.label,
|
1852
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
1851
1853
|
id: texts == null ? void 0 : texts.name.label,
|
1852
1854
|
...field,
|
1853
1855
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -1867,7 +1869,7 @@ var ContactForm = ({
|
|
1867
1869
|
return /* @__PURE__ */ React20.createElement(
|
1868
1870
|
Input,
|
1869
1871
|
{
|
1870
|
-
label: texts == null ? void 0 : texts.email.label,
|
1872
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
1871
1873
|
id: texts == null ? void 0 : texts.email.label,
|
1872
1874
|
...field,
|
1873
1875
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -1927,7 +1929,7 @@ var ContactForm = ({
|
|
1927
1929
|
return /* @__PURE__ */ React20.createElement(
|
1928
1930
|
Textarea,
|
1929
1931
|
{
|
1930
|
-
label: texts == null ? void 0 : texts.message.label,
|
1932
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
1931
1933
|
id: texts == null ? void 0 : texts.message.label,
|
1932
1934
|
textareaProps: {
|
1933
1935
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
@@ -86,14 +86,14 @@ type ContactFormProps = {
|
|
86
86
|
formId?: string;
|
87
87
|
formAutoComplete?: "on" | "off";
|
88
88
|
size?: "sm" | "default";
|
89
|
-
onSubmit
|
89
|
+
onSubmit: (e: ContactFormData) => void;
|
90
|
+
customFields?: CustomField[];
|
90
91
|
texts?: {
|
91
92
|
submit: string;
|
92
93
|
name: TextInputType;
|
93
94
|
email: TextInputType;
|
94
95
|
message: TextInputType;
|
95
96
|
};
|
96
|
-
customFields?: CustomField[];
|
97
97
|
};
|
98
98
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
99
99
|
|
@@ -86,14 +86,14 @@ type ContactFormProps = {
|
|
86
86
|
formId?: string;
|
87
87
|
formAutoComplete?: "on" | "off";
|
88
88
|
size?: "sm" | "default";
|
89
|
-
onSubmit
|
89
|
+
onSubmit: (e: ContactFormData) => void;
|
90
|
+
customFields?: CustomField[];
|
90
91
|
texts?: {
|
91
92
|
submit: string;
|
92
93
|
name: TextInputType;
|
93
94
|
email: TextInputType;
|
94
95
|
message: TextInputType;
|
95
96
|
};
|
96
|
-
customFields?: CustomField[];
|
97
97
|
};
|
98
98
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
99
99
|
|
@@ -1266,7 +1266,7 @@ var ContactForm = ({
|
|
1266
1266
|
size = "default",
|
1267
1267
|
texts,
|
1268
1268
|
formId,
|
1269
|
-
formAutoComplete,
|
1269
|
+
formAutoComplete = "off",
|
1270
1270
|
onSubmit,
|
1271
1271
|
customFields
|
1272
1272
|
}) => {
|
@@ -1293,9 +1293,11 @@ var ContactForm = ({
|
|
1293
1293
|
)
|
1294
1294
|
});
|
1295
1295
|
const contactFormSchema = z.object({
|
1296
|
-
name: z.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
1297
|
-
email: z.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
1298
|
-
message: z.string({
|
1296
|
+
name: z.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
1297
|
+
email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
1298
|
+
message: z.string({
|
1299
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
1300
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
1299
1301
|
});
|
1300
1302
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
1301
1303
|
(acc, curr) => {
|
@@ -1366,7 +1368,7 @@ var ContactForm = ({
|
|
1366
1368
|
return /* @__PURE__ */ import_react14.default.createElement(
|
1367
1369
|
Input,
|
1368
1370
|
{
|
1369
|
-
label: texts == null ? void 0 : texts.name.label,
|
1371
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
1370
1372
|
id: texts == null ? void 0 : texts.name.label,
|
1371
1373
|
...field,
|
1372
1374
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -1386,7 +1388,7 @@ var ContactForm = ({
|
|
1386
1388
|
return /* @__PURE__ */ import_react14.default.createElement(
|
1387
1389
|
Input,
|
1388
1390
|
{
|
1389
|
-
label: texts == null ? void 0 : texts.email.label,
|
1391
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
1390
1392
|
id: texts == null ? void 0 : texts.email.label,
|
1391
1393
|
...field,
|
1392
1394
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -1446,7 +1448,7 @@ var ContactForm = ({
|
|
1446
1448
|
return /* @__PURE__ */ import_react14.default.createElement(
|
1447
1449
|
Textarea,
|
1448
1450
|
{
|
1449
|
-
label: texts == null ? void 0 : texts.message.label,
|
1451
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
1450
1452
|
id: texts == null ? void 0 : texts.message.label,
|
1451
1453
|
textareaProps: {
|
1452
1454
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
@@ -247,7 +247,7 @@ var ContactForm = ({
|
|
247
247
|
size = "default",
|
248
248
|
texts,
|
249
249
|
formId,
|
250
|
-
formAutoComplete,
|
250
|
+
formAutoComplete = "off",
|
251
251
|
onSubmit,
|
252
252
|
customFields
|
253
253
|
}) => {
|
@@ -274,9 +274,11 @@ var ContactForm = ({
|
|
274
274
|
)
|
275
275
|
});
|
276
276
|
const contactFormSchema = z.object({
|
277
|
-
name: z.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
278
|
-
email: z.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
279
|
-
message: z.string({
|
277
|
+
name: z.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
278
|
+
email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
279
|
+
message: z.string({
|
280
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
281
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
280
282
|
});
|
281
283
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
282
284
|
(acc, curr) => {
|
@@ -347,7 +349,7 @@ var ContactForm = ({
|
|
347
349
|
return /* @__PURE__ */ React9.createElement(
|
348
350
|
Input,
|
349
351
|
{
|
350
|
-
label: texts == null ? void 0 : texts.name.label,
|
352
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
351
353
|
id: texts == null ? void 0 : texts.name.label,
|
352
354
|
...field,
|
353
355
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -367,7 +369,7 @@ var ContactForm = ({
|
|
367
369
|
return /* @__PURE__ */ React9.createElement(
|
368
370
|
Input,
|
369
371
|
{
|
370
|
-
label: texts == null ? void 0 : texts.email.label,
|
372
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
371
373
|
id: texts == null ? void 0 : texts.email.label,
|
372
374
|
...field,
|
373
375
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -427,7 +429,7 @@ var ContactForm = ({
|
|
427
429
|
return /* @__PURE__ */ React9.createElement(
|
428
430
|
Textarea,
|
429
431
|
{
|
430
|
-
label: texts == null ? void 0 : texts.message.label,
|
432
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
431
433
|
id: texts == null ? void 0 : texts.message.label,
|
432
434
|
textareaProps: {
|
433
435
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
package/dist/index.d.mts
CHANGED
@@ -1758,14 +1758,14 @@ type ContactFormProps = {
|
|
1758
1758
|
formId?: string;
|
1759
1759
|
formAutoComplete?: "on" | "off";
|
1760
1760
|
size?: "sm" | "default";
|
1761
|
-
onSubmit
|
1761
|
+
onSubmit: (e: ContactFormData) => void;
|
1762
|
+
customFields?: CustomField[];
|
1762
1763
|
texts?: {
|
1763
1764
|
submit: string;
|
1764
1765
|
name: TextInputType;
|
1765
1766
|
email: TextInputType;
|
1766
1767
|
message: TextInputType;
|
1767
1768
|
};
|
1768
|
-
customFields?: CustomField[];
|
1769
1769
|
};
|
1770
1770
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
1771
1771
|
|
package/dist/index.d.ts
CHANGED
@@ -1758,14 +1758,14 @@ type ContactFormProps = {
|
|
1758
1758
|
formId?: string;
|
1759
1759
|
formAutoComplete?: "on" | "off";
|
1760
1760
|
size?: "sm" | "default";
|
1761
|
-
onSubmit
|
1761
|
+
onSubmit: (e: ContactFormData) => void;
|
1762
|
+
customFields?: CustomField[];
|
1762
1763
|
texts?: {
|
1763
1764
|
submit: string;
|
1764
1765
|
name: TextInputType;
|
1765
1766
|
email: TextInputType;
|
1766
1767
|
message: TextInputType;
|
1767
1768
|
};
|
1768
|
-
customFields?: CustomField[];
|
1769
1769
|
};
|
1770
1770
|
declare const ContactForm: React__default.FC<ContactFormProps>;
|
1771
1771
|
|
package/dist/index.js
CHANGED
@@ -10890,7 +10890,7 @@ var ContactForm = ({
|
|
10890
10890
|
size = "default",
|
10891
10891
|
texts,
|
10892
10892
|
formId,
|
10893
|
-
formAutoComplete,
|
10893
|
+
formAutoComplete = "off",
|
10894
10894
|
onSubmit,
|
10895
10895
|
customFields
|
10896
10896
|
}) => {
|
@@ -10917,9 +10917,11 @@ var ContactForm = ({
|
|
10917
10917
|
)
|
10918
10918
|
});
|
10919
10919
|
const contactFormSchema = z8.object({
|
10920
|
-
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
10921
|
-
email: z8.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
10922
|
-
message: z8.string({
|
10920
|
+
name: z8.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
10921
|
+
email: z8.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
10922
|
+
message: z8.string({
|
10923
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
10924
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
10923
10925
|
});
|
10924
10926
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
10925
10927
|
(acc, curr) => {
|
@@ -10990,7 +10992,7 @@ var ContactForm = ({
|
|
10990
10992
|
return /* @__PURE__ */ import_react64.default.createElement(
|
10991
10993
|
Input,
|
10992
10994
|
{
|
10993
|
-
label: texts == null ? void 0 : texts.name.label,
|
10995
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
10994
10996
|
id: texts == null ? void 0 : texts.name.label,
|
10995
10997
|
...field,
|
10996
10998
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -11010,7 +11012,7 @@ var ContactForm = ({
|
|
11010
11012
|
return /* @__PURE__ */ import_react64.default.createElement(
|
11011
11013
|
Input,
|
11012
11014
|
{
|
11013
|
-
label: texts == null ? void 0 : texts.email.label,
|
11015
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
11014
11016
|
id: texts == null ? void 0 : texts.email.label,
|
11015
11017
|
...field,
|
11016
11018
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -11070,7 +11072,7 @@ var ContactForm = ({
|
|
11070
11072
|
return /* @__PURE__ */ import_react64.default.createElement(
|
11071
11073
|
Textarea,
|
11072
11074
|
{
|
11073
|
-
label: texts == null ? void 0 : texts.message.label,
|
11075
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
11074
11076
|
id: texts == null ? void 0 : texts.message.label,
|
11075
11077
|
textareaProps: {
|
11076
11078
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
package/dist/index.mjs
CHANGED
@@ -10672,7 +10672,7 @@ var ContactForm = ({
|
|
10672
10672
|
size = "default",
|
10673
10673
|
texts,
|
10674
10674
|
formId,
|
10675
|
-
formAutoComplete,
|
10675
|
+
formAutoComplete = "off",
|
10676
10676
|
onSubmit,
|
10677
10677
|
customFields
|
10678
10678
|
}) => {
|
@@ -10699,9 +10699,11 @@ var ContactForm = ({
|
|
10699
10699
|
)
|
10700
10700
|
});
|
10701
10701
|
const contactFormSchema = z8.object({
|
10702
|
-
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
10703
|
-
email: z8.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
|
10704
|
-
message: z8.string({
|
10702
|
+
name: z8.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
|
10703
|
+
email: z8.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
|
10704
|
+
message: z8.string({
|
10705
|
+
required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
|
10706
|
+
}).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
|
10705
10707
|
});
|
10706
10708
|
const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
|
10707
10709
|
(acc, curr) => {
|
@@ -10772,7 +10774,7 @@ var ContactForm = ({
|
|
10772
10774
|
return /* @__PURE__ */ React91.createElement(
|
10773
10775
|
Input,
|
10774
10776
|
{
|
10775
|
-
label: texts == null ? void 0 : texts.name.label,
|
10777
|
+
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
10776
10778
|
id: texts == null ? void 0 : texts.name.label,
|
10777
10779
|
...field,
|
10778
10780
|
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
@@ -10792,7 +10794,7 @@ var ContactForm = ({
|
|
10792
10794
|
return /* @__PURE__ */ React91.createElement(
|
10793
10795
|
Input,
|
10794
10796
|
{
|
10795
|
-
label: texts == null ? void 0 : texts.email.label,
|
10797
|
+
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
10796
10798
|
id: texts == null ? void 0 : texts.email.label,
|
10797
10799
|
...field,
|
10798
10800
|
placeholder: texts == null ? void 0 : texts.email.placeholder,
|
@@ -10852,7 +10854,7 @@ var ContactForm = ({
|
|
10852
10854
|
return /* @__PURE__ */ React91.createElement(
|
10853
10855
|
Textarea,
|
10854
10856
|
{
|
10855
|
-
label: texts == null ? void 0 : texts.message.label,
|
10857
|
+
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
10856
10858
|
id: texts == null ? void 0 : texts.message.label,
|
10857
10859
|
textareaProps: {
|
10858
10860
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|