@sikka/hawa 0.39.0-next → 0.40.0-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 (194) hide show
  1. package/dist/{DropdownMenu-B3cTLPDi.d.mts → DropdownMenu-FVVDS2rX.d.mts} +6 -1
  2. package/dist/{DropdownMenu-BO1TNMm5.d.ts → DropdownMenu-SFJtRGAw.d.ts} +6 -1
  3. package/dist/{Radio-lgoClQrv.d.ts → Radio-DlPwVCG4.d.ts} +6 -0
  4. package/dist/{Radio-uQ7DtzcI.d.mts → Radio-Dyvlywnk.d.mts} +6 -0
  5. package/dist/alert/index.js +2 -2
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +2 -2
  8. package/dist/alert/index.mjs.map +1 -1
  9. package/dist/appLayout/index.d.mts +2 -0
  10. package/dist/appLayout/index.d.ts +2 -0
  11. package/dist/appLayout/index.js +14 -3
  12. package/dist/appLayout/index.js.map +1 -1
  13. package/dist/appLayout/index.mjs +14 -3
  14. package/dist/appLayout/index.mjs.map +1 -1
  15. package/dist/appTopbar/index.js.map +1 -1
  16. package/dist/appTopbar/index.mjs.map +1 -1
  17. package/dist/backToTop/index.js +2 -2
  18. package/dist/backToTop/index.js.map +1 -1
  19. package/dist/backToTop/index.mjs +2 -2
  20. package/dist/backToTop/index.mjs.map +1 -1
  21. package/dist/blocks/auth/index.js +2 -2
  22. package/dist/blocks/auth/index.mjs +4 -4
  23. package/dist/blocks/feedback/index.js +162 -119
  24. package/dist/blocks/feedback/index.mjs +5 -5
  25. package/dist/blocks/index.d.mts +2 -2
  26. package/dist/blocks/index.d.ts +2 -2
  27. package/dist/blocks/index.js +442 -450
  28. package/dist/blocks/index.mjs +3 -3
  29. package/dist/blocks/misc/index.js +238 -289
  30. package/dist/blocks/misc/index.mjs +147 -200
  31. package/dist/blocks/pricing/index.js +162 -119
  32. package/dist/blocks/pricing/index.mjs +4 -4
  33. package/dist/button/index.d.mts +1 -1
  34. package/dist/button/index.d.ts +1 -1
  35. package/dist/button/index.js +2 -2
  36. package/dist/button/index.js.map +1 -1
  37. package/dist/button/index.mjs +2 -2
  38. package/dist/button/index.mjs.map +1 -1
  39. package/dist/calendar/index.js +2 -2
  40. package/dist/calendar/index.js.map +1 -1
  41. package/dist/calendar/index.mjs +2 -2
  42. package/dist/calendar/index.mjs.map +1 -1
  43. package/dist/{chunk-C2IX3SUD.mjs → chunk-27G5FKOP.mjs} +1 -1
  44. package/dist/{chunk-IC5WYNKN.mjs → chunk-AJTYKC5R.mjs} +1 -1
  45. package/dist/{chunk-UMOBOCED.mjs → chunk-CTNKKP2O.mjs} +2 -2
  46. package/dist/chunk-CTZRVSTI.mjs +346 -0
  47. package/dist/{chunk-XFSBC5VI.mjs → chunk-DYPGZ2IP.mjs} +1 -1
  48. package/dist/{chunk-UJ5SXC3M.mjs → chunk-GN7EIDTE.mjs} +1 -1
  49. package/dist/{chunk-VMVZM3QQ.mjs → chunk-GU2DOJ7Q.mjs} +31 -8
  50. package/dist/{chunk-RTK6REIK.mjs → chunk-QZIENYTE.mjs} +1 -1
  51. package/dist/{chunk-EZBHA2IL.mjs → chunk-RT2Q3SH7.mjs} +1 -1
  52. package/dist/{chunk-W3CF7BSC.mjs → chunk-UBUVHGW4.mjs} +238 -248
  53. package/dist/{chunk-ZBUBNKF6.mjs → chunk-XCW5YNMS.mjs} +34 -1
  54. package/dist/codeBlock/index.js +2 -2
  55. package/dist/codeBlock/index.js.map +1 -1
  56. package/dist/codeBlock/index.mjs +2 -2
  57. package/dist/codeBlock/index.mjs.map +1 -1
  58. package/dist/combobox/index.js +1 -1
  59. package/dist/combobox/index.js.map +1 -1
  60. package/dist/combobox/index.mjs +1 -1
  61. package/dist/combobox/index.mjs.map +1 -1
  62. package/dist/command/index.js +1 -1
  63. package/dist/command/index.js.map +1 -1
  64. package/dist/command/index.mjs +1 -1
  65. package/dist/command/index.mjs.map +1 -1
  66. package/dist/commonTypes-189mW5eB.d.mts +8 -0
  67. package/dist/commonTypes-189mW5eB.d.ts +8 -0
  68. package/dist/commonTypes-DUY2LJm1.d.mts +3 -0
  69. package/dist/commonTypes-DUY2LJm1.d.ts +3 -0
  70. package/dist/commonTypes-D_7LV7Ri.d.mts +5 -0
  71. package/dist/commonTypes-D_7LV7Ri.d.ts +5 -0
  72. package/dist/dataTable/index.js +2 -2
  73. package/dist/dataTable/index.js.map +1 -1
  74. package/dist/dataTable/index.mjs +2 -2
  75. package/dist/dataTable/index.mjs.map +1 -1
  76. package/dist/datePicker/index.d.mts +1 -1
  77. package/dist/datePicker/index.d.ts +1 -1
  78. package/dist/datePicker/index.js +3 -3
  79. package/dist/datePicker/index.js.map +1 -1
  80. package/dist/datePicker/index.mjs +3 -3
  81. package/dist/datePicker/index.mjs.map +1 -1
  82. package/dist/dialog/index.js +1 -1
  83. package/dist/dialog/index.js.map +1 -1
  84. package/dist/dialog/index.mjs +1 -1
  85. package/dist/dialog/index.mjs.map +1 -1
  86. package/dist/docsLayout/index.js +2 -2
  87. package/dist/docsLayout/index.js.map +1 -1
  88. package/dist/docsLayout/index.mjs +2 -2
  89. package/dist/docsLayout/index.mjs.map +1 -1
  90. package/dist/dropdownMenu/index.d.mts +6 -1
  91. package/dist/dropdownMenu/index.d.ts +6 -1
  92. package/dist/dropdownMenu/index.js +29 -6
  93. package/dist/dropdownMenu/index.js.map +1 -1
  94. package/dist/dropdownMenu/index.mjs +29 -6
  95. package/dist/dropdownMenu/index.mjs.map +1 -1
  96. package/dist/elements/index.d.mts +7 -5
  97. package/dist/elements/index.d.ts +7 -5
  98. package/dist/elements/index.js +546 -531
  99. package/dist/elements/index.mjs +5 -5
  100. package/dist/fileDropzone/index.d.mts +2 -2
  101. package/dist/fileDropzone/index.d.ts +2 -2
  102. package/dist/fileDropzone/index.js +2 -2
  103. package/dist/fileDropzone/index.js.map +1 -1
  104. package/dist/fileDropzone/index.mjs +2 -2
  105. package/dist/fileDropzone/index.mjs.map +1 -1
  106. package/dist/fileUploader/index.d.mts +2 -2
  107. package/dist/fileUploader/index.d.ts +2 -2
  108. package/dist/glow/index.d.mts +3 -3
  109. package/dist/glow/index.d.ts +3 -3
  110. package/dist/hooks/index.d.mts +8 -1
  111. package/dist/hooks/index.d.ts +8 -1
  112. package/dist/hooks/index.js +35 -0
  113. package/dist/hooks/index.mjs +5 -1
  114. package/dist/index.css +0 -91
  115. package/dist/index.d.mts +26 -4
  116. package/dist/index.d.ts +26 -4
  117. package/dist/index.js +1020 -959
  118. package/dist/index.mjs +971 -912
  119. package/dist/input/index.d.mts +2 -9
  120. package/dist/input/index.d.ts +2 -9
  121. package/dist/interfaceSettings/index.js +160 -117
  122. package/dist/interfaceSettings/index.js.map +1 -1
  123. package/dist/interfaceSettings/index.mjs +160 -117
  124. package/dist/interfaceSettings/index.mjs.map +1 -1
  125. package/dist/label/index.d.mts +1 -2
  126. package/dist/label/index.d.ts +1 -2
  127. package/dist/layout/index.d.mts +3 -1
  128. package/dist/layout/index.d.ts +3 -1
  129. package/dist/layout/index.js +14 -3
  130. package/dist/layout/index.mjs +14 -3
  131. package/dist/navigationMenu/index.d.mts +2 -1
  132. package/dist/navigationMenu/index.d.ts +2 -1
  133. package/dist/pagination/index.d.mts +1 -1
  134. package/dist/pagination/index.d.ts +1 -1
  135. package/dist/phoneInput/index.d.mts +1 -1
  136. package/dist/phoneInput/index.d.ts +1 -1
  137. package/dist/progress/index.d.mts +8 -1
  138. package/dist/progress/index.d.ts +8 -1
  139. package/dist/radio/index.d.mts +15 -1
  140. package/dist/radio/index.d.ts +15 -1
  141. package/dist/radio/index.js +160 -117
  142. package/dist/radio/index.js.map +1 -1
  143. package/dist/radio/index.mjs +160 -117
  144. package/dist/radio/index.mjs.map +1 -1
  145. package/dist/scrollArea/index.d.mts +1 -1
  146. package/dist/scrollArea/index.d.ts +1 -1
  147. package/dist/separator/index.d.mts +1 -1
  148. package/dist/separator/index.d.ts +1 -1
  149. package/dist/signature/index.d.mts +1 -2
  150. package/dist/signature/index.d.ts +1 -2
  151. package/dist/simpleTable/index.d.mts +1 -1
  152. package/dist/simpleTable/index.d.ts +1 -1
  153. package/dist/sonner/index.d.mts +1 -1
  154. package/dist/sonner/index.d.ts +1 -1
  155. package/dist/sortButton/index.js +2 -2
  156. package/dist/sortButton/index.js.map +1 -1
  157. package/dist/sortButton/index.mjs +2 -2
  158. package/dist/sortButton/index.mjs.map +1 -1
  159. package/dist/splitButton/index.d.mts +3 -9
  160. package/dist/splitButton/index.d.ts +3 -9
  161. package/dist/splitButton/index.js +2 -2
  162. package/dist/splitButton/index.js.map +1 -1
  163. package/dist/splitButton/index.mjs +2 -2
  164. package/dist/splitButton/index.mjs.map +1 -1
  165. package/dist/switch/index.d.mts +1 -1
  166. package/dist/switch/index.d.ts +1 -1
  167. package/dist/tabs/index.d.mts +4 -2
  168. package/dist/tabs/index.d.ts +4 -2
  169. package/dist/tabs/index.js +123 -174
  170. package/dist/tabs/index.js.map +1 -1
  171. package/dist/tabs/index.mjs +118 -169
  172. package/dist/tabs/index.mjs.map +1 -1
  173. package/dist/textarea/index.d.mts +1 -1
  174. package/dist/textarea/index.d.ts +1 -1
  175. package/dist/toast/index.d.mts +1 -1
  176. package/dist/toast/index.d.ts +1 -1
  177. package/dist/toaster/index.d.mts +4 -22
  178. package/dist/toaster/index.d.ts +4 -22
  179. package/dist/tooltip/index.d.mts +4 -3
  180. package/dist/tooltip/index.d.ts +4 -3
  181. package/package.json +1 -1
  182. package/dist/Label-UbMDLtJF.d.mts +0 -14
  183. package/dist/Label-UbMDLtJF.d.ts +0 -14
  184. package/dist/chunk-WDCKXU54.mjs +0 -303
  185. package/dist/commonTypes-CgDwjGvU.d.mts +0 -5
  186. package/dist/commonTypes-CgDwjGvU.d.ts +0 -5
  187. package/dist/commonTypes-DZdITB5m.d.mts +0 -4
  188. package/dist/commonTypes-DZdITB5m.d.ts +0 -4
  189. package/dist/floatBox/index.d.mts +0 -15
  190. package/dist/floatBox/index.d.ts +0 -15
  191. package/dist/floatBox/index.js +0 -105
  192. package/dist/floatBox/index.js.map +0 -1
  193. package/dist/floatBox/index.mjs +0 -69
  194. package/dist/floatBox/index.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
- useMeasureDirty
4
- } from "./chunk-ZBUBNKF6.mjs";
3
+ useViewportSize
4
+ } from "./chunk-XCW5YNMS.mjs";
5
5
  import {
6
6
  Button,
7
7
  Chip,
@@ -9,7 +9,7 @@ import {
9
9
  Label,
10
10
  Skeleton,
11
11
  cn
12
- } from "./chunk-VMVZM3QQ.mjs";
12
+ } from "./chunk-GU2DOJ7Q.mjs";
13
13
 
14
14
  // elements/alert/Alert.tsx
15
15
  import React, { useRef, useState, useEffect } from "react";
@@ -2611,6 +2611,7 @@ var Radio = forwardRef7(
2611
2611
  tabsContainerClassName,
2612
2612
  forceHideHelperText = false,
2613
2613
  onChange,
2614
+ containerClassNames,
2614
2615
  ...props
2615
2616
  }, ref) => {
2616
2617
  var _a, _b, _c;
@@ -2666,161 +2667,203 @@ var Radio = forwardRef7(
2666
2667
  ];
2667
2668
  switch (design) {
2668
2669
  case "tabs":
2669
- return /* @__PURE__ */ React9.createElement("div", { className: "hawa-gap-2 hawa-flex hawa-flex-col" }, props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React9.createElement(
2670
- "ul",
2670
+ return /* @__PURE__ */ React9.createElement(
2671
+ "div",
2671
2672
  {
2672
- ref: parentRef,
2673
2673
  className: cn(
2674
- props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
2675
- "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
2676
- orientationStyle[orientation],
2677
- widthStyle[width],
2678
- tabsContainerClassName
2674
+ "hawa-gap-2 hawa-flex hawa-flex-col",
2675
+ containerClassNames == null ? void 0 : containerClassNames.tabs
2679
2676
  )
2680
2677
  },
2681
- (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
2682
- return opt.tooltip ? /* @__PURE__ */ React9.createElement(
2683
- PopoverRoot,
2684
- {
2685
- key: o,
2686
- open: o === openTooltip,
2687
- onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
2688
- },
2689
- /* @__PURE__ */ React9.createElement(
2690
- PopoverTrigger,
2678
+ props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label),
2679
+ /* @__PURE__ */ React9.createElement(
2680
+ "ul",
2681
+ {
2682
+ ref: parentRef,
2683
+ className: cn(
2684
+ props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
2685
+ "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
2686
+ orientationStyle[orientation],
2687
+ widthStyle[width],
2688
+ tabsContainerClassName
2689
+ )
2690
+ },
2691
+ (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
2692
+ return opt.tooltip ? /* @__PURE__ */ React9.createElement(
2693
+ PopoverRoot,
2691
2694
  {
2692
- onMouseEnter: () => setOpenTooltip(o),
2693
- onMouseLeave: () => setOpenTooltip(null),
2694
- asChild: true
2695
+ key: o,
2696
+ open: o === openTooltip,
2697
+ onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
2695
2698
  },
2696
2699
  /* @__PURE__ */ React9.createElement(
2697
- "li",
2700
+ PopoverTrigger,
2698
2701
  {
2699
- "aria-current": "page",
2700
- onClick: () => {
2701
- if (props.disabled || opt.disabled)
2702
- return;
2703
- handleChange(opt);
2702
+ onMouseEnter: () => setOpenTooltip(o),
2703
+ onMouseLeave: () => setOpenTooltip(null),
2704
+ asChild: true
2705
+ },
2706
+ /* @__PURE__ */ React9.createElement(
2707
+ "li",
2708
+ {
2709
+ "aria-current": "page",
2710
+ onClick: () => {
2711
+ if (props.disabled || opt.disabled)
2712
+ return;
2713
+ handleChange(opt);
2714
+ },
2715
+ className: cn(
2716
+ ...radio_option_tabs_styling,
2717
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
2718
+ )
2704
2719
  },
2705
- className: cn(
2706
- ...radio_option_tabs_styling,
2707
- selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
2708
- )
2720
+ opt.icon && opt.icon,
2721
+ opt.label
2722
+ )
2723
+ ),
2724
+ /* @__PURE__ */ React9.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
2725
+ ) : /* @__PURE__ */ React9.createElement(
2726
+ "li",
2727
+ {
2728
+ key: o,
2729
+ "aria-current": "page",
2730
+ onClick: () => {
2731
+ if (props.disabled || opt.disabled)
2732
+ return;
2733
+ handleChange(opt);
2709
2734
  },
2710
- opt.icon && opt.icon,
2711
- opt.label
2712
- )
2735
+ className: cn(
2736
+ ...radio_option_tabs_styling,
2737
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
2738
+ )
2739
+ },
2740
+ opt.icon && opt.icon,
2741
+ opt.label
2742
+ );
2743
+ })
2744
+ ),
2745
+ !forceHideHelperText && /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText })
2746
+ );
2747
+ case "bordered":
2748
+ return /* @__PURE__ */ React9.createElement(
2749
+ "div",
2750
+ {
2751
+ className: cn(
2752
+ orientationStyle[orientation],
2753
+ "hawa-gap-4",
2754
+ containerClassNames == null ? void 0 : containerClassNames.bordered
2755
+ )
2756
+ },
2757
+ props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React9.createElement(
2758
+ "div",
2759
+ {
2760
+ className: cn(
2761
+ "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
2762
+ props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
2713
2763
  ),
2714
- /* @__PURE__ */ React9.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
2715
- ) : /* @__PURE__ */ React9.createElement(
2716
- "li",
2764
+ key: i + 1
2765
+ },
2766
+ /* @__PURE__ */ React9.createElement(
2767
+ "input",
2717
2768
  {
2718
- key: o,
2719
- "aria-current": "page",
2720
- onClick: () => {
2721
- if (props.disabled || opt.disabled)
2722
- return;
2723
- handleChange(opt);
2724
- },
2769
+ disabled: opt.disabled,
2770
+ id: opt.value.toString(),
2771
+ type: "radio",
2772
+ value: opt.value,
2773
+ name,
2774
+ onChange: () => handleChange(opt)
2775
+ }
2776
+ ),
2777
+ /* @__PURE__ */ React9.createElement(
2778
+ "label",
2779
+ {
2780
+ htmlFor: opt.value.toString(),
2725
2781
  className: cn(
2726
- ...radio_option_tabs_styling,
2727
- selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
2782
+ "hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white",
2783
+ opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
2728
2784
  )
2729
2785
  },
2730
- opt.icon && opt.icon,
2731
2786
  opt.label
2732
- );
2733
- })
2734
- ), !forceHideHelperText && /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText }));
2735
- case "bordered":
2736
- return /* @__PURE__ */ React9.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React9.createElement(
2737
- "div",
2787
+ )
2788
+ )))
2789
+ );
2790
+ case "cards":
2791
+ return /* @__PURE__ */ React9.createElement(
2792
+ "ul",
2738
2793
  {
2739
2794
  className: cn(
2740
- "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
2741
- props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
2742
- ),
2743
- key: i + 1
2795
+ orientationStyle[orientation],
2796
+ "hawa-gap-4",
2797
+ containerClassNames == null ? void 0 : containerClassNames.cards
2798
+ )
2744
2799
  },
2745
- /* @__PURE__ */ React9.createElement(
2800
+ (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React9.createElement(
2746
2801
  "input",
2747
2802
  {
2748
- disabled: opt.disabled,
2749
- id: opt.value.toString(),
2750
2803
  type: "radio",
2751
- value: opt.value,
2804
+ id: opt.value.toString(),
2752
2805
  name,
2753
- onChange: () => handleChange(opt)
2806
+ value: opt.value.toString(),
2807
+ className: "hawa-peer hawa-hidden",
2808
+ required: true,
2809
+ disabled: opt.disabled
2754
2810
  }
2755
- ),
2756
- /* @__PURE__ */ React9.createElement(
2811
+ ), /* @__PURE__ */ React9.createElement(
2757
2812
  "label",
2758
2813
  {
2759
2814
  htmlFor: opt.value.toString(),
2760
2815
  className: cn(
2761
- "hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white",
2762
- opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
2816
+ "hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
2817
+ opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
2763
2818
  )
2764
2819
  },
2765
- opt.label
2766
- )
2767
- ))));
2768
- case "cards":
2769
- 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(
2770
- "input",
2771
- {
2772
- type: "radio",
2773
- id: opt.value.toString(),
2774
- name,
2775
- value: opt.value.toString(),
2776
- className: "hawa-peer hawa-hidden",
2777
- required: true,
2778
- disabled: opt.disabled
2779
- }
2780
- ), /* @__PURE__ */ React9.createElement(
2781
- "label",
2782
- {
2783
- htmlFor: opt.value.toString(),
2784
- className: cn(
2785
- "hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
2786
- opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
2787
- )
2788
- },
2789
- /* @__PURE__ */ React9.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
2790
- ))));
2820
+ /* @__PURE__ */ React9.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
2821
+ )))
2822
+ );
2791
2823
  default:
2792
- return /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React9.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement(
2824
+ return /* @__PURE__ */ React9.createElement(
2793
2825
  "div",
2794
2826
  {
2795
2827
  className: cn(
2796
- "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
2797
- props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
2798
- ),
2799
- key: i + 1
2828
+ "hawa-flex hawa-flex-col hawa-gap-2",
2829
+ containerClassNames == null ? void 0 : containerClassNames.default
2830
+ )
2800
2831
  },
2801
- /* @__PURE__ */ React9.createElement(
2802
- "input",
2832
+ props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label),
2833
+ /* @__PURE__ */ React9.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement(
2834
+ "div",
2803
2835
  {
2804
- disabled: opt.disabled,
2805
- id: opt.value.toString(),
2806
- type: "radio",
2807
- value: opt.value,
2808
- name,
2809
- onChange: () => handleChange(opt)
2810
- }
2811
- ),
2812
- /* @__PURE__ */ React9.createElement(
2813
- "label",
2814
- {
2815
- htmlFor: opt.value.toString(),
2816
2836
  className: cn(
2817
- "hawa-text-sm hawa-font-medium dark:hawa-text-white",
2818
- opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
2819
- )
2837
+ "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
2838
+ props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
2839
+ ),
2840
+ key: i + 1
2820
2841
  },
2821
- opt.label
2822
- )
2823
- ))), /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText }));
2842
+ /* @__PURE__ */ React9.createElement(
2843
+ "input",
2844
+ {
2845
+ disabled: opt.disabled,
2846
+ id: opt.value.toString(),
2847
+ type: "radio",
2848
+ value: opt.value,
2849
+ name,
2850
+ onChange: () => handleChange(opt)
2851
+ }
2852
+ ),
2853
+ /* @__PURE__ */ React9.createElement(
2854
+ "label",
2855
+ {
2856
+ htmlFor: opt.value.toString(),
2857
+ className: cn(
2858
+ "hawa-text-sm hawa-font-medium dark:hawa-text-white",
2859
+ opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
2860
+ )
2861
+ },
2862
+ opt.label
2863
+ )
2864
+ ))),
2865
+ /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText })
2866
+ );
2824
2867
  }
2825
2868
  }
2826
2869
  );
@@ -2998,66 +3041,10 @@ var ScrollBar = React11.forwardRef(({ className, orientation = "vertical", ...pr
2998
3041
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2999
3042
 
3000
3043
  // elements/tabs/Tabs.tsx
3001
- import * as React13 from "react";
3044
+ import * as React12 from "react";
3045
+ import * as Popover2 from "@radix-ui/react-popover";
3002
3046
  import * as TabsPrimitive from "@radix-ui/react-tabs";
3003
3047
  import { tv } from "tailwind-variants";
3004
-
3005
- // elements/floatBox/FloatBox.tsx
3006
- import * as React12 from "react";
3007
- var FloatBox = ({
3008
- className,
3009
- open,
3010
- side = "bottom",
3011
- sideOffset = 40,
3012
- align = "center",
3013
- withArrow = false,
3014
- ...props
3015
- }) => {
3016
- let stylesMap = {
3017
- bottom: {
3018
- start: { top: sideOffset, insetInlineStart: 0 },
3019
- center: { top: sideOffset },
3020
- end: { top: sideOffset, insetInlineEnd: 0 }
3021
- },
3022
- top: {
3023
- start: { bottom: sideOffset, insetInlineStart: 0 },
3024
- center: { bottom: sideOffset },
3025
- end: { bottom: sideOffset, insetInlineEnd: 0 }
3026
- },
3027
- right: {
3028
- start: { left: sideOffset, top: -5 },
3029
- center: { left: sideOffset },
3030
- end: { left: sideOffset, bottom: 0 }
3031
- },
3032
- left: {
3033
- start: { right: sideOffset, top: 0 },
3034
- center: { right: sideOffset },
3035
- end: { right: sideOffset, bottom: 0 }
3036
- }
3037
- };
3038
- const arrowDirection = {
3039
- top: "hawa-arrow-default-bottom",
3040
- bottom: "hawa-arrow-default-top",
3041
- right: "hawa-arrow-default-left",
3042
- left: "hawa-arrow-default-right"
3043
- };
3044
- return /* @__PURE__ */ React12.createElement(
3045
- "div",
3046
- {
3047
- className: cn(
3048
- "data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2 hawa-bg-popover",
3049
- className
3050
- ),
3051
- style: { ...stylesMap[side][align] },
3052
- "data-side": side,
3053
- "data-floatbox-state": open ? "open" : "closed"
3054
- },
3055
- withArrow && /* @__PURE__ */ React12.createElement("div", { className: cn(arrowDirection[side]) }),
3056
- /* @__PURE__ */ React12.createElement("span", null, props.children)
3057
- );
3058
- };
3059
-
3060
- // elements/tabs/Tabs.tsx
3061
3048
  var tabsListVariant = tv({
3062
3049
  base: "",
3063
3050
  variants: {
@@ -3116,39 +3103,27 @@ var tabsTriggerVariant = tv({
3116
3103
  ],
3117
3104
  defaultVariants: { variant: "default", orientation: "horizontal" }
3118
3105
  });
3119
- var TabsContext = React13.createContext({ orientation: "horizontal", variant: "default" });
3120
- var Tabs = React13.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React13.createElement(
3121
- TabsPrimitive.Root,
3122
- {
3123
- ref,
3124
- className: cn(
3125
- "hawa-flex hawa-gap-2",
3126
- orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
3127
- className
3128
- ),
3129
- ...props
3130
- },
3131
- /* @__PURE__ */ React13.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
3132
- ));
3133
- var TabsList = React13.forwardRef(({ className, classNames, ...props }, ref) => {
3134
- const { orientation, variant } = React13.useContext(TabsContext);
3135
- const [size, setSize] = React13.useState(
3136
- typeof window !== "undefined" && window.innerWidth || 1200
3137
- );
3138
- React13.useEffect(() => {
3139
- if (typeof window !== "undefined") {
3140
- const resize = () => {
3141
- setSize(window.innerWidth);
3142
- };
3143
- resize();
3144
- window.addEventListener("resize", resize);
3145
- return () => {
3146
- window.removeEventListener("resize", resize);
3147
- };
3148
- }
3149
- }, []);
3150
- if (props.scrollable && size < 768 && orientation === "horizontal") {
3151
- return /* @__PURE__ */ React13.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React13.createElement(
3106
+ var TabsContext = React12.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
3107
+ var Tabs = React12.forwardRef(
3108
+ ({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React12.createElement(
3109
+ TabsPrimitive.Root,
3110
+ {
3111
+ ref,
3112
+ className: cn(
3113
+ "hawa-flex hawa-gap-2",
3114
+ orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
3115
+ className
3116
+ ),
3117
+ ...props
3118
+ },
3119
+ /* @__PURE__ */ React12.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
3120
+ )
3121
+ );
3122
+ var TabsList = React12.forwardRef(({ className, classNames, ...props }, ref) => {
3123
+ const { orientation, variant, scrollable } = React12.useContext(TabsContext);
3124
+ const { width } = useViewportSize();
3125
+ if (scrollable && width < 768 && orientation === "horizontal") {
3126
+ return /* @__PURE__ */ React12.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React12.createElement(
3152
3127
  TabsPrimitive.List,
3153
3128
  {
3154
3129
  ref,
@@ -3161,7 +3136,7 @@ var TabsList = React13.forwardRef(({ className, classNames, ...props }, ref) =>
3161
3136
  }
3162
3137
  ));
3163
3138
  } else {
3164
- return /* @__PURE__ */ React13.createElement(
3139
+ return /* @__PURE__ */ React12.createElement(
3165
3140
  TabsPrimitive.List,
3166
3141
  {
3167
3142
  ref,
@@ -3176,37 +3151,52 @@ var TabsList = React13.forwardRef(({ className, classNames, ...props }, ref) =>
3176
3151
  );
3177
3152
  }
3178
3153
  });
3179
- var TabsTrigger = React13.forwardRef(({ className, chipProps, ...props }, ref) => {
3180
- const { orientation, variant } = React13.useContext(TabsContext);
3181
- const tabTriggerRef = React13.useRef(null);
3182
- const { width } = useMeasureDirty(tabTriggerRef);
3183
- return /* @__PURE__ */ React13.createElement(
3184
- TabsPrimitive.Trigger,
3185
- {
3186
- ref: tabTriggerRef,
3187
- className: cn(
3188
- tabsTriggerVariant({ variant, orientation }),
3189
- "hawa-relative",
3190
- className
3191
- ),
3192
- ...props
3193
- },
3194
- props.children,
3195
- chipProps && /* @__PURE__ */ React13.createElement(Chip, { ...chipProps }),
3196
- /* @__PURE__ */ React13.createElement(
3197
- FloatBox,
3198
- {
3199
- withArrow: true,
3200
- align: orientation === "vertical" ? "start" : "start",
3201
- side: orientation === "vertical" ? "right" : "bottom",
3202
- sideOffset: orientation === "vertical" ? width + 30 : 45,
3203
- open: props.showPopover
3204
- },
3205
- props.popoverContent
3206
- )
3207
- );
3208
- });
3209
- var TabsContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
3154
+ var TabsTrigger = React12.forwardRef(
3155
+ ({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
3156
+ const { orientation, variant } = React12.useContext(TabsContext);
3157
+ if (withPopover) {
3158
+ return /* @__PURE__ */ React12.createElement(Popover2.Root, { open: props.showPopover }, /* @__PURE__ */ React12.createElement(Popover2.Anchor, { asChild: true }, /* @__PURE__ */ React12.createElement(
3159
+ TabsPrimitive.Trigger,
3160
+ {
3161
+ className: cn(
3162
+ tabsTriggerVariant({ variant, orientation }),
3163
+ "hawa-relative",
3164
+ className
3165
+ ),
3166
+ ...props
3167
+ },
3168
+ props.children,
3169
+ chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps })
3170
+ )), /* @__PURE__ */ React12.createElement(
3171
+ Popover2.Content,
3172
+ {
3173
+ onClick: onPopoverClick,
3174
+ asChild: true,
3175
+ className: cn(
3176
+ "dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
3177
+ "hawa-arrow-default-top hawa-mt-2"
3178
+ )
3179
+ },
3180
+ /* @__PURE__ */ React12.createElement("div", { className: "hawa-p-2" }, " ", props.popoverContent)
3181
+ ));
3182
+ } else {
3183
+ return /* @__PURE__ */ React12.createElement(
3184
+ TabsPrimitive.Trigger,
3185
+ {
3186
+ className: cn(
3187
+ tabsTriggerVariant({ variant, orientation }),
3188
+ "hawa-relative",
3189
+ className
3190
+ ),
3191
+ ...props
3192
+ },
3193
+ props.children,
3194
+ chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps })
3195
+ );
3196
+ }
3197
+ }
3198
+ );
3199
+ var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
3210
3200
  TabsPrimitive.Content,
3211
3201
  {
3212
3202
  ref,
@@ -3223,12 +3213,12 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
3223
3213
  TabsContent.displayName = TabsPrimitive.Content.displayName;
3224
3214
 
3225
3215
  // elements/separator/Separator.tsx
3226
- import * as React14 from "react";
3216
+ import * as React13 from "react";
3227
3217
  var Separator = ({
3228
3218
  className,
3229
3219
  orientation = "horizontal",
3230
3220
  ...props
3231
- }) => /* @__PURE__ */ React14.createElement(
3221
+ }) => /* @__PURE__ */ React13.createElement(
3232
3222
  "div",
3233
3223
  {
3234
3224
  className: cn(
@@ -3241,9 +3231,9 @@ var Separator = ({
3241
3231
  );
3242
3232
 
3243
3233
  // elements/progress/Progress.tsx
3244
- import * as React15 from "react";
3234
+ import * as React14 from "react";
3245
3235
  import * as ProgressPrimitive from "@radix-ui/react-progress";
3246
- var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React15.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React15.createElement(Label, { ...props.labelProps }, props.label), /* @__PURE__ */ React15.createElement(
3236
+ var Progress = React14.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React14.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React14.createElement(Label, { ...props.labelProps }, props.label), /* @__PURE__ */ React14.createElement(
3247
3237
  ProgressPrimitive.Root,
3248
3238
  {
3249
3239
  ref,
@@ -3253,7 +3243,7 @@ var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @_
3253
3243
  ),
3254
3244
  ...props
3255
3245
  },
3256
- /* @__PURE__ */ React15.createElement(
3246
+ /* @__PURE__ */ React14.createElement(
3257
3247
  ProgressPrimitive.Indicator,
3258
3248
  {
3259
3249
  className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
@@ -483,6 +483,37 @@ function useShortcuts(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], t
483
483
  }, [hotkeys]);
484
484
  }
485
485
 
486
+ // hooks/useWindowEvent.ts
487
+ import { useEffect as useEffect14 } from "react";
488
+ function useWindowEvent(type, listener, options) {
489
+ useEffect14(() => {
490
+ window.addEventListener(type, listener, options);
491
+ return () => window.removeEventListener(type, listener, options);
492
+ }, [type, listener]);
493
+ }
494
+
495
+ // hooks/useViewportSize.ts
496
+ import { useCallback, useEffect as useEffect15, useState as useState15 } from "react";
497
+ var eventListerOptions = {
498
+ passive: true
499
+ };
500
+ function useViewportSize() {
501
+ const [windowSize, setWindowSize] = useState15({
502
+ width: 0,
503
+ height: 0
504
+ });
505
+ const setSize = useCallback(() => {
506
+ setWindowSize({
507
+ width: window.innerWidth || 0,
508
+ height: window.innerHeight || 0
509
+ });
510
+ }, []);
511
+ useWindowEvent("resize", setSize, eventListerOptions);
512
+ useWindowEvent("orientationchange", setSize, eventListerOptions);
513
+ useEffect15(setSize, []);
514
+ return windowSize;
515
+ }
516
+
486
517
  export {
487
518
  useIsomorphicEffect,
488
519
  reducer,
@@ -499,5 +530,7 @@ export {
499
530
  parseHotkey,
500
531
  getHotkeyMatcher,
501
532
  getHotkeyHandler,
502
- useShortcuts
533
+ useShortcuts,
534
+ useWindowEvent,
535
+ useViewportSize
503
536
  };