@sikka/hawa 0.29.14-next → 0.30.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.
- package/dist/blocks/feedback/index.js +15 -13
- package/dist/blocks/feedback/index.mjs +15 -13
- package/dist/blocks/index.js +15 -13
- package/dist/blocks/index.mjs +1 -1
- package/dist/{chunk-XKVSLAKW.mjs → chunk-TGB72TYK.mjs} +15 -13
- package/dist/combobox/index.d.mts +1 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +224 -218
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +224 -218
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js +1 -1
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +1 -1
- package/dist/dataTable/index.d.ts +1 -1
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/dialog/index.d.mts +1 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +9 -4
- package/dist/elements/index.d.ts +9 -4
- package/dist/elements/index.js +87 -81
- package/dist/elements/index.mjs +15 -11
- package/dist/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +87 -81
- package/dist/index.mjs +113 -107
- package/dist/passwordInput/index.js +15 -13
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +15 -13
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/popover/index.d.mts +3 -1
- package/dist/popover/index.d.ts +3 -1
- package/dist/popover/index.js +15 -13
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +15 -13
- package/dist/popover/index.mjs.map +1 -1
- package/dist/simpleTable/index.d.mts +4 -3
- package/dist/simpleTable/index.d.ts +4 -3
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/combobox/index.mjs
CHANGED
@@ -4,9 +4,6 @@
|
|
4
4
|
import * as React7 from "react";
|
5
5
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
6
6
|
|
7
|
-
// elements/label/Label.tsx
|
8
|
-
import * as React2 from "react";
|
9
|
-
|
10
7
|
// util/index.ts
|
11
8
|
import { clsx } from "clsx";
|
12
9
|
import { twMerge } from "tailwind-merge";
|
@@ -14,182 +11,15 @@ function cn(...inputs) {
|
|
14
11
|
return twMerge(clsx(inputs));
|
15
12
|
}
|
16
13
|
|
17
|
-
// elements/tooltip/Tooltip.tsx
|
18
|
-
import React from "react";
|
19
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
20
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
21
|
-
TooltipPrimitive.Content,
|
22
|
-
{
|
23
|
-
ref,
|
24
|
-
sideOffset,
|
25
|
-
className: cn(
|
26
|
-
"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",
|
27
|
-
{
|
28
|
-
"hawa-text-xs": size === "small",
|
29
|
-
"hawa-text-xl": size === "large"
|
30
|
-
},
|
31
|
-
className
|
32
|
-
),
|
33
|
-
...props
|
34
|
-
}
|
35
|
-
));
|
36
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
37
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
38
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
39
|
-
var Tooltip = ({
|
40
|
-
side,
|
41
|
-
size,
|
42
|
-
open,
|
43
|
-
content,
|
44
|
-
children,
|
45
|
-
disabled,
|
46
|
-
defaultOpen,
|
47
|
-
onOpenChange,
|
48
|
-
triggerProps,
|
49
|
-
contentProps,
|
50
|
-
providerProps,
|
51
|
-
delayDuration = 300,
|
52
|
-
...props
|
53
|
-
}) => {
|
54
|
-
return /* @__PURE__ */ React.createElement(
|
55
|
-
TooltipPrimitive.TooltipProvider,
|
56
|
-
{
|
57
|
-
delayDuration,
|
58
|
-
...providerProps
|
59
|
-
},
|
60
|
-
/* @__PURE__ */ React.createElement(
|
61
|
-
TooltipPrimitive.Root,
|
62
|
-
{
|
63
|
-
open: !disabled && open,
|
64
|
-
defaultOpen,
|
65
|
-
onOpenChange,
|
66
|
-
...props
|
67
|
-
},
|
68
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
69
|
-
/* @__PURE__ */ React.createElement(
|
70
|
-
TooltipContent,
|
71
|
-
{
|
72
|
-
size,
|
73
|
-
side,
|
74
|
-
align: "center",
|
75
|
-
...contentProps,
|
76
|
-
style: {
|
77
|
-
...contentProps == null ? void 0 : contentProps.style,
|
78
|
-
maxWidth: "var(--radix-tooltip-content-available-width)",
|
79
|
-
maxHeight: "var(--radix-tooltip-content-available-height)"
|
80
|
-
}
|
81
|
-
},
|
82
|
-
content
|
83
|
-
)
|
84
|
-
)
|
85
|
-
);
|
86
|
-
};
|
87
|
-
|
88
|
-
// elements/label/Label.tsx
|
89
|
-
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(
|
90
|
-
"label",
|
91
|
-
{
|
92
|
-
ref,
|
93
|
-
className: cn(
|
94
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
95
|
-
className
|
96
|
-
),
|
97
|
-
...props
|
98
|
-
},
|
99
|
-
children,
|
100
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
101
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
102
|
-
Tooltip,
|
103
|
-
{
|
104
|
-
content: hint,
|
105
|
-
side: hintSide,
|
106
|
-
triggerProps: {
|
107
|
-
tabIndex: -1,
|
108
|
-
onClick: (event) => event.preventDefault()
|
109
|
-
}
|
110
|
-
},
|
111
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
112
|
-
"svg",
|
113
|
-
{
|
114
|
-
xmlns: "http://www.w3.org/2000/svg",
|
115
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
116
|
-
viewBox: "0 0 24 24",
|
117
|
-
fill: "none",
|
118
|
-
stroke: "currentColor",
|
119
|
-
strokeWidth: "2",
|
120
|
-
strokeLinecap: "round",
|
121
|
-
strokeLinejoin: "round"
|
122
|
-
},
|
123
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
124
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
125
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
126
|
-
))
|
127
|
-
)));
|
128
|
-
Label.displayName = "Label";
|
129
|
-
|
130
|
-
// elements/popover/Popover.tsx
|
131
|
-
import * as React3 from "react";
|
132
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
133
|
-
var PopoverContent = React3.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React3.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React3.createElement(
|
134
|
-
PopoverPrimitive.Content,
|
135
|
-
{
|
136
|
-
ref,
|
137
|
-
align,
|
138
|
-
sideOffset,
|
139
|
-
className: cn(
|
140
|
-
"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",
|
141
|
-
className
|
142
|
-
),
|
143
|
-
...props
|
144
|
-
}
|
145
|
-
)));
|
146
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
147
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
148
|
-
|
149
|
-
// elements/skeleton/Skeleton.tsx
|
150
|
-
import React4 from "react";
|
151
|
-
function Skeleton({
|
152
|
-
className,
|
153
|
-
content,
|
154
|
-
animation = "pulse",
|
155
|
-
fade,
|
156
|
-
...props
|
157
|
-
}) {
|
158
|
-
const animationStyles = {
|
159
|
-
none: "hawa-rounded hawa-bg-muted",
|
160
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
161
|
-
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"
|
162
|
-
};
|
163
|
-
const fadeStyle = {
|
164
|
-
bottom: "hawa-mask-fade-bottom",
|
165
|
-
top: "hawa-mask-fade-top",
|
166
|
-
right: "hawa-mask-fade-right",
|
167
|
-
left: "hawa-mask-fade-left "
|
168
|
-
};
|
169
|
-
return /* @__PURE__ */ React4.createElement(
|
170
|
-
"div",
|
171
|
-
{
|
172
|
-
className: cn(
|
173
|
-
animationStyles[animation],
|
174
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
175
|
-
fade && fadeStyle[fade],
|
176
|
-
className
|
177
|
-
),
|
178
|
-
...props
|
179
|
-
},
|
180
|
-
content && content
|
181
|
-
);
|
182
|
-
}
|
183
|
-
|
184
14
|
// elements/command/Command.tsx
|
185
|
-
import * as
|
15
|
+
import * as React2 from "react";
|
186
16
|
import { Command as CommandPrimitive } from "cmdk";
|
187
17
|
|
188
18
|
// elements/dialog/Dialog.tsx
|
189
|
-
import * as
|
19
|
+
import * as React from "react";
|
190
20
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
191
|
-
var DialogPortal = ({ ...props }) => /* @__PURE__ */
|
192
|
-
var DialogOverlay =
|
21
|
+
var DialogPortal = ({ ...props }) => /* @__PURE__ */ React.createElement(DialogPrimitive.Portal, { ...props });
|
22
|
+
var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
193
23
|
DialogPrimitive.Overlay,
|
194
24
|
{
|
195
25
|
ref,
|
@@ -200,7 +30,7 @@ var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
200
30
|
...props
|
201
31
|
}
|
202
32
|
));
|
203
|
-
var DialogContent =
|
33
|
+
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(
|
204
34
|
DialogPrimitive.Content,
|
205
35
|
{
|
206
36
|
onPointerDownOutside: (e) => {
|
@@ -216,7 +46,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
|
|
216
46
|
...props
|
217
47
|
},
|
218
48
|
children,
|
219
|
-
!hideCloseButton && /* @__PURE__ */
|
49
|
+
!hideCloseButton && /* @__PURE__ */ React.createElement(
|
220
50
|
DialogPrimitive.Close,
|
221
51
|
{
|
222
52
|
className: cn(
|
@@ -224,7 +54,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
|
|
224
54
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
225
55
|
)
|
226
56
|
},
|
227
|
-
/* @__PURE__ */
|
57
|
+
/* @__PURE__ */ React.createElement(
|
228
58
|
"svg",
|
229
59
|
{
|
230
60
|
"aria-label": "Close Icon",
|
@@ -233,7 +63,7 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
|
|
233
63
|
fill: "currentColor",
|
234
64
|
viewBox: "0 0 20 20"
|
235
65
|
},
|
236
|
-
/* @__PURE__ */
|
66
|
+
/* @__PURE__ */ React.createElement(
|
237
67
|
"path",
|
238
68
|
{
|
239
69
|
fillRule: "evenodd",
|
@@ -242,10 +72,10 @@ var DialogContent = React5.forwardRef(({ className, children, persist, hideClose
|
|
242
72
|
}
|
243
73
|
)
|
244
74
|
),
|
245
|
-
/* @__PURE__ */
|
75
|
+
/* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close")
|
246
76
|
)
|
247
77
|
)));
|
248
|
-
var DialogCarouselContent =
|
78
|
+
var DialogCarouselContent = React.forwardRef(
|
249
79
|
({
|
250
80
|
className,
|
251
81
|
children,
|
@@ -254,7 +84,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
254
84
|
hideCloseButton,
|
255
85
|
hidePrevButton,
|
256
86
|
...props
|
257
|
-
}, ref) => /* @__PURE__ */
|
87
|
+
}, ref) => /* @__PURE__ */ React.createElement(DialogPortal, null, /* @__PURE__ */ React.createElement(DialogOverlay, null), /* @__PURE__ */ React.createElement(
|
258
88
|
DialogPrimitive.Content,
|
259
89
|
{
|
260
90
|
onPointerDownOutside: (e) => {
|
@@ -270,7 +100,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
270
100
|
...props
|
271
101
|
},
|
272
102
|
children,
|
273
|
-
/* @__PURE__ */
|
103
|
+
/* @__PURE__ */ React.createElement(
|
274
104
|
"div",
|
275
105
|
{
|
276
106
|
className: cn(
|
@@ -278,7 +108,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
278
108
|
onPrev ? "hawa-justify-between" : "hawa-justify-end"
|
279
109
|
)
|
280
110
|
},
|
281
|
-
hidePrevButton ? /* @__PURE__ */
|
111
|
+
hidePrevButton ? /* @__PURE__ */ React.createElement("div", null) : /* @__PURE__ */ React.createElement(
|
282
112
|
"div",
|
283
113
|
{
|
284
114
|
onClick: onPrev,
|
@@ -287,7 +117,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
287
117
|
props.dir === "rtl" && "hawa-rotate-180"
|
288
118
|
)
|
289
119
|
},
|
290
|
-
/* @__PURE__ */
|
120
|
+
/* @__PURE__ */ React.createElement(
|
291
121
|
"svg",
|
292
122
|
{
|
293
123
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -301,10 +131,10 @@ var DialogCarouselContent = React5.forwardRef(
|
|
301
131
|
strokeLinecap: "round",
|
302
132
|
strokeLinejoin: "round"
|
303
133
|
},
|
304
|
-
/* @__PURE__ */
|
134
|
+
/* @__PURE__ */ React.createElement("path", { d: "m15 18-6-6 6-6" })
|
305
135
|
)
|
306
136
|
),
|
307
|
-
!hideCloseButton && /* @__PURE__ */
|
137
|
+
!hideCloseButton && /* @__PURE__ */ React.createElement(
|
308
138
|
DialogPrimitive.Close,
|
309
139
|
{
|
310
140
|
className: cn(
|
@@ -312,7 +142,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
312
142
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
313
143
|
)
|
314
144
|
},
|
315
|
-
/* @__PURE__ */
|
145
|
+
/* @__PURE__ */ React.createElement(
|
316
146
|
"svg",
|
317
147
|
{
|
318
148
|
"aria-label": "Close Icon",
|
@@ -321,7 +151,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
321
151
|
fill: "currentColor",
|
322
152
|
viewBox: "0 0 20 20"
|
323
153
|
},
|
324
|
-
/* @__PURE__ */
|
154
|
+
/* @__PURE__ */ React.createElement(
|
325
155
|
"path",
|
326
156
|
{
|
327
157
|
fillRule: "evenodd",
|
@@ -330,7 +160,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
330
160
|
}
|
331
161
|
)
|
332
162
|
),
|
333
|
-
/* @__PURE__ */
|
163
|
+
/* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close")
|
334
164
|
)
|
335
165
|
)
|
336
166
|
))
|
@@ -338,7 +168,7 @@ var DialogCarouselContent = React5.forwardRef(
|
|
338
168
|
var DialogHeader = ({
|
339
169
|
className,
|
340
170
|
...props
|
341
|
-
}) => /* @__PURE__ */
|
171
|
+
}) => /* @__PURE__ */ React.createElement(
|
342
172
|
"div",
|
343
173
|
{
|
344
174
|
className: cn(
|
@@ -348,7 +178,7 @@ var DialogHeader = ({
|
|
348
178
|
...props
|
349
179
|
}
|
350
180
|
);
|
351
|
-
var DialogTitle =
|
181
|
+
var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
352
182
|
DialogPrimitive.Title,
|
353
183
|
{
|
354
184
|
ref,
|
@@ -359,7 +189,7 @@ var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
359
189
|
...props
|
360
190
|
}
|
361
191
|
));
|
362
|
-
var DialogDescription =
|
192
|
+
var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
363
193
|
DialogPrimitive.Description,
|
364
194
|
{
|
365
195
|
ref,
|
@@ -373,7 +203,7 @@ var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @
|
|
373
203
|
var DialogFooter = ({
|
374
204
|
className,
|
375
205
|
...props
|
376
|
-
}) => /* @__PURE__ */
|
206
|
+
}) => /* @__PURE__ */ React.createElement(
|
377
207
|
"div",
|
378
208
|
{
|
379
209
|
className: cn(
|
@@ -389,12 +219,12 @@ var DialogCarousel = ({
|
|
389
219
|
children,
|
390
220
|
direction
|
391
221
|
}) => {
|
392
|
-
|
222
|
+
React.useEffect(() => {
|
393
223
|
if (stepsApi) {
|
394
224
|
stepsApi.reInit();
|
395
225
|
}
|
396
226
|
}, [stepsApi, children]);
|
397
|
-
return /* @__PURE__ */
|
227
|
+
return /* @__PURE__ */ React.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React.createElement(
|
398
228
|
"div",
|
399
229
|
{
|
400
230
|
className: "hawa-flex",
|
@@ -402,7 +232,7 @@ var DialogCarousel = ({
|
|
402
232
|
transition: "height 0.2s"
|
403
233
|
}
|
404
234
|
},
|
405
|
-
|
235
|
+
React.Children.map(children, (child, index) => /* @__PURE__ */ React.createElement(
|
406
236
|
"div",
|
407
237
|
{
|
408
238
|
className: cn(
|
@@ -419,14 +249,14 @@ var DialogSteps = ({
|
|
419
249
|
visibleStepRef,
|
420
250
|
children
|
421
251
|
}) => {
|
422
|
-
const [dialogHeight, setDialogHeight] =
|
423
|
-
|
252
|
+
const [dialogHeight, setDialogHeight] = React.useState(null);
|
253
|
+
React.useEffect(() => {
|
424
254
|
if (visibleStepRef.current) {
|
425
255
|
setDialogHeight(visibleStepRef.current.offsetHeight);
|
426
256
|
console.log("height is ", visibleStepRef.current.offsetHeight);
|
427
257
|
}
|
428
258
|
}, [currentStep, visibleStepRef]);
|
429
|
-
return /* @__PURE__ */
|
259
|
+
return /* @__PURE__ */ React.createElement(
|
430
260
|
"div",
|
431
261
|
{
|
432
262
|
className: "hawa-relative hawa-overflow-clip",
|
@@ -435,7 +265,7 @@ var DialogSteps = ({
|
|
435
265
|
transition: "height 0.2s"
|
436
266
|
}
|
437
267
|
},
|
438
|
-
|
268
|
+
React.Children.map(children, (child, index) => /* @__PURE__ */ React.createElement(
|
439
269
|
"div",
|
440
270
|
{
|
441
271
|
ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
|
@@ -453,7 +283,7 @@ var DialogStep = ({
|
|
453
283
|
className,
|
454
284
|
stepRef
|
455
285
|
}) => {
|
456
|
-
return /* @__PURE__ */
|
286
|
+
return /* @__PURE__ */ React.createElement(
|
457
287
|
"div",
|
458
288
|
{
|
459
289
|
id,
|
@@ -464,7 +294,7 @@ var DialogStep = ({
|
|
464
294
|
);
|
465
295
|
};
|
466
296
|
var DialogBody = ({ children, className }) => {
|
467
|
-
return /* @__PURE__ */
|
297
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("hawa-py-6", className) }, children);
|
468
298
|
};
|
469
299
|
DialogBody.displayName = "DialogBody";
|
470
300
|
DialogStep.displayName = "DialogStep";
|
@@ -480,7 +310,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
480
310
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
481
311
|
|
482
312
|
// elements/command/Command.tsx
|
483
|
-
var Command =
|
313
|
+
var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
484
314
|
CommandPrimitive,
|
485
315
|
{
|
486
316
|
ref,
|
@@ -492,13 +322,13 @@ var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
492
322
|
}
|
493
323
|
));
|
494
324
|
Command.displayName = CommandPrimitive.displayName;
|
495
|
-
var CommandInput =
|
325
|
+
var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
496
326
|
"div",
|
497
327
|
{
|
498
328
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
499
329
|
"cmdk-input-wrapper": ""
|
500
330
|
},
|
501
|
-
/* @__PURE__ */
|
331
|
+
/* @__PURE__ */ React2.createElement(
|
502
332
|
"svg",
|
503
333
|
{
|
504
334
|
"aria-label": "Search Icon",
|
@@ -513,10 +343,10 @@ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
513
343
|
strokeLinejoin: "round",
|
514
344
|
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
515
345
|
},
|
516
|
-
/* @__PURE__ */
|
517
|
-
/* @__PURE__ */
|
346
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
347
|
+
/* @__PURE__ */ React2.createElement("path", { d: "m21 21-4.3-4.3" })
|
518
348
|
),
|
519
|
-
/* @__PURE__ */
|
349
|
+
/* @__PURE__ */ React2.createElement(
|
520
350
|
CommandPrimitive.Input,
|
521
351
|
{
|
522
352
|
ref,
|
@@ -529,7 +359,7 @@ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
529
359
|
)
|
530
360
|
));
|
531
361
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
532
|
-
var CommandList =
|
362
|
+
var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
533
363
|
CommandPrimitive.List,
|
534
364
|
{
|
535
365
|
ref,
|
@@ -541,7 +371,7 @@ var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
541
371
|
}
|
542
372
|
));
|
543
373
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
544
|
-
var CommandEmpty =
|
374
|
+
var CommandEmpty = React2.forwardRef((props, ref) => /* @__PURE__ */ React2.createElement(
|
545
375
|
CommandPrimitive.Empty,
|
546
376
|
{
|
547
377
|
ref,
|
@@ -550,7 +380,7 @@ var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.crea
|
|
550
380
|
}
|
551
381
|
));
|
552
382
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
553
|
-
var CommandGroup =
|
383
|
+
var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
554
384
|
CommandPrimitive.Group,
|
555
385
|
{
|
556
386
|
ref,
|
@@ -562,7 +392,7 @@ var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
562
392
|
}
|
563
393
|
));
|
564
394
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
565
|
-
var CommandSeparator =
|
395
|
+
var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
566
396
|
CommandPrimitive.Separator,
|
567
397
|
{
|
568
398
|
ref,
|
@@ -571,7 +401,7 @@ var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @_
|
|
571
401
|
}
|
572
402
|
));
|
573
403
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
574
|
-
var CommandItem =
|
404
|
+
var CommandItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
575
405
|
CommandPrimitive.Item,
|
576
406
|
{
|
577
407
|
ref,
|
@@ -587,7 +417,7 @@ var CommandShortcut = ({
|
|
587
417
|
className,
|
588
418
|
...props
|
589
419
|
}) => {
|
590
|
-
return /* @__PURE__ */
|
420
|
+
return /* @__PURE__ */ React2.createElement(
|
591
421
|
"span",
|
592
422
|
{
|
593
423
|
className: cn(
|
@@ -600,6 +430,178 @@ var CommandShortcut = ({
|
|
600
430
|
};
|
601
431
|
CommandShortcut.displayName = "CommandShortcut";
|
602
432
|
|
433
|
+
// elements/label/Label.tsx
|
434
|
+
import * as React4 from "react";
|
435
|
+
|
436
|
+
// elements/tooltip/Tooltip.tsx
|
437
|
+
import React3 from "react";
|
438
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
439
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
440
|
+
TooltipPrimitive.Content,
|
441
|
+
{
|
442
|
+
ref,
|
443
|
+
sideOffset,
|
444
|
+
className: cn(
|
445
|
+
"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",
|
446
|
+
{
|
447
|
+
"hawa-text-xs": size === "small",
|
448
|
+
"hawa-text-xl": size === "large"
|
449
|
+
},
|
450
|
+
className
|
451
|
+
),
|
452
|
+
...props
|
453
|
+
}
|
454
|
+
));
|
455
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
456
|
+
var TooltipArrow = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
457
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
458
|
+
var Tooltip = ({
|
459
|
+
side,
|
460
|
+
size,
|
461
|
+
open,
|
462
|
+
content,
|
463
|
+
children,
|
464
|
+
disabled,
|
465
|
+
defaultOpen,
|
466
|
+
onOpenChange,
|
467
|
+
triggerProps,
|
468
|
+
contentProps,
|
469
|
+
providerProps,
|
470
|
+
delayDuration = 300,
|
471
|
+
...props
|
472
|
+
}) => {
|
473
|
+
return /* @__PURE__ */ React3.createElement(
|
474
|
+
TooltipPrimitive.TooltipProvider,
|
475
|
+
{
|
476
|
+
delayDuration,
|
477
|
+
...providerProps
|
478
|
+
},
|
479
|
+
/* @__PURE__ */ React3.createElement(
|
480
|
+
TooltipPrimitive.Root,
|
481
|
+
{
|
482
|
+
open: !disabled && open,
|
483
|
+
defaultOpen,
|
484
|
+
onOpenChange,
|
485
|
+
...props
|
486
|
+
},
|
487
|
+
/* @__PURE__ */ React3.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
488
|
+
/* @__PURE__ */ React3.createElement(
|
489
|
+
TooltipContent,
|
490
|
+
{
|
491
|
+
size,
|
492
|
+
side,
|
493
|
+
align: "center",
|
494
|
+
...contentProps,
|
495
|
+
style: {
|
496
|
+
...contentProps == null ? void 0 : contentProps.style,
|
497
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
498
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
499
|
+
}
|
500
|
+
},
|
501
|
+
content
|
502
|
+
)
|
503
|
+
)
|
504
|
+
);
|
505
|
+
};
|
506
|
+
|
507
|
+
// elements/label/Label.tsx
|
508
|
+
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(
|
509
|
+
"label",
|
510
|
+
{
|
511
|
+
ref,
|
512
|
+
className: cn(
|
513
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
514
|
+
className
|
515
|
+
),
|
516
|
+
...props
|
517
|
+
},
|
518
|
+
children,
|
519
|
+
required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
520
|
+
), hint && /* @__PURE__ */ React4.createElement(
|
521
|
+
Tooltip,
|
522
|
+
{
|
523
|
+
content: hint,
|
524
|
+
side: hintSide,
|
525
|
+
triggerProps: {
|
526
|
+
tabIndex: -1,
|
527
|
+
onClick: (event) => event.preventDefault()
|
528
|
+
}
|
529
|
+
},
|
530
|
+
/* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
|
531
|
+
"svg",
|
532
|
+
{
|
533
|
+
xmlns: "http://www.w3.org/2000/svg",
|
534
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
535
|
+
viewBox: "0 0 24 24",
|
536
|
+
fill: "none",
|
537
|
+
stroke: "currentColor",
|
538
|
+
strokeWidth: "2",
|
539
|
+
strokeLinecap: "round",
|
540
|
+
strokeLinejoin: "round"
|
541
|
+
},
|
542
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
543
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
544
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
|
545
|
+
))
|
546
|
+
)));
|
547
|
+
Label.displayName = "Label";
|
548
|
+
|
549
|
+
// elements/popover/Popover.tsx
|
550
|
+
import * as React5 from "react";
|
551
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
552
|
+
var PopoverContent = React5.forwardRef(
|
553
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React5.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React5.createElement(
|
554
|
+
PopoverPrimitive.Content,
|
555
|
+
{
|
556
|
+
ref,
|
557
|
+
align,
|
558
|
+
sideOffset,
|
559
|
+
className: cn(
|
560
|
+
"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",
|
561
|
+
className
|
562
|
+
),
|
563
|
+
...props
|
564
|
+
}
|
565
|
+
))
|
566
|
+
);
|
567
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
568
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
569
|
+
|
570
|
+
// elements/skeleton/Skeleton.tsx
|
571
|
+
import React6 from "react";
|
572
|
+
function Skeleton({
|
573
|
+
className,
|
574
|
+
content,
|
575
|
+
animation = "pulse",
|
576
|
+
fade,
|
577
|
+
...props
|
578
|
+
}) {
|
579
|
+
const animationStyles = {
|
580
|
+
none: "hawa-rounded hawa-bg-muted",
|
581
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
582
|
+
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"
|
583
|
+
};
|
584
|
+
const fadeStyle = {
|
585
|
+
bottom: "hawa-mask-fade-bottom",
|
586
|
+
top: "hawa-mask-fade-top",
|
587
|
+
right: "hawa-mask-fade-right",
|
588
|
+
left: "hawa-mask-fade-left "
|
589
|
+
};
|
590
|
+
return /* @__PURE__ */ React6.createElement(
|
591
|
+
"div",
|
592
|
+
{
|
593
|
+
className: cn(
|
594
|
+
animationStyles[animation],
|
595
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
596
|
+
fade && fadeStyle[fade],
|
597
|
+
className
|
598
|
+
),
|
599
|
+
...props
|
600
|
+
},
|
601
|
+
content && content
|
602
|
+
);
|
603
|
+
}
|
604
|
+
|
603
605
|
// elements/combobox/Combobox.tsx
|
604
606
|
var Combobox = React7.forwardRef(
|
605
607
|
({
|
@@ -610,11 +612,13 @@ var Combobox = React7.forwardRef(
|
|
610
612
|
direction,
|
611
613
|
labelProps,
|
612
614
|
data,
|
615
|
+
renderOption,
|
613
616
|
...props
|
614
617
|
}, ref) => {
|
615
618
|
var _a, _b, _c;
|
616
619
|
const [open, setOpen] = React7.useState(false);
|
617
620
|
const [value, setValue] = React7.useState(defaultValue);
|
621
|
+
const containerRef = React7.useRef(null);
|
618
622
|
function getProperty(obj, key) {
|
619
623
|
return obj[key];
|
620
624
|
}
|
@@ -629,7 +633,8 @@ var Combobox = React7.forwardRef(
|
|
629
633
|
className: cn(
|
630
634
|
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
631
635
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
632
|
-
)
|
636
|
+
),
|
637
|
+
ref: containerRef
|
633
638
|
},
|
634
639
|
props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label),
|
635
640
|
/* @__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(
|
@@ -687,7 +692,8 @@ var Combobox = React7.forwardRef(
|
|
687
692
|
{
|
688
693
|
sideOffset: 0,
|
689
694
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
|
690
|
-
dir: direction
|
695
|
+
dir: direction,
|
696
|
+
container: containerRef.current
|
691
697
|
},
|
692
698
|
/* @__PURE__ */ React7.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React7.createElement(
|
693
699
|
CommandInput,
|
@@ -695,7 +701,7 @@ var Combobox = React7.forwardRef(
|
|
695
701
|
dir: direction,
|
696
702
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
697
703
|
}
|
698
|
-
), /* @__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-
|
704
|
+
), /* @__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(
|
699
705
|
CommandItem,
|
700
706
|
{
|
701
707
|
key: i,
|
@@ -731,7 +737,7 @@ var Combobox = React7.forwardRef(
|
|
731
737
|
},
|
732
738
|
/* @__PURE__ */ React7.createElement("polyline", { points: "20 6 9 17 4 12" })
|
733
739
|
),
|
734
|
-
getProperty(item, labelKey)
|
740
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
735
741
|
))))
|
736
742
|
))
|
737
743
|
);
|