@sikka/hawa 0.19.11-next → 0.19.13-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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +66 -46
- package/dist/index.mjs +66 -46
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1692,6 +1692,8 @@ type PricingPlansTypes = {
|
|
|
1692
1692
|
onCycleChange?: (e: any) => void;
|
|
1693
1693
|
onCurrencyChange?: (e: any) => void;
|
|
1694
1694
|
direction?: DirectionType;
|
|
1695
|
+
mainContainerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
1696
|
+
cardsContainerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
1695
1697
|
};
|
|
1696
1698
|
declare const PricingPlans: FC<PricingPlansTypes>;
|
|
1697
1699
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1692,6 +1692,8 @@ type PricingPlansTypes = {
|
|
|
1692
1692
|
onCycleChange?: (e: any) => void;
|
|
1693
1693
|
onCurrencyChange?: (e: any) => void;
|
|
1694
1694
|
direction?: DirectionType;
|
|
1695
|
+
mainContainerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
1696
|
+
cardsContainerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
1695
1697
|
};
|
|
1696
1698
|
declare const PricingPlans: FC<PricingPlansTypes>;
|
|
1697
1699
|
|
package/dist/index.js
CHANGED
|
@@ -803,9 +803,9 @@ var PricingCard = ({
|
|
|
803
803
|
}) => {
|
|
804
804
|
var _a;
|
|
805
805
|
let cardSizes = {
|
|
806
|
-
small: "hawa-
|
|
807
|
-
medium: "hawa-
|
|
808
|
-
large: "hawa-
|
|
806
|
+
small: "hawa-w-full hawa-max-w-sm hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
807
|
+
medium: "hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
808
|
+
large: "hawa-w-full hawa-max-w-lg hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background "
|
|
809
809
|
};
|
|
810
810
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
811
811
|
Card,
|
|
@@ -814,15 +814,10 @@ var PricingCard = ({
|
|
|
814
814
|
className: cn(
|
|
815
815
|
currentPlan ? "hawa-border-primary dark:hawa-border-primary/70 hawa-border-2 " : "hawa-border",
|
|
816
816
|
cardSizes[size],
|
|
817
|
-
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 "
|
|
817
|
+
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 hawa-justify-between"
|
|
818
818
|
)
|
|
819
819
|
},
|
|
820
|
-
props.discount && /* @__PURE__ */ import_react6.default.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }),
|
|
821
|
-
" ",
|
|
822
|
-
/* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70" }, props.texts.title),
|
|
823
|
-
/* @__PURE__ */ import_react6.default.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, props.isLoading ? /* @__PURE__ */ import_react6.default.createElement(Skeleton, { className: "hawa-w-full hawa-max-w-[200px] hawa-h-[48px] hawa-p-0 " }) : /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText))),
|
|
824
|
-
/* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
|
|
825
|
-
props.features && /* @__PURE__ */ import_react6.default.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
|
|
820
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-text-md hawa-relative hawa-flex hawa-flex-row hawa-justify-between hawa-font-bold hawa-text-primary/70" }, /* @__PURE__ */ import_react6.default.createElement("span", null, props.texts.title), props.discount && /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-absolute hawa-end-0" }, /* @__PURE__ */ import_react6.default.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }))), /* @__PURE__ */ import_react6.default.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, props.isLoading ? /* @__PURE__ */ import_react6.default.createElement(Skeleton, { className: "hawa-w-full hawa-max-w-[200px] hawa-h-[48px] hawa-p-0 " }) : /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText))), /* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle), props.features && /* @__PURE__ */ import_react6.default.createElement("ul", { role: "list", className: "hawa-space-y-0" }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
|
|
826
821
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
827
822
|
"li",
|
|
828
823
|
{
|
|
@@ -852,7 +847,7 @@ var PricingCard = ({
|
|
|
852
847
|
) : /* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-w-4 hawa-h-4 hawa-rounded-full hawa-bg-primary/10 hawa-m-2 hawa-mx-2.5" }),
|
|
853
848
|
/* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-2 hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react6.default.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))
|
|
854
849
|
);
|
|
855
|
-
})),
|
|
850
|
+
}))),
|
|
856
851
|
/* @__PURE__ */ import_react6.default.createElement(
|
|
857
852
|
Button,
|
|
858
853
|
{
|
|
@@ -3552,7 +3547,7 @@ var Radio = ({
|
|
|
3552
3547
|
onClick: () => {
|
|
3553
3548
|
setSelectedOption(opt.value);
|
|
3554
3549
|
if (props.onChangeTab) {
|
|
3555
|
-
props.onChangeTab(opt
|
|
3550
|
+
props.onChangeTab(opt);
|
|
3556
3551
|
} else {
|
|
3557
3552
|
console.log("onChangeTab was not provided");
|
|
3558
3553
|
}
|
|
@@ -3654,7 +3649,7 @@ var Radio = ({
|
|
|
3654
3649
|
onChange: () => {
|
|
3655
3650
|
setSelectedOption(opt.value);
|
|
3656
3651
|
if (props.onChangeTab) {
|
|
3657
|
-
props.onChangeTab(opt
|
|
3652
|
+
props.onChangeTab(opt);
|
|
3658
3653
|
} else {
|
|
3659
3654
|
console.log("onChangeTab was not provided");
|
|
3660
3655
|
}
|
|
@@ -7080,7 +7075,7 @@ var InterfaceSettings = ({
|
|
|
7080
7075
|
defaultValue: language,
|
|
7081
7076
|
onChangeTab: (e) => {
|
|
7082
7077
|
if (handleLanguage) {
|
|
7083
|
-
handleLanguage(e);
|
|
7078
|
+
handleLanguage(e.value);
|
|
7084
7079
|
}
|
|
7085
7080
|
setLanguage(e);
|
|
7086
7081
|
},
|
|
@@ -7097,7 +7092,7 @@ var InterfaceSettings = ({
|
|
|
7097
7092
|
defaultValue: color,
|
|
7098
7093
|
onChangeTab: (e) => {
|
|
7099
7094
|
if (handleColorMode) {
|
|
7100
|
-
handleColorMode(e);
|
|
7095
|
+
handleColorMode(e.value);
|
|
7101
7096
|
}
|
|
7102
7097
|
setColor(e);
|
|
7103
7098
|
},
|
|
@@ -10334,13 +10329,21 @@ var UserReferralSource = ({
|
|
|
10334
10329
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
|
10335
10330
|
feedback: z6.string().optional()
|
|
10336
10331
|
});
|
|
10337
|
-
const { handleSubmit, control, formState } = (0, import_react_hook_form6.useForm)({
|
|
10332
|
+
const { handleSubmit, control, formState, watch } = (0, import_react_hook_form6.useForm)({
|
|
10338
10333
|
resolver: (0, import_zod6.zodResolver)(formSchema)
|
|
10339
10334
|
});
|
|
10335
|
+
const selectedSource = watch("source");
|
|
10340
10336
|
const boxPosition = {
|
|
10341
10337
|
"bottom-right": "hawa-right-4",
|
|
10342
10338
|
"bottom-left": "hawa-left-4"
|
|
10343
10339
|
};
|
|
10340
|
+
const optionsWithOther = [
|
|
10341
|
+
...options,
|
|
10342
|
+
{
|
|
10343
|
+
value: "other",
|
|
10344
|
+
label: "Other"
|
|
10345
|
+
}
|
|
10346
|
+
];
|
|
10344
10347
|
return /* @__PURE__ */ import_react56.default.createElement(
|
|
10345
10348
|
"div",
|
|
10346
10349
|
{
|
|
@@ -10403,8 +10406,9 @@ var UserReferralSource = ({
|
|
|
10403
10406
|
onSubmit: handleSubmit((e) => {
|
|
10404
10407
|
if (props.onSubmitForm) {
|
|
10405
10408
|
props.onSubmitForm(e);
|
|
10409
|
+
} else {
|
|
10410
|
+
console.log("onSubmitForm was not provided");
|
|
10406
10411
|
}
|
|
10407
|
-
console.log("onSubmitForm was not provided");
|
|
10408
10412
|
})
|
|
10409
10413
|
},
|
|
10410
10414
|
/* @__PURE__ */ import_react56.default.createElement(
|
|
@@ -10428,9 +10432,9 @@ var UserReferralSource = ({
|
|
|
10428
10432
|
{
|
|
10429
10433
|
direction: props.direction,
|
|
10430
10434
|
orientation: "vertical",
|
|
10431
|
-
options,
|
|
10435
|
+
options: optionsWithOther,
|
|
10432
10436
|
defaultValue: field.value,
|
|
10433
|
-
onChangeTab: (e) => field.onChange(e),
|
|
10437
|
+
onChangeTab: (e) => field.onChange(e.value),
|
|
10434
10438
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10435
10439
|
}
|
|
10436
10440
|
);
|
|
@@ -10448,6 +10452,10 @@ var UserReferralSource = ({
|
|
|
10448
10452
|
Textarea,
|
|
10449
10453
|
{
|
|
10450
10454
|
...field,
|
|
10455
|
+
textareaProps: {
|
|
10456
|
+
onChange: (e) => field.onChange(e.target.value),
|
|
10457
|
+
disabled: selectedSource !== "other"
|
|
10458
|
+
},
|
|
10451
10459
|
helperText: (_b2 = (_a2 = formState.errors.feedback) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10452
10460
|
}
|
|
10453
10461
|
);
|
|
@@ -10918,8 +10926,12 @@ var NoPermission = ({ texts }) => {
|
|
|
10918
10926
|
|
|
10919
10927
|
// components/blocks/pricing/PricingPlans.tsx
|
|
10920
10928
|
var import_react67 = __toESM(require("react"));
|
|
10921
|
-
var PricingPlans = (
|
|
10922
|
-
|
|
10929
|
+
var PricingPlans = ({
|
|
10930
|
+
mainContainerProps,
|
|
10931
|
+
cardsContainerProps,
|
|
10932
|
+
...props
|
|
10933
|
+
}) => {
|
|
10934
|
+
return /* @__PURE__ */ import_react67.default.createElement("div", { ...mainContainerProps }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ import_react67.default.createElement(
|
|
10923
10935
|
Radio,
|
|
10924
10936
|
{
|
|
10925
10937
|
design: "tabs",
|
|
@@ -10938,38 +10950,46 @@ var PricingPlans = (props) => {
|
|
|
10938
10950
|
defaultValue: props.currentCurrency,
|
|
10939
10951
|
options: props.currencies,
|
|
10940
10952
|
onChangeTab: (e) => {
|
|
10953
|
+
console.log("on change tab", e);
|
|
10941
10954
|
if (props.onCurrencyChange) {
|
|
10942
10955
|
props.onCurrencyChange(e);
|
|
10943
10956
|
}
|
|
10944
10957
|
}
|
|
10945
10958
|
}
|
|
10946
|
-
)), /* @__PURE__ */ import_react67.default.createElement(
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10959
|
+
)), /* @__PURE__ */ import_react67.default.createElement(
|
|
10960
|
+
"div",
|
|
10961
|
+
{
|
|
10962
|
+
className: "hawa-flex hawa-flex-col hawa-gap-2 md:hawa-flex-row hawa-justify-between",
|
|
10963
|
+
...cardsContainerProps
|
|
10964
|
+
},
|
|
10965
|
+
props.plans.map((plan, index) => {
|
|
10966
|
+
var _a, _b;
|
|
10967
|
+
return /* @__PURE__ */ import_react67.default.createElement(
|
|
10968
|
+
PricingCard,
|
|
10969
|
+
{
|
|
10970
|
+
key: index,
|
|
10971
|
+
onPlanClicked: () => {
|
|
10972
|
+
var _a2, _b2;
|
|
10973
|
+
if (props.onPlanClicked) {
|
|
10974
|
+
let clickedData = {
|
|
10975
|
+
// plan: plan.id,
|
|
10976
|
+
currency: (_a2 = props.currentCurrency) == null ? void 0 : _a2.value,
|
|
10977
|
+
cycle: (_b2 = props.currentCycle) == null ? void 0 : _b2.value,
|
|
10978
|
+
...plan
|
|
10979
|
+
};
|
|
10980
|
+
props.onPlanClicked(clickedData);
|
|
10981
|
+
}
|
|
10982
|
+
},
|
|
10983
|
+
...plan,
|
|
10984
|
+
texts: {
|
|
10985
|
+
...plan.texts,
|
|
10986
|
+
currencyText: (_a = props.currentCurrency) == null ? void 0 : _a.label,
|
|
10987
|
+
cycleText: (_b = props.currentCycle) == null ? void 0 : _b.label
|
|
10962
10988
|
}
|
|
10963
|
-
},
|
|
10964
|
-
...plan,
|
|
10965
|
-
texts: {
|
|
10966
|
-
...plan.texts,
|
|
10967
|
-
currencyText: (_a = props.currentCurrency) == null ? void 0 : _a.label,
|
|
10968
|
-
cycleText: (_b = props.currentCycle) == null ? void 0 : _b.label
|
|
10969
10989
|
}
|
|
10970
|
-
|
|
10971
|
-
)
|
|
10972
|
-
|
|
10990
|
+
);
|
|
10991
|
+
})
|
|
10992
|
+
));
|
|
10973
10993
|
};
|
|
10974
10994
|
|
|
10975
10995
|
// components/blocks/pricing/ComparingPlans.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -570,9 +570,9 @@ var PricingCard = ({
|
|
|
570
570
|
}) => {
|
|
571
571
|
var _a;
|
|
572
572
|
let cardSizes = {
|
|
573
|
-
small: "hawa-
|
|
574
|
-
medium: "hawa-
|
|
575
|
-
large: "hawa-
|
|
573
|
+
small: "hawa-w-full hawa-max-w-sm hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
574
|
+
medium: "hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
575
|
+
large: "hawa-w-full hawa-max-w-lg hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background "
|
|
576
576
|
};
|
|
577
577
|
return /* @__PURE__ */ React9.createElement(
|
|
578
578
|
Card,
|
|
@@ -581,15 +581,10 @@ var PricingCard = ({
|
|
|
581
581
|
className: cn(
|
|
582
582
|
currentPlan ? "hawa-border-primary dark:hawa-border-primary/70 hawa-border-2 " : "hawa-border",
|
|
583
583
|
cardSizes[size],
|
|
584
|
-
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 "
|
|
584
|
+
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 hawa-justify-between"
|
|
585
585
|
)
|
|
586
586
|
},
|
|
587
|
-
props.discount && /* @__PURE__ */ React9.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }),
|
|
588
|
-
" ",
|
|
589
|
-
/* @__PURE__ */ React9.createElement("h5", { className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70" }, props.texts.title),
|
|
590
|
-
/* @__PURE__ */ React9.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, props.isLoading ? /* @__PURE__ */ React9.createElement(Skeleton, { className: "hawa-w-full hawa-max-w-[200px] hawa-h-[48px] hawa-p-0 " }) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ React9.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ React9.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText))),
|
|
591
|
-
/* @__PURE__ */ React9.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
|
|
592
|
-
props.features && /* @__PURE__ */ React9.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
|
|
587
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-text-md hawa-relative hawa-flex hawa-flex-row hawa-justify-between hawa-font-bold hawa-text-primary/70" }, /* @__PURE__ */ React9.createElement("span", null, props.texts.title), props.discount && /* @__PURE__ */ React9.createElement("span", { className: "hawa-absolute hawa-end-0" }, /* @__PURE__ */ React9.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }))), /* @__PURE__ */ React9.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, props.isLoading ? /* @__PURE__ */ React9.createElement(Skeleton, { className: "hawa-w-full hawa-max-w-[200px] hawa-h-[48px] hawa-p-0 " }) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ React9.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ React9.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText))), /* @__PURE__ */ React9.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle), props.features && /* @__PURE__ */ React9.createElement("ul", { role: "list", className: "hawa-space-y-0" }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
|
|
593
588
|
return /* @__PURE__ */ React9.createElement(
|
|
594
589
|
"li",
|
|
595
590
|
{
|
|
@@ -619,7 +614,7 @@ var PricingCard = ({
|
|
|
619
614
|
) : /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-4 hawa-h-4 hawa-rounded-full hawa-bg-primary/10 hawa-m-2 hawa-mx-2.5" }),
|
|
620
615
|
/* @__PURE__ */ React9.createElement("span", { className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-2 hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React9.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))
|
|
621
616
|
);
|
|
622
|
-
})),
|
|
617
|
+
}))),
|
|
623
618
|
/* @__PURE__ */ React9.createElement(
|
|
624
619
|
Button,
|
|
625
620
|
{
|
|
@@ -3319,7 +3314,7 @@ var Radio = ({
|
|
|
3319
3314
|
onClick: () => {
|
|
3320
3315
|
setSelectedOption(opt.value);
|
|
3321
3316
|
if (props.onChangeTab) {
|
|
3322
|
-
props.onChangeTab(opt
|
|
3317
|
+
props.onChangeTab(opt);
|
|
3323
3318
|
} else {
|
|
3324
3319
|
console.log("onChangeTab was not provided");
|
|
3325
3320
|
}
|
|
@@ -3421,7 +3416,7 @@ var Radio = ({
|
|
|
3421
3416
|
onChange: () => {
|
|
3422
3417
|
setSelectedOption(opt.value);
|
|
3423
3418
|
if (props.onChangeTab) {
|
|
3424
|
-
props.onChangeTab(opt
|
|
3419
|
+
props.onChangeTab(opt);
|
|
3425
3420
|
} else {
|
|
3426
3421
|
console.log("onChangeTab was not provided");
|
|
3427
3422
|
}
|
|
@@ -6862,7 +6857,7 @@ var InterfaceSettings = ({
|
|
|
6862
6857
|
defaultValue: language,
|
|
6863
6858
|
onChangeTab: (e) => {
|
|
6864
6859
|
if (handleLanguage) {
|
|
6865
|
-
handleLanguage(e);
|
|
6860
|
+
handleLanguage(e.value);
|
|
6866
6861
|
}
|
|
6867
6862
|
setLanguage(e);
|
|
6868
6863
|
},
|
|
@@ -6879,7 +6874,7 @@ var InterfaceSettings = ({
|
|
|
6879
6874
|
defaultValue: color,
|
|
6880
6875
|
onChangeTab: (e) => {
|
|
6881
6876
|
if (handleColorMode) {
|
|
6882
|
-
handleColorMode(e);
|
|
6877
|
+
handleColorMode(e.value);
|
|
6883
6878
|
}
|
|
6884
6879
|
setColor(e);
|
|
6885
6880
|
},
|
|
@@ -10118,13 +10113,21 @@ var UserReferralSource = ({
|
|
|
10118
10113
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
|
10119
10114
|
feedback: z6.string().optional()
|
|
10120
10115
|
});
|
|
10121
|
-
const { handleSubmit, control, formState } = useForm6({
|
|
10116
|
+
const { handleSubmit, control, formState, watch } = useForm6({
|
|
10122
10117
|
resolver: zodResolver6(formSchema)
|
|
10123
10118
|
});
|
|
10119
|
+
const selectedSource = watch("source");
|
|
10124
10120
|
const boxPosition = {
|
|
10125
10121
|
"bottom-right": "hawa-right-4",
|
|
10126
10122
|
"bottom-left": "hawa-left-4"
|
|
10127
10123
|
};
|
|
10124
|
+
const optionsWithOther = [
|
|
10125
|
+
...options,
|
|
10126
|
+
{
|
|
10127
|
+
value: "other",
|
|
10128
|
+
label: "Other"
|
|
10129
|
+
}
|
|
10130
|
+
];
|
|
10128
10131
|
return /* @__PURE__ */ React83.createElement(
|
|
10129
10132
|
"div",
|
|
10130
10133
|
{
|
|
@@ -10187,8 +10190,9 @@ var UserReferralSource = ({
|
|
|
10187
10190
|
onSubmit: handleSubmit((e) => {
|
|
10188
10191
|
if (props.onSubmitForm) {
|
|
10189
10192
|
props.onSubmitForm(e);
|
|
10193
|
+
} else {
|
|
10194
|
+
console.log("onSubmitForm was not provided");
|
|
10190
10195
|
}
|
|
10191
|
-
console.log("onSubmitForm was not provided");
|
|
10192
10196
|
})
|
|
10193
10197
|
},
|
|
10194
10198
|
/* @__PURE__ */ React83.createElement(
|
|
@@ -10212,9 +10216,9 @@ var UserReferralSource = ({
|
|
|
10212
10216
|
{
|
|
10213
10217
|
direction: props.direction,
|
|
10214
10218
|
orientation: "vertical",
|
|
10215
|
-
options,
|
|
10219
|
+
options: optionsWithOther,
|
|
10216
10220
|
defaultValue: field.value,
|
|
10217
|
-
onChangeTab: (e) => field.onChange(e),
|
|
10221
|
+
onChangeTab: (e) => field.onChange(e.value),
|
|
10218
10222
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10219
10223
|
}
|
|
10220
10224
|
);
|
|
@@ -10232,6 +10236,10 @@ var UserReferralSource = ({
|
|
|
10232
10236
|
Textarea,
|
|
10233
10237
|
{
|
|
10234
10238
|
...field,
|
|
10239
|
+
textareaProps: {
|
|
10240
|
+
onChange: (e) => field.onChange(e.target.value),
|
|
10241
|
+
disabled: selectedSource !== "other"
|
|
10242
|
+
},
|
|
10235
10243
|
helperText: (_b2 = (_a2 = formState.errors.feedback) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10236
10244
|
}
|
|
10237
10245
|
);
|
|
@@ -10702,8 +10710,12 @@ var NoPermission = ({ texts }) => {
|
|
|
10702
10710
|
|
|
10703
10711
|
// components/blocks/pricing/PricingPlans.tsx
|
|
10704
10712
|
import React94 from "react";
|
|
10705
|
-
var PricingPlans = (
|
|
10706
|
-
|
|
10713
|
+
var PricingPlans = ({
|
|
10714
|
+
mainContainerProps,
|
|
10715
|
+
cardsContainerProps,
|
|
10716
|
+
...props
|
|
10717
|
+
}) => {
|
|
10718
|
+
return /* @__PURE__ */ React94.createElement("div", { ...mainContainerProps }, /* @__PURE__ */ React94.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ React94.createElement(
|
|
10707
10719
|
Radio,
|
|
10708
10720
|
{
|
|
10709
10721
|
design: "tabs",
|
|
@@ -10722,38 +10734,46 @@ var PricingPlans = (props) => {
|
|
|
10722
10734
|
defaultValue: props.currentCurrency,
|
|
10723
10735
|
options: props.currencies,
|
|
10724
10736
|
onChangeTab: (e) => {
|
|
10737
|
+
console.log("on change tab", e);
|
|
10725
10738
|
if (props.onCurrencyChange) {
|
|
10726
10739
|
props.onCurrencyChange(e);
|
|
10727
10740
|
}
|
|
10728
10741
|
}
|
|
10729
10742
|
}
|
|
10730
|
-
)), /* @__PURE__ */ React94.createElement(
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10743
|
+
)), /* @__PURE__ */ React94.createElement(
|
|
10744
|
+
"div",
|
|
10745
|
+
{
|
|
10746
|
+
className: "hawa-flex hawa-flex-col hawa-gap-2 md:hawa-flex-row hawa-justify-between",
|
|
10747
|
+
...cardsContainerProps
|
|
10748
|
+
},
|
|
10749
|
+
props.plans.map((plan, index) => {
|
|
10750
|
+
var _a, _b;
|
|
10751
|
+
return /* @__PURE__ */ React94.createElement(
|
|
10752
|
+
PricingCard,
|
|
10753
|
+
{
|
|
10754
|
+
key: index,
|
|
10755
|
+
onPlanClicked: () => {
|
|
10756
|
+
var _a2, _b2;
|
|
10757
|
+
if (props.onPlanClicked) {
|
|
10758
|
+
let clickedData = {
|
|
10759
|
+
// plan: plan.id,
|
|
10760
|
+
currency: (_a2 = props.currentCurrency) == null ? void 0 : _a2.value,
|
|
10761
|
+
cycle: (_b2 = props.currentCycle) == null ? void 0 : _b2.value,
|
|
10762
|
+
...plan
|
|
10763
|
+
};
|
|
10764
|
+
props.onPlanClicked(clickedData);
|
|
10765
|
+
}
|
|
10766
|
+
},
|
|
10767
|
+
...plan,
|
|
10768
|
+
texts: {
|
|
10769
|
+
...plan.texts,
|
|
10770
|
+
currencyText: (_a = props.currentCurrency) == null ? void 0 : _a.label,
|
|
10771
|
+
cycleText: (_b = props.currentCycle) == null ? void 0 : _b.label
|
|
10746
10772
|
}
|
|
10747
|
-
},
|
|
10748
|
-
...plan,
|
|
10749
|
-
texts: {
|
|
10750
|
-
...plan.texts,
|
|
10751
|
-
currencyText: (_a = props.currentCurrency) == null ? void 0 : _a.label,
|
|
10752
|
-
cycleText: (_b = props.currentCycle) == null ? void 0 : _b.label
|
|
10753
10773
|
}
|
|
10754
|
-
|
|
10755
|
-
)
|
|
10756
|
-
|
|
10774
|
+
);
|
|
10775
|
+
})
|
|
10776
|
+
));
|
|
10757
10777
|
};
|
|
10758
10778
|
|
|
10759
10779
|
// components/blocks/pricing/ComparingPlans.tsx
|