@sikka/hawa 0.27.19-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.
@@ -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({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
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({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
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
@@ -1521,6 +1521,11 @@ type RegisterFormTypes = {
1521
1521
  usernameOptions?: {
1522
1522
  label?: LabelProps;
1523
1523
  };
1524
+ classNames?: {
1525
+ root?: string;
1526
+ form?: string;
1527
+ card?: string;
1528
+ };
1524
1529
  };
1525
1530
  declare const RegisterForm: FC<RegisterFormTypes>;
1526
1531
 
@@ -1753,14 +1758,14 @@ type ContactFormProps = {
1753
1758
  formId?: string;
1754
1759
  formAutoComplete?: "on" | "off";
1755
1760
  size?: "sm" | "default";
1756
- onSubmit?: (e: ContactFormData) => void;
1761
+ onSubmit: (e: ContactFormData) => void;
1762
+ customFields?: CustomField[];
1757
1763
  texts?: {
1758
1764
  submit: string;
1759
1765
  name: TextInputType;
1760
1766
  email: TextInputType;
1761
1767
  message: TextInputType;
1762
1768
  };
1763
- customFields?: CustomField[];
1764
1769
  };
1765
1770
  declare const ContactForm: React__default.FC<ContactFormProps>;
1766
1771
 
package/dist/index.d.ts CHANGED
@@ -1521,6 +1521,11 @@ type RegisterFormTypes = {
1521
1521
  usernameOptions?: {
1522
1522
  label?: LabelProps;
1523
1523
  };
1524
+ classNames?: {
1525
+ root?: string;
1526
+ form?: string;
1527
+ card?: string;
1528
+ };
1524
1529
  };
1525
1530
  declare const RegisterForm: FC<RegisterFormTypes>;
1526
1531
 
@@ -1753,14 +1758,14 @@ type ContactFormProps = {
1753
1758
  formId?: string;
1754
1759
  formAutoComplete?: "on" | "off";
1755
1760
  size?: "sm" | "default";
1756
- onSubmit?: (e: ContactFormData) => void;
1761
+ onSubmit: (e: ContactFormData) => void;
1762
+ customFields?: CustomField[];
1757
1763
  texts?: {
1758
1764
  submit: string;
1759
1765
  name: TextInputType;
1760
1766
  email: TextInputType;
1761
1767
  message: TextInputType;
1762
1768
  };
1763
- customFields?: CustomField[];
1764
1769
  };
1765
1770
  declare const ContactForm: React__default.FC<ContactFormProps>;
1766
1771