@sikka/hawa 0.30.28-next → 0.30.30-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/auth/index.d.mts +3 -1
- package/dist/blocks/auth/index.d.ts +3 -1
- package/dist/blocks/auth/index.js +21 -8
- package/dist/blocks/auth/index.mjs +21 -8
- package/dist/blocks/feedback/index.d.mts +1 -1
- package/dist/blocks/feedback/index.d.ts +1 -1
- package/dist/blocks/feedback/index.js +1 -1
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks/index.js +25 -11
- package/dist/blocks/index.mjs +23 -10
- package/dist/blocks/misc/index.d.mts +1 -1
- package/dist/blocks/misc/index.d.ts +1 -1
- package/dist/blocks/misc/index.js +3 -2
- package/dist/blocks/misc/index.mjs +3 -2
- package/dist/blocks/pricing/index.d.mts +1 -1
- package/dist/blocks/pricing/index.d.ts +1 -1
- package/dist/{chunk-MNK7PSNG.mjs → chunk-XTGWVGTN.mjs} +3 -2
- package/dist/elements/index.js +5 -4
- package/dist/elements/index.mjs +3 -3
- package/dist/floatBox/index.d.mts +1 -1
- package/dist/floatBox/index.d.ts +1 -1
- package/dist/floatBox/index.js +2 -2
- package/dist/floatBox/index.js.map +1 -1
- package/dist/floatBox/index.mjs +2 -2
- package/dist/floatBox/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +27 -13
- package/dist/index.mjs +27 -13
- package/dist/interfaceSettings/index.js +2 -2
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +2 -2
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/tabs/index.js +3 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +3 -2
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/{textTypes-DAgkNov8.d.mts → textTypes-0bvyKoeH.d.mts} +1 -0
- package/dist/{textTypes-DAgkNov8.d.ts → textTypes-0bvyKoeH.d.ts} +1 -0
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +9 -9
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default, { FC } from 'react';
|
3
|
-
import { a as ThirdPartyAuthTextsTypes, L as LoginFormTextsTypes, D as DirectionType, P as PositionType, b as RegisterFormTextsTypes, N as NewPasswordTextsTypes, c as ResetPasswordTextsTypes } from '../../textTypes-
|
3
|
+
import { a as ThirdPartyAuthTextsTypes, L as LoginFormTextsTypes, D as DirectionType, P as PositionType, b as RegisterFormTextsTypes, N as NewPasswordTextsTypes, c as ResetPasswordTextsTypes } from '../../textTypes-0bvyKoeH.mjs';
|
4
4
|
|
5
5
|
type AuthButtonsType = {
|
6
6
|
texts?: ThirdPartyAuthTextsTypes;
|
@@ -211,6 +211,7 @@ declare const CheckEmail: FC<CheckEmailBlocks>;
|
|
211
211
|
type NewPasswordTypes = {
|
212
212
|
handleNewPassword: (e: any) => void;
|
213
213
|
handleRouteToRegister: () => void;
|
214
|
+
isLoading: boolean;
|
214
215
|
direction?: DirectionType;
|
215
216
|
headless?: boolean;
|
216
217
|
allowRegister?: boolean;
|
@@ -223,6 +224,7 @@ type ResetPasswordType = {
|
|
223
224
|
handleResetPassword: (e: any) => void;
|
224
225
|
handleRouteToRegister: () => void;
|
225
226
|
sent: any;
|
227
|
+
isLoading: boolean;
|
226
228
|
headless?: boolean;
|
227
229
|
allowRegister?: boolean;
|
228
230
|
direction?: DirectionType;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default, { FC } from 'react';
|
3
|
-
import { a as ThirdPartyAuthTextsTypes, L as LoginFormTextsTypes, D as DirectionType, P as PositionType, b as RegisterFormTextsTypes, N as NewPasswordTextsTypes, c as ResetPasswordTextsTypes } from '../../textTypes-
|
3
|
+
import { a as ThirdPartyAuthTextsTypes, L as LoginFormTextsTypes, D as DirectionType, P as PositionType, b as RegisterFormTextsTypes, N as NewPasswordTextsTypes, c as ResetPasswordTextsTypes } from '../../textTypes-0bvyKoeH.js';
|
4
4
|
|
5
5
|
type AuthButtonsType = {
|
6
6
|
texts?: ThirdPartyAuthTextsTypes;
|
@@ -211,6 +211,7 @@ declare const CheckEmail: FC<CheckEmailBlocks>;
|
|
211
211
|
type NewPasswordTypes = {
|
212
212
|
handleNewPassword: (e: any) => void;
|
213
213
|
handleRouteToRegister: () => void;
|
214
|
+
isLoading: boolean;
|
214
215
|
direction?: DirectionType;
|
215
216
|
headless?: boolean;
|
216
217
|
allowRegister?: boolean;
|
@@ -223,6 +224,7 @@ type ResetPasswordType = {
|
|
223
224
|
handleResetPassword: (e: any) => void;
|
224
225
|
handleRouteToRegister: () => void;
|
225
226
|
sent: any;
|
227
|
+
isLoading: boolean;
|
226
228
|
headless?: boolean;
|
227
229
|
allowRegister?: boolean;
|
228
230
|
direction?: DirectionType;
|
@@ -3770,7 +3770,7 @@ var RegisterForm = ({
|
|
3770
3770
|
const methods = (0, import_react_hook_form2.useForm)();
|
3771
3771
|
let fieldSchemas = {};
|
3772
3772
|
registerFields.forEach((field) => {
|
3773
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
3773
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
3774
3774
|
switch (field) {
|
3775
3775
|
case "fullname":
|
3776
3776
|
fieldSchemas["fullName"] = z2.string().optional();
|
@@ -3785,12 +3785,14 @@ var RegisterForm = ({
|
|
3785
3785
|
required_error: ((_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required) || "Username is required"
|
3786
3786
|
}).min(1, {
|
3787
3787
|
message: ((_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required) || "Username is required"
|
3788
|
+
}).max(14, {
|
3789
|
+
message: ((_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.tooLong) || "Username is too long"
|
3788
3790
|
}).refine(
|
3789
3791
|
(value) => {
|
3790
3792
|
const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
3791
3793
|
return isValid;
|
3792
3794
|
},
|
3793
|
-
{ message: ((
|
3795
|
+
{ message: ((_g2 = texts == null ? void 0 : texts.username) == null ? void 0 : _g2.invalid) || "Invalid username" }
|
3794
3796
|
);
|
3795
3797
|
break;
|
3796
3798
|
}
|
@@ -4038,9 +4040,7 @@ var RegisterForm = ({
|
|
4038
4040
|
isSearchable: false,
|
4039
4041
|
isClearable: false,
|
4040
4042
|
options: props.userReferenceOptions || [],
|
4041
|
-
onChange: (e) =>
|
4042
|
-
field.onChange(e.value);
|
4043
|
-
}
|
4043
|
+
onChange: (e) => field.onChange(e)
|
4044
4044
|
}
|
4045
4045
|
);
|
4046
4046
|
}
|
@@ -4198,7 +4198,11 @@ var import_react18 = __toESM(require("react"));
|
|
4198
4198
|
var import_react_hook_form3 = require("react-hook-form");
|
4199
4199
|
var import_zod3 = require("@hookform/resolvers/zod");
|
4200
4200
|
var z3 = __toESM(require("zod"));
|
4201
|
-
var NewPasswordForm = ({
|
4201
|
+
var NewPasswordForm = ({
|
4202
|
+
texts,
|
4203
|
+
isLoading,
|
4204
|
+
...props
|
4205
|
+
}) => {
|
4202
4206
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
4203
4207
|
const formSchema = z3.object({
|
4204
4208
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
@@ -4279,7 +4283,7 @@ var NewPasswordForm = ({ texts, ...props }) => {
|
|
4279
4283
|
}
|
4280
4284
|
)
|
4281
4285
|
),
|
4282
|
-
/* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
|
4286
|
+
/* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
|
4283
4287
|
"span",
|
4284
4288
|
{
|
4285
4289
|
className: "clickable-link",
|
@@ -4297,6 +4301,7 @@ var import_zod4 = require("@hookform/resolvers/zod");
|
|
4297
4301
|
var z4 = __toESM(require("zod"));
|
4298
4302
|
var ResetPasswordForm = ({
|
4299
4303
|
allowRegister = true,
|
4304
|
+
isLoading,
|
4300
4305
|
...props
|
4301
4306
|
}) => {
|
4302
4307
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
@@ -4340,7 +4345,15 @@ var ResetPasswordForm = ({
|
|
4340
4345
|
}
|
4341
4346
|
}
|
4342
4347
|
)),
|
4343
|
-
/* @__PURE__ */ import_react19.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react19.default.createElement(
|
4348
|
+
/* @__PURE__ */ import_react19.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react19.default.createElement(
|
4349
|
+
Button,
|
4350
|
+
{
|
4351
|
+
type: "submit",
|
4352
|
+
className: "hawa-w-full",
|
4353
|
+
isLoading
|
4354
|
+
},
|
4355
|
+
((_i = props.texts) == null ? void 0 : _i.resetPassword) || "Reset Password"
|
4356
|
+
), allowRegister && /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ import_react19.default.createElement(
|
4344
4357
|
"span",
|
4345
4358
|
{
|
4346
4359
|
className: "clickable-link",
|
@@ -2864,7 +2864,7 @@ var RegisterForm = ({
|
|
2864
2864
|
const methods = useForm2();
|
2865
2865
|
let fieldSchemas = {};
|
2866
2866
|
registerFields.forEach((field) => {
|
2867
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
2867
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
2868
2868
|
switch (field) {
|
2869
2869
|
case "fullname":
|
2870
2870
|
fieldSchemas["fullName"] = z2.string().optional();
|
@@ -2879,12 +2879,14 @@ var RegisterForm = ({
|
|
2879
2879
|
required_error: ((_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required) || "Username is required"
|
2880
2880
|
}).min(1, {
|
2881
2881
|
message: ((_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required) || "Username is required"
|
2882
|
+
}).max(14, {
|
2883
|
+
message: ((_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.tooLong) || "Username is too long"
|
2882
2884
|
}).refine(
|
2883
2885
|
(value) => {
|
2884
2886
|
const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
2885
2887
|
return isValid;
|
2886
2888
|
},
|
2887
|
-
{ message: ((
|
2889
|
+
{ message: ((_g2 = texts == null ? void 0 : texts.username) == null ? void 0 : _g2.invalid) || "Invalid username" }
|
2888
2890
|
);
|
2889
2891
|
break;
|
2890
2892
|
}
|
@@ -3132,9 +3134,7 @@ var RegisterForm = ({
|
|
3132
3134
|
isSearchable: false,
|
3133
3135
|
isClearable: false,
|
3134
3136
|
options: props.userReferenceOptions || [],
|
3135
|
-
onChange: (e) =>
|
3136
|
-
field.onChange(e.value);
|
3137
|
-
}
|
3137
|
+
onChange: (e) => field.onChange(e)
|
3138
3138
|
}
|
3139
3139
|
);
|
3140
3140
|
}
|
@@ -3292,7 +3292,11 @@ import React10, { useState as useState5 } from "react";
|
|
3292
3292
|
import { Controller as Controller3, useForm as useForm3 } from "react-hook-form";
|
3293
3293
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
3294
3294
|
import * as z3 from "zod";
|
3295
|
-
var NewPasswordForm = ({
|
3295
|
+
var NewPasswordForm = ({
|
3296
|
+
texts,
|
3297
|
+
isLoading,
|
3298
|
+
...props
|
3299
|
+
}) => {
|
3296
3300
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
3297
3301
|
const formSchema = z3.object({
|
3298
3302
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
@@ -3373,7 +3377,7 @@ var NewPasswordForm = ({ texts, ...props }) => {
|
|
3373
3377
|
}
|
3374
3378
|
)
|
3375
3379
|
),
|
3376
|
-
/* @__PURE__ */ React10.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React10.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React10.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React10.createElement(
|
3380
|
+
/* @__PURE__ */ React10.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React10.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React10.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React10.createElement(
|
3377
3381
|
"span",
|
3378
3382
|
{
|
3379
3383
|
className: "clickable-link",
|
@@ -3391,6 +3395,7 @@ import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
3391
3395
|
import * as z4 from "zod";
|
3392
3396
|
var ResetPasswordForm = ({
|
3393
3397
|
allowRegister = true,
|
3398
|
+
isLoading,
|
3394
3399
|
...props
|
3395
3400
|
}) => {
|
3396
3401
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
@@ -3434,7 +3439,15 @@ var ResetPasswordForm = ({
|
|
3434
3439
|
}
|
3435
3440
|
}
|
3436
3441
|
)),
|
3437
|
-
/* @__PURE__ */ React11.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React11.createElement(
|
3442
|
+
/* @__PURE__ */ React11.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React11.createElement(
|
3443
|
+
Button,
|
3444
|
+
{
|
3445
|
+
type: "submit",
|
3446
|
+
className: "hawa-w-full",
|
3447
|
+
isLoading
|
3448
|
+
},
|
3449
|
+
((_i = props.texts) == null ? void 0 : _i.resetPassword) || "Reset Password"
|
3450
|
+
), allowRegister && /* @__PURE__ */ React11.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ React11.createElement(
|
3438
3451
|
"span",
|
3439
3452
|
{
|
3440
3453
|
className: "clickable-link",
|
@@ -970,7 +970,7 @@ var UserReferralSource = ({
|
|
970
970
|
orientation: "vertical",
|
971
971
|
options: optionsWithOther,
|
972
972
|
defaultValue: field.value,
|
973
|
-
onChange: (e) => field.onChange(e
|
973
|
+
onChange: (e) => field.onChange(e),
|
974
974
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
975
975
|
}
|
976
976
|
);
|
@@ -145,7 +145,7 @@ var UserReferralSource = ({
|
|
145
145
|
orientation: "vertical",
|
146
146
|
options: optionsWithOther,
|
147
147
|
defaultValue: field.value,
|
148
|
-
onChange: (e) => field.onChange(e
|
148
|
+
onChange: (e) => field.onChange(e),
|
149
149
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
150
150
|
}
|
151
151
|
);
|
package/dist/blocks/index.d.mts
CHANGED
@@ -202,6 +202,7 @@ declare const CheckEmail: FC<CheckEmailBlocks>;
|
|
202
202
|
type NewPasswordTypes = {
|
203
203
|
handleNewPassword: (e: any) => void;
|
204
204
|
handleRouteToRegister: () => void;
|
205
|
+
isLoading: boolean;
|
205
206
|
direction?: DirectionType;
|
206
207
|
headless?: boolean;
|
207
208
|
allowRegister?: boolean;
|
@@ -214,6 +215,7 @@ type ResetPasswordType = {
|
|
214
215
|
handleResetPassword: (e: any) => void;
|
215
216
|
handleRouteToRegister: () => void;
|
216
217
|
sent: any;
|
218
|
+
isLoading: boolean;
|
217
219
|
headless?: boolean;
|
218
220
|
allowRegister?: boolean;
|
219
221
|
direction?: DirectionType;
|
package/dist/blocks/index.d.ts
CHANGED
@@ -202,6 +202,7 @@ declare const CheckEmail: FC<CheckEmailBlocks>;
|
|
202
202
|
type NewPasswordTypes = {
|
203
203
|
handleNewPassword: (e: any) => void;
|
204
204
|
handleRouteToRegister: () => void;
|
205
|
+
isLoading: boolean;
|
205
206
|
direction?: DirectionType;
|
206
207
|
headless?: boolean;
|
207
208
|
allowRegister?: boolean;
|
@@ -214,6 +215,7 @@ type ResetPasswordType = {
|
|
214
215
|
handleResetPassword: (e: any) => void;
|
215
216
|
handleRouteToRegister: () => void;
|
216
217
|
sent: any;
|
218
|
+
isLoading: boolean;
|
217
219
|
headless?: boolean;
|
218
220
|
allowRegister?: boolean;
|
219
221
|
direction?: DirectionType;
|
package/dist/blocks/index.js
CHANGED
@@ -3927,7 +3927,7 @@ var RegisterForm = ({
|
|
3927
3927
|
const methods = (0, import_react_hook_form2.useForm)();
|
3928
3928
|
let fieldSchemas = {};
|
3929
3929
|
registerFields.forEach((field) => {
|
3930
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
3930
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
3931
3931
|
switch (field) {
|
3932
3932
|
case "fullname":
|
3933
3933
|
fieldSchemas["fullName"] = z2.string().optional();
|
@@ -3942,12 +3942,14 @@ var RegisterForm = ({
|
|
3942
3942
|
required_error: ((_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required) || "Username is required"
|
3943
3943
|
}).min(1, {
|
3944
3944
|
message: ((_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required) || "Username is required"
|
3945
|
+
}).max(14, {
|
3946
|
+
message: ((_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.tooLong) || "Username is too long"
|
3945
3947
|
}).refine(
|
3946
3948
|
(value) => {
|
3947
3949
|
const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
3948
3950
|
return isValid;
|
3949
3951
|
},
|
3950
|
-
{ message: ((
|
3952
|
+
{ message: ((_g2 = texts == null ? void 0 : texts.username) == null ? void 0 : _g2.invalid) || "Invalid username" }
|
3951
3953
|
);
|
3952
3954
|
break;
|
3953
3955
|
}
|
@@ -4195,9 +4197,7 @@ var RegisterForm = ({
|
|
4195
4197
|
isSearchable: false,
|
4196
4198
|
isClearable: false,
|
4197
4199
|
options: props.userReferenceOptions || [],
|
4198
|
-
onChange: (e) =>
|
4199
|
-
field.onChange(e.value);
|
4200
|
-
}
|
4200
|
+
onChange: (e) => field.onChange(e)
|
4201
4201
|
}
|
4202
4202
|
);
|
4203
4203
|
}
|
@@ -4355,7 +4355,11 @@ var import_react18 = __toESM(require("react"));
|
|
4355
4355
|
var import_react_hook_form3 = require("react-hook-form");
|
4356
4356
|
var import_zod3 = require("@hookform/resolvers/zod");
|
4357
4357
|
var z3 = __toESM(require("zod"));
|
4358
|
-
var NewPasswordForm = ({
|
4358
|
+
var NewPasswordForm = ({
|
4359
|
+
texts,
|
4360
|
+
isLoading,
|
4361
|
+
...props
|
4362
|
+
}) => {
|
4359
4363
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
4360
4364
|
const formSchema = z3.object({
|
4361
4365
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
@@ -4436,7 +4440,7 @@ var NewPasswordForm = ({ texts, ...props }) => {
|
|
4436
4440
|
}
|
4437
4441
|
)
|
4438
4442
|
),
|
4439
|
-
/* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
|
4443
|
+
/* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
|
4440
4444
|
"span",
|
4441
4445
|
{
|
4442
4446
|
className: "clickable-link",
|
@@ -4454,6 +4458,7 @@ var import_zod4 = require("@hookform/resolvers/zod");
|
|
4454
4458
|
var z4 = __toESM(require("zod"));
|
4455
4459
|
var ResetPasswordForm = ({
|
4456
4460
|
allowRegister = true,
|
4461
|
+
isLoading,
|
4457
4462
|
...props
|
4458
4463
|
}) => {
|
4459
4464
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
@@ -4497,7 +4502,15 @@ var ResetPasswordForm = ({
|
|
4497
4502
|
}
|
4498
4503
|
}
|
4499
4504
|
)),
|
4500
|
-
/* @__PURE__ */ import_react19.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react19.default.createElement(
|
4505
|
+
/* @__PURE__ */ import_react19.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react19.default.createElement(
|
4506
|
+
Button,
|
4507
|
+
{
|
4508
|
+
type: "submit",
|
4509
|
+
className: "hawa-w-full",
|
4510
|
+
isLoading
|
4511
|
+
},
|
4512
|
+
((_i = props.texts) == null ? void 0 : _i.resetPassword) || "Reset Password"
|
4513
|
+
), allowRegister && /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ import_react19.default.createElement(
|
4501
4514
|
"span",
|
4502
4515
|
{
|
4503
4516
|
className: "clickable-link",
|
@@ -5081,7 +5094,7 @@ var UserReferralSource = ({
|
|
5081
5094
|
orientation: "vertical",
|
5082
5095
|
options: optionsWithOther,
|
5083
5096
|
defaultValue: field.value,
|
5084
|
-
onChange: (e) => field.onChange(e
|
5097
|
+
onChange: (e) => field.onChange(e),
|
5085
5098
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
5086
5099
|
}
|
5087
5100
|
);
|
@@ -5722,7 +5735,7 @@ var FloatBox = ({
|
|
5722
5735
|
side = "bottom",
|
5723
5736
|
sideOffset = 40,
|
5724
5737
|
align = "center",
|
5725
|
-
|
5738
|
+
withArrow = false,
|
5726
5739
|
...props
|
5727
5740
|
}) => {
|
5728
5741
|
let stylesMap = {
|
@@ -5764,7 +5777,7 @@ var FloatBox = ({
|
|
5764
5777
|
"data-side": side,
|
5765
5778
|
"data-floatbox-state": open ? "open" : "closed"
|
5766
5779
|
},
|
5767
|
-
|
5780
|
+
withArrow && /* @__PURE__ */ React43.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
|
5768
5781
|
/* @__PURE__ */ React43.createElement("span", null, props.children)
|
5769
5782
|
);
|
5770
5783
|
};
|
@@ -5877,6 +5890,7 @@ var TabsTrigger = React44.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
5877
5890
|
/* @__PURE__ */ React44.createElement(
|
5878
5891
|
FloatBox,
|
5879
5892
|
{
|
5893
|
+
withArrow: true,
|
5880
5894
|
align: orientation === "vertical" ? "start" : "start",
|
5881
5895
|
side: orientation === "vertical" ? "right" : "bottom",
|
5882
5896
|
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
package/dist/blocks/index.mjs
CHANGED
@@ -26,7 +26,7 @@ import {
|
|
26
26
|
UncheckMark,
|
27
27
|
VeryBadEmoji,
|
28
28
|
VeryGoodEmoji
|
29
|
-
} from "../chunk-
|
29
|
+
} from "../chunk-XTGWVGTN.mjs";
|
30
30
|
import "../chunk-R2SKHHDK.mjs";
|
31
31
|
import {
|
32
32
|
Button,
|
@@ -486,7 +486,7 @@ var RegisterForm = ({
|
|
486
486
|
const methods = useForm2();
|
487
487
|
let fieldSchemas = {};
|
488
488
|
registerFields.forEach((field) => {
|
489
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
489
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
490
490
|
switch (field) {
|
491
491
|
case "fullname":
|
492
492
|
fieldSchemas["fullName"] = z2.string().optional();
|
@@ -501,12 +501,14 @@ var RegisterForm = ({
|
|
501
501
|
required_error: ((_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required) || "Username is required"
|
502
502
|
}).min(1, {
|
503
503
|
message: ((_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required) || "Username is required"
|
504
|
+
}).max(14, {
|
505
|
+
message: ((_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.tooLong) || "Username is too long"
|
504
506
|
}).refine(
|
505
507
|
(value) => {
|
506
508
|
const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
507
509
|
return isValid;
|
508
510
|
},
|
509
|
-
{ message: ((
|
511
|
+
{ message: ((_g2 = texts == null ? void 0 : texts.username) == null ? void 0 : _g2.invalid) || "Invalid username" }
|
510
512
|
);
|
511
513
|
break;
|
512
514
|
}
|
@@ -754,9 +756,7 @@ var RegisterForm = ({
|
|
754
756
|
isSearchable: false,
|
755
757
|
isClearable: false,
|
756
758
|
options: props.userReferenceOptions || [],
|
757
|
-
onChange: (e) =>
|
758
|
-
field.onChange(e.value);
|
759
|
-
}
|
759
|
+
onChange: (e) => field.onChange(e)
|
760
760
|
}
|
761
761
|
);
|
762
762
|
}
|
@@ -914,7 +914,11 @@ import React6, { useState as useState3 } from "react";
|
|
914
914
|
import { Controller as Controller3, useForm as useForm3 } from "react-hook-form";
|
915
915
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
916
916
|
import * as z3 from "zod";
|
917
|
-
var NewPasswordForm = ({
|
917
|
+
var NewPasswordForm = ({
|
918
|
+
texts,
|
919
|
+
isLoading,
|
920
|
+
...props
|
921
|
+
}) => {
|
918
922
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
919
923
|
const formSchema = z3.object({
|
920
924
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
@@ -995,7 +999,7 @@ var NewPasswordForm = ({ texts, ...props }) => {
|
|
995
999
|
}
|
996
1000
|
)
|
997
1001
|
),
|
998
|
-
/* @__PURE__ */ React6.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React6.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React6.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React6.createElement(
|
1002
|
+
/* @__PURE__ */ React6.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React6.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React6.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React6.createElement(
|
999
1003
|
"span",
|
1000
1004
|
{
|
1001
1005
|
className: "clickable-link",
|
@@ -1013,6 +1017,7 @@ import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
1013
1017
|
import * as z4 from "zod";
|
1014
1018
|
var ResetPasswordForm = ({
|
1015
1019
|
allowRegister = true,
|
1020
|
+
isLoading,
|
1016
1021
|
...props
|
1017
1022
|
}) => {
|
1018
1023
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
@@ -1056,7 +1061,15 @@ var ResetPasswordForm = ({
|
|
1056
1061
|
}
|
1057
1062
|
}
|
1058
1063
|
)),
|
1059
|
-
/* @__PURE__ */ React7.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React7.createElement(
|
1064
|
+
/* @__PURE__ */ React7.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React7.createElement(
|
1065
|
+
Button,
|
1066
|
+
{
|
1067
|
+
type: "submit",
|
1068
|
+
className: "hawa-w-full",
|
1069
|
+
isLoading
|
1070
|
+
},
|
1071
|
+
((_i = props.texts) == null ? void 0 : _i.resetPassword) || "Reset Password"
|
1072
|
+
), allowRegister && /* @__PURE__ */ React7.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ React7.createElement(
|
1060
1073
|
"span",
|
1061
1074
|
{
|
1062
1075
|
className: "clickable-link",
|
@@ -1289,7 +1302,7 @@ var UserReferralSource = ({
|
|
1289
1302
|
orientation: "vertical",
|
1290
1303
|
options: optionsWithOther,
|
1291
1304
|
defaultValue: field.value,
|
1292
|
-
onChange: (e) => field.onChange(e
|
1305
|
+
onChange: (e) => field.onChange(e),
|
1293
1306
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
1294
1307
|
}
|
1295
1308
|
);
|
@@ -271,7 +271,7 @@ var FloatBox = ({
|
|
271
271
|
side = "bottom",
|
272
272
|
sideOffset = 40,
|
273
273
|
align = "center",
|
274
|
-
|
274
|
+
withArrow = false,
|
275
275
|
...props
|
276
276
|
}) => {
|
277
277
|
let stylesMap = {
|
@@ -313,7 +313,7 @@ var FloatBox = ({
|
|
313
313
|
"data-side": side,
|
314
314
|
"data-floatbox-state": open ? "open" : "closed"
|
315
315
|
},
|
316
|
-
|
316
|
+
withArrow && /* @__PURE__ */ React11.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
|
317
317
|
/* @__PURE__ */ React11.createElement("span", null, props.children)
|
318
318
|
);
|
319
319
|
};
|
@@ -426,6 +426,7 @@ var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
426
426
|
/* @__PURE__ */ React12.createElement(
|
427
427
|
FloatBox,
|
428
428
|
{
|
429
|
+
withArrow: true,
|
429
430
|
align: orientation === "vertical" ? "start" : "start",
|
430
431
|
side: orientation === "vertical" ? "right" : "bottom",
|
431
432
|
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
@@ -122,7 +122,7 @@ var FloatBox = ({
|
|
122
122
|
side = "bottom",
|
123
123
|
sideOffset = 40,
|
124
124
|
align = "center",
|
125
|
-
|
125
|
+
withArrow = false,
|
126
126
|
...props
|
127
127
|
}) => {
|
128
128
|
let stylesMap = {
|
@@ -164,7 +164,7 @@ var FloatBox = ({
|
|
164
164
|
"data-side": side,
|
165
165
|
"data-floatbox-state": open ? "open" : "closed"
|
166
166
|
},
|
167
|
-
|
167
|
+
withArrow && /* @__PURE__ */ React9.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
|
168
168
|
/* @__PURE__ */ React9.createElement("span", null, props.children)
|
169
169
|
);
|
170
170
|
};
|
@@ -277,6 +277,7 @@ var TabsTrigger = React10.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
277
277
|
/* @__PURE__ */ React10.createElement(
|
278
278
|
FloatBox,
|
279
279
|
{
|
280
|
+
withArrow: true,
|
280
281
|
align: orientation === "vertical" ? "start" : "start",
|
281
282
|
side: orientation === "vertical" ? "right" : "bottom",
|
282
283
|
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FC, InputHTMLAttributes } from 'react';
|
2
|
-
import { P as PositionType, D as DirectionType, d as PricingPlanTexts, R as RadioOptionType } from '../../textTypes-
|
2
|
+
import { P as PositionType, D as DirectionType, d as PricingPlanTexts, R as RadioOptionType } from '../../textTypes-0bvyKoeH.mjs';
|
3
3
|
|
4
4
|
type PlanFeature = {
|
5
5
|
soon?: boolean;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FC, InputHTMLAttributes } from 'react';
|
2
|
-
import { P as PositionType, D as DirectionType, d as PricingPlanTexts, R as RadioOptionType } from '../../textTypes-
|
2
|
+
import { P as PositionType, D as DirectionType, d as PricingPlanTexts, R as RadioOptionType } from '../../textTypes-0bvyKoeH.js';
|
3
3
|
|
4
4
|
type PlanFeature = {
|
5
5
|
soon?: boolean;
|
@@ -2870,7 +2870,7 @@ var FloatBox = ({
|
|
2870
2870
|
side = "bottom",
|
2871
2871
|
sideOffset = 40,
|
2872
2872
|
align = "center",
|
2873
|
-
|
2873
|
+
withArrow = false,
|
2874
2874
|
...props
|
2875
2875
|
}) => {
|
2876
2876
|
let stylesMap = {
|
@@ -2912,7 +2912,7 @@ var FloatBox = ({
|
|
2912
2912
|
"data-side": side,
|
2913
2913
|
"data-floatbox-state": open ? "open" : "closed"
|
2914
2914
|
},
|
2915
|
-
|
2915
|
+
withArrow && /* @__PURE__ */ React13.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
|
2916
2916
|
/* @__PURE__ */ React13.createElement("span", null, props.children)
|
2917
2917
|
);
|
2918
2918
|
};
|
@@ -3025,6 +3025,7 @@ var TabsTrigger = React14.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
3025
3025
|
/* @__PURE__ */ React14.createElement(
|
3026
3026
|
FloatBox,
|
3027
3027
|
{
|
3028
|
+
withArrow: true,
|
3028
3029
|
align: orientation === "vertical" ? "start" : "start",
|
3029
3030
|
side: orientation === "vertical" ? "right" : "bottom",
|
3030
3031
|
sideOffset: orientation === "vertical" ? width + 30 : 45,
|