@sikka/hawa 0.11.9-next → 0.11.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 +66 -60
- package/dist/index.d.ts +66 -60
- package/dist/index.js +447 -435
- package/dist/index.mjs +359 -353
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6856,17 +6856,78 @@ var Navbar = function(props) {
|
|
|
6856
6856
|
}, "Contact"))));
|
|
6857
6857
|
};
|
|
6858
6858
|
// components/blocks/auth/LoginForm.tsx
|
|
6859
|
-
var
|
|
6859
|
+
var import_react40 = __toESM(require("react"));
|
|
6860
6860
|
var import_react_hook_form = require("react-hook-form");
|
|
6861
6861
|
var import_zod = require("@hookform/resolvers/zod");
|
|
6862
6862
|
var import_libphonenumber_js = require("libphonenumber-js");
|
|
6863
6863
|
var z = __toESM(require("zod"));
|
|
6864
|
+
// components/blocks/auth/AuthButtons.tsx
|
|
6865
|
+
var import_react39 = __toESM(require("react"));
|
|
6866
|
+
var AuthButtons = function(props) {
|
|
6867
|
+
var _props_texts, _props_texts1, _props_texts2, _props_texts3, _props_texts4, _props_texts5, _props_texts6;
|
|
6868
|
+
var _props_texts_continueWithGoogle, _props_texts_continueWithGithub, _props_texts_continueWithTwitter, _props_texts_continueWithApple, _props_texts_continueWithMicrosoft, _props_texts_continueWithEmail, _props_texts_continueWithPhone;
|
|
6869
|
+
return /* @__PURE__ */ import_react39.default.createElement("div", {
|
|
6870
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
6871
|
+
}, props.viaGoogle && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6872
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6873
|
+
variant: "outline",
|
|
6874
|
+
onClick: props.handleGoogle
|
|
6875
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.google, {
|
|
6876
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6877
|
+
}), (_props_texts_continueWithGoogle = (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.continueWithGoogle) !== null && _props_texts_continueWithGoogle !== void 0 ? _props_texts_continueWithGoogle : "Continue With Google"), props.viaGithub && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6878
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6879
|
+
variant: "outline",
|
|
6880
|
+
onClick: props.handleGithub
|
|
6881
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.github, {
|
|
6882
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6883
|
+
}), (_props_texts_continueWithGithub = (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.continueWithGithub) !== null && _props_texts_continueWithGithub !== void 0 ? _props_texts_continueWithGithub : "Continue With Github"), props.viaTwitter && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6884
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6885
|
+
variant: "outline",
|
|
6886
|
+
onClick: props.handleTwitter
|
|
6887
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.twitter, {
|
|
6888
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6889
|
+
}), (_props_texts_continueWithTwitter = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.continueWithTwitter) !== null && _props_texts_continueWithTwitter !== void 0 ? _props_texts_continueWithTwitter : "Continue With Twitter"), props.viaApple && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6890
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6891
|
+
variant: "outline",
|
|
6892
|
+
onClick: props.handleApple
|
|
6893
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.apple, {
|
|
6894
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6895
|
+
}), (_props_texts_continueWithApple = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.continueWithApple) !== null && _props_texts_continueWithApple !== void 0 ? _props_texts_continueWithApple : "Continue With Apple"), props.viaMicrosoft && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6896
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6897
|
+
variant: "outline",
|
|
6898
|
+
onClick: props.handleMicrosoft
|
|
6899
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.microsoft, {
|
|
6900
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6901
|
+
}), (_props_texts_continueWithMicrosoft = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.continueWithMicrosoft) !== null && _props_texts_continueWithMicrosoft !== void 0 ? _props_texts_continueWithMicrosoft : "Continue With Microsoft"), props.viaEmail && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6902
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6903
|
+
variant: "outline",
|
|
6904
|
+
onClick: props.handleEmail
|
|
6905
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.mail, {
|
|
6906
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6907
|
+
}), (_props_texts_continueWithEmail = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.continueWithEmail) !== null && _props_texts_continueWithEmail !== void 0 ? _props_texts_continueWithEmail : "Continue With Email"), props.viaPhone && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
6908
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
6909
|
+
variant: "outline",
|
|
6910
|
+
onClick: props.handlePhone
|
|
6911
|
+
}, /* @__PURE__ */ import_react39.default.createElement(Logos.phone, {
|
|
6912
|
+
className: "hawa-h-4 hawa-w-4"
|
|
6913
|
+
}), (_props_texts_continueWithPhone = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.continueWithPhone) !== null && _props_texts_continueWithPhone !== void 0 ? _props_texts_continueWithPhone : "Continue With Phone"));
|
|
6914
|
+
};
|
|
6915
|
+
// components/blocks/auth/LoginForm.tsx
|
|
6864
6916
|
var LoginForm = function(_param) {
|
|
6865
6917
|
var loginType = _param.loginType, texts = _param.texts, _param_passwordLength = _param.passwordLength, passwordLength = _param_passwordLength === void 0 ? 8 : _param_passwordLength, props = _object_without_properties(_param, [
|
|
6866
6918
|
"loginType",
|
|
6867
6919
|
"texts",
|
|
6868
6920
|
"passwordLength"
|
|
6869
6921
|
]);
|
|
6922
|
+
var thirdPartyAuthTexts = {
|
|
6923
|
+
continueWithGoogle: texts === null || texts === void 0 ? void 0 : texts.continueWithGoogle,
|
|
6924
|
+
continueWithTwitter: texts === null || texts === void 0 ? void 0 : texts.continueWithTwitter,
|
|
6925
|
+
continueWithApple: texts === null || texts === void 0 ? void 0 : texts.continueWithApple,
|
|
6926
|
+
continueWithMicrosoft: texts === null || texts === void 0 ? void 0 : texts.continueWithMicrosoft,
|
|
6927
|
+
continueWithGithub: texts === null || texts === void 0 ? void 0 : texts.continueWithGithub,
|
|
6928
|
+
continueWithEmail: texts === null || texts === void 0 ? void 0 : texts.continueWithEmail,
|
|
6929
|
+
continueWithPhone: texts === null || texts === void 0 ? void 0 : texts.continueWithPhone
|
|
6930
|
+
};
|
|
6870
6931
|
var formSchema;
|
|
6871
6932
|
if (loginType === "email") {
|
|
6872
6933
|
formSchema = z.object({
|
|
@@ -6935,13 +6996,13 @@ var LoginForm = function(_param) {
|
|
|
6935
6996
|
var renderFields = function() {
|
|
6936
6997
|
switch(loginType){
|
|
6937
6998
|
case "email":
|
|
6938
|
-
return /* @__PURE__ */
|
|
6999
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
6939
7000
|
control: control,
|
|
6940
7001
|
name: "email",
|
|
6941
7002
|
render: function(param) {
|
|
6942
7003
|
var field = param.field;
|
|
6943
7004
|
var _formState_errors_email;
|
|
6944
|
-
return /* @__PURE__ */
|
|
7005
|
+
return /* @__PURE__ */ import_react40.default.createElement(Input, _object_spread({
|
|
6945
7006
|
width: "full",
|
|
6946
7007
|
autoComplete: "email",
|
|
6947
7008
|
label: (texts === null || texts === void 0 ? void 0 : texts.emailLabel) || "Email",
|
|
@@ -6949,13 +7010,13 @@ var LoginForm = function(_param) {
|
|
|
6949
7010
|
placeholder: (texts === null || texts === void 0 ? void 0 : texts.emailPlaceholder) || "contact@sikka.io"
|
|
6950
7011
|
}, field));
|
|
6951
7012
|
}
|
|
6952
|
-
}), /* @__PURE__ */
|
|
7013
|
+
}), /* @__PURE__ */ import_react40.default.createElement("div", null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
6953
7014
|
control: control,
|
|
6954
7015
|
name: "password",
|
|
6955
7016
|
render: function(param) {
|
|
6956
7017
|
var field = param.field;
|
|
6957
7018
|
var _formState_errors_password;
|
|
6958
|
-
return /* @__PURE__ */
|
|
7019
|
+
return /* @__PURE__ */ import_react40.default.createElement(Input, _object_spread({
|
|
6959
7020
|
width: "full",
|
|
6960
7021
|
autoComplete: "current-password",
|
|
6961
7022
|
type: "password",
|
|
@@ -6964,18 +7025,18 @@ var LoginForm = function(_param) {
|
|
|
6964
7025
|
helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
|
|
6965
7026
|
}, field));
|
|
6966
7027
|
}
|
|
6967
|
-
}), !props.withoutResetPassword && /* @__PURE__ */
|
|
7028
|
+
}), !props.withoutResetPassword && /* @__PURE__ */ import_react40.default.createElement("div", {
|
|
6968
7029
|
onClick: props.onForgotPassword,
|
|
6969
7030
|
className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-text-xs dark:hawa-text-gray-300"
|
|
6970
7031
|
}, (texts === null || texts === void 0 ? void 0 : texts.forgotPassword) || "Forgot Password?")));
|
|
6971
7032
|
case "username":
|
|
6972
|
-
return /* @__PURE__ */
|
|
7033
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
6973
7034
|
control: control,
|
|
6974
7035
|
name: "username",
|
|
6975
7036
|
render: function(param) {
|
|
6976
7037
|
var field = param.field;
|
|
6977
7038
|
var _formState_errors_username;
|
|
6978
|
-
return /* @__PURE__ */
|
|
7039
|
+
return /* @__PURE__ */ import_react40.default.createElement(Input, _object_spread({
|
|
6979
7040
|
width: "full",
|
|
6980
7041
|
autoComplete: "username",
|
|
6981
7042
|
label: (texts === null || texts === void 0 ? void 0 : texts.usernameLabel) || "Username",
|
|
@@ -6983,13 +7044,13 @@ var LoginForm = function(_param) {
|
|
|
6983
7044
|
placeholder: (texts === null || texts === void 0 ? void 0 : texts.usernamePlaceholder) || "sikka_sa"
|
|
6984
7045
|
}, field));
|
|
6985
7046
|
}
|
|
6986
|
-
}), /* @__PURE__ */
|
|
7047
|
+
}), /* @__PURE__ */ import_react40.default.createElement("div", null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
6987
7048
|
control: control,
|
|
6988
7049
|
name: "password",
|
|
6989
7050
|
render: function(param) {
|
|
6990
7051
|
var field = param.field;
|
|
6991
7052
|
var _formState_errors_password;
|
|
6992
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ import_react40.default.createElement(Input, _object_spread({
|
|
6993
7054
|
width: "full",
|
|
6994
7055
|
autoComplete: "current-password",
|
|
6995
7056
|
type: "password",
|
|
@@ -6998,18 +7059,18 @@ var LoginForm = function(_param) {
|
|
|
6998
7059
|
helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
|
|
6999
7060
|
}, field));
|
|
7000
7061
|
}
|
|
7001
|
-
}), !props.withoutResetPassword && /* @__PURE__ */
|
|
7062
|
+
}), !props.withoutResetPassword && /* @__PURE__ */ import_react40.default.createElement("div", {
|
|
7002
7063
|
onClick: props.onForgotPassword,
|
|
7003
7064
|
className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-text-xs dark:hawa-text-gray-300"
|
|
7004
7065
|
}, (texts === null || texts === void 0 ? void 0 : texts.forgotPassword) || "Forgot Password?")));
|
|
7005
7066
|
case "phone":
|
|
7006
|
-
return /* @__PURE__ */
|
|
7067
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
7007
7068
|
control: control,
|
|
7008
7069
|
name: "phone",
|
|
7009
7070
|
render: function(param) {
|
|
7010
7071
|
var field = param.field;
|
|
7011
7072
|
var _formState_errors_phone;
|
|
7012
|
-
return /* @__PURE__ */
|
|
7073
|
+
return /* @__PURE__ */ import_react40.default.createElement(PhoneInput, {
|
|
7013
7074
|
label: texts === null || texts === void 0 ? void 0 : texts.phoneLabel,
|
|
7014
7075
|
helperText: (_formState_errors_phone = formState.errors.phone) === null || _formState_errors_phone === void 0 ? void 0 : _formState_errors_phone.message,
|
|
7015
7076
|
preferredCountry: {
|
|
@@ -7022,13 +7083,13 @@ var LoginForm = function(_param) {
|
|
|
7022
7083
|
}
|
|
7023
7084
|
}));
|
|
7024
7085
|
case "link":
|
|
7025
|
-
return /* @__PURE__ */
|
|
7086
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, /* @__PURE__ */ import_react40.default.createElement(import_react_hook_form.Controller, {
|
|
7026
7087
|
control: control,
|
|
7027
7088
|
name: "email",
|
|
7028
7089
|
render: function(param) {
|
|
7029
7090
|
var field = param.field;
|
|
7030
7091
|
var _formState_errors_email;
|
|
7031
|
-
return /* @__PURE__ */
|
|
7092
|
+
return /* @__PURE__ */ import_react40.default.createElement(Input, _object_spread({
|
|
7032
7093
|
width: "full",
|
|
7033
7094
|
autoComplete: "email",
|
|
7034
7095
|
label: (texts === null || texts === void 0 ? void 0 : texts.emailLabel) || "Email",
|
|
@@ -7041,17 +7102,17 @@ var LoginForm = function(_param) {
|
|
|
7041
7102
|
break;
|
|
7042
7103
|
}
|
|
7043
7104
|
};
|
|
7044
|
-
return /* @__PURE__ */
|
|
7105
|
+
return /* @__PURE__ */ import_react40.default.createElement("div", {
|
|
7045
7106
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
7046
|
-
}, /* @__PURE__ */
|
|
7107
|
+
}, /* @__PURE__ */ import_react40.default.createElement(Card, {
|
|
7047
7108
|
dir: props.direction
|
|
7048
|
-
}, /* @__PURE__ */
|
|
7109
|
+
}, /* @__PURE__ */ import_react40.default.createElement(CardContent, {
|
|
7049
7110
|
headless: true
|
|
7050
|
-
}, props.showError && /* @__PURE__ */
|
|
7111
|
+
}, props.showError && /* @__PURE__ */ import_react40.default.createElement(Alert, {
|
|
7051
7112
|
title: props.errorTitle,
|
|
7052
7113
|
text: props.errorText,
|
|
7053
7114
|
severity: "error"
|
|
7054
|
-
}), /* @__PURE__ */
|
|
7115
|
+
}), /* @__PURE__ */ import_react40.default.createElement("form", {
|
|
7055
7116
|
className: "hawa-flex hawa-flex-col hawa-gap-4",
|
|
7056
7117
|
onSubmit: handleSubmit(function(e) {
|
|
7057
7118
|
if (props.onLogin) {
|
|
@@ -7060,42 +7121,26 @@ var LoginForm = function(_param) {
|
|
|
7060
7121
|
console.log("Form is submitted but onLogin prop is missing");
|
|
7061
7122
|
}
|
|
7062
7123
|
})
|
|
7063
|
-
}, renderFields(), /* @__PURE__ */
|
|
7124
|
+
}, renderFields(), /* @__PURE__ */ import_react40.default.createElement(Button, {
|
|
7064
7125
|
className: "hawa-mt-0 hawa-w-full",
|
|
7065
7126
|
type: "submit",
|
|
7066
7127
|
isLoading: props.isLoading
|
|
7067
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login"), props.additionalButtons, props.allowRegister && /* @__PURE__ */
|
|
7128
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login"), props.additionalButtons, props.allowRegister && /* @__PURE__ */ import_react40.default.createElement("div", {
|
|
7068
7129
|
className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal hawa-select-none dark:hawa-text-gray-300"
|
|
7069
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */
|
|
7130
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react40.default.createElement("span", {
|
|
7070
7131
|
onClick: props.onRouteToRegister,
|
|
7071
7132
|
className: "clickable-link"
|
|
7072
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.createAccount) || "Create Account")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */
|
|
7133
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.createAccount) || "Create Account")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react40.default.createElement(CardFooter, {
|
|
7073
7134
|
className: cn(props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2")
|
|
7074
|
-
},
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
}),
|
|
7083
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7084
|
-
variant: "outline",
|
|
7085
|
-
onClick: props.onGithubLogin
|
|
7086
|
-
}, props.isGithubLoading ? /* @__PURE__ */ import_react39.default.createElement(Loading, {
|
|
7087
|
-
size: "button"
|
|
7088
|
-
}) : /* @__PURE__ */ import_react39.default.createElement(Logos.github, {
|
|
7089
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7090
|
-
}), !props.logosOnly && (texts === null || texts === void 0 ? void 0 : texts.loginViaGithubLabel)), props.viaTwitter && /* @__PURE__ */ import_react39.default.createElement(Button, {
|
|
7091
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7092
|
-
variant: "outline",
|
|
7093
|
-
onClick: props.onTwitterLogin
|
|
7094
|
-
}, props.isTwitterLoading ? /* @__PURE__ */ import_react39.default.createElement(Loading, {
|
|
7095
|
-
size: "button"
|
|
7096
|
-
}) : /* @__PURE__ */ import_react39.default.createElement(Logos.twitter, {
|
|
7097
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7098
|
-
}), " ", !props.logosOnly && (texts === null || texts === void 0 ? void 0 : texts.loginViaTwitterLabel))) : null), props.handleColorMode && props.handleLanguage && /* @__PURE__ */ import_react39.default.createElement(InterfaceSettings, {
|
|
7135
|
+
}, /* @__PURE__ */ import_react40.default.createElement(AuthButtons, {
|
|
7136
|
+
texts: thirdPartyAuthTexts,
|
|
7137
|
+
viaGoogle: props.viaGoogle,
|
|
7138
|
+
viaGithub: props.viaGithub,
|
|
7139
|
+
viaTwitter: props.viaTwitter,
|
|
7140
|
+
handleGoogle: props.onGoogleLogin,
|
|
7141
|
+
handleGithub: props.onGithubLogin,
|
|
7142
|
+
handleTwitter: props.onTwitterLogin
|
|
7143
|
+
})) : null), props.handleColorMode && props.handleLanguage && /* @__PURE__ */ import_react40.default.createElement(InterfaceSettings, {
|
|
7099
7144
|
currentColorMode: props.currentColorMode,
|
|
7100
7145
|
currentLanguage: props.currentLanguage,
|
|
7101
7146
|
handleColorMode: props.handleColorMode,
|
|
@@ -7103,7 +7148,7 @@ var LoginForm = function(_param) {
|
|
|
7103
7148
|
}));
|
|
7104
7149
|
};
|
|
7105
7150
|
// components/blocks/auth/RegisterForm.tsx
|
|
7106
|
-
var
|
|
7151
|
+
var import_react41 = __toESM(require("react"));
|
|
7107
7152
|
var import_react_hook_form2 = require("react-hook-form");
|
|
7108
7153
|
var import_zod2 = require("@hookform/resolvers/zod");
|
|
7109
7154
|
var z2 = __toESM(require("zod"));
|
|
@@ -7111,6 +7156,15 @@ var RegisterForm = function(_param) {
|
|
|
7111
7156
|
var texts = _param.texts, props = _object_without_properties(_param, [
|
|
7112
7157
|
"texts"
|
|
7113
7158
|
]);
|
|
7159
|
+
var thirdPartyAuthTexts = {
|
|
7160
|
+
continueWithGoogle: texts === null || texts === void 0 ? void 0 : texts.continueWithGoogle,
|
|
7161
|
+
continueWithTwitter: texts === null || texts === void 0 ? void 0 : texts.continueWithTwitter,
|
|
7162
|
+
continueWithApple: texts === null || texts === void 0 ? void 0 : texts.continueWithApple,
|
|
7163
|
+
continueWithMicrosoft: texts === null || texts === void 0 ? void 0 : texts.continueWithMicrosoft,
|
|
7164
|
+
continueWithGithub: texts === null || texts === void 0 ? void 0 : texts.continueWithGithub,
|
|
7165
|
+
continueWithEmail: texts === null || texts === void 0 ? void 0 : texts.continueWithEmail,
|
|
7166
|
+
continueWithPhone: texts === null || texts === void 0 ? void 0 : texts.continueWithPhone
|
|
7167
|
+
};
|
|
7114
7168
|
var methods = (0, import_react_hook_form2.useForm)();
|
|
7115
7169
|
var fieldSchemas = {};
|
|
7116
7170
|
props.registerFields.forEach(function(field) {
|
|
@@ -7179,17 +7233,17 @@ var RegisterForm = function(_param) {
|
|
|
7179
7233
|
var _ref = (0, import_react_hook_form2.useForm)({
|
|
7180
7234
|
resolver: (0, import_zod2.zodResolver)(formSchema)
|
|
7181
7235
|
}), handleSubmit = _ref.handleSubmit, control = _ref.control, formState = _ref.formState;
|
|
7182
|
-
return /* @__PURE__ */
|
|
7236
|
+
return /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7183
7237
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
7184
|
-
}, /* @__PURE__ */
|
|
7238
|
+
}, /* @__PURE__ */ import_react41.default.createElement(Card, {
|
|
7185
7239
|
dir: props.direction
|
|
7186
|
-
}, /* @__PURE__ */
|
|
7240
|
+
}, /* @__PURE__ */ import_react41.default.createElement(CardContent, {
|
|
7187
7241
|
headless: true
|
|
7188
|
-
}, /* @__PURE__ */
|
|
7242
|
+
}, /* @__PURE__ */ import_react41.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react41.default.createElement(Alert, {
|
|
7189
7243
|
title: props.errorTitle,
|
|
7190
7244
|
text: props.errorText,
|
|
7191
7245
|
severity: "error"
|
|
7192
|
-
}), /* @__PURE__ */
|
|
7246
|
+
}), /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react41.default.createElement("form", {
|
|
7193
7247
|
onSubmit: handleSubmit(function(e) {
|
|
7194
7248
|
if (props.onRegister) {
|
|
7195
7249
|
return props.onRegister(e);
|
|
@@ -7198,18 +7252,18 @@ var RegisterForm = function(_param) {
|
|
|
7198
7252
|
}
|
|
7199
7253
|
}),
|
|
7200
7254
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
7201
|
-
}, /* @__PURE__ */
|
|
7255
|
+
}, /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7202
7256
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
7203
7257
|
}, props.registerFields.map(function(fld, i) {
|
|
7204
7258
|
if (fld === "fullname") {
|
|
7205
|
-
return /* @__PURE__ */
|
|
7259
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7206
7260
|
key: i,
|
|
7207
7261
|
control: control,
|
|
7208
7262
|
name: "fullName",
|
|
7209
7263
|
render: function(param) {
|
|
7210
7264
|
var field = param.field;
|
|
7211
7265
|
var _formState_errors_fullName;
|
|
7212
|
-
return /* @__PURE__ */
|
|
7266
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7213
7267
|
width: "full",
|
|
7214
7268
|
label: texts === null || texts === void 0 ? void 0 : texts.fullNameLabel,
|
|
7215
7269
|
placeholder: texts === null || texts === void 0 ? void 0 : texts.fullNamePlaceholder,
|
|
@@ -7219,14 +7273,14 @@ var RegisterForm = function(_param) {
|
|
|
7219
7273
|
});
|
|
7220
7274
|
}
|
|
7221
7275
|
if (fld === "email") {
|
|
7222
|
-
return /* @__PURE__ */
|
|
7276
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7223
7277
|
key: i,
|
|
7224
7278
|
control: control,
|
|
7225
7279
|
name: "email",
|
|
7226
7280
|
render: function(param) {
|
|
7227
7281
|
var field = param.field;
|
|
7228
7282
|
var _formState_errors_email;
|
|
7229
|
-
return /* @__PURE__ */
|
|
7283
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7230
7284
|
width: "full",
|
|
7231
7285
|
autoComplete: "email",
|
|
7232
7286
|
label: texts === null || texts === void 0 ? void 0 : texts.emailLabel,
|
|
@@ -7237,14 +7291,14 @@ var RegisterForm = function(_param) {
|
|
|
7237
7291
|
});
|
|
7238
7292
|
}
|
|
7239
7293
|
if (fld === "username") {
|
|
7240
|
-
return /* @__PURE__ */
|
|
7294
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7241
7295
|
key: i,
|
|
7242
7296
|
control: control,
|
|
7243
7297
|
name: "username",
|
|
7244
7298
|
render: function(param) {
|
|
7245
7299
|
var field = param.field;
|
|
7246
7300
|
var _formState_errors_username;
|
|
7247
|
-
return /* @__PURE__ */
|
|
7301
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7248
7302
|
width: "full",
|
|
7249
7303
|
autoComplete: "username",
|
|
7250
7304
|
label: texts === null || texts === void 0 ? void 0 : texts.usernameLabel,
|
|
@@ -7254,13 +7308,13 @@ var RegisterForm = function(_param) {
|
|
|
7254
7308
|
}
|
|
7255
7309
|
});
|
|
7256
7310
|
}
|
|
7257
|
-
})), /* @__PURE__ */
|
|
7311
|
+
})), /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7258
7312
|
control: control,
|
|
7259
7313
|
name: "password",
|
|
7260
7314
|
render: function(param) {
|
|
7261
7315
|
var field = param.field;
|
|
7262
7316
|
var _formState_errors_password;
|
|
7263
|
-
return /* @__PURE__ */
|
|
7317
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7264
7318
|
width: "full",
|
|
7265
7319
|
type: "password",
|
|
7266
7320
|
autoComplete: "new-password",
|
|
@@ -7269,13 +7323,13 @@ var RegisterForm = function(_param) {
|
|
|
7269
7323
|
helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
|
|
7270
7324
|
}, field));
|
|
7271
7325
|
}
|
|
7272
|
-
}), /* @__PURE__ */
|
|
7326
|
+
}), /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7273
7327
|
control: control,
|
|
7274
7328
|
name: "confirm_password",
|
|
7275
7329
|
render: function(param) {
|
|
7276
7330
|
var field = param.field;
|
|
7277
7331
|
var _formState_errors_confirm_password;
|
|
7278
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7279
7333
|
width: "full",
|
|
7280
7334
|
type: "password",
|
|
7281
7335
|
autoComplete: "new-password",
|
|
@@ -7284,25 +7338,25 @@ var RegisterForm = function(_param) {
|
|
|
7284
7338
|
helperText: (_formState_errors_confirm_password = formState.errors.confirm_password) === null || _formState_errors_confirm_password === void 0 ? void 0 : _formState_errors_confirm_password.message
|
|
7285
7339
|
}, field));
|
|
7286
7340
|
}
|
|
7287
|
-
}), props.additionalInputs, props.showRefCode && /* @__PURE__ */
|
|
7341
|
+
}), props.additionalInputs, props.showRefCode && /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7288
7342
|
control: control,
|
|
7289
7343
|
name: "refCode",
|
|
7290
7344
|
render: function(param) {
|
|
7291
7345
|
var field = param.field;
|
|
7292
7346
|
var _formState_errors_refCode;
|
|
7293
|
-
return /* @__PURE__ */
|
|
7347
|
+
return /* @__PURE__ */ import_react41.default.createElement(Input, _object_spread({
|
|
7294
7348
|
width: "full",
|
|
7295
7349
|
label: texts === null || texts === void 0 ? void 0 : texts.refCode,
|
|
7296
7350
|
placeholder: (texts === null || texts === void 0 ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
|
|
7297
7351
|
helperText: (_formState_errors_refCode = formState.errors.refCode) === null || _formState_errors_refCode === void 0 ? void 0 : _formState_errors_refCode.message
|
|
7298
7352
|
}, field));
|
|
7299
7353
|
}
|
|
7300
|
-
}), props.showUserSource && /* @__PURE__ */
|
|
7354
|
+
}), props.showUserSource && /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7301
7355
|
control: control,
|
|
7302
7356
|
name: "reference",
|
|
7303
7357
|
render: function(param) {
|
|
7304
7358
|
var field = param.field;
|
|
7305
|
-
return /* @__PURE__ */
|
|
7359
|
+
return /* @__PURE__ */ import_react41.default.createElement(Select, {
|
|
7306
7360
|
label: (texts === null || texts === void 0 ? void 0 : texts.userReferenceLabel) || "How did you learn about us?",
|
|
7307
7361
|
placeholder: texts === null || texts === void 0 ? void 0 : texts.userReferencePlaceholder,
|
|
7308
7362
|
isCreatable: false,
|
|
@@ -7315,74 +7369,58 @@ var RegisterForm = function(_param) {
|
|
|
7315
7369
|
}
|
|
7316
7370
|
});
|
|
7317
7371
|
}
|
|
7318
|
-
}), /* @__PURE__ */
|
|
7372
|
+
}), /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7319
7373
|
className: "hawa-flex hawa-flex-col hawa-gap-3"
|
|
7320
|
-
}, props.showTermsOption && /* @__PURE__ */
|
|
7374
|
+
}, props.showTermsOption && /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7321
7375
|
control: control,
|
|
7322
7376
|
name: "terms_accepted",
|
|
7323
7377
|
render: function(param) {
|
|
7324
7378
|
var field = param.field;
|
|
7325
7379
|
var _formState_errors_terms_accepted_message, _formState_errors_terms_accepted;
|
|
7326
|
-
return /* @__PURE__ */
|
|
7380
|
+
return /* @__PURE__ */ import_react41.default.createElement(Checkbox, {
|
|
7327
7381
|
id: "terms_accepted",
|
|
7328
7382
|
helperText: (_formState_errors_terms_accepted = formState.errors.terms_accepted) === null || _formState_errors_terms_accepted === void 0 ? void 0 : (_formState_errors_terms_accepted_message = _formState_errors_terms_accepted.message) === null || _formState_errors_terms_accepted_message === void 0 ? void 0 : _formState_errors_terms_accepted_message.toString(),
|
|
7329
7383
|
onCheckedChange: function(e) {
|
|
7330
7384
|
return field.onChange(e);
|
|
7331
7385
|
},
|
|
7332
|
-
label: /* @__PURE__ */
|
|
7386
|
+
label: /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7333
7387
|
className: "hawa-flex hawa-flex-row hawa-gap-0.5"
|
|
7334
|
-
}, /* @__PURE__ */
|
|
7388
|
+
}, /* @__PURE__ */ import_react41.default.createElement("span", null, texts === null || texts === void 0 ? void 0 : texts.iAcceptText), " ", /* @__PURE__ */ import_react41.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react41.default.createElement("a", {
|
|
7335
7389
|
onClick: props.onRouteToTOS,
|
|
7336
7390
|
className: "clickable-link"
|
|
7337
7391
|
}, texts === null || texts === void 0 ? void 0 : texts.termsText)))
|
|
7338
7392
|
});
|
|
7339
7393
|
}
|
|
7340
|
-
}), props.showNewsletterOption && /* @__PURE__ */
|
|
7394
|
+
}), props.showNewsletterOption && /* @__PURE__ */ import_react41.default.createElement(import_react_hook_form2.Controller, {
|
|
7341
7395
|
control: control,
|
|
7342
7396
|
name: "newsletter_accepted",
|
|
7343
7397
|
render: function(param) {
|
|
7344
7398
|
var field = param.field;
|
|
7345
|
-
return /* @__PURE__ */
|
|
7399
|
+
return /* @__PURE__ */ import_react41.default.createElement(Checkbox, {
|
|
7346
7400
|
id: "newsletter_accepted",
|
|
7347
7401
|
label: texts === null || texts === void 0 ? void 0 : texts.subscribeToNewsletter,
|
|
7348
7402
|
onCheckedChange: field.onChange
|
|
7349
7403
|
});
|
|
7350
7404
|
}
|
|
7351
|
-
})), /* @__PURE__ */
|
|
7405
|
+
})), /* @__PURE__ */ import_react41.default.createElement(Button, {
|
|
7352
7406
|
isLoading: props.isLoading,
|
|
7353
7407
|
className: "hawa-w-full hawa-mt-4"
|
|
7354
|
-
}, texts === null || texts === void 0 ? void 0 : texts.registerText), props.additionalButtons)), /* @__PURE__ */
|
|
7408
|
+
}, texts === null || texts === void 0 ? void 0 : texts.registerText), props.additionalButtons)), /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7355
7409
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white"
|
|
7356
|
-
}, /* @__PURE__ */
|
|
7410
|
+
}, /* @__PURE__ */ import_react41.default.createElement("span", null, texts === null || texts === void 0 ? void 0 : texts.existingUserText), /* @__PURE__ */ import_react41.default.createElement("span", {
|
|
7357
7411
|
onClick: props.onRouteToLogin,
|
|
7358
7412
|
className: "clickable-link"
|
|
7359
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */
|
|
7413
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react41.default.createElement(CardFooter, {
|
|
7360
7414
|
className: cn(props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2")
|
|
7361
|
-
},
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
})
|
|
7370
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7371
|
-
variant: "outline",
|
|
7372
|
-
onClick: props.onGithubRegister
|
|
7373
|
-
}, props.isGithubLoading ? /* @__PURE__ */ import_react40.default.createElement(Loading, {
|
|
7374
|
-
size: "button"
|
|
7375
|
-
}) : /* @__PURE__ */ import_react40.default.createElement(Logos.github, {
|
|
7376
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7377
|
-
}), " ", !props.logosOnly && (texts === null || texts === void 0 ? void 0 : texts.registerViaGithubLabel)), props.viaTwitter && /* @__PURE__ */ import_react40.default.createElement(Button, {
|
|
7378
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7379
|
-
variant: "outline",
|
|
7380
|
-
onClick: props.onTwitterRegister
|
|
7381
|
-
}, props.isTwitterLoading ? /* @__PURE__ */ import_react40.default.createElement(Loading, {
|
|
7382
|
-
size: "button"
|
|
7383
|
-
}) : /* @__PURE__ */ import_react40.default.createElement(Logos.twitter, {
|
|
7384
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7385
|
-
}), " ", !props.logosOnly && (texts === null || texts === void 0 ? void 0 : texts.registerViaTwitterLabel))) : null), props.handleColorMode && props.handleLanguage && /* @__PURE__ */ import_react40.default.createElement(InterfaceSettings, {
|
|
7415
|
+
}, /* @__PURE__ */ import_react41.default.createElement(AuthButtons, {
|
|
7416
|
+
texts: thirdPartyAuthTexts,
|
|
7417
|
+
viaGoogle: props.viaGoogle,
|
|
7418
|
+
viaGithub: props.viaGithub,
|
|
7419
|
+
viaTwitter: props.viaTwitter,
|
|
7420
|
+
handleGoogle: props.onGoogleRegister,
|
|
7421
|
+
handleGithub: props.onGithubRegister,
|
|
7422
|
+
handleTwitter: props.onTwitterRegister
|
|
7423
|
+
})) : null), props.handleColorMode && props.handleLanguage && /* @__PURE__ */ import_react41.default.createElement(InterfaceSettings, {
|
|
7386
7424
|
currentColorMode: props.currentColorMode,
|
|
7387
7425
|
currentLanguage: props.currentLanguage,
|
|
7388
7426
|
handleColorMode: props.handleColorMode,
|
|
@@ -7390,65 +7428,39 @@ var RegisterForm = function(_param) {
|
|
|
7390
7428
|
}));
|
|
7391
7429
|
};
|
|
7392
7430
|
// components/blocks/auth/AppLanding.tsx
|
|
7393
|
-
var
|
|
7431
|
+
var import_react42 = __toESM(require("react"));
|
|
7394
7432
|
var AppLanding = function(props) {
|
|
7395
|
-
var _props_texts, _props_texts1
|
|
7396
|
-
|
|
7397
|
-
return /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7433
|
+
var _props_texts, _props_texts1;
|
|
7434
|
+
return /* @__PURE__ */ import_react42.default.createElement("div", {
|
|
7398
7435
|
dir: props.direction
|
|
7399
|
-
}, /* @__PURE__ */
|
|
7436
|
+
}, /* @__PURE__ */ import_react42.default.createElement(Card, null, /* @__PURE__ */ import_react42.default.createElement(CardContent, {
|
|
7400
7437
|
headless: true,
|
|
7401
7438
|
className: "hawa-flex hawa-flex-col hawa-gap-6"
|
|
7402
|
-
},
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
},
|
|
7419
|
-
|
|
7420
|
-
}), (_props_texts_continueWithTwitter = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.continueWithTwitter) !== null && _props_texts_continueWithTwitter !== void 0 ? _props_texts_continueWithTwitter : "Continue With Twitter"), props.viaApple && /* @__PURE__ */ import_react41.default.createElement(Button, {
|
|
7421
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7422
|
-
variant: "outline",
|
|
7423
|
-
onClick: props.handleApple
|
|
7424
|
-
}, /* @__PURE__ */ import_react41.default.createElement(Logos.apple, {
|
|
7425
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7426
|
-
}), (_props_texts_continueWithApple = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.continueWithApple) !== null && _props_texts_continueWithApple !== void 0 ? _props_texts_continueWithApple : "Continue With Apple"), props.viaMicrosoft && /* @__PURE__ */ import_react41.default.createElement(Button, {
|
|
7427
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7428
|
-
variant: "outline",
|
|
7429
|
-
onClick: props.handleMicrosoft
|
|
7430
|
-
}, /* @__PURE__ */ import_react41.default.createElement(Logos.microsoft, {
|
|
7431
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7432
|
-
}), (_props_texts_continueWithMicrosoft = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.continueWithMicrosoft) !== null && _props_texts_continueWithMicrosoft !== void 0 ? _props_texts_continueWithMicrosoft : "Continue With Microsoft"), props.viaEmail && /* @__PURE__ */ import_react41.default.createElement(Button, {
|
|
7433
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7434
|
-
variant: "outline",
|
|
7435
|
-
onClick: props.handleEmail
|
|
7436
|
-
}, /* @__PURE__ */ import_react41.default.createElement(Logos.mail, {
|
|
7437
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7438
|
-
}), (_props_texts_continueWithEmail = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.continueWithEmail) !== null && _props_texts_continueWithEmail !== void 0 ? _props_texts_continueWithEmail : "Continue With Email"), props.viaPhone && /* @__PURE__ */ import_react41.default.createElement(Button, {
|
|
7439
|
-
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
|
|
7440
|
-
variant: "outline",
|
|
7441
|
-
onClick: props.handlePhone
|
|
7442
|
-
}, /* @__PURE__ */ import_react41.default.createElement(Logos.phone, {
|
|
7443
|
-
className: "hawa-h-4 hawa-w-4"
|
|
7444
|
-
}), (_props_texts_continueWithPhone = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.continueWithPhone) !== null && _props_texts_continueWithPhone !== void 0 ? _props_texts_continueWithPhone : "Continue With Phone"), !props.withoutSignUp && /* @__PURE__ */ import_react41.default.createElement("div", {
|
|
7439
|
+
}, /* @__PURE__ */ import_react42.default.createElement(AuthButtons, {
|
|
7440
|
+
texts: _object_spread({}, props.texts),
|
|
7441
|
+
viaApple: props.viaApple,
|
|
7442
|
+
viaGoogle: props.viaGoogle,
|
|
7443
|
+
viaEmail: props.viaEmail,
|
|
7444
|
+
viaGithub: props.viaGithub,
|
|
7445
|
+
viaMicrosoft: props.viaMicrosoft,
|
|
7446
|
+
viaPhone: props.viaPhone,
|
|
7447
|
+
viaTwitter: props.viaTwitter,
|
|
7448
|
+
handleApple: props.handleApple,
|
|
7449
|
+
handleGoogle: props.handleGoogle,
|
|
7450
|
+
handleTwitter: props.handleTwitter,
|
|
7451
|
+
handleMicrosoft: props.handleMicrosoft,
|
|
7452
|
+
handleGithub: props.handleGithub,
|
|
7453
|
+
handleEmail: props.handleEmail,
|
|
7454
|
+
handlePhone: props.handlePhone
|
|
7455
|
+
}), !props.withoutSignUp && //TODO: change to "register"
|
|
7456
|
+
/* @__PURE__ */ import_react42.default.createElement("div", {
|
|
7445
7457
|
className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300"
|
|
7446
|
-
}, (
|
|
7458
|
+
}, (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.newUserText, " ", /* @__PURE__ */ import_react42.default.createElement("span", {
|
|
7447
7459
|
onClick: props.handleRouteToRegister,
|
|
7448
7460
|
className: "clickable-link"
|
|
7449
|
-
}, (
|
|
7461
|
+
}, (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.createAccount)))), /* @__PURE__ */ import_react42.default.createElement("div", {
|
|
7450
7462
|
className: "hawa-mt-4 hawa-flex hawa-flex-row hawa-justify-between"
|
|
7451
|
-
}, /* @__PURE__ */
|
|
7463
|
+
}, /* @__PURE__ */ import_react42.default.createElement(Radio, {
|
|
7452
7464
|
onChangeTab: props.handleLanguage,
|
|
7453
7465
|
design: "tabs",
|
|
7454
7466
|
options: [
|
|
@@ -7461,20 +7473,20 @@ var AppLanding = function(props) {
|
|
|
7461
7473
|
label: "English"
|
|
7462
7474
|
}
|
|
7463
7475
|
]
|
|
7464
|
-
}), /* @__PURE__ */
|
|
7476
|
+
}), /* @__PURE__ */ import_react42.default.createElement(Radio, {
|
|
7465
7477
|
onChangeTab: props.handleColorMode,
|
|
7466
7478
|
design: "tabs",
|
|
7467
7479
|
options: [
|
|
7468
7480
|
{
|
|
7469
7481
|
value: "light",
|
|
7470
|
-
label: /* @__PURE__ */
|
|
7482
|
+
label: /* @__PURE__ */ import_react42.default.createElement("svg", {
|
|
7471
7483
|
width: "15",
|
|
7472
7484
|
height: "15",
|
|
7473
7485
|
viewBox: "0 0 15 15",
|
|
7474
7486
|
fill: "none",
|
|
7475
7487
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7476
7488
|
className: "hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-rotate-0 hawa-scale-100 hawa-transition-all dark:hawa--rotate-90"
|
|
7477
|
-
}, /* @__PURE__ */
|
|
7489
|
+
}, /* @__PURE__ */ import_react42.default.createElement("path", {
|
|
7478
7490
|
d: "M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",
|
|
7479
7491
|
fill: "currentColor",
|
|
7480
7492
|
fillRule: "evenodd",
|
|
@@ -7483,7 +7495,7 @@ var AppLanding = function(props) {
|
|
|
7483
7495
|
},
|
|
7484
7496
|
{
|
|
7485
7497
|
value: "dark",
|
|
7486
|
-
label: /* @__PURE__ */
|
|
7498
|
+
label: /* @__PURE__ */ import_react42.default.createElement("svg", {
|
|
7487
7499
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7488
7500
|
width: "24",
|
|
7489
7501
|
height: "24",
|
|
@@ -7494,7 +7506,7 @@ var AppLanding = function(props) {
|
|
|
7494
7506
|
strokeLinecap: "round",
|
|
7495
7507
|
strokeLinejoin: "round",
|
|
7496
7508
|
className: "hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-transition-all dark:hawa-rotate-0 dark:hawa-scale-100"
|
|
7497
|
-
}, /* @__PURE__ */
|
|
7509
|
+
}, /* @__PURE__ */ import_react42.default.createElement("path", {
|
|
7498
7510
|
d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"
|
|
7499
7511
|
}))
|
|
7500
7512
|
}
|
|
@@ -7502,16 +7514,16 @@ var AppLanding = function(props) {
|
|
|
7502
7514
|
})));
|
|
7503
7515
|
};
|
|
7504
7516
|
// components/blocks/auth/CheckEmail.tsx
|
|
7505
|
-
var
|
|
7517
|
+
var import_react43 = __toESM(require("react"));
|
|
7506
7518
|
var CheckEmail = function(param) {
|
|
7507
7519
|
var texts = param.texts, handleResend = param.handleResend;
|
|
7508
|
-
return /* @__PURE__ */
|
|
7520
|
+
return /* @__PURE__ */ import_react43.default.createElement(Card, null, /* @__PURE__ */ import_react43.default.createElement(CardContent, {
|
|
7509
7521
|
headless: true
|
|
7510
|
-
}, /* @__PURE__ */
|
|
7522
|
+
}, /* @__PURE__ */ import_react43.default.createElement("div", {
|
|
7511
7523
|
className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center"
|
|
7512
|
-
}, /* @__PURE__ */
|
|
7524
|
+
}, /* @__PURE__ */ import_react43.default.createElement("div", {
|
|
7513
7525
|
className: "hawa-flex hawa-h-16 hawa-w-16 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground"
|
|
7514
|
-
}, /* @__PURE__ */
|
|
7526
|
+
}, /* @__PURE__ */ import_react43.default.createElement("svg", {
|
|
7515
7527
|
stroke: "currentColor",
|
|
7516
7528
|
fill: "none",
|
|
7517
7529
|
"stroke-width": "2",
|
|
@@ -7521,23 +7533,23 @@ var CheckEmail = function(param) {
|
|
|
7521
7533
|
height: "0.5em",
|
|
7522
7534
|
width: "0.5em",
|
|
7523
7535
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7524
|
-
}, /* @__PURE__ */
|
|
7536
|
+
}, /* @__PURE__ */ import_react43.default.createElement("path", {
|
|
7525
7537
|
d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
|
|
7526
|
-
}), /* @__PURE__ */
|
|
7538
|
+
}), /* @__PURE__ */ import_react43.default.createElement("polyline", {
|
|
7527
7539
|
points: "22,6 12,13 2,6"
|
|
7528
|
-
}))), /* @__PURE__ */
|
|
7540
|
+
}))), /* @__PURE__ */ import_react43.default.createElement("div", {
|
|
7529
7541
|
className: "hawa-m-2 hawa-text-xl hawa-font-bold"
|
|
7530
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */
|
|
7542
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */ import_react43.default.createElement("div", {
|
|
7531
7543
|
className: "hawa-text-sm"
|
|
7532
|
-
}, (texts === null || texts === void 0 ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */
|
|
7544
|
+
}, (texts === null || texts === void 0 ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ import_react43.default.createElement(CardFooter, {
|
|
7533
7545
|
className: "hawa-flex hawa-flex-col hawa-justify-center "
|
|
7534
|
-
}, /* @__PURE__ */
|
|
7546
|
+
}, /* @__PURE__ */ import_react43.default.createElement("span", {
|
|
7535
7547
|
className: "clickable-link hawa-text-sm",
|
|
7536
7548
|
onClick: handleResend
|
|
7537
7549
|
}, (texts === null || texts === void 0 ? void 0 : texts.resendEmail) || "Resend Email")));
|
|
7538
7550
|
};
|
|
7539
7551
|
// components/blocks/auth/NewPassword.tsx
|
|
7540
|
-
var
|
|
7552
|
+
var import_react44 = __toESM(require("react"));
|
|
7541
7553
|
var import_react_hook_form3 = require("react-hook-form");
|
|
7542
7554
|
var import_zod3 = require("@hookform/resolvers/zod");
|
|
7543
7555
|
var z3 = __toESM(require("zod"));
|
|
@@ -7571,18 +7583,18 @@ var NewPasswordForm = function(_param) {
|
|
|
7571
7583
|
var _ref = (0, import_react_hook_form3.useForm)({
|
|
7572
7584
|
resolver: (0, import_zod3.zodResolver)(formSchema)
|
|
7573
7585
|
}), handleSubmit = _ref.handleSubmit, control = _ref.control, formState = _ref.formState;
|
|
7574
|
-
var _ref1 = _sliced_to_array((0,
|
|
7586
|
+
var _ref1 = _sliced_to_array((0, import_react44.useState)(false), 2), matchError = _ref1[0], setMatchError = _ref1[1];
|
|
7575
7587
|
var _texts_dontHaveAccount, _texts_registerText;
|
|
7576
|
-
return /* @__PURE__ */
|
|
7588
|
+
return /* @__PURE__ */ import_react44.default.createElement(Card, {
|
|
7577
7589
|
dir: props.direction
|
|
7578
|
-
}, matchError && /* @__PURE__ */
|
|
7590
|
+
}, matchError && /* @__PURE__ */ import_react44.default.createElement(Alert, {
|
|
7579
7591
|
text: texts === null || texts === void 0 ? void 0 : texts.passwordMatchError,
|
|
7580
7592
|
severity: "error"
|
|
7581
|
-
}), props.passwordChanged ? /* @__PURE__ */
|
|
7593
|
+
}), props.passwordChanged ? /* @__PURE__ */ import_react44.default.createElement(CardContent, {
|
|
7582
7594
|
headless: true
|
|
7583
|
-
}, /* @__PURE__ */
|
|
7595
|
+
}, /* @__PURE__ */ import_react44.default.createElement("div", {
|
|
7584
7596
|
className: "hawa-text-center"
|
|
7585
|
-
}, texts === null || texts === void 0 ? void 0 : texts.passwordChanged)) : /* @__PURE__ */
|
|
7597
|
+
}, texts === null || texts === void 0 ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ import_react44.default.createElement("form", {
|
|
7586
7598
|
onSubmit: handleSubmit(function(e) {
|
|
7587
7599
|
if (props.handleNewPassword) {
|
|
7588
7600
|
return props.handleNewPassword(e);
|
|
@@ -7590,16 +7602,16 @@ var NewPasswordForm = function(_param) {
|
|
|
7590
7602
|
console.log("Form is submitted but handleSubmission prop is missing");
|
|
7591
7603
|
}
|
|
7592
7604
|
})
|
|
7593
|
-
}, !props.headless && /* @__PURE__ */
|
|
7605
|
+
}, !props.headless && /* @__PURE__ */ import_react44.default.createElement(CardHeader, null, /* @__PURE__ */ import_react44.default.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ import_react44.default.createElement(CardDescription, null, "Set a new password for your account")), /* @__PURE__ */ import_react44.default.createElement(CardContent, {
|
|
7594
7606
|
headless: props.headless,
|
|
7595
7607
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
7596
|
-
}, /* @__PURE__ */
|
|
7608
|
+
}, /* @__PURE__ */ import_react44.default.createElement(import_react_hook_form3.Controller, {
|
|
7597
7609
|
control: control,
|
|
7598
7610
|
name: "password",
|
|
7599
7611
|
render: function(param) {
|
|
7600
7612
|
var field = param.field;
|
|
7601
7613
|
var _formState_errors_password;
|
|
7602
|
-
return /* @__PURE__ */
|
|
7614
|
+
return /* @__PURE__ */ import_react44.default.createElement(Input, _object_spread({
|
|
7603
7615
|
width: "full",
|
|
7604
7616
|
type: "password",
|
|
7605
7617
|
autoComplete: "new-password",
|
|
@@ -7608,13 +7620,13 @@ var NewPasswordForm = function(_param) {
|
|
|
7608
7620
|
helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
|
|
7609
7621
|
}, field));
|
|
7610
7622
|
}
|
|
7611
|
-
}), /* @__PURE__ */
|
|
7623
|
+
}), /* @__PURE__ */ import_react44.default.createElement(import_react_hook_form3.Controller, {
|
|
7612
7624
|
control: control,
|
|
7613
7625
|
name: "confirm_password",
|
|
7614
7626
|
render: function(param) {
|
|
7615
7627
|
var field = param.field;
|
|
7616
7628
|
var _formState_errors_confirm_password;
|
|
7617
|
-
return /* @__PURE__ */
|
|
7629
|
+
return /* @__PURE__ */ import_react44.default.createElement(Input, _object_spread({
|
|
7618
7630
|
width: "full",
|
|
7619
7631
|
type: "password",
|
|
7620
7632
|
autoComplete: "new-password",
|
|
@@ -7623,20 +7635,20 @@ var NewPasswordForm = function(_param) {
|
|
|
7623
7635
|
helperText: (_formState_errors_confirm_password = formState.errors.confirm_password) === null || _formState_errors_confirm_password === void 0 ? void 0 : _formState_errors_confirm_password.message
|
|
7624
7636
|
}, field));
|
|
7625
7637
|
}
|
|
7626
|
-
})), /* @__PURE__ */
|
|
7638
|
+
})), /* @__PURE__ */ import_react44.default.createElement(CardFooter, {
|
|
7627
7639
|
className: "hawa-flex hawa-flex-col"
|
|
7628
|
-
}, /* @__PURE__ */
|
|
7640
|
+
}, /* @__PURE__ */ import_react44.default.createElement(Button, {
|
|
7629
7641
|
className: "hawa-w-full",
|
|
7630
7642
|
type: "submit"
|
|
7631
|
-
}, texts === null || texts === void 0 ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */
|
|
7643
|
+
}, texts === null || texts === void 0 ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react44.default.createElement("div", {
|
|
7632
7644
|
className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300"
|
|
7633
|
-
}, (_texts_dontHaveAccount = texts === null || texts === void 0 ? void 0 : texts.dontHaveAccount) !== null && _texts_dontHaveAccount !== void 0 ? _texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */
|
|
7645
|
+
}, (_texts_dontHaveAccount = texts === null || texts === void 0 ? void 0 : texts.dontHaveAccount) !== null && _texts_dontHaveAccount !== void 0 ? _texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */ import_react44.default.createElement("span", {
|
|
7634
7646
|
className: "clickable-link",
|
|
7635
7647
|
onClick: props.handleRouteToRegister
|
|
7636
7648
|
}, (_texts_registerText = texts === null || texts === void 0 ? void 0 : texts.registerText) !== null && _texts_registerText !== void 0 ? _texts_registerText : "Register")))));
|
|
7637
7649
|
};
|
|
7638
7650
|
// components/blocks/auth/ResetPassword.tsx
|
|
7639
|
-
var
|
|
7651
|
+
var import_react45 = __toESM(require("react"));
|
|
7640
7652
|
var import_react_hook_form4 = require("react-hook-form");
|
|
7641
7653
|
var import_zod4 = require("@hookform/resolvers/zod");
|
|
7642
7654
|
var z4 = __toESM(require("zod"));
|
|
@@ -7655,9 +7667,9 @@ var ResetPasswordForm = function(props) {
|
|
|
7655
7667
|
resolver: (0, import_zod4.zodResolver)(formSchema)
|
|
7656
7668
|
}), handleSubmit = _ref.handleSubmit, control = _ref.control, formState = _ref.formState;
|
|
7657
7669
|
var _props_texts_dontHaveAccount, _props_texts_registerText;
|
|
7658
|
-
return /* @__PURE__ */
|
|
7670
|
+
return /* @__PURE__ */ import_react45.default.createElement(Card, {
|
|
7659
7671
|
dir: props.direction
|
|
7660
|
-
}, !props.sent ? /* @__PURE__ */
|
|
7672
|
+
}, !props.sent ? /* @__PURE__ */ import_react45.default.createElement(import_react45.default.Fragment, null, !props.headless && /* @__PURE__ */ import_react45.default.createElement(CardHeader, null, /* @__PURE__ */ import_react45.default.createElement(CardTitle, null, " ", ((_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.headTitle) || "Reset Password"), /* @__PURE__ */ import_react45.default.createElement(CardDescription, null, ((_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.headDescription) || "Enter your email to reset your account password")), /* @__PURE__ */ import_react45.default.createElement("form", {
|
|
7661
7673
|
onSubmit: handleSubmit(function(e) {
|
|
7662
7674
|
if (props.handleResetPassword) {
|
|
7663
7675
|
return props.handleResetPassword(e);
|
|
@@ -7665,39 +7677,39 @@ var ResetPasswordForm = function(props) {
|
|
|
7665
7677
|
console.log("handleResetPassword prop is missing");
|
|
7666
7678
|
}
|
|
7667
7679
|
})
|
|
7668
|
-
}, /* @__PURE__ */
|
|
7680
|
+
}, /* @__PURE__ */ import_react45.default.createElement(CardContent, {
|
|
7669
7681
|
headless: props.headless
|
|
7670
|
-
}, /* @__PURE__ */
|
|
7682
|
+
}, /* @__PURE__ */ import_react45.default.createElement(import_react_hook_form4.Controller, {
|
|
7671
7683
|
control: control,
|
|
7672
7684
|
name: "email",
|
|
7673
7685
|
render: function(param) {
|
|
7674
7686
|
var field = param.field;
|
|
7675
7687
|
var _props_texts, _formState_errors_email, _props_texts1;
|
|
7676
|
-
return /* @__PURE__ */
|
|
7688
|
+
return /* @__PURE__ */ import_react45.default.createElement(Input, _object_spread({
|
|
7677
7689
|
width: "full",
|
|
7678
7690
|
label: (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.emailLabel,
|
|
7679
7691
|
helperText: (_formState_errors_email = formState.errors.email) === null || _formState_errors_email === void 0 ? void 0 : _formState_errors_email.message,
|
|
7680
7692
|
placeholder: (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.emailPlaceholder
|
|
7681
7693
|
}, field));
|
|
7682
7694
|
}
|
|
7683
|
-
})), /* @__PURE__ */
|
|
7695
|
+
})), /* @__PURE__ */ import_react45.default.createElement(CardFooter, {
|
|
7684
7696
|
className: "hawa-flex hawa-flex-col"
|
|
7685
|
-
}, /* @__PURE__ */
|
|
7697
|
+
}, /* @__PURE__ */ import_react45.default.createElement(Button, {
|
|
7686
7698
|
type: "submit",
|
|
7687
7699
|
className: "hawa-w-full"
|
|
7688
|
-
}, (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.resetPassword), props.allowRegister && /* @__PURE__ */
|
|
7700
|
+
}, (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.resetPassword), props.allowRegister && /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
7689
7701
|
className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300"
|
|
7690
|
-
}, (_props_texts_dontHaveAccount = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.dontHaveAccount) !== null && _props_texts_dontHaveAccount !== void 0 ? _props_texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */
|
|
7702
|
+
}, (_props_texts_dontHaveAccount = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.dontHaveAccount) !== null && _props_texts_dontHaveAccount !== void 0 ? _props_texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */ import_react45.default.createElement("span", {
|
|
7691
7703
|
className: "clickable-link",
|
|
7692
7704
|
onClick: props.handleRouteToRegister
|
|
7693
|
-
}, (_props_texts_registerText = (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.registerText) !== null && _props_texts_registerText !== void 0 ? _props_texts_registerText : "Register"))))) : /* @__PURE__ */
|
|
7705
|
+
}, (_props_texts_registerText = (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.registerText) !== null && _props_texts_registerText !== void 0 ? _props_texts_registerText : "Register"))))) : /* @__PURE__ */ import_react45.default.createElement(CardContent, {
|
|
7694
7706
|
headless: true
|
|
7695
|
-
}, /* @__PURE__ */
|
|
7707
|
+
}, /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
7696
7708
|
className: "hawa-text-center"
|
|
7697
7709
|
}, (_props_texts8 = props.texts) === null || _props_texts8 === void 0 ? void 0 : _props_texts8.emailSentText)));
|
|
7698
7710
|
};
|
|
7699
7711
|
// components/blocks/auth/CodeConfirmation.tsx
|
|
7700
|
-
var
|
|
7712
|
+
var import_react46 = __toESM(require("react"));
|
|
7701
7713
|
var import_react_hook_form5 = require("react-hook-form");
|
|
7702
7714
|
var import_zod5 = require("@hookform/resolvers/zod");
|
|
7703
7715
|
var z5 = __toESM(require("zod"));
|
|
@@ -7714,19 +7726,19 @@ var CodeConfirmation = function(props) {
|
|
|
7714
7726
|
resolver: (0, import_zod5.zodResolver)(formSchema)
|
|
7715
7727
|
}), handleSubmit = _ref.handleSubmit, control = _ref.control, formState = _ref.formState, setValue = _ref.setValue;
|
|
7716
7728
|
var _props_texts_checkYourPhone, _props_texts_weSentCode, _props_texts_didntGetCode, _props_texts_resendCode, _props_texts_cancel, _props_texts_confirm;
|
|
7717
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ import_react46.default.createElement(Card, null, /* @__PURE__ */ import_react46.default.createElement(CardContent, {
|
|
7718
7730
|
headless: true
|
|
7719
|
-
}, props.showError && /* @__PURE__ */
|
|
7731
|
+
}, props.showError && /* @__PURE__ */ import_react46.default.createElement(Alert, {
|
|
7720
7732
|
title: props.errorTitle,
|
|
7721
7733
|
text: props.errorText,
|
|
7722
7734
|
severity: "error"
|
|
7723
|
-
}), /* @__PURE__ */
|
|
7735
|
+
}), /* @__PURE__ */ import_react46.default.createElement("div", {
|
|
7724
7736
|
className: "hawa-mb-4 dark:hawa-text-white"
|
|
7725
|
-
}, /* @__PURE__ */
|
|
7737
|
+
}, /* @__PURE__ */ import_react46.default.createElement("div", {
|
|
7726
7738
|
className: "hawa-text-lg hawa-font-bold"
|
|
7727
|
-
}, (_props_texts_checkYourPhone = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.checkYourPhone) !== null && _props_texts_checkYourPhone !== void 0 ? _props_texts_checkYourPhone : "Please check your phone"), /* @__PURE__ */
|
|
7739
|
+
}, (_props_texts_checkYourPhone = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.checkYourPhone) !== null && _props_texts_checkYourPhone !== void 0 ? _props_texts_checkYourPhone : "Please check your phone"), /* @__PURE__ */ import_react46.default.createElement("div", {
|
|
7728
7740
|
className: "hawa-text-muted-foreground"
|
|
7729
|
-
}, /* @__PURE__ */
|
|
7741
|
+
}, /* @__PURE__ */ import_react46.default.createElement("span", null, (_props_texts_weSentCode = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.weSentCode) !== null && _props_texts_weSentCode !== void 0 ? _props_texts_weSentCode : "We've sent a code to "), /* @__PURE__ */ import_react46.default.createElement("span", null, props.phoneNumber)), " "), /* @__PURE__ */ import_react46.default.createElement("form", {
|
|
7730
7742
|
onSubmit: handleSubmit(function(e) {
|
|
7731
7743
|
if (props.handleConfirm) {
|
|
7732
7744
|
return props.handleConfirm(e);
|
|
@@ -7734,13 +7746,13 @@ var CodeConfirmation = function(props) {
|
|
|
7734
7746
|
console.log("Form is submitted but handleConfirm prop is missing");
|
|
7735
7747
|
}
|
|
7736
7748
|
})
|
|
7737
|
-
}, /* @__PURE__ */
|
|
7749
|
+
}, /* @__PURE__ */ import_react46.default.createElement(import_react_hook_form5.Controller, {
|
|
7738
7750
|
control: control,
|
|
7739
7751
|
name: "otp_code",
|
|
7740
7752
|
render: function(param) {
|
|
7741
7753
|
var field = param.field;
|
|
7742
7754
|
var _formState_errors_otp_code;
|
|
7743
|
-
return /* @__PURE__ */
|
|
7755
|
+
return /* @__PURE__ */ import_react46.default.createElement(PinInput, {
|
|
7744
7756
|
width: "full",
|
|
7745
7757
|
digits: 6,
|
|
7746
7758
|
getPins: function(e) {
|
|
@@ -7749,18 +7761,18 @@ var CodeConfirmation = function(props) {
|
|
|
7749
7761
|
helperText: (_formState_errors_otp_code = formState.errors.otp_code) === null || _formState_errors_otp_code === void 0 ? void 0 : _formState_errors_otp_code.message
|
|
7750
7762
|
});
|
|
7751
7763
|
}
|
|
7752
|
-
}), /* @__PURE__ */
|
|
7764
|
+
}), /* @__PURE__ */ import_react46.default.createElement("div", {
|
|
7753
7765
|
className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground"
|
|
7754
|
-
}, /* @__PURE__ */
|
|
7766
|
+
}, /* @__PURE__ */ import_react46.default.createElement("span", null, (_props_texts_didntGetCode = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.didntGetCode) !== null && _props_texts_didntGetCode !== void 0 ? _props_texts_didntGetCode : "Didn't get the code?"), " ", /* @__PURE__ */ import_react46.default.createElement("span", {
|
|
7755
7767
|
className: "clickable-link"
|
|
7756
|
-
}, (_props_texts_resendCode = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.resendCode) !== null && _props_texts_resendCode !== void 0 ? _props_texts_resendCode : "Click to resend")), /* @__PURE__ */
|
|
7768
|
+
}, (_props_texts_resendCode = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.resendCode) !== null && _props_texts_resendCode !== void 0 ? _props_texts_resendCode : "Click to resend")), /* @__PURE__ */ import_react46.default.createElement("div", {
|
|
7757
7769
|
className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2"
|
|
7758
|
-
}, /* @__PURE__ */
|
|
7770
|
+
}, /* @__PURE__ */ import_react46.default.createElement(Button, {
|
|
7759
7771
|
variant: "secondary"
|
|
7760
|
-
}, (_props_texts_cancel = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.cancel) !== null && _props_texts_cancel !== void 0 ? _props_texts_cancel : "Cancel"), /* @__PURE__ */
|
|
7772
|
+
}, (_props_texts_cancel = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.cancel) !== null && _props_texts_cancel !== void 0 ? _props_texts_cancel : "Cancel"), /* @__PURE__ */ import_react46.default.createElement(Button, null, (_props_texts_confirm = (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.confirm) !== null && _props_texts_confirm !== void 0 ? _props_texts_confirm : "Confirm")))));
|
|
7761
7773
|
};
|
|
7762
7774
|
// components/blocks/feedback/UserReferralSource.tsx
|
|
7763
|
-
var
|
|
7775
|
+
var import_react47 = __toESM(require("react"));
|
|
7764
7776
|
var import_react_hook_form6 = require("react-hook-form");
|
|
7765
7777
|
var import_zod6 = require("@hookform/resolvers/zod");
|
|
7766
7778
|
var z6 = __toESM(require("zod"));
|
|
@@ -7770,8 +7782,8 @@ var UserReferralSource = function(_param) {
|
|
|
7770
7782
|
"options"
|
|
7771
7783
|
]);
|
|
7772
7784
|
var _props_texts, _props_texts1;
|
|
7773
|
-
var _ref = _sliced_to_array((0,
|
|
7774
|
-
var popUpRef = (0,
|
|
7785
|
+
var _ref = _sliced_to_array((0, import_react47.useState)(false), 2), closed = _ref[0], setClosed = _ref[1];
|
|
7786
|
+
var popUpRef = (0, import_react47.useRef)(null);
|
|
7775
7787
|
var formSchema = z6.object({
|
|
7776
7788
|
source: z6.string({
|
|
7777
7789
|
required_error: (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.pleaseSelectOption
|
|
@@ -7785,13 +7797,13 @@ var UserReferralSource = function(_param) {
|
|
|
7785
7797
|
"bottom-right": "hawa-right-4",
|
|
7786
7798
|
"bottom-left": "hawa-left-4"
|
|
7787
7799
|
};
|
|
7788
|
-
return /* @__PURE__ */
|
|
7800
|
+
return /* @__PURE__ */ import_react47.default.createElement("div", {
|
|
7789
7801
|
className: cn("hawa-transition-all", closed ? "hawa-opacity-0" : "hawa-opacity-100"),
|
|
7790
7802
|
ref: popUpRef
|
|
7791
|
-
}, /* @__PURE__ */
|
|
7803
|
+
}, /* @__PURE__ */ import_react47.default.createElement(Card, {
|
|
7792
7804
|
className: cn("hawa-fixed hawa-bottom-4 hawa-p-0 ", boxPosition[position]),
|
|
7793
7805
|
dir: props.direction
|
|
7794
|
-
}, /* @__PURE__ */
|
|
7806
|
+
}, /* @__PURE__ */ import_react47.default.createElement("button", {
|
|
7795
7807
|
type: "button",
|
|
7796
7808
|
className: cn(props.direction === "rtl" ? "hawa-left-2" : "hawa-right-2", "hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white"),
|
|
7797
7809
|
"data-dismiss-target": "#toast-default",
|
|
@@ -7804,37 +7816,37 @@ var UserReferralSource = function(_param) {
|
|
|
7804
7816
|
}
|
|
7805
7817
|
}, 200);
|
|
7806
7818
|
}
|
|
7807
|
-
}, /* @__PURE__ */
|
|
7819
|
+
}, /* @__PURE__ */ import_react47.default.createElement("svg", {
|
|
7808
7820
|
"aria-hidden": "true",
|
|
7809
7821
|
className: "hawa-h-5 hawa-w-5",
|
|
7810
7822
|
fill: "currentColor",
|
|
7811
7823
|
viewBox: "0 0 20 20"
|
|
7812
|
-
}, /* @__PURE__ */
|
|
7824
|
+
}, /* @__PURE__ */ import_react47.default.createElement("path", {
|
|
7813
7825
|
fillRule: "evenodd",
|
|
7814
7826
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
7815
7827
|
clipRule: "evenodd"
|
|
7816
|
-
}))), /* @__PURE__ */
|
|
7828
|
+
}))), /* @__PURE__ */ import_react47.default.createElement(CardContent, {
|
|
7817
7829
|
headless: true
|
|
7818
|
-
}, /* @__PURE__ */
|
|
7830
|
+
}, /* @__PURE__ */ import_react47.default.createElement("form", {
|
|
7819
7831
|
onSubmit: handleSubmit(function(e) {
|
|
7820
7832
|
if (props.onSubmitForm) {
|
|
7821
7833
|
props.onSubmitForm(e);
|
|
7822
7834
|
}
|
|
7823
7835
|
console.log("onSubmitForm was not provided");
|
|
7824
7836
|
})
|
|
7825
|
-
}, /* @__PURE__ */
|
|
7837
|
+
}, /* @__PURE__ */ import_react47.default.createElement("div", {
|
|
7826
7838
|
className: cn("hawa-flex hawa-flex-col hawa-gap-4 hawa-transition-all", closed ? "hawa-opacity-0" : "hawa-opacity-100")
|
|
7827
|
-
}, /* @__PURE__ */
|
|
7839
|
+
}, /* @__PURE__ */ import_react47.default.createElement("div", {
|
|
7828
7840
|
className: "hawa-mt-4 hawa-font-bold"
|
|
7829
|
-
}, props.question), /* @__PURE__ */
|
|
7841
|
+
}, props.question), /* @__PURE__ */ import_react47.default.createElement("div", {
|
|
7830
7842
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded "
|
|
7831
|
-
}, /* @__PURE__ */
|
|
7843
|
+
}, /* @__PURE__ */ import_react47.default.createElement(import_react_hook_form6.Controller, {
|
|
7832
7844
|
control: control,
|
|
7833
7845
|
name: "source",
|
|
7834
7846
|
render: function(param) {
|
|
7835
7847
|
var field = param.field;
|
|
7836
7848
|
var _formState_errors_source_message, _formState_errors_source;
|
|
7837
|
-
return /* @__PURE__ */
|
|
7849
|
+
return /* @__PURE__ */ import_react47.default.createElement(Radio, {
|
|
7838
7850
|
direction: props.direction,
|
|
7839
7851
|
orientation: "vertical",
|
|
7840
7852
|
options: options,
|
|
@@ -7845,38 +7857,38 @@ var UserReferralSource = function(_param) {
|
|
|
7845
7857
|
helperText: (_formState_errors_source = formState.errors.source) === null || _formState_errors_source === void 0 ? void 0 : (_formState_errors_source_message = _formState_errors_source.message) === null || _formState_errors_source_message === void 0 ? void 0 : _formState_errors_source_message.toString()
|
|
7846
7858
|
});
|
|
7847
7859
|
}
|
|
7848
|
-
})), /* @__PURE__ */
|
|
7860
|
+
})), /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement(import_react_hook_form6.Controller, {
|
|
7849
7861
|
control: control,
|
|
7850
7862
|
name: "feedback",
|
|
7851
7863
|
render: function(param) {
|
|
7852
7864
|
var field = param.field;
|
|
7853
7865
|
var _formState_errors_feedback_message, _formState_errors_feedback;
|
|
7854
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ import_react47.default.createElement(Textarea, _object_spread_props(_object_spread({}, field), {
|
|
7855
7867
|
helperText: (_formState_errors_feedback = formState.errors.feedback) === null || _formState_errors_feedback === void 0 ? void 0 : (_formState_errors_feedback_message = _formState_errors_feedback.message) === null || _formState_errors_feedback_message === void 0 ? void 0 : _formState_errors_feedback_message.toString()
|
|
7856
7868
|
}));
|
|
7857
7869
|
}
|
|
7858
|
-
}))), /* @__PURE__ */
|
|
7870
|
+
}))), /* @__PURE__ */ import_react47.default.createElement(Button, {
|
|
7859
7871
|
type: "submit",
|
|
7860
7872
|
className: "hawa-mt-4 hawa-w-full"
|
|
7861
7873
|
}, ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.submit) || "Submit")))));
|
|
7862
7874
|
};
|
|
7863
7875
|
// components/blocks/feedback/FeedbackRating.tsx
|
|
7864
|
-
var
|
|
7876
|
+
var import_react48 = __toESM(require("react"));
|
|
7865
7877
|
var import_clsx12 = __toESM(require("clsx"));
|
|
7866
7878
|
var FeedbackRating = function(_param) {
|
|
7867
7879
|
var _param_position = _param.position, position = _param_position === void 0 ? "bottom-right" : _param_position, props = _object_without_properties(_param, [
|
|
7868
7880
|
"position"
|
|
7869
7881
|
]);
|
|
7870
|
-
var _ref = _sliced_to_array((0,
|
|
7871
|
-
var _ref1 = _sliced_to_array((0,
|
|
7872
|
-
var _ref2 = _sliced_to_array((0,
|
|
7873
|
-
var _ref3 = _sliced_to_array((0,
|
|
7874
|
-
var popUpRef = (0,
|
|
7882
|
+
var _ref = _sliced_to_array((0, import_react48.useState)(false), 2), closed = _ref[0], setClosed = _ref[1];
|
|
7883
|
+
var _ref1 = _sliced_to_array((0, import_react48.useState)(false), 2), answered = _ref1[0], setAnswered = _ref1[1];
|
|
7884
|
+
var _ref2 = _sliced_to_array((0, import_react48.useState)(null), 2), clickedOption = _ref2[0], setClickedOption = _ref2[1];
|
|
7885
|
+
var _ref3 = _sliced_to_array((0, import_react48.useState)(5), 2), closingTimer = _ref3[0], setClosingTimer = _ref3[1];
|
|
7886
|
+
var popUpRef = (0, import_react48.useRef)(null);
|
|
7875
7887
|
var boxPosition = {
|
|
7876
7888
|
"bottom-right": "hawa-right-4",
|
|
7877
7889
|
"bottom-left": "hawa-left-4"
|
|
7878
7890
|
};
|
|
7879
|
-
(0,
|
|
7891
|
+
(0, import_react48.useEffect)(function() {
|
|
7880
7892
|
var timeoutHide = setTimeout(function() {
|
|
7881
7893
|
if (closingTimer >= 0) {
|
|
7882
7894
|
setClosingTimer(closingTimer - 1);
|
|
@@ -7896,14 +7908,14 @@ var FeedbackRating = function(_param) {
|
|
|
7896
7908
|
}
|
|
7897
7909
|
}, 200);
|
|
7898
7910
|
};
|
|
7899
|
-
return /* @__PURE__ */
|
|
7911
|
+
return /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7900
7912
|
ref: popUpRef,
|
|
7901
7913
|
className: (0, import_clsx12.default)(props.banner ? "hawa-w-full hawa-left-0 hawa-fixed hawa-bottom-0 hawa-px-0 md:hawa-px-4" : "hawa-fixed hawa-bottom-4 ", boxPosition[position])
|
|
7902
|
-
}, /* @__PURE__ */
|
|
7914
|
+
}, /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7903
7915
|
className: (0, import_clsx12.default)("hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-rounded hawa-border hawa-bg-background hawa-p-4 hawa-shadow-md hawa-transition-all", closed ? "hawa-opacity-0" : "hawa-opacity-100", props.banner && "hawa-rounded-none md:hawa-rounded hawa-px-4 md:hawa-px-64")
|
|
7904
|
-
}, /* @__PURE__ */
|
|
7916
|
+
}, /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7905
7917
|
className: "hawa-absolute hawa-left-2 hawa-top-2 hawa-p-1.5 hawa-text-sm"
|
|
7906
|
-
}, props.title), /* @__PURE__ */
|
|
7918
|
+
}, props.title), /* @__PURE__ */ import_react48.default.createElement("button", {
|
|
7907
7919
|
type: "button",
|
|
7908
7920
|
className: "hawa-absolute hawa-right-2 hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white",
|
|
7909
7921
|
"data-dismiss-target": "#toast-default",
|
|
@@ -7911,21 +7923,21 @@ var FeedbackRating = function(_param) {
|
|
|
7911
7923
|
onClick: function() {
|
|
7912
7924
|
return slowClose();
|
|
7913
7925
|
}
|
|
7914
|
-
}, /* @__PURE__ */
|
|
7926
|
+
}, /* @__PURE__ */ import_react48.default.createElement("svg", {
|
|
7915
7927
|
"aria-hidden": "true",
|
|
7916
7928
|
className: "hawa-h-5 hawa-w-5",
|
|
7917
7929
|
fill: "currentColor",
|
|
7918
7930
|
viewBox: "0 0 20 20"
|
|
7919
|
-
}, /* @__PURE__ */
|
|
7931
|
+
}, /* @__PURE__ */ import_react48.default.createElement("path", {
|
|
7920
7932
|
fillRule: "evenodd",
|
|
7921
7933
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
7922
7934
|
clipRule: "evenodd"
|
|
7923
|
-
}))), /* @__PURE__ */
|
|
7935
|
+
}))), /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7924
7936
|
className: "hawa-mt-8"
|
|
7925
|
-
}, props.question), /* @__PURE__ */
|
|
7937
|
+
}, props.question), /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7926
7938
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded"
|
|
7927
7939
|
}, props.options && props.options.map(function(op, i) {
|
|
7928
|
-
return /* @__PURE__ */
|
|
7940
|
+
return /* @__PURE__ */ import_react48.default.createElement("span", {
|
|
7929
7941
|
key: i,
|
|
7930
7942
|
onClick: function() {
|
|
7931
7943
|
if (props.onOptionClicked) {
|
|
@@ -7944,15 +7956,15 @@ var FeedbackRating = function(_param) {
|
|
|
7944
7956
|
},
|
|
7945
7957
|
className: (0, import_clsx12.default)("hawa-w-full hawa-cursor-pointer hawa-rounded hawa-border hawa-p-4 hawa-text-center hawa-transition-all ", clickedOption === op ? "hawa-bg-gray-500 hawa-text-white" : "hawa-border hawa-bg-background hover:hawa-bg-gray-300 dark:hover:hawa-bg-gray-700")
|
|
7946
7958
|
}, op);
|
|
7947
|
-
})), props.texts && /* @__PURE__ */
|
|
7959
|
+
})), props.texts && /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7948
7960
|
className: " hawa-flex hawa-flex-row hawa-justify-between hawa-text-xs"
|
|
7949
|
-
}, /* @__PURE__ */
|
|
7961
|
+
}, /* @__PURE__ */ import_react48.default.createElement("span", null, props.texts.least), /* @__PURE__ */ import_react48.default.createElement("span", null, props.texts.most)), answered && /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7950
7962
|
className: "hawa-absolute hawa-left-0 hawa-top-0 hawa-gap-2 hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded hawa-bg-black hawa-bg-opacity-80 hawa-p-4 hawa-text-center hawa-transition-all"
|
|
7951
|
-
}, /* @__PURE__ */
|
|
7963
|
+
}, /* @__PURE__ */ import_react48.default.createElement("span", {
|
|
7952
7964
|
className: "hawa-font-bold hawa-text-white"
|
|
7953
|
-
}, "Thank you for your answer. This box will disappear in", " " + closingTimer, " seconds"), /* @__PURE__ */
|
|
7965
|
+
}, "Thank you for your answer. This box will disappear in", " " + closingTimer, " seconds"), /* @__PURE__ */ import_react48.default.createElement("div", {
|
|
7954
7966
|
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
|
7955
|
-
}, /* @__PURE__ */
|
|
7967
|
+
}, /* @__PURE__ */ import_react48.default.createElement(Button, {
|
|
7956
7968
|
variant: "secondary",
|
|
7957
7969
|
onClick: function() {
|
|
7958
7970
|
return slowClose();
|
|
@@ -7960,27 +7972,27 @@ var FeedbackRating = function(_param) {
|
|
|
7960
7972
|
}, "Close")))));
|
|
7961
7973
|
};
|
|
7962
7974
|
// components/blocks/feedback/FeedbackEmoji.tsx
|
|
7963
|
-
var
|
|
7975
|
+
var import_react49 = __toESM(require("react"));
|
|
7964
7976
|
var FeedbackEmoji = function(props) {
|
|
7965
|
-
var _ref = _sliced_to_array((0,
|
|
7966
|
-
var _ref1 = _sliced_to_array((0,
|
|
7967
|
-
var _ref2 = _sliced_to_array((0,
|
|
7968
|
-
var _ref3 = _sliced_to_array((0,
|
|
7977
|
+
var _ref = _sliced_to_array((0, import_react49.useState)(null), 2), selectedEmoji = _ref[0], setSelectedEmoji = _ref[1];
|
|
7978
|
+
var _ref1 = _sliced_to_array((0, import_react49.useState)(false), 2), loadingSubmit = _ref1[0], setLoadingSubmit = _ref1[1];
|
|
7979
|
+
var _ref2 = _sliced_to_array((0, import_react49.useState)(""), 2), feedbackText = _ref2[0], setFeedbackText = _ref2[1];
|
|
7980
|
+
var _ref3 = _sliced_to_array((0, import_react49.useState)(false), 2), helperText = _ref3[0], setHelperText = _ref3[1];
|
|
7969
7981
|
var emojis = [
|
|
7970
7982
|
{
|
|
7971
|
-
icon: /* @__PURE__ */
|
|
7983
|
+
icon: /* @__PURE__ */ import_react49.default.createElement(VeryGoodEmoji, null),
|
|
7972
7984
|
value: "very-good"
|
|
7973
7985
|
},
|
|
7974
7986
|
{
|
|
7975
|
-
icon: /* @__PURE__ */
|
|
7987
|
+
icon: /* @__PURE__ */ import_react49.default.createElement(GoodEmoji, null),
|
|
7976
7988
|
value: "good"
|
|
7977
7989
|
},
|
|
7978
7990
|
{
|
|
7979
|
-
icon: /* @__PURE__ */
|
|
7991
|
+
icon: /* @__PURE__ */ import_react49.default.createElement(BadEmoji, null),
|
|
7980
7992
|
value: "bad"
|
|
7981
7993
|
},
|
|
7982
7994
|
{
|
|
7983
|
-
icon: /* @__PURE__ */
|
|
7995
|
+
icon: /* @__PURE__ */ import_react49.default.createElement(VeryBadEmoji, null),
|
|
7984
7996
|
value: "very-bad"
|
|
7985
7997
|
}
|
|
7986
7998
|
];
|
|
@@ -8051,14 +8063,14 @@ var FeedbackEmoji = function(props) {
|
|
|
8051
8063
|
return _ref.apply(this, arguments);
|
|
8052
8064
|
};
|
|
8053
8065
|
}();
|
|
8054
|
-
return /* @__PURE__ */
|
|
8066
|
+
return /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8055
8067
|
className: cn("hawa-flex hawa-flex-col hawa-gap-2 hawa-rounded hawa-border hawa-p-2 hawa-transition-all", selectedEmoji ? "hawa-h-[185px] hawa-min-w-fit" : "hawa-h-[44px] ")
|
|
8056
|
-
}, /* @__PURE__ */
|
|
8068
|
+
}, /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8057
8069
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 "
|
|
8058
|
-
}, /* @__PURE__ */
|
|
8070
|
+
}, /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8059
8071
|
className: "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-0.5 "
|
|
8060
8072
|
}, emojis.map(function(emoji, i) {
|
|
8061
|
-
return /* @__PURE__ */
|
|
8073
|
+
return /* @__PURE__ */ import_react49.default.createElement(Button, {
|
|
8062
8074
|
key: i,
|
|
8063
8075
|
onClick: function() {
|
|
8064
8076
|
if (selectedEmoji === emoji.value) {
|
|
@@ -8071,29 +8083,29 @@ var FeedbackEmoji = function(props) {
|
|
|
8071
8083
|
size: "smallIcon",
|
|
8072
8084
|
className: cn(selectedEmoji === emoji.value ? "hawa-bg-primary/10 hover:hawa-bg-primary/10 " : "hawa-text-[#666666]")
|
|
8073
8085
|
}, emoji.icon);
|
|
8074
|
-
}))), /* @__PURE__ */
|
|
8086
|
+
}))), /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8075
8087
|
className: cn("hawa-flex hawa-flex-col hawa-overflow-clip hawa-transition-all hawa-duration-500 hawa-ease-in-out ", selectedEmoji ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0 ")
|
|
8076
|
-
}, props.showSuccess ? /* @__PURE__ */
|
|
8088
|
+
}, props.showSuccess ? /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8077
8089
|
className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4"
|
|
8078
|
-
}, /* @__PURE__ */
|
|
8090
|
+
}, /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8079
8091
|
className: "hawa-rounded hawa-bg-primary hawa-p-2 hawa-text-primary-foreground"
|
|
8080
|
-
}, /* @__PURE__ */
|
|
8092
|
+
}, /* @__PURE__ */ import_react49.default.createElement("svg", {
|
|
8081
8093
|
stroke: "currentColor",
|
|
8082
8094
|
fill: "currentColor",
|
|
8083
8095
|
strokeWidth: "0",
|
|
8084
8096
|
viewBox: "0 0 512 512",
|
|
8085
8097
|
height: "0.5em",
|
|
8086
8098
|
width: "0.5em"
|
|
8087
|
-
}, /* @__PURE__ */
|
|
8099
|
+
}, /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8088
8100
|
d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"
|
|
8089
|
-
}))), /* @__PURE__ */
|
|
8101
|
+
}))), /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8090
8102
|
className: "hawa-text-sm hawa-flex hawa-flex-col hawa-text-center"
|
|
8091
|
-
}, /* @__PURE__ */
|
|
8103
|
+
}, /* @__PURE__ */ import_react49.default.createElement("span", null, "Your feedback has been received!"), /* @__PURE__ */ import_react49.default.createElement("span", null, "Thank you for your help"))) : /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
8092
8104
|
className: "hawa-flex hawa-flex-col hawa-gap-2"
|
|
8093
|
-
}, /* @__PURE__ */
|
|
8105
|
+
}, /* @__PURE__ */ import_react49.default.createElement(Popover, {
|
|
8094
8106
|
className: "hawa-select-none hawa-p-1 hawa-text-xs ",
|
|
8095
8107
|
open: helperText,
|
|
8096
|
-
trigger: /* @__PURE__ */
|
|
8108
|
+
trigger: /* @__PURE__ */ import_react49.default.createElement(Textarea, {
|
|
8097
8109
|
className: cn("hawa-mb-2 hawa-h-full hawa-resize-none"),
|
|
8098
8110
|
placeholder: "Your feedback",
|
|
8099
8111
|
onChange: function(e) {
|
|
@@ -8104,9 +8116,9 @@ var FeedbackEmoji = function(props) {
|
|
|
8104
8116
|
console.log("changing to", e.target.value);
|
|
8105
8117
|
}
|
|
8106
8118
|
})
|
|
8107
|
-
}, /* @__PURE__ */
|
|
8119
|
+
}, /* @__PURE__ */ import_react49.default.createElement("span", {
|
|
8108
8120
|
className: "hawa-m-2"
|
|
8109
|
-
}, "Please enter your feedback"), " "), /* @__PURE__ */
|
|
8121
|
+
}, "Please enter your feedback"), " "), /* @__PURE__ */ import_react49.default.createElement(Button, {
|
|
8110
8122
|
isLoading: loadingSubmit,
|
|
8111
8123
|
onClick: onFeedbackSubmit,
|
|
8112
8124
|
className: "hawa-w-full",
|
|
@@ -8114,20 +8126,20 @@ var FeedbackEmoji = function(props) {
|
|
|
8114
8126
|
}, "Submit"))));
|
|
8115
8127
|
};
|
|
8116
8128
|
var VeryGoodEmoji = function() {
|
|
8117
|
-
return /* @__PURE__ */
|
|
8129
|
+
return /* @__PURE__ */ import_react49.default.createElement("svg", {
|
|
8118
8130
|
fill: "none",
|
|
8119
8131
|
height: "16",
|
|
8120
8132
|
viewBox: "0 0 16 16",
|
|
8121
8133
|
width: "16",
|
|
8122
8134
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8123
|
-
}, /* @__PURE__ */
|
|
8135
|
+
}, /* @__PURE__ */ import_react49.default.createElement("g", {
|
|
8124
8136
|
clipPath: "url(#clip0_53_166)"
|
|
8125
|
-
}, /* @__PURE__ */
|
|
8137
|
+
}, /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8126
8138
|
clipRule: "evenodd",
|
|
8127
8139
|
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z",
|
|
8128
8140
|
fill: "currentColor",
|
|
8129
8141
|
fillRule: "evenodd"
|
|
8130
|
-
}), /* @__PURE__ */
|
|
8142
|
+
}), /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8131
8143
|
clipRule: "evenodd",
|
|
8132
8144
|
d: "M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z",
|
|
8133
8145
|
fill: "#FF990A",
|
|
@@ -8135,15 +8147,15 @@ var VeryGoodEmoji = function() {
|
|
|
8135
8147
|
})));
|
|
8136
8148
|
};
|
|
8137
8149
|
var GoodEmoji = function() {
|
|
8138
|
-
return /* @__PURE__ */
|
|
8150
|
+
return /* @__PURE__ */ import_react49.default.createElement("svg", {
|
|
8139
8151
|
fill: "none",
|
|
8140
8152
|
height: "16",
|
|
8141
8153
|
viewBox: "0 0 16 16",
|
|
8142
8154
|
width: "16",
|
|
8143
8155
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8144
|
-
}, /* @__PURE__ */
|
|
8156
|
+
}, /* @__PURE__ */ import_react49.default.createElement("g", {
|
|
8145
8157
|
clipPath: "url(#clip0_53_167)"
|
|
8146
|
-
}, /* @__PURE__ */
|
|
8158
|
+
}, /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8147
8159
|
clipRule: "evenodd",
|
|
8148
8160
|
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
8149
8161
|
fill: "currentColor",
|
|
@@ -8151,15 +8163,15 @@ var GoodEmoji = function() {
|
|
|
8151
8163
|
})));
|
|
8152
8164
|
};
|
|
8153
8165
|
var BadEmoji = function() {
|
|
8154
|
-
return /* @__PURE__ */
|
|
8166
|
+
return /* @__PURE__ */ import_react49.default.createElement("svg", {
|
|
8155
8167
|
fill: "none",
|
|
8156
8168
|
height: "16",
|
|
8157
8169
|
viewBox: "0 0 16 16",
|
|
8158
8170
|
width: "16",
|
|
8159
8171
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8160
|
-
}, /* @__PURE__ */
|
|
8172
|
+
}, /* @__PURE__ */ import_react49.default.createElement("g", {
|
|
8161
8173
|
clipPath: "url(#clip0_53_152)"
|
|
8162
|
-
}, /* @__PURE__ */
|
|
8174
|
+
}, /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8163
8175
|
clipRule: "evenodd",
|
|
8164
8176
|
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z",
|
|
8165
8177
|
fill: "currentColor",
|
|
@@ -8167,18 +8179,18 @@ var BadEmoji = function() {
|
|
|
8167
8179
|
})));
|
|
8168
8180
|
};
|
|
8169
8181
|
var VeryBadEmoji = function() {
|
|
8170
|
-
return /* @__PURE__ */
|
|
8182
|
+
return /* @__PURE__ */ import_react49.default.createElement("svg", {
|
|
8171
8183
|
fill: "none",
|
|
8172
8184
|
height: "16",
|
|
8173
8185
|
viewBox: "0 0 16 16",
|
|
8174
8186
|
width: "16",
|
|
8175
8187
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8176
|
-
}, /* @__PURE__ */
|
|
8188
|
+
}, /* @__PURE__ */ import_react49.default.createElement("g", {
|
|
8177
8189
|
clipPath: "url(#clip0_53_151)"
|
|
8178
|
-
}, /* @__PURE__ */
|
|
8190
|
+
}, /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8179
8191
|
d: "M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z",
|
|
8180
8192
|
fill: "#0070F3"
|
|
8181
|
-
}), /* @__PURE__ */
|
|
8193
|
+
}), /* @__PURE__ */ import_react49.default.createElement("path", {
|
|
8182
8194
|
clipRule: "evenodd",
|
|
8183
8195
|
d: "M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
8184
8196
|
fill: "currentColor",
|
|
@@ -8186,7 +8198,7 @@ var VeryBadEmoji = function() {
|
|
|
8186
8198
|
})));
|
|
8187
8199
|
};
|
|
8188
8200
|
// components/blocks/feedback/FeedbackForm.tsx
|
|
8189
|
-
var
|
|
8201
|
+
var import_react50 = __toESM(require("react"));
|
|
8190
8202
|
var import_react_hook_form7 = require("react-hook-form");
|
|
8191
8203
|
var import_zod7 = require("@hookform/resolvers/zod");
|
|
8192
8204
|
var z7 = __toESM(require("zod"));
|
|
@@ -8207,9 +8219,9 @@ var FeedbackForm = function(props) {
|
|
|
8207
8219
|
var _ref = (0, import_react_hook_form7.useForm)({
|
|
8208
8220
|
resolver: (0, import_zod7.zodResolver)(formSchema)
|
|
8209
8221
|
}), handleSubmit = _ref.handleSubmit, control = _ref.control, formState = _ref.formState;
|
|
8210
|
-
return /* @__PURE__ */
|
|
8222
|
+
return /* @__PURE__ */ import_react50.default.createElement(Card, null, /* @__PURE__ */ import_react50.default.createElement(CardContent, {
|
|
8211
8223
|
headless: true
|
|
8212
|
-
}, /* @__PURE__ */
|
|
8224
|
+
}, /* @__PURE__ */ import_react50.default.createElement("form", {
|
|
8213
8225
|
onSubmit: handleSubmit(function(e) {
|
|
8214
8226
|
if (props.onSubmit) {
|
|
8215
8227
|
return props.onSubmit(e);
|
|
@@ -8218,13 +8230,13 @@ var FeedbackForm = function(props) {
|
|
|
8218
8230
|
}
|
|
8219
8231
|
}),
|
|
8220
8232
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
8221
|
-
}, /* @__PURE__ */
|
|
8233
|
+
}, /* @__PURE__ */ import_react50.default.createElement(Label2, null, (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.requestType), /* @__PURE__ */ import_react50.default.createElement(import_react_hook_form7.Controller, {
|
|
8222
8234
|
name: "requestType",
|
|
8223
8235
|
control: control,
|
|
8224
8236
|
render: function(param) {
|
|
8225
8237
|
var field = param.field;
|
|
8226
8238
|
var _formState_errors_requestType_message, _formState_errors_requestType;
|
|
8227
|
-
return /* @__PURE__ */
|
|
8239
|
+
return /* @__PURE__ */ import_react50.default.createElement(Select, _object_spread_props(_object_spread({}, field), {
|
|
8228
8240
|
onChange: function(option) {
|
|
8229
8241
|
return field.onChange(option.value);
|
|
8230
8242
|
},
|
|
@@ -8232,70 +8244,70 @@ var FeedbackForm = function(props) {
|
|
|
8232
8244
|
helperText: (_formState_errors_requestType = formState.errors.requestType) === null || _formState_errors_requestType === void 0 ? void 0 : (_formState_errors_requestType_message = _formState_errors_requestType.message) === null || _formState_errors_requestType_message === void 0 ? void 0 : _formState_errors_requestType_message.toString()
|
|
8233
8245
|
}));
|
|
8234
8246
|
}
|
|
8235
|
-
}), /* @__PURE__ */
|
|
8247
|
+
}), /* @__PURE__ */ import_react50.default.createElement(Label2, null, props.texts.description), /* @__PURE__ */ import_react50.default.createElement(import_react_hook_form7.Controller, {
|
|
8236
8248
|
name: "description",
|
|
8237
8249
|
control: control,
|
|
8238
8250
|
render: function(param) {
|
|
8239
8251
|
var field = param.field;
|
|
8240
8252
|
var _formState_errors_description_message, _formState_errors_description;
|
|
8241
|
-
return /* @__PURE__ */
|
|
8253
|
+
return /* @__PURE__ */ import_react50.default.createElement(Textarea, _object_spread_props(_object_spread({}, field), {
|
|
8242
8254
|
helperText: formState.errors.description && ((_formState_errors_description = formState.errors.description) === null || _formState_errors_description === void 0 ? void 0 : (_formState_errors_description_message = _formState_errors_description.message) === null || _formState_errors_description_message === void 0 ? void 0 : _formState_errors_description_message.toString())
|
|
8243
8255
|
}));
|
|
8244
8256
|
}
|
|
8245
|
-
}), /* @__PURE__ */
|
|
8257
|
+
}), /* @__PURE__ */ import_react50.default.createElement(Button, {
|
|
8246
8258
|
type: "submit"
|
|
8247
8259
|
}, (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.submit))));
|
|
8248
8260
|
};
|
|
8249
8261
|
// components/blocks/misc/LegalTexts.tsx
|
|
8250
|
-
var
|
|
8262
|
+
var import_react51 = __toESM(require("react"));
|
|
8251
8263
|
var LegalTexts = function(_param) {
|
|
8252
8264
|
var tabs = _param.tabs, props = _object_without_properties(_param, [
|
|
8253
8265
|
"tabs"
|
|
8254
8266
|
]);
|
|
8255
|
-
return /* @__PURE__ */
|
|
8267
|
+
return /* @__PURE__ */ import_react51.default.createElement(Tabs, {
|
|
8256
8268
|
value: props.activeTab,
|
|
8257
8269
|
onValueChange: props.handleTabChange,
|
|
8258
8270
|
defaultValue: props.defaultTab || tabs[0].value,
|
|
8259
8271
|
dir: props.direction
|
|
8260
|
-
}, /* @__PURE__ */
|
|
8272
|
+
}, /* @__PURE__ */ import_react51.default.createElement(TabsList, {
|
|
8261
8273
|
className: "hawa-w-full"
|
|
8262
8274
|
}, tabs.map(function(tab, index) {
|
|
8263
|
-
return /* @__PURE__ */
|
|
8275
|
+
return /* @__PURE__ */ import_react51.default.createElement(TabsTrigger, {
|
|
8264
8276
|
key: index,
|
|
8265
8277
|
value: tab.value
|
|
8266
8278
|
}, tab.title);
|
|
8267
8279
|
})), tabs.map(function(tab, index) {
|
|
8268
|
-
return /* @__PURE__ */
|
|
8280
|
+
return /* @__PURE__ */ import_react51.default.createElement(TabsContent, {
|
|
8269
8281
|
key: index,
|
|
8270
8282
|
value: tab.value
|
|
8271
|
-
}, /* @__PURE__ */
|
|
8283
|
+
}, /* @__PURE__ */ import_react51.default.createElement(ScrollArea, {
|
|
8272
8284
|
className: cn("hawa-p-4 hawa-rounded hawa-bg-muted hawa-border", props.scrollAreaClassName)
|
|
8273
8285
|
}, tab.content));
|
|
8274
8286
|
}));
|
|
8275
8287
|
};
|
|
8276
8288
|
// components/blocks/misc/EmptyState.tsx
|
|
8277
|
-
var
|
|
8289
|
+
var import_react52 = __toESM(require("react"));
|
|
8278
8290
|
var EmptyState = function(param) {
|
|
8279
8291
|
var texts = param.texts, onActionClick = param.onActionClick;
|
|
8280
8292
|
var _texts_youreCaughtUp, _texts_actionText;
|
|
8281
|
-
return /* @__PURE__ */
|
|
8293
|
+
return /* @__PURE__ */ import_react52.default.createElement(Card, null, /* @__PURE__ */ import_react52.default.createElement(CardContent, {
|
|
8282
8294
|
headless: true
|
|
8283
|
-
}, /* @__PURE__ */
|
|
8295
|
+
}, /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
8284
8296
|
className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center "
|
|
8285
|
-
}, /* @__PURE__ */
|
|
8297
|
+
}, /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
8286
8298
|
className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground"
|
|
8287
|
-
}, /* @__PURE__ */
|
|
8299
|
+
}, /* @__PURE__ */ import_react52.default.createElement("svg", {
|
|
8288
8300
|
stroke: "currentColor",
|
|
8289
8301
|
fill: "currentColor",
|
|
8290
8302
|
strokeWidth: "0",
|
|
8291
8303
|
viewBox: "0 0 512 512",
|
|
8292
8304
|
height: "0.35em",
|
|
8293
8305
|
width: "0.35em"
|
|
8294
|
-
}, /* @__PURE__ */
|
|
8306
|
+
}, /* @__PURE__ */ import_react52.default.createElement("path", {
|
|
8295
8307
|
d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"
|
|
8296
|
-
}))), /* @__PURE__ */
|
|
8308
|
+
}))), /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
8297
8309
|
className: "hawa-m-2 hawa-text-xl hawa-font-bold"
|
|
8298
|
-
}, (_texts_youreCaughtUp = texts === null || texts === void 0 ? void 0 : texts.youreCaughtUp) !== null && _texts_youreCaughtUp !== void 0 ? _texts_youreCaughtUp : "You're all caught up"))), /* @__PURE__ */
|
|
8310
|
+
}, (_texts_youreCaughtUp = texts === null || texts === void 0 ? void 0 : texts.youreCaughtUp) !== null && _texts_youreCaughtUp !== void 0 ? _texts_youreCaughtUp : "You're all caught up"))), /* @__PURE__ */ import_react52.default.createElement(CardFooter, null, /* @__PURE__ */ import_react52.default.createElement(Button, {
|
|
8299
8311
|
className: "hawa-w-full",
|
|
8300
8312
|
onClick: function() {
|
|
8301
8313
|
return onActionClick();
|
|
@@ -8303,36 +8315,36 @@ var EmptyState = function(param) {
|
|
|
8303
8315
|
}, (_texts_actionText = texts === null || texts === void 0 ? void 0 : texts.actionText) !== null && _texts_actionText !== void 0 ? _texts_actionText : "Go Home")));
|
|
8304
8316
|
};
|
|
8305
8317
|
// components/blocks/misc/Testimonial.tsx
|
|
8306
|
-
var
|
|
8318
|
+
var import_react53 = __toESM(require("react"));
|
|
8307
8319
|
var Testimonial = function(props) {
|
|
8308
|
-
return /* @__PURE__ */
|
|
8320
|
+
return /* @__PURE__ */ import_react53.default.createElement(Card, null, /* @__PURE__ */ import_react53.default.createElement(CardContent, {
|
|
8309
8321
|
headless: true
|
|
8310
|
-
}, /* @__PURE__ */
|
|
8322
|
+
}, /* @__PURE__ */ import_react53.default.createElement("div", null, /* @__PURE__ */ import_react53.default.createElement("p", {
|
|
8311
8323
|
className: "mb-4 max-w-sm"
|
|
8312
|
-
}, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */
|
|
8324
|
+
}, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */ import_react53.default.createElement("div", {
|
|
8313
8325
|
className: "flex flex-row gap-4"
|
|
8314
|
-
}, /* @__PURE__ */
|
|
8326
|
+
}, /* @__PURE__ */ import_react53.default.createElement("svg", {
|
|
8315
8327
|
width: "48",
|
|
8316
8328
|
height: "48",
|
|
8317
8329
|
viewBox: "0 0 48 48",
|
|
8318
8330
|
fill: "none"
|
|
8319
|
-
}, /* @__PURE__ */
|
|
8331
|
+
}, /* @__PURE__ */ import_react53.default.createElement("rect", {
|
|
8320
8332
|
width: "48",
|
|
8321
8333
|
height: "48",
|
|
8322
8334
|
rx: "24",
|
|
8323
8335
|
fill: "#45BE8B"
|
|
8324
|
-
}), /* @__PURE__ */
|
|
8336
|
+
}), /* @__PURE__ */ import_react53.default.createElement("path", {
|
|
8325
8337
|
d: "M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z",
|
|
8326
8338
|
fill: "#FFFFFF"
|
|
8327
|
-
}), /* @__PURE__ */
|
|
8339
|
+
}), /* @__PURE__ */ import_react53.default.createElement("path", {
|
|
8328
8340
|
d: "M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z",
|
|
8329
8341
|
fill: "#FFFFFF"
|
|
8330
|
-
})), /* @__PURE__ */
|
|
8342
|
+
})), /* @__PURE__ */ import_react53.default.createElement("span", {
|
|
8331
8343
|
className: "border border-l "
|
|
8332
|
-
}), " ", /* @__PURE__ */
|
|
8344
|
+
}), " ", /* @__PURE__ */ import_react53.default.createElement("div", null, /* @__PURE__ */ import_react53.default.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ import_react53.default.createElement("div", null, " Chief Information Security Officer")))));
|
|
8333
8345
|
};
|
|
8334
8346
|
// components/blocks/misc/LeadGenerator.tsx
|
|
8335
|
-
var
|
|
8347
|
+
var import_react54 = __toESM(require("react"));
|
|
8336
8348
|
var import_react_hook_form8 = require("react-hook-form");
|
|
8337
8349
|
var LeadGenerator = function(param) {
|
|
8338
8350
|
var texts = param.texts, submitHandler = param.submitHandler;
|
|
@@ -8345,10 +8357,10 @@ var LeadGenerator = function(param) {
|
|
|
8345
8357
|
}
|
|
8346
8358
|
};
|
|
8347
8359
|
var _texts_submit;
|
|
8348
|
-
return /* @__PURE__ */
|
|
8360
|
+
return /* @__PURE__ */ import_react54.default.createElement(Card, null, /* @__PURE__ */ import_react54.default.createElement(CardHeader, null, /* @__PURE__ */ import_react54.default.createElement(CardTitle, null, texts === null || texts === void 0 ? void 0 : texts.title), /* @__PURE__ */ import_react54.default.createElement(CardDescription, null, texts === null || texts === void 0 ? void 0 : texts.subtitle)), /* @__PURE__ */ import_react54.default.createElement(CardContent, null, /* @__PURE__ */ import_react54.default.createElement("form", {
|
|
8349
8361
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
|
8350
8362
|
onSubmit: handleSubmit(onSubmit)
|
|
8351
|
-
}, /* @__PURE__ */
|
|
8363
|
+
}, /* @__PURE__ */ import_react54.default.createElement(import_react_hook_form8.Controller, {
|
|
8352
8364
|
name: "email",
|
|
8353
8365
|
control: control,
|
|
8354
8366
|
rules: {
|
|
@@ -8361,32 +8373,32 @@ var LeadGenerator = function(param) {
|
|
|
8361
8373
|
defaultValue: "",
|
|
8362
8374
|
render: function(param) {
|
|
8363
8375
|
var field = param.field;
|
|
8364
|
-
return /* @__PURE__ */
|
|
8376
|
+
return /* @__PURE__ */ import_react54.default.createElement(Input, _object_spread_props(_object_spread({}, field), {
|
|
8365
8377
|
type: "email",
|
|
8366
8378
|
placeholder: "example@sikka.io"
|
|
8367
8379
|
}));
|
|
8368
8380
|
}
|
|
8369
|
-
}), /* @__PURE__ */
|
|
8381
|
+
}), /* @__PURE__ */ import_react54.default.createElement(Button, {
|
|
8370
8382
|
type: "submit",
|
|
8371
8383
|
disabled: !formState.isValid
|
|
8372
8384
|
}, (_texts_submit = texts === null || texts === void 0 ? void 0 : texts.submit) !== null && _texts_submit !== void 0 ? _texts_submit : "Submit"))));
|
|
8373
8385
|
};
|
|
8374
8386
|
// components/blocks/misc/Announcement.tsx
|
|
8375
|
-
var
|
|
8387
|
+
var import_react55 = __toESM(require("react"));
|
|
8376
8388
|
var Announcement = function(_param) {
|
|
8377
8389
|
var onActionClick = _param.onActionClick, props = _object_without_properties(_param, [
|
|
8378
8390
|
"onActionClick"
|
|
8379
8391
|
]);
|
|
8380
|
-
return /* @__PURE__ */
|
|
8392
|
+
return /* @__PURE__ */ import_react55.default.createElement(Card, null, /* @__PURE__ */ import_react55.default.createElement(CardContent, {
|
|
8381
8393
|
headless: true,
|
|
8382
8394
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
|
8383
|
-
}, /* @__PURE__ */
|
|
8395
|
+
}, /* @__PURE__ */ import_react55.default.createElement("div", {
|
|
8384
8396
|
className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center "
|
|
8385
|
-
}, /* @__PURE__ */
|
|
8397
|
+
}, /* @__PURE__ */ import_react55.default.createElement("span", {
|
|
8386
8398
|
className: "hawa-text-lg hawa-font-bold"
|
|
8387
|
-
}, props.title), /* @__PURE__ */
|
|
8399
|
+
}, props.title), /* @__PURE__ */ import_react55.default.createElement("span", {
|
|
8388
8400
|
className: "hawa-text-sm"
|
|
8389
|
-
}, props.subtitle)), /* @__PURE__ */
|
|
8401
|
+
}, props.subtitle)), /* @__PURE__ */ import_react55.default.createElement(Button, {
|
|
8390
8402
|
onClick: function() {
|
|
8391
8403
|
return onActionClick();
|
|
8392
8404
|
},
|
|
@@ -8394,56 +8406,56 @@ var Announcement = function(_param) {
|
|
|
8394
8406
|
}, props.actionText)));
|
|
8395
8407
|
};
|
|
8396
8408
|
// components/blocks/misc/NotFound.tsx
|
|
8397
|
-
var
|
|
8409
|
+
var import_react56 = __toESM(require("react"));
|
|
8398
8410
|
var NotFound = function(param) {
|
|
8399
8411
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts;
|
|
8400
8412
|
var _texts_pageNotFound, _texts_ifLost, _texts_home;
|
|
8401
|
-
return /* @__PURE__ */
|
|
8413
|
+
return /* @__PURE__ */ import_react56.default.createElement(Card, null, /* @__PURE__ */ import_react56.default.createElement(CardContent, {
|
|
8402
8414
|
headless: true
|
|
8403
|
-
}, /* @__PURE__ */
|
|
8415
|
+
}, /* @__PURE__ */ import_react56.default.createElement("div", {
|
|
8404
8416
|
className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white"
|
|
8405
|
-
}, /* @__PURE__ */
|
|
8417
|
+
}, /* @__PURE__ */ import_react56.default.createElement("div", {
|
|
8406
8418
|
className: "hawa-text-center hawa-text-6xl hawa-font-bold "
|
|
8407
|
-
}, "404"), /* @__PURE__ */
|
|
8419
|
+
}, "404"), /* @__PURE__ */ import_react56.default.createElement("div", {
|
|
8408
8420
|
className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold "
|
|
8409
|
-
}, (_texts_pageNotFound = texts === null || texts === void 0 ? void 0 : texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */
|
|
8421
|
+
}, (_texts_pageNotFound = texts === null || texts === void 0 ? void 0 : texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */ import_react56.default.createElement("div", {
|
|
8410
8422
|
className: "hawa-mb-4 hawa-text-center"
|
|
8411
|
-
}, (_texts_ifLost = texts === null || texts === void 0 ? void 0 : texts.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */
|
|
8423
|
+
}, (_texts_ifLost = texts === null || texts === void 0 ? void 0 : texts.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ import_react56.default.createElement("span", {
|
|
8412
8424
|
className: "clickable-link"
|
|
8413
|
-
}, "help@sikka.io"))), /* @__PURE__ */
|
|
8425
|
+
}, "help@sikka.io"))), /* @__PURE__ */ import_react56.default.createElement(Button, {
|
|
8414
8426
|
className: "hawa-w-full"
|
|
8415
8427
|
}, (_texts_home = texts === null || texts === void 0 ? void 0 : texts.home) !== null && _texts_home !== void 0 ? _texts_home : "Home"))));
|
|
8416
8428
|
};
|
|
8417
8429
|
// components/blocks/misc/NoPermission.tsx
|
|
8418
|
-
var
|
|
8430
|
+
var import_react57 = __toESM(require("react"));
|
|
8419
8431
|
var NoPermission = function(param) {
|
|
8420
8432
|
var texts = param.texts;
|
|
8421
8433
|
var _texts_title, _texts_subtitle;
|
|
8422
|
-
return /* @__PURE__ */
|
|
8434
|
+
return /* @__PURE__ */ import_react57.default.createElement(Card, null, /* @__PURE__ */ import_react57.default.createElement(CardContent, {
|
|
8423
8435
|
headless: true
|
|
8424
|
-
}, /* @__PURE__ */
|
|
8436
|
+
}, /* @__PURE__ */ import_react57.default.createElement("div", {
|
|
8425
8437
|
className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center"
|
|
8426
|
-
}, /* @__PURE__ */
|
|
8438
|
+
}, /* @__PURE__ */ import_react57.default.createElement("div", {
|
|
8427
8439
|
className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground"
|
|
8428
|
-
}, /* @__PURE__ */
|
|
8440
|
+
}, /* @__PURE__ */ import_react57.default.createElement("svg", {
|
|
8429
8441
|
stroke: "currentColor",
|
|
8430
8442
|
fill: "currentColor",
|
|
8431
8443
|
strokeWidth: "0",
|
|
8432
8444
|
viewBox: "0 0 448 512",
|
|
8433
8445
|
height: "0.35em",
|
|
8434
8446
|
width: "0.35em"
|
|
8435
|
-
}, /* @__PURE__ */
|
|
8447
|
+
}, /* @__PURE__ */ import_react57.default.createElement("path", {
|
|
8436
8448
|
d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
|
|
8437
|
-
})), " "), /* @__PURE__ */
|
|
8449
|
+
})), " "), /* @__PURE__ */ import_react57.default.createElement("div", {
|
|
8438
8450
|
className: "hawa-m-2 hawa-text-xl hawa-font-bold"
|
|
8439
|
-
}, (_texts_title = texts === null || texts === void 0 ? void 0 : texts.title) !== null && _texts_title !== void 0 ? _texts_title : "You don't have permission"), /* @__PURE__ */
|
|
8451
|
+
}, (_texts_title = texts === null || texts === void 0 ? void 0 : texts.title) !== null && _texts_title !== void 0 ? _texts_title : "You don't have permission"), /* @__PURE__ */ import_react57.default.createElement("div", null, (_texts_subtitle = texts === null || texts === void 0 ? void 0 : texts.subtitle) !== null && _texts_subtitle !== void 0 ? _texts_subtitle : "If you think this is a problem please contact your administrator or our customer support"))));
|
|
8440
8452
|
};
|
|
8441
8453
|
// components/blocks/pricing/PricingPlans.tsx
|
|
8442
|
-
var
|
|
8454
|
+
var import_react58 = __toESM(require("react"));
|
|
8443
8455
|
var PricingPlans = function(props) {
|
|
8444
|
-
return /* @__PURE__ */
|
|
8456
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", null, /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
8445
8457
|
className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between"
|
|
8446
|
-
}, /* @__PURE__ */
|
|
8458
|
+
}, /* @__PURE__ */ import_react58.default.createElement(Radio, {
|
|
8447
8459
|
design: "tabs",
|
|
8448
8460
|
defaultValue: props.currentCycle,
|
|
8449
8461
|
options: props.billingCycles,
|
|
@@ -8452,7 +8464,7 @@ var PricingPlans = function(props) {
|
|
|
8452
8464
|
props.onCycleChange(e);
|
|
8453
8465
|
}
|
|
8454
8466
|
}
|
|
8455
|
-
}), /* @__PURE__ */
|
|
8467
|
+
}), /* @__PURE__ */ import_react58.default.createElement(Radio, {
|
|
8456
8468
|
design: "tabs",
|
|
8457
8469
|
defaultValue: props.currentCurrency,
|
|
8458
8470
|
options: props.currencies,
|
|
@@ -8461,10 +8473,10 @@ var PricingPlans = function(props) {
|
|
|
8461
8473
|
props.onCurrencyChange(e);
|
|
8462
8474
|
}
|
|
8463
8475
|
}
|
|
8464
|
-
})), /* @__PURE__ */
|
|
8476
|
+
})), /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
8465
8477
|
className: "hawa-flex hawa-flex-row hawa-justify-between"
|
|
8466
8478
|
}, props.plans.map(function(plan, index) {
|
|
8467
|
-
return /* @__PURE__ */
|
|
8479
|
+
return /* @__PURE__ */ import_react58.default.createElement(PricingCard, _object_spread_props(_object_spread({
|
|
8468
8480
|
key: index,
|
|
8469
8481
|
onPlanClicked: function() {
|
|
8470
8482
|
if (props.onPlanClicked) {
|
|
@@ -8485,26 +8497,26 @@ var PricingPlans = function(props) {
|
|
|
8485
8497
|
})));
|
|
8486
8498
|
};
|
|
8487
8499
|
// components/blocks/pricing/ComparingPlans.tsx
|
|
8488
|
-
var
|
|
8500
|
+
var import_react59 = __toESM(require("react"));
|
|
8489
8501
|
var CheckMark = function() {
|
|
8490
|
-
return /* @__PURE__ */
|
|
8502
|
+
return /* @__PURE__ */ import_react59.default.createElement("svg", {
|
|
8491
8503
|
className: "hawa-h-5 hawa-w-5 hawa-text-green-500",
|
|
8492
8504
|
"aria-hidden": "true",
|
|
8493
8505
|
fill: "currentColor",
|
|
8494
8506
|
viewBox: "0 0 20 20"
|
|
8495
|
-
}, /* @__PURE__ */
|
|
8507
|
+
}, /* @__PURE__ */ import_react59.default.createElement("path", {
|
|
8496
8508
|
fillRule: "evenodd",
|
|
8497
8509
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
8498
8510
|
clipRule: "evenodd"
|
|
8499
8511
|
}));
|
|
8500
8512
|
};
|
|
8501
8513
|
var UncheckMark = function() {
|
|
8502
|
-
return /* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ import_react59.default.createElement("svg", {
|
|
8503
8515
|
className: "hawa-h-5 hawa-w-5 hawa-text-red-500",
|
|
8504
8516
|
"aria-hidden": "true",
|
|
8505
8517
|
fill: "currentColor",
|
|
8506
8518
|
viewBox: "0 0 20 20"
|
|
8507
|
-
}, /* @__PURE__ */
|
|
8519
|
+
}, /* @__PURE__ */ import_react59.default.createElement("path", {
|
|
8508
8520
|
fillRule: "evenodd",
|
|
8509
8521
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
8510
8522
|
clipRule: "evenodd"
|
|
@@ -8512,14 +8524,14 @@ var UncheckMark = function() {
|
|
|
8512
8524
|
};
|
|
8513
8525
|
var ComparingPlans = function(props) {
|
|
8514
8526
|
var _props_plans;
|
|
8515
|
-
var _ref = _sliced_to_array((0,
|
|
8516
|
-
var _ref1 = _sliced_to_array((0,
|
|
8517
|
-
return /* @__PURE__ */
|
|
8527
|
+
var _ref = _sliced_to_array((0, import_react59.useState)("sar"), 2), currentCurrency = _ref[0], setCurrentCurrency = _ref[1];
|
|
8528
|
+
var _ref1 = _sliced_to_array((0, import_react59.useState)("month"), 2), currentCycle = _ref1[0], setCurrentCycle = _ref1[1];
|
|
8529
|
+
return /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8518
8530
|
id: "detailed-pricing",
|
|
8519
8531
|
className: "hawa-w-full hawa-overflow-x-auto"
|
|
8520
|
-
}, /* @__PURE__ */
|
|
8532
|
+
}, /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8521
8533
|
className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between"
|
|
8522
|
-
}, /* @__PURE__ */
|
|
8534
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Radio, {
|
|
8523
8535
|
design: "tabs",
|
|
8524
8536
|
defaultValue: currentCycle,
|
|
8525
8537
|
options: props.billingCycles,
|
|
@@ -8530,7 +8542,7 @@ var ComparingPlans = function(props) {
|
|
|
8530
8542
|
console.log("onCycleChange was not provided");
|
|
8531
8543
|
}
|
|
8532
8544
|
}
|
|
8533
|
-
}), /* @__PURE__ */
|
|
8545
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Radio, {
|
|
8534
8546
|
design: "tabs",
|
|
8535
8547
|
defaultValue: currentCurrency,
|
|
8536
8548
|
options: props.currencies,
|
|
@@ -8541,56 +8553,56 @@ var ComparingPlans = function(props) {
|
|
|
8541
8553
|
console.log("onCurrencyChange was not provided");
|
|
8542
8554
|
}
|
|
8543
8555
|
}
|
|
8544
|
-
})), /* @__PURE__ */
|
|
8556
|
+
})), /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8545
8557
|
className: " hawa-overflow-hidden hawa-rounded"
|
|
8546
|
-
}, /* @__PURE__ */
|
|
8558
|
+
}, /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8547
8559
|
className: "hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border-b hawa-border-t hawa-border-gray-200 hawa-bg-gray-100 hawa-p-4 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-white"
|
|
8548
|
-
}, /* @__PURE__ */
|
|
8560
|
+
}, /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8549
8561
|
className: "hawa-flex hawa-items-center"
|
|
8550
8562
|
}), props.plans.map(function(plan, i) {
|
|
8551
|
-
return /* @__PURE__ */
|
|
8563
|
+
return /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8552
8564
|
key: i
|
|
8553
|
-
}, /* @__PURE__ */
|
|
8565
|
+
}, /* @__PURE__ */ import_react59.default.createElement("h5", {
|
|
8554
8566
|
className: "hawa-text-md hawa-font-bold hawa-text-gray-500 dark:hawa-text-gray-400"
|
|
8555
|
-
}, plan.texts.title), /* @__PURE__ */
|
|
8567
|
+
}, plan.texts.title), /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8556
8568
|
className: " hawa-flex hawa-items-baseline hawa-text-gray-900 dark:hawa-text-white"
|
|
8557
|
-
}, /* @__PURE__ */
|
|
8569
|
+
}, /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, /* @__PURE__ */ import_react59.default.createElement("span", {
|
|
8558
8570
|
className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight"
|
|
8559
|
-
}, plan.price), /* @__PURE__ */
|
|
8571
|
+
}, plan.price), /* @__PURE__ */ import_react59.default.createElement("span", {
|
|
8560
8572
|
className: "hawa-mx-1 hawa-text-sm hawa-font-semibold"
|
|
8561
|
-
}, plan.texts.currencyText)), /* @__PURE__ */
|
|
8573
|
+
}, plan.texts.currencyText)), /* @__PURE__ */ import_react59.default.createElement("span", {
|
|
8562
8574
|
className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400"
|
|
8563
|
-
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */
|
|
8575
|
+
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */ import_react59.default.createElement("h5", {
|
|
8564
8576
|
className: "hawa-text-md hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400"
|
|
8565
8577
|
}, plan.texts.subtitle));
|
|
8566
8578
|
})), (_props_plans = props.plans) === null || _props_plans === void 0 ? void 0 : _props_plans.map(function(plan) {
|
|
8567
8579
|
return plan.features.map(function(feature, j) {
|
|
8568
|
-
return /* @__PURE__ */
|
|
8580
|
+
return /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8569
8581
|
key: j,
|
|
8570
8582
|
className: "hawa-grid hawa-grid-cols-4 hawa-gap-x-16 hawa-border-b hawa-border-gray-200 hawa-px-4 hawa-py-5 hawa-text-sm hawa-text-gray-700 dark:hawa-border-gray-700"
|
|
8571
|
-
}, /* @__PURE__ */
|
|
8583
|
+
}, /* @__PURE__ */ import_react59.default.createElement("div", {
|
|
8572
8584
|
className: " hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-gray-500 dark:hawa-text-gray-400"
|
|
8573
|
-
}, feature.text, feature.description && /* @__PURE__ */
|
|
8585
|
+
}, feature.text, feature.description && /* @__PURE__ */ import_react59.default.createElement(Tooltip, {
|
|
8574
8586
|
side: "right",
|
|
8575
8587
|
content: feature.description
|
|
8576
|
-
}, /* @__PURE__ */
|
|
8588
|
+
}, /* @__PURE__ */ import_react59.default.createElement("svg", {
|
|
8577
8589
|
stroke: "currentColor",
|
|
8578
8590
|
fill: "currentColor",
|
|
8579
8591
|
strokeWidth: "0",
|
|
8580
8592
|
viewBox: "0 0 16 16",
|
|
8581
8593
|
height: "1em",
|
|
8582
8594
|
width: "1em"
|
|
8583
|
-
}, /* @__PURE__ */
|
|
8595
|
+
}, /* @__PURE__ */ import_react59.default.createElement("path", {
|
|
8584
8596
|
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"
|
|
8585
|
-
})))), /* @__PURE__ */
|
|
8597
|
+
})))), /* @__PURE__ */ import_react59.default.createElement(UncheckMark, null), /* @__PURE__ */ import_react59.default.createElement(CheckMark, null), /* @__PURE__ */ import_react59.default.createElement(UncheckMark, null));
|
|
8586
8598
|
});
|
|
8587
8599
|
})));
|
|
8588
8600
|
};
|
|
8589
8601
|
// components/blocks/pricing/HorizontalPricing.tsx
|
|
8590
|
-
var
|
|
8602
|
+
var import_react60 = __toESM(require("react"));
|
|
8591
8603
|
var import_clsx13 = __toESM(require("clsx"));
|
|
8592
8604
|
var HorizontalPricing = function(props) {
|
|
8593
|
-
var _ref = _sliced_to_array((0,
|
|
8605
|
+
var _ref = _sliced_to_array((0, import_react60.useState)(""), 2), selectedCard = _ref[0], setSelectedCard = _ref[1];
|
|
8594
8606
|
var data = [
|
|
8595
8607
|
{
|
|
8596
8608
|
title: "basic",
|
|
@@ -8608,96 +8620,96 @@ var HorizontalPricing = function(props) {
|
|
|
8608
8620
|
cycle: "/mo"
|
|
8609
8621
|
}
|
|
8610
8622
|
];
|
|
8611
|
-
return /* @__PURE__ */
|
|
8623
|
+
return /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8612
8624
|
className: "hawa-z-10 hawa-w-full hawa-max-w-screen-sm"
|
|
8613
|
-
}, /* @__PURE__ */
|
|
8625
|
+
}, /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8614
8626
|
className: "hawa-max-w-2xl "
|
|
8615
|
-
}, /* @__PURE__ */
|
|
8627
|
+
}, /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8616
8628
|
className: "hawa-flex hawa-flex-row hawa-justify-between"
|
|
8617
|
-
}, /* @__PURE__ */
|
|
8629
|
+
}, /* @__PURE__ */ import_react60.default.createElement(Radio, {
|
|
8618
8630
|
design: "tabs",
|
|
8619
8631
|
options: props.currencies,
|
|
8620
8632
|
defaultValue: props.currentCurrency
|
|
8621
|
-
}), /* @__PURE__ */
|
|
8633
|
+
}), /* @__PURE__ */ import_react60.default.createElement(Radio, {
|
|
8622
8634
|
design: "tabs",
|
|
8623
8635
|
options: props.billingCycles,
|
|
8624
8636
|
defaultValue: props.currentCycle
|
|
8625
8637
|
})), data.map(function(d, i) {
|
|
8626
|
-
return /* @__PURE__ */
|
|
8638
|
+
return /* @__PURE__ */ import_react60.default.createElement("label", {
|
|
8627
8639
|
key: i,
|
|
8628
8640
|
htmlFor: d.title,
|
|
8629
8641
|
className: "",
|
|
8630
8642
|
onClick: function() {
|
|
8631
8643
|
return setSelectedCard(d.title);
|
|
8632
8644
|
}
|
|
8633
|
-
}, /* @__PURE__ */
|
|
8645
|
+
}, /* @__PURE__ */ import_react60.default.createElement("input", {
|
|
8634
8646
|
type: "radio",
|
|
8635
8647
|
name: "radio",
|
|
8636
8648
|
id: d.title,
|
|
8637
8649
|
className: "hawa-peer hawa-appearance-none"
|
|
8638
|
-
}), /* @__PURE__ */
|
|
8650
|
+
}), /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8639
8651
|
className: (0, import_clsx13.default)(selectedCard === d.title ? "peer-checked:hawa-border-blue-500" : "", "hawa-peer hawa-flex hawa-cursor-pointer hawa-items-center hawa-justify-between hawa-rounded-xl hawa-border hawa-bg-background hawa-px-5 hawa-py-4 hawa-shadow dark:hawa-text-white peer-checked:[&_.active]:hawa-block peer-checked:[&_.default]:hawa-hidden")
|
|
8640
|
-
}, /* @__PURE__ */
|
|
8652
|
+
}, /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8641
8653
|
className: "hawa-peer hawa-flex hawa-items-center hawa-gap-4"
|
|
8642
|
-
}, /* @__PURE__ */
|
|
8654
|
+
}, /* @__PURE__ */ import_react60.default.createElement(CheckIcons, null), /* @__PURE__ */ import_react60.default.createElement(CardText, {
|
|
8643
8655
|
title: "Enterprise",
|
|
8644
8656
|
subtitle: "For startups and new businesses"
|
|
8645
|
-
})), /* @__PURE__ */
|
|
8657
|
+
})), /* @__PURE__ */ import_react60.default.createElement(CardPrice, {
|
|
8646
8658
|
amount: d.price,
|
|
8647
8659
|
cycle: d.cycle
|
|
8648
8660
|
})));
|
|
8649
8661
|
})));
|
|
8650
8662
|
};
|
|
8651
8663
|
var CheckIcons = function() {
|
|
8652
|
-
return /* @__PURE__ */
|
|
8664
|
+
return /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement("svg", {
|
|
8653
8665
|
fill: "none",
|
|
8654
8666
|
viewBox: "0 0 24 24",
|
|
8655
8667
|
strokeWidth: "1.5",
|
|
8656
8668
|
stroke: "currentColor",
|
|
8657
8669
|
className: "hawa-default hawa-h-8 hawa-w-8 hawa-text-neutral-500"
|
|
8658
|
-
}, /* @__PURE__ */
|
|
8670
|
+
}, /* @__PURE__ */ import_react60.default.createElement("path", {
|
|
8659
8671
|
strokeLinecap: "round",
|
|
8660
8672
|
strokeLinejoin: "round",
|
|
8661
8673
|
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
8662
|
-
})), /* @__PURE__ */
|
|
8674
|
+
})), /* @__PURE__ */ import_react60.default.createElement("svg", {
|
|
8663
8675
|
viewBox: "0 0 24 24",
|
|
8664
8676
|
fill: "currentColor",
|
|
8665
8677
|
className: "hawa-active hawa-hidden hawa-h-8 hawa-w-8 hawa-text-blue-500"
|
|
8666
|
-
}, /* @__PURE__ */
|
|
8678
|
+
}, /* @__PURE__ */ import_react60.default.createElement("path", {
|
|
8667
8679
|
fillRule: "evenodd",
|
|
8668
8680
|
clipRule: "evenodd",
|
|
8669
8681
|
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z"
|
|
8670
8682
|
})));
|
|
8671
8683
|
};
|
|
8672
8684
|
var CardText = function(props) {
|
|
8673
|
-
return /* @__PURE__ */
|
|
8685
|
+
return /* @__PURE__ */ import_react60.default.createElement("div", {
|
|
8674
8686
|
className: "hawa-peer hawa-flex hawa-flex-col hawa-items-start "
|
|
8675
|
-
}, /* @__PURE__ */
|
|
8687
|
+
}, /* @__PURE__ */ import_react60.default.createElement("h2", {
|
|
8676
8688
|
className: "hawa-font-medium hawa-text-neutral-700 dark:hawa-text-gray-100 sm:hawa-text-xl"
|
|
8677
|
-
}, props.title), /* @__PURE__ */
|
|
8689
|
+
}, props.title), /* @__PURE__ */ import_react60.default.createElement("p", {
|
|
8678
8690
|
className: "hawa-text-sm hawa-text-neutral-500 dark:hawa-text-gray-300"
|
|
8679
8691
|
}, props.subtitle, " "));
|
|
8680
8692
|
};
|
|
8681
8693
|
var CardPrice = function(props) {
|
|
8682
|
-
return /* @__PURE__ */
|
|
8694
|
+
return /* @__PURE__ */ import_react60.default.createElement("h2", {
|
|
8683
8695
|
className: "hawa-peer hawa-text-xl hawa-font-semibold hawa-text-neutral-900 dark:hawa-text-white sm:hawa-text-2xl"
|
|
8684
|
-
}, props.amount, /* @__PURE__ */
|
|
8696
|
+
}, props.amount, /* @__PURE__ */ import_react60.default.createElement("span", {
|
|
8685
8697
|
className: "hawa-text-base hawa-font-medium hawa-text-neutral-400"
|
|
8686
8698
|
}, props.cycle));
|
|
8687
8699
|
};
|
|
8688
8700
|
// components/blocks/Usage.tsx
|
|
8689
|
-
var
|
|
8701
|
+
var import_react61 = __toESM(require("react"));
|
|
8690
8702
|
var Usage = function(props) {
|
|
8691
8703
|
var _props_percent;
|
|
8692
|
-
return /* @__PURE__ */
|
|
8704
|
+
return /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
8693
8705
|
className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-1 hawa-rounded hawa-border hawa-bg-card hawa-p-4"
|
|
8694
|
-
}, /* @__PURE__ */
|
|
8706
|
+
}, /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
8695
8707
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2"
|
|
8696
|
-
}, /* @__PURE__ */
|
|
8708
|
+
}, /* @__PURE__ */ import_react61.default.createElement("span", {
|
|
8697
8709
|
className: "hawa-bg-white-200"
|
|
8698
|
-
}, props.title), props.tooltip && /* @__PURE__ */
|
|
8710
|
+
}, props.title), props.tooltip && /* @__PURE__ */ import_react61.default.createElement(Tooltip, {
|
|
8699
8711
|
content: props.tooltip
|
|
8700
|
-
}, /* @__PURE__ */
|
|
8712
|
+
}, /* @__PURE__ */ import_react61.default.createElement("svg", {
|
|
8701
8713
|
stroke: "currentColor",
|
|
8702
8714
|
"aria-label": "Exclamation Circle",
|
|
8703
8715
|
fill: "currentColor",
|
|
@@ -8705,28 +8717,28 @@ var Usage = function(props) {
|
|
|
8705
8717
|
viewBox: "0 0 16 16",
|
|
8706
8718
|
height: "1em",
|
|
8707
8719
|
width: "1em"
|
|
8708
|
-
}, /* @__PURE__ */
|
|
8720
|
+
}, /* @__PURE__ */ import_react61.default.createElement("path", {
|
|
8709
8721
|
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"
|
|
8710
|
-
})))), /* @__PURE__ */
|
|
8722
|
+
})))), /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
8711
8723
|
className: "hawa-bg-white-100 hawa-flex hawa-flex-row"
|
|
8712
|
-
}, /* @__PURE__ */
|
|
8724
|
+
}, /* @__PURE__ */ import_react61.default.createElement("div", null, props.currentUsage), /* @__PURE__ */ import_react61.default.createElement("div", null, " (", props.percent, "%)")), /* @__PURE__ */ import_react61.default.createElement(Progress, {
|
|
8713
8725
|
value: (_props_percent = props.percent) !== null && _props_percent !== void 0 ? _props_percent : 0
|
|
8714
8726
|
}));
|
|
8715
8727
|
};
|
|
8716
8728
|
// components/hooks/useDiscloser.ts
|
|
8717
|
-
var import_react61 = require("react");
|
|
8718
|
-
// components/hooks/useHover.ts
|
|
8719
8729
|
var import_react62 = require("react");
|
|
8720
|
-
// components/hooks/
|
|
8730
|
+
// components/hooks/useHover.ts
|
|
8721
8731
|
var import_react63 = require("react");
|
|
8722
|
-
// components/hooks/
|
|
8732
|
+
// components/hooks/useCarousel.ts
|
|
8723
8733
|
var import_react64 = require("react");
|
|
8734
|
+
// components/hooks/useWindowSize.ts
|
|
8735
|
+
var import_react65 = require("react");
|
|
8724
8736
|
var useWindowSize = function() {
|
|
8725
|
-
var _ref = _sliced_to_array((0,
|
|
8737
|
+
var _ref = _sliced_to_array((0, import_react65.useState)({
|
|
8726
8738
|
width: void 0,
|
|
8727
8739
|
height: void 0
|
|
8728
8740
|
}), 2), windowSize = _ref[0], setWindowSize = _ref[1];
|
|
8729
|
-
(0,
|
|
8741
|
+
(0, import_react65.useEffect)(function() {
|
|
8730
8742
|
var handleResize = function handleResize() {
|
|
8731
8743
|
setWindowSize({
|
|
8732
8744
|
width: window.innerWidth,
|
|
@@ -8742,7 +8754,7 @@ var useWindowSize = function() {
|
|
|
8742
8754
|
return windowSize;
|
|
8743
8755
|
};
|
|
8744
8756
|
// components/hooks/useFocusWithin.ts
|
|
8745
|
-
var
|
|
8757
|
+
var import_react66 = require("react");
|
|
8746
8758
|
function containsRelatedTarget(event) {
|
|
8747
8759
|
if (_instanceof(event.currentTarget, HTMLElement) && _instanceof(event.relatedTarget, HTMLElement)) {
|
|
8748
8760
|
return event.currentTarget.contains(event.relatedTarget);
|
|
@@ -8751,9 +8763,9 @@ function containsRelatedTarget(event) {
|
|
|
8751
8763
|
}
|
|
8752
8764
|
function useFocusWithin() {
|
|
8753
8765
|
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, onBlur = _ref.onBlur, onFocus = _ref.onFocus;
|
|
8754
|
-
var ref = (0,
|
|
8755
|
-
var _ref1 = _sliced_to_array((0,
|
|
8756
|
-
var focusedRef = (0,
|
|
8766
|
+
var ref = (0, import_react66.useRef)(null);
|
|
8767
|
+
var _ref1 = _sliced_to_array((0, import_react66.useState)(false), 2), focused = _ref1[0], _setFocused = _ref1[1];
|
|
8768
|
+
var focusedRef = (0, import_react66.useRef)(false);
|
|
8757
8769
|
var setFocused = function(value) {
|
|
8758
8770
|
_setFocused(value);
|
|
8759
8771
|
focusedRef.current = value;
|
|
@@ -8770,7 +8782,7 @@ function useFocusWithin() {
|
|
|
8770
8782
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
8771
8783
|
}
|
|
8772
8784
|
};
|
|
8773
|
-
(0,
|
|
8785
|
+
(0, import_react66.useEffect)(function() {
|
|
8774
8786
|
if (ref.current) {
|
|
8775
8787
|
ref.current.addEventListener("focusin", handleFocusIn);
|
|
8776
8788
|
ref.current.addEventListener("focusout", handleFocusOut);
|
|
@@ -8791,7 +8803,7 @@ function useFocusWithin() {
|
|
|
8791
8803
|
};
|
|
8792
8804
|
}
|
|
8793
8805
|
// components/hooks/useMediaQuery.ts
|
|
8794
|
-
var
|
|
8806
|
+
var import_react67 = require("react");
|
|
8795
8807
|
function attachMediaListener(query, callback) {
|
|
8796
8808
|
try {
|
|
8797
8809
|
query.addEventListener("change", callback);
|
|
@@ -8818,9 +8830,9 @@ function useMediaQuery(query, initialValue) {
|
|
|
8818
8830
|
var getInitialValueInEffect = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
8819
8831
|
getInitialValueInEffect: true
|
|
8820
8832
|
}).getInitialValueInEffect;
|
|
8821
|
-
var _ref = _sliced_to_array((0,
|
|
8822
|
-
var queryRef = (0,
|
|
8823
|
-
(0,
|
|
8833
|
+
var _ref = _sliced_to_array((0, import_react67.useState)(getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)), 2), matches = _ref[0], setMatches = _ref[1];
|
|
8834
|
+
var queryRef = (0, import_react67.useRef)();
|
|
8835
|
+
(0, import_react67.useEffect)(function() {
|
|
8824
8836
|
if ("matchMedia" in window) {
|
|
8825
8837
|
queryRef.current = window.matchMedia(query);
|
|
8826
8838
|
setMatches(queryRef.current.matches);
|
|
@@ -8835,15 +8847,15 @@ function useMediaQuery(query, initialValue) {
|
|
|
8835
8847
|
return matches;
|
|
8836
8848
|
}
|
|
8837
8849
|
// components/hooks/useScrollPosition.ts
|
|
8838
|
-
var import_react67 = require("react");
|
|
8839
|
-
// components/hooks/useTable.ts
|
|
8840
8850
|
var import_react68 = require("react");
|
|
8841
|
-
// components/hooks/
|
|
8851
|
+
// components/hooks/useTable.ts
|
|
8842
8852
|
var import_react69 = require("react");
|
|
8853
|
+
// components/hooks/useTabs.ts
|
|
8854
|
+
var import_react70 = require("react");
|
|
8843
8855
|
function useTabs() {
|
|
8844
8856
|
var initialTab = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
8845
|
-
var _ref = _sliced_to_array((0,
|
|
8846
|
-
(0,
|
|
8857
|
+
var _ref = _sliced_to_array((0, import_react70.useState)(initialTab), 2), activeTab = _ref[0], setActiveTab = _ref[1];
|
|
8858
|
+
(0, import_react70.useEffect)(function() {
|
|
8847
8859
|
var handleHashChange = function() {
|
|
8848
8860
|
var hash = window.location.hash.substring(1);
|
|
8849
8861
|
setActiveTab(hash || initialTab);
|