@sikka/hawa 0.29.14-next → 0.30.1-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/alert/index.d.mts +5 -4
  2. package/dist/alert/index.d.ts +5 -4
  3. package/dist/alert/index.js +10 -6
  4. package/dist/alert/index.js.map +1 -1
  5. package/dist/alert/index.mjs +10 -6
  6. package/dist/alert/index.mjs.map +1 -1
  7. package/dist/blocks/auth/index.d.mts +2 -0
  8. package/dist/blocks/auth/index.d.ts +2 -0
  9. package/dist/blocks/auth/index.js +17 -7
  10. package/dist/blocks/auth/index.mjs +17 -7
  11. package/dist/blocks/feedback/index.js +15 -13
  12. package/dist/blocks/feedback/index.mjs +15 -13
  13. package/dist/blocks/index.d.mts +2 -0
  14. package/dist/blocks/index.d.ts +2 -0
  15. package/dist/blocks/index.js +32 -20
  16. package/dist/blocks/index.mjs +8 -2
  17. package/dist/{chunk-XKVSLAKW.mjs → chunk-Q754X27Z.mjs} +25 -19
  18. package/dist/combobox/index.d.mts +1 -0
  19. package/dist/combobox/index.d.ts +1 -0
  20. package/dist/combobox/index.js +224 -218
  21. package/dist/combobox/index.js.map +1 -1
  22. package/dist/combobox/index.mjs +224 -218
  23. package/dist/combobox/index.mjs.map +1 -1
  24. package/dist/command/index.js +1 -1
  25. package/dist/command/index.js.map +1 -1
  26. package/dist/command/index.mjs +1 -1
  27. package/dist/command/index.mjs.map +1 -1
  28. package/dist/dataTable/index.d.mts +1 -1
  29. package/dist/dataTable/index.d.ts +1 -1
  30. package/dist/dataTable/index.js.map +1 -1
  31. package/dist/dataTable/index.mjs.map +1 -1
  32. package/dist/dialog/index.d.mts +1 -0
  33. package/dist/dialog/index.d.ts +1 -0
  34. package/dist/dialog/index.js +1 -1
  35. package/dist/dialog/index.js.map +1 -1
  36. package/dist/dialog/index.mjs +1 -1
  37. package/dist/dialog/index.mjs.map +1 -1
  38. package/dist/elements/index.d.mts +14 -8
  39. package/dist/elements/index.d.ts +14 -8
  40. package/dist/elements/index.js +97 -87
  41. package/dist/elements/index.mjs +15 -11
  42. package/dist/fileDropzone/index.js +10 -6
  43. package/dist/fileDropzone/index.js.map +1 -1
  44. package/dist/fileDropzone/index.mjs +10 -6
  45. package/dist/fileDropzone/index.mjs.map +1 -1
  46. package/dist/index.d.mts +16 -8
  47. package/dist/index.d.ts +16 -8
  48. package/dist/index.js +104 -88
  49. package/dist/index.mjs +130 -114
  50. package/dist/passwordInput/index.js +15 -13
  51. package/dist/passwordInput/index.js.map +1 -1
  52. package/dist/passwordInput/index.mjs +15 -13
  53. package/dist/passwordInput/index.mjs.map +1 -1
  54. package/dist/popover/index.d.mts +3 -1
  55. package/dist/popover/index.d.ts +3 -1
  56. package/dist/popover/index.js +15 -13
  57. package/dist/popover/index.js.map +1 -1
  58. package/dist/popover/index.mjs +15 -13
  59. package/dist/popover/index.mjs.map +1 -1
  60. package/dist/simpleTable/index.d.mts +4 -3
  61. package/dist/simpleTable/index.d.ts +4 -3
  62. package/dist/simpleTable/index.js.map +1 -1
  63. package/dist/simpleTable/index.mjs.map +1 -1
  64. package/package.json +1 -1
@@ -39,9 +39,6 @@ module.exports = __toCommonJS(combobox_exports);
39
39
  var React7 = __toESM(require("react"));
40
40
  var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
41
41
 
42
- // elements/label/Label.tsx
43
- var React2 = __toESM(require("react"));
44
-
45
42
  // util/index.ts
46
43
  var import_clsx = require("clsx");
47
44
  var import_tailwind_merge = require("tailwind-merge");
@@ -49,182 +46,15 @@ function cn(...inputs) {
49
46
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
50
47
  }
51
48
 
52
- // elements/tooltip/Tooltip.tsx
53
- var import_react = __toESM(require("react"));
54
- var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
55
- var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
56
- TooltipPrimitive.Content,
57
- {
58
- ref,
59
- sideOffset,
60
- className: cn(
61
- "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
62
- {
63
- "hawa-text-xs": size === "small",
64
- "hawa-text-xl": size === "large"
65
- },
66
- className
67
- ),
68
- ...props
69
- }
70
- ));
71
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
72
- var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
73
- TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
74
- var Tooltip = ({
75
- side,
76
- size,
77
- open,
78
- content,
79
- children,
80
- disabled,
81
- defaultOpen,
82
- onOpenChange,
83
- triggerProps,
84
- contentProps,
85
- providerProps,
86
- delayDuration = 300,
87
- ...props
88
- }) => {
89
- return /* @__PURE__ */ import_react.default.createElement(
90
- TooltipPrimitive.TooltipProvider,
91
- {
92
- delayDuration,
93
- ...providerProps
94
- },
95
- /* @__PURE__ */ import_react.default.createElement(
96
- TooltipPrimitive.Root,
97
- {
98
- open: !disabled && open,
99
- defaultOpen,
100
- onOpenChange,
101
- ...props
102
- },
103
- /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
104
- /* @__PURE__ */ import_react.default.createElement(
105
- TooltipContent,
106
- {
107
- size,
108
- side,
109
- align: "center",
110
- ...contentProps,
111
- style: {
112
- ...contentProps == null ? void 0 : contentProps.style,
113
- maxWidth: "var(--radix-tooltip-content-available-width)",
114
- maxHeight: "var(--radix-tooltip-content-available-height)"
115
- }
116
- },
117
- content
118
- )
119
- )
120
- );
121
- };
122
-
123
- // elements/label/Label.tsx
124
- var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
125
- "label",
126
- {
127
- ref,
128
- className: cn(
129
- "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
130
- className
131
- ),
132
- ...props
133
- },
134
- children,
135
- required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
136
- ), hint && /* @__PURE__ */ React2.createElement(
137
- Tooltip,
138
- {
139
- content: hint,
140
- side: hintSide,
141
- triggerProps: {
142
- tabIndex: -1,
143
- onClick: (event) => event.preventDefault()
144
- }
145
- },
146
- /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
147
- "svg",
148
- {
149
- xmlns: "http://www.w3.org/2000/svg",
150
- className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
151
- viewBox: "0 0 24 24",
152
- fill: "none",
153
- stroke: "currentColor",
154
- strokeWidth: "2",
155
- strokeLinecap: "round",
156
- strokeLinejoin: "round"
157
- },
158
- /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
159
- /* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
160
- /* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
161
- ))
162
- )));
163
- Label.displayName = "Label";
164
-
165
- // elements/popover/Popover.tsx
166
- var React3 = __toESM(require("react"));
167
- var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
168
- var PopoverContent = React3.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React3.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React3.createElement(
169
- PopoverPrimitive.Content,
170
- {
171
- ref,
172
- align,
173
- sideOffset,
174
- className: cn(
175
- "dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
176
- className
177
- ),
178
- ...props
179
- }
180
- )));
181
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
182
- var PopoverTrigger = PopoverPrimitive.Trigger;
183
-
184
- // elements/skeleton/Skeleton.tsx
185
- var import_react2 = __toESM(require("react"));
186
- function Skeleton({
187
- className,
188
- content,
189
- animation = "pulse",
190
- fade,
191
- ...props
192
- }) {
193
- const animationStyles = {
194
- none: "hawa-rounded hawa-bg-muted",
195
- pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
196
- shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
197
- };
198
- const fadeStyle = {
199
- bottom: "hawa-mask-fade-bottom",
200
- top: "hawa-mask-fade-top",
201
- right: "hawa-mask-fade-right",
202
- left: "hawa-mask-fade-left "
203
- };
204
- return /* @__PURE__ */ import_react2.default.createElement(
205
- "div",
206
- {
207
- className: cn(
208
- animationStyles[animation],
209
- content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
210
- fade && fadeStyle[fade],
211
- className
212
- ),
213
- ...props
214
- },
215
- content && content
216
- );
217
- }
218
-
219
49
  // elements/command/Command.tsx
220
- var React6 = __toESM(require("react"));
50
+ var React2 = __toESM(require("react"));
221
51
  var import_cmdk = require("cmdk");
222
52
 
223
53
  // elements/dialog/Dialog.tsx
224
- var React5 = __toESM(require("react"));
54
+ var React = __toESM(require("react"));
225
55
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
226
- var DialogPortal = ({ ...props }) => /* @__PURE__ */ React5.createElement(DialogPrimitive.Portal, { ...props });
227
- var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
56
+ var DialogPortal = ({ ...props }) => /* @__PURE__ */ React.createElement(DialogPrimitive.Portal, { ...props });
57
+ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
228
58
  DialogPrimitive.Overlay,
229
59
  {
230
60
  ref,
@@ -235,7 +65,7 @@ var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PU
235
65
  ...props
236
66
  }
237
67
  ));
238
- var DialogContent = React5.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React5.createElement(DialogPortal, null, /* @__PURE__ */ React5.createElement(DialogOverlay, null), /* @__PURE__ */ React5.createElement(
68
+ var DialogContent = React.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React.createElement(DialogPortal, { container: props.container }, /* @__PURE__ */ React.createElement(DialogOverlay, null), /* @__PURE__ */ React.createElement(
239
69
  DialogPrimitive.Content,
240
70
  {
241
71
  onPointerDownOutside: (e) => {
@@ -251,7 +81,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
251
81
  ...props
252
82
  },
253
83
  children,
254
- !hideCloseButton && /* @__PURE__ */ React5.createElement(
84
+ !hideCloseButton && /* @__PURE__ */ React.createElement(
255
85
  DialogPrimitive.Close,
256
86
  {
257
87
  className: cn(
@@ -259,7 +89,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
259
89
  props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
260
90
  )
261
91
  },
262
- /* @__PURE__ */ React5.createElement(
92
+ /* @__PURE__ */ React.createElement(
263
93
  "svg",
264
94
  {
265
95
  "aria-label": "Close Icon",
@@ -268,7 +98,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
268
98
  fill: "currentColor",
269
99
  viewBox: "0 0 20 20"
270
100
  },
271
- /* @__PURE__ */ React5.createElement(
101
+ /* @__PURE__ */ React.createElement(
272
102
  "path",
273
103
  {
274
104
  fillRule: "evenodd",
@@ -277,10 +107,10 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
277
107
  }
278
108
  )
279
109
  ),
280
- /* @__PURE__ */ React5.createElement("span", { className: "hawa-sr-only" }, "Close")
110
+ /* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close")
281
111
  )
282
112
  )));
283
- var DialogCarouselContent = React5.forwardRef(
113
+ var DialogCarouselContent = React.forwardRef(
284
114
  ({
285
115
  className,
286
116
  children,
@@ -289,7 +119,7 @@ var DialogCarouselContent = React5.forwardRef(
289
119
  hideCloseButton,
290
120
  hidePrevButton,
291
121
  ...props
292
- }, ref) => /* @__PURE__ */ React5.createElement(DialogPortal, null, /* @__PURE__ */ React5.createElement(DialogOverlay, null), /* @__PURE__ */ React5.createElement(
122
+ }, ref) => /* @__PURE__ */ React.createElement(DialogPortal, null, /* @__PURE__ */ React.createElement(DialogOverlay, null), /* @__PURE__ */ React.createElement(
293
123
  DialogPrimitive.Content,
294
124
  {
295
125
  onPointerDownOutside: (e) => {
@@ -305,7 +135,7 @@ var DialogCarouselContent = React5.forwardRef(
305
135
  ...props
306
136
  },
307
137
  children,
308
- /* @__PURE__ */ React5.createElement(
138
+ /* @__PURE__ */ React.createElement(
309
139
  "div",
310
140
  {
311
141
  className: cn(
@@ -313,7 +143,7 @@ var DialogCarouselContent = React5.forwardRef(
313
143
  onPrev ? "hawa-justify-between" : "hawa-justify-end"
314
144
  )
315
145
  },
316
- hidePrevButton ? /* @__PURE__ */ React5.createElement("div", null) : /* @__PURE__ */ React5.createElement(
146
+ hidePrevButton ? /* @__PURE__ */ React.createElement("div", null) : /* @__PURE__ */ React.createElement(
317
147
  "div",
318
148
  {
319
149
  onClick: onPrev,
@@ -322,7 +152,7 @@ var DialogCarouselContent = React5.forwardRef(
322
152
  props.dir === "rtl" && "hawa-rotate-180"
323
153
  )
324
154
  },
325
- /* @__PURE__ */ React5.createElement(
155
+ /* @__PURE__ */ React.createElement(
326
156
  "svg",
327
157
  {
328
158
  xmlns: "http://www.w3.org/2000/svg",
@@ -336,10 +166,10 @@ var DialogCarouselContent = React5.forwardRef(
336
166
  strokeLinecap: "round",
337
167
  strokeLinejoin: "round"
338
168
  },
339
- /* @__PURE__ */ React5.createElement("path", { d: "m15 18-6-6 6-6" })
169
+ /* @__PURE__ */ React.createElement("path", { d: "m15 18-6-6 6-6" })
340
170
  )
341
171
  ),
342
- !hideCloseButton && /* @__PURE__ */ React5.createElement(
172
+ !hideCloseButton && /* @__PURE__ */ React.createElement(
343
173
  DialogPrimitive.Close,
344
174
  {
345
175
  className: cn(
@@ -347,7 +177,7 @@ var DialogCarouselContent = React5.forwardRef(
347
177
  props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
348
178
  )
349
179
  },
350
- /* @__PURE__ */ React5.createElement(
180
+ /* @__PURE__ */ React.createElement(
351
181
  "svg",
352
182
  {
353
183
  "aria-label": "Close Icon",
@@ -356,7 +186,7 @@ var DialogCarouselContent = React5.forwardRef(
356
186
  fill: "currentColor",
357
187
  viewBox: "0 0 20 20"
358
188
  },
359
- /* @__PURE__ */ React5.createElement(
189
+ /* @__PURE__ */ React.createElement(
360
190
  "path",
361
191
  {
362
192
  fillRule: "evenodd",
@@ -365,7 +195,7 @@ var DialogCarouselContent = React5.forwardRef(
365
195
  }
366
196
  )
367
197
  ),
368
- /* @__PURE__ */ React5.createElement("span", { className: "hawa-sr-only" }, "Close")
198
+ /* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close")
369
199
  )
370
200
  )
371
201
  ))
@@ -373,7 +203,7 @@ var DialogCarouselContent = React5.forwardRef(
373
203
  var DialogHeader = ({
374
204
  className,
375
205
  ...props
376
- }) => /* @__PURE__ */ React5.createElement(
206
+ }) => /* @__PURE__ */ React.createElement(
377
207
  "div",
378
208
  {
379
209
  className: cn(
@@ -383,7 +213,7 @@ var DialogHeader = ({
383
213
  ...props
384
214
  }
385
215
  );
386
- var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
216
+ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
387
217
  DialogPrimitive.Title,
388
218
  {
389
219
  ref,
@@ -394,7 +224,7 @@ var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
394
224
  ...props
395
225
  }
396
226
  ));
397
- var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
227
+ var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
398
228
  DialogPrimitive.Description,
399
229
  {
400
230
  ref,
@@ -408,7 +238,7 @@ var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @
408
238
  var DialogFooter = ({
409
239
  className,
410
240
  ...props
411
- }) => /* @__PURE__ */ React5.createElement(
241
+ }) => /* @__PURE__ */ React.createElement(
412
242
  "div",
413
243
  {
414
244
  className: cn(
@@ -424,12 +254,12 @@ var DialogCarousel = ({
424
254
  children,
425
255
  direction
426
256
  }) => {
427
- React5.useEffect(() => {
257
+ React.useEffect(() => {
428
258
  if (stepsApi) {
429
259
  stepsApi.reInit();
430
260
  }
431
261
  }, [stepsApi, children]);
432
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React5.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React5.createElement(
262
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React.createElement(
433
263
  "div",
434
264
  {
435
265
  className: "hawa-flex",
@@ -437,7 +267,7 @@ var DialogCarousel = ({
437
267
  transition: "height 0.2s"
438
268
  }
439
269
  },
440
- React5.Children.map(children, (child, index) => /* @__PURE__ */ React5.createElement(
270
+ React.Children.map(children, (child, index) => /* @__PURE__ */ React.createElement(
441
271
  "div",
442
272
  {
443
273
  className: cn(
@@ -454,14 +284,14 @@ var DialogSteps = ({
454
284
  visibleStepRef,
455
285
  children
456
286
  }) => {
457
- const [dialogHeight, setDialogHeight] = React5.useState(null);
458
- React5.useEffect(() => {
287
+ const [dialogHeight, setDialogHeight] = React.useState(null);
288
+ React.useEffect(() => {
459
289
  if (visibleStepRef.current) {
460
290
  setDialogHeight(visibleStepRef.current.offsetHeight);
461
291
  console.log("height is ", visibleStepRef.current.offsetHeight);
462
292
  }
463
293
  }, [currentStep, visibleStepRef]);
464
- return /* @__PURE__ */ React5.createElement(
294
+ return /* @__PURE__ */ React.createElement(
465
295
  "div",
466
296
  {
467
297
  className: "hawa-relative hawa-overflow-clip",
@@ -470,7 +300,7 @@ var DialogSteps = ({
470
300
  transition: "height 0.2s"
471
301
  }
472
302
  },
473
- React5.Children.map(children, (child, index) => /* @__PURE__ */ React5.createElement(
303
+ React.Children.map(children, (child, index) => /* @__PURE__ */ React.createElement(
474
304
  "div",
475
305
  {
476
306
  ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
@@ -488,7 +318,7 @@ var DialogStep = ({
488
318
  className,
489
319
  stepRef
490
320
  }) => {
491
- return /* @__PURE__ */ React5.createElement(
321
+ return /* @__PURE__ */ React.createElement(
492
322
  "div",
493
323
  {
494
324
  id,
@@ -499,7 +329,7 @@ var DialogStep = ({
499
329
  );
500
330
  };
501
331
  var DialogBody = ({ children, className }) => {
502
- return /* @__PURE__ */ React5.createElement("div", { className: cn("hawa-py-6", className) }, children);
332
+ return /* @__PURE__ */ React.createElement("div", { className: cn("hawa-py-6", className) }, children);
503
333
  };
504
334
  DialogBody.displayName = "DialogBody";
505
335
  DialogStep.displayName = "DialogStep";
@@ -515,7 +345,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
515
345
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
516
346
 
517
347
  // elements/command/Command.tsx
518
- var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
348
+ var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
519
349
  import_cmdk.Command,
520
350
  {
521
351
  ref,
@@ -527,13 +357,13 @@ var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
527
357
  }
528
358
  ));
529
359
  Command.displayName = import_cmdk.Command.displayName;
530
- var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
360
+ var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
531
361
  "div",
532
362
  {
533
363
  className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
534
364
  "cmdk-input-wrapper": ""
535
365
  },
536
- /* @__PURE__ */ React6.createElement(
366
+ /* @__PURE__ */ React2.createElement(
537
367
  "svg",
538
368
  {
539
369
  "aria-label": "Search Icon",
@@ -548,10 +378,10 @@ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
548
378
  strokeLinejoin: "round",
549
379
  className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
550
380
  },
551
- /* @__PURE__ */ React6.createElement("circle", { cx: "11", cy: "11", r: "8" }),
552
- /* @__PURE__ */ React6.createElement("path", { d: "m21 21-4.3-4.3" })
381
+ /* @__PURE__ */ React2.createElement("circle", { cx: "11", cy: "11", r: "8" }),
382
+ /* @__PURE__ */ React2.createElement("path", { d: "m21 21-4.3-4.3" })
553
383
  ),
554
- /* @__PURE__ */ React6.createElement(
384
+ /* @__PURE__ */ React2.createElement(
555
385
  import_cmdk.Command.Input,
556
386
  {
557
387
  ref,
@@ -564,7 +394,7 @@ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
564
394
  )
565
395
  ));
566
396
  CommandInput.displayName = import_cmdk.Command.Input.displayName;
567
- var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
397
+ var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
568
398
  import_cmdk.Command.List,
569
399
  {
570
400
  ref,
@@ -576,7 +406,7 @@ var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
576
406
  }
577
407
  ));
578
408
  CommandList.displayName = import_cmdk.Command.List.displayName;
579
- var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(
409
+ var CommandEmpty = React2.forwardRef((props, ref) => /* @__PURE__ */ React2.createElement(
580
410
  import_cmdk.Command.Empty,
581
411
  {
582
412
  ref,
@@ -585,7 +415,7 @@ var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.crea
585
415
  }
586
416
  ));
587
417
  CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
588
- var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
418
+ var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
589
419
  import_cmdk.Command.Group,
590
420
  {
591
421
  ref,
@@ -597,7 +427,7 @@ var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
597
427
  }
598
428
  ));
599
429
  CommandGroup.displayName = import_cmdk.Command.Group.displayName;
600
- var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
430
+ var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
601
431
  import_cmdk.Command.Separator,
602
432
  {
603
433
  ref,
@@ -606,7 +436,7 @@ var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @_
606
436
  }
607
437
  ));
608
438
  CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
609
- var CommandItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
439
+ var CommandItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
610
440
  import_cmdk.Command.Item,
611
441
  {
612
442
  ref,
@@ -622,7 +452,7 @@ var CommandShortcut = ({
622
452
  className,
623
453
  ...props
624
454
  }) => {
625
- return /* @__PURE__ */ React6.createElement(
455
+ return /* @__PURE__ */ React2.createElement(
626
456
  "span",
627
457
  {
628
458
  className: cn(
@@ -635,6 +465,178 @@ var CommandShortcut = ({
635
465
  };
636
466
  CommandShortcut.displayName = "CommandShortcut";
637
467
 
468
+ // elements/label/Label.tsx
469
+ var React4 = __toESM(require("react"));
470
+
471
+ // elements/tooltip/Tooltip.tsx
472
+ var import_react = __toESM(require("react"));
473
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
474
+ var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
475
+ TooltipPrimitive.Content,
476
+ {
477
+ ref,
478
+ sideOffset,
479
+ className: cn(
480
+ "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
481
+ {
482
+ "hawa-text-xs": size === "small",
483
+ "hawa-text-xl": size === "large"
484
+ },
485
+ className
486
+ ),
487
+ ...props
488
+ }
489
+ ));
490
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
491
+ var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
492
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
493
+ var Tooltip = ({
494
+ side,
495
+ size,
496
+ open,
497
+ content,
498
+ children,
499
+ disabled,
500
+ defaultOpen,
501
+ onOpenChange,
502
+ triggerProps,
503
+ contentProps,
504
+ providerProps,
505
+ delayDuration = 300,
506
+ ...props
507
+ }) => {
508
+ return /* @__PURE__ */ import_react.default.createElement(
509
+ TooltipPrimitive.TooltipProvider,
510
+ {
511
+ delayDuration,
512
+ ...providerProps
513
+ },
514
+ /* @__PURE__ */ import_react.default.createElement(
515
+ TooltipPrimitive.Root,
516
+ {
517
+ open: !disabled && open,
518
+ defaultOpen,
519
+ onOpenChange,
520
+ ...props
521
+ },
522
+ /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
523
+ /* @__PURE__ */ import_react.default.createElement(
524
+ TooltipContent,
525
+ {
526
+ size,
527
+ side,
528
+ align: "center",
529
+ ...contentProps,
530
+ style: {
531
+ ...contentProps == null ? void 0 : contentProps.style,
532
+ maxWidth: "var(--radix-tooltip-content-available-width)",
533
+ maxHeight: "var(--radix-tooltip-content-available-height)"
534
+ }
535
+ },
536
+ content
537
+ )
538
+ )
539
+ );
540
+ };
541
+
542
+ // elements/label/Label.tsx
543
+ var Label = React4.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React4.createElement(
544
+ "label",
545
+ {
546
+ ref,
547
+ className: cn(
548
+ "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
549
+ className
550
+ ),
551
+ ...props
552
+ },
553
+ children,
554
+ required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
555
+ ), hint && /* @__PURE__ */ React4.createElement(
556
+ Tooltip,
557
+ {
558
+ content: hint,
559
+ side: hintSide,
560
+ triggerProps: {
561
+ tabIndex: -1,
562
+ onClick: (event) => event.preventDefault()
563
+ }
564
+ },
565
+ /* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
566
+ "svg",
567
+ {
568
+ xmlns: "http://www.w3.org/2000/svg",
569
+ className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
570
+ viewBox: "0 0 24 24",
571
+ fill: "none",
572
+ stroke: "currentColor",
573
+ strokeWidth: "2",
574
+ strokeLinecap: "round",
575
+ strokeLinejoin: "round"
576
+ },
577
+ /* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
578
+ /* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
579
+ /* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
580
+ ))
581
+ )));
582
+ Label.displayName = "Label";
583
+
584
+ // elements/popover/Popover.tsx
585
+ var React5 = __toESM(require("react"));
586
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
587
+ var PopoverContent = React5.forwardRef(
588
+ ({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React5.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React5.createElement(
589
+ PopoverPrimitive.Content,
590
+ {
591
+ ref,
592
+ align,
593
+ sideOffset,
594
+ className: cn(
595
+ "dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
596
+ className
597
+ ),
598
+ ...props
599
+ }
600
+ ))
601
+ );
602
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
603
+ var PopoverTrigger = PopoverPrimitive.Trigger;
604
+
605
+ // elements/skeleton/Skeleton.tsx
606
+ var import_react2 = __toESM(require("react"));
607
+ function Skeleton({
608
+ className,
609
+ content,
610
+ animation = "pulse",
611
+ fade,
612
+ ...props
613
+ }) {
614
+ const animationStyles = {
615
+ none: "hawa-rounded hawa-bg-muted",
616
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
617
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
618
+ };
619
+ const fadeStyle = {
620
+ bottom: "hawa-mask-fade-bottom",
621
+ top: "hawa-mask-fade-top",
622
+ right: "hawa-mask-fade-right",
623
+ left: "hawa-mask-fade-left "
624
+ };
625
+ return /* @__PURE__ */ import_react2.default.createElement(
626
+ "div",
627
+ {
628
+ className: cn(
629
+ animationStyles[animation],
630
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
631
+ fade && fadeStyle[fade],
632
+ className
633
+ ),
634
+ ...props
635
+ },
636
+ content && content
637
+ );
638
+ }
639
+
638
640
  // elements/combobox/Combobox.tsx
639
641
  var Combobox = React7.forwardRef(
640
642
  ({
@@ -645,11 +647,13 @@ var Combobox = React7.forwardRef(
645
647
  direction,
646
648
  labelProps,
647
649
  data,
650
+ renderOption,
648
651
  ...props
649
652
  }, ref) => {
650
653
  var _a, _b, _c;
651
654
  const [open, setOpen] = React7.useState(false);
652
655
  const [value, setValue] = React7.useState(defaultValue);
656
+ const containerRef = React7.useRef(null);
653
657
  function getProperty(obj, key) {
654
658
  return obj[key];
655
659
  }
@@ -664,7 +668,8 @@ var Combobox = React7.forwardRef(
664
668
  className: cn(
665
669
  "hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
666
670
  props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
667
- )
671
+ ),
672
+ ref: containerRef
668
673
  },
669
674
  props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label),
670
675
  /* @__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(
@@ -722,7 +727,8 @@ var Combobox = React7.forwardRef(
722
727
  {
723
728
  sideOffset: 0,
724
729
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
725
- dir: direction
730
+ dir: direction,
731
+ container: containerRef.current
726
732
  },
727
733
  /* @__PURE__ */ React7.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React7.createElement(
728
734
  CommandInput,
@@ -730,7 +736,7 @@ var Combobox = React7.forwardRef(
730
736
  dir: direction,
731
737
  placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
732
738
  }
733
- ), /* @__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(
739
+ ), /* @__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-scroll" }, data.map((item, i) => /* @__PURE__ */ React7.createElement(
734
740
  CommandItem,
735
741
  {
736
742
  key: i,
@@ -766,7 +772,7 @@ var Combobox = React7.forwardRef(
766
772
  },
767
773
  /* @__PURE__ */ React7.createElement("polyline", { points: "20 6 9 17 4 12" })
768
774
  ),
769
- getProperty(item, labelKey)
775
+ renderOption ? renderOption(item) : getProperty(item, labelKey)
770
776
  ))))
771
777
  ))
772
778
  );