@sikka/hawa 0.24.8-next → 0.24.11-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/{Radio-2ZwcMDWt.d.ts → Radio-K1WGpnGA.d.ts} +2 -1
- package/dist/{Radio-5ZANA8Vh.d.mts → Radio-hsrLKNxE.d.mts} +2 -1
- package/dist/blocks/auth/index.js +6 -6
- package/dist/blocks/auth/index.mjs +6 -6
- package/dist/blocks/feedback/index.js +20 -23
- package/dist/blocks/feedback/index.mjs +2 -2
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +30 -33
- package/dist/blocks/index.mjs +6 -6
- package/dist/blocks/pricing/index.js +23 -26
- package/dist/blocks/pricing/index.mjs +5 -5
- package/dist/checkbox/index.js +6 -6
- package/dist/checkbox/index.mjs +6 -6
- package/dist/{chunk-OT7WQYPD.mjs → chunk-N26RJDIG.mjs} +19 -22
- package/dist/{chunk-O4FANSN5.mjs → chunk-XOEHA3H6.mjs} +25 -28
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +27 -30
- package/dist/elements/index.mjs +3 -3
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +32 -35
- package/dist/index.mjs +32 -35
- package/dist/interfaceSettings/index.js +21 -24
- package/dist/interfaceSettings/index.mjs +21 -24
- package/dist/radio/index.d.mts +2 -1
- package/dist/radio/index.d.ts +2 -1
- package/dist/radio/index.js +19 -22
- package/dist/radio/index.mjs +19 -22
- package/package.json +1 -1
@@ -60,8 +60,9 @@ type RadioTypes = {
|
|
60
60
|
design?: "default" | "tabs" | "cards" | "bordered";
|
61
61
|
width?: "default" | "full" | "none";
|
62
62
|
size?: "default" | "lg" | "sm" | "xs";
|
63
|
+
name?: string;
|
63
64
|
options: RadioOptionsTypes[];
|
64
|
-
|
65
|
+
onChange?: any;
|
65
66
|
defaultValue?: any;
|
66
67
|
direction?: DirectionType;
|
67
68
|
helperText?: string;
|
@@ -60,8 +60,9 @@ type RadioTypes = {
|
|
60
60
|
design?: "default" | "tabs" | "cards" | "bordered";
|
61
61
|
width?: "default" | "full" | "none";
|
62
62
|
size?: "default" | "lg" | "sm" | "xs";
|
63
|
+
name?: string;
|
63
64
|
options: RadioOptionsTypes[];
|
64
|
-
|
65
|
+
onChange?: any;
|
65
66
|
defaultValue?: any;
|
66
67
|
direction?: DirectionType;
|
67
68
|
helperText?: string;
|
@@ -3314,7 +3314,7 @@ var Checkbox = ({
|
|
3314
3314
|
let labelLineHeightStyles = {
|
3315
3315
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
3316
3316
|
sm: 0.6,
|
3317
|
-
default:
|
3317
|
+
default: 1,
|
3318
3318
|
md: 0.8,
|
3319
3319
|
lg: 0.9,
|
3320
3320
|
xl: 1
|
@@ -3324,8 +3324,7 @@ var Checkbox = ({
|
|
3324
3324
|
{
|
3325
3325
|
className: cn(
|
3326
3326
|
"hawa-flex hawa-gap-2",
|
3327
|
-
"hawa-items-top"
|
3328
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
3327
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
3329
3328
|
)
|
3330
3329
|
},
|
3331
3330
|
/* @__PURE__ */ React17.createElement(
|
@@ -3338,16 +3337,17 @@ var Checkbox = ({
|
|
3338
3337
|
id
|
3339
3338
|
}
|
3340
3339
|
),
|
3341
|
-
(label || helperText) && /* @__PURE__ */ React17.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
3340
|
+
(label || helperText) && /* @__PURE__ */ React17.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React17.createElement(
|
3342
3341
|
"label",
|
3343
3342
|
{
|
3344
3343
|
htmlFor: id,
|
3345
3344
|
className: cn(
|
3346
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
3345
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
3347
3346
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
3348
3347
|
),
|
3349
3348
|
style: {
|
3350
|
-
lineHeight: labelLineHeightStyles[size]
|
3349
|
+
// lineHeight: labelLineHeightStyles[size]
|
3350
|
+
lineHeight: 1
|
3351
3351
|
}
|
3352
3352
|
},
|
3353
3353
|
label
|
@@ -2527,7 +2527,7 @@ var Checkbox = ({
|
|
2527
2527
|
let labelLineHeightStyles = {
|
2528
2528
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
2529
2529
|
sm: 0.6,
|
2530
|
-
default:
|
2530
|
+
default: 1,
|
2531
2531
|
md: 0.8,
|
2532
2532
|
lg: 0.9,
|
2533
2533
|
xl: 1
|
@@ -2537,8 +2537,7 @@ var Checkbox = ({
|
|
2537
2537
|
{
|
2538
2538
|
className: cn(
|
2539
2539
|
"hawa-flex hawa-gap-2",
|
2540
|
-
"hawa-items-top"
|
2541
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
2540
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
2542
2541
|
)
|
2543
2542
|
},
|
2544
2543
|
/* @__PURE__ */ React6.createElement(
|
@@ -2551,16 +2550,17 @@ var Checkbox = ({
|
|
2551
2550
|
id
|
2552
2551
|
}
|
2553
2552
|
),
|
2554
|
-
(label || helperText) && /* @__PURE__ */ React6.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
2553
|
+
(label || helperText) && /* @__PURE__ */ React6.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React6.createElement(
|
2555
2554
|
"label",
|
2556
2555
|
{
|
2557
2556
|
htmlFor: id,
|
2558
2557
|
className: cn(
|
2559
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
2558
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
2560
2559
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
2561
2560
|
),
|
2562
2561
|
style: {
|
2563
|
-
lineHeight: labelLineHeightStyles[size]
|
2562
|
+
// lineHeight: labelLineHeightStyles[size]
|
2563
|
+
lineHeight: 1
|
2564
2564
|
}
|
2565
2565
|
},
|
2566
2566
|
label
|
@@ -477,8 +477,10 @@ var Radio = ({
|
|
477
477
|
width = "default",
|
478
478
|
size = "default",
|
479
479
|
orientation = "horizontal",
|
480
|
+
name,
|
480
481
|
labelProps,
|
481
482
|
tabsContainerClassName,
|
483
|
+
onChange,
|
482
484
|
...props
|
483
485
|
}) => {
|
484
486
|
var _a, _b, _c;
|
@@ -512,6 +514,14 @@ var Radio = ({
|
|
512
514
|
setParentDirection(dir);
|
513
515
|
}
|
514
516
|
});
|
517
|
+
const handleChange = (opt) => {
|
518
|
+
setSelectedOption(opt.value);
|
519
|
+
if (onChange) {
|
520
|
+
onChange(opt.value);
|
521
|
+
} else {
|
522
|
+
console.log("onChange was not provided");
|
523
|
+
}
|
524
|
+
};
|
515
525
|
switch (design) {
|
516
526
|
case "tabs":
|
517
527
|
return /* @__PURE__ */ import_react3.default.createElement(
|
@@ -530,14 +540,7 @@ var Radio = ({
|
|
530
540
|
"li",
|
531
541
|
{
|
532
542
|
"aria-current": "page",
|
533
|
-
onClick: () =>
|
534
|
-
setSelectedOption(opt.value);
|
535
|
-
if (props.onChangeTab) {
|
536
|
-
props.onChangeTab(opt);
|
537
|
-
} else {
|
538
|
-
console.log("onChangeTab was not provided");
|
539
|
-
}
|
540
|
-
},
|
543
|
+
onClick: () => handleChange(opt),
|
541
544
|
className: cn(
|
542
545
|
"hawa-w-full hawa-cursor-pointer ",
|
543
546
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -558,7 +561,7 @@ var Radio = ({
|
|
558
561
|
"div",
|
559
562
|
{
|
560
563
|
key: i,
|
561
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
564
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
562
565
|
},
|
563
566
|
/* @__PURE__ */ import_react3.default.createElement(
|
564
567
|
"div",
|
@@ -576,7 +579,8 @@ var Radio = ({
|
|
576
579
|
id: opt.value.toString(),
|
577
580
|
type: "radio",
|
578
581
|
value: opt.value,
|
579
|
-
name
|
582
|
+
name,
|
583
|
+
onChange: () => handleChange(opt)
|
580
584
|
}
|
581
585
|
),
|
582
586
|
/* @__PURE__ */ import_react3.default.createElement(
|
@@ -584,7 +588,7 @@ var Radio = ({
|
|
584
588
|
{
|
585
589
|
htmlFor: opt.value.toString(),
|
586
590
|
className: cn(
|
587
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
591
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
588
592
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
589
593
|
)
|
590
594
|
},
|
@@ -593,12 +597,12 @@ var Radio = ({
|
|
593
597
|
)
|
594
598
|
)));
|
595
599
|
case "cards":
|
596
|
-
return /* @__PURE__ */ import_react3.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react3.default.createElement("li", { key: o }, /* @__PURE__ */ import_react3.default.createElement(
|
600
|
+
return /* @__PURE__ */ import_react3.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react3.default.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ import_react3.default.createElement(
|
597
601
|
"input",
|
598
602
|
{
|
599
603
|
type: "radio",
|
600
604
|
id: opt.value.toString(),
|
601
|
-
name
|
605
|
+
name,
|
602
606
|
value: opt.value.toString(),
|
603
607
|
className: "hawa-peer hawa-hidden",
|
604
608
|
required: true,
|
@@ -632,15 +636,8 @@ var Radio = ({
|
|
632
636
|
id: opt.value.toString(),
|
633
637
|
type: "radio",
|
634
638
|
value: opt.value,
|
635
|
-
name
|
636
|
-
onChange: () =>
|
637
|
-
setSelectedOption(opt.value);
|
638
|
-
if (props.onChangeTab) {
|
639
|
-
props.onChangeTab(opt);
|
640
|
-
} else {
|
641
|
-
console.log("onChangeTab was not provided");
|
642
|
-
}
|
643
|
-
}
|
639
|
+
name,
|
640
|
+
onChange: () => handleChange(opt)
|
644
641
|
}
|
645
642
|
),
|
646
643
|
/* @__PURE__ */ import_react3.default.createElement(
|
@@ -834,7 +831,7 @@ var UserReferralSource = ({
|
|
834
831
|
orientation: "vertical",
|
835
832
|
options: optionsWithOther,
|
836
833
|
defaultValue: field.value,
|
837
|
-
|
834
|
+
onChange: (e) => field.onChange(e.value),
|
838
835
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
839
836
|
}
|
840
837
|
);
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
} from "../../chunk-UTGVG66T.mjs";
|
7
7
|
import {
|
8
8
|
Radio
|
9
|
-
} from "../../chunk-
|
9
|
+
} from "../../chunk-N26RJDIG.mjs";
|
10
10
|
import {
|
11
11
|
BadEmoji,
|
12
12
|
GoodEmoji,
|
@@ -143,7 +143,7 @@ var UserReferralSource = ({
|
|
143
143
|
orientation: "vertical",
|
144
144
|
options: optionsWithOther,
|
145
145
|
defaultValue: field.value,
|
146
|
-
|
146
|
+
onChange: (e) => field.onChange(e.value),
|
147
147
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
148
148
|
}
|
149
149
|
);
|
package/dist/blocks/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React__default, { FC, InputHTMLAttributes } from 'react';
|
2
2
|
import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-CKtkuNFH.mjs';
|
3
3
|
import { LoginFormTextsTypes, RegisterFormTextsTypes, ThirdPartyAuthTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.mjs';
|
4
|
-
import { S as SelectOptionProps, R as RadioOptionsTypes } from '../Radio-
|
4
|
+
import { S as SelectOptionProps, R as RadioOptionsTypes } from '../Radio-hsrLKNxE.mjs';
|
5
5
|
import { M as MenuItemType } from '../DropdownMenu-vm2kRAhL.mjs';
|
6
6
|
import '@radix-ui/react-dropdown-menu';
|
7
7
|
|
package/dist/blocks/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React__default, { FC, InputHTMLAttributes } from 'react';
|
2
2
|
import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-CKtkuNFH.js';
|
3
3
|
import { LoginFormTextsTypes, RegisterFormTextsTypes, ThirdPartyAuthTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.js';
|
4
|
-
import { S as SelectOptionProps, R as RadioOptionsTypes } from '../Radio-
|
4
|
+
import { S as SelectOptionProps, R as RadioOptionsTypes } from '../Radio-K1WGpnGA.js';
|
5
5
|
import { M as MenuItemType } from '../DropdownMenu-jh4puuXw.js';
|
6
6
|
import '@radix-ui/react-dropdown-menu';
|
7
7
|
|
package/dist/blocks/index.js
CHANGED
@@ -3471,7 +3471,7 @@ var Checkbox = ({
|
|
3471
3471
|
let labelLineHeightStyles = {
|
3472
3472
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
3473
3473
|
sm: 0.6,
|
3474
|
-
default:
|
3474
|
+
default: 1,
|
3475
3475
|
md: 0.8,
|
3476
3476
|
lg: 0.9,
|
3477
3477
|
xl: 1
|
@@ -3481,8 +3481,7 @@ var Checkbox = ({
|
|
3481
3481
|
{
|
3482
3482
|
className: cn(
|
3483
3483
|
"hawa-flex hawa-gap-2",
|
3484
|
-
"hawa-items-top"
|
3485
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
3484
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
3486
3485
|
)
|
3487
3486
|
},
|
3488
3487
|
/* @__PURE__ */ React17.createElement(
|
@@ -3495,16 +3494,17 @@ var Checkbox = ({
|
|
3495
3494
|
id
|
3496
3495
|
}
|
3497
3496
|
),
|
3498
|
-
(label || helperText) && /* @__PURE__ */ React17.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
3497
|
+
(label || helperText) && /* @__PURE__ */ React17.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React17.createElement(
|
3499
3498
|
"label",
|
3500
3499
|
{
|
3501
3500
|
htmlFor: id,
|
3502
3501
|
className: cn(
|
3503
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
3502
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
3504
3503
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
3505
3504
|
),
|
3506
3505
|
style: {
|
3507
|
-
lineHeight: labelLineHeightStyles[size]
|
3506
|
+
// lineHeight: labelLineHeightStyles[size]
|
3507
|
+
lineHeight: 1
|
3508
3508
|
}
|
3509
3509
|
},
|
3510
3510
|
label
|
@@ -4341,8 +4341,10 @@ var Radio = ({
|
|
4341
4341
|
width = "default",
|
4342
4342
|
size = "default",
|
4343
4343
|
orientation = "horizontal",
|
4344
|
+
name,
|
4344
4345
|
labelProps,
|
4345
4346
|
tabsContainerClassName,
|
4347
|
+
onChange,
|
4346
4348
|
...props
|
4347
4349
|
}) => {
|
4348
4350
|
var _a, _b, _c;
|
@@ -4376,6 +4378,14 @@ var Radio = ({
|
|
4376
4378
|
setParentDirection(dir);
|
4377
4379
|
}
|
4378
4380
|
});
|
4381
|
+
const handleChange = (opt) => {
|
4382
|
+
setSelectedOption(opt.value);
|
4383
|
+
if (onChange) {
|
4384
|
+
onChange(opt.value);
|
4385
|
+
} else {
|
4386
|
+
console.log("onChange was not provided");
|
4387
|
+
}
|
4388
|
+
};
|
4379
4389
|
switch (design) {
|
4380
4390
|
case "tabs":
|
4381
4391
|
return /* @__PURE__ */ import_react22.default.createElement(
|
@@ -4394,14 +4404,7 @@ var Radio = ({
|
|
4394
4404
|
"li",
|
4395
4405
|
{
|
4396
4406
|
"aria-current": "page",
|
4397
|
-
onClick: () =>
|
4398
|
-
setSelectedOption(opt.value);
|
4399
|
-
if (props.onChangeTab) {
|
4400
|
-
props.onChangeTab(opt);
|
4401
|
-
} else {
|
4402
|
-
console.log("onChangeTab was not provided");
|
4403
|
-
}
|
4404
|
-
},
|
4407
|
+
onClick: () => handleChange(opt),
|
4405
4408
|
className: cn(
|
4406
4409
|
"hawa-w-full hawa-cursor-pointer ",
|
4407
4410
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -4422,7 +4425,7 @@ var Radio = ({
|
|
4422
4425
|
"div",
|
4423
4426
|
{
|
4424
4427
|
key: i,
|
4425
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
4428
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
4426
4429
|
},
|
4427
4430
|
/* @__PURE__ */ import_react22.default.createElement(
|
4428
4431
|
"div",
|
@@ -4440,7 +4443,8 @@ var Radio = ({
|
|
4440
4443
|
id: opt.value.toString(),
|
4441
4444
|
type: "radio",
|
4442
4445
|
value: opt.value,
|
4443
|
-
name
|
4446
|
+
name,
|
4447
|
+
onChange: () => handleChange(opt)
|
4444
4448
|
}
|
4445
4449
|
),
|
4446
4450
|
/* @__PURE__ */ import_react22.default.createElement(
|
@@ -4448,7 +4452,7 @@ var Radio = ({
|
|
4448
4452
|
{
|
4449
4453
|
htmlFor: opt.value.toString(),
|
4450
4454
|
className: cn(
|
4451
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
4455
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
4452
4456
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
4453
4457
|
)
|
4454
4458
|
},
|
@@ -4457,12 +4461,12 @@ var Radio = ({
|
|
4457
4461
|
)
|
4458
4462
|
)));
|
4459
4463
|
case "cards":
|
4460
|
-
return /* @__PURE__ */ import_react22.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react22.default.createElement("li", { key: o }, /* @__PURE__ */ import_react22.default.createElement(
|
4464
|
+
return /* @__PURE__ */ import_react22.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react22.default.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ import_react22.default.createElement(
|
4461
4465
|
"input",
|
4462
4466
|
{
|
4463
4467
|
type: "radio",
|
4464
4468
|
id: opt.value.toString(),
|
4465
|
-
name
|
4469
|
+
name,
|
4466
4470
|
value: opt.value.toString(),
|
4467
4471
|
className: "hawa-peer hawa-hidden",
|
4468
4472
|
required: true,
|
@@ -4496,15 +4500,8 @@ var Radio = ({
|
|
4496
4500
|
id: opt.value.toString(),
|
4497
4501
|
type: "radio",
|
4498
4502
|
value: opt.value,
|
4499
|
-
name
|
4500
|
-
onChange: () =>
|
4501
|
-
setSelectedOption(opt.value);
|
4502
|
-
if (props.onChangeTab) {
|
4503
|
-
props.onChangeTab(opt);
|
4504
|
-
} else {
|
4505
|
-
console.log("onChangeTab was not provided");
|
4506
|
-
}
|
4507
|
-
}
|
4503
|
+
name,
|
4504
|
+
onChange: () => handleChange(opt)
|
4508
4505
|
}
|
4509
4506
|
),
|
4510
4507
|
/* @__PURE__ */ import_react22.default.createElement(
|
@@ -4698,7 +4695,7 @@ var UserReferralSource = ({
|
|
4698
4695
|
orientation: "vertical",
|
4699
4696
|
options: optionsWithOther,
|
4700
4697
|
defaultValue: field.value,
|
4701
|
-
|
4698
|
+
onChange: (e) => field.onChange(e.value),
|
4702
4699
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
4703
4700
|
}
|
4704
4701
|
);
|
@@ -6290,7 +6287,7 @@ var PricingPlans = ({
|
|
6290
6287
|
design: "tabs",
|
6291
6288
|
defaultValue: props.currentCycle.value,
|
6292
6289
|
options: props.billingCycles,
|
6293
|
-
|
6290
|
+
onChange: (e) => {
|
6294
6291
|
if (props.onCycleChange) {
|
6295
6292
|
props.onCycleChange(e);
|
6296
6293
|
}
|
@@ -6302,7 +6299,7 @@ var PricingPlans = ({
|
|
6302
6299
|
design: "tabs",
|
6303
6300
|
defaultValue: props.currentCurrency.value,
|
6304
6301
|
options: props.currencies,
|
6305
|
-
|
6302
|
+
onChange: (e) => {
|
6306
6303
|
if (props.onCurrencyChange) {
|
6307
6304
|
props.onCurrencyChange(e);
|
6308
6305
|
}
|
@@ -6363,7 +6360,7 @@ var ComparingPlans = (props) => {
|
|
6363
6360
|
design: "tabs",
|
6364
6361
|
defaultValue: props.currentCycle.value,
|
6365
6362
|
options: props.billingCycles,
|
6366
|
-
|
6363
|
+
onChange: (e) => {
|
6367
6364
|
if (props.onCycleChange) {
|
6368
6365
|
props.onCycleChange(e);
|
6369
6366
|
}
|
@@ -6377,7 +6374,7 @@ var ComparingPlans = (props) => {
|
|
6377
6374
|
design: "tabs",
|
6378
6375
|
defaultValue: props.currentCurrency.value,
|
6379
6376
|
options: props.currencies,
|
6380
|
-
|
6377
|
+
onChange: (e) => {
|
6381
6378
|
if (props.onCurrencyChange) {
|
6382
6379
|
props.onCurrencyChange(e);
|
6383
6380
|
}
|
package/dist/blocks/index.mjs
CHANGED
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
UncheckMark,
|
26
26
|
VeryBadEmoji,
|
27
27
|
VeryGoodEmoji
|
28
|
-
} from "../chunk-
|
28
|
+
} from "../chunk-XOEHA3H6.mjs";
|
29
29
|
import {
|
30
30
|
Button,
|
31
31
|
Card,
|
@@ -1186,7 +1186,7 @@ var UserReferralSource = ({
|
|
1186
1186
|
orientation: "vertical",
|
1187
1187
|
options: optionsWithOther,
|
1188
1188
|
defaultValue: field.value,
|
1189
|
-
|
1189
|
+
onChange: (e) => field.onChange(e.value),
|
1190
1190
|
helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
|
1191
1191
|
}
|
1192
1192
|
);
|
@@ -2179,7 +2179,7 @@ var PricingPlans = ({
|
|
2179
2179
|
design: "tabs",
|
2180
2180
|
defaultValue: props.currentCycle.value,
|
2181
2181
|
options: props.billingCycles,
|
2182
|
-
|
2182
|
+
onChange: (e) => {
|
2183
2183
|
if (props.onCycleChange) {
|
2184
2184
|
props.onCycleChange(e);
|
2185
2185
|
}
|
@@ -2191,7 +2191,7 @@ var PricingPlans = ({
|
|
2191
2191
|
design: "tabs",
|
2192
2192
|
defaultValue: props.currentCurrency.value,
|
2193
2193
|
options: props.currencies,
|
2194
|
-
|
2194
|
+
onChange: (e) => {
|
2195
2195
|
if (props.onCurrencyChange) {
|
2196
2196
|
props.onCurrencyChange(e);
|
2197
2197
|
}
|
@@ -2252,7 +2252,7 @@ var ComparingPlans = (props) => {
|
|
2252
2252
|
design: "tabs",
|
2253
2253
|
defaultValue: props.currentCycle.value,
|
2254
2254
|
options: props.billingCycles,
|
2255
|
-
|
2255
|
+
onChange: (e) => {
|
2256
2256
|
if (props.onCycleChange) {
|
2257
2257
|
props.onCycleChange(e);
|
2258
2258
|
}
|
@@ -2266,7 +2266,7 @@ var ComparingPlans = (props) => {
|
|
2266
2266
|
design: "tabs",
|
2267
2267
|
defaultValue: props.currentCurrency.value,
|
2268
2268
|
options: props.currencies,
|
2269
|
-
|
2269
|
+
onChange: (e) => {
|
2270
2270
|
if (props.onCurrencyChange) {
|
2271
2271
|
props.onCurrencyChange(e);
|
2272
2272
|
}
|
@@ -904,8 +904,10 @@ var Radio = ({
|
|
904
904
|
width = "default",
|
905
905
|
size = "default",
|
906
906
|
orientation = "horizontal",
|
907
|
+
name,
|
907
908
|
labelProps,
|
908
909
|
tabsContainerClassName,
|
910
|
+
onChange,
|
909
911
|
...props
|
910
912
|
}) => {
|
911
913
|
var _a, _b, _c;
|
@@ -939,6 +941,14 @@ var Radio = ({
|
|
939
941
|
setParentDirection(dir);
|
940
942
|
}
|
941
943
|
});
|
944
|
+
const handleChange = (opt) => {
|
945
|
+
setSelectedOption(opt.value);
|
946
|
+
if (onChange) {
|
947
|
+
onChange(opt.value);
|
948
|
+
} else {
|
949
|
+
console.log("onChange was not provided");
|
950
|
+
}
|
951
|
+
};
|
942
952
|
switch (design) {
|
943
953
|
case "tabs":
|
944
954
|
return /* @__PURE__ */ import_react11.default.createElement(
|
@@ -957,14 +967,7 @@ var Radio = ({
|
|
957
967
|
"li",
|
958
968
|
{
|
959
969
|
"aria-current": "page",
|
960
|
-
onClick: () =>
|
961
|
-
setSelectedOption(opt.value);
|
962
|
-
if (props.onChangeTab) {
|
963
|
-
props.onChangeTab(opt);
|
964
|
-
} else {
|
965
|
-
console.log("onChangeTab was not provided");
|
966
|
-
}
|
967
|
-
},
|
970
|
+
onClick: () => handleChange(opt),
|
968
971
|
className: cn(
|
969
972
|
"hawa-w-full hawa-cursor-pointer ",
|
970
973
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -985,7 +988,7 @@ var Radio = ({
|
|
985
988
|
"div",
|
986
989
|
{
|
987
990
|
key: i,
|
988
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
991
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
989
992
|
},
|
990
993
|
/* @__PURE__ */ import_react11.default.createElement(
|
991
994
|
"div",
|
@@ -1003,7 +1006,8 @@ var Radio = ({
|
|
1003
1006
|
id: opt.value.toString(),
|
1004
1007
|
type: "radio",
|
1005
1008
|
value: opt.value,
|
1006
|
-
name
|
1009
|
+
name,
|
1010
|
+
onChange: () => handleChange(opt)
|
1007
1011
|
}
|
1008
1012
|
),
|
1009
1013
|
/* @__PURE__ */ import_react11.default.createElement(
|
@@ -1011,7 +1015,7 @@ var Radio = ({
|
|
1011
1015
|
{
|
1012
1016
|
htmlFor: opt.value.toString(),
|
1013
1017
|
className: cn(
|
1014
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
1018
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
1015
1019
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
1016
1020
|
)
|
1017
1021
|
},
|
@@ -1020,12 +1024,12 @@ var Radio = ({
|
|
1020
1024
|
)
|
1021
1025
|
)));
|
1022
1026
|
case "cards":
|
1023
|
-
return /* @__PURE__ */ import_react11.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react11.default.createElement("li", { key: o }, /* @__PURE__ */ import_react11.default.createElement(
|
1027
|
+
return /* @__PURE__ */ import_react11.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react11.default.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ import_react11.default.createElement(
|
1024
1028
|
"input",
|
1025
1029
|
{
|
1026
1030
|
type: "radio",
|
1027
1031
|
id: opt.value.toString(),
|
1028
|
-
name
|
1032
|
+
name,
|
1029
1033
|
value: opt.value.toString(),
|
1030
1034
|
className: "hawa-peer hawa-hidden",
|
1031
1035
|
required: true,
|
@@ -1059,15 +1063,8 @@ var Radio = ({
|
|
1059
1063
|
id: opt.value.toString(),
|
1060
1064
|
type: "radio",
|
1061
1065
|
value: opt.value,
|
1062
|
-
name
|
1063
|
-
onChange: () =>
|
1064
|
-
setSelectedOption(opt.value);
|
1065
|
-
if (props.onChangeTab) {
|
1066
|
-
props.onChangeTab(opt);
|
1067
|
-
} else {
|
1068
|
-
console.log("onChangeTab was not provided");
|
1069
|
-
}
|
1070
|
-
}
|
1066
|
+
name,
|
1067
|
+
onChange: () => handleChange(opt)
|
1071
1068
|
}
|
1072
1069
|
),
|
1073
1070
|
/* @__PURE__ */ import_react11.default.createElement(
|
@@ -1106,7 +1103,7 @@ var PricingPlans = ({
|
|
1106
1103
|
design: "tabs",
|
1107
1104
|
defaultValue: props.currentCycle.value,
|
1108
1105
|
options: props.billingCycles,
|
1109
|
-
|
1106
|
+
onChange: (e) => {
|
1110
1107
|
if (props.onCycleChange) {
|
1111
1108
|
props.onCycleChange(e);
|
1112
1109
|
}
|
@@ -1118,7 +1115,7 @@ var PricingPlans = ({
|
|
1118
1115
|
design: "tabs",
|
1119
1116
|
defaultValue: props.currentCurrency.value,
|
1120
1117
|
options: props.currencies,
|
1121
|
-
|
1118
|
+
onChange: (e) => {
|
1122
1119
|
if (props.onCurrencyChange) {
|
1123
1120
|
props.onCurrencyChange(e);
|
1124
1121
|
}
|
@@ -1276,7 +1273,7 @@ var ComparingPlans = (props) => {
|
|
1276
1273
|
design: "tabs",
|
1277
1274
|
defaultValue: props.currentCycle.value,
|
1278
1275
|
options: props.billingCycles,
|
1279
|
-
|
1276
|
+
onChange: (e) => {
|
1280
1277
|
if (props.onCycleChange) {
|
1281
1278
|
props.onCycleChange(e);
|
1282
1279
|
}
|
@@ -1290,7 +1287,7 @@ var ComparingPlans = (props) => {
|
|
1290
1287
|
design: "tabs",
|
1291
1288
|
defaultValue: props.currentCurrency.value,
|
1292
1289
|
options: props.currencies,
|
1293
|
-
|
1290
|
+
onChange: (e) => {
|
1294
1291
|
if (props.onCurrencyChange) {
|
1295
1292
|
props.onCurrencyChange(e);
|
1296
1293
|
}
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
import "../../chunk-ZCZ3WARS.mjs";
|
6
6
|
import {
|
7
7
|
Radio
|
8
|
-
} from "../../chunk-
|
8
|
+
} from "../../chunk-N26RJDIG.mjs";
|
9
9
|
import {
|
10
10
|
CheckMark,
|
11
11
|
UncheckMark
|
@@ -355,7 +355,7 @@ var PricingPlans = ({
|
|
355
355
|
design: "tabs",
|
356
356
|
defaultValue: props.currentCycle.value,
|
357
357
|
options: props.billingCycles,
|
358
|
-
|
358
|
+
onChange: (e) => {
|
359
359
|
if (props.onCycleChange) {
|
360
360
|
props.onCycleChange(e);
|
361
361
|
}
|
@@ -367,7 +367,7 @@ var PricingPlans = ({
|
|
367
367
|
design: "tabs",
|
368
368
|
defaultValue: props.currentCurrency.value,
|
369
369
|
options: props.currencies,
|
370
|
-
|
370
|
+
onChange: (e) => {
|
371
371
|
if (props.onCurrencyChange) {
|
372
372
|
props.onCurrencyChange(e);
|
373
373
|
}
|
@@ -428,7 +428,7 @@ var ComparingPlans = (props) => {
|
|
428
428
|
design: "tabs",
|
429
429
|
defaultValue: props.currentCycle.value,
|
430
430
|
options: props.billingCycles,
|
431
|
-
|
431
|
+
onChange: (e) => {
|
432
432
|
if (props.onCycleChange) {
|
433
433
|
props.onCycleChange(e);
|
434
434
|
}
|
@@ -442,7 +442,7 @@ var ComparingPlans = (props) => {
|
|
442
442
|
design: "tabs",
|
443
443
|
defaultValue: props.currentCurrency.value,
|
444
444
|
options: props.currencies,
|
445
|
-
|
445
|
+
onChange: (e) => {
|
446
446
|
if (props.onCurrencyChange) {
|
447
447
|
props.onCurrencyChange(e);
|
448
448
|
}
|