@sikka/hawa 0.38.0-next → 0.38.1-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.
Files changed (85) hide show
  1. package/dist/alert/index.js +43 -19
  2. package/dist/alert/index.js.map +1 -1
  3. package/dist/alert/index.mjs +43 -19
  4. package/dist/alert/index.mjs.map +1 -1
  5. package/dist/appLayout/index.js +43 -19
  6. package/dist/appLayout/index.js.map +1 -1
  7. package/dist/appLayout/index.mjs +43 -19
  8. package/dist/appLayout/index.mjs.map +1 -1
  9. package/dist/backToTop/index.js +43 -19
  10. package/dist/backToTop/index.js.map +1 -1
  11. package/dist/backToTop/index.mjs +43 -19
  12. package/dist/backToTop/index.mjs.map +1 -1
  13. package/dist/blocks/auth/index.js +44 -20
  14. package/dist/blocks/auth/index.mjs +5 -5
  15. package/dist/blocks/feedback/index.js +43 -19
  16. package/dist/blocks/feedback/index.mjs +5 -5
  17. package/dist/blocks/index.js +44 -20
  18. package/dist/blocks/index.mjs +3 -3
  19. package/dist/blocks/misc/index.js +43 -19
  20. package/dist/blocks/misc/index.mjs +5 -5
  21. package/dist/blocks/pricing/index.js +43 -19
  22. package/dist/blocks/pricing/index.mjs +4 -4
  23. package/dist/button/index.d.mts +4 -0
  24. package/dist/button/index.d.ts +4 -0
  25. package/dist/button/index.js +43 -19
  26. package/dist/button/index.js.map +1 -1
  27. package/dist/button/index.mjs +43 -19
  28. package/dist/button/index.mjs.map +1 -1
  29. package/dist/calendar/index.js +43 -19
  30. package/dist/calendar/index.js.map +1 -1
  31. package/dist/calendar/index.mjs +43 -19
  32. package/dist/calendar/index.mjs.map +1 -1
  33. package/dist/{chunk-JJMRBD3S.mjs → chunk-EZBHA2IL.mjs} +1 -1
  34. package/dist/{chunk-E77TUADR.mjs → chunk-F23GAE2P.mjs} +1 -1
  35. package/dist/{chunk-E6C3LDHD.mjs → chunk-IC5WYNKN.mjs} +1 -1
  36. package/dist/{chunk-IA5FLRFL.mjs → chunk-RTK6REIK.mjs} +1 -1
  37. package/dist/{chunk-MHSSZ6XE.mjs → chunk-UDJFVH2I.mjs} +1 -1
  38. package/dist/{chunk-4EZL2A64.mjs → chunk-UJ5SXC3M.mjs} +1 -1
  39. package/dist/{chunk-V4SUYEVH.mjs → chunk-UMOBOCED.mjs} +43 -19
  40. package/dist/{chunk-LDJD5ITW.mjs → chunk-V7O5MQZQ.mjs} +43 -19
  41. package/dist/{chunk-Q3HJI7ZE.mjs → chunk-WDCKXU54.mjs} +1 -1
  42. package/dist/{chunk-TMUQCNLO.mjs → chunk-XFSBC5VI.mjs} +1 -1
  43. package/dist/codeBlock/index.js +43 -19
  44. package/dist/codeBlock/index.js.map +1 -1
  45. package/dist/codeBlock/index.mjs +43 -19
  46. package/dist/codeBlock/index.mjs.map +1 -1
  47. package/dist/dataTable/index.js +43 -19
  48. package/dist/dataTable/index.js.map +1 -1
  49. package/dist/dataTable/index.mjs +43 -19
  50. package/dist/dataTable/index.mjs.map +1 -1
  51. package/dist/datePicker/index.d.mts +4 -0
  52. package/dist/datePicker/index.d.ts +4 -0
  53. package/dist/datePicker/index.js +44 -19
  54. package/dist/datePicker/index.js.map +1 -1
  55. package/dist/datePicker/index.mjs +44 -19
  56. package/dist/datePicker/index.mjs.map +1 -1
  57. package/dist/docsLayout/index.js +43 -19
  58. package/dist/docsLayout/index.js.map +1 -1
  59. package/dist/docsLayout/index.mjs +43 -19
  60. package/dist/docsLayout/index.mjs.map +1 -1
  61. package/dist/elements/index.d.mts +4 -0
  62. package/dist/elements/index.d.ts +4 -0
  63. package/dist/elements/index.js +43 -19
  64. package/dist/elements/index.mjs +3 -3
  65. package/dist/fileDropzone/index.js +43 -19
  66. package/dist/fileDropzone/index.js.map +1 -1
  67. package/dist/fileDropzone/index.mjs +43 -19
  68. package/dist/fileDropzone/index.mjs.map +1 -1
  69. package/dist/index.d.mts +4 -0
  70. package/dist/index.d.ts +4 -0
  71. package/dist/index.js +44 -20
  72. package/dist/index.mjs +44 -20
  73. package/dist/layout/index.js +43 -19
  74. package/dist/layout/index.mjs +2 -2
  75. package/dist/sortButton/index.js +43 -19
  76. package/dist/sortButton/index.js.map +1 -1
  77. package/dist/sortButton/index.mjs +43 -19
  78. package/dist/sortButton/index.mjs.map +1 -1
  79. package/dist/splitButton/index.d.mts +4 -0
  80. package/dist/splitButton/index.d.ts +4 -0
  81. package/dist/splitButton/index.js +43 -19
  82. package/dist/splitButton/index.js.map +1 -1
  83. package/dist/splitButton/index.mjs +43 -19
  84. package/dist/splitButton/index.mjs.map +1 -1
  85. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-TMUQCNLO.mjs";
4
+ } from "../../chunk-XFSBC5VI.mjs";
5
5
  import {
6
6
  StopPropagationWrapper
7
7
  } from "../../chunk-47APBDKK.mjs";
8
8
  import {
9
9
  Select
10
- } from "../../chunk-IA5FLRFL.mjs";
10
+ } from "../../chunk-RTK6REIK.mjs";
11
11
  import {
12
12
  EyeIcon,
13
13
  HiddenEyeIcon
14
- } from "../../chunk-E6C3LDHD.mjs";
14
+ } from "../../chunk-IC5WYNKN.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -24,7 +24,7 @@ import {
24
24
  Label,
25
25
  Loading,
26
26
  cn
27
- } from "../../chunk-V4SUYEVH.mjs";
27
+ } from "../../chunk-UMOBOCED.mjs";
28
28
 
29
29
  // blocks/auth/AuthButtons.tsx
30
30
  import React2 from "react";
@@ -2676,7 +2676,7 @@ var LoginForm = ({
2676
2676
  },
2677
2677
  (texts == null ? void 0 : texts.loginText) || "Login"
2678
2678
  ),
2679
- props.additionalButtons,
2679
+ props.additionalButtons && props.additionalButtons,
2680
2680
  props.allowRegister && /* @__PURE__ */ React5.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ React5.createElement(
2681
2681
  "span",
2682
2682
  {
@@ -447,30 +447,54 @@ var Button = React5.forwardRef(
447
447
  children,
448
448
  labelProps,
449
449
  showHelperText = false,
450
+ inForm = false,
450
451
  ...props
451
452
  }, ref) => {
452
453
  const Comp = "button";
453
454
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
454
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
455
- Comp,
456
- {
457
- className: cn(
458
- buttonVariants({ variant, size, className }),
459
- centered && "hawa-justify-center"
460
- ),
461
- ref,
462
- ...props
463
- },
464
- isLoading ? /* @__PURE__ */ React5.createElement(
465
- Loading,
455
+ if (inForm) {
456
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
457
+ Comp,
466
458
  {
467
- design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
468
- themeMode: variant === "outline" ? "light" : "dark",
469
- color: loadingColor,
470
- size: size === "sm" || size === "xs" ? "xs" : "button"
471
- }
472
- ) : children
473
- ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
459
+ className: cn(
460
+ buttonVariants({ variant, size, className }),
461
+ centered && "hawa-justify-center"
462
+ ),
463
+ ref,
464
+ ...props
465
+ },
466
+ isLoading ? /* @__PURE__ */ React5.createElement(
467
+ Loading,
468
+ {
469
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
470
+ themeMode: variant === "outline" ? "light" : "dark",
471
+ color: loadingColor,
472
+ size: size === "sm" || size === "xs" ? "xs" : "button"
473
+ }
474
+ ) : children
475
+ ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
476
+ } else {
477
+ return /* @__PURE__ */ React5.createElement(
478
+ Comp,
479
+ {
480
+ className: cn(
481
+ buttonVariants({ variant, size, className }),
482
+ centered && "hawa-justify-center"
483
+ ),
484
+ ref,
485
+ ...props
486
+ },
487
+ isLoading ? /* @__PURE__ */ React5.createElement(
488
+ Loading,
489
+ {
490
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
491
+ themeMode: variant === "outline" ? "light" : "dark",
492
+ color: loadingColor,
493
+ size: size === "sm" || size === "xs" ? "xs" : "button"
494
+ }
495
+ ) : children
496
+ );
497
+ }
474
498
  }
475
499
  );
476
500
  Button.displayName = "Button";
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  import {
3
3
  Textarea
4
- } from "../../chunk-4EZL2A64.mjs";
4
+ } from "../../chunk-UJ5SXC3M.mjs";
5
5
  import {
6
6
  Select
7
- } from "../../chunk-IA5FLRFL.mjs";
7
+ } from "../../chunk-RTK6REIK.mjs";
8
8
  import {
9
9
  Popover,
10
10
  Radio
11
- } from "../../chunk-Q3HJI7ZE.mjs";
11
+ } from "../../chunk-WDCKXU54.mjs";
12
12
  import {
13
13
  BadEmoji,
14
14
  GoodEmoji,
15
15
  VeryBadEmoji,
16
16
  VeryGoodEmoji
17
- } from "../../chunk-E6C3LDHD.mjs";
17
+ } from "../../chunk-IC5WYNKN.mjs";
18
18
  import {
19
19
  Button,
20
20
  Card,
21
21
  CardContent,
22
22
  Label,
23
23
  cn
24
- } from "../../chunk-V4SUYEVH.mjs";
24
+ } from "../../chunk-UMOBOCED.mjs";
25
25
 
26
26
  // blocks/feedback/UserReferralSource.tsx
27
27
  import React, { useRef, useState } from "react";
@@ -469,30 +469,54 @@ var Button = React5.forwardRef(
469
469
  children,
470
470
  labelProps,
471
471
  showHelperText = false,
472
+ inForm = false,
472
473
  ...props
473
474
  }, ref) => {
474
475
  const Comp = "button";
475
476
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
476
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
477
- Comp,
478
- {
479
- className: cn(
480
- buttonVariants({ variant, size, className }),
481
- centered && "hawa-justify-center"
482
- ),
483
- ref,
484
- ...props
485
- },
486
- isLoading ? /* @__PURE__ */ React5.createElement(
487
- Loading,
477
+ if (inForm) {
478
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
479
+ Comp,
488
480
  {
489
- design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
490
- themeMode: variant === "outline" ? "light" : "dark",
491
- color: loadingColor,
492
- size: size === "sm" || size === "xs" ? "xs" : "button"
493
- }
494
- ) : children
495
- ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
481
+ className: cn(
482
+ buttonVariants({ variant, size, className }),
483
+ centered && "hawa-justify-center"
484
+ ),
485
+ ref,
486
+ ...props
487
+ },
488
+ isLoading ? /* @__PURE__ */ React5.createElement(
489
+ Loading,
490
+ {
491
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
492
+ themeMode: variant === "outline" ? "light" : "dark",
493
+ color: loadingColor,
494
+ size: size === "sm" || size === "xs" ? "xs" : "button"
495
+ }
496
+ ) : children
497
+ ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
498
+ } else {
499
+ return /* @__PURE__ */ React5.createElement(
500
+ Comp,
501
+ {
502
+ className: cn(
503
+ buttonVariants({ variant, size, className }),
504
+ centered && "hawa-justify-center"
505
+ ),
506
+ ref,
507
+ ...props
508
+ },
509
+ isLoading ? /* @__PURE__ */ React5.createElement(
510
+ Loading,
511
+ {
512
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
513
+ themeMode: variant === "outline" ? "light" : "dark",
514
+ color: loadingColor,
515
+ size: size === "sm" || size === "xs" ? "xs" : "button"
516
+ }
517
+ ) : children
518
+ );
519
+ }
496
520
  }
497
521
  );
498
522
  Button.displayName = "Button";
@@ -3782,7 +3806,7 @@ var LoginForm = ({
3782
3806
  },
3783
3807
  (texts == null ? void 0 : texts.loginText) || "Login"
3784
3808
  ),
3785
- props.additionalButtons,
3809
+ props.additionalButtons && props.additionalButtons,
3786
3810
  props.allowRegister && /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react14.default.createElement(
3787
3811
  "span",
3788
3812
  {
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-MHSSZ6XE.mjs";
20
+ } from "../chunk-UDJFVH2I.mjs";
21
21
  import "../chunk-ZBUBNKF6.mjs";
22
22
  import {
23
23
  BadEmoji,
@@ -43,7 +43,7 @@ import {
43
43
  VeryBadEmoji,
44
44
  VeryGoodEmoji,
45
45
  cn
46
- } from "../chunk-LDJD5ITW.mjs";
46
+ } from "../chunk-V7O5MQZQ.mjs";
47
47
  import "../chunk-SYGWSBJL.mjs";
48
48
 
49
49
  // blocks/auth/AuthButtons.tsx
@@ -443,7 +443,7 @@ var LoginForm = ({
443
443
  },
444
444
  (texts == null ? void 0 : texts.loginText) || "Login"
445
445
  ),
446
- props.additionalButtons,
446
+ props.additionalButtons && props.additionalButtons,
447
447
  props.allowRegister && /* @__PURE__ */ React2.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ React2.createElement(
448
448
  "span",
449
449
  {
@@ -995,30 +995,54 @@ var Button = React18.forwardRef(
995
995
  children,
996
996
  labelProps,
997
997
  showHelperText = false,
998
+ inForm = false,
998
999
  ...props
999
1000
  }, ref) => {
1000
1001
  const Comp = "button";
1001
1002
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
1002
- return /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React18.createElement(
1003
- Comp,
1004
- {
1005
- className: cn(
1006
- buttonVariants({ variant, size, className }),
1007
- centered && "hawa-justify-center"
1008
- ),
1009
- ref,
1010
- ...props
1011
- },
1012
- isLoading ? /* @__PURE__ */ React18.createElement(
1013
- Loading,
1003
+ if (inForm) {
1004
+ return /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React18.createElement(
1005
+ Comp,
1014
1006
  {
1015
- design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
1016
- themeMode: variant === "outline" ? "light" : "dark",
1017
- color: loadingColor,
1018
- size: size === "sm" || size === "xs" ? "xs" : "button"
1019
- }
1020
- ) : children
1021
- ), showHelperText && /* @__PURE__ */ React18.createElement(HelperText, { helperText: props.helperText }));
1007
+ className: cn(
1008
+ buttonVariants({ variant, size, className }),
1009
+ centered && "hawa-justify-center"
1010
+ ),
1011
+ ref,
1012
+ ...props
1013
+ },
1014
+ isLoading ? /* @__PURE__ */ React18.createElement(
1015
+ Loading,
1016
+ {
1017
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
1018
+ themeMode: variant === "outline" ? "light" : "dark",
1019
+ color: loadingColor,
1020
+ size: size === "sm" || size === "xs" ? "xs" : "button"
1021
+ }
1022
+ ) : children
1023
+ ), showHelperText && /* @__PURE__ */ React18.createElement(HelperText, { helperText: props.helperText }));
1024
+ } else {
1025
+ return /* @__PURE__ */ React18.createElement(
1026
+ Comp,
1027
+ {
1028
+ className: cn(
1029
+ buttonVariants({ variant, size, className }),
1030
+ centered && "hawa-justify-center"
1031
+ ),
1032
+ ref,
1033
+ ...props
1034
+ },
1035
+ isLoading ? /* @__PURE__ */ React18.createElement(
1036
+ Loading,
1037
+ {
1038
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
1039
+ themeMode: variant === "outline" ? "light" : "dark",
1040
+ color: loadingColor,
1041
+ size: size === "sm" || size === "xs" ? "xs" : "button"
1042
+ }
1043
+ ) : children
1044
+ );
1045
+ }
1022
1046
  }
1023
1047
  );
1024
1048
  Button.displayName = "Button";
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-TMUQCNLO.mjs";
4
+ } from "../../chunk-XFSBC5VI.mjs";
5
5
  import {
6
6
  Chip,
7
7
  ScrollArea
8
- } from "../../chunk-JJMRBD3S.mjs";
8
+ } from "../../chunk-EZBHA2IL.mjs";
9
9
  import {
10
10
  Textarea
11
- } from "../../chunk-4EZL2A64.mjs";
11
+ } from "../../chunk-UJ5SXC3M.mjs";
12
12
  import {
13
13
  Select
14
- } from "../../chunk-IA5FLRFL.mjs";
14
+ } from "../../chunk-RTK6REIK.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -21,7 +21,7 @@ import {
21
21
  CardHeader,
22
22
  CardTitle,
23
23
  cn
24
- } from "../../chunk-V4SUYEVH.mjs";
24
+ } from "../../chunk-UMOBOCED.mjs";
25
25
 
26
26
  // blocks/misc/LegalTexts.tsx
27
27
  import React11 from "react";
@@ -450,30 +450,54 @@ var Button = React7.forwardRef(
450
450
  children,
451
451
  labelProps,
452
452
  showHelperText = false,
453
+ inForm = false,
453
454
  ...props
454
455
  }, ref) => {
455
456
  const Comp = "button";
456
457
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
457
- return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React7.createElement(
458
- Comp,
459
- {
460
- className: cn(
461
- buttonVariants({ variant, size, className }),
462
- centered && "hawa-justify-center"
463
- ),
464
- ref,
465
- ...props
466
- },
467
- isLoading ? /* @__PURE__ */ React7.createElement(
468
- Loading,
458
+ if (inForm) {
459
+ return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React7.createElement(
460
+ Comp,
469
461
  {
470
- design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
471
- themeMode: variant === "outline" ? "light" : "dark",
472
- color: loadingColor,
473
- size: size === "sm" || size === "xs" ? "xs" : "button"
474
- }
475
- ) : children
476
- ), showHelperText && /* @__PURE__ */ React7.createElement(HelperText, { helperText: props.helperText }));
462
+ className: cn(
463
+ buttonVariants({ variant, size, className }),
464
+ centered && "hawa-justify-center"
465
+ ),
466
+ ref,
467
+ ...props
468
+ },
469
+ isLoading ? /* @__PURE__ */ React7.createElement(
470
+ Loading,
471
+ {
472
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
473
+ themeMode: variant === "outline" ? "light" : "dark",
474
+ color: loadingColor,
475
+ size: size === "sm" || size === "xs" ? "xs" : "button"
476
+ }
477
+ ) : children
478
+ ), showHelperText && /* @__PURE__ */ React7.createElement(HelperText, { helperText: props.helperText }));
479
+ } else {
480
+ return /* @__PURE__ */ React7.createElement(
481
+ Comp,
482
+ {
483
+ className: cn(
484
+ buttonVariants({ variant, size, className }),
485
+ centered && "hawa-justify-center"
486
+ ),
487
+ ref,
488
+ ...props
489
+ },
490
+ isLoading ? /* @__PURE__ */ React7.createElement(
491
+ Loading,
492
+ {
493
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
494
+ themeMode: variant === "outline" ? "light" : "dark",
495
+ color: loadingColor,
496
+ size: size === "sm" || size === "xs" ? "xs" : "button"
497
+ }
498
+ ) : children
499
+ );
500
+ }
477
501
  }
478
502
  );
479
503
  Button.displayName = "Button";
@@ -2,22 +2,22 @@
2
2
  import {
3
3
  Chip,
4
4
  ScrollArea
5
- } from "../../chunk-JJMRBD3S.mjs";
5
+ } from "../../chunk-EZBHA2IL.mjs";
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
9
- } from "../../chunk-Q3HJI7ZE.mjs";
9
+ } from "../../chunk-WDCKXU54.mjs";
10
10
  import {
11
11
  CheckMark,
12
12
  UncheckMark
13
- } from "../../chunk-E6C3LDHD.mjs";
13
+ } from "../../chunk-IC5WYNKN.mjs";
14
14
  import {
15
15
  Button,
16
16
  Card,
17
17
  Skeleton,
18
18
  Tooltip,
19
19
  cn
20
- } from "../../chunk-V4SUYEVH.mjs";
20
+ } from "../../chunk-UMOBOCED.mjs";
21
21
 
22
22
  // blocks/pricing/PricingPlans.tsx
23
23
  import React8 from "react";
@@ -24,6 +24,10 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
24
24
  /** The small red text under the input field to show validation. */
25
25
  helperText?: any;
26
26
  showHelperText?: boolean;
27
+ /**
28
+ * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.
29
+ */
30
+ inForm?: boolean;
27
31
  }
28
32
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
33
 
@@ -24,6 +24,10 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
24
24
  /** The small red text under the input field to show validation. */
25
25
  helperText?: any;
26
26
  showHelperText?: boolean;
27
+ /**
28
+ * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.
29
+ */
30
+ inForm?: boolean;
27
31
  }
28
32
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
33
 
@@ -439,30 +439,54 @@ var Button = React5.forwardRef(
439
439
  children,
440
440
  labelProps,
441
441
  showHelperText = false,
442
+ inForm = false,
442
443
  ...props
443
444
  }, ref) => {
444
445
  const Comp = "button";
445
446
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
446
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
447
- Comp,
448
- {
449
- className: cn(
450
- buttonVariants({ variant, size, className }),
451
- centered && "hawa-justify-center"
452
- ),
453
- ref,
454
- ...props
455
- },
456
- isLoading ? /* @__PURE__ */ React5.createElement(
457
- Loading,
447
+ if (inForm) {
448
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
449
+ Comp,
458
450
  {
459
- design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
460
- themeMode: variant === "outline" ? "light" : "dark",
461
- color: loadingColor,
462
- size: size === "sm" || size === "xs" ? "xs" : "button"
463
- }
464
- ) : children
465
- ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
451
+ className: cn(
452
+ buttonVariants({ variant, size, className }),
453
+ centered && "hawa-justify-center"
454
+ ),
455
+ ref,
456
+ ...props
457
+ },
458
+ isLoading ? /* @__PURE__ */ React5.createElement(
459
+ Loading,
460
+ {
461
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
462
+ themeMode: variant === "outline" ? "light" : "dark",
463
+ color: loadingColor,
464
+ size: size === "sm" || size === "xs" ? "xs" : "button"
465
+ }
466
+ ) : children
467
+ ), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
468
+ } else {
469
+ return /* @__PURE__ */ React5.createElement(
470
+ Comp,
471
+ {
472
+ className: cn(
473
+ buttonVariants({ variant, size, className }),
474
+ centered && "hawa-justify-center"
475
+ ),
476
+ ref,
477
+ ...props
478
+ },
479
+ isLoading ? /* @__PURE__ */ React5.createElement(
480
+ Loading,
481
+ {
482
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
483
+ themeMode: variant === "outline" ? "light" : "dark",
484
+ color: loadingColor,
485
+ size: size === "sm" || size === "xs" ? "xs" : "button"
486
+ }
487
+ ) : children
488
+ );
489
+ }
466
490
  }
467
491
  );
468
492
  Button.displayName = "Button";