@sikka/hawa 0.26.31 → 0.26.32

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 (216) hide show
  1. package/dist/{Toast-pOd4uGZz.d.ts → Toast-YaClwi7z.d.ts} +9 -1
  2. package/dist/{Toast-VBd4UvlM.d.mts → Toast-ySvjL_-K.d.mts} +9 -1
  3. package/dist/accordion/index.mjs +7 -4
  4. package/dist/accordion/index.mjs.map +1 -1
  5. package/dist/alert/index.js +4 -4
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +11 -8
  8. package/dist/alert/index.mjs.map +1 -1
  9. package/dist/appLayout/index.js +2 -1
  10. package/dist/appLayout/index.js.map +1 -1
  11. package/dist/appLayout/index.mjs +9 -5
  12. package/dist/appLayout/index.mjs.map +1 -1
  13. package/dist/appMenubar/index.mjs +9 -4
  14. package/dist/appMenubar/index.mjs.map +1 -1
  15. package/dist/appTabs/index.mjs +9 -4
  16. package/dist/appTabs/index.mjs.map +1 -1
  17. package/dist/appTopbar/index.mjs +9 -4
  18. package/dist/appTopbar/index.mjs.map +1 -1
  19. package/dist/avatar/index.js +2 -1
  20. package/dist/avatar/index.js.map +1 -1
  21. package/dist/avatar/index.mjs +9 -5
  22. package/dist/avatar/index.mjs.map +1 -1
  23. package/dist/backToTop/index.js +6 -3
  24. package/dist/backToTop/index.js.map +1 -1
  25. package/dist/backToTop/index.mjs +13 -7
  26. package/dist/backToTop/index.mjs.map +1 -1
  27. package/dist/badge/index.js +4 -3
  28. package/dist/badge/index.js.map +1 -1
  29. package/dist/badge/index.mjs +13 -7
  30. package/dist/badge/index.mjs.map +1 -1
  31. package/dist/button/index.mjs +7 -4
  32. package/dist/button/index.mjs.map +1 -1
  33. package/dist/card/index.mjs +9 -4
  34. package/dist/card/index.mjs.map +1 -1
  35. package/dist/carousel/index.js +10 -10
  36. package/dist/carousel/index.js.map +1 -1
  37. package/dist/carousel/index.mjs +19 -14
  38. package/dist/carousel/index.mjs.map +1 -1
  39. package/dist/checkbox/index.mjs +9 -4
  40. package/dist/checkbox/index.mjs.map +1 -1
  41. package/dist/chip/index.mjs +9 -4
  42. package/dist/chip/index.mjs.map +1 -1
  43. package/dist/chunk-A3ERTYS4.mjs +29 -0
  44. package/dist/codeBlock/index.mjs +83 -23
  45. package/dist/codeBlock/index.mjs.map +1 -1
  46. package/dist/collapsible/index.mjs +0 -2
  47. package/dist/collapsible/index.mjs.map +1 -1
  48. package/dist/colorPicker/index.js +2 -1
  49. package/dist/colorPicker/index.js.map +1 -1
  50. package/dist/colorPicker/index.mjs +92 -20
  51. package/dist/colorPicker/index.mjs.map +1 -1
  52. package/dist/combobox/index.js +4 -3
  53. package/dist/combobox/index.js.map +1 -1
  54. package/dist/combobox/index.mjs +445 -27
  55. package/dist/combobox/index.mjs.map +1 -1
  56. package/dist/command/index.mjs +429 -11
  57. package/dist/command/index.mjs.map +1 -1
  58. package/dist/dataTable/index.js +36 -27
  59. package/dist/dataTable/index.js.map +1 -1
  60. package/dist/dataTable/index.mjs +43 -31
  61. package/dist/dataTable/index.mjs.map +1 -1
  62. package/dist/destroyableCard/index.js +2 -2
  63. package/dist/destroyableCard/index.js.map +1 -1
  64. package/dist/destroyableCard/index.mjs +9 -6
  65. package/dist/destroyableCard/index.mjs.map +1 -1
  66. package/dist/dialog/index.mjs +9 -4
  67. package/dist/dialog/index.mjs.map +1 -1
  68. package/dist/docsLayout/index.js +2 -2
  69. package/dist/docsLayout/index.js.map +1 -1
  70. package/dist/docsLayout/index.mjs +9 -6
  71. package/dist/docsLayout/index.mjs.map +1 -1
  72. package/dist/docsSidebar/index.js +2 -2
  73. package/dist/docsSidebar/index.js.map +1 -1
  74. package/dist/docsSidebar/index.mjs +11 -6
  75. package/dist/docsSidebar/index.mjs.map +1 -1
  76. package/dist/dropdownMenu/index.mjs +9 -4
  77. package/dist/dropdownMenu/index.mjs.map +1 -1
  78. package/dist/elements/index.d.mts +4 -2
  79. package/dist/elements/index.d.ts +4 -2
  80. package/dist/elements/index.js +7 -134
  81. package/dist/elements/index.mjs +9 -13
  82. package/dist/fileDropzone/index.js +12 -11
  83. package/dist/fileDropzone/index.js.map +1 -1
  84. package/dist/fileDropzone/index.mjs +21 -17
  85. package/dist/fileDropzone/index.mjs.map +1 -1
  86. package/dist/fileUploader/index.js +2 -1
  87. package/dist/fileUploader/index.js.map +1 -1
  88. package/dist/fileUploader/index.mjs +2 -1
  89. package/dist/fileUploader/index.mjs.map +1 -1
  90. package/dist/glow/index.js +24 -17
  91. package/dist/glow/index.js.map +1 -1
  92. package/dist/glow/index.mjs +24 -17
  93. package/dist/glow/index.mjs.map +1 -1
  94. package/dist/hooks/index.d.mts +9 -18
  95. package/dist/hooks/index.d.ts +9 -18
  96. package/dist/hooks/index.mjs +146 -27
  97. package/dist/index.d.mts +18 -17
  98. package/dist/index.d.ts +18 -17
  99. package/dist/index.js +166 -171
  100. package/dist/index.mjs +588 -593
  101. package/dist/input/index.js +3 -2
  102. package/dist/input/index.js.map +1 -1
  103. package/dist/input/index.mjs +118 -19
  104. package/dist/input/index.mjs.map +1 -1
  105. package/dist/interfaceSettings/index.js +6 -4
  106. package/dist/interfaceSettings/index.js.map +1 -1
  107. package/dist/interfaceSettings/index.mjs +130 -28
  108. package/dist/interfaceSettings/index.mjs.map +1 -1
  109. package/dist/label/index.mjs +7 -4
  110. package/dist/label/index.mjs.map +1 -1
  111. package/dist/loading/index.mjs +9 -4
  112. package/dist/loading/index.mjs.map +1 -1
  113. package/dist/navbar/index.js +3 -2
  114. package/dist/navbar/index.js.map +1 -1
  115. package/dist/navbar/index.mjs +10 -6
  116. package/dist/navbar/index.mjs.map +1 -1
  117. package/dist/navigationMenu/index.mjs +9 -4
  118. package/dist/navigationMenu/index.mjs.map +1 -1
  119. package/dist/pagination/index.mjs +9 -4
  120. package/dist/pagination/index.mjs.map +1 -1
  121. package/dist/passwordInput/index.js +3 -2
  122. package/dist/passwordInput/index.js.map +1 -1
  123. package/dist/passwordInput/index.mjs +12 -6
  124. package/dist/passwordInput/index.mjs.map +1 -1
  125. package/dist/phoneInput/index.js +10 -5
  126. package/dist/phoneInput/index.js.map +1 -1
  127. package/dist/phoneInput/index.mjs +19 -11
  128. package/dist/phoneInput/index.mjs.map +1 -1
  129. package/dist/pinInput/index.js +3 -3
  130. package/dist/pinInput/index.js.map +1 -1
  131. package/dist/pinInput/index.mjs +12 -7
  132. package/dist/pinInput/index.mjs.map +1 -1
  133. package/dist/popover/index.mjs +9 -4
  134. package/dist/popover/index.mjs.map +1 -1
  135. package/dist/progress/index.mjs +9 -4
  136. package/dist/progress/index.mjs.map +1 -1
  137. package/dist/progressCircle/index.js +2 -2
  138. package/dist/progressCircle/index.js.map +1 -1
  139. package/dist/progressCircle/index.mjs +11 -6
  140. package/dist/progressCircle/index.mjs.map +1 -1
  141. package/dist/radio/index.js +6 -4
  142. package/dist/radio/index.js.map +1 -1
  143. package/dist/radio/index.mjs +13 -8
  144. package/dist/radio/index.mjs.map +1 -1
  145. package/dist/scrollArea/index.mjs +9 -4
  146. package/dist/scrollArea/index.mjs.map +1 -1
  147. package/dist/scrollIndicator/index.js +2 -1
  148. package/dist/scrollIndicator/index.js.map +1 -1
  149. package/dist/scrollIndicator/index.mjs +2 -1
  150. package/dist/scrollIndicator/index.mjs.map +1 -1
  151. package/dist/select/index.js +6 -2
  152. package/dist/select/index.js.map +1 -1
  153. package/dist/select/index.mjs +15 -8
  154. package/dist/select/index.mjs.map +1 -1
  155. package/dist/separator/index.mjs +9 -4
  156. package/dist/separator/index.mjs.map +1 -1
  157. package/dist/sheet/index.mjs +9 -4
  158. package/dist/sheet/index.mjs.map +1 -1
  159. package/dist/sidebar/index.mjs +9 -4
  160. package/dist/sidebar/index.mjs.map +1 -1
  161. package/dist/signature/index.js +31 -11
  162. package/dist/signature/index.js.map +1 -1
  163. package/dist/signature/index.mjs +40 -15
  164. package/dist/signature/index.mjs.map +1 -1
  165. package/dist/simpleTable/index.js +18 -14
  166. package/dist/simpleTable/index.js.map +1 -1
  167. package/dist/simpleTable/index.mjs +25 -18
  168. package/dist/simpleTable/index.mjs.map +1 -1
  169. package/dist/skeleton/index.mjs +9 -4
  170. package/dist/skeleton/index.mjs.map +1 -1
  171. package/dist/slider/index.mjs +9 -4
  172. package/dist/slider/index.mjs.map +1 -1
  173. package/dist/sortButton/index.mjs +268 -11
  174. package/dist/sortButton/index.mjs.map +1 -1
  175. package/dist/splitButton/index.mjs +267 -12
  176. package/dist/splitButton/index.mjs.map +1 -1
  177. package/dist/switch/index.js +2 -1
  178. package/dist/switch/index.js.map +1 -1
  179. package/dist/switch/index.mjs +11 -5
  180. package/dist/switch/index.mjs.map +1 -1
  181. package/dist/table/index.mjs +9 -4
  182. package/dist/table/index.mjs.map +1 -1
  183. package/dist/tabs/index.mjs +7 -4
  184. package/dist/tabs/index.mjs.map +1 -1
  185. package/dist/textarea/index.js +4 -4
  186. package/dist/textarea/index.js.map +1 -1
  187. package/dist/textarea/index.mjs +11 -8
  188. package/dist/textarea/index.mjs.map +1 -1
  189. package/dist/toast/index.d.mts +9 -1
  190. package/dist/toast/index.d.ts +9 -1
  191. package/dist/toast/index.js +3 -3
  192. package/dist/toast/index.js.map +1 -1
  193. package/dist/toast/index.mjs +145 -10
  194. package/dist/toast/index.mjs.map +1 -1
  195. package/dist/toaster/index.d.mts +5 -0
  196. package/dist/toaster/index.d.ts +5 -0
  197. package/dist/toaster/index.js +17 -142
  198. package/dist/toaster/index.js.map +1 -1
  199. package/dist/toaster/index.mjs +142 -135
  200. package/dist/toaster/index.mjs.map +1 -1
  201. package/package.json +1 -1
  202. package/dist/chunk-3ODWQVIA.mjs +0 -12
  203. package/dist/chunk-3ODWQVIA.mjs.map +0 -1
  204. package/dist/chunk-53OZVR57.mjs +0 -108
  205. package/dist/chunk-53OZVR57.mjs.map +0 -1
  206. package/dist/chunk-CBRGWUZG.mjs +0 -11
  207. package/dist/chunk-CBRGWUZG.mjs.map +0 -1
  208. package/dist/chunk-HYXZRCZW.mjs +0 -265
  209. package/dist/chunk-HYXZRCZW.mjs.map +0 -1
  210. package/dist/chunk-JNUGOUYJ.mjs +0 -154
  211. package/dist/chunk-JX5YLRCU.mjs +0 -443
  212. package/dist/chunk-JX5YLRCU.mjs.map +0 -1
  213. package/dist/chunk-NV3KR5Y7.mjs +0 -82
  214. package/dist/chunk-NV3KR5Y7.mjs.map +0 -1
  215. package/dist/chunk-OQ7MNEYW.mjs +0 -151
  216. package/dist/chunk-OQ7MNEYW.mjs.map +0 -1
@@ -1,19 +1,17 @@
1
- import {
2
- Command,
3
- CommandEmpty,
4
- CommandGroup,
5
- CommandInput,
6
- CommandItem,
7
- cn
8
- } from "../chunk-JX5YLRCU.mjs";
9
-
10
1
  // elements/combobox/Combobox.tsx
11
- import * as React5 from "react";
2
+ import * as React7 from "react";
12
3
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
13
4
 
14
5
  // elements/label/Label.tsx
15
6
  import * as React2 from "react";
16
7
 
8
+ // util/index.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
17
15
  // elements/tooltip/Tooltip.tsx
18
16
  import React from "react";
19
17
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
@@ -153,8 +151,427 @@ function Skeleton({
153
151
  );
154
152
  }
155
153
 
154
+ // elements/command/Command.tsx
155
+ import * as React6 from "react";
156
+ import { Command as CommandPrimitive } from "cmdk";
157
+
158
+ // elements/dialog/Dialog.tsx
159
+ import * as React5 from "react";
160
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
161
+ var DialogPortal = ({ ...props }) => /* @__PURE__ */ React5.createElement(DialogPrimitive.Portal, { ...props });
162
+ var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
163
+ DialogPrimitive.Overlay,
164
+ {
165
+ ref,
166
+ className: cn(
167
+ "hawa-fixed hawa-inset-0 hawa-z-50 hawa-bg-background/80 hawa-backdrop-blur-sm 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",
168
+ className
169
+ ),
170
+ ...props
171
+ }
172
+ ));
173
+ var DialogContent = React5.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React5.createElement(DialogPortal, null, /* @__PURE__ */ React5.createElement(DialogOverlay, null), /* @__PURE__ */ React5.createElement(
174
+ DialogPrimitive.Content,
175
+ {
176
+ onPointerDownOutside: (e) => {
177
+ if (persist) {
178
+ e.preventDefault();
179
+ }
180
+ },
181
+ ref,
182
+ className: cn(
183
+ "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 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-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] sm:hawa-rounded md:hawa-w-full",
184
+ className
185
+ ),
186
+ ...props
187
+ },
188
+ children,
189
+ !hideCloseButton && /* @__PURE__ */ React5.createElement(
190
+ DialogPrimitive.Close,
191
+ {
192
+ className: cn(
193
+ "hawa-absolute hawa-top-4 hawa-rounded hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-accent data-[state=open]:hawa-text-muted-foreground",
194
+ props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
195
+ )
196
+ },
197
+ /* @__PURE__ */ React5.createElement(
198
+ "svg",
199
+ {
200
+ "aria-label": "Close Icon",
201
+ "aria-hidden": "true",
202
+ className: "hawa-h-5 hawa-w-5",
203
+ fill: "currentColor",
204
+ viewBox: "0 0 20 20"
205
+ },
206
+ /* @__PURE__ */ React5.createElement(
207
+ "path",
208
+ {
209
+ fillRule: "evenodd",
210
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
211
+ clipRule: "evenodd"
212
+ }
213
+ )
214
+ ),
215
+ /* @__PURE__ */ React5.createElement("span", { className: "hawa-sr-only" }, "Close")
216
+ )
217
+ )));
218
+ var DialogCarouselContent = React5.forwardRef(
219
+ ({
220
+ className,
221
+ children,
222
+ onPrev,
223
+ persist,
224
+ hideCloseButton,
225
+ hidePrevButton,
226
+ ...props
227
+ }, ref) => /* @__PURE__ */ React5.createElement(DialogPortal, null, /* @__PURE__ */ React5.createElement(DialogOverlay, null), /* @__PURE__ */ React5.createElement(
228
+ DialogPrimitive.Content,
229
+ {
230
+ onPointerDownOutside: (e) => {
231
+ if (persist) {
232
+ e.preventDefault();
233
+ }
234
+ },
235
+ ref,
236
+ className: cn(
237
+ "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-pt-14 hawa-shadow-lg hawa-transition-all hawa-duration-200 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-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] sm:hawa-rounded md:hawa-w-full",
238
+ className
239
+ ),
240
+ ...props
241
+ },
242
+ children,
243
+ /* @__PURE__ */ React5.createElement(
244
+ "div",
245
+ {
246
+ className: cn(
247
+ "hawa-absolute hawa-top-0 hawa-flex hawa-w-full hawa-flex-row hawa-p-4",
248
+ onPrev ? "hawa-justify-between" : "hawa-justify-end"
249
+ )
250
+ },
251
+ hidePrevButton ? /* @__PURE__ */ React5.createElement("div", null) : /* @__PURE__ */ React5.createElement(
252
+ "div",
253
+ {
254
+ onClick: onPrev,
255
+ className: cn(
256
+ "hawa-end-0 hawa-cursor-pointer hawa-rounded hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-accent data-[state=open]:hawa-text-muted-foreground",
257
+ props.dir === "rtl" && "hawa-rotate-180"
258
+ )
259
+ },
260
+ /* @__PURE__ */ React5.createElement(
261
+ "svg",
262
+ {
263
+ xmlns: "http://www.w3.org/2000/svg",
264
+ width: "24",
265
+ height: "24",
266
+ viewBox: "0 0 24 24",
267
+ fill: "none",
268
+ className: "hawa-h-6 hawa-w-6",
269
+ stroke: "currentColor",
270
+ strokeWidth: "2",
271
+ strokeLinecap: "round",
272
+ strokeLinejoin: "round"
273
+ },
274
+ /* @__PURE__ */ React5.createElement("path", { d: "m15 18-6-6 6-6" })
275
+ )
276
+ ),
277
+ !hideCloseButton && /* @__PURE__ */ React5.createElement(
278
+ DialogPrimitive.Close,
279
+ {
280
+ className: cn(
281
+ "hawa-end-0 hawa-rounded hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-accent data-[state=open]:hawa-text-muted-foreground ",
282
+ props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
283
+ )
284
+ },
285
+ /* @__PURE__ */ React5.createElement(
286
+ "svg",
287
+ {
288
+ "aria-label": "Close Icon",
289
+ "aria-hidden": "true",
290
+ className: "hawa-h-6 hawa-w-6",
291
+ fill: "currentColor",
292
+ viewBox: "0 0 20 20"
293
+ },
294
+ /* @__PURE__ */ React5.createElement(
295
+ "path",
296
+ {
297
+ fillRule: "evenodd",
298
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
299
+ clipRule: "evenodd"
300
+ }
301
+ )
302
+ ),
303
+ /* @__PURE__ */ React5.createElement("span", { className: "hawa-sr-only" }, "Close")
304
+ )
305
+ )
306
+ ))
307
+ );
308
+ var DialogHeader = ({
309
+ className,
310
+ ...props
311
+ }) => /* @__PURE__ */ React5.createElement(
312
+ "div",
313
+ {
314
+ className: cn(
315
+ "hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-text-center sm:hawa-text-left",
316
+ className
317
+ ),
318
+ ...props
319
+ }
320
+ );
321
+ var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
322
+ DialogPrimitive.Title,
323
+ {
324
+ ref,
325
+ className: cn(
326
+ "hawa-text-start hawa-text-lg hawa-font-semibold hawa-leading-none hawa-tracking-tight",
327
+ className
328
+ ),
329
+ ...props
330
+ }
331
+ ));
332
+ var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
333
+ DialogPrimitive.Description,
334
+ {
335
+ ref,
336
+ className: cn(
337
+ "hawa-text-start hawa-text-sm hawa-text-muted-foreground",
338
+ className
339
+ ),
340
+ ...props
341
+ }
342
+ ));
343
+ var DialogFooter = ({
344
+ className,
345
+ ...props
346
+ }) => /* @__PURE__ */ React5.createElement(
347
+ "div",
348
+ {
349
+ className: cn(
350
+ "hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-gap-2",
351
+ className
352
+ ),
353
+ ...props
354
+ }
355
+ );
356
+ var DialogCarousel = ({
357
+ stepsApi,
358
+ stepsRef,
359
+ children,
360
+ direction
361
+ }) => {
362
+ React5.useEffect(() => {
363
+ if (stepsApi) {
364
+ stepsApi.reInit();
365
+ }
366
+ }, [stepsApi, children]);
367
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React5.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React5.createElement(
368
+ "div",
369
+ {
370
+ className: "hawa-flex",
371
+ style: {
372
+ transition: "height 0.2s"
373
+ }
374
+ },
375
+ React5.Children.map(children, (child, index) => /* @__PURE__ */ React5.createElement(
376
+ "div",
377
+ {
378
+ className: cn(
379
+ "hawa-flex hawa-h-fit hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
380
+ ),
381
+ key: index
382
+ },
383
+ child
384
+ ))
385
+ )));
386
+ };
387
+ var DialogSteps = ({
388
+ currentStep,
389
+ visibleStepRef,
390
+ children
391
+ }) => {
392
+ const [dialogHeight, setDialogHeight] = React5.useState(null);
393
+ React5.useEffect(() => {
394
+ if (visibleStepRef.current) {
395
+ setDialogHeight(visibleStepRef.current.offsetHeight);
396
+ console.log("height is ", visibleStepRef.current.offsetHeight);
397
+ }
398
+ }, [currentStep, visibleStepRef]);
399
+ return /* @__PURE__ */ React5.createElement(
400
+ "div",
401
+ {
402
+ className: "hawa-relative hawa-overflow-clip",
403
+ style: {
404
+ height: dialogHeight || "fit-content",
405
+ transition: "height 0.2s"
406
+ }
407
+ },
408
+ React5.Children.map(children, (child, index) => /* @__PURE__ */ React5.createElement(
409
+ "div",
410
+ {
411
+ ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
412
+ className: cn(
413
+ currentStep === `step-${index + 1}` ? "hawa-visible hawa-block" : "hawa-invisible hawa-hidden"
414
+ )
415
+ },
416
+ child
417
+ ))
418
+ );
419
+ };
420
+ var DialogStep = ({
421
+ id,
422
+ children,
423
+ className,
424
+ stepRef
425
+ }) => {
426
+ return /* @__PURE__ */ React5.createElement(
427
+ "div",
428
+ {
429
+ id,
430
+ ref: stepRef,
431
+ className: cn("hawa-w-full hawa-px-1", className)
432
+ },
433
+ children
434
+ );
435
+ };
436
+ var DialogBody = ({ children, className }) => {
437
+ return /* @__PURE__ */ React5.createElement("div", { className: cn("hawa-py-6", className) }, children);
438
+ };
439
+ DialogBody.displayName = "DialogBody";
440
+ DialogStep.displayName = "DialogStep";
441
+ DialogSteps.displayName = "DialogSteps";
442
+ DialogCarousel.displayName = "DialogCarousel";
443
+ DialogCarouselContent.displayName = "DialogCarouselContent";
444
+ DialogHeader.displayName = "DialogHeader";
445
+ DialogFooter.displayName = "DialogFooter";
446
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
447
+ DialogPortal.displayName = DialogPrimitive.Portal.displayName;
448
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
449
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
450
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
451
+
452
+ // elements/command/Command.tsx
453
+ var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
454
+ CommandPrimitive,
455
+ {
456
+ ref,
457
+ className: cn(
458
+ "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-overflow-hidden hawa-rounded-md hawa-bg-popover hawa-text-popover-foreground",
459
+ className
460
+ ),
461
+ ...props
462
+ }
463
+ ));
464
+ Command.displayName = CommandPrimitive.displayName;
465
+ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
466
+ "div",
467
+ {
468
+ className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
469
+ "cmdk-input-wrapper": ""
470
+ },
471
+ /* @__PURE__ */ React6.createElement(
472
+ "svg",
473
+ {
474
+ "aria-label": "Search Icon",
475
+ xmlns: "http://www.w3.org/2000/svg",
476
+ width: "24",
477
+ height: "24",
478
+ viewBox: "0 0 24 24",
479
+ fill: "none",
480
+ stroke: "currentColor",
481
+ strokeWidth: "2",
482
+ strokeLinecap: "round",
483
+ strokeLinejoin: "round",
484
+ className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
485
+ },
486
+ /* @__PURE__ */ React6.createElement("circle", { cx: "11", cy: "11", r: "8" }),
487
+ /* @__PURE__ */ React6.createElement("path", { d: "m21 21-4.3-4.3" })
488
+ ),
489
+ /* @__PURE__ */ React6.createElement(
490
+ CommandPrimitive.Input,
491
+ {
492
+ ref,
493
+ className: cn(
494
+ "hawa-flex hawa-h-11 hawa-w-full hawa-rounded-md hawa-bg-transparent hawa-py-3 hawa-text-sm hawa-outline-none placeholder:hawa-text-muted-foreground disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
495
+ className
496
+ ),
497
+ ...props
498
+ }
499
+ )
500
+ ));
501
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
502
+ var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
503
+ CommandPrimitive.List,
504
+ {
505
+ ref,
506
+ className: cn(
507
+ "hawa-max-h-[300px] hawa-overflow-y-auto hawa-overflow-x-hidden",
508
+ className
509
+ ),
510
+ ...props
511
+ }
512
+ ));
513
+ CommandList.displayName = CommandPrimitive.List.displayName;
514
+ var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(
515
+ CommandPrimitive.Empty,
516
+ {
517
+ ref,
518
+ className: "hawa-py-6 hawa-text-center hawa-text-sm",
519
+ ...props
520
+ }
521
+ ));
522
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
523
+ var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
524
+ CommandPrimitive.Group,
525
+ {
526
+ ref,
527
+ className: cn(
528
+ "hawa-overflow-hidden hawa-p-1 hawa-text-foreground [&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-py-1.5 [&_[cmdk-group-heading]]:hawa-text-xs [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground",
529
+ className
530
+ ),
531
+ ...props
532
+ }
533
+ ));
534
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
535
+ var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
536
+ CommandPrimitive.Separator,
537
+ {
538
+ ref,
539
+ className: cn("hawa--mx-1 hawa-h-px hawa-bg-border", className),
540
+ ...props
541
+ }
542
+ ));
543
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
544
+ var CommandItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
545
+ CommandPrimitive.Item,
546
+ {
547
+ ref,
548
+ className: cn(
549
+ "hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-outline-none aria-selected:hawa-bg-accent aria-selected:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
550
+ className
551
+ ),
552
+ ...props
553
+ }
554
+ ));
555
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
556
+ var CommandShortcut = ({
557
+ className,
558
+ ...props
559
+ }) => {
560
+ return /* @__PURE__ */ React6.createElement(
561
+ "span",
562
+ {
563
+ className: cn(
564
+ "hawa-ml-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
565
+ className
566
+ ),
567
+ ...props
568
+ }
569
+ );
570
+ };
571
+ CommandShortcut.displayName = "CommandShortcut";
572
+
156
573
  // elements/combobox/Combobox.tsx
157
- var Combobox = React5.forwardRef(
574
+ var Combobox = React7.forwardRef(
158
575
  ({
159
576
  labelKey = "label",
160
577
  valueKey = "value",
@@ -165,8 +582,9 @@ var Combobox = React5.forwardRef(
165
582
  data,
166
583
  ...props
167
584
  }, ref) => {
168
- const [open, setOpen] = React5.useState(false);
169
- const [value, setValue] = React5.useState(defaultValue);
585
+ var _a, _b, _c;
586
+ const [open, setOpen] = React7.useState(false);
587
+ const [value, setValue] = React7.useState(defaultValue);
170
588
  function getProperty(obj, key) {
171
589
  return obj[key];
172
590
  }
@@ -175,7 +593,7 @@ var Combobox = React5.forwardRef(
175
593
  setOpen(open2);
176
594
  }
177
595
  };
178
- return /* @__PURE__ */ React5.createElement(
596
+ return /* @__PURE__ */ React7.createElement(
179
597
  "div",
180
598
  {
181
599
  className: cn(
@@ -183,8 +601,8 @@ var Combobox = React5.forwardRef(
183
601
  props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
184
602
  )
185
603
  },
186
- props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label),
187
- /* @__PURE__ */ React5.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React5.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React5.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React5.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React5.createElement(
604
+ props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label),
605
+ /* @__PURE__ */ React7.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React7.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React7.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React7.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React7.createElement(
188
606
  "div",
189
607
  {
190
608
  className: cn(
@@ -192,7 +610,7 @@ var Combobox = React5.forwardRef(
192
610
  props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
193
611
  )
194
612
  }
195
- ), /* @__PURE__ */ React5.createElement(
613
+ ), /* @__PURE__ */ React7.createElement(
196
614
  "button",
197
615
  {
198
616
  role: "combobox",
@@ -206,8 +624,8 @@ var Combobox = React5.forwardRef(
206
624
  value ? getProperty(
207
625
  data.find((item) => item[valueKey] === value) || {},
208
626
  labelKey
209
- ) : props.texts?.placeholder || ". . .",
210
- /* @__PURE__ */ React5.createElement(
627
+ ) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || ". . .",
628
+ /* @__PURE__ */ React7.createElement(
211
629
  "svg",
212
630
  {
213
631
  xmlns: "http://www.w3.org/2000/svg",
@@ -223,9 +641,9 @@ var Combobox = React5.forwardRef(
223
641
  strokeLinecap: "round",
224
642
  strokeLinejoin: "round"
225
643
  },
226
- /* @__PURE__ */ React5.createElement("path", { d: "m6 9 6 6 6-6" })
644
+ /* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
227
645
  )
228
- ), /* @__PURE__ */ React5.createElement(
646
+ ), /* @__PURE__ */ React7.createElement(
229
647
  "p",
230
648
  {
231
649
  className: cn(
@@ -234,20 +652,20 @@ var Combobox = React5.forwardRef(
234
652
  )
235
653
  },
236
654
  props.helperText
237
- ))), /* @__PURE__ */ React5.createElement(
655
+ ))), /* @__PURE__ */ React7.createElement(
238
656
  PopoverContent,
239
657
  {
240
658
  sideOffset: 0,
241
659
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
242
660
  dir: direction
243
661
  },
244
- /* @__PURE__ */ React5.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React5.createElement(
662
+ /* @__PURE__ */ React7.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React7.createElement(
245
663
  CommandInput,
246
664
  {
247
665
  dir: direction,
248
- placeholder: props.texts?.searchPlaceholder || "Search"
666
+ placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
249
667
  }
250
- ), /* @__PURE__ */ React5.createElement(CommandEmpty, null, props.texts?.noItems || "No items found."), /* @__PURE__ */ React5.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React5.createElement(
668
+ ), /* @__PURE__ */ React7.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React7.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React7.createElement(
251
669
  CommandItem,
252
670
  {
253
671
  key: i,
@@ -262,7 +680,7 @@ var Combobox = React5.forwardRef(
262
680
  setOpen(false);
263
681
  }
264
682
  },
265
- /* @__PURE__ */ React5.createElement(
683
+ /* @__PURE__ */ React7.createElement(
266
684
  "svg",
267
685
  {
268
686
  "aria-label": "Check Icon",
@@ -281,7 +699,7 @@ var Combobox = React5.forwardRef(
281
699
  ),
282
700
  style: { marginInlineEnd: "0.5rem" }
283
701
  },
284
- /* @__PURE__ */ React5.createElement("polyline", { points: "20 6 9 17 4 12" })
702
+ /* @__PURE__ */ React7.createElement("polyline", { points: "20 6 9 17 4 12" })
285
703
  ),
286
704
  getProperty(item, labelKey)
287
705
  ))))