@sikka/hawa 0.19.12-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.js +25 -14
- package/dist/index.mjs +25 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -814,13 +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
|
-
/* @__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" }))),
|
|
821
|
-
/* @__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))),
|
|
822
|
-
/* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
|
|
823
|
-
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) => {
|
|
824
821
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
825
822
|
"li",
|
|
826
823
|
{
|
|
@@ -850,7 +847,7 @@ var PricingCard = ({
|
|
|
850
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" }),
|
|
851
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" }))
|
|
852
849
|
);
|
|
853
|
-
})),
|
|
850
|
+
}))),
|
|
854
851
|
/* @__PURE__ */ import_react6.default.createElement(
|
|
855
852
|
Button,
|
|
856
853
|
{
|
|
@@ -3550,7 +3547,7 @@ var Radio = ({
|
|
|
3550
3547
|
onClick: () => {
|
|
3551
3548
|
setSelectedOption(opt.value);
|
|
3552
3549
|
if (props.onChangeTab) {
|
|
3553
|
-
props.onChangeTab(opt
|
|
3550
|
+
props.onChangeTab(opt);
|
|
3554
3551
|
} else {
|
|
3555
3552
|
console.log("onChangeTab was not provided");
|
|
3556
3553
|
}
|
|
@@ -3652,7 +3649,7 @@ var Radio = ({
|
|
|
3652
3649
|
onChange: () => {
|
|
3653
3650
|
setSelectedOption(opt.value);
|
|
3654
3651
|
if (props.onChangeTab) {
|
|
3655
|
-
props.onChangeTab(opt
|
|
3652
|
+
props.onChangeTab(opt);
|
|
3656
3653
|
} else {
|
|
3657
3654
|
console.log("onChangeTab was not provided");
|
|
3658
3655
|
}
|
|
@@ -7078,7 +7075,7 @@ var InterfaceSettings = ({
|
|
|
7078
7075
|
defaultValue: language,
|
|
7079
7076
|
onChangeTab: (e) => {
|
|
7080
7077
|
if (handleLanguage) {
|
|
7081
|
-
handleLanguage(e);
|
|
7078
|
+
handleLanguage(e.value);
|
|
7082
7079
|
}
|
|
7083
7080
|
setLanguage(e);
|
|
7084
7081
|
},
|
|
@@ -7095,7 +7092,7 @@ var InterfaceSettings = ({
|
|
|
7095
7092
|
defaultValue: color,
|
|
7096
7093
|
onChangeTab: (e) => {
|
|
7097
7094
|
if (handleColorMode) {
|
|
7098
|
-
handleColorMode(e);
|
|
7095
|
+
handleColorMode(e.value);
|
|
7099
7096
|
}
|
|
7100
7097
|
setColor(e);
|
|
7101
7098
|
},
|
|
@@ -10332,13 +10329,21 @@ var UserReferralSource = ({
|
|
|
10332
10329
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
|
10333
10330
|
feedback: z6.string().optional()
|
|
10334
10331
|
});
|
|
10335
|
-
const { handleSubmit, control, formState } = (0, import_react_hook_form6.useForm)({
|
|
10332
|
+
const { handleSubmit, control, formState, watch } = (0, import_react_hook_form6.useForm)({
|
|
10336
10333
|
resolver: (0, import_zod6.zodResolver)(formSchema)
|
|
10337
10334
|
});
|
|
10335
|
+
const selectedSource = watch("source");
|
|
10338
10336
|
const boxPosition = {
|
|
10339
10337
|
"bottom-right": "hawa-right-4",
|
|
10340
10338
|
"bottom-left": "hawa-left-4"
|
|
10341
10339
|
};
|
|
10340
|
+
const optionsWithOther = [
|
|
10341
|
+
...options,
|
|
10342
|
+
{
|
|
10343
|
+
value: "other",
|
|
10344
|
+
label: "Other"
|
|
10345
|
+
}
|
|
10346
|
+
];
|
|
10342
10347
|
return /* @__PURE__ */ import_react56.default.createElement(
|
|
10343
10348
|
"div",
|
|
10344
10349
|
{
|
|
@@ -10401,8 +10406,9 @@ var UserReferralSource = ({
|
|
|
10401
10406
|
onSubmit: handleSubmit((e) => {
|
|
10402
10407
|
if (props.onSubmitForm) {
|
|
10403
10408
|
props.onSubmitForm(e);
|
|
10409
|
+
} else {
|
|
10410
|
+
console.log("onSubmitForm was not provided");
|
|
10404
10411
|
}
|
|
10405
|
-
console.log("onSubmitForm was not provided");
|
|
10406
10412
|
})
|
|
10407
10413
|
},
|
|
10408
10414
|
/* @__PURE__ */ import_react56.default.createElement(
|
|
@@ -10426,9 +10432,9 @@ var UserReferralSource = ({
|
|
|
10426
10432
|
{
|
|
10427
10433
|
direction: props.direction,
|
|
10428
10434
|
orientation: "vertical",
|
|
10429
|
-
options,
|
|
10435
|
+
options: optionsWithOther,
|
|
10430
10436
|
defaultValue: field.value,
|
|
10431
|
-
onChangeTab: (e) => field.onChange(e),
|
|
10437
|
+
onChangeTab: (e) => field.onChange(e.value),
|
|
10432
10438
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10433
10439
|
}
|
|
10434
10440
|
);
|
|
@@ -10446,6 +10452,10 @@ var UserReferralSource = ({
|
|
|
10446
10452
|
Textarea,
|
|
10447
10453
|
{
|
|
10448
10454
|
...field,
|
|
10455
|
+
textareaProps: {
|
|
10456
|
+
onChange: (e) => field.onChange(e.target.value),
|
|
10457
|
+
disabled: selectedSource !== "other"
|
|
10458
|
+
},
|
|
10449
10459
|
helperText: (_b2 = (_a2 = formState.errors.feedback) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10450
10460
|
}
|
|
10451
10461
|
);
|
|
@@ -10940,6 +10950,7 @@ var PricingPlans = ({
|
|
|
10940
10950
|
defaultValue: props.currentCurrency,
|
|
10941
10951
|
options: props.currencies,
|
|
10942
10952
|
onChangeTab: (e) => {
|
|
10953
|
+
console.log("on change tab", e);
|
|
10943
10954
|
if (props.onCurrencyChange) {
|
|
10944
10955
|
props.onCurrencyChange(e);
|
|
10945
10956
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -581,13 +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
|
-
/* @__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" }))),
|
|
588
|
-
/* @__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))),
|
|
589
|
-
/* @__PURE__ */ React9.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
|
|
590
|
-
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) => {
|
|
591
588
|
return /* @__PURE__ */ React9.createElement(
|
|
592
589
|
"li",
|
|
593
590
|
{
|
|
@@ -617,7 +614,7 @@ var PricingCard = ({
|
|
|
617
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" }),
|
|
618
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" }))
|
|
619
616
|
);
|
|
620
|
-
})),
|
|
617
|
+
}))),
|
|
621
618
|
/* @__PURE__ */ React9.createElement(
|
|
622
619
|
Button,
|
|
623
620
|
{
|
|
@@ -3317,7 +3314,7 @@ var Radio = ({
|
|
|
3317
3314
|
onClick: () => {
|
|
3318
3315
|
setSelectedOption(opt.value);
|
|
3319
3316
|
if (props.onChangeTab) {
|
|
3320
|
-
props.onChangeTab(opt
|
|
3317
|
+
props.onChangeTab(opt);
|
|
3321
3318
|
} else {
|
|
3322
3319
|
console.log("onChangeTab was not provided");
|
|
3323
3320
|
}
|
|
@@ -3419,7 +3416,7 @@ var Radio = ({
|
|
|
3419
3416
|
onChange: () => {
|
|
3420
3417
|
setSelectedOption(opt.value);
|
|
3421
3418
|
if (props.onChangeTab) {
|
|
3422
|
-
props.onChangeTab(opt
|
|
3419
|
+
props.onChangeTab(opt);
|
|
3423
3420
|
} else {
|
|
3424
3421
|
console.log("onChangeTab was not provided");
|
|
3425
3422
|
}
|
|
@@ -6860,7 +6857,7 @@ var InterfaceSettings = ({
|
|
|
6860
6857
|
defaultValue: language,
|
|
6861
6858
|
onChangeTab: (e) => {
|
|
6862
6859
|
if (handleLanguage) {
|
|
6863
|
-
handleLanguage(e);
|
|
6860
|
+
handleLanguage(e.value);
|
|
6864
6861
|
}
|
|
6865
6862
|
setLanguage(e);
|
|
6866
6863
|
},
|
|
@@ -6877,7 +6874,7 @@ var InterfaceSettings = ({
|
|
|
6877
6874
|
defaultValue: color,
|
|
6878
6875
|
onChangeTab: (e) => {
|
|
6879
6876
|
if (handleColorMode) {
|
|
6880
|
-
handleColorMode(e);
|
|
6877
|
+
handleColorMode(e.value);
|
|
6881
6878
|
}
|
|
6882
6879
|
setColor(e);
|
|
6883
6880
|
},
|
|
@@ -10116,13 +10113,21 @@ var UserReferralSource = ({
|
|
|
10116
10113
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
|
10117
10114
|
feedback: z6.string().optional()
|
|
10118
10115
|
});
|
|
10119
|
-
const { handleSubmit, control, formState } = useForm6({
|
|
10116
|
+
const { handleSubmit, control, formState, watch } = useForm6({
|
|
10120
10117
|
resolver: zodResolver6(formSchema)
|
|
10121
10118
|
});
|
|
10119
|
+
const selectedSource = watch("source");
|
|
10122
10120
|
const boxPosition = {
|
|
10123
10121
|
"bottom-right": "hawa-right-4",
|
|
10124
10122
|
"bottom-left": "hawa-left-4"
|
|
10125
10123
|
};
|
|
10124
|
+
const optionsWithOther = [
|
|
10125
|
+
...options,
|
|
10126
|
+
{
|
|
10127
|
+
value: "other",
|
|
10128
|
+
label: "Other"
|
|
10129
|
+
}
|
|
10130
|
+
];
|
|
10126
10131
|
return /* @__PURE__ */ React83.createElement(
|
|
10127
10132
|
"div",
|
|
10128
10133
|
{
|
|
@@ -10185,8 +10190,9 @@ var UserReferralSource = ({
|
|
|
10185
10190
|
onSubmit: handleSubmit((e) => {
|
|
10186
10191
|
if (props.onSubmitForm) {
|
|
10187
10192
|
props.onSubmitForm(e);
|
|
10193
|
+
} else {
|
|
10194
|
+
console.log("onSubmitForm was not provided");
|
|
10188
10195
|
}
|
|
10189
|
-
console.log("onSubmitForm was not provided");
|
|
10190
10196
|
})
|
|
10191
10197
|
},
|
|
10192
10198
|
/* @__PURE__ */ React83.createElement(
|
|
@@ -10210,9 +10216,9 @@ var UserReferralSource = ({
|
|
|
10210
10216
|
{
|
|
10211
10217
|
direction: props.direction,
|
|
10212
10218
|
orientation: "vertical",
|
|
10213
|
-
options,
|
|
10219
|
+
options: optionsWithOther,
|
|
10214
10220
|
defaultValue: field.value,
|
|
10215
|
-
onChangeTab: (e) => field.onChange(e),
|
|
10221
|
+
onChangeTab: (e) => field.onChange(e.value),
|
|
10216
10222
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10217
10223
|
}
|
|
10218
10224
|
);
|
|
@@ -10230,6 +10236,10 @@ var UserReferralSource = ({
|
|
|
10230
10236
|
Textarea,
|
|
10231
10237
|
{
|
|
10232
10238
|
...field,
|
|
10239
|
+
textareaProps: {
|
|
10240
|
+
onChange: (e) => field.onChange(e.target.value),
|
|
10241
|
+
disabled: selectedSource !== "other"
|
|
10242
|
+
},
|
|
10233
10243
|
helperText: (_b2 = (_a2 = formState.errors.feedback) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
|
10234
10244
|
}
|
|
10235
10245
|
);
|
|
@@ -10724,6 +10734,7 @@ var PricingPlans = ({
|
|
|
10724
10734
|
defaultValue: props.currentCurrency,
|
|
10725
10735
|
options: props.currencies,
|
|
10726
10736
|
onChangeTab: (e) => {
|
|
10737
|
+
console.log("on change tab", e);
|
|
10727
10738
|
if (props.onCurrencyChange) {
|
|
10728
10739
|
props.onCurrencyChange(e);
|
|
10729
10740
|
}
|