@sikka/hawa 0.20.8-next → 0.20.10-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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -8
- package/dist/index.mjs +12 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1114,6 +1114,7 @@ type NavigationMenuTypes = {
|
|
|
1114
1114
|
rootClassNames?: string;
|
|
1115
1115
|
viewportClassNames?: string;
|
|
1116
1116
|
triggerClassNames?: string;
|
|
1117
|
+
actionFirst?: boolean;
|
|
1117
1118
|
direction?: DirectionType;
|
|
1118
1119
|
};
|
|
1119
1120
|
declare const NavigationMenuRoot: React$1.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React$1.RefAttributes<HTMLElement>, "ref"> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1114,6 +1114,7 @@ type NavigationMenuTypes = {
|
|
|
1114
1114
|
rootClassNames?: string;
|
|
1115
1115
|
viewportClassNames?: string;
|
|
1116
1116
|
triggerClassNames?: string;
|
|
1117
|
+
actionFirst?: boolean;
|
|
1117
1118
|
direction?: DirectionType;
|
|
1118
1119
|
};
|
|
1119
1120
|
declare const NavigationMenuRoot: React$1.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React$1.RefAttributes<HTMLElement>, "ref"> & {
|
package/dist/index.js
CHANGED
|
@@ -7644,6 +7644,7 @@ var NavigationMenu = ({
|
|
|
7644
7644
|
viewportClassNames,
|
|
7645
7645
|
rootClassNames,
|
|
7646
7646
|
triggerClassNames,
|
|
7647
|
+
actionFirst,
|
|
7647
7648
|
...props
|
|
7648
7649
|
}) => {
|
|
7649
7650
|
return /* @__PURE__ */ React59.createElement(
|
|
@@ -7657,7 +7658,7 @@ var NavigationMenu = ({
|
|
|
7657
7658
|
/* @__PURE__ */ React59.createElement(NavigationMenuList, null, props.items.map((item, i) => /* @__PURE__ */ React59.createElement(NavigationMenuItem, { key: i }, item.content ? /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(NavigationMenuTrigger, { className: cn(triggerClassNames) }, item.trigger), /* @__PURE__ */ React59.createElement(NavigationMenuContent, null, item.content)) : /* @__PURE__ */ React59.createElement(
|
|
7658
7659
|
NavigationMenuLink,
|
|
7659
7660
|
{
|
|
7660
|
-
href: item.path,
|
|
7661
|
+
href: actionFirst ? void 0 : item.path,
|
|
7661
7662
|
onClick: () => {
|
|
7662
7663
|
if (item.action) {
|
|
7663
7664
|
item.action();
|
|
@@ -11107,9 +11108,9 @@ var ContactForm = ({
|
|
|
11107
11108
|
}) => {
|
|
11108
11109
|
var _a, _b, _c;
|
|
11109
11110
|
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)
|
|
11111
|
+
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
|
11112
|
+
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(""),
|
|
11113
|
+
message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
|
|
11113
11114
|
});
|
|
11114
11115
|
const {
|
|
11115
11116
|
control,
|
|
@@ -11117,7 +11118,12 @@ var ContactForm = ({
|
|
|
11117
11118
|
formState: { errors },
|
|
11118
11119
|
reset
|
|
11119
11120
|
} = (0, import_react_hook_form9.useForm)({
|
|
11120
|
-
resolver: (0, import_zod8.zodResolver)(contactFormSchema)
|
|
11121
|
+
resolver: (0, import_zod8.zodResolver)(contactFormSchema),
|
|
11122
|
+
defaultValues: {
|
|
11123
|
+
name: "",
|
|
11124
|
+
email: "",
|
|
11125
|
+
message: ""
|
|
11126
|
+
}
|
|
11121
11127
|
});
|
|
11122
11128
|
const handleFormSubmit = (data) => {
|
|
11123
11129
|
if (onSubmit) {
|
|
@@ -11172,9 +11178,8 @@ var ContactForm = ({
|
|
|
11172
11178
|
{
|
|
11173
11179
|
label: texts == null ? void 0 : texts.name.label,
|
|
11174
11180
|
id: texts == null ? void 0 : texts.name.label,
|
|
11175
|
-
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
|
11176
|
-
type: "text",
|
|
11177
11181
|
...field,
|
|
11182
|
+
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
|
11178
11183
|
helperText: (_a2 = errors.name) == null ? void 0 : _a2.message
|
|
11179
11184
|
}
|
|
11180
11185
|
);
|
|
@@ -11191,7 +11196,6 @@ var ContactForm = ({
|
|
|
11191
11196
|
return /* @__PURE__ */ import_react69.default.createElement(
|
|
11192
11197
|
Input,
|
|
11193
11198
|
{
|
|
11194
|
-
type: "text",
|
|
11195
11199
|
label: texts == null ? void 0 : texts.email.label,
|
|
11196
11200
|
id: texts == null ? void 0 : texts.email.label,
|
|
11197
11201
|
...field,
|
package/dist/index.mjs
CHANGED
|
@@ -7417,6 +7417,7 @@ var NavigationMenu = ({
|
|
|
7417
7417
|
viewportClassNames,
|
|
7418
7418
|
rootClassNames,
|
|
7419
7419
|
triggerClassNames,
|
|
7420
|
+
actionFirst,
|
|
7420
7421
|
...props
|
|
7421
7422
|
}) => {
|
|
7422
7423
|
return /* @__PURE__ */ React59.createElement(
|
|
@@ -7430,7 +7431,7 @@ var NavigationMenu = ({
|
|
|
7430
7431
|
/* @__PURE__ */ React59.createElement(NavigationMenuList, null, props.items.map((item, i) => /* @__PURE__ */ React59.createElement(NavigationMenuItem, { key: i }, item.content ? /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(NavigationMenuTrigger, { className: cn(triggerClassNames) }, item.trigger), /* @__PURE__ */ React59.createElement(NavigationMenuContent, null, item.content)) : /* @__PURE__ */ React59.createElement(
|
|
7431
7432
|
NavigationMenuLink,
|
|
7432
7433
|
{
|
|
7433
|
-
href: item.path,
|
|
7434
|
+
href: actionFirst ? void 0 : item.path,
|
|
7434
7435
|
onClick: () => {
|
|
7435
7436
|
if (item.action) {
|
|
7436
7437
|
item.action();
|
|
@@ -10882,9 +10883,9 @@ var ContactForm = ({
|
|
|
10882
10883
|
}) => {
|
|
10883
10884
|
var _a, _b, _c;
|
|
10884
10885
|
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)
|
|
10886
|
+
name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
|
|
10887
|
+
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(""),
|
|
10888
|
+
message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
|
|
10888
10889
|
});
|
|
10889
10890
|
const {
|
|
10890
10891
|
control,
|
|
@@ -10892,7 +10893,12 @@ var ContactForm = ({
|
|
|
10892
10893
|
formState: { errors },
|
|
10893
10894
|
reset
|
|
10894
10895
|
} = useForm9({
|
|
10895
|
-
resolver: zodResolver8(contactFormSchema)
|
|
10896
|
+
resolver: zodResolver8(contactFormSchema),
|
|
10897
|
+
defaultValues: {
|
|
10898
|
+
name: "",
|
|
10899
|
+
email: "",
|
|
10900
|
+
message: ""
|
|
10901
|
+
}
|
|
10896
10902
|
});
|
|
10897
10903
|
const handleFormSubmit = (data) => {
|
|
10898
10904
|
if (onSubmit) {
|
|
@@ -10947,9 +10953,8 @@ var ContactForm = ({
|
|
|
10947
10953
|
{
|
|
10948
10954
|
label: texts == null ? void 0 : texts.name.label,
|
|
10949
10955
|
id: texts == null ? void 0 : texts.name.label,
|
|
10950
|
-
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
|
10951
|
-
type: "text",
|
|
10952
10956
|
...field,
|
|
10957
|
+
placeholder: texts == null ? void 0 : texts.name.placeholder,
|
|
10953
10958
|
helperText: (_a2 = errors.name) == null ? void 0 : _a2.message
|
|
10954
10959
|
}
|
|
10955
10960
|
);
|
|
@@ -10966,7 +10971,6 @@ var ContactForm = ({
|
|
|
10966
10971
|
return /* @__PURE__ */ React95.createElement(
|
|
10967
10972
|
Input,
|
|
10968
10973
|
{
|
|
10969
|
-
type: "text",
|
|
10970
10974
|
label: texts == null ? void 0 : texts.email.label,
|
|
10971
10975
|
id: texts == null ? void 0 : texts.email.label,
|
|
10972
10976
|
...field,
|