@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/appLayout/index.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// layout/appLayout/AppLayout.tsx
|
4
|
-
import
|
4
|
+
import React9, { useEffect, useState as useState2 } from "react";
|
5
5
|
|
6
6
|
// hooks/useOutsideClick.ts
|
7
7
|
import React from "react";
|
@@ -30,11 +30,127 @@ function cn(...inputs) {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
// elements/button/Button.tsx
|
33
|
-
import * as
|
33
|
+
import * as React5 from "react";
|
34
34
|
import { cva } from "class-variance-authority";
|
35
35
|
|
36
|
-
// elements/
|
36
|
+
// elements/label/Label.tsx
|
37
|
+
import * as React3 from "react";
|
38
|
+
|
39
|
+
// elements/tooltip/Tooltip.tsx
|
37
40
|
import React2 from "react";
|
41
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
42
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
43
|
+
TooltipPrimitive.Content,
|
44
|
+
{
|
45
|
+
ref,
|
46
|
+
sideOffset,
|
47
|
+
className: cn(
|
48
|
+
"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",
|
49
|
+
{
|
50
|
+
"hawa-text-xs": size === "small",
|
51
|
+
"hawa-text-xl": size === "large"
|
52
|
+
},
|
53
|
+
className
|
54
|
+
),
|
55
|
+
...props
|
56
|
+
}
|
57
|
+
));
|
58
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
59
|
+
var TooltipArrow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
60
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
61
|
+
var Tooltip = ({
|
62
|
+
side,
|
63
|
+
size,
|
64
|
+
open,
|
65
|
+
content,
|
66
|
+
children,
|
67
|
+
disabled,
|
68
|
+
defaultOpen,
|
69
|
+
onOpenChange,
|
70
|
+
triggerProps,
|
71
|
+
contentProps,
|
72
|
+
providerProps,
|
73
|
+
delayDuration = 300,
|
74
|
+
...props
|
75
|
+
}) => {
|
76
|
+
return /* @__PURE__ */ React2.createElement(
|
77
|
+
TooltipPrimitive.TooltipProvider,
|
78
|
+
{
|
79
|
+
delayDuration,
|
80
|
+
...providerProps
|
81
|
+
},
|
82
|
+
/* @__PURE__ */ React2.createElement(
|
83
|
+
TooltipPrimitive.Root,
|
84
|
+
{
|
85
|
+
open: !disabled && open,
|
86
|
+
defaultOpen,
|
87
|
+
onOpenChange,
|
88
|
+
...props
|
89
|
+
},
|
90
|
+
/* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
91
|
+
/* @__PURE__ */ React2.createElement(
|
92
|
+
TooltipContent,
|
93
|
+
{
|
94
|
+
size,
|
95
|
+
side,
|
96
|
+
align: "center",
|
97
|
+
...contentProps,
|
98
|
+
style: {
|
99
|
+
...contentProps == null ? void 0 : contentProps.style,
|
100
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
101
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
102
|
+
}
|
103
|
+
},
|
104
|
+
content
|
105
|
+
)
|
106
|
+
)
|
107
|
+
);
|
108
|
+
};
|
109
|
+
|
110
|
+
// elements/label/Label.tsx
|
111
|
+
var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
|
112
|
+
"label",
|
113
|
+
{
|
114
|
+
ref,
|
115
|
+
className: cn(
|
116
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
117
|
+
className
|
118
|
+
),
|
119
|
+
...props
|
120
|
+
},
|
121
|
+
children,
|
122
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
123
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
124
|
+
Tooltip,
|
125
|
+
{
|
126
|
+
content: hint,
|
127
|
+
side: hintSide,
|
128
|
+
triggerProps: {
|
129
|
+
tabIndex: -1,
|
130
|
+
onClick: (event) => event.preventDefault()
|
131
|
+
}
|
132
|
+
},
|
133
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
134
|
+
"svg",
|
135
|
+
{
|
136
|
+
xmlns: "http://www.w3.org/2000/svg",
|
137
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
138
|
+
viewBox: "0 0 24 24",
|
139
|
+
fill: "none",
|
140
|
+
stroke: "currentColor",
|
141
|
+
strokeWidth: "2",
|
142
|
+
strokeLinecap: "round",
|
143
|
+
strokeLinejoin: "round"
|
144
|
+
},
|
145
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
146
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
147
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
148
|
+
))
|
149
|
+
)));
|
150
|
+
Label.displayName = "Label";
|
151
|
+
|
152
|
+
// elements/loading/Loading.tsx
|
153
|
+
import React4 from "react";
|
38
154
|
var Loading = ({
|
39
155
|
design = "spinner",
|
40
156
|
size = "normal",
|
@@ -65,7 +181,7 @@ var Loading = ({
|
|
65
181
|
};
|
66
182
|
switch (design.split("-")[0]) {
|
67
183
|
case "dots":
|
68
|
-
return /* @__PURE__ */
|
184
|
+
return /* @__PURE__ */ React4.createElement(
|
69
185
|
"div",
|
70
186
|
{
|
71
187
|
className: cn(
|
@@ -73,7 +189,7 @@ var Loading = ({
|
|
73
189
|
classNames == null ? void 0 : classNames.container
|
74
190
|
)
|
75
191
|
},
|
76
|
-
/* @__PURE__ */
|
192
|
+
/* @__PURE__ */ React4.createElement(
|
77
193
|
"div",
|
78
194
|
{
|
79
195
|
className: cn(
|
@@ -84,7 +200,7 @@ var Loading = ({
|
|
84
200
|
)
|
85
201
|
}
|
86
202
|
),
|
87
|
-
/* @__PURE__ */
|
203
|
+
/* @__PURE__ */ React4.createElement(
|
88
204
|
"div",
|
89
205
|
{
|
90
206
|
className: cn(
|
@@ -95,7 +211,7 @@ var Loading = ({
|
|
95
211
|
)
|
96
212
|
}
|
97
213
|
),
|
98
|
-
/* @__PURE__ */
|
214
|
+
/* @__PURE__ */ React4.createElement(
|
99
215
|
"div",
|
100
216
|
{
|
101
217
|
className: cn(
|
@@ -108,7 +224,7 @@ var Loading = ({
|
|
108
224
|
)
|
109
225
|
);
|
110
226
|
case "square":
|
111
|
-
return /* @__PURE__ */
|
227
|
+
return /* @__PURE__ */ React4.createElement(
|
112
228
|
"svg",
|
113
229
|
{
|
114
230
|
className: cn(
|
@@ -120,7 +236,7 @@ var Loading = ({
|
|
120
236
|
height: "35",
|
121
237
|
width: "35"
|
122
238
|
},
|
123
|
-
/* @__PURE__ */
|
239
|
+
/* @__PURE__ */ React4.createElement(
|
124
240
|
"rect",
|
125
241
|
{
|
126
242
|
className: "squircle-track",
|
@@ -132,7 +248,7 @@ var Loading = ({
|
|
132
248
|
height: "32.5"
|
133
249
|
}
|
134
250
|
),
|
135
|
-
/* @__PURE__ */
|
251
|
+
/* @__PURE__ */ React4.createElement(
|
136
252
|
"rect",
|
137
253
|
{
|
138
254
|
className: "square-car",
|
@@ -147,7 +263,7 @@ var Loading = ({
|
|
147
263
|
)
|
148
264
|
);
|
149
265
|
case "squircle":
|
150
|
-
return /* @__PURE__ */
|
266
|
+
return /* @__PURE__ */ React4.createElement(
|
151
267
|
"svg",
|
152
268
|
{
|
153
269
|
x: "0px",
|
@@ -162,7 +278,7 @@ var Loading = ({
|
|
162
278
|
classNames == null ? void 0 : classNames.container
|
163
279
|
)
|
164
280
|
},
|
165
|
-
/* @__PURE__ */
|
281
|
+
/* @__PURE__ */ React4.createElement(
|
166
282
|
"path",
|
167
283
|
{
|
168
284
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -172,7 +288,7 @@ var Loading = ({
|
|
172
288
|
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"
|
173
289
|
}
|
174
290
|
),
|
175
|
-
/* @__PURE__ */
|
291
|
+
/* @__PURE__ */ React4.createElement(
|
176
292
|
"path",
|
177
293
|
{
|
178
294
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -184,7 +300,7 @@ var Loading = ({
|
|
184
300
|
)
|
185
301
|
);
|
186
302
|
case "progress":
|
187
|
-
return /* @__PURE__ */
|
303
|
+
return /* @__PURE__ */ React4.createElement(
|
188
304
|
"div",
|
189
305
|
{
|
190
306
|
className: cn(
|
@@ -195,9 +311,9 @@ var Loading = ({
|
|
195
311
|
}
|
196
312
|
);
|
197
313
|
case "orbit":
|
198
|
-
return /* @__PURE__ */
|
314
|
+
return /* @__PURE__ */ React4.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
199
315
|
default:
|
200
|
-
return /* @__PURE__ */
|
316
|
+
return /* @__PURE__ */ React4.createElement(
|
201
317
|
"svg",
|
202
318
|
{
|
203
319
|
viewBox: "0 0 40 40",
|
@@ -209,7 +325,7 @@ var Loading = ({
|
|
209
325
|
classNames == null ? void 0 : classNames.container
|
210
326
|
)
|
211
327
|
},
|
212
|
-
/* @__PURE__ */
|
328
|
+
/* @__PURE__ */ React4.createElement(
|
213
329
|
"circle",
|
214
330
|
{
|
215
331
|
className: cn(
|
@@ -228,7 +344,7 @@ var Loading = ({
|
|
228
344
|
pathLength: "100"
|
229
345
|
}
|
230
346
|
),
|
231
|
-
/* @__PURE__ */
|
347
|
+
/* @__PURE__ */ React4.createElement(
|
232
348
|
"circle",
|
233
349
|
{
|
234
350
|
className: cn(
|
@@ -285,9 +401,10 @@ var buttonVariants = cva(
|
|
285
401
|
}
|
286
402
|
}
|
287
403
|
);
|
288
|
-
var Button =
|
404
|
+
var Button = React5.forwardRef(
|
289
405
|
({
|
290
406
|
className,
|
407
|
+
label,
|
291
408
|
variant,
|
292
409
|
size,
|
293
410
|
asChild = false,
|
@@ -298,7 +415,7 @@ var Button = React3.forwardRef(
|
|
298
415
|
}, ref) => {
|
299
416
|
const Comp = "button";
|
300
417
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
301
|
-
return /* @__PURE__ */
|
418
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React5.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React5.createElement(
|
302
419
|
Comp,
|
303
420
|
{
|
304
421
|
className: cn(
|
@@ -308,7 +425,7 @@ var Button = React3.forwardRef(
|
|
308
425
|
ref,
|
309
426
|
...props
|
310
427
|
},
|
311
|
-
isLoading ? /* @__PURE__ */
|
428
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
312
429
|
Loading,
|
313
430
|
{
|
314
431
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -317,20 +434,20 @@ var Button = React3.forwardRef(
|
|
317
434
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
318
435
|
}
|
319
436
|
) : children
|
320
|
-
);
|
437
|
+
));
|
321
438
|
}
|
322
439
|
);
|
323
440
|
Button.displayName = "Button";
|
324
441
|
|
325
442
|
// elements/dropdownMenu/DropdownMenu.tsx
|
326
|
-
import * as
|
443
|
+
import * as React6 from "react";
|
327
444
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
328
445
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
329
446
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
330
447
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
331
448
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
332
449
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
333
|
-
var DropdownMenuSubTrigger =
|
450
|
+
var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
334
451
|
DropdownMenuPrimitive.SubTrigger,
|
335
452
|
{
|
336
453
|
ref,
|
@@ -341,9 +458,9 @@ var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ..
|
|
341
458
|
),
|
342
459
|
...props
|
343
460
|
},
|
344
|
-
/* @__PURE__ */
|
461
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
345
462
|
" ",
|
346
|
-
/* @__PURE__ */
|
463
|
+
/* @__PURE__ */ React6.createElement(
|
347
464
|
"svg",
|
348
465
|
{
|
349
466
|
"aria-label": "Chevron Right Icon",
|
@@ -355,7 +472,7 @@ var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ..
|
|
355
472
|
width: "1em",
|
356
473
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
357
474
|
},
|
358
|
-
/* @__PURE__ */
|
475
|
+
/* @__PURE__ */ React6.createElement(
|
359
476
|
"path",
|
360
477
|
{
|
361
478
|
fillRule: "evenodd",
|
@@ -365,7 +482,7 @@ var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ..
|
|
365
482
|
)
|
366
483
|
));
|
367
484
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
368
|
-
var DropdownMenuSubContent =
|
485
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
369
486
|
DropdownMenuPrimitive.SubContent,
|
370
487
|
{
|
371
488
|
ref,
|
@@ -377,7 +494,7 @@ var DropdownMenuSubContent = React4.forwardRef(({ className, ...props }, ref) =>
|
|
377
494
|
}
|
378
495
|
));
|
379
496
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
380
|
-
var DropdownMenuContent =
|
497
|
+
var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React6.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React6.createElement(
|
381
498
|
DropdownMenuPrimitive.Content,
|
382
499
|
{
|
383
500
|
ref,
|
@@ -390,8 +507,8 @@ var DropdownMenuContent = React4.forwardRef(({ className, sideOffset = 4, ...pro
|
|
390
507
|
}
|
391
508
|
)));
|
392
509
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
393
|
-
var DropdownMenuItem =
|
394
|
-
return /* @__PURE__ */
|
510
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
511
|
+
return /* @__PURE__ */ React6.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React6.createElement(
|
395
512
|
DropdownMenuPrimitive.Item,
|
396
513
|
{
|
397
514
|
disabled: props.disabled,
|
@@ -404,14 +521,14 @@ var DropdownMenuItem = React4.forwardRef(({ className, inset, badged, slug, Link
|
|
404
521
|
),
|
405
522
|
...props
|
406
523
|
},
|
407
|
-
/* @__PURE__ */
|
524
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
408
525
|
props.end && props.end,
|
409
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
410
|
-
!props.end && badged && /* @__PURE__ */
|
526
|
+
!props.end && props.shortcut && /* @__PURE__ */ React6.createElement(DropdownMenuShortcut, null, props.shortcut),
|
527
|
+
!props.end && badged && /* @__PURE__ */ React6.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
411
528
|
));
|
412
529
|
});
|
413
530
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
414
|
-
var DropdownMenuCheckboxItem =
|
531
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
415
532
|
DropdownMenuPrimitive.CheckboxItem,
|
416
533
|
{
|
417
534
|
ref,
|
@@ -422,7 +539,7 @@ var DropdownMenuCheckboxItem = React4.forwardRef(({ className, children, checked
|
|
422
539
|
checked,
|
423
540
|
...props
|
424
541
|
},
|
425
|
-
/* @__PURE__ */
|
542
|
+
/* @__PURE__ */ React6.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__ */ React6.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React6.createElement(
|
426
543
|
"svg",
|
427
544
|
{
|
428
545
|
"aria-label": "Check Mark",
|
@@ -433,12 +550,12 @@ var DropdownMenuCheckboxItem = React4.forwardRef(({ className, children, checked
|
|
433
550
|
height: "0.60em",
|
434
551
|
width: "0.60em"
|
435
552
|
},
|
436
|
-
/* @__PURE__ */
|
553
|
+
/* @__PURE__ */ React6.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" })
|
437
554
|
), " ")),
|
438
555
|
children
|
439
556
|
));
|
440
557
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
441
|
-
var DropdownMenuRadioItem =
|
558
|
+
var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
442
559
|
DropdownMenuPrimitive.RadioItem,
|
443
560
|
{
|
444
561
|
ref,
|
@@ -448,7 +565,7 @@ var DropdownMenuRadioItem = React4.forwardRef(({ className, children, ...props }
|
|
448
565
|
),
|
449
566
|
...props
|
450
567
|
},
|
451
|
-
/* @__PURE__ */
|
568
|
+
/* @__PURE__ */ React6.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__ */ React6.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React6.createElement(
|
452
569
|
"svg",
|
453
570
|
{
|
454
571
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -463,12 +580,12 @@ var DropdownMenuRadioItem = React4.forwardRef(({ className, children, ...props }
|
|
463
580
|
strokeLinejoin: "round",
|
464
581
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
465
582
|
},
|
466
|
-
/* @__PURE__ */
|
583
|
+
/* @__PURE__ */ React6.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
467
584
|
))),
|
468
585
|
children
|
469
586
|
));
|
470
587
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
471
|
-
var DropdownMenuLabel =
|
588
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
472
589
|
DropdownMenuPrimitive.Label,
|
473
590
|
{
|
474
591
|
ref,
|
@@ -481,7 +598,7 @@ var DropdownMenuLabel = React4.forwardRef(({ className, inset, ...props }, ref)
|
|
481
598
|
}
|
482
599
|
));
|
483
600
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
484
|
-
var DropdownMenuSeparator =
|
601
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
485
602
|
DropdownMenuPrimitive.Separator,
|
486
603
|
{
|
487
604
|
ref,
|
@@ -494,7 +611,7 @@ var DropdownMenuShortcut = ({
|
|
494
611
|
className,
|
495
612
|
...props
|
496
613
|
}) => {
|
497
|
-
return /* @__PURE__ */
|
614
|
+
return /* @__PURE__ */ React6.createElement(
|
498
615
|
"span",
|
499
616
|
{
|
500
617
|
className: cn(
|
@@ -534,10 +651,10 @@ var DropdownMenu = ({
|
|
534
651
|
default: "hawa-px-2 hawa-py-3 ",
|
535
652
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
536
653
|
};
|
537
|
-
let [values, setValues] =
|
654
|
+
let [values, setValues] = React6.useState(
|
538
655
|
items.map((item) => item.currentOption)
|
539
656
|
);
|
540
|
-
return /* @__PURE__ */
|
657
|
+
return /* @__PURE__ */ React6.createElement(
|
541
658
|
DropdownMenuRoot,
|
542
659
|
{
|
543
660
|
onOpenChange,
|
@@ -545,8 +662,8 @@ var DropdownMenu = ({
|
|
545
662
|
modal: false,
|
546
663
|
dir: direction
|
547
664
|
},
|
548
|
-
/* @__PURE__ */
|
549
|
-
/* @__PURE__ */
|
665
|
+
/* @__PURE__ */ React6.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
666
|
+
/* @__PURE__ */ React6.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React6.createElement(
|
550
667
|
DropdownMenuContent,
|
551
668
|
{
|
552
669
|
side,
|
@@ -567,12 +684,12 @@ var DropdownMenu = ({
|
|
567
684
|
var _a;
|
568
685
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
569
686
|
if (item.itemType === "separator") {
|
570
|
-
return /* @__PURE__ */
|
687
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index });
|
571
688
|
} else if (item.itemType === "label") {
|
572
|
-
return /* @__PURE__ */
|
689
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
|
573
690
|
} else if (item.itemType === "radio") {
|
574
691
|
let dd = item.currentOption;
|
575
|
-
return /* @__PURE__ */
|
692
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
576
693
|
DropdownMenuSubTrigger,
|
577
694
|
{
|
578
695
|
dir: direction,
|
@@ -580,7 +697,7 @@ var DropdownMenu = ({
|
|
580
697
|
},
|
581
698
|
item.icon && item.icon,
|
582
699
|
item.label && item.label
|
583
|
-
), /* @__PURE__ */
|
700
|
+
), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
|
584
701
|
DropdownMenuRadioGroup,
|
585
702
|
{
|
586
703
|
value: values[index],
|
@@ -594,12 +711,12 @@ var DropdownMenu = ({
|
|
594
711
|
}
|
595
712
|
}
|
596
713
|
},
|
597
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
714
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
598
715
|
)));
|
599
716
|
} else if (item.itemType === "custom") {
|
600
|
-
return /* @__PURE__ */
|
717
|
+
return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
|
601
718
|
} else {
|
602
|
-
return item.subitems ? /* @__PURE__ */
|
719
|
+
return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
603
720
|
DropdownMenuSubTrigger,
|
604
721
|
{
|
605
722
|
dir: direction,
|
@@ -607,9 +724,9 @@ var DropdownMenu = ({
|
|
607
724
|
},
|
608
725
|
item.icon && item.icon,
|
609
726
|
item.label && item.label
|
610
|
-
), /* @__PURE__ */
|
727
|
+
), /* @__PURE__ */ React6.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
611
728
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
612
|
-
return /* @__PURE__ */
|
729
|
+
return /* @__PURE__ */ React6.createElement(
|
613
730
|
DropdownMenuItem,
|
614
731
|
{
|
615
732
|
key: subIndex,
|
@@ -638,7 +755,7 @@ var DropdownMenu = ({
|
|
638
755
|
subitem.icon && subitem.icon,
|
639
756
|
subitem.label && subitem.label
|
640
757
|
);
|
641
|
-
})))) : /* @__PURE__ */
|
758
|
+
})))) : /* @__PURE__ */ React6.createElement(
|
642
759
|
DropdownMenuItem,
|
643
760
|
{
|
644
761
|
LinkComponent: ItemLinkComponent,
|
@@ -691,84 +808,13 @@ var DropdownMenu = ({
|
|
691
808
|
);
|
692
809
|
};
|
693
810
|
|
694
|
-
// elements/tooltip/Tooltip.tsx
|
695
|
-
import React5 from "react";
|
696
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
697
|
-
var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
698
|
-
TooltipPrimitive.Content,
|
699
|
-
{
|
700
|
-
ref,
|
701
|
-
sideOffset,
|
702
|
-
className: cn(
|
703
|
-
"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",
|
704
|
-
{
|
705
|
-
"hawa-text-xs": size === "small",
|
706
|
-
"hawa-text-xl": size === "large"
|
707
|
-
},
|
708
|
-
className
|
709
|
-
),
|
710
|
-
...props
|
711
|
-
}
|
712
|
-
));
|
713
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
714
|
-
var TooltipArrow = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
715
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
716
|
-
var Tooltip = ({
|
717
|
-
side,
|
718
|
-
size,
|
719
|
-
open,
|
720
|
-
content,
|
721
|
-
children,
|
722
|
-
disabled,
|
723
|
-
defaultOpen,
|
724
|
-
onOpenChange,
|
725
|
-
triggerProps,
|
726
|
-
contentProps,
|
727
|
-
providerProps,
|
728
|
-
delayDuration = 300,
|
729
|
-
...props
|
730
|
-
}) => {
|
731
|
-
return /* @__PURE__ */ React5.createElement(
|
732
|
-
TooltipPrimitive.TooltipProvider,
|
733
|
-
{
|
734
|
-
delayDuration,
|
735
|
-
...providerProps
|
736
|
-
},
|
737
|
-
/* @__PURE__ */ React5.createElement(
|
738
|
-
TooltipPrimitive.Root,
|
739
|
-
{
|
740
|
-
open: !disabled && open,
|
741
|
-
defaultOpen,
|
742
|
-
onOpenChange,
|
743
|
-
...props
|
744
|
-
},
|
745
|
-
/* @__PURE__ */ React5.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
746
|
-
/* @__PURE__ */ React5.createElement(
|
747
|
-
TooltipContent,
|
748
|
-
{
|
749
|
-
size,
|
750
|
-
side,
|
751
|
-
align: "center",
|
752
|
-
...contentProps,
|
753
|
-
style: {
|
754
|
-
...contentProps == null ? void 0 : contentProps.style,
|
755
|
-
maxWidth: "var(--radix-tooltip-content-available-width)",
|
756
|
-
maxHeight: "var(--radix-tooltip-content-available-height)"
|
757
|
-
}
|
758
|
-
},
|
759
|
-
content
|
760
|
-
)
|
761
|
-
)
|
762
|
-
);
|
763
|
-
};
|
764
|
-
|
765
811
|
// layout/sidebar/Sidebar.tsx
|
766
|
-
import * as
|
812
|
+
import * as React8 from "react";
|
767
813
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
768
814
|
|
769
815
|
// elements/chip/Chip.tsx
|
770
|
-
import
|
771
|
-
var Chip =
|
816
|
+
import React7 from "react";
|
817
|
+
var Chip = React7.forwardRef(
|
772
818
|
({
|
773
819
|
label,
|
774
820
|
size = "normal",
|
@@ -810,7 +856,7 @@ var Chip = React6.forwardRef(
|
|
810
856
|
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
811
857
|
};
|
812
858
|
if (label) {
|
813
|
-
return /* @__PURE__ */
|
859
|
+
return /* @__PURE__ */ React7.createElement(
|
814
860
|
"span",
|
815
861
|
{
|
816
862
|
...rest,
|
@@ -822,7 +868,7 @@ var Chip = React6.forwardRef(
|
|
822
868
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
823
869
|
)
|
824
870
|
},
|
825
|
-
dotType && /* @__PURE__ */
|
871
|
+
dotType && /* @__PURE__ */ React7.createElement(
|
826
872
|
"span",
|
827
873
|
{
|
828
874
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -832,7 +878,7 @@ var Chip = React6.forwardRef(
|
|
832
878
|
label
|
833
879
|
);
|
834
880
|
} else {
|
835
|
-
return /* @__PURE__ */
|
881
|
+
return /* @__PURE__ */ React7.createElement(
|
836
882
|
"span",
|
837
883
|
{
|
838
884
|
...rest,
|
@@ -850,9 +896,9 @@ var Chip = React6.forwardRef(
|
|
850
896
|
// layout/sidebar/Sidebar.tsx
|
851
897
|
var Accordion = AccordionPrimitive.Root;
|
852
898
|
var triggerStyles = "hawa-flex hawa-flex-1 hawa-items-center hawa-duration-75 hawa-select-none hawa-cursor-pointer hawa-rounded hawa-justify-between hawa-p-2 hawa-px-3 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa--rotate-90";
|
853
|
-
var AccordionItem =
|
899
|
+
var AccordionItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React8.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
854
900
|
AccordionItem.displayName = "AccordionItem";
|
855
|
-
var AccordionTrigger =
|
901
|
+
var AccordionTrigger = React8.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React8.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React8.createElement(
|
856
902
|
AccordionPrimitive.Trigger,
|
857
903
|
{
|
858
904
|
ref,
|
@@ -860,7 +906,7 @@ var AccordionTrigger = React7.forwardRef(({ className, showArrow, children, ...p
|
|
860
906
|
...props
|
861
907
|
},
|
862
908
|
children,
|
863
|
-
showArrow && /* @__PURE__ */
|
909
|
+
showArrow && /* @__PURE__ */ React8.createElement(
|
864
910
|
"svg",
|
865
911
|
{
|
866
912
|
"aria-label": "Chevron Right Icon",
|
@@ -871,11 +917,11 @@ var AccordionTrigger = React7.forwardRef(({ className, showArrow, children, ...p
|
|
871
917
|
width: "1em",
|
872
918
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
873
919
|
},
|
874
|
-
/* @__PURE__ */
|
920
|
+
/* @__PURE__ */ React8.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
|
875
921
|
)
|
876
922
|
)));
|
877
923
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
878
|
-
var AccordionContent =
|
924
|
+
var AccordionContent = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React8.createElement(
|
879
925
|
AccordionPrimitive.Content,
|
880
926
|
{
|
881
927
|
ref,
|
@@ -885,7 +931,7 @@ var AccordionContent = React7.forwardRef(({ className, children, ...props }, ref
|
|
885
931
|
),
|
886
932
|
...props
|
887
933
|
},
|
888
|
-
/* @__PURE__ */
|
934
|
+
/* @__PURE__ */ React8.createElement("div", null, children)
|
889
935
|
));
|
890
936
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
891
937
|
var SidebarGroup = ({
|
@@ -901,7 +947,7 @@ var SidebarGroup = ({
|
|
901
947
|
...props
|
902
948
|
}) => {
|
903
949
|
const LinkComponent = props.LinkComponent || "a";
|
904
|
-
return /* @__PURE__ */
|
950
|
+
return /* @__PURE__ */ React8.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React8.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React8.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React8.createElement(
|
905
951
|
Accordion,
|
906
952
|
{
|
907
953
|
value: openedItem,
|
@@ -912,7 +958,7 @@ var SidebarGroup = ({
|
|
912
958
|
collapsible: true,
|
913
959
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
914
960
|
},
|
915
|
-
items.map((item, idx) => /* @__PURE__ */
|
961
|
+
items.map((item, idx) => /* @__PURE__ */ React8.createElement(
|
916
962
|
SidebarItem,
|
917
963
|
{
|
918
964
|
isOpen,
|
@@ -940,14 +986,14 @@ var SidebarItem = ({
|
|
940
986
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
941
987
|
};
|
942
988
|
if (item.subitems) {
|
943
|
-
return /* @__PURE__ */
|
989
|
+
return /* @__PURE__ */ React8.createElement(
|
944
990
|
AccordionItem,
|
945
991
|
{
|
946
992
|
value: item.value,
|
947
993
|
className: "hawa-overflow-x-clip ",
|
948
994
|
dir: direction
|
949
995
|
},
|
950
|
-
/* @__PURE__ */
|
996
|
+
/* @__PURE__ */ React8.createElement(
|
951
997
|
AccordionTrigger,
|
952
998
|
{
|
953
999
|
className: cn(
|
@@ -959,7 +1005,7 @@ var SidebarItem = ({
|
|
959
1005
|
),
|
960
1006
|
showArrow: isOpen
|
961
1007
|
},
|
962
|
-
/* @__PURE__ */
|
1008
|
+
/* @__PURE__ */ React8.createElement(
|
963
1009
|
"div",
|
964
1010
|
{
|
965
1011
|
className: cn(
|
@@ -967,7 +1013,7 @@ var SidebarItem = ({
|
|
967
1013
|
)
|
968
1014
|
},
|
969
1015
|
item.icon && item.icon,
|
970
|
-
/* @__PURE__ */
|
1016
|
+
/* @__PURE__ */ React8.createElement(
|
971
1017
|
"span",
|
972
1018
|
{
|
973
1019
|
className: cn(
|
@@ -979,14 +1025,14 @@ var SidebarItem = ({
|
|
979
1025
|
)
|
980
1026
|
)
|
981
1027
|
),
|
982
|
-
item.subitems && /* @__PURE__ */
|
1028
|
+
item.subitems && /* @__PURE__ */ React8.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React8.createElement(
|
983
1029
|
"div",
|
984
1030
|
{
|
985
1031
|
className: cn(
|
986
1032
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
987
1033
|
)
|
988
1034
|
},
|
989
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1035
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React8.createElement(
|
990
1036
|
LinkComponent,
|
991
1037
|
{
|
992
1038
|
href: subitem.slug,
|
@@ -1017,7 +1063,7 @@ var SidebarItem = ({
|
|
1017
1063
|
))
|
1018
1064
|
);
|
1019
1065
|
} else {
|
1020
|
-
return /* @__PURE__ */
|
1066
|
+
return /* @__PURE__ */ React8.createElement(
|
1021
1067
|
LinkComponent,
|
1022
1068
|
{
|
1023
1069
|
href: item.slug,
|
@@ -1041,7 +1087,7 @@ var SidebarItem = ({
|
|
1041
1087
|
"hawa-overflow-x-clip "
|
1042
1088
|
)
|
1043
1089
|
},
|
1044
|
-
/* @__PURE__ */
|
1090
|
+
/* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React8.createElement(
|
1045
1091
|
"span",
|
1046
1092
|
{
|
1047
1093
|
className: cn(
|
@@ -1051,7 +1097,7 @@ var SidebarItem = ({
|
|
1051
1097
|
},
|
1052
1098
|
item.label,
|
1053
1099
|
" ",
|
1054
|
-
item.badge && /* @__PURE__ */
|
1100
|
+
item.badge && /* @__PURE__ */ React8.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1055
1101
|
))
|
1056
1102
|
);
|
1057
1103
|
}
|
@@ -1130,7 +1176,7 @@ var AppLayout = ({
|
|
1130
1176
|
setOpenSideMenu(false);
|
1131
1177
|
}
|
1132
1178
|
}, [size]);
|
1133
|
-
return /* @__PURE__ */
|
1179
|
+
return /* @__PURE__ */ React9.createElement("div", { className: "hawa-fixed hawa-left-0" }, props.topBar && /* @__PURE__ */ React9.createElement(
|
1134
1180
|
"div",
|
1135
1181
|
{
|
1136
1182
|
className: cn(
|
@@ -1139,7 +1185,7 @@ var AppLayout = ({
|
|
1139
1185
|
bordered && "hawa-border-b-[1px]"
|
1140
1186
|
)
|
1141
1187
|
},
|
1142
|
-
size > 600 ? /* @__PURE__ */
|
1188
|
+
size > 600 ? /* @__PURE__ */ React9.createElement(
|
1143
1189
|
"div",
|
1144
1190
|
{
|
1145
1191
|
className: cn(
|
@@ -1161,24 +1207,24 @@ var AppLayout = ({
|
|
1161
1207
|
props.pageTitle
|
1162
1208
|
) : (
|
1163
1209
|
// Mobile Drawer Menu Button
|
1164
|
-
/* @__PURE__ */
|
1210
|
+
/* @__PURE__ */ React9.createElement(
|
1165
1211
|
"div",
|
1166
1212
|
{
|
1167
1213
|
dir: direction,
|
1168
1214
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1169
1215
|
},
|
1170
|
-
/* @__PURE__ */
|
1216
|
+
/* @__PURE__ */ React9.createElement(
|
1171
1217
|
"div",
|
1172
1218
|
{
|
1173
1219
|
onClick: () => setOpenSideMenu(true),
|
1174
1220
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1175
1221
|
},
|
1176
|
-
/* @__PURE__ */
|
1222
|
+
/* @__PURE__ */ React9.createElement(MenuIcon, null)
|
1177
1223
|
),
|
1178
|
-
props.pageTitle ? /* @__PURE__ */
|
1224
|
+
props.pageTitle ? /* @__PURE__ */ React9.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React9.createElement("div", null)
|
1179
1225
|
)
|
1180
1226
|
),
|
1181
|
-
/* @__PURE__ */
|
1227
|
+
/* @__PURE__ */ React9.createElement(
|
1182
1228
|
"div",
|
1183
1229
|
{
|
1184
1230
|
className: cn(
|
@@ -1186,16 +1232,16 @@ var AppLayout = ({
|
|
1186
1232
|
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
|
1187
1233
|
)
|
1188
1234
|
},
|
1189
|
-
size > 600 ? /* @__PURE__ */
|
1235
|
+
size > 600 ? /* @__PURE__ */ React9.createElement(
|
1190
1236
|
"div",
|
1191
1237
|
{
|
1192
1238
|
className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
|
1193
1239
|
},
|
1194
|
-
/* @__PURE__ */
|
1240
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-font-bold" }, props.username),
|
1195
1241
|
" ",
|
1196
|
-
/* @__PURE__ */
|
1242
|
+
/* @__PURE__ */ React9.createElement("div", null, props.email)
|
1197
1243
|
) : null,
|
1198
|
-
/* @__PURE__ */
|
1244
|
+
/* @__PURE__ */ React9.createElement(
|
1199
1245
|
DropdownMenu,
|
1200
1246
|
{
|
1201
1247
|
LinkComponent: MenuLinkComponent,
|
@@ -1208,13 +1254,13 @@ var AppLayout = ({
|
|
1208
1254
|
direction: isRTL ? "rtl" : "ltr",
|
1209
1255
|
items: props.profileMenuItems || [],
|
1210
1256
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1211
|
-
trigger: /* @__PURE__ */
|
1257
|
+
trigger: /* @__PURE__ */ React9.createElement(
|
1212
1258
|
"div",
|
1213
1259
|
{
|
1214
1260
|
onClick: onAvatarClick,
|
1215
1261
|
className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600"
|
1216
1262
|
},
|
1217
|
-
props.avatarImage ? /* @__PURE__ */
|
1263
|
+
props.avatarImage ? /* @__PURE__ */ React9.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React9.createElement(
|
1218
1264
|
"svg",
|
1219
1265
|
{
|
1220
1266
|
"aria-label": "Avatar Icon",
|
@@ -1222,7 +1268,7 @@ var AppLayout = ({
|
|
1222
1268
|
fill: "currentColor",
|
1223
1269
|
viewBox: "0 0 20 20"
|
1224
1270
|
},
|
1225
|
-
/* @__PURE__ */
|
1271
|
+
/* @__PURE__ */ React9.createElement(
|
1226
1272
|
"path",
|
1227
1273
|
{
|
1228
1274
|
fillRule: "evenodd",
|
@@ -1235,7 +1281,7 @@ var AppLayout = ({
|
|
1235
1281
|
}
|
1236
1282
|
)
|
1237
1283
|
)
|
1238
|
-
), /* @__PURE__ */
|
1284
|
+
), /* @__PURE__ */ React9.createElement(
|
1239
1285
|
"div",
|
1240
1286
|
{
|
1241
1287
|
className: cn(
|
@@ -1265,7 +1311,7 @@ var AppLayout = ({
|
|
1265
1311
|
},
|
1266
1312
|
ref
|
1267
1313
|
},
|
1268
|
-
/* @__PURE__ */
|
1314
|
+
/* @__PURE__ */ React9.createElement(
|
1269
1315
|
"div",
|
1270
1316
|
{
|
1271
1317
|
onClick: props.onLogoClick,
|
@@ -1280,7 +1326,7 @@ var AppLayout = ({
|
|
1280
1326
|
}
|
1281
1327
|
},
|
1282
1328
|
openSideMenu && props.header && props.header,
|
1283
|
-
!props.header && /* @__PURE__ */
|
1329
|
+
!props.header && /* @__PURE__ */ React9.createElement(
|
1284
1330
|
"img",
|
1285
1331
|
{
|
1286
1332
|
className: cn(
|
@@ -1291,7 +1337,7 @@ var AppLayout = ({
|
|
1291
1337
|
src: props.logoLink
|
1292
1338
|
}
|
1293
1339
|
),
|
1294
|
-
size > 600 ? /* @__PURE__ */
|
1340
|
+
size > 600 ? /* @__PURE__ */ React9.createElement(
|
1295
1341
|
"img",
|
1296
1342
|
{
|
1297
1343
|
className: cn(
|
@@ -1304,7 +1350,7 @@ var AppLayout = ({
|
|
1304
1350
|
}
|
1305
1351
|
) : null
|
1306
1352
|
),
|
1307
|
-
/* @__PURE__ */
|
1353
|
+
/* @__PURE__ */ React9.createElement(
|
1308
1354
|
"div",
|
1309
1355
|
{
|
1310
1356
|
className: cn(
|
@@ -1315,7 +1361,7 @@ var AppLayout = ({
|
|
1315
1361
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1316
1362
|
}
|
1317
1363
|
},
|
1318
|
-
/* @__PURE__ */
|
1364
|
+
/* @__PURE__ */ React9.createElement(
|
1319
1365
|
SidebarGroup,
|
1320
1366
|
{
|
1321
1367
|
direction,
|
@@ -1338,7 +1384,7 @@ var AppLayout = ({
|
|
1338
1384
|
}
|
1339
1385
|
)
|
1340
1386
|
),
|
1341
|
-
/* @__PURE__ */
|
1387
|
+
/* @__PURE__ */ React9.createElement(
|
1342
1388
|
"div",
|
1343
1389
|
{
|
1344
1390
|
className: cn(
|
@@ -1349,8 +1395,8 @@ var AppLayout = ({
|
|
1349
1395
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1350
1396
|
}
|
1351
1397
|
},
|
1352
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
1353
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
1398
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, DrawerFooterActions) : null,
|
1399
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ React9.createElement(
|
1354
1400
|
Tooltip,
|
1355
1401
|
{
|
1356
1402
|
side: "left",
|
@@ -1358,7 +1404,7 @@ var AppLayout = ({
|
|
1358
1404
|
content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar",
|
1359
1405
|
triggerProps: { asChild: true }
|
1360
1406
|
},
|
1361
|
-
/* @__PURE__ */
|
1407
|
+
/* @__PURE__ */ React9.createElement(
|
1362
1408
|
Button,
|
1363
1409
|
{
|
1364
1410
|
variant: "outline",
|
@@ -1371,7 +1417,7 @@ var AppLayout = ({
|
|
1371
1417
|
},
|
1372
1418
|
size: "smallIcon"
|
1373
1419
|
},
|
1374
|
-
/* @__PURE__ */
|
1420
|
+
/* @__PURE__ */ React9.createElement(
|
1375
1421
|
"svg",
|
1376
1422
|
{
|
1377
1423
|
className: cn(
|
@@ -1381,7 +1427,7 @@ var AppLayout = ({
|
|
1381
1427
|
fill: "currentColor",
|
1382
1428
|
viewBox: "0 0 20 20"
|
1383
1429
|
},
|
1384
|
-
/* @__PURE__ */
|
1430
|
+
/* @__PURE__ */ React9.createElement(
|
1385
1431
|
"path",
|
1386
1432
|
{
|
1387
1433
|
fillRule: "evenodd",
|
@@ -1393,7 +1439,7 @@ var AppLayout = ({
|
|
1393
1439
|
)
|
1394
1440
|
) : null
|
1395
1441
|
)
|
1396
|
-
), /* @__PURE__ */
|
1442
|
+
), /* @__PURE__ */ React9.createElement(
|
1397
1443
|
"div",
|
1398
1444
|
{
|
1399
1445
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
@@ -1412,7 +1458,7 @@ var AppLayout = ({
|
|
1412
1458
|
props.children
|
1413
1459
|
));
|
1414
1460
|
};
|
1415
|
-
var MenuIcon = () => /* @__PURE__ */
|
1461
|
+
var MenuIcon = () => /* @__PURE__ */ React9.createElement(
|
1416
1462
|
"svg",
|
1417
1463
|
{
|
1418
1464
|
"aria-label": "Menu Button",
|
@@ -1424,7 +1470,7 @@ var MenuIcon = () => /* @__PURE__ */ React8.createElement(
|
|
1424
1470
|
height: "1.6em",
|
1425
1471
|
width: "1.6em"
|
1426
1472
|
},
|
1427
|
-
/* @__PURE__ */
|
1473
|
+
/* @__PURE__ */ React9.createElement(
|
1428
1474
|
"path",
|
1429
1475
|
{
|
1430
1476
|
fillRule: "evenodd",
|