@sikka/hawa 0.32.2-next → 0.33.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/{Chip-BT2hUlGJ.d.mts → Chip-BtgTAs8x.d.mts} +1 -1
- package/dist/{Chip-Dt7zJ-jZ.d.ts → Chip-DQsP5hFS.d.ts} +1 -1
- package/dist/Label-UbMDLtJF.d.mts +14 -0
- package/dist/Label-UbMDLtJF.d.ts +14 -0
- package/dist/alert/index.js +151 -34
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +148 -31
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +191 -145
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +226 -180
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +147 -30
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +142 -25
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +230 -229
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +147 -148
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +230 -229
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +155 -154
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +174 -173
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +3 -2
- package/dist/button/index.d.ts +3 -2
- package/dist/button/index.js +138 -21
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +138 -21
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.d.mts +15 -0
- package/dist/calendar/index.d.ts +15 -0
- package/dist/calendar/index.js +545 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/index.mjs +509 -0
- package/dist/calendar/index.mjs.map +1 -0
- package/dist/{chunk-WFPAI2QC.mjs → chunk-3HJ3JXPA.mjs} +130 -174
- package/dist/{chunk-XRUPXLOK.mjs → chunk-AW5FW5TY.mjs} +1 -1
- package/dist/{chunk-MQWYXMSK.mjs → chunk-CKLK3G32.mjs} +242 -197
- package/dist/{chunk-XZLXGXIA.mjs → chunk-E3WWI4I5.mjs} +1 -1
- package/dist/{chunk-WUMWQIAW.mjs → chunk-FRYGQYUO.mjs} +1 -1
- package/dist/{chunk-S6TZHTWS.mjs → chunk-GEB3LM5A.mjs} +1 -1
- package/dist/{chunk-2QAGLSHC.mjs → chunk-IQEBXGLM.mjs} +1 -1
- package/dist/{chunk-PA3Z7W32.mjs → chunk-OS2UOK5C.mjs} +147 -146
- package/dist/{chunk-3S44N7SB.mjs → chunk-RTGD7N7I.mjs} +1 -1
- package/dist/{chunk-WAVKQ44V.mjs → chunk-UBNCETCU.mjs} +1 -1
- package/dist/codeBlock/index.js +138 -92
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +157 -111
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/commonTypes-CgDwjGvU.d.mts +5 -0
- package/dist/commonTypes-CgDwjGvU.d.ts +5 -0
- package/dist/commonTypes-DZdITB5m.d.mts +4 -0
- package/dist/commonTypes-DZdITB5m.d.ts +4 -0
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +177 -174
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +177 -174
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +20 -0
- package/dist/datePicker/index.d.ts +20 -0
- package/dist/datePicker/index.js +630 -0
- package/dist/datePicker/index.js.map +1 -0
- package/dist/datePicker/index.mjs +593 -0
- package/dist/datePicker/index.mjs.map +1 -0
- package/dist/destroyableCard/index.d.mts +1 -1
- package/dist/destroyableCard/index.d.ts +1 -1
- package/dist/dialog/index.d.mts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/docsLayout/index.js +231 -114
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +222 -105
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.d.mts +1 -6
- package/dist/dropdownMenu/index.d.ts +1 -6
- package/dist/elements/index.d.mts +9 -8
- package/dist/elements/index.d.ts +9 -8
- package/dist/elements/index.js +54 -51
- package/dist/elements/index.mjs +7 -5
- package/dist/fileDropzone/index.js +184 -67
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +176 -59
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +83 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +54 -51
- package/dist/index.mjs +74 -71
- package/dist/input/index.d.mts +1 -2
- package/dist/input/index.d.ts +1 -2
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +204 -158
- package/dist/layout/index.mjs +2 -2
- package/dist/phoneInput/index.d.mts +1 -2
- package/dist/phoneInput/index.d.ts +1 -2
- package/dist/progress/index.d.mts +1 -8
- package/dist/progress/index.d.ts +1 -8
- package/dist/radio/index.d.mts +1 -9
- package/dist/radio/index.d.ts +1 -9
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/signature/index.d.mts +2 -1
- package/dist/signature/index.d.ts +2 -1
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/sortButton/index.js +145 -28
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +145 -28
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +3 -2
- package/dist/splitButton/index.d.ts +3 -2
- package/dist/splitButton/index.js +145 -28
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +145 -28
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toaster/index.d.mts +22 -4
- package/dist/toaster/index.d.ts +22 -4
- package/package.json +3 -1
- package/dist/commonTypes-CMqMLkhN.d.mts +0 -4
- package/dist/commonTypes-CMqMLkhN.d.ts +0 -4
- package/dist/commonTypes-D_7LV7Ri.d.mts +0 -5
- package/dist/commonTypes-D_7LV7Ri.d.ts +0 -5
package/dist/dataTable/index.mjs
CHANGED
@@ -20,11 +20,127 @@ function cn(...inputs) {
|
|
20
20
|
}
|
21
21
|
|
22
22
|
// elements/button/Button.tsx
|
23
|
-
import * as
|
23
|
+
import * as React4 from "react";
|
24
24
|
import { cva } from "class-variance-authority";
|
25
25
|
|
26
|
-
// elements/
|
26
|
+
// elements/label/Label.tsx
|
27
|
+
import * as React2 from "react";
|
28
|
+
|
29
|
+
// elements/tooltip/Tooltip.tsx
|
27
30
|
import React from "react";
|
31
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
32
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
33
|
+
TooltipPrimitive.Content,
|
34
|
+
{
|
35
|
+
ref,
|
36
|
+
sideOffset,
|
37
|
+
className: cn(
|
38
|
+
"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",
|
39
|
+
{
|
40
|
+
"hawa-text-xs": size === "small",
|
41
|
+
"hawa-text-xl": size === "large"
|
42
|
+
},
|
43
|
+
className
|
44
|
+
),
|
45
|
+
...props
|
46
|
+
}
|
47
|
+
));
|
48
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
49
|
+
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
50
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
51
|
+
var Tooltip = ({
|
52
|
+
side,
|
53
|
+
size,
|
54
|
+
open,
|
55
|
+
content,
|
56
|
+
children,
|
57
|
+
disabled,
|
58
|
+
defaultOpen,
|
59
|
+
onOpenChange,
|
60
|
+
triggerProps,
|
61
|
+
contentProps,
|
62
|
+
providerProps,
|
63
|
+
delayDuration = 300,
|
64
|
+
...props
|
65
|
+
}) => {
|
66
|
+
return /* @__PURE__ */ React.createElement(
|
67
|
+
TooltipPrimitive.TooltipProvider,
|
68
|
+
{
|
69
|
+
delayDuration,
|
70
|
+
...providerProps
|
71
|
+
},
|
72
|
+
/* @__PURE__ */ React.createElement(
|
73
|
+
TooltipPrimitive.Root,
|
74
|
+
{
|
75
|
+
open: !disabled && open,
|
76
|
+
defaultOpen,
|
77
|
+
onOpenChange,
|
78
|
+
...props
|
79
|
+
},
|
80
|
+
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
81
|
+
/* @__PURE__ */ React.createElement(
|
82
|
+
TooltipContent,
|
83
|
+
{
|
84
|
+
size,
|
85
|
+
side,
|
86
|
+
align: "center",
|
87
|
+
...contentProps,
|
88
|
+
style: {
|
89
|
+
...contentProps == null ? void 0 : contentProps.style,
|
90
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
91
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
content
|
95
|
+
)
|
96
|
+
)
|
97
|
+
);
|
98
|
+
};
|
99
|
+
|
100
|
+
// elements/label/Label.tsx
|
101
|
+
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(
|
102
|
+
"label",
|
103
|
+
{
|
104
|
+
ref,
|
105
|
+
className: cn(
|
106
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
107
|
+
className
|
108
|
+
),
|
109
|
+
...props
|
110
|
+
},
|
111
|
+
children,
|
112
|
+
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
113
|
+
), hint && /* @__PURE__ */ React2.createElement(
|
114
|
+
Tooltip,
|
115
|
+
{
|
116
|
+
content: hint,
|
117
|
+
side: hintSide,
|
118
|
+
triggerProps: {
|
119
|
+
tabIndex: -1,
|
120
|
+
onClick: (event) => event.preventDefault()
|
121
|
+
}
|
122
|
+
},
|
123
|
+
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
124
|
+
"svg",
|
125
|
+
{
|
126
|
+
xmlns: "http://www.w3.org/2000/svg",
|
127
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
128
|
+
viewBox: "0 0 24 24",
|
129
|
+
fill: "none",
|
130
|
+
stroke: "currentColor",
|
131
|
+
strokeWidth: "2",
|
132
|
+
strokeLinecap: "round",
|
133
|
+
strokeLinejoin: "round"
|
134
|
+
},
|
135
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
136
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
137
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
138
|
+
))
|
139
|
+
)));
|
140
|
+
Label.displayName = "Label";
|
141
|
+
|
142
|
+
// elements/loading/Loading.tsx
|
143
|
+
import React3 from "react";
|
28
144
|
var Loading = ({
|
29
145
|
design = "spinner",
|
30
146
|
size = "normal",
|
@@ -55,7 +171,7 @@ var Loading = ({
|
|
55
171
|
};
|
56
172
|
switch (design.split("-")[0]) {
|
57
173
|
case "dots":
|
58
|
-
return /* @__PURE__ */
|
174
|
+
return /* @__PURE__ */ React3.createElement(
|
59
175
|
"div",
|
60
176
|
{
|
61
177
|
className: cn(
|
@@ -63,7 +179,7 @@ var Loading = ({
|
|
63
179
|
classNames == null ? void 0 : classNames.container
|
64
180
|
)
|
65
181
|
},
|
66
|
-
/* @__PURE__ */
|
182
|
+
/* @__PURE__ */ React3.createElement(
|
67
183
|
"div",
|
68
184
|
{
|
69
185
|
className: cn(
|
@@ -74,7 +190,7 @@ var Loading = ({
|
|
74
190
|
)
|
75
191
|
}
|
76
192
|
),
|
77
|
-
/* @__PURE__ */
|
193
|
+
/* @__PURE__ */ React3.createElement(
|
78
194
|
"div",
|
79
195
|
{
|
80
196
|
className: cn(
|
@@ -85,7 +201,7 @@ var Loading = ({
|
|
85
201
|
)
|
86
202
|
}
|
87
203
|
),
|
88
|
-
/* @__PURE__ */
|
204
|
+
/* @__PURE__ */ React3.createElement(
|
89
205
|
"div",
|
90
206
|
{
|
91
207
|
className: cn(
|
@@ -98,7 +214,7 @@ var Loading = ({
|
|
98
214
|
)
|
99
215
|
);
|
100
216
|
case "square":
|
101
|
-
return /* @__PURE__ */
|
217
|
+
return /* @__PURE__ */ React3.createElement(
|
102
218
|
"svg",
|
103
219
|
{
|
104
220
|
className: cn(
|
@@ -110,7 +226,7 @@ var Loading = ({
|
|
110
226
|
height: "35",
|
111
227
|
width: "35"
|
112
228
|
},
|
113
|
-
/* @__PURE__ */
|
229
|
+
/* @__PURE__ */ React3.createElement(
|
114
230
|
"rect",
|
115
231
|
{
|
116
232
|
className: "squircle-track",
|
@@ -122,7 +238,7 @@ var Loading = ({
|
|
122
238
|
height: "32.5"
|
123
239
|
}
|
124
240
|
),
|
125
|
-
/* @__PURE__ */
|
241
|
+
/* @__PURE__ */ React3.createElement(
|
126
242
|
"rect",
|
127
243
|
{
|
128
244
|
className: "square-car",
|
@@ -137,7 +253,7 @@ var Loading = ({
|
|
137
253
|
)
|
138
254
|
);
|
139
255
|
case "squircle":
|
140
|
-
return /* @__PURE__ */
|
256
|
+
return /* @__PURE__ */ React3.createElement(
|
141
257
|
"svg",
|
142
258
|
{
|
143
259
|
x: "0px",
|
@@ -152,7 +268,7 @@ var Loading = ({
|
|
152
268
|
classNames == null ? void 0 : classNames.container
|
153
269
|
)
|
154
270
|
},
|
155
|
-
/* @__PURE__ */
|
271
|
+
/* @__PURE__ */ React3.createElement(
|
156
272
|
"path",
|
157
273
|
{
|
158
274
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -162,7 +278,7 @@ var Loading = ({
|
|
162
278
|
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
163
279
|
}
|
164
280
|
),
|
165
|
-
/* @__PURE__ */
|
281
|
+
/* @__PURE__ */ React3.createElement(
|
166
282
|
"path",
|
167
283
|
{
|
168
284
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -174,7 +290,7 @@ var Loading = ({
|
|
174
290
|
)
|
175
291
|
);
|
176
292
|
case "progress":
|
177
|
-
return /* @__PURE__ */
|
293
|
+
return /* @__PURE__ */ React3.createElement(
|
178
294
|
"div",
|
179
295
|
{
|
180
296
|
className: cn(
|
@@ -185,9 +301,9 @@ var Loading = ({
|
|
185
301
|
}
|
186
302
|
);
|
187
303
|
case "orbit":
|
188
|
-
return /* @__PURE__ */
|
304
|
+
return /* @__PURE__ */ React3.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
189
305
|
default:
|
190
|
-
return /* @__PURE__ */
|
306
|
+
return /* @__PURE__ */ React3.createElement(
|
191
307
|
"svg",
|
192
308
|
{
|
193
309
|
viewBox: "0 0 40 40",
|
@@ -199,7 +315,7 @@ var Loading = ({
|
|
199
315
|
classNames == null ? void 0 : classNames.container
|
200
316
|
)
|
201
317
|
},
|
202
|
-
/* @__PURE__ */
|
318
|
+
/* @__PURE__ */ React3.createElement(
|
203
319
|
"circle",
|
204
320
|
{
|
205
321
|
className: cn(
|
@@ -218,7 +334,7 @@ var Loading = ({
|
|
218
334
|
pathLength: "100"
|
219
335
|
}
|
220
336
|
),
|
221
|
-
/* @__PURE__ */
|
337
|
+
/* @__PURE__ */ React3.createElement(
|
222
338
|
"circle",
|
223
339
|
{
|
224
340
|
className: cn(
|
@@ -275,9 +391,10 @@ var buttonVariants = cva(
|
|
275
391
|
}
|
276
392
|
}
|
277
393
|
);
|
278
|
-
var Button =
|
394
|
+
var Button = React4.forwardRef(
|
279
395
|
({
|
280
396
|
className,
|
397
|
+
label,
|
281
398
|
variant,
|
282
399
|
size,
|
283
400
|
asChild = false,
|
@@ -288,7 +405,7 @@ var Button = React2.forwardRef(
|
|
288
405
|
}, ref) => {
|
289
406
|
const Comp = "button";
|
290
407
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
291
|
-
return /* @__PURE__ */
|
408
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React4.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React4.createElement(
|
292
409
|
Comp,
|
293
410
|
{
|
294
411
|
className: cn(
|
@@ -298,7 +415,7 @@ var Button = React2.forwardRef(
|
|
298
415
|
ref,
|
299
416
|
...props
|
300
417
|
},
|
301
|
-
isLoading ? /* @__PURE__ */
|
418
|
+
isLoading ? /* @__PURE__ */ React4.createElement(
|
302
419
|
Loading,
|
303
420
|
{
|
304
421
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -307,20 +424,20 @@ var Button = React2.forwardRef(
|
|
307
424
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
308
425
|
}
|
309
426
|
) : children
|
310
|
-
);
|
427
|
+
));
|
311
428
|
}
|
312
429
|
);
|
313
430
|
Button.displayName = "Button";
|
314
431
|
|
315
432
|
// elements/dropdownMenu/DropdownMenu.tsx
|
316
|
-
import * as
|
433
|
+
import * as React5 from "react";
|
317
434
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
318
435
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
319
436
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
320
437
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
321
438
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
322
439
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
323
|
-
var DropdownMenuSubTrigger =
|
440
|
+
var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
324
441
|
DropdownMenuPrimitive.SubTrigger,
|
325
442
|
{
|
326
443
|
ref,
|
@@ -331,9 +448,9 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
331
448
|
),
|
332
449
|
...props
|
333
450
|
},
|
334
|
-
/* @__PURE__ */
|
451
|
+
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
335
452
|
" ",
|
336
|
-
/* @__PURE__ */
|
453
|
+
/* @__PURE__ */ React5.createElement(
|
337
454
|
"svg",
|
338
455
|
{
|
339
456
|
"aria-label": "Chevron Right Icon",
|
@@ -345,7 +462,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
345
462
|
width: "1em",
|
346
463
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
347
464
|
},
|
348
|
-
/* @__PURE__ */
|
465
|
+
/* @__PURE__ */ React5.createElement(
|
349
466
|
"path",
|
350
467
|
{
|
351
468
|
fillRule: "evenodd",
|
@@ -355,7 +472,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
355
472
|
)
|
356
473
|
));
|
357
474
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
358
|
-
var DropdownMenuSubContent =
|
475
|
+
var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
359
476
|
DropdownMenuPrimitive.SubContent,
|
360
477
|
{
|
361
478
|
ref,
|
@@ -367,7 +484,7 @@ var DropdownMenuSubContent = React3.forwardRef(({ className, ...props }, ref) =>
|
|
367
484
|
}
|
368
485
|
));
|
369
486
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
370
|
-
var DropdownMenuContent =
|
487
|
+
var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
|
371
488
|
DropdownMenuPrimitive.Content,
|
372
489
|
{
|
373
490
|
ref,
|
@@ -380,8 +497,8 @@ var DropdownMenuContent = React3.forwardRef(({ className, sideOffset = 4, ...pro
|
|
380
497
|
}
|
381
498
|
)));
|
382
499
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
383
|
-
var DropdownMenuItem =
|
384
|
-
return /* @__PURE__ */
|
500
|
+
var DropdownMenuItem = React5.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
501
|
+
return /* @__PURE__ */ React5.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React5.createElement(
|
385
502
|
DropdownMenuPrimitive.Item,
|
386
503
|
{
|
387
504
|
disabled: props.disabled,
|
@@ -394,14 +511,14 @@ var DropdownMenuItem = React3.forwardRef(({ className, inset, badged, slug, Link
|
|
394
511
|
),
|
395
512
|
...props
|
396
513
|
},
|
397
|
-
/* @__PURE__ */
|
514
|
+
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
398
515
|
props.end && props.end,
|
399
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
400
|
-
!props.end && badged && /* @__PURE__ */
|
516
|
+
!props.end && props.shortcut && /* @__PURE__ */ React5.createElement(DropdownMenuShortcut, null, props.shortcut),
|
517
|
+
!props.end && badged && /* @__PURE__ */ React5.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
401
518
|
));
|
402
519
|
});
|
403
520
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
404
|
-
var DropdownMenuCheckboxItem =
|
521
|
+
var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
405
522
|
DropdownMenuPrimitive.CheckboxItem,
|
406
523
|
{
|
407
524
|
ref,
|
@@ -412,7 +529,7 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
412
529
|
checked,
|
413
530
|
...props
|
414
531
|
},
|
415
|
-
/* @__PURE__ */
|
532
|
+
/* @__PURE__ */ React5.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React5.createElement(
|
416
533
|
"svg",
|
417
534
|
{
|
418
535
|
"aria-label": "Check Mark",
|
@@ -423,12 +540,12 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
423
540
|
height: "0.60em",
|
424
541
|
width: "0.60em"
|
425
542
|
},
|
426
|
-
/* @__PURE__ */
|
543
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
427
544
|
), " ")),
|
428
545
|
children
|
429
546
|
));
|
430
547
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
431
|
-
var DropdownMenuRadioItem =
|
548
|
+
var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
432
549
|
DropdownMenuPrimitive.RadioItem,
|
433
550
|
{
|
434
551
|
ref,
|
@@ -438,7 +555,7 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
438
555
|
),
|
439
556
|
...props
|
440
557
|
},
|
441
|
-
/* @__PURE__ */
|
558
|
+
/* @__PURE__ */ React5.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React5.createElement(
|
442
559
|
"svg",
|
443
560
|
{
|
444
561
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -453,12 +570,12 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
453
570
|
strokeLinejoin: "round",
|
454
571
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
455
572
|
},
|
456
|
-
/* @__PURE__ */
|
573
|
+
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
457
574
|
))),
|
458
575
|
children
|
459
576
|
));
|
460
577
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
461
|
-
var DropdownMenuLabel =
|
578
|
+
var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
462
579
|
DropdownMenuPrimitive.Label,
|
463
580
|
{
|
464
581
|
ref,
|
@@ -471,7 +588,7 @@ var DropdownMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref)
|
|
471
588
|
}
|
472
589
|
));
|
473
590
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
474
|
-
var DropdownMenuSeparator =
|
591
|
+
var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
475
592
|
DropdownMenuPrimitive.Separator,
|
476
593
|
{
|
477
594
|
ref,
|
@@ -484,7 +601,7 @@ var DropdownMenuShortcut = ({
|
|
484
601
|
className,
|
485
602
|
...props
|
486
603
|
}) => {
|
487
|
-
return /* @__PURE__ */
|
604
|
+
return /* @__PURE__ */ React5.createElement(
|
488
605
|
"span",
|
489
606
|
{
|
490
607
|
className: cn(
|
@@ -524,10 +641,10 @@ var DropdownMenu = ({
|
|
524
641
|
default: "hawa-px-2 hawa-py-3 ",
|
525
642
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
526
643
|
};
|
527
|
-
let [values, setValues] =
|
644
|
+
let [values, setValues] = React5.useState(
|
528
645
|
items.map((item) => item.currentOption)
|
529
646
|
);
|
530
|
-
return /* @__PURE__ */
|
647
|
+
return /* @__PURE__ */ React5.createElement(
|
531
648
|
DropdownMenuRoot,
|
532
649
|
{
|
533
650
|
onOpenChange,
|
@@ -535,8 +652,8 @@ var DropdownMenu = ({
|
|
535
652
|
modal: false,
|
536
653
|
dir: direction
|
537
654
|
},
|
538
|
-
/* @__PURE__ */
|
539
|
-
/* @__PURE__ */
|
655
|
+
/* @__PURE__ */ React5.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
656
|
+
/* @__PURE__ */ React5.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React5.createElement(
|
540
657
|
DropdownMenuContent,
|
541
658
|
{
|
542
659
|
side,
|
@@ -557,12 +674,12 @@ var DropdownMenu = ({
|
|
557
674
|
var _a;
|
558
675
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
559
676
|
if (item.itemType === "separator") {
|
560
|
-
return /* @__PURE__ */
|
677
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSeparator, { key: index });
|
561
678
|
} else if (item.itemType === "label") {
|
562
|
-
return /* @__PURE__ */
|
679
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuLabel, { key: index }, item.label);
|
563
680
|
} else if (item.itemType === "radio") {
|
564
681
|
let dd = item.currentOption;
|
565
|
-
return /* @__PURE__ */
|
682
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
566
683
|
DropdownMenuSubTrigger,
|
567
684
|
{
|
568
685
|
dir: direction,
|
@@ -570,7 +687,7 @@ var DropdownMenu = ({
|
|
570
687
|
},
|
571
688
|
item.icon && item.icon,
|
572
689
|
item.label && item.label
|
573
|
-
), /* @__PURE__ */
|
690
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React5.createElement(
|
574
691
|
DropdownMenuRadioGroup,
|
575
692
|
{
|
576
693
|
value: values[index],
|
@@ -584,12 +701,12 @@ var DropdownMenu = ({
|
|
584
701
|
}
|
585
702
|
}
|
586
703
|
},
|
587
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
704
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React5.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
588
705
|
)));
|
589
706
|
} else if (item.itemType === "custom") {
|
590
|
-
return /* @__PURE__ */
|
707
|
+
return /* @__PURE__ */ React5.createElement("div", { key: index }, item.content);
|
591
708
|
} else {
|
592
|
-
return item.subitems ? /* @__PURE__ */
|
709
|
+
return item.subitems ? /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
593
710
|
DropdownMenuSubTrigger,
|
594
711
|
{
|
595
712
|
dir: direction,
|
@@ -597,9 +714,9 @@ var DropdownMenu = ({
|
|
597
714
|
},
|
598
715
|
item.icon && item.icon,
|
599
716
|
item.label && item.label
|
600
|
-
), /* @__PURE__ */
|
717
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
601
718
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
602
|
-
return /* @__PURE__ */
|
719
|
+
return /* @__PURE__ */ React5.createElement(
|
603
720
|
DropdownMenuItem,
|
604
721
|
{
|
605
722
|
key: subIndex,
|
@@ -628,7 +745,7 @@ var DropdownMenu = ({
|
|
628
745
|
subitem.icon && subitem.icon,
|
629
746
|
subitem.label && subitem.label
|
630
747
|
);
|
631
|
-
})))) : /* @__PURE__ */
|
748
|
+
})))) : /* @__PURE__ */ React5.createElement(
|
632
749
|
DropdownMenuItem,
|
633
750
|
{
|
634
751
|
LinkComponent: ItemLinkComponent,
|
@@ -684,122 +801,6 @@ var DropdownMenu = ({
|
|
684
801
|
// elements/input/Input.tsx
|
685
802
|
import React7, { forwardRef as forwardRef4 } from "react";
|
686
803
|
|
687
|
-
// elements/label/Label.tsx
|
688
|
-
import * as React5 from "react";
|
689
|
-
|
690
|
-
// elements/tooltip/Tooltip.tsx
|
691
|
-
import React4 from "react";
|
692
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
693
|
-
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
694
|
-
TooltipPrimitive.Content,
|
695
|
-
{
|
696
|
-
ref,
|
697
|
-
sideOffset,
|
698
|
-
className: cn(
|
699
|
-
"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",
|
700
|
-
{
|
701
|
-
"hawa-text-xs": size === "small",
|
702
|
-
"hawa-text-xl": size === "large"
|
703
|
-
},
|
704
|
-
className
|
705
|
-
),
|
706
|
-
...props
|
707
|
-
}
|
708
|
-
));
|
709
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
710
|
-
var TooltipArrow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
711
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
712
|
-
var Tooltip = ({
|
713
|
-
side,
|
714
|
-
size,
|
715
|
-
open,
|
716
|
-
content,
|
717
|
-
children,
|
718
|
-
disabled,
|
719
|
-
defaultOpen,
|
720
|
-
onOpenChange,
|
721
|
-
triggerProps,
|
722
|
-
contentProps,
|
723
|
-
providerProps,
|
724
|
-
delayDuration = 300,
|
725
|
-
...props
|
726
|
-
}) => {
|
727
|
-
return /* @__PURE__ */ React4.createElement(
|
728
|
-
TooltipPrimitive.TooltipProvider,
|
729
|
-
{
|
730
|
-
delayDuration,
|
731
|
-
...providerProps
|
732
|
-
},
|
733
|
-
/* @__PURE__ */ React4.createElement(
|
734
|
-
TooltipPrimitive.Root,
|
735
|
-
{
|
736
|
-
open: !disabled && open,
|
737
|
-
defaultOpen,
|
738
|
-
onOpenChange,
|
739
|
-
...props
|
740
|
-
},
|
741
|
-
/* @__PURE__ */ React4.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
742
|
-
/* @__PURE__ */ React4.createElement(
|
743
|
-
TooltipContent,
|
744
|
-
{
|
745
|
-
size,
|
746
|
-
side,
|
747
|
-
align: "center",
|
748
|
-
...contentProps,
|
749
|
-
style: {
|
750
|
-
...contentProps == null ? void 0 : contentProps.style,
|
751
|
-
maxWidth: "var(--radix-tooltip-content-available-width)",
|
752
|
-
maxHeight: "var(--radix-tooltip-content-available-height)"
|
753
|
-
}
|
754
|
-
},
|
755
|
-
content
|
756
|
-
)
|
757
|
-
)
|
758
|
-
);
|
759
|
-
};
|
760
|
-
|
761
|
-
// elements/label/Label.tsx
|
762
|
-
var Label2 = React5.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React5.createElement(
|
763
|
-
"label",
|
764
|
-
{
|
765
|
-
ref,
|
766
|
-
className: cn(
|
767
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
768
|
-
className
|
769
|
-
),
|
770
|
-
...props
|
771
|
-
},
|
772
|
-
children,
|
773
|
-
required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
774
|
-
), hint && /* @__PURE__ */ React5.createElement(
|
775
|
-
Tooltip,
|
776
|
-
{
|
777
|
-
content: hint,
|
778
|
-
side: hintSide,
|
779
|
-
triggerProps: {
|
780
|
-
tabIndex: -1,
|
781
|
-
onClick: (event) => event.preventDefault()
|
782
|
-
}
|
783
|
-
},
|
784
|
-
/* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement(
|
785
|
-
"svg",
|
786
|
-
{
|
787
|
-
xmlns: "http://www.w3.org/2000/svg",
|
788
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
789
|
-
viewBox: "0 0 24 24",
|
790
|
-
fill: "none",
|
791
|
-
stroke: "currentColor",
|
792
|
-
strokeWidth: "2",
|
793
|
-
strokeLinecap: "round",
|
794
|
-
strokeLinejoin: "round"
|
795
|
-
},
|
796
|
-
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
797
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
798
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
799
|
-
))
|
800
|
-
)));
|
801
|
-
Label2.displayName = "Label";
|
802
|
-
|
803
804
|
// elements/skeleton/Skeleton.tsx
|
804
805
|
import React6 from "react";
|
805
806
|
function Skeleton({
|
@@ -891,7 +892,7 @@ var Input = forwardRef4(
|
|
891
892
|
"hawa-w-full hawa-gap-2"
|
892
893
|
)
|
893
894
|
},
|
894
|
-
props.label && /* @__PURE__ */ React7.createElement(
|
895
|
+
props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label),
|
895
896
|
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ React7.createElement(
|
896
897
|
"span",
|
897
898
|
{
|
@@ -1200,7 +1201,9 @@ var DataTable = ({
|
|
1200
1201
|
checked: column.getIsVisible(),
|
1201
1202
|
onCheckedChange: (value) => column.toggleVisibility(!!value)
|
1202
1203
|
},
|
1203
|
-
|
1204
|
+
translateFn ? translateFn(
|
1205
|
+
((_a2 = column.columnDef.meta) == null ? void 0 : _a2.i18nKey) ? (_b2 = column.columnDef.meta) == null ? void 0 : _b2.i18nKey : column.id
|
1206
|
+
) : column.id
|
1204
1207
|
);
|
1205
1208
|
})
|
1206
1209
|
))), props.isLoading ? /* @__PURE__ */ React9.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React9.createElement(
|