@sikka/hawa 0.24.7-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.
@@ -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
- onChangeTab?: any;
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
- onChangeTab?: any;
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: "bordered-radio"
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: "cards-radio",
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: "default-radio",
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
- onChangeTab: (e) => field.onChange(e.value),
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-OT7WQYPD.mjs";
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
- onChangeTab: (e) => field.onChange(e.value),
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
  );
@@ -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-5ZANA8Vh.mjs';
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
 
@@ -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-2ZwcMDWt.js';
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
 
@@ -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: "bordered-radio"
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: "cards-radio",
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: "default-radio",
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
- onChangeTab: (e) => field.onChange(e.value),
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
  );
@@ -5759,6 +5756,7 @@ var PricingCard = ({
5759
5756
  )
5760
5757
  },
5761
5758
  props.features && /* @__PURE__ */ import_react38.default.createElement("ul", { role: "list", className: "hawa-space-y-0 hawa-overflow-x-auto" }, (_h = props.features) == null ? void 0 : _h.map((feature, o) => {
5759
+ var _a2;
5762
5760
  return /* @__PURE__ */ import_react38.default.createElement(
5763
5761
  "li",
5764
5762
  {
@@ -5785,7 +5783,14 @@ var PricingCard = ({
5785
5783
  clipRule: "evenodd"
5786
5784
  }
5787
5785
  )
5788
- ) : /* @__PURE__ */ import_react38.default.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ import_react38.default.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react38.default.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))),
5786
+ ) : /* @__PURE__ */ import_react38.default.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ import_react38.default.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react38.default.createElement(
5787
+ Chip,
5788
+ {
5789
+ label: ((_a2 = props.texts) == null ? void 0 : _a2.soon) || "",
5790
+ color: "oceanic",
5791
+ size: "small"
5792
+ }
5793
+ ))),
5789
5794
  feature.hint && /* @__PURE__ */ import_react38.default.createElement(Tooltip, { content: feature.hint, side: feature.hintSide }, /* @__PURE__ */ import_react38.default.createElement(
5790
5795
  "svg",
5791
5796
  {
@@ -6282,7 +6287,7 @@ var PricingPlans = ({
6282
6287
  design: "tabs",
6283
6288
  defaultValue: props.currentCycle.value,
6284
6289
  options: props.billingCycles,
6285
- onChangeTab: (e) => {
6290
+ onChange: (e) => {
6286
6291
  if (props.onCycleChange) {
6287
6292
  props.onCycleChange(e);
6288
6293
  }
@@ -6294,7 +6299,7 @@ var PricingPlans = ({
6294
6299
  design: "tabs",
6295
6300
  defaultValue: props.currentCurrency.value,
6296
6301
  options: props.currencies,
6297
- onChangeTab: (e) => {
6302
+ onChange: (e) => {
6298
6303
  if (props.onCurrencyChange) {
6299
6304
  props.onCurrencyChange(e);
6300
6305
  }
@@ -6355,7 +6360,7 @@ var ComparingPlans = (props) => {
6355
6360
  design: "tabs",
6356
6361
  defaultValue: props.currentCycle.value,
6357
6362
  options: props.billingCycles,
6358
- onChangeTab: (e) => {
6363
+ onChange: (e) => {
6359
6364
  if (props.onCycleChange) {
6360
6365
  props.onCycleChange(e);
6361
6366
  }
@@ -6369,7 +6374,7 @@ var ComparingPlans = (props) => {
6369
6374
  design: "tabs",
6370
6375
  defaultValue: props.currentCurrency.value,
6371
6376
  options: props.currencies,
6372
- onChangeTab: (e) => {
6377
+ onChange: (e) => {
6373
6378
  if (props.onCurrencyChange) {
6374
6379
  props.onCurrencyChange(e);
6375
6380
  }
@@ -25,7 +25,7 @@ import {
25
25
  UncheckMark,
26
26
  VeryBadEmoji,
27
27
  VeryGoodEmoji
28
- } from "../chunk-O4FANSN5.mjs";
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
- onChangeTab: (e) => field.onChange(e.value),
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
  );
@@ -1978,6 +1978,7 @@ var PricingCard = ({
1978
1978
  )
1979
1979
  },
1980
1980
  props.features && /* @__PURE__ */ React23.createElement("ul", { role: "list", className: "hawa-space-y-0 hawa-overflow-x-auto" }, (_h = props.features) == null ? void 0 : _h.map((feature, o) => {
1981
+ var _a2;
1981
1982
  return /* @__PURE__ */ React23.createElement(
1982
1983
  "li",
1983
1984
  {
@@ -2004,7 +2005,14 @@ var PricingCard = ({
2004
2005
  clipRule: "evenodd"
2005
2006
  }
2006
2007
  )
2007
- ) : /* @__PURE__ */ React23.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ React23.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React23.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))),
2008
+ ) : /* @__PURE__ */ React23.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ React23.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React23.createElement(
2009
+ Chip,
2010
+ {
2011
+ label: ((_a2 = props.texts) == null ? void 0 : _a2.soon) || "",
2012
+ color: "oceanic",
2013
+ size: "small"
2014
+ }
2015
+ ))),
2008
2016
  feature.hint && /* @__PURE__ */ React23.createElement(Tooltip, { content: feature.hint, side: feature.hintSide }, /* @__PURE__ */ React23.createElement(
2009
2017
  "svg",
2010
2018
  {
@@ -2171,7 +2179,7 @@ var PricingPlans = ({
2171
2179
  design: "tabs",
2172
2180
  defaultValue: props.currentCycle.value,
2173
2181
  options: props.billingCycles,
2174
- onChangeTab: (e) => {
2182
+ onChange: (e) => {
2175
2183
  if (props.onCycleChange) {
2176
2184
  props.onCycleChange(e);
2177
2185
  }
@@ -2183,7 +2191,7 @@ var PricingPlans = ({
2183
2191
  design: "tabs",
2184
2192
  defaultValue: props.currentCurrency.value,
2185
2193
  options: props.currencies,
2186
- onChangeTab: (e) => {
2194
+ onChange: (e) => {
2187
2195
  if (props.onCurrencyChange) {
2188
2196
  props.onCurrencyChange(e);
2189
2197
  }
@@ -2244,7 +2252,7 @@ var ComparingPlans = (props) => {
2244
2252
  design: "tabs",
2245
2253
  defaultValue: props.currentCycle.value,
2246
2254
  options: props.billingCycles,
2247
- onChangeTab: (e) => {
2255
+ onChange: (e) => {
2248
2256
  if (props.onCycleChange) {
2249
2257
  props.onCycleChange(e);
2250
2258
  }
@@ -2258,7 +2266,7 @@ var ComparingPlans = (props) => {
2258
2266
  design: "tabs",
2259
2267
  defaultValue: props.currentCurrency.value,
2260
2268
  options: props.currencies,
2261
- onChangeTab: (e) => {
2269
+ onChange: (e) => {
2262
2270
  if (props.onCurrencyChange) {
2263
2271
  props.onCurrencyChange(e);
2264
2272
  }
@@ -608,6 +608,7 @@ var PricingCard = ({
608
608
  )
609
609
  },
610
610
  props.features && /* @__PURE__ */ import_react7.default.createElement("ul", { role: "list", className: "hawa-space-y-0 hawa-overflow-x-auto" }, (_h = props.features) == null ? void 0 : _h.map((feature, o) => {
611
+ var _a2;
611
612
  return /* @__PURE__ */ import_react7.default.createElement(
612
613
  "li",
613
614
  {
@@ -634,7 +635,14 @@ var PricingCard = ({
634
635
  clipRule: "evenodd"
635
636
  }
636
637
  )
637
- ) : /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ import_react7.default.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react7.default.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))),
638
+ ) : /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ import_react7.default.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react7.default.createElement(
639
+ Chip,
640
+ {
641
+ label: ((_a2 = props.texts) == null ? void 0 : _a2.soon) || "",
642
+ color: "oceanic",
643
+ size: "small"
644
+ }
645
+ ))),
638
646
  feature.hint && /* @__PURE__ */ import_react7.default.createElement(Tooltip, { content: feature.hint, side: feature.hintSide }, /* @__PURE__ */ import_react7.default.createElement(
639
647
  "svg",
640
648
  {
@@ -896,8 +904,10 @@ var Radio = ({
896
904
  width = "default",
897
905
  size = "default",
898
906
  orientation = "horizontal",
907
+ name,
899
908
  labelProps,
900
909
  tabsContainerClassName,
910
+ onChange,
901
911
  ...props
902
912
  }) => {
903
913
  var _a, _b, _c;
@@ -931,6 +941,14 @@ var Radio = ({
931
941
  setParentDirection(dir);
932
942
  }
933
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
+ };
934
952
  switch (design) {
935
953
  case "tabs":
936
954
  return /* @__PURE__ */ import_react11.default.createElement(
@@ -949,14 +967,7 @@ var Radio = ({
949
967
  "li",
950
968
  {
951
969
  "aria-current": "page",
952
- onClick: () => {
953
- setSelectedOption(opt.value);
954
- if (props.onChangeTab) {
955
- props.onChangeTab(opt);
956
- } else {
957
- console.log("onChangeTab was not provided");
958
- }
959
- },
970
+ onClick: () => handleChange(opt),
960
971
  className: cn(
961
972
  "hawa-w-full hawa-cursor-pointer ",
962
973
  orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
@@ -995,7 +1006,8 @@ var Radio = ({
995
1006
  id: opt.value.toString(),
996
1007
  type: "radio",
997
1008
  value: opt.value,
998
- name: "bordered-radio"
1009
+ name,
1010
+ onChange: () => handleChange(opt)
999
1011
  }
1000
1012
  ),
1001
1013
  /* @__PURE__ */ import_react11.default.createElement(
@@ -1012,12 +1024,12 @@ var Radio = ({
1012
1024
  )
1013
1025
  )));
1014
1026
  case "cards":
1015
- 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(
1016
1028
  "input",
1017
1029
  {
1018
1030
  type: "radio",
1019
1031
  id: opt.value.toString(),
1020
- name: "cards-radio",
1032
+ name,
1021
1033
  value: opt.value.toString(),
1022
1034
  className: "hawa-peer hawa-hidden",
1023
1035
  required: true,
@@ -1051,15 +1063,8 @@ var Radio = ({
1051
1063
  id: opt.value.toString(),
1052
1064
  type: "radio",
1053
1065
  value: opt.value,
1054
- name: "default-radio",
1055
- onChange: () => {
1056
- setSelectedOption(opt.value);
1057
- if (props.onChangeTab) {
1058
- props.onChangeTab(opt);
1059
- } else {
1060
- console.log("onChangeTab was not provided");
1061
- }
1062
- }
1066
+ name,
1067
+ onChange: () => handleChange(opt)
1063
1068
  }
1064
1069
  ),
1065
1070
  /* @__PURE__ */ import_react11.default.createElement(
@@ -1098,7 +1103,7 @@ var PricingPlans = ({
1098
1103
  design: "tabs",
1099
1104
  defaultValue: props.currentCycle.value,
1100
1105
  options: props.billingCycles,
1101
- onChangeTab: (e) => {
1106
+ onChange: (e) => {
1102
1107
  if (props.onCycleChange) {
1103
1108
  props.onCycleChange(e);
1104
1109
  }
@@ -1110,7 +1115,7 @@ var PricingPlans = ({
1110
1115
  design: "tabs",
1111
1116
  defaultValue: props.currentCurrency.value,
1112
1117
  options: props.currencies,
1113
- onChangeTab: (e) => {
1118
+ onChange: (e) => {
1114
1119
  if (props.onCurrencyChange) {
1115
1120
  props.onCurrencyChange(e);
1116
1121
  }
@@ -1268,7 +1273,7 @@ var ComparingPlans = (props) => {
1268
1273
  design: "tabs",
1269
1274
  defaultValue: props.currentCycle.value,
1270
1275
  options: props.billingCycles,
1271
- onChangeTab: (e) => {
1276
+ onChange: (e) => {
1272
1277
  if (props.onCycleChange) {
1273
1278
  props.onCycleChange(e);
1274
1279
  }
@@ -1282,7 +1287,7 @@ var ComparingPlans = (props) => {
1282
1287
  design: "tabs",
1283
1288
  defaultValue: props.currentCurrency.value,
1284
1289
  options: props.currencies,
1285
- onChangeTab: (e) => {
1290
+ onChange: (e) => {
1286
1291
  if (props.onCurrencyChange) {
1287
1292
  props.onCurrencyChange(e);
1288
1293
  }
@@ -5,7 +5,7 @@ import {
5
5
  import "../../chunk-ZCZ3WARS.mjs";
6
6
  import {
7
7
  Radio
8
- } from "../../chunk-OT7WQYPD.mjs";
8
+ } from "../../chunk-4Y2FCYFW.mjs";
9
9
  import {
10
10
  CheckMark,
11
11
  UncheckMark
@@ -91,6 +91,7 @@ var PricingCard = ({
91
91
  )
92
92
  },
93
93
  props.features && /* @__PURE__ */ React4.createElement("ul", { role: "list", className: "hawa-space-y-0 hawa-overflow-x-auto" }, (_h = props.features) == null ? void 0 : _h.map((feature, o) => {
94
+ var _a2;
94
95
  return /* @__PURE__ */ React4.createElement(
95
96
  "li",
96
97
  {
@@ -117,7 +118,14 @@ var PricingCard = ({
117
118
  clipRule: "evenodd"
118
119
  }
119
120
  )
120
- ) : /* @__PURE__ */ React4.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ React4.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React4.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))),
121
+ ) : /* @__PURE__ */ React4.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ React4.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React4.createElement(
122
+ Chip,
123
+ {
124
+ label: ((_a2 = props.texts) == null ? void 0 : _a2.soon) || "",
125
+ color: "oceanic",
126
+ size: "small"
127
+ }
128
+ ))),
121
129
  feature.hint && /* @__PURE__ */ React4.createElement(Tooltip, { content: feature.hint, side: feature.hintSide }, /* @__PURE__ */ React4.createElement(
122
130
  "svg",
123
131
  {
@@ -347,7 +355,7 @@ var PricingPlans = ({
347
355
  design: "tabs",
348
356
  defaultValue: props.currentCycle.value,
349
357
  options: props.billingCycles,
350
- onChangeTab: (e) => {
358
+ onChange: (e) => {
351
359
  if (props.onCycleChange) {
352
360
  props.onCycleChange(e);
353
361
  }
@@ -359,7 +367,7 @@ var PricingPlans = ({
359
367
  design: "tabs",
360
368
  defaultValue: props.currentCurrency.value,
361
369
  options: props.currencies,
362
- onChangeTab: (e) => {
370
+ onChange: (e) => {
363
371
  if (props.onCurrencyChange) {
364
372
  props.onCurrencyChange(e);
365
373
  }
@@ -420,7 +428,7 @@ var ComparingPlans = (props) => {
420
428
  design: "tabs",
421
429
  defaultValue: props.currentCycle.value,
422
430
  options: props.billingCycles,
423
- onChangeTab: (e) => {
431
+ onChange: (e) => {
424
432
  if (props.onCycleChange) {
425
433
  props.onCycleChange(e);
426
434
  }
@@ -434,7 +442,7 @@ var ComparingPlans = (props) => {
434
442
  design: "tabs",
435
443
  defaultValue: props.currentCurrency.value,
436
444
  options: props.currencies,
437
- onChangeTab: (e) => {
445
+ onChange: (e) => {
438
446
  if (props.onCurrencyChange) {
439
447
  props.onCurrencyChange(e);
440
448
  }