@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
@@ -13,21 +13,15 @@ function useClickOutside(handler, events, nodes) {
13
13
  const { target } = event != null ? event : {};
14
14
  if (Array.isArray(nodes)) {
15
15
  const shouldIgnore = (target == null ? void 0 : target.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(target) && target.tagName !== "HTML";
16
- const shouldTrigger = nodes.every(
17
- (node) => !!node && !event.composedPath().includes(node)
18
- );
16
+ const shouldTrigger = nodes.every((node) => !!node && !event.composedPath().includes(node));
19
17
  shouldTrigger && !shouldIgnore && handler();
20
18
  } else if (ref.current && !ref.current.contains(target)) {
21
19
  handler();
22
20
  }
23
21
  };
24
- (events || DEFAULT_EVENTS).forEach(
25
- (fn) => document.addEventListener(fn, listener)
26
- );
22
+ (events || DEFAULT_EVENTS).forEach((fn) => document.addEventListener(fn, listener));
27
23
  return () => {
28
- (events || DEFAULT_EVENTS).forEach(
29
- (fn) => document.removeEventListener(fn, listener)
30
- );
24
+ (events || DEFAULT_EVENTS).forEach((fn) => document.removeEventListener(fn, listener));
31
25
  };
32
26
  }, [ref, handler, nodes]);
33
27
  return ref;
@@ -49,9 +43,7 @@ import { cva } from "class-variance-authority";
49
43
 
50
44
  // elements/helperText/HelperText.tsx
51
45
  import React from "react";
52
- var HelperText = ({
53
- helperText
54
- }) => /* @__PURE__ */ React.createElement(
46
+ var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
55
47
  "p",
56
48
  {
57
49
  className: cn(
@@ -102,38 +94,31 @@ var Tooltip = ({
102
94
  delayDuration = 300,
103
95
  ...props
104
96
  }) => {
105
- return /* @__PURE__ */ React2.createElement(
106
- TooltipPrimitive.TooltipProvider,
97
+ return /* @__PURE__ */ React2.createElement(TooltipPrimitive.TooltipProvider, { delayDuration, ...providerProps }, /* @__PURE__ */ React2.createElement(
98
+ TooltipPrimitive.Root,
107
99
  {
108
- delayDuration,
109
- ...providerProps
100
+ open: !disabled && open,
101
+ defaultOpen,
102
+ onOpenChange,
103
+ ...props
110
104
  },
105
+ /* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
111
106
  /* @__PURE__ */ React2.createElement(
112
- TooltipPrimitive.Root,
107
+ TooltipContent,
113
108
  {
114
- open: !disabled && open,
115
- defaultOpen,
116
- onOpenChange,
117
- ...props
109
+ size,
110
+ side,
111
+ align: "center",
112
+ ...contentProps,
113
+ style: {
114
+ ...contentProps == null ? void 0 : contentProps.style,
115
+ maxWidth: "var(--radix-tooltip-content-available-width)",
116
+ maxHeight: "var(--radix-tooltip-content-available-height)"
117
+ }
118
118
  },
119
- /* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
120
- /* @__PURE__ */ React2.createElement(
121
- TooltipContent,
122
- {
123
- size,
124
- side,
125
- align: "center",
126
- ...contentProps,
127
- style: {
128
- ...contentProps == null ? void 0 : contentProps.style,
129
- maxWidth: "var(--radix-tooltip-content-available-width)",
130
- maxHeight: "var(--radix-tooltip-content-available-height)"
131
- }
132
- },
133
- content
134
- )
119
+ content
135
120
  )
136
- );
121
+ ));
137
122
  };
138
123
 
139
124
  // elements/label/Label.tsx
@@ -210,57 +195,42 @@ var Loading = ({
210
195
  };
211
196
  switch (design.split("-")[0]) {
212
197
  case "dots":
213
- return /* @__PURE__ */ React4.createElement(
198
+ return /* @__PURE__ */ React4.createElement("div", { className: cn("hawa-flex hawa-flex-row hawa-gap-2", classNames == null ? void 0 : classNames.container) }, /* @__PURE__ */ React4.createElement(
214
199
  "div",
215
200
  {
216
201
  className: cn(
217
- "hawa-flex hawa-flex-row hawa-gap-2",
218
- classNames == null ? void 0 : classNames.container
202
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
203
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
204
+ animationStyles[design.split("-")[1]],
205
+ color ? color : "hawa-bg-primary"
219
206
  )
220
- },
221
- /* @__PURE__ */ React4.createElement(
222
- "div",
223
- {
224
- className: cn(
225
- "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
226
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
227
- animationStyles[design.split("-")[1]],
228
- color ? color : "hawa-bg-primary"
229
- )
230
- }
231
- ),
232
- /* @__PURE__ */ React4.createElement(
233
- "div",
234
- {
235
- className: cn(
236
- "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
237
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
238
- animationStyles[design.split("-")[1]],
239
- color ? color : "hawa-bg-primary"
240
- )
241
- }
242
- ),
243
- /* @__PURE__ */ React4.createElement(
244
- "div",
245
- {
246
- className: cn(
247
- "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
248
- size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
249
- animationStyles[design.split("-")[1]],
250
- color ? color : "hawa-bg-primary"
251
- )
252
- }
253
- )
254
- );
207
+ }
208
+ ), /* @__PURE__ */ React4.createElement(
209
+ "div",
210
+ {
211
+ className: cn(
212
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
213
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
214
+ animationStyles[design.split("-")[1]],
215
+ color ? color : "hawa-bg-primary"
216
+ )
217
+ }
218
+ ), /* @__PURE__ */ React4.createElement(
219
+ "div",
220
+ {
221
+ className: cn(
222
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
223
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
224
+ animationStyles[design.split("-")[1]],
225
+ color ? color : "hawa-bg-primary"
226
+ )
227
+ }
228
+ ));
255
229
  case "square":
256
230
  return /* @__PURE__ */ React4.createElement(
257
231
  "svg",
258
232
  {
259
- className: cn(
260
- "squircle-container",
261
- sizeStyles[size],
262
- classNames == null ? void 0 : classNames.container
263
- ),
233
+ className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container),
264
234
  viewBox: "0 0 35 35",
265
235
  height: "35",
266
236
  width: "35"
@@ -301,11 +271,7 @@ var Loading = ({
301
271
  height: "37",
302
272
  width: "37",
303
273
  preserveAspectRatio: "xMidYMid meet",
304
- className: cn(
305
- "squircle-container",
306
- sizeStyles[size],
307
- classNames == null ? void 0 : classNames.container
308
- )
274
+ className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
309
275
  },
310
276
  /* @__PURE__ */ React4.createElement(
311
277
  "path",
@@ -348,11 +314,7 @@ var Loading = ({
348
314
  viewBox: "0 0 40 40",
349
315
  height: "40",
350
316
  width: "40",
351
- className: cn(
352
- "circle-container",
353
- sizeStyles[size],
354
- classNames == null ? void 0 : classNames.container
355
- )
317
+ className: cn("circle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
356
318
  },
357
319
  /* @__PURE__ */ React4.createElement(
358
320
  "circle",
@@ -659,17 +621,11 @@ var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) =>
659
621
  }
660
622
  ));
661
623
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
662
- var DropdownMenuShortcut = ({
663
- className,
664
- ...props
665
- }) => {
624
+ var DropdownMenuShortcut = ({ className, ...props }) => {
666
625
  return /* @__PURE__ */ React6.createElement(
667
626
  "span",
668
627
  {
669
- className: cn(
670
- "hawa-text-xs hawa-tracking-widest hawa-opacity-60",
671
- className
672
- ),
628
+ className: cn("hawa-text-xs hawa-tracking-widest hawa-opacity-60", className),
673
629
  ...props
674
630
  }
675
631
  );
@@ -706,178 +662,144 @@ var DropdownMenu = ({
706
662
  default: "hawa-px-2 hawa-py-3 ",
707
663
  sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
708
664
  };
709
- let [values, setValues] = React6.useState(
710
- items.map((item) => item.currentOption)
711
- );
712
- return /* @__PURE__ */ React6.createElement(
713
- DropdownMenuRoot,
665
+ let [values, setValues] = React6.useState(items.map((item) => item.currentOption));
666
+ return /* @__PURE__ */ React6.createElement(DropdownMenuRoot, { onOpenChange, open, modal: false, dir: direction }, /* @__PURE__ */ React6.createElement(
667
+ DropdownMenuTrigger,
714
668
  {
715
- onOpenChange,
716
- open,
717
- modal: false,
718
- dir: direction
669
+ asChild: true,
670
+ className: cn(classNames == null ? void 0 : classNames.trigger, triggerClassname),
671
+ ...triggerProps
719
672
  },
720
- /* @__PURE__ */ React6.createElement(
721
- DropdownMenuTrigger,
722
- {
723
- asChild: true,
724
- className: cn(classNames == null ? void 0 : classNames.trigger, triggerClassname),
725
- ...triggerProps
726
- },
727
- trigger
728
- ),
729
- /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
730
- DropdownMenuContent,
731
- {
732
- side,
733
- sideOffset,
734
- align,
735
- alignOffset,
736
- className: cn(
737
- className,
738
- classNames == null ? void 0 : classNames.content,
739
- widthStyles[width],
740
- "hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto"
741
- ),
742
- style: {
743
- maxHeight: "var(--radix-dropdown-menu-content-available-height)"
744
- },
745
- ...contentProps
673
+ trigger
674
+ ), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
675
+ DropdownMenuContent,
676
+ {
677
+ side,
678
+ sideOffset,
679
+ align,
680
+ alignOffset,
681
+ className: cn(
682
+ className,
683
+ classNames == null ? void 0 : classNames.content,
684
+ widthStyles[width],
685
+ "hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto"
686
+ ),
687
+ style: {
688
+ maxHeight: "var(--radix-dropdown-menu-content-available-height)"
746
689
  },
747
- header && header,
748
- items && items.map((item, index) => {
749
- var _a;
750
- const ItemLinkComponent = item.slug ? LinkComponent : "a";
751
- if (item.itemType === "separator") {
752
- return /* @__PURE__ */ React6.createElement(
753
- DropdownMenuSeparator,
754
- {
755
- key: index,
756
- className: classNames == null ? void 0 : classNames.separator
757
- }
758
- );
759
- } else if (item.itemType === "label") {
760
- return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
761
- } else if (item.itemType === "radio") {
762
- let dd = item.currentOption;
763
- return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
764
- DropdownMenuSubTrigger,
765
- {
766
- dir: direction,
767
- className: cn(sizeStyles[size])
768
- },
769
- item.icon && item.icon,
770
- item.label && item.label
771
- ), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
772
- DropdownMenuRadioGroup,
773
- {
774
- value: values[index],
775
- onValueChange: (e) => {
776
- let newValues = [...values];
777
- newValues[index] = e;
778
- setValues(newValues);
779
- console.log("changing to ", e);
780
- if (item.onOptionChange) {
781
- item.onOptionChange(e);
782
- }
690
+ ...contentProps
691
+ },
692
+ header && header,
693
+ items && items.map((item, index) => {
694
+ var _a;
695
+ const ItemLinkComponent = item.slug ? LinkComponent : "a";
696
+ if (item.itemType === "separator") {
697
+ return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index, className: classNames == null ? void 0 : classNames.separator });
698
+ } else if (item.itemType === "label") {
699
+ return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
700
+ } else if (item.itemType === "radio") {
701
+ let dd = item.currentOption;
702
+ 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(
703
+ DropdownMenuRadioGroup,
704
+ {
705
+ value: values[index],
706
+ onValueChange: (e) => {
707
+ let newValues = [...values];
708
+ newValues[index] = e;
709
+ setValues(newValues);
710
+ console.log("changing to ", e);
711
+ if (item.onOptionChange) {
712
+ item.onOptionChange(e);
783
713
  }
784
- },
785
- (_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
786
- )));
787
- } else if (item.itemType === "custom") {
788
- return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
789
- } else {
790
- return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
791
- DropdownMenuSubTrigger,
792
- {
793
- dir: direction,
794
- className: cn(sizeStyles[size])
795
- },
796
- item.icon && item.icon,
797
- item.label && item.label
798
- ), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
799
- const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
800
- return /* @__PURE__ */ React6.createElement(
801
- DropdownMenuItem,
802
- {
803
- key: subIndex,
804
- LinkComponent: SubitemLinkComponent,
805
- slug: subitem.slug,
806
- disabled: subitem.disabled,
807
- className: cn(
808
- sizeStyles[size],
809
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
810
- ),
811
- onMouseDown: (event) => {
812
- if (event.button === 1 || event.button === 0 && event.ctrlKey) {
813
- event.preventDefault();
814
- if (subitem.onMiddleClick) {
815
- subitem.onMiddleClick(item.value);
816
- }
817
- }
818
- },
819
- onSelect: () => {
820
- subitem.action && subitem.action();
821
- if (onItemSelect) {
822
- onItemSelect(subitem.value);
823
- }
824
- }
825
- },
826
- subitem.icon && subitem.icon,
827
- subitem.label && subitem.label
828
- );
829
- })))) : /* @__PURE__ */ React6.createElement(
714
+ }
715
+ },
716
+ (_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
717
+ )));
718
+ } else if (item.itemType === "custom") {
719
+ return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
720
+ } else {
721
+ 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) => {
722
+ const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
723
+ return /* @__PURE__ */ React6.createElement(
830
724
  DropdownMenuItem,
831
725
  {
832
- LinkComponent: ItemLinkComponent,
833
- slug: item.slug,
834
- key: index,
835
- disabled: item.disabled,
726
+ key: subIndex,
727
+ LinkComponent: SubitemLinkComponent,
728
+ slug: subitem.slug,
729
+ disabled: subitem.disabled,
730
+ className: cn(
731
+ sizeStyles[size],
732
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
733
+ ),
836
734
  onMouseDown: (event) => {
837
735
  if (event.button === 1 || event.button === 0 && event.ctrlKey) {
838
736
  event.preventDefault();
839
- if (item.onMiddleClick) {
840
- item.onMiddleClick(item.value);
737
+ if (subitem.onMiddleClick) {
738
+ subitem.onMiddleClick(item.value);
841
739
  }
842
740
  }
843
741
  },
844
- onClick: (event) => {
845
- if (item.onClick) {
846
- item.onClick(item.value);
742
+ onSelect: () => {
743
+ subitem.action && subitem.action();
744
+ if (onItemSelect) {
745
+ onItemSelect(subitem.value);
847
746
  }
848
- },
849
- onSelect: (e) => {
850
- if (item.presist) {
851
- e.preventDefault();
747
+ }
748
+ },
749
+ subitem.icon && subitem.icon,
750
+ subitem.label && subitem.label
751
+ );
752
+ })))) : /* @__PURE__ */ React6.createElement(
753
+ DropdownMenuItem,
754
+ {
755
+ LinkComponent: ItemLinkComponent,
756
+ slug: item.slug,
757
+ key: index,
758
+ disabled: item.disabled,
759
+ onMouseDown: (event) => {
760
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
761
+ event.preventDefault();
762
+ if (item.onMiddleClick) {
763
+ item.onMiddleClick(item.value);
852
764
  }
853
- if (item.action) {
854
- item.action();
855
- if (onItemSelect) {
856
- onItemSelect(item.value);
857
- }
858
- } else {
859
- if (onItemSelect) {
860
- onItemSelect(item.value);
861
- }
765
+ }
766
+ },
767
+ onClick: (event) => {
768
+ if (item.onClick) {
769
+ item.onClick(item.value);
770
+ }
771
+ },
772
+ onSelect: (e) => {
773
+ if (item.presist) {
774
+ e.preventDefault();
775
+ }
776
+ if (item.action) {
777
+ item.action();
778
+ if (onItemSelect) {
779
+ onItemSelect(item.value);
862
780
  }
863
- },
864
- end: item.end,
865
- shortcut: item.shortcut,
866
- badged: item.badged,
867
- className: cn(
868
- sizeStyles[size],
869
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent",
870
- item.presist && "focus:hawa-bg-transparent",
871
- classNames == null ? void 0 : classNames.item
872
- )
781
+ } else {
782
+ if (onItemSelect) {
783
+ onItemSelect(item.value);
784
+ }
785
+ }
873
786
  },
874
- item.icon && item.icon,
875
- item.label && item.label
876
- );
877
- }
878
- })
879
- ))
880
- );
787
+ end: item.end,
788
+ shortcut: item.shortcut,
789
+ badged: item.badged,
790
+ className: cn(
791
+ sizeStyles[size],
792
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent",
793
+ item.presist && "focus:hawa-bg-transparent",
794
+ classNames == null ? void 0 : classNames.item
795
+ )
796
+ },
797
+ item.icon && item.icon,
798
+ item.label && item.label
799
+ );
800
+ }
801
+ })
802
+ )));
881
803
  };
882
804
 
883
805
  // icons/Emojis.tsx
@@ -917,16 +839,7 @@ import * as AccordionPrimitive from "@radix-ui/react-accordion";
917
839
  // elements/chip/Chip.tsx
918
840
  import React10 from "react";
919
841
  var Chip = React10.forwardRef(
920
- ({
921
- label,
922
- size = "normal",
923
- icon,
924
- color,
925
- radius = "inherit",
926
- dot,
927
- dotStatus = "none",
928
- ...rest
929
- }, ref) => {
842
+ ({ label, size = "normal", icon, color, radius = "inherit", dot, dotStatus = "none", ...rest }, ref) => {
930
843
  let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
931
844
  let radiusStyles = {
932
845
  inherit: " hawa-rounded",
@@ -973,12 +886,7 @@ var Chip = React10.forwardRef(
973
886
  rest.className
974
887
  )
975
888
  },
976
- dot && /* @__PURE__ */ React10.createElement(
977
- "span",
978
- {
979
- className: cn(dotStyles[size], dotStatusStyles[dotStatus])
980
- }
981
- ),
889
+ dot && /* @__PURE__ */ React10.createElement("span", { className: cn(dotStyles[size], dotStatusStyles[dotStatus]) }),
982
890
  icon && icon,
983
891
  label
984
892
  );
@@ -1003,28 +911,19 @@ var Accordion = AccordionPrimitive.Root;
1003
911
  var triggerStyles = "hawa-flex hawa-flex-1 hawa-items-center hawa-duration-75 hawa-select-none hawa-cursor-pointer hawa-rounded hawa-justify-between hawa-p-2 hawa-px-3 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa--rotate-90";
1004
912
  var AccordionItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
1005
913
  AccordionItem.displayName = "AccordionItem";
1006
- var AccordionTrigger = React11.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React11.createElement(
1007
- AccordionPrimitive.Trigger,
914
+ var AccordionTrigger = React11.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React11.createElement(AccordionPrimitive.Trigger, { ref, className: cn(triggerStyles, className), ...props }, children, showArrow && /* @__PURE__ */ React11.createElement(
915
+ "svg",
1008
916
  {
1009
- ref,
1010
- className: cn(triggerStyles, className),
1011
- ...props
917
+ "aria-label": "Chevron Right Icon",
918
+ stroke: "currentColor",
919
+ fill: "currentColor",
920
+ viewBox: "0 0 16 16",
921
+ height: "1em",
922
+ width: "1em",
923
+ className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
1012
924
  },
1013
- children,
1014
- showArrow && /* @__PURE__ */ React11.createElement(
1015
- "svg",
1016
- {
1017
- "aria-label": "Chevron Right Icon",
1018
- stroke: "currentColor",
1019
- fill: "currentColor",
1020
- viewBox: "0 0 16 16",
1021
- height: "1em",
1022
- width: "1em",
1023
- className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
1024
- },
1025
- /* @__PURE__ */ React11.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
1026
- )
1027
- )));
925
+ /* @__PURE__ */ React11.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
926
+ ))));
1028
927
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
1029
928
  var AccordionContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
1030
929
  AccordionPrimitive.Content,
@@ -1078,111 +977,78 @@ var SidebarGroup = ({
1078
977
  ))
1079
978
  )));
1080
979
  };
1081
- var SidebarItem = ({
1082
- item,
1083
- onItemClick,
1084
- onSubItemClick,
1085
- direction,
1086
- isOpen = true,
1087
- LinkComponent,
1088
- ...props
1089
- }) => {
980
+ var SidebarItem = ({ item, onItemClick, onSubItemClick, direction, isOpen = true, LinkComponent, ...props }) => {
1090
981
  const getSelectedStyle = (value) => {
1091
982
  return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
1092
983
  };
1093
984
  if (item.subitems) {
1094
- return /* @__PURE__ */ React11.createElement(
1095
- AccordionItem,
985
+ return /* @__PURE__ */ React11.createElement(AccordionItem, { value: item.value, className: "hawa-overflow-x-clip", dir: direction }, /* @__PURE__ */ React11.createElement(
986
+ AccordionTrigger,
1096
987
  {
1097
- value: item.value,
1098
- className: "hawa-overflow-x-clip",
1099
- dir: direction
988
+ className: cn(
989
+ "hawa-w-full hawa-overflow-x-clip",
990
+ props.selectedItem === item.value ? "hawa-cursor-default hawa-bg-primary hawa-text-primary-foreground" : "hawa-h-10 hover:hawa-bg-primary/10",
991
+ item.subitems && item.subitems.some((subitem) => props.selectedItem === subitem.value) ? "hawa-bg-primary/80 hawa-text-primary-foreground hover:hawa-bg-primary/80" : ""
992
+ ),
993
+ showArrow: isOpen
1100
994
  },
1101
995
  /* @__PURE__ */ React11.createElement(
1102
- AccordionTrigger,
996
+ "div",
1103
997
  {
1104
998
  className: cn(
1105
- "hawa-w-full hawa-overflow-x-clip",
1106
- props.selectedItem === item.value ? "hawa-cursor-default hawa-bg-primary hawa-text-primary-foreground" : "hawa-h-10 hover:hawa-bg-primary/10",
1107
- item.subitems && item.subitems.some(
1108
- (subitem) => props.selectedItem === subitem.value
1109
- ) ? "hawa-bg-primary/80 hawa-text-primary-foreground hover:hawa-bg-primary/80" : ""
1110
- ),
1111
- showArrow: isOpen
999
+ "hawa-flex hawa-h-fit hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2"
1000
+ )
1112
1001
  },
1002
+ item.icon && item.icon,
1113
1003
  /* @__PURE__ */ React11.createElement(
1114
- "div",
1004
+ "span",
1115
1005
  {
1116
1006
  className: cn(
1117
- "hawa-flex hawa-h-fit hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2"
1007
+ "hawa-transition-all hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap",
1008
+ isOpen ? "hawa-opacity-100" : "hawa-opacity-0"
1118
1009
  )
1119
1010
  },
1120
- item.icon && item.icon,
1121
- /* @__PURE__ */ React11.createElement(
1122
- "span",
1123
- {
1124
- className: cn(
1125
- "hawa-transition-all hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap",
1126
- isOpen ? "hawa-opacity-100" : "hawa-opacity-0"
1127
- )
1128
- },
1129
- item.label,
1130
- item.badge && /* @__PURE__ */ React11.createElement(
1131
- Chip,
1132
- {
1133
- label: item.badge.label,
1134
- color: item.badge.color,
1135
- size: "small"
1136
- }
1137
- )
1138
- )
1011
+ item.label,
1012
+ item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: item.badge.color, size: "small" })
1139
1013
  )
1140
- ),
1141
- item.subitems && /* @__PURE__ */ React11.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React11.createElement(
1142
- "div",
1014
+ )
1015
+ ), item.subitems && /* @__PURE__ */ React11.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React11.createElement(
1016
+ "div",
1017
+ {
1018
+ className: cn(
1019
+ "hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
1020
+ )
1021
+ },
1022
+ item.subitems.map((subitem, idx) => /* @__PURE__ */ React11.createElement(
1023
+ LinkComponent,
1143
1024
  {
1144
- className: cn(
1145
- "hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
1146
- )
1147
- },
1148
- item.subitems.map((subitem, idx) => /* @__PURE__ */ React11.createElement(
1149
- LinkComponent,
1150
- {
1151
- href: subitem.slug,
1152
- key: idx,
1153
- onMouseDown: (e) => {
1154
- if (subitem.onMouseDown) {
1155
- subitem.onMouseDown(e);
1156
- }
1157
- },
1158
- onClick: (e) => {
1159
- e.stopPropagation();
1160
- if (subitem.onClick) {
1161
- subitem.onClick(e);
1162
- }
1163
- if (onSubItemClick) {
1164
- onSubItemClick([item.value, subitem.value]);
1165
- }
1166
- },
1167
- className: cn(
1168
- "hawa-flex hawa-h-full hawa-cursor-pointer hawa-flex-row hawa-items-center hawa-gap-2 hawa-overflow-x-clip hawa-whitespace-nowrap hawa-rounded hawa-p-2 hawa-transition-all",
1169
- // bg-foreground/10
1170
- getSelectedStyle(subitem.value)
1171
- )
1025
+ href: subitem.slug,
1026
+ key: idx,
1027
+ onMouseDown: (e) => {
1028
+ if (subitem.onMouseDown) {
1029
+ subitem.onMouseDown(e);
1030
+ }
1172
1031
  },
1173
- subitem.icon && subitem.icon,
1174
- subitem.label,
1175
- subitem.badge && /* @__PURE__ */ React11.createElement(
1176
- Chip,
1177
- {
1178
- label: subitem.badge.label,
1179
- color: subitem.badge.color,
1180
- size: "small"
1032
+ onClick: (e) => {
1033
+ e.stopPropagation();
1034
+ if (subitem.onClick) {
1035
+ subitem.onClick(e);
1181
1036
  }
1037
+ if (onSubItemClick) {
1038
+ onSubItemClick([item.value, subitem.value]);
1039
+ }
1040
+ },
1041
+ className: cn(
1042
+ "hawa-flex hawa-h-full hawa-cursor-pointer hawa-flex-row hawa-items-center hawa-gap-2 hawa-overflow-x-clip hawa-whitespace-nowrap hawa-rounded hawa-p-2 hawa-transition-all",
1043
+ // bg-foreground/10
1044
+ getSelectedStyle(subitem.value)
1182
1045
  )
1183
- ))
1046
+ },
1047
+ subitem.icon && subitem.icon,
1048
+ subitem.label,
1049
+ subitem.badge && /* @__PURE__ */ React11.createElement(Chip, { label: subitem.badge.label, color: subitem.badge.color, size: "small" })
1184
1050
  ))
1185
- );
1051
+ )));
1186
1052
  } else {
1187
1053
  return /* @__PURE__ */ React11.createElement(
1188
1054
  LinkComponent,
@@ -1202,11 +1068,7 @@ var SidebarItem = ({
1202
1068
  onItemClick([item.value]);
1203
1069
  }
1204
1070
  },
1205
- className: cn(
1206
- triggerStyles,
1207
- getSelectedStyle(item.value),
1208
- "hawa-overflow-x-clip"
1209
- )
1071
+ className: cn(triggerStyles, getSelectedStyle(item.value), "hawa-overflow-x-clip")
1210
1072
  },
1211
1073
  /* @__PURE__ */ React11.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React11.createElement(
1212
1074
  "span",
@@ -1218,14 +1080,7 @@ var SidebarItem = ({
1218
1080
  },
1219
1081
  item.label,
1220
1082
  " ",
1221
- item.badge && /* @__PURE__ */ React11.createElement(
1222
- Chip,
1223
- {
1224
- label: item.badge.label,
1225
- color: item.badge.color,
1226
- size: "small"
1227
- }
1228
- )
1083
+ item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: item.badge.color, size: "small" })
1229
1084
  ))
1230
1085
  );
1231
1086
  }
@@ -1235,7 +1090,9 @@ var SidebarItem = ({
1235
1090
  var LOCAL_STORAGE_KEY = "@sikka/hawa/keep-drawer-open";
1236
1091
  var AppLayout = ({
1237
1092
  profileMenuWidth = "default",
1093
+ userInfoPosition = "next_to_avatar",
1238
1094
  DrawerFooterActions,
1095
+ profileMenuItems,
1239
1096
  classNames,
1240
1097
  bordered = true,
1241
1098
  design = "default",
@@ -1268,9 +1125,7 @@ var AppLayout = ({
1268
1125
  };
1269
1126
  const isRTL = direction === "rtl";
1270
1127
  const [openedSidebarItem, setOpenedSidebarItem] = useState2("");
1271
- const [size, setSize] = useState2(
1272
- typeof window !== "undefined" && window.innerWidth || 1200
1273
- );
1128
+ const [size, setSize] = useState2(typeof window !== "undefined" && window.innerWidth || 1200);
1274
1129
  const [openSideMenu, setOpenSideMenu] = useState2(() => {
1275
1130
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY);
1276
1131
  return savedState ? JSON.parse(savedState) : false;
@@ -1325,6 +1180,18 @@ var AppLayout = ({
1325
1180
  }
1326
1181
  }, [size, keepDrawerOpen]);
1327
1182
  const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
1183
+ let finalProfileMenuItems = profileMenuItems;
1184
+ if (userInfoPosition === "in_dropdown") {
1185
+ if (profileMenuItems && profileMenuItems.length > 0) {
1186
+ finalProfileMenuItems = [
1187
+ {
1188
+ content: /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-end hawa-p-2 hawa-text-xs hawa-flex hawa-flex-col hawa-justify-center hawa-items-start" }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-font-bold" }, props.username), /* @__PURE__ */ React12.createElement("div", null, props.email)),
1189
+ itemType: "custom"
1190
+ },
1191
+ ...profileMenuItems
1192
+ ];
1193
+ }
1194
+ }
1328
1195
  return /* @__PURE__ */ React12.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ React12.createElement(
1329
1196
  "div",
1330
1197
  {
@@ -1337,10 +1204,7 @@ var AppLayout = ({
1337
1204
  size > 600 ? /* @__PURE__ */ React12.createElement(
1338
1205
  "div",
1339
1206
  {
1340
- className: cn(
1341
- "dark:hawa-text-white",
1342
- size > 600 ? "hawa-ms-14" : "hawa-ms-2"
1343
- ),
1207
+ className: cn("dark:hawa-text-white", size > 600 ? "hawa-ms-14" : "hawa-ms-2"),
1344
1208
  style: {
1345
1209
  marginInlineStart: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] + 10}px`
1346
1210
  }
@@ -1365,7 +1229,7 @@ var AppLayout = ({
1365
1229
  props.pageTitle ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React12.createElement("div", null)
1366
1230
  )
1367
1231
  ),
1368
- /* @__PURE__ */ React12.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ React12.createElement("div", null, props.email)) : null, /* @__PURE__ */ React12.createElement(
1232
+ /* @__PURE__ */ React12.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 && userInfoPosition === "next_to_avatar" ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-end hawa-text-xs hawa-flex hawa-flex-col hawa-justify-center" }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-font-bold" }, props.username), /* @__PURE__ */ React12.createElement("div", null, props.email)) : null, /* @__PURE__ */ React12.createElement(
1369
1233
  DropdownMenu,
1370
1234
  {
1371
1235
  LinkComponent: MenuLinkComponent,
@@ -1375,7 +1239,7 @@ var AppLayout = ({
1375
1239
  sideOffset: 10,
1376
1240
  width: profileMenuWidth,
1377
1241
  direction,
1378
- items: props.profileMenuItems || [],
1242
+ items: finalProfileMenuItems || [],
1379
1243
  onItemSelect: (e) => console.log("selecting item ", e),
1380
1244
  trigger: /* @__PURE__ */ React12.createElement(
1381
1245
  "div",
@@ -1526,10 +1390,7 @@ var AppLayout = ({
1526
1390
  size: "smallIcon",
1527
1391
  onClick: () => {
1528
1392
  const newKeepOpenState = !keepDrawerOpen;
1529
- localStorage.setItem(
1530
- LOCAL_STORAGE_KEY,
1531
- JSON.stringify(newKeepOpenState)
1532
- );
1393
+ localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(newKeepOpenState));
1533
1394
  setKeepDrawerOpen(newKeepOpenState);
1534
1395
  }
1535
1396
  },
@@ -1555,14 +1416,7 @@ var AppLayout = ({
1555
1416
  )
1556
1417
  ) : null
1557
1418
  )
1558
- )), /* @__PURE__ */ React12.createElement(
1559
- Dialog.Root,
1560
- {
1561
- open: size < 600 && openSideMenu,
1562
- onOpenChange: setOpenSideMenu
1563
- },
1564
- /* @__PURE__ */ React12.createElement(Dialog.Portal, { container }, /* @__PURE__ */ React12.createElement(Dialog.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/20 hawa-backdrop-blur-[2px] data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
1565
- ), /* @__PURE__ */ React12.createElement(
1419
+ )), /* @__PURE__ */ React12.createElement(Dialog.Root, { open: size < 600 && openSideMenu, onOpenChange: setOpenSideMenu }, /* @__PURE__ */ React12.createElement(Dialog.Portal, { container }, /* @__PURE__ */ React12.createElement(Dialog.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/20 hawa-backdrop-blur-[2px] data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))), /* @__PURE__ */ React12.createElement(
1566
1420
  "div",
1567
1421
  {
1568
1422
  className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",