@sikka/hawa 0.24.8-next → 0.24.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/{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/feedback/index.js +18 -21
- 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 +22 -25
- package/dist/blocks/index.mjs +6 -6
- package/dist/blocks/pricing/index.js +21 -24
- package/dist/blocks/pricing/index.mjs +5 -5
- package/dist/{chunk-O4FANSN5.mjs → chunk-2VDIM3CP.mjs} +17 -20
- package/dist/{chunk-OT7WQYPD.mjs → chunk-4Y2FCYFW.mjs} +17 -20
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +19 -22
- 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 +24 -27
- package/dist/index.mjs +24 -27
- package/dist/interfaceSettings/index.js +19 -22
- package/dist/interfaceSettings/index.mjs +19 -22
- package/dist/radio/index.d.mts +2 -1
- package/dist/radio/index.d.ts +2 -1
- package/dist/radio/index.js +17 -20
- package/dist/radio/index.mjs +17 -20
- 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;
|
@@ -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",
|
@@ -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(
|
@@ -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-4Y2FCYFW.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
@@ -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",
|
@@ -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(
|
@@ -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-2VDIM3CP.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",
|
@@ -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(
|
@@ -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-4Y2FCYFW.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
|
}
|
@@ -2449,8 +2449,10 @@ var Radio = ({
|
|
2449
2449
|
width = "default",
|
2450
2450
|
size = "default",
|
2451
2451
|
orientation = "horizontal",
|
2452
|
+
name,
|
2452
2453
|
labelProps,
|
2453
2454
|
tabsContainerClassName,
|
2455
|
+
onChange,
|
2454
2456
|
...props
|
2455
2457
|
}) => {
|
2456
2458
|
var _a, _b, _c;
|
@@ -2484,6 +2486,14 @@ var Radio = ({
|
|
2484
2486
|
setParentDirection(dir);
|
2485
2487
|
}
|
2486
2488
|
});
|
2489
|
+
const handleChange = (opt) => {
|
2490
|
+
setSelectedOption(opt.value);
|
2491
|
+
if (onChange) {
|
2492
|
+
onChange(opt.value);
|
2493
|
+
} else {
|
2494
|
+
console.log("onChange was not provided");
|
2495
|
+
}
|
2496
|
+
};
|
2487
2497
|
switch (design) {
|
2488
2498
|
case "tabs":
|
2489
2499
|
return /* @__PURE__ */ React9.createElement(
|
@@ -2502,14 +2512,7 @@ var Radio = ({
|
|
2502
2512
|
"li",
|
2503
2513
|
{
|
2504
2514
|
"aria-current": "page",
|
2505
|
-
onClick: () =>
|
2506
|
-
setSelectedOption(opt.value);
|
2507
|
-
if (props.onChangeTab) {
|
2508
|
-
props.onChangeTab(opt);
|
2509
|
-
} else {
|
2510
|
-
console.log("onChangeTab was not provided");
|
2511
|
-
}
|
2512
|
-
},
|
2515
|
+
onClick: () => handleChange(opt),
|
2513
2516
|
className: cn(
|
2514
2517
|
"hawa-w-full hawa-cursor-pointer ",
|
2515
2518
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -2548,7 +2551,8 @@ var Radio = ({
|
|
2548
2551
|
id: opt.value.toString(),
|
2549
2552
|
type: "radio",
|
2550
2553
|
value: opt.value,
|
2551
|
-
name
|
2554
|
+
name,
|
2555
|
+
onChange: () => handleChange(opt)
|
2552
2556
|
}
|
2553
2557
|
),
|
2554
2558
|
/* @__PURE__ */ React9.createElement(
|
@@ -2565,12 +2569,12 @@ var Radio = ({
|
|
2565
2569
|
)
|
2566
2570
|
)));
|
2567
2571
|
case "cards":
|
2568
|
-
return /* @__PURE__ */ React9.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o }, /* @__PURE__ */ React9.createElement(
|
2572
|
+
return /* @__PURE__ */ React9.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React9.createElement(
|
2569
2573
|
"input",
|
2570
2574
|
{
|
2571
2575
|
type: "radio",
|
2572
2576
|
id: opt.value.toString(),
|
2573
|
-
name
|
2577
|
+
name,
|
2574
2578
|
value: opt.value.toString(),
|
2575
2579
|
className: "hawa-peer hawa-hidden",
|
2576
2580
|
required: true,
|
@@ -2604,15 +2608,8 @@ var Radio = ({
|
|
2604
2608
|
id: opt.value.toString(),
|
2605
2609
|
type: "radio",
|
2606
2610
|
value: opt.value,
|
2607
|
-
name
|
2608
|
-
onChange: () =>
|
2609
|
-
setSelectedOption(opt.value);
|
2610
|
-
if (props.onChangeTab) {
|
2611
|
-
props.onChangeTab(opt);
|
2612
|
-
} else {
|
2613
|
-
console.log("onChangeTab was not provided");
|
2614
|
-
}
|
2615
|
-
}
|
2611
|
+
name,
|
2612
|
+
onChange: () => handleChange(opt)
|
2616
2613
|
}
|
2617
2614
|
),
|
2618
2615
|
/* @__PURE__ */ React9.createElement(
|
@@ -10,8 +10,10 @@ var Radio = ({
|
|
10
10
|
width = "default",
|
11
11
|
size = "default",
|
12
12
|
orientation = "horizontal",
|
13
|
+
name,
|
13
14
|
labelProps,
|
14
15
|
tabsContainerClassName,
|
16
|
+
onChange,
|
15
17
|
...props
|
16
18
|
}) => {
|
17
19
|
var _a, _b, _c;
|
@@ -45,6 +47,14 @@ var Radio = ({
|
|
45
47
|
setParentDirection(dir);
|
46
48
|
}
|
47
49
|
});
|
50
|
+
const handleChange = (opt) => {
|
51
|
+
setSelectedOption(opt.value);
|
52
|
+
if (onChange) {
|
53
|
+
onChange(opt.value);
|
54
|
+
} else {
|
55
|
+
console.log("onChange was not provided");
|
56
|
+
}
|
57
|
+
};
|
48
58
|
switch (design) {
|
49
59
|
case "tabs":
|
50
60
|
return /* @__PURE__ */ React.createElement(
|
@@ -63,14 +73,7 @@ var Radio = ({
|
|
63
73
|
"li",
|
64
74
|
{
|
65
75
|
"aria-current": "page",
|
66
|
-
onClick: () =>
|
67
|
-
setSelectedOption(opt.value);
|
68
|
-
if (props.onChangeTab) {
|
69
|
-
props.onChangeTab(opt);
|
70
|
-
} else {
|
71
|
-
console.log("onChangeTab was not provided");
|
72
|
-
}
|
73
|
-
},
|
76
|
+
onClick: () => handleChange(opt),
|
74
77
|
className: cn(
|
75
78
|
"hawa-w-full hawa-cursor-pointer ",
|
76
79
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -109,7 +112,8 @@ var Radio = ({
|
|
109
112
|
id: opt.value.toString(),
|
110
113
|
type: "radio",
|
111
114
|
value: opt.value,
|
112
|
-
name
|
115
|
+
name,
|
116
|
+
onChange: () => handleChange(opt)
|
113
117
|
}
|
114
118
|
),
|
115
119
|
/* @__PURE__ */ React.createElement(
|
@@ -126,12 +130,12 @@ var Radio = ({
|
|
126
130
|
)
|
127
131
|
)));
|
128
132
|
case "cards":
|
129
|
-
return /* @__PURE__ */ React.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React.createElement("li", { key: o }, /* @__PURE__ */ React.createElement(
|
133
|
+
return /* @__PURE__ */ React.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React.createElement(
|
130
134
|
"input",
|
131
135
|
{
|
132
136
|
type: "radio",
|
133
137
|
id: opt.value.toString(),
|
134
|
-
name
|
138
|
+
name,
|
135
139
|
value: opt.value.toString(),
|
136
140
|
className: "hawa-peer hawa-hidden",
|
137
141
|
required: true,
|
@@ -165,15 +169,8 @@ var Radio = ({
|
|
165
169
|
id: opt.value.toString(),
|
166
170
|
type: "radio",
|
167
171
|
value: opt.value,
|
168
|
-
name
|
169
|
-
onChange: () =>
|
170
|
-
setSelectedOption(opt.value);
|
171
|
-
if (props.onChangeTab) {
|
172
|
-
props.onChangeTab(opt);
|
173
|
-
} else {
|
174
|
-
console.log("onChangeTab was not provided");
|
175
|
-
}
|
176
|
-
}
|
172
|
+
name,
|
173
|
+
onChange: () => handleChange(opt)
|
177
174
|
}
|
178
175
|
),
|
179
176
|
/* @__PURE__ */ React.createElement(
|
@@ -12,8 +12,8 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
12
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
14
14
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
15
|
-
import { L as LabelProps } from '../Radio-
|
16
|
-
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-
|
15
|
+
import { L as LabelProps } from '../Radio-hsrLKNxE.mjs';
|
16
|
+
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-hsrLKNxE.mjs';
|
17
17
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
18
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
19
19
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|