@sikka/hawa 0.48.0-next → 0.49.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 (303) hide show
  1. package/dist/accordion/index.js +3 -28
  2. package/dist/accordion/index.js.map +1 -1
  3. package/dist/accordion/index.mjs +3 -28
  4. package/dist/accordion/index.mjs.map +1 -1
  5. package/dist/alert/index.js +53 -98
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +53 -98
  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 +263 -409
  12. package/dist/appLayout/index.js.map +1 -1
  13. package/dist/appLayout/index.mjs +263 -409
  14. package/dist/appLayout/index.mjs.map +1 -1
  15. package/dist/appMenubar/index.js +15 -20
  16. package/dist/appMenubar/index.js.map +1 -1
  17. package/dist/appMenubar/index.mjs +15 -20
  18. package/dist/appMenubar/index.mjs.map +1 -1
  19. package/dist/appTabs/index.js +28 -37
  20. package/dist/appTabs/index.js.map +1 -1
  21. package/dist/appTabs/index.mjs +28 -37
  22. package/dist/appTabs/index.mjs.map +1 -1
  23. package/dist/appTopbar/index.js +125 -173
  24. package/dist/appTopbar/index.js.map +1 -1
  25. package/dist/appTopbar/index.mjs +125 -173
  26. package/dist/appTopbar/index.mjs.map +1 -1
  27. package/dist/avatar/index.js.map +1 -1
  28. package/dist/avatar/index.mjs.map +1 -1
  29. package/dist/backToTop/index.js +50 -82
  30. package/dist/backToTop/index.js.map +1 -1
  31. package/dist/backToTop/index.mjs +50 -82
  32. package/dist/backToTop/index.mjs.map +1 -1
  33. package/dist/badge/index.d.mts +1 -1
  34. package/dist/badge/index.d.ts +1 -1
  35. package/dist/badge/index.js +2 -18
  36. package/dist/badge/index.js.map +1 -1
  37. package/dist/badge/index.mjs +2 -18
  38. package/dist/badge/index.mjs.map +1 -1
  39. package/dist/blocks/auth/index.d.mts +1 -0
  40. package/dist/blocks/auth/index.d.ts +1 -0
  41. package/dist/blocks/auth/index.js +539 -792
  42. package/dist/blocks/auth/index.mjs +433 -604
  43. package/dist/blocks/feedback/index.js +214 -375
  44. package/dist/blocks/feedback/index.mjs +12 -25
  45. package/dist/blocks/index.d.mts +1 -0
  46. package/dist/blocks/index.d.ts +1 -0
  47. package/dist/blocks/index.js +940 -1445
  48. package/dist/blocks/index.mjs +469 -615
  49. package/dist/blocks/misc/index.js +136 -251
  50. package/dist/blocks/misc/index.mjs +29 -54
  51. package/dist/blocks/pricing/index.js +220 -397
  52. package/dist/blocks/pricing/index.mjs +63 -134
  53. package/dist/breadcrumb/index.js +1 -5
  54. package/dist/breadcrumb/index.js.map +1 -1
  55. package/dist/breadcrumb/index.mjs +1 -5
  56. package/dist/breadcrumb/index.mjs.map +1 -1
  57. package/dist/button/index.js +50 -82
  58. package/dist/button/index.js.map +1 -1
  59. package/dist/button/index.mjs +50 -82
  60. package/dist/button/index.mjs.map +1 -1
  61. package/dist/calendar/index.js +50 -82
  62. package/dist/calendar/index.js.map +1 -1
  63. package/dist/calendar/index.mjs +50 -82
  64. package/dist/calendar/index.mjs.map +1 -1
  65. package/dist/card/index.js +7 -35
  66. package/dist/card/index.js.map +1 -1
  67. package/dist/card/index.mjs +7 -35
  68. package/dist/card/index.mjs.map +1 -1
  69. package/dist/carousel/index.js +15 -27
  70. package/dist/carousel/index.js.map +1 -1
  71. package/dist/carousel/index.mjs +15 -27
  72. package/dist/carousel/index.mjs.map +1 -1
  73. package/dist/checkbox/index.js +2 -13
  74. package/dist/checkbox/index.js.map +1 -1
  75. package/dist/checkbox/index.mjs +2 -13
  76. package/dist/checkbox/index.mjs.map +1 -1
  77. package/dist/chip/index.js +2 -16
  78. package/dist/chip/index.js.map +1 -1
  79. package/dist/chip/index.mjs +2 -16
  80. package/dist/chip/index.mjs.map +1 -1
  81. package/dist/{chunk-WUMDFBEK.mjs → chunk-3CHFVHTW.mjs} +43 -54
  82. package/dist/{chunk-2LUXOXAL.mjs → chunk-5SQBJRWE.mjs} +3 -9
  83. package/dist/{chunk-C2UOOH4X.mjs → chunk-B53SP2WZ.mjs} +3 -17
  84. package/dist/chunk-GHGWQVTM.mjs +150 -0
  85. package/dist/{chunk-5S5DR7KF.mjs → chunk-I23ONEDJ.mjs} +2 -10
  86. package/dist/{chunk-JFWD2ICY.mjs → chunk-JT7R3L5O.mjs} +54 -62
  87. package/dist/{chunk-6SJUUJOV.mjs → chunk-KDGJZPWK.mjs} +295 -574
  88. package/dist/{chunk-AWJSHOYU.mjs → chunk-KSJGXQTE.mjs} +1 -1
  89. package/dist/{chunk-NMW4GM4G.mjs → chunk-SE2JMXYG.mjs} +104 -144
  90. package/dist/{chunk-GBLWUEYN.mjs → chunk-ULRL4WI6.mjs} +176 -256
  91. package/dist/{chunk-IFWYR5W2.mjs → chunk-VUELRPUL.mjs} +57 -117
  92. package/dist/{chunk-WL7C2A5D.mjs → chunk-WQR4XZGL.mjs} +8 -15
  93. package/dist/codeBlock/index.js +50 -82
  94. package/dist/codeBlock/index.js.map +1 -1
  95. package/dist/codeBlock/index.mjs +50 -82
  96. package/dist/codeBlock/index.mjs.map +1 -1
  97. package/dist/colorPicker/index.js +21 -33
  98. package/dist/colorPicker/index.js.map +1 -1
  99. package/dist/colorPicker/index.mjs +22 -37
  100. package/dist/colorPicker/index.mjs.map +1 -1
  101. package/dist/combobox/index.d.mts +1 -1
  102. package/dist/combobox/index.d.ts +1 -1
  103. package/dist/combobox/index.js +141 -223
  104. package/dist/combobox/index.js.map +1 -1
  105. package/dist/combobox/index.mjs +141 -223
  106. package/dist/combobox/index.mjs.map +1 -1
  107. package/dist/command/index.d.mts +1 -1
  108. package/dist/command/index.d.ts +1 -1
  109. package/dist/command/index.js +129 -212
  110. package/dist/command/index.js.map +1 -1
  111. package/dist/command/index.mjs +129 -212
  112. package/dist/command/index.mjs.map +1 -1
  113. package/dist/dataTable/index.js +254 -394
  114. package/dist/dataTable/index.js.map +1 -1
  115. package/dist/dataTable/index.mjs +254 -394
  116. package/dist/dataTable/index.mjs.map +1 -1
  117. package/dist/datePicker/index.js +64 -105
  118. package/dist/datePicker/index.js.map +1 -1
  119. package/dist/datePicker/index.mjs +64 -105
  120. package/dist/datePicker/index.mjs.map +1 -1
  121. package/dist/destroyableCard/index.js +8 -39
  122. package/dist/destroyableCard/index.js.map +1 -1
  123. package/dist/destroyableCard/index.mjs +8 -39
  124. package/dist/destroyableCard/index.mjs.map +1 -1
  125. package/dist/dialog/index.js +70 -122
  126. package/dist/dialog/index.js.map +1 -1
  127. package/dist/dialog/index.mjs +70 -122
  128. package/dist/dialog/index.mjs.map +1 -1
  129. package/dist/docsLayout/index.js +169 -358
  130. package/dist/docsLayout/index.js.map +1 -1
  131. package/dist/docsLayout/index.mjs +169 -358
  132. package/dist/docsLayout/index.mjs.map +1 -1
  133. package/dist/docsSidebar/index.js +9 -16
  134. package/dist/docsSidebar/index.js.map +1 -1
  135. package/dist/docsSidebar/index.mjs +9 -16
  136. package/dist/docsSidebar/index.mjs.map +1 -1
  137. package/dist/dropdownMenu/index.js +124 -164
  138. package/dist/dropdownMenu/index.js.map +1 -1
  139. package/dist/dropdownMenu/index.mjs +124 -164
  140. package/dist/dropdownMenu/index.mjs.map +1 -1
  141. package/dist/elements/index.d.mts +3 -3
  142. package/dist/elements/index.d.ts +3 -3
  143. package/dist/elements/index.js +841 -1505
  144. package/dist/elements/index.mjs +381 -718
  145. package/dist/fileDropzone/index.js +60 -159
  146. package/dist/fileDropzone/index.js.map +1 -1
  147. package/dist/fileDropzone/index.mjs +60 -159
  148. package/dist/fileDropzone/index.mjs.map +1 -1
  149. package/dist/glow/index.js +4 -16
  150. package/dist/glow/index.js.map +1 -1
  151. package/dist/glow/index.mjs +4 -16
  152. package/dist/glow/index.mjs.map +1 -1
  153. package/dist/hooks/index.d.mts +1 -5
  154. package/dist/hooks/index.d.ts +1 -5
  155. package/dist/hooks/index.js +11 -24
  156. package/dist/hooks/index.mjs +2 -2
  157. package/dist/{index-B0aJcA6d.d.ts → index-BgNycocQ.d.mts} +2 -2
  158. package/dist/{index-B0aJcA6d.d.mts → index-BgNycocQ.d.ts} +2 -2
  159. package/dist/index.css +1 -6
  160. package/dist/index.d.mts +7 -8
  161. package/dist/index.d.ts +7 -8
  162. package/dist/index.js +1549 -2512
  163. package/dist/index.mjs +1550 -2516
  164. package/dist/input/index.js +20 -29
  165. package/dist/input/index.js.map +1 -1
  166. package/dist/input/index.mjs +20 -29
  167. package/dist/input/index.mjs.map +1 -1
  168. package/dist/interfaceSettings/index.js +122 -163
  169. package/dist/interfaceSettings/index.js.map +1 -1
  170. package/dist/interfaceSettings/index.mjs +122 -163
  171. package/dist/interfaceSettings/index.mjs.map +1 -1
  172. package/dist/label/index.js +19 -26
  173. package/dist/label/index.js.map +1 -1
  174. package/dist/label/index.mjs +19 -26
  175. package/dist/label/index.mjs.map +1 -1
  176. package/dist/layout/index.d.mts +2 -0
  177. package/dist/layout/index.d.ts +2 -0
  178. package/dist/layout/index.js +434 -790
  179. package/dist/layout/index.mjs +143 -243
  180. package/dist/loading/index.js +30 -53
  181. package/dist/loading/index.js.map +1 -1
  182. package/dist/loading/index.mjs +30 -53
  183. package/dist/loading/index.mjs.map +1 -1
  184. package/dist/logos/index.js +66 -191
  185. package/dist/logos/index.js.map +1 -1
  186. package/dist/logos/index.mjs +66 -191
  187. package/dist/logos/index.mjs.map +1 -1
  188. package/dist/navbar/index.js +1 -4
  189. package/dist/navbar/index.js.map +1 -1
  190. package/dist/navbar/index.mjs +1 -4
  191. package/dist/navbar/index.mjs.map +1 -1
  192. package/dist/navigationMenu/index.js +14 -22
  193. package/dist/navigationMenu/index.js.map +1 -1
  194. package/dist/navigationMenu/index.mjs +14 -22
  195. package/dist/navigationMenu/index.mjs.map +1 -1
  196. package/dist/pagination/index.js +1 -5
  197. package/dist/pagination/index.js.map +1 -1
  198. package/dist/pagination/index.mjs +1 -5
  199. package/dist/pagination/index.mjs.map +1 -1
  200. package/dist/passwordInput/index.js +36 -65
  201. package/dist/passwordInput/index.js.map +1 -1
  202. package/dist/passwordInput/index.mjs +36 -65
  203. package/dist/passwordInput/index.mjs.map +1 -1
  204. package/dist/phoneInput/index.js +20 -29
  205. package/dist/phoneInput/index.js.map +1 -1
  206. package/dist/phoneInput/index.mjs +20 -29
  207. package/dist/phoneInput/index.mjs.map +1 -1
  208. package/dist/pinInput/index.js +14 -16
  209. package/dist/pinInput/index.js.map +1 -1
  210. package/dist/pinInput/index.mjs +14 -16
  211. package/dist/pinInput/index.mjs.map +1 -1
  212. package/dist/popover/index.js +14 -24
  213. package/dist/popover/index.js.map +1 -1
  214. package/dist/popover/index.mjs +14 -24
  215. package/dist/popover/index.mjs.map +1 -1
  216. package/dist/progress/index.js +19 -26
  217. package/dist/progress/index.js.map +1 -1
  218. package/dist/progress/index.mjs +19 -26
  219. package/dist/progress/index.mjs.map +1 -1
  220. package/dist/progressCircle/index.js +67 -71
  221. package/dist/progressCircle/index.js.map +1 -1
  222. package/dist/progressCircle/index.mjs +67 -71
  223. package/dist/progressCircle/index.mjs.map +1 -1
  224. package/dist/radio/index.js +122 -163
  225. package/dist/radio/index.js.map +1 -1
  226. package/dist/radio/index.mjs +122 -163
  227. package/dist/radio/index.mjs.map +1 -1
  228. package/dist/scrollArea/index.js.map +1 -1
  229. package/dist/scrollArea/index.mjs.map +1 -1
  230. package/dist/scrollIndicator/index.js +1 -4
  231. package/dist/scrollIndicator/index.js.map +1 -1
  232. package/dist/scrollIndicator/index.mjs +1 -4
  233. package/dist/scrollIndicator/index.mjs.map +1 -1
  234. package/dist/select/index.js +20 -29
  235. package/dist/select/index.js.map +1 -1
  236. package/dist/select/index.mjs +20 -29
  237. package/dist/select/index.mjs.map +1 -1
  238. package/dist/separator/index.js.map +1 -1
  239. package/dist/separator/index.mjs.map +1 -1
  240. package/dist/sheet/index.js +42 -53
  241. package/dist/sheet/index.js.map +1 -1
  242. package/dist/sheet/index.mjs +42 -53
  243. package/dist/sheet/index.mjs.map +1 -1
  244. package/dist/sidebar/index.js +66 -133
  245. package/dist/sidebar/index.js.map +1 -1
  246. package/dist/sidebar/index.mjs +66 -133
  247. package/dist/sidebar/index.mjs.map +1 -1
  248. package/dist/signature/index.js +19 -26
  249. package/dist/signature/index.js.map +1 -1
  250. package/dist/signature/index.mjs +19 -26
  251. package/dist/signature/index.mjs.map +1 -1
  252. package/dist/simpleTable/index.js +50 -81
  253. package/dist/simpleTable/index.js.map +1 -1
  254. package/dist/simpleTable/index.mjs +50 -81
  255. package/dist/simpleTable/index.mjs.map +1 -1
  256. package/dist/skeleton/index.js.map +1 -1
  257. package/dist/skeleton/index.mjs.map +1 -1
  258. package/dist/slider/index.js.map +1 -1
  259. package/dist/slider/index.mjs.map +1 -1
  260. package/dist/sonner/index.js.map +1 -1
  261. package/dist/sonner/index.mjs.map +1 -1
  262. package/dist/sortButton/index.js +50 -82
  263. package/dist/sortButton/index.js.map +1 -1
  264. package/dist/sortButton/index.mjs +50 -82
  265. package/dist/sortButton/index.mjs.map +1 -1
  266. package/dist/splitButton/index.js +214 -294
  267. package/dist/splitButton/index.js.map +1 -1
  268. package/dist/splitButton/index.mjs +214 -294
  269. package/dist/splitButton/index.mjs.map +1 -1
  270. package/dist/stats/index.js +7 -35
  271. package/dist/stats/index.js.map +1 -1
  272. package/dist/stats/index.mjs +7 -35
  273. package/dist/stats/index.mjs.map +1 -1
  274. package/dist/switch/index.js +24 -34
  275. package/dist/switch/index.js.map +1 -1
  276. package/dist/switch/index.mjs +24 -34
  277. package/dist/switch/index.mjs.map +1 -1
  278. package/dist/table/index.js +27 -29
  279. package/dist/table/index.js.map +1 -1
  280. package/dist/table/index.mjs +27 -29
  281. package/dist/table/index.mjs.map +1 -1
  282. package/dist/tabs/index.js +54 -76
  283. package/dist/tabs/index.js.map +1 -1
  284. package/dist/tabs/index.mjs +54 -76
  285. package/dist/tabs/index.mjs.map +1 -1
  286. package/dist/textarea/index.js +21 -38
  287. package/dist/textarea/index.js.map +1 -1
  288. package/dist/textarea/index.mjs +21 -38
  289. package/dist/textarea/index.mjs.map +1 -1
  290. package/dist/toast/index.js +2 -10
  291. package/dist/toast/index.js.map +1 -1
  292. package/dist/toast/index.mjs +2 -10
  293. package/dist/toast/index.mjs.map +1 -1
  294. package/dist/toaster/index.js +3 -16
  295. package/dist/toaster/index.js.map +1 -1
  296. package/dist/toaster/index.mjs +3 -16
  297. package/dist/toaster/index.mjs.map +1 -1
  298. package/dist/tooltip/index.js +19 -26
  299. package/dist/tooltip/index.js.map +1 -1
  300. package/dist/tooltip/index.mjs +19 -26
  301. package/dist/tooltip/index.mjs.map +1 -1
  302. package/package.json +12 -12
  303. package/dist/chunk-JP2N5WKD.mjs +0 -190
@@ -16,9 +16,7 @@ import { cva } from "class-variance-authority";
16
16
 
17
17
  // elements/helperText/HelperText.tsx
18
18
  import React from "react";
19
- var HelperText = ({
20
- helperText
21
- }) => /* @__PURE__ */ React.createElement(
19
+ var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
22
20
  "p",
23
21
  {
24
22
  className: cn(
@@ -69,38 +67,31 @@ var Tooltip = ({
69
67
  delayDuration = 300,
70
68
  ...props
71
69
  }) => {
72
- return /* @__PURE__ */ React2.createElement(
73
- TooltipPrimitive.TooltipProvider,
70
+ return /* @__PURE__ */ React2.createElement(TooltipPrimitive.TooltipProvider, { delayDuration, ...providerProps }, /* @__PURE__ */ React2.createElement(
71
+ TooltipPrimitive.Root,
74
72
  {
75
- delayDuration,
76
- ...providerProps
73
+ open: !disabled && open,
74
+ defaultOpen,
75
+ onOpenChange,
76
+ ...props
77
77
  },
78
+ /* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
78
79
  /* @__PURE__ */ React2.createElement(
79
- TooltipPrimitive.Root,
80
+ TooltipContent,
80
81
  {
81
- open: !disabled && open,
82
- defaultOpen,
83
- onOpenChange,
84
- ...props
82
+ size,
83
+ side,
84
+ align: "center",
85
+ ...contentProps,
86
+ style: {
87
+ ...contentProps == null ? void 0 : contentProps.style,
88
+ maxWidth: "var(--radix-tooltip-content-available-width)",
89
+ maxHeight: "var(--radix-tooltip-content-available-height)"
90
+ }
85
91
  },
86
- /* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
87
- /* @__PURE__ */ React2.createElement(
88
- TooltipContent,
89
- {
90
- size,
91
- side,
92
- align: "center",
93
- ...contentProps,
94
- style: {
95
- ...contentProps == null ? void 0 : contentProps.style,
96
- maxWidth: "var(--radix-tooltip-content-available-width)",
97
- maxHeight: "var(--radix-tooltip-content-available-height)"
98
- }
99
- },
100
- content
101
- )
92
+ content
102
93
  )
103
- );
94
+ ));
104
95
  };
105
96
 
106
97
  // elements/label/Label.tsx
@@ -177,57 +168,42 @@ var Loading = ({
177
168
  };
178
169
  switch (design.split("-")[0]) {
179
170
  case "dots":
180
- return /* @__PURE__ */ React4.createElement(
171
+ return /* @__PURE__ */ React4.createElement("div", { className: cn("hawa-flex hawa-flex-row hawa-gap-2", classNames == null ? void 0 : classNames.container) }, /* @__PURE__ */ React4.createElement(
181
172
  "div",
182
173
  {
183
174
  className: cn(
184
- "hawa-flex hawa-flex-row hawa-gap-2",
185
- classNames == null ? void 0 : classNames.container
175
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
176
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
177
+ animationStyles[design.split("-")[1]],
178
+ color ? color : "hawa-bg-primary"
186
179
  )
187
- },
188
- /* @__PURE__ */ React4.createElement(
189
- "div",
190
- {
191
- className: cn(
192
- "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
193
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
194
- animationStyles[design.split("-")[1]],
195
- color ? color : "hawa-bg-primary"
196
- )
197
- }
198
- ),
199
- /* @__PURE__ */ React4.createElement(
200
- "div",
201
- {
202
- className: cn(
203
- "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
204
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
205
- animationStyles[design.split("-")[1]],
206
- color ? color : "hawa-bg-primary"
207
- )
208
- }
209
- ),
210
- /* @__PURE__ */ React4.createElement(
211
- "div",
212
- {
213
- className: cn(
214
- "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
215
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
216
- animationStyles[design.split("-")[1]],
217
- color ? color : "hawa-bg-primary"
218
- )
219
- }
220
- )
221
- );
180
+ }
181
+ ), /* @__PURE__ */ React4.createElement(
182
+ "div",
183
+ {
184
+ className: cn(
185
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
186
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
187
+ animationStyles[design.split("-")[1]],
188
+ color ? color : "hawa-bg-primary"
189
+ )
190
+ }
191
+ ), /* @__PURE__ */ React4.createElement(
192
+ "div",
193
+ {
194
+ className: cn(
195
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
196
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
197
+ animationStyles[design.split("-")[1]],
198
+ color ? color : "hawa-bg-primary"
199
+ )
200
+ }
201
+ ));
222
202
  case "square":
223
203
  return /* @__PURE__ */ React4.createElement(
224
204
  "svg",
225
205
  {
226
- className: cn(
227
- "squircle-container",
228
- sizeStyles[size],
229
- classNames == null ? void 0 : classNames.container
230
- ),
206
+ className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container),
231
207
  viewBox: "0 0 35 35",
232
208
  height: "35",
233
209
  width: "35"
@@ -268,11 +244,7 @@ var Loading = ({
268
244
  height: "37",
269
245
  width: "37",
270
246
  preserveAspectRatio: "xMidYMid meet",
271
- className: cn(
272
- "squircle-container",
273
- sizeStyles[size],
274
- classNames == null ? void 0 : classNames.container
275
- )
247
+ className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
276
248
  },
277
249
  /* @__PURE__ */ React4.createElement(
278
250
  "path",
@@ -315,11 +287,7 @@ var Loading = ({
315
287
  viewBox: "0 0 40 40",
316
288
  height: "40",
317
289
  width: "40",
318
- className: cn(
319
- "circle-container",
320
- sizeStyles[size],
321
- classNames == null ? void 0 : classNames.container
322
- )
290
+ className: cn("circle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
323
291
  },
324
292
  /* @__PURE__ */ React4.createElement(
325
293
  "circle",
@@ -626,17 +594,11 @@ var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) =>
626
594
  }
627
595
  ));
628
596
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
629
- var DropdownMenuShortcut = ({
630
- className,
631
- ...props
632
- }) => {
597
+ var DropdownMenuShortcut = ({ className, ...props }) => {
633
598
  return /* @__PURE__ */ React6.createElement(
634
599
  "span",
635
600
  {
636
- className: cn(
637
- "hawa-text-xs hawa-tracking-widest hawa-opacity-60",
638
- className
639
- ),
601
+ className: cn("hawa-text-xs hawa-tracking-widest hawa-opacity-60", className),
640
602
  ...props
641
603
  }
642
604
  );
@@ -673,178 +635,144 @@ var DropdownMenu = ({
673
635
  default: "hawa-px-2 hawa-py-3 ",
674
636
  sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
675
637
  };
676
- let [values, setValues] = React6.useState(
677
- items.map((item) => item.currentOption)
678
- );
679
- return /* @__PURE__ */ React6.createElement(
680
- DropdownMenuRoot,
638
+ let [values, setValues] = React6.useState(items.map((item) => item.currentOption));
639
+ return /* @__PURE__ */ React6.createElement(DropdownMenuRoot, { onOpenChange, open, modal: false, dir: direction }, /* @__PURE__ */ React6.createElement(
640
+ DropdownMenuTrigger,
681
641
  {
682
- onOpenChange,
683
- open,
684
- modal: false,
685
- dir: direction
642
+ asChild: true,
643
+ className: cn(classNames == null ? void 0 : classNames.trigger, triggerClassname),
644
+ ...triggerProps
686
645
  },
687
- /* @__PURE__ */ React6.createElement(
688
- DropdownMenuTrigger,
689
- {
690
- asChild: true,
691
- className: cn(classNames == null ? void 0 : classNames.trigger, triggerClassname),
692
- ...triggerProps
693
- },
694
- trigger
695
- ),
696
- /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
697
- DropdownMenuContent,
698
- {
699
- side,
700
- sideOffset,
701
- align,
702
- alignOffset,
703
- className: cn(
704
- className,
705
- classNames == null ? void 0 : classNames.content,
706
- widthStyles[width],
707
- "hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto"
708
- ),
709
- style: {
710
- maxHeight: "var(--radix-dropdown-menu-content-available-height)"
711
- },
712
- ...contentProps
646
+ trigger
647
+ ), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
648
+ DropdownMenuContent,
649
+ {
650
+ side,
651
+ sideOffset,
652
+ align,
653
+ alignOffset,
654
+ className: cn(
655
+ className,
656
+ classNames == null ? void 0 : classNames.content,
657
+ widthStyles[width],
658
+ "hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto"
659
+ ),
660
+ style: {
661
+ maxHeight: "var(--radix-dropdown-menu-content-available-height)"
713
662
  },
714
- header && header,
715
- items && items.map((item, index) => {
716
- var _a;
717
- const ItemLinkComponent = item.slug ? LinkComponent : "a";
718
- if (item.itemType === "separator") {
719
- return /* @__PURE__ */ React6.createElement(
720
- DropdownMenuSeparator,
721
- {
722
- key: index,
723
- className: classNames == null ? void 0 : classNames.separator
724
- }
725
- );
726
- } else if (item.itemType === "label") {
727
- return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
728
- } else if (item.itemType === "radio") {
729
- let dd = item.currentOption;
730
- return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
731
- DropdownMenuSubTrigger,
732
- {
733
- dir: direction,
734
- className: cn(sizeStyles[size])
735
- },
736
- item.icon && item.icon,
737
- item.label && item.label
738
- ), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
739
- DropdownMenuRadioGroup,
740
- {
741
- value: values[index],
742
- onValueChange: (e) => {
743
- let newValues = [...values];
744
- newValues[index] = e;
745
- setValues(newValues);
746
- console.log("changing to ", e);
747
- if (item.onOptionChange) {
748
- item.onOptionChange(e);
749
- }
663
+ ...contentProps
664
+ },
665
+ header && header,
666
+ items && items.map((item, index) => {
667
+ var _a;
668
+ const ItemLinkComponent = item.slug ? LinkComponent : "a";
669
+ if (item.itemType === "separator") {
670
+ return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index, className: classNames == null ? void 0 : classNames.separator });
671
+ } else if (item.itemType === "label") {
672
+ return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
673
+ } else if (item.itemType === "radio") {
674
+ let dd = item.currentOption;
675
+ return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(DropdownMenuSubTrigger, { dir: direction, className: cn(sizeStyles[size]) }, item.icon && item.icon, item.label && item.label), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
676
+ DropdownMenuRadioGroup,
677
+ {
678
+ value: values[index],
679
+ onValueChange: (e) => {
680
+ let newValues = [...values];
681
+ newValues[index] = e;
682
+ setValues(newValues);
683
+ console.log("changing to ", e);
684
+ if (item.onOptionChange) {
685
+ item.onOptionChange(e);
750
686
  }
751
- },
752
- (_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
753
- )));
754
- } else if (item.itemType === "custom") {
755
- return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
756
- } else {
757
- return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
758
- DropdownMenuSubTrigger,
759
- {
760
- dir: direction,
761
- className: cn(sizeStyles[size])
762
- },
763
- item.icon && item.icon,
764
- item.label && item.label
765
- ), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
766
- const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
767
- return /* @__PURE__ */ React6.createElement(
768
- DropdownMenuItem,
769
- {
770
- key: subIndex,
771
- LinkComponent: SubitemLinkComponent,
772
- slug: subitem.slug,
773
- disabled: subitem.disabled,
774
- className: cn(
775
- sizeStyles[size],
776
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
777
- ),
778
- onMouseDown: (event) => {
779
- if (event.button === 1 || event.button === 0 && event.ctrlKey) {
780
- event.preventDefault();
781
- if (subitem.onMiddleClick) {
782
- subitem.onMiddleClick(item.value);
783
- }
784
- }
785
- },
786
- onSelect: () => {
787
- subitem.action && subitem.action();
788
- if (onItemSelect) {
789
- onItemSelect(subitem.value);
790
- }
791
- }
792
- },
793
- subitem.icon && subitem.icon,
794
- subitem.label && subitem.label
795
- );
796
- })))) : /* @__PURE__ */ React6.createElement(
687
+ }
688
+ },
689
+ (_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
690
+ )));
691
+ } else if (item.itemType === "custom") {
692
+ return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
693
+ } else {
694
+ return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(DropdownMenuSubTrigger, { dir: direction, className: cn(sizeStyles[size]) }, item.icon && item.icon, item.label && item.label), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
695
+ const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
696
+ return /* @__PURE__ */ React6.createElement(
797
697
  DropdownMenuItem,
798
698
  {
799
- LinkComponent: ItemLinkComponent,
800
- slug: item.slug,
801
- key: index,
802
- disabled: item.disabled,
699
+ key: subIndex,
700
+ LinkComponent: SubitemLinkComponent,
701
+ slug: subitem.slug,
702
+ disabled: subitem.disabled,
703
+ className: cn(
704
+ sizeStyles[size],
705
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
706
+ ),
803
707
  onMouseDown: (event) => {
804
708
  if (event.button === 1 || event.button === 0 && event.ctrlKey) {
805
709
  event.preventDefault();
806
- if (item.onMiddleClick) {
807
- item.onMiddleClick(item.value);
710
+ if (subitem.onMiddleClick) {
711
+ subitem.onMiddleClick(item.value);
808
712
  }
809
713
  }
810
714
  },
811
- onClick: (event) => {
812
- if (item.onClick) {
813
- item.onClick(item.value);
715
+ onSelect: () => {
716
+ subitem.action && subitem.action();
717
+ if (onItemSelect) {
718
+ onItemSelect(subitem.value);
814
719
  }
815
- },
816
- onSelect: (e) => {
817
- if (item.presist) {
818
- e.preventDefault();
720
+ }
721
+ },
722
+ subitem.icon && subitem.icon,
723
+ subitem.label && subitem.label
724
+ );
725
+ })))) : /* @__PURE__ */ React6.createElement(
726
+ DropdownMenuItem,
727
+ {
728
+ LinkComponent: ItemLinkComponent,
729
+ slug: item.slug,
730
+ key: index,
731
+ disabled: item.disabled,
732
+ onMouseDown: (event) => {
733
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
734
+ event.preventDefault();
735
+ if (item.onMiddleClick) {
736
+ item.onMiddleClick(item.value);
819
737
  }
820
- if (item.action) {
821
- item.action();
822
- if (onItemSelect) {
823
- onItemSelect(item.value);
824
- }
825
- } else {
826
- if (onItemSelect) {
827
- onItemSelect(item.value);
828
- }
738
+ }
739
+ },
740
+ onClick: (event) => {
741
+ if (item.onClick) {
742
+ item.onClick(item.value);
743
+ }
744
+ },
745
+ onSelect: (e) => {
746
+ if (item.presist) {
747
+ e.preventDefault();
748
+ }
749
+ if (item.action) {
750
+ item.action();
751
+ if (onItemSelect) {
752
+ onItemSelect(item.value);
829
753
  }
830
- },
831
- end: item.end,
832
- shortcut: item.shortcut,
833
- badged: item.badged,
834
- className: cn(
835
- sizeStyles[size],
836
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent",
837
- item.presist && "focus:hawa-bg-transparent",
838
- classNames == null ? void 0 : classNames.item
839
- )
754
+ } else {
755
+ if (onItemSelect) {
756
+ onItemSelect(item.value);
757
+ }
758
+ }
840
759
  },
841
- item.icon && item.icon,
842
- item.label && item.label
843
- );
844
- }
845
- })
846
- ))
847
- );
760
+ end: item.end,
761
+ shortcut: item.shortcut,
762
+ badged: item.badged,
763
+ className: cn(
764
+ sizeStyles[size],
765
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent",
766
+ item.presist && "focus:hawa-bg-transparent",
767
+ classNames == null ? void 0 : classNames.item
768
+ )
769
+ },
770
+ item.icon && item.icon,
771
+ item.label && item.label
772
+ );
773
+ }
774
+ })
775
+ )));
848
776
  };
849
777
 
850
778
  // elements/splitButton/SplitButton.tsx
@@ -854,59 +782,51 @@ var SplitButton = ({
854
782
  menuItems = [],
855
783
  children,
856
784
  ...props
857
- }) => /* @__PURE__ */ React7.createElement(
858
- "div",
785
+ }) => /* @__PURE__ */ React7.createElement("div", { dir: "ltr", className: cn("hawa-row hawa-flex hawa-h-fit hawa-justify-center") }, /* @__PURE__ */ React7.createElement(
786
+ Button,
859
787
  {
860
- dir: "ltr",
861
- className: cn("hawa-row hawa-flex hawa-h-fit hawa-justify-center")
788
+ variant,
789
+ onClick: props.onClick,
790
+ className: cn("hawa-rounded-r-none", props.className)
862
791
  },
863
- /* @__PURE__ */ React7.createElement(
864
- Button,
865
- {
866
- variant,
867
- onClick: props.onClick,
868
- className: cn("hawa-rounded-r-none", props.className)
869
- },
870
- children
871
- ),
872
- /* @__PURE__ */ React7.createElement(
873
- DropdownMenu,
874
- {
875
- size: "sm",
876
- width: "sm",
877
- direction,
878
- align: direction === "rtl" ? "start" : "end",
879
- items: menuItems,
880
- trigger: /* @__PURE__ */ React7.createElement(
881
- Button,
792
+ children
793
+ ), /* @__PURE__ */ React7.createElement(
794
+ DropdownMenu,
795
+ {
796
+ size: "sm",
797
+ width: "sm",
798
+ direction,
799
+ align: direction === "rtl" ? "start" : "end",
800
+ items: menuItems,
801
+ trigger: /* @__PURE__ */ React7.createElement(
802
+ Button,
803
+ {
804
+ asChild: true,
805
+ variant,
806
+ size: "icon",
807
+ className: cn(
808
+ "hawa-h-10 hawa-w-fit hawa-rounded-l-none hawa-border-l-0 hawa-px-1",
809
+ props.className
810
+ )
811
+ },
812
+ /* @__PURE__ */ React7.createElement(
813
+ "svg",
882
814
  {
883
- asChild: true,
884
- variant,
885
- size: "icon",
886
- className: cn(
887
- "hawa-h-10 hawa-w-fit hawa-rounded-l-none hawa-border-l-0 hawa-px-1",
888
- props.className
889
- )
815
+ xmlns: "http://www.w3.org/2000/svg",
816
+ width: "18",
817
+ height: "18",
818
+ viewBox: "0 0 24 24",
819
+ fill: "none",
820
+ stroke: "currentColor",
821
+ strokeWidth: "2",
822
+ strokeLinecap: "round",
823
+ strokeLinejoin: "round"
890
824
  },
891
- /* @__PURE__ */ React7.createElement(
892
- "svg",
893
- {
894
- xmlns: "http://www.w3.org/2000/svg",
895
- width: "18",
896
- height: "18",
897
- viewBox: "0 0 24 24",
898
- fill: "none",
899
- stroke: "currentColor",
900
- strokeWidth: "2",
901
- strokeLinecap: "round",
902
- strokeLinejoin: "round"
903
- },
904
- /* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
905
- )
825
+ /* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
906
826
  )
907
- }
908
- )
909
- );
827
+ )
828
+ }
829
+ ));
910
830
  SplitButton.displayName = "SplitButton";
911
831
  export {
912
832
  SplitButton