@sikka/hawa 0.20.8-next → 0.20.9-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/index.js CHANGED
@@ -11107,9 +11107,9 @@ var ContactForm = ({
11107
11107
  }) => {
11108
11108
  var _a, _b, _c;
11109
11109
  const contactFormSchema = z8.object({
11110
- name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required),
11111
- 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 }),
11112
- message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid)
11110
+ name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
11111
+ 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(""),
11112
+ message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
11113
11113
  });
11114
11114
  const {
11115
11115
  control,
@@ -11117,7 +11117,12 @@ var ContactForm = ({
11117
11117
  formState: { errors },
11118
11118
  reset
11119
11119
  } = (0, import_react_hook_form9.useForm)({
11120
- resolver: (0, import_zod8.zodResolver)(contactFormSchema)
11120
+ resolver: (0, import_zod8.zodResolver)(contactFormSchema),
11121
+ defaultValues: {
11122
+ name: "",
11123
+ email: "",
11124
+ message: ""
11125
+ }
11121
11126
  });
11122
11127
  const handleFormSubmit = (data) => {
11123
11128
  if (onSubmit) {
@@ -11172,9 +11177,8 @@ var ContactForm = ({
11172
11177
  {
11173
11178
  label: texts == null ? void 0 : texts.name.label,
11174
11179
  id: texts == null ? void 0 : texts.name.label,
11175
- placeholder: texts == null ? void 0 : texts.name.placeholder,
11176
- type: "text",
11177
11180
  ...field,
11181
+ placeholder: texts == null ? void 0 : texts.name.placeholder,
11178
11182
  helperText: (_a2 = errors.name) == null ? void 0 : _a2.message
11179
11183
  }
11180
11184
  );
@@ -11191,7 +11195,6 @@ var ContactForm = ({
11191
11195
  return /* @__PURE__ */ import_react69.default.createElement(
11192
11196
  Input,
11193
11197
  {
11194
- type: "text",
11195
11198
  label: texts == null ? void 0 : texts.email.label,
11196
11199
  id: texts == null ? void 0 : texts.email.label,
11197
11200
  ...field,
package/dist/index.mjs CHANGED
@@ -10882,9 +10882,9 @@ var ContactForm = ({
10882
10882
  }) => {
10883
10883
  var _a, _b, _c;
10884
10884
  const contactFormSchema = z8.object({
10885
- name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required),
10886
- 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 }),
10887
- message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid)
10885
+ name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
10886
+ 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(""),
10887
+ message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
10888
10888
  });
10889
10889
  const {
10890
10890
  control,
@@ -10892,7 +10892,12 @@ var ContactForm = ({
10892
10892
  formState: { errors },
10893
10893
  reset
10894
10894
  } = useForm9({
10895
- resolver: zodResolver8(contactFormSchema)
10895
+ resolver: zodResolver8(contactFormSchema),
10896
+ defaultValues: {
10897
+ name: "",
10898
+ email: "",
10899
+ message: ""
10900
+ }
10896
10901
  });
10897
10902
  const handleFormSubmit = (data) => {
10898
10903
  if (onSubmit) {
@@ -10947,9 +10952,8 @@ var ContactForm = ({
10947
10952
  {
10948
10953
  label: texts == null ? void 0 : texts.name.label,
10949
10954
  id: texts == null ? void 0 : texts.name.label,
10950
- placeholder: texts == null ? void 0 : texts.name.placeholder,
10951
- type: "text",
10952
10955
  ...field,
10956
+ placeholder: texts == null ? void 0 : texts.name.placeholder,
10953
10957
  helperText: (_a2 = errors.name) == null ? void 0 : _a2.message
10954
10958
  }
10955
10959
  );
@@ -10966,7 +10970,6 @@ var ContactForm = ({
10966
10970
  return /* @__PURE__ */ React95.createElement(
10967
10971
  Input,
10968
10972
  {
10969
- type: "text",
10970
10973
  label: texts == null ? void 0 : texts.email.label,
10971
10974
  id: texts == null ? void 0 : texts.email.label,
10972
10975
  ...field,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.20.8-next",
3
+ "version": "0.20.9-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",