@sikka/hawa 0.19.33-next → 0.19.35-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.css CHANGED
@@ -4169,6 +4169,11 @@ body {
4169
4169
  top: auto;
4170
4170
  }
4171
4171
 
4172
+ .sm\:hawa-max-w-fit {
4173
+ max-width: -moz-fit-content;
4174
+ max-width: fit-content;
4175
+ }
4176
+
4172
4177
  .sm\:hawa-max-w-sm {
4173
4178
  max-width: 24rem;
4174
4179
  }
package/dist/index.d.mts CHANGED
@@ -38,6 +38,10 @@ type PositionType = "top" | "bottom" | "right" | "left";
38
38
  type SeverityType = "info" | "warning" | "error" | "success" | "none";
39
39
  type OrientationType = "vertical" | "horizontal";
40
40
  type RadiusType = "full" | "inherit" | "none";
41
+ type RadioOptionType = {
42
+ label: string;
43
+ value: string;
44
+ };
41
45
 
42
46
  type AdCardTypes = {
43
47
  orientation: OrientationType;
@@ -52,15 +56,103 @@ type AdCardTypes = {
52
56
  };
53
57
  declare const AdCard: FC<AdCardTypes>;
54
58
 
59
+ type PlanFeature = {
60
+ soon?: boolean;
61
+ included?: boolean;
62
+ text: string;
63
+ hint?: string;
64
+ hintSide?: PositionType;
65
+ };
66
+
67
+ type PricingPlanTexts = {
68
+ title?: string;
69
+ subtitle?: string;
70
+ buttonText?: string;
71
+ cycleText?: string;
72
+ currencyText?: string;
73
+ soon?: string;
74
+ recommended?: string;
75
+ };
76
+ type ThirdPartyAuthTextsTypes = {
77
+ continueWithGoogle?: string;
78
+ continueWithTwitter?: string;
79
+ continueWithApple?: string;
80
+ continueWithMicrosoft?: string;
81
+ continueWithGithub?: string;
82
+ continueWithEmail?: string;
83
+ continueWithPhone?: string;
84
+ };
85
+ type BaseInputType = {
86
+ label?: string;
87
+ placeholder?: string;
88
+ };
89
+ type ValidationTexts = {
90
+ required?: string;
91
+ invalid?: string;
92
+ };
93
+ type TextInputType = ValidationTexts & {
94
+ label?: string;
95
+ placeholder?: string;
96
+ };
97
+ type PasswordInputType$1 = BaseInputType & {
98
+ required?: string;
99
+ tooShort?: string;
100
+ };
101
+ type UsernameInputType = TextInputType & {
102
+ tooShort?: string;
103
+ };
104
+ type ConfirmInputType = BaseInputType & {
105
+ required?: string;
106
+ dontMatch?: string;
107
+ };
108
+ type LoginFormTextsTypes = ThirdPartyAuthTextsTypes & {
109
+ email?: TextInputType;
110
+ username?: UsernameInputType;
111
+ phone?: TextInputType;
112
+ password?: PasswordInputType$1;
113
+ forgotPassword?: string;
114
+ newUserText?: string;
115
+ createAccount?: string;
116
+ loginText?: string;
117
+ };
118
+ type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
119
+ fullName?: BaseInputType;
120
+ email?: TextInputType;
121
+ username?: UsernameInputType;
122
+ password?: PasswordInputType$1;
123
+ confirm?: ConfirmInputType;
124
+ userReference?: BaseInputType;
125
+ subscribeToNewsletter?: string;
126
+ termsRequired?: string;
127
+ refCode?: string;
128
+ refCodePlaceholder?: string;
129
+ existingUserText?: string;
130
+ termsText?: string;
131
+ iAcceptText?: string;
132
+ registerText?: string;
133
+ loginText?: string;
134
+ };
135
+ type ResetPasswordTextsTypes = {
136
+ email?: TextInputType;
137
+ emailSentText?: string;
138
+ registerText?: string;
139
+ resetPassword?: string;
140
+ dontHaveAccount?: string;
141
+ headTitle?: string;
142
+ headDescription?: string;
143
+ };
144
+ type NewPasswordTextsTypes = {
145
+ password?: PasswordInputType$1;
146
+ confirm?: ConfirmInputType;
147
+ updatePassword?: string;
148
+ passwordChanged?: string;
149
+ dontHaveAccount?: string;
150
+ registerText?: string;
151
+ };
152
+
55
153
  type PricingCardProps = {
56
154
  direction?: DirectionType;
57
- features: {
58
- included: boolean;
59
- soon?: boolean;
60
- text: string;
61
- hint?: string;
62
- hintSide?: any;
63
- }[];
155
+ features: PlanFeature[];
64
156
  endButton?: boolean;
65
157
  price: number;
66
158
  oldPrice?: number;
@@ -71,14 +163,7 @@ type PricingCardProps = {
71
163
  recommended?: boolean;
72
164
  size?: "small" | "medium" | "large";
73
165
  isLoading?: boolean;
74
- texts: {
75
- title: string;
76
- subtitle?: string;
77
- buttonText: string;
78
- cycleText: string;
79
- currencyText: string;
80
- recommended?: string;
81
- };
166
+ texts: PricingPlanTexts;
82
167
  };
83
168
  declare const PricingCard: FC<PricingCardProps>;
84
169
 
@@ -268,13 +353,14 @@ type RadioTypes = {
268
353
  orientation?: OrientationType;
269
354
  design?: "default" | "tabs" | "cards" | "bordered";
270
355
  options: RadioOptionsTypes[];
271
- width?: "default" | "full";
356
+ width?: "default" | "full" | "none";
272
357
  onChangeTab?: any;
273
358
  defaultValue?: any;
274
359
  direction?: DirectionType;
275
360
  helperText?: string;
276
361
  labelProps?: LabelProps;
277
362
  label?: string;
363
+ tabsContainerClassName?: string;
278
364
  };
279
365
  declare const Radio: FC<RadioTypes>;
280
366
 
@@ -1040,11 +1126,11 @@ type PasswordInputIndicatorProps = {
1040
1126
  strength?: any;
1041
1127
  };
1042
1128
  declare const PasswordStrengthIndicator: React__default.FC<PasswordInputIndicatorProps>;
1043
- type PasswordInputType$1 = {
1129
+ type PasswordInputType = {
1044
1130
  onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
1045
1131
  hidePopover?: boolean;
1046
1132
  };
1047
- declare const PasswordInput: React__default.FC<PasswordInputType$1>;
1133
+ declare const PasswordInput: React__default.FC<PasswordInputType>;
1048
1134
 
1049
1135
  interface StatTypes extends React__default.HTMLAttributes<HTMLDivElement> {
1050
1136
  label?: string;
@@ -1285,83 +1371,6 @@ type DocsSidebarType = {
1285
1371
  };
1286
1372
  declare const DocsSidebar: React__default.FC<DocsSidebarType>;
1287
1373
 
1288
- type ThirdPartyAuthTextsTypes = {
1289
- continueWithGoogle?: string;
1290
- continueWithTwitter?: string;
1291
- continueWithApple?: string;
1292
- continueWithMicrosoft?: string;
1293
- continueWithGithub?: string;
1294
- continueWithEmail?: string;
1295
- continueWithPhone?: string;
1296
- };
1297
- type BaseInputType = {
1298
- label?: string;
1299
- placeholder?: string;
1300
- };
1301
- type ValidationTexts = {
1302
- required?: string;
1303
- invalid?: string;
1304
- };
1305
- type TextInputType = ValidationTexts & {
1306
- label?: string;
1307
- placeholder?: string;
1308
- };
1309
- type PasswordInputType = BaseInputType & {
1310
- required?: string;
1311
- tooShort?: string;
1312
- };
1313
- type UsernameInputType = TextInputType & {
1314
- tooShort?: string;
1315
- };
1316
- type ConfirmInputType = BaseInputType & {
1317
- required?: string;
1318
- dontMatch?: string;
1319
- };
1320
- type LoginFormTextsTypes = ThirdPartyAuthTextsTypes & {
1321
- email?: TextInputType;
1322
- username?: UsernameInputType;
1323
- phone?: TextInputType;
1324
- password?: PasswordInputType;
1325
- forgotPassword?: string;
1326
- newUserText?: string;
1327
- createAccount?: string;
1328
- loginText?: string;
1329
- };
1330
- type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
1331
- fullName?: BaseInputType;
1332
- email?: TextInputType;
1333
- username?: UsernameInputType;
1334
- password?: PasswordInputType;
1335
- confirm?: ConfirmInputType;
1336
- userReference?: BaseInputType;
1337
- subscribeToNewsletter?: string;
1338
- termsRequired?: string;
1339
- refCode?: string;
1340
- refCodePlaceholder?: string;
1341
- existingUserText?: string;
1342
- termsText?: string;
1343
- iAcceptText?: string;
1344
- registerText?: string;
1345
- loginText?: string;
1346
- };
1347
- type ResetPasswordTextsTypes = {
1348
- email?: TextInputType;
1349
- emailSentText?: string;
1350
- registerText?: string;
1351
- resetPassword?: string;
1352
- dontHaveAccount?: string;
1353
- headTitle?: string;
1354
- headDescription?: string;
1355
- };
1356
- type NewPasswordTextsTypes = {
1357
- password?: PasswordInputType;
1358
- confirm?: ConfirmInputType;
1359
- updatePassword?: string;
1360
- passwordChanged?: string;
1361
- dontHaveAccount?: string;
1362
- registerText?: string;
1363
- };
1364
-
1365
1374
  type LoginFormTypes = {
1366
1375
  /** Object containing text labels used throughout the form. */
1367
1376
  texts?: LoginFormTextsTypes;
@@ -1683,22 +1692,10 @@ declare const NoPermission: FC<NoPermissionProps>;
1683
1692
 
1684
1693
  type PricingPlansTypes = {
1685
1694
  plans: PricingCardProps[];
1686
- currencies: {
1687
- label: string;
1688
- value: string;
1689
- }[];
1690
- billingCycles: {
1691
- label: string;
1692
- value: string;
1693
- }[];
1694
- currentCycle: {
1695
- label: string;
1696
- value: string;
1697
- };
1698
- currentCurrency: {
1699
- label: string;
1700
- value: string;
1701
- };
1695
+ currencies: RadioOptionType[];
1696
+ billingCycles: RadioOptionType[];
1697
+ currentCycle: RadioOptionType;
1698
+ currentCurrency: RadioOptionType;
1702
1699
  onPlanClicked?: (e: any) => void;
1703
1700
  onCycleChange?: (e: any) => void;
1704
1701
  onCurrencyChange?: (e: any) => void;
@@ -1708,37 +1705,21 @@ type PricingPlansTypes = {
1708
1705
  };
1709
1706
  declare const PricingPlans: FC<PricingPlansTypes>;
1710
1707
 
1711
- type PlanFeature = {
1712
- soon?: boolean;
1713
- included: boolean;
1714
- text: string;
1715
- hint?: string;
1716
- };
1717
1708
  type ComparingPlansTypes = {
1718
1709
  plans: {
1719
1710
  direction?: DirectionType;
1720
1711
  features: PlanFeature[];
1721
1712
  price?: number;
1722
- texts?: {
1723
- title?: string;
1724
- subtitle?: string;
1725
- buttonText?: string;
1726
- cycleText?: string;
1727
- currencyText?: string;
1728
- soon?: string;
1729
- };
1713
+ texts?: PricingPlanTexts;
1730
1714
  size?: "small" | "medium" | "large";
1731
1715
  }[];
1732
- currencies: {
1733
- label: string;
1734
- value: string;
1735
- }[];
1736
- billingCycles: {
1737
- label: string;
1738
- value: string;
1739
- }[];
1716
+ currencies: RadioOptionType[];
1717
+ billingCycles: RadioOptionType[];
1718
+ currentCycle: RadioOptionType;
1719
+ currentCurrency: RadioOptionType;
1740
1720
  onCycleChange?: (e: any) => void;
1741
1721
  onCurrencyChange?: (e: any) => void;
1722
+ onPlanClicked?: (e: any) => void;
1742
1723
  direction?: DirectionType;
1743
1724
  showButtons?: boolean;
1744
1725
  topPosition?: number;
@@ -1751,19 +1732,9 @@ type HorizontalPricingTypes = {
1751
1732
  direction?: DirectionType;
1752
1733
  currency?: string;
1753
1734
  cycleText?: string;
1754
- features?: {
1755
- included: boolean;
1756
- text: string;
1757
- description?: string;
1758
- }[];
1735
+ features?: PlanFeature[];
1759
1736
  price?: number;
1760
- texts?: {
1761
- title: string;
1762
- subtitle: string;
1763
- buttonText?: string;
1764
- cycleText?: string;
1765
- currencyText?: string;
1766
- };
1737
+ texts?: PricingPlanTexts;
1767
1738
  size?: "small" | "medium" | "large";
1768
1739
  }[];
1769
1740
  currencies: {
@@ -1774,15 +1745,9 @@ type HorizontalPricingTypes = {
1774
1745
  label: string;
1775
1746
  value: string;
1776
1747
  }[];
1748
+ currentCycle?: RadioOptionType;
1749
+ currentCurrency?: RadioOptionType;
1777
1750
  onPlanClicked?: (e: any) => void;
1778
- currentCycle?: {
1779
- label: string;
1780
- value: string;
1781
- };
1782
- currentCurrency?: {
1783
- label: string;
1784
- value: string;
1785
- };
1786
1751
  onCycleChange?: (e: any) => void;
1787
1752
  onCurrencyChange?: (e: any) => void;
1788
1753
  direction?: DirectionType;
package/dist/index.d.ts CHANGED
@@ -38,6 +38,10 @@ type PositionType = "top" | "bottom" | "right" | "left";
38
38
  type SeverityType = "info" | "warning" | "error" | "success" | "none";
39
39
  type OrientationType = "vertical" | "horizontal";
40
40
  type RadiusType = "full" | "inherit" | "none";
41
+ type RadioOptionType = {
42
+ label: string;
43
+ value: string;
44
+ };
41
45
 
42
46
  type AdCardTypes = {
43
47
  orientation: OrientationType;
@@ -52,15 +56,103 @@ type AdCardTypes = {
52
56
  };
53
57
  declare const AdCard: FC<AdCardTypes>;
54
58
 
59
+ type PlanFeature = {
60
+ soon?: boolean;
61
+ included?: boolean;
62
+ text: string;
63
+ hint?: string;
64
+ hintSide?: PositionType;
65
+ };
66
+
67
+ type PricingPlanTexts = {
68
+ title?: string;
69
+ subtitle?: string;
70
+ buttonText?: string;
71
+ cycleText?: string;
72
+ currencyText?: string;
73
+ soon?: string;
74
+ recommended?: string;
75
+ };
76
+ type ThirdPartyAuthTextsTypes = {
77
+ continueWithGoogle?: string;
78
+ continueWithTwitter?: string;
79
+ continueWithApple?: string;
80
+ continueWithMicrosoft?: string;
81
+ continueWithGithub?: string;
82
+ continueWithEmail?: string;
83
+ continueWithPhone?: string;
84
+ };
85
+ type BaseInputType = {
86
+ label?: string;
87
+ placeholder?: string;
88
+ };
89
+ type ValidationTexts = {
90
+ required?: string;
91
+ invalid?: string;
92
+ };
93
+ type TextInputType = ValidationTexts & {
94
+ label?: string;
95
+ placeholder?: string;
96
+ };
97
+ type PasswordInputType$1 = BaseInputType & {
98
+ required?: string;
99
+ tooShort?: string;
100
+ };
101
+ type UsernameInputType = TextInputType & {
102
+ tooShort?: string;
103
+ };
104
+ type ConfirmInputType = BaseInputType & {
105
+ required?: string;
106
+ dontMatch?: string;
107
+ };
108
+ type LoginFormTextsTypes = ThirdPartyAuthTextsTypes & {
109
+ email?: TextInputType;
110
+ username?: UsernameInputType;
111
+ phone?: TextInputType;
112
+ password?: PasswordInputType$1;
113
+ forgotPassword?: string;
114
+ newUserText?: string;
115
+ createAccount?: string;
116
+ loginText?: string;
117
+ };
118
+ type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
119
+ fullName?: BaseInputType;
120
+ email?: TextInputType;
121
+ username?: UsernameInputType;
122
+ password?: PasswordInputType$1;
123
+ confirm?: ConfirmInputType;
124
+ userReference?: BaseInputType;
125
+ subscribeToNewsletter?: string;
126
+ termsRequired?: string;
127
+ refCode?: string;
128
+ refCodePlaceholder?: string;
129
+ existingUserText?: string;
130
+ termsText?: string;
131
+ iAcceptText?: string;
132
+ registerText?: string;
133
+ loginText?: string;
134
+ };
135
+ type ResetPasswordTextsTypes = {
136
+ email?: TextInputType;
137
+ emailSentText?: string;
138
+ registerText?: string;
139
+ resetPassword?: string;
140
+ dontHaveAccount?: string;
141
+ headTitle?: string;
142
+ headDescription?: string;
143
+ };
144
+ type NewPasswordTextsTypes = {
145
+ password?: PasswordInputType$1;
146
+ confirm?: ConfirmInputType;
147
+ updatePassword?: string;
148
+ passwordChanged?: string;
149
+ dontHaveAccount?: string;
150
+ registerText?: string;
151
+ };
152
+
55
153
  type PricingCardProps = {
56
154
  direction?: DirectionType;
57
- features: {
58
- included: boolean;
59
- soon?: boolean;
60
- text: string;
61
- hint?: string;
62
- hintSide?: any;
63
- }[];
155
+ features: PlanFeature[];
64
156
  endButton?: boolean;
65
157
  price: number;
66
158
  oldPrice?: number;
@@ -71,14 +163,7 @@ type PricingCardProps = {
71
163
  recommended?: boolean;
72
164
  size?: "small" | "medium" | "large";
73
165
  isLoading?: boolean;
74
- texts: {
75
- title: string;
76
- subtitle?: string;
77
- buttonText: string;
78
- cycleText: string;
79
- currencyText: string;
80
- recommended?: string;
81
- };
166
+ texts: PricingPlanTexts;
82
167
  };
83
168
  declare const PricingCard: FC<PricingCardProps>;
84
169
 
@@ -268,13 +353,14 @@ type RadioTypes = {
268
353
  orientation?: OrientationType;
269
354
  design?: "default" | "tabs" | "cards" | "bordered";
270
355
  options: RadioOptionsTypes[];
271
- width?: "default" | "full";
356
+ width?: "default" | "full" | "none";
272
357
  onChangeTab?: any;
273
358
  defaultValue?: any;
274
359
  direction?: DirectionType;
275
360
  helperText?: string;
276
361
  labelProps?: LabelProps;
277
362
  label?: string;
363
+ tabsContainerClassName?: string;
278
364
  };
279
365
  declare const Radio: FC<RadioTypes>;
280
366
 
@@ -1040,11 +1126,11 @@ type PasswordInputIndicatorProps = {
1040
1126
  strength?: any;
1041
1127
  };
1042
1128
  declare const PasswordStrengthIndicator: React__default.FC<PasswordInputIndicatorProps>;
1043
- type PasswordInputType$1 = {
1129
+ type PasswordInputType = {
1044
1130
  onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
1045
1131
  hidePopover?: boolean;
1046
1132
  };
1047
- declare const PasswordInput: React__default.FC<PasswordInputType$1>;
1133
+ declare const PasswordInput: React__default.FC<PasswordInputType>;
1048
1134
 
1049
1135
  interface StatTypes extends React__default.HTMLAttributes<HTMLDivElement> {
1050
1136
  label?: string;
@@ -1285,83 +1371,6 @@ type DocsSidebarType = {
1285
1371
  };
1286
1372
  declare const DocsSidebar: React__default.FC<DocsSidebarType>;
1287
1373
 
1288
- type ThirdPartyAuthTextsTypes = {
1289
- continueWithGoogle?: string;
1290
- continueWithTwitter?: string;
1291
- continueWithApple?: string;
1292
- continueWithMicrosoft?: string;
1293
- continueWithGithub?: string;
1294
- continueWithEmail?: string;
1295
- continueWithPhone?: string;
1296
- };
1297
- type BaseInputType = {
1298
- label?: string;
1299
- placeholder?: string;
1300
- };
1301
- type ValidationTexts = {
1302
- required?: string;
1303
- invalid?: string;
1304
- };
1305
- type TextInputType = ValidationTexts & {
1306
- label?: string;
1307
- placeholder?: string;
1308
- };
1309
- type PasswordInputType = BaseInputType & {
1310
- required?: string;
1311
- tooShort?: string;
1312
- };
1313
- type UsernameInputType = TextInputType & {
1314
- tooShort?: string;
1315
- };
1316
- type ConfirmInputType = BaseInputType & {
1317
- required?: string;
1318
- dontMatch?: string;
1319
- };
1320
- type LoginFormTextsTypes = ThirdPartyAuthTextsTypes & {
1321
- email?: TextInputType;
1322
- username?: UsernameInputType;
1323
- phone?: TextInputType;
1324
- password?: PasswordInputType;
1325
- forgotPassword?: string;
1326
- newUserText?: string;
1327
- createAccount?: string;
1328
- loginText?: string;
1329
- };
1330
- type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
1331
- fullName?: BaseInputType;
1332
- email?: TextInputType;
1333
- username?: UsernameInputType;
1334
- password?: PasswordInputType;
1335
- confirm?: ConfirmInputType;
1336
- userReference?: BaseInputType;
1337
- subscribeToNewsletter?: string;
1338
- termsRequired?: string;
1339
- refCode?: string;
1340
- refCodePlaceholder?: string;
1341
- existingUserText?: string;
1342
- termsText?: string;
1343
- iAcceptText?: string;
1344
- registerText?: string;
1345
- loginText?: string;
1346
- };
1347
- type ResetPasswordTextsTypes = {
1348
- email?: TextInputType;
1349
- emailSentText?: string;
1350
- registerText?: string;
1351
- resetPassword?: string;
1352
- dontHaveAccount?: string;
1353
- headTitle?: string;
1354
- headDescription?: string;
1355
- };
1356
- type NewPasswordTextsTypes = {
1357
- password?: PasswordInputType;
1358
- confirm?: ConfirmInputType;
1359
- updatePassword?: string;
1360
- passwordChanged?: string;
1361
- dontHaveAccount?: string;
1362
- registerText?: string;
1363
- };
1364
-
1365
1374
  type LoginFormTypes = {
1366
1375
  /** Object containing text labels used throughout the form. */
1367
1376
  texts?: LoginFormTextsTypes;
@@ -1683,22 +1692,10 @@ declare const NoPermission: FC<NoPermissionProps>;
1683
1692
 
1684
1693
  type PricingPlansTypes = {
1685
1694
  plans: PricingCardProps[];
1686
- currencies: {
1687
- label: string;
1688
- value: string;
1689
- }[];
1690
- billingCycles: {
1691
- label: string;
1692
- value: string;
1693
- }[];
1694
- currentCycle: {
1695
- label: string;
1696
- value: string;
1697
- };
1698
- currentCurrency: {
1699
- label: string;
1700
- value: string;
1701
- };
1695
+ currencies: RadioOptionType[];
1696
+ billingCycles: RadioOptionType[];
1697
+ currentCycle: RadioOptionType;
1698
+ currentCurrency: RadioOptionType;
1702
1699
  onPlanClicked?: (e: any) => void;
1703
1700
  onCycleChange?: (e: any) => void;
1704
1701
  onCurrencyChange?: (e: any) => void;
@@ -1708,37 +1705,21 @@ type PricingPlansTypes = {
1708
1705
  };
1709
1706
  declare const PricingPlans: FC<PricingPlansTypes>;
1710
1707
 
1711
- type PlanFeature = {
1712
- soon?: boolean;
1713
- included: boolean;
1714
- text: string;
1715
- hint?: string;
1716
- };
1717
1708
  type ComparingPlansTypes = {
1718
1709
  plans: {
1719
1710
  direction?: DirectionType;
1720
1711
  features: PlanFeature[];
1721
1712
  price?: number;
1722
- texts?: {
1723
- title?: string;
1724
- subtitle?: string;
1725
- buttonText?: string;
1726
- cycleText?: string;
1727
- currencyText?: string;
1728
- soon?: string;
1729
- };
1713
+ texts?: PricingPlanTexts;
1730
1714
  size?: "small" | "medium" | "large";
1731
1715
  }[];
1732
- currencies: {
1733
- label: string;
1734
- value: string;
1735
- }[];
1736
- billingCycles: {
1737
- label: string;
1738
- value: string;
1739
- }[];
1716
+ currencies: RadioOptionType[];
1717
+ billingCycles: RadioOptionType[];
1718
+ currentCycle: RadioOptionType;
1719
+ currentCurrency: RadioOptionType;
1740
1720
  onCycleChange?: (e: any) => void;
1741
1721
  onCurrencyChange?: (e: any) => void;
1722
+ onPlanClicked?: (e: any) => void;
1742
1723
  direction?: DirectionType;
1743
1724
  showButtons?: boolean;
1744
1725
  topPosition?: number;
@@ -1751,19 +1732,9 @@ type HorizontalPricingTypes = {
1751
1732
  direction?: DirectionType;
1752
1733
  currency?: string;
1753
1734
  cycleText?: string;
1754
- features?: {
1755
- included: boolean;
1756
- text: string;
1757
- description?: string;
1758
- }[];
1735
+ features?: PlanFeature[];
1759
1736
  price?: number;
1760
- texts?: {
1761
- title: string;
1762
- subtitle: string;
1763
- buttonText?: string;
1764
- cycleText?: string;
1765
- currencyText?: string;
1766
- };
1737
+ texts?: PricingPlanTexts;
1767
1738
  size?: "small" | "medium" | "large";
1768
1739
  }[];
1769
1740
  currencies: {
@@ -1774,15 +1745,9 @@ type HorizontalPricingTypes = {
1774
1745
  label: string;
1775
1746
  value: string;
1776
1747
  }[];
1748
+ currentCycle?: RadioOptionType;
1749
+ currentCurrency?: RadioOptionType;
1777
1750
  onPlanClicked?: (e: any) => void;
1778
- currentCycle?: {
1779
- label: string;
1780
- value: string;
1781
- };
1782
- currentCurrency?: {
1783
- label: string;
1784
- value: string;
1785
- };
1786
1751
  onCycleChange?: (e: any) => void;
1787
1752
  onCurrencyChange?: (e: any) => void;
1788
1753
  direction?: DirectionType;
package/dist/index.js CHANGED
@@ -3610,6 +3610,7 @@ var Radio = ({
3610
3610
  width = "default",
3611
3611
  orientation = "horizontal",
3612
3612
  labelProps,
3613
+ tabsContainerClassName,
3613
3614
  ...props
3614
3615
  }) => {
3615
3616
  var _a, _b, _c;
@@ -3621,6 +3622,7 @@ var Radio = ({
3621
3622
  vertical: "hawa-flex hawa-flex-col"
3622
3623
  };
3623
3624
  let widthStyle = {
3625
+ none: "",
3624
3626
  default: "hawa-max-w-fit",
3625
3627
  full: "hawa-w-full"
3626
3628
  };
@@ -3645,8 +3647,9 @@ var Radio = ({
3645
3647
  className: cn(
3646
3648
  props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
3647
3649
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-text-sm hawa-font-medium",
3650
+ orientationStyle[orientation],
3648
3651
  widthStyle[width],
3649
- orientationStyle[orientation]
3652
+ tabsContainerClassName
3650
3653
  )
3651
3654
  },
3652
3655
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ import_react14.default.createElement(
@@ -11117,8 +11120,6 @@ var PricingPlans = ({
11117
11120
  // components/blocks/pricing/ComparingPlans.tsx
11118
11121
  var import_react70 = __toESM(require("react"));
11119
11122
  var ComparingPlans = (props) => {
11120
- const [currentCurrency, setCurrentCurrency] = (0, import_react70.useState)("sar");
11121
- const [currentCycle, setCurrentCycle] = (0, import_react70.useState)("monthly");
11122
11123
  const uniqueFeatures = Array.from(
11123
11124
  new Set(
11124
11125
  props.plans.flatMap(
@@ -11126,31 +11127,31 @@ var ComparingPlans = (props) => {
11126
11127
  )
11127
11128
  )
11128
11129
  );
11129
- return /* @__PURE__ */ import_react70.default.createElement("div", { id: "detailed-pricing", className: "hawa-w-full " }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ import_react70.default.createElement(
11130
+ return /* @__PURE__ */ import_react70.default.createElement("div", { id: "detailed-pricing", className: "hawa-w-full" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-flex-col hawa-gap-2 sm:hawa-flex-row hawa-w-full hawa-justify-between" }, /* @__PURE__ */ import_react70.default.createElement(
11130
11131
  Radio,
11131
11132
  {
11133
+ tabsContainerClassName: "hawa-w-full sm:hawa-max-w-fit",
11134
+ width: "none",
11132
11135
  design: "tabs",
11133
- defaultValue: currentCycle,
11136
+ defaultValue: props.currentCycle.value,
11134
11137
  options: props.billingCycles,
11135
11138
  onChangeTab: (e) => {
11136
11139
  if (props.onCycleChange) {
11137
11140
  props.onCycleChange(e);
11138
- } else {
11139
- console.log("onCycleChange was not provided");
11140
11141
  }
11141
11142
  }
11142
11143
  }
11143
11144
  ), /* @__PURE__ */ import_react70.default.createElement(
11144
11145
  Radio,
11145
11146
  {
11147
+ tabsContainerClassName: "hawa-w-full sm:hawa-max-w-fit",
11148
+ width: "none",
11146
11149
  design: "tabs",
11147
- defaultValue: currentCurrency,
11150
+ defaultValue: props.currentCurrency.value,
11148
11151
  options: props.currencies,
11149
11152
  onChangeTab: (e) => {
11150
11153
  if (props.onCurrencyChange) {
11151
11154
  props.onCurrencyChange(e);
11152
- } else {
11153
- console.log("onCurrencyChange was not provided");
11154
11155
  }
11155
11156
  }
11156
11157
  }
@@ -11158,7 +11159,7 @@ var ComparingPlans = (props) => {
11158
11159
  "div",
11159
11160
  {
11160
11161
  className: cn(
11161
- "hawa-sticky hawa-z-10 hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border hawa-p-4 hawa-text-sm hawa-font-medium hawa-rounded-t",
11162
+ "hawa-sticky hawa-z-10 hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border hawa-p-4 hawa-text-sm hawa-font-medium hawa-rounded-t",
11162
11163
  "hawa-bg-primary-foreground"
11163
11164
  ),
11164
11165
  style: {
@@ -11243,7 +11244,25 @@ var ComparingPlans = (props) => {
11243
11244
  key: i,
11244
11245
  className: "hawa-flex hawa-justify-center hawa-items-center"
11245
11246
  },
11246
- /* @__PURE__ */ import_react70.default.createElement(Button, { className: "hawa-max-w-xs hawa-w-full" }, ((_a = plan.texts) == null ? void 0 : _a.buttonText) || "Get Started")
11247
+ /* @__PURE__ */ import_react70.default.createElement(
11248
+ Button,
11249
+ {
11250
+ className: "hawa-max-w-xs hawa-w-full",
11251
+ onClick: () => {
11252
+ var _a2, _b;
11253
+ if (props.onPlanClicked) {
11254
+ let clickedData = {
11255
+ // plan: plan.id,
11256
+ currency: (_a2 = props.currentCurrency) == null ? void 0 : _a2.value,
11257
+ cycle: (_b = props.currentCycle) == null ? void 0 : _b.value,
11258
+ ...plan
11259
+ };
11260
+ props.onPlanClicked(clickedData);
11261
+ }
11262
+ }
11263
+ },
11264
+ ((_a = plan.texts) == null ? void 0 : _a.buttonText) || "Get Started"
11265
+ )
11247
11266
  );
11248
11267
  })));
11249
11268
  };
package/dist/index.mjs CHANGED
@@ -3377,6 +3377,7 @@ var Radio = ({
3377
3377
  width = "default",
3378
3378
  orientation = "horizontal",
3379
3379
  labelProps,
3380
+ tabsContainerClassName,
3380
3381
  ...props
3381
3382
  }) => {
3382
3383
  var _a, _b, _c;
@@ -3388,6 +3389,7 @@ var Radio = ({
3388
3389
  vertical: "hawa-flex hawa-flex-col"
3389
3390
  };
3390
3391
  let widthStyle = {
3392
+ none: "",
3391
3393
  default: "hawa-max-w-fit",
3392
3394
  full: "hawa-w-full"
3393
3395
  };
@@ -3412,8 +3414,9 @@ var Radio = ({
3412
3414
  className: cn(
3413
3415
  props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
3414
3416
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-text-sm hawa-font-medium",
3417
+ orientationStyle[orientation],
3415
3418
  widthStyle[width],
3416
- orientationStyle[orientation]
3419
+ tabsContainerClassName
3417
3420
  )
3418
3421
  },
3419
3422
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ React20.createElement(
@@ -10899,10 +10902,8 @@ var PricingPlans = ({
10899
10902
  };
10900
10903
 
10901
10904
  // components/blocks/pricing/ComparingPlans.tsx
10902
- import React96, { useState as useState36 } from "react";
10905
+ import React96 from "react";
10903
10906
  var ComparingPlans = (props) => {
10904
- const [currentCurrency, setCurrentCurrency] = useState36("sar");
10905
- const [currentCycle, setCurrentCycle] = useState36("monthly");
10906
10907
  const uniqueFeatures = Array.from(
10907
10908
  new Set(
10908
10909
  props.plans.flatMap(
@@ -10910,31 +10911,31 @@ var ComparingPlans = (props) => {
10910
10911
  )
10911
10912
  )
10912
10913
  );
10913
- return /* @__PURE__ */ React96.createElement("div", { id: "detailed-pricing", className: "hawa-w-full " }, /* @__PURE__ */ React96.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ React96.createElement(
10914
+ return /* @__PURE__ */ React96.createElement("div", { id: "detailed-pricing", className: "hawa-w-full" }, /* @__PURE__ */ React96.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-flex-col hawa-gap-2 sm:hawa-flex-row hawa-w-full hawa-justify-between" }, /* @__PURE__ */ React96.createElement(
10914
10915
  Radio,
10915
10916
  {
10917
+ tabsContainerClassName: "hawa-w-full sm:hawa-max-w-fit",
10918
+ width: "none",
10916
10919
  design: "tabs",
10917
- defaultValue: currentCycle,
10920
+ defaultValue: props.currentCycle.value,
10918
10921
  options: props.billingCycles,
10919
10922
  onChangeTab: (e) => {
10920
10923
  if (props.onCycleChange) {
10921
10924
  props.onCycleChange(e);
10922
- } else {
10923
- console.log("onCycleChange was not provided");
10924
10925
  }
10925
10926
  }
10926
10927
  }
10927
10928
  ), /* @__PURE__ */ React96.createElement(
10928
10929
  Radio,
10929
10930
  {
10931
+ tabsContainerClassName: "hawa-w-full sm:hawa-max-w-fit",
10932
+ width: "none",
10930
10933
  design: "tabs",
10931
- defaultValue: currentCurrency,
10934
+ defaultValue: props.currentCurrency.value,
10932
10935
  options: props.currencies,
10933
10936
  onChangeTab: (e) => {
10934
10937
  if (props.onCurrencyChange) {
10935
10938
  props.onCurrencyChange(e);
10936
- } else {
10937
- console.log("onCurrencyChange was not provided");
10938
10939
  }
10939
10940
  }
10940
10941
  }
@@ -10942,7 +10943,7 @@ var ComparingPlans = (props) => {
10942
10943
  "div",
10943
10944
  {
10944
10945
  className: cn(
10945
- "hawa-sticky hawa-z-10 hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border hawa-p-4 hawa-text-sm hawa-font-medium hawa-rounded-t",
10946
+ "hawa-sticky hawa-z-10 hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border hawa-p-4 hawa-text-sm hawa-font-medium hawa-rounded-t",
10946
10947
  "hawa-bg-primary-foreground"
10947
10948
  ),
10948
10949
  style: {
@@ -11027,7 +11028,25 @@ var ComparingPlans = (props) => {
11027
11028
  key: i,
11028
11029
  className: "hawa-flex hawa-justify-center hawa-items-center"
11029
11030
  },
11030
- /* @__PURE__ */ React96.createElement(Button, { className: "hawa-max-w-xs hawa-w-full" }, ((_a = plan.texts) == null ? void 0 : _a.buttonText) || "Get Started")
11031
+ /* @__PURE__ */ React96.createElement(
11032
+ Button,
11033
+ {
11034
+ className: "hawa-max-w-xs hawa-w-full",
11035
+ onClick: () => {
11036
+ var _a2, _b;
11037
+ if (props.onPlanClicked) {
11038
+ let clickedData = {
11039
+ // plan: plan.id,
11040
+ currency: (_a2 = props.currentCurrency) == null ? void 0 : _a2.value,
11041
+ cycle: (_b = props.currentCycle) == null ? void 0 : _b.value,
11042
+ ...plan
11043
+ };
11044
+ props.onPlanClicked(clickedData);
11045
+ }
11046
+ }
11047
+ },
11048
+ ((_a = plan.texts) == null ? void 0 : _a.buttonText) || "Get Started"
11049
+ )
11031
11050
  );
11032
11051
  })));
11033
11052
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.19.33-next",
3
+ "version": "0.19.35-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",