@sikka/hawa 0.34.8-next → 0.35.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/{Radio-BpXOu4Hr.d.mts → Radio-BCD7k628.d.mts} +3 -0
- package/dist/{Radio-CREjhlGz.d.ts → Radio-y9uhxitu.d.ts} +3 -0
- package/dist/alert/index.js +28 -17
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +61 -50
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +81 -70
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +138 -127
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +28 -17
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +55 -44
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +50 -39
- package/dist/blocks/auth/index.mjs +5 -5
- package/dist/blocks/feedback/index.d.mts +3 -0
- package/dist/blocks/feedback/index.d.ts +3 -0
- package/dist/blocks/feedback/index.js +174 -120
- package/dist/blocks/feedback/index.mjs +29 -93
- package/dist/blocks/index.d.mts +2 -1
- package/dist/blocks/index.d.ts +2 -1
- package/dist/blocks/index.js +253 -201
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +71 -60
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +154 -80
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +13 -0
- package/dist/button/index.d.ts +13 -0
- package/dist/button/index.js +28 -17
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +51 -40
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +34 -23
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +57 -46
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-GEB3LM5A.mjs → chunk-A376BKNX.mjs} +2 -2
- package/dist/{chunk-OS2UOK5C.mjs → chunk-DABX3SU6.mjs} +64 -51
- package/dist/{chunk-QPZ4ZR2B.mjs → chunk-DFWFQWWT.mjs} +155 -116
- package/dist/{chunk-UBNCETCU.mjs → chunk-GVZWOUGN.mjs} +1 -1
- package/dist/chunk-HHC34DXN.mjs +320 -0
- package/dist/{chunk-QVF3VLB7.mjs → chunk-IDKXEJET.mjs} +157 -144
- package/dist/{chunk-AW5FW5TY.mjs → chunk-L56XQRQI.mjs} +1 -1
- package/dist/{chunk-ORNLFAC6.mjs → chunk-XFRJ62W3.mjs} +1 -1
- package/dist/{chunk-RTGD7N7I.mjs → chunk-XJMDUR5A.mjs} +1 -1
- package/dist/{chunk-J7BT4XJR.mjs → chunk-YOT2GVXO.mjs} +1 -1
- package/dist/codeBlock/index.js +28 -17
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +70 -59
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +1 -2
- package/dist/dataTable/index.d.ts +1 -2
- package/dist/dataTable/index.js +144 -105
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +178 -139
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +23 -5
- package/dist/datePicker/index.d.ts +23 -5
- package/dist/datePicker/index.js +46 -18
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +46 -18
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +40 -29
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +135 -124
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +7 -3
- package/dist/elements/index.d.ts +7 -3
- package/dist/elements/index.js +475 -395
- package/dist/elements/index.mjs +32 -4
- package/dist/fileDropzone/index.js +28 -17
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +89 -78
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.d.mts +16 -9
- package/dist/index.d.ts +16 -9
- package/dist/index.js +515 -435
- package/dist/index.mjs +1204 -1124
- package/dist/input/index.js +1 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +85 -24
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +107 -46
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.js +121 -110
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +1 -1
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/radio/index.d.mts +3 -0
- package/dist/radio/index.d.ts +3 -0
- package/dist/radio/index.js +85 -24
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +100 -39
- package/dist/radio/index.mjs.map +1 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs.map +1 -1
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/sortButton/index.js +28 -17
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +58 -47
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +12 -0
- package/dist/splitButton/index.d.ts +12 -0
- package/dist/splitButton/index.js +70 -59
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +93 -82
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs.map +1 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-IQEBXGLM.mjs +0 -215
package/dist/appLayout/index.mjs
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// layout/appLayout/AppLayout.tsx
|
4
|
-
import
|
4
|
+
import React10, { useEffect, useState as useState2 } from "react";
|
5
5
|
|
6
6
|
// hooks/useOutsideClick.ts
|
7
|
-
import
|
7
|
+
import React2 from "react";
|
8
8
|
var useOutsideClick = (callback) => {
|
9
|
-
const ref =
|
10
|
-
|
9
|
+
const ref = React2.useRef(null);
|
10
|
+
React2.useEffect(() => {
|
11
11
|
const handleClick = (event) => {
|
12
12
|
if (ref.current && !ref.current.contains(event.target)) {
|
13
13
|
callback();
|
@@ -30,16 +30,28 @@ function cn(...inputs) {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
// elements/button/Button.tsx
|
33
|
-
import * as
|
33
|
+
import * as React6 from "react";
|
34
34
|
import { cva } from "class-variance-authority";
|
35
35
|
|
36
|
+
// elements/helperText/HelperText.tsx
|
37
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
38
|
+
"p",
|
39
|
+
{
|
40
|
+
className: cn(
|
41
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
42
|
+
helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
43
|
+
)
|
44
|
+
},
|
45
|
+
helperText
|
46
|
+
);
|
47
|
+
|
36
48
|
// elements/label/Label.tsx
|
37
|
-
import * as
|
49
|
+
import * as React4 from "react";
|
38
50
|
|
39
51
|
// elements/tooltip/Tooltip.tsx
|
40
|
-
import
|
52
|
+
import React3 from "react";
|
41
53
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
42
|
-
var TooltipContent =
|
54
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
43
55
|
TooltipPrimitive.Content,
|
44
56
|
{
|
45
57
|
ref,
|
@@ -56,7 +68,7 @@ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "def
|
|
56
68
|
}
|
57
69
|
));
|
58
70
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
59
|
-
var TooltipArrow =
|
71
|
+
var TooltipArrow = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
60
72
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
61
73
|
var Tooltip = ({
|
62
74
|
side,
|
@@ -73,13 +85,13 @@ var Tooltip = ({
|
|
73
85
|
delayDuration = 300,
|
74
86
|
...props
|
75
87
|
}) => {
|
76
|
-
return /* @__PURE__ */
|
88
|
+
return /* @__PURE__ */ React3.createElement(
|
77
89
|
TooltipPrimitive.TooltipProvider,
|
78
90
|
{
|
79
91
|
delayDuration,
|
80
92
|
...providerProps
|
81
93
|
},
|
82
|
-
/* @__PURE__ */
|
94
|
+
/* @__PURE__ */ React3.createElement(
|
83
95
|
TooltipPrimitive.Root,
|
84
96
|
{
|
85
97
|
open: !disabled && open,
|
@@ -87,8 +99,8 @@ var Tooltip = ({
|
|
87
99
|
onOpenChange,
|
88
100
|
...props
|
89
101
|
},
|
90
|
-
/* @__PURE__ */
|
91
|
-
/* @__PURE__ */
|
102
|
+
/* @__PURE__ */ React3.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
103
|
+
/* @__PURE__ */ React3.createElement(
|
92
104
|
TooltipContent,
|
93
105
|
{
|
94
106
|
size,
|
@@ -108,7 +120,7 @@ var Tooltip = ({
|
|
108
120
|
};
|
109
121
|
|
110
122
|
// elements/label/Label.tsx
|
111
|
-
var Label =
|
123
|
+
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(
|
112
124
|
"label",
|
113
125
|
{
|
114
126
|
ref,
|
@@ -119,8 +131,8 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
119
131
|
...props
|
120
132
|
},
|
121
133
|
children,
|
122
|
-
required && /* @__PURE__ */
|
123
|
-
), hint && /* @__PURE__ */
|
134
|
+
required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
135
|
+
), hint && /* @__PURE__ */ React4.createElement(
|
124
136
|
Tooltip,
|
125
137
|
{
|
126
138
|
content: hint,
|
@@ -130,7 +142,7 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
130
142
|
onClick: (event) => event.preventDefault()
|
131
143
|
}
|
132
144
|
},
|
133
|
-
/* @__PURE__ */
|
145
|
+
/* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
|
134
146
|
"svg",
|
135
147
|
{
|
136
148
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -142,15 +154,15 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
142
154
|
strokeLinecap: "round",
|
143
155
|
strokeLinejoin: "round"
|
144
156
|
},
|
145
|
-
/* @__PURE__ */
|
146
|
-
/* @__PURE__ */
|
147
|
-
/* @__PURE__ */
|
157
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
158
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
159
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
|
148
160
|
))
|
149
161
|
)));
|
150
162
|
Label.displayName = "Label";
|
151
163
|
|
152
164
|
// elements/loading/Loading.tsx
|
153
|
-
import
|
165
|
+
import React5 from "react";
|
154
166
|
var Loading = ({
|
155
167
|
design = "spinner",
|
156
168
|
size = "normal",
|
@@ -181,7 +193,7 @@ var Loading = ({
|
|
181
193
|
};
|
182
194
|
switch (design.split("-")[0]) {
|
183
195
|
case "dots":
|
184
|
-
return /* @__PURE__ */
|
196
|
+
return /* @__PURE__ */ React5.createElement(
|
185
197
|
"div",
|
186
198
|
{
|
187
199
|
className: cn(
|
@@ -189,7 +201,7 @@ var Loading = ({
|
|
189
201
|
classNames == null ? void 0 : classNames.container
|
190
202
|
)
|
191
203
|
},
|
192
|
-
/* @__PURE__ */
|
204
|
+
/* @__PURE__ */ React5.createElement(
|
193
205
|
"div",
|
194
206
|
{
|
195
207
|
className: cn(
|
@@ -200,7 +212,7 @@ var Loading = ({
|
|
200
212
|
)
|
201
213
|
}
|
202
214
|
),
|
203
|
-
/* @__PURE__ */
|
215
|
+
/* @__PURE__ */ React5.createElement(
|
204
216
|
"div",
|
205
217
|
{
|
206
218
|
className: cn(
|
@@ -211,7 +223,7 @@ var Loading = ({
|
|
211
223
|
)
|
212
224
|
}
|
213
225
|
),
|
214
|
-
/* @__PURE__ */
|
226
|
+
/* @__PURE__ */ React5.createElement(
|
215
227
|
"div",
|
216
228
|
{
|
217
229
|
className: cn(
|
@@ -224,7 +236,7 @@ var Loading = ({
|
|
224
236
|
)
|
225
237
|
);
|
226
238
|
case "square":
|
227
|
-
return /* @__PURE__ */
|
239
|
+
return /* @__PURE__ */ React5.createElement(
|
228
240
|
"svg",
|
229
241
|
{
|
230
242
|
className: cn(
|
@@ -236,7 +248,7 @@ var Loading = ({
|
|
236
248
|
height: "35",
|
237
249
|
width: "35"
|
238
250
|
},
|
239
|
-
/* @__PURE__ */
|
251
|
+
/* @__PURE__ */ React5.createElement(
|
240
252
|
"rect",
|
241
253
|
{
|
242
254
|
className: "squircle-track",
|
@@ -248,7 +260,7 @@ var Loading = ({
|
|
248
260
|
height: "32.5"
|
249
261
|
}
|
250
262
|
),
|
251
|
-
/* @__PURE__ */
|
263
|
+
/* @__PURE__ */ React5.createElement(
|
252
264
|
"rect",
|
253
265
|
{
|
254
266
|
className: "square-car",
|
@@ -263,7 +275,7 @@ var Loading = ({
|
|
263
275
|
)
|
264
276
|
);
|
265
277
|
case "squircle":
|
266
|
-
return /* @__PURE__ */
|
278
|
+
return /* @__PURE__ */ React5.createElement(
|
267
279
|
"svg",
|
268
280
|
{
|
269
281
|
x: "0px",
|
@@ -278,7 +290,7 @@ var Loading = ({
|
|
278
290
|
classNames == null ? void 0 : classNames.container
|
279
291
|
)
|
280
292
|
},
|
281
|
-
/* @__PURE__ */
|
293
|
+
/* @__PURE__ */ React5.createElement(
|
282
294
|
"path",
|
283
295
|
{
|
284
296
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -288,7 +300,7 @@ var Loading = ({
|
|
288
300
|
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"
|
289
301
|
}
|
290
302
|
),
|
291
|
-
/* @__PURE__ */
|
303
|
+
/* @__PURE__ */ React5.createElement(
|
292
304
|
"path",
|
293
305
|
{
|
294
306
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -300,7 +312,7 @@ var Loading = ({
|
|
300
312
|
)
|
301
313
|
);
|
302
314
|
case "progress":
|
303
|
-
return /* @__PURE__ */
|
315
|
+
return /* @__PURE__ */ React5.createElement(
|
304
316
|
"div",
|
305
317
|
{
|
306
318
|
className: cn(
|
@@ -311,9 +323,9 @@ var Loading = ({
|
|
311
323
|
}
|
312
324
|
);
|
313
325
|
case "orbit":
|
314
|
-
return /* @__PURE__ */
|
326
|
+
return /* @__PURE__ */ React5.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
315
327
|
default:
|
316
|
-
return /* @__PURE__ */
|
328
|
+
return /* @__PURE__ */ React5.createElement(
|
317
329
|
"svg",
|
318
330
|
{
|
319
331
|
viewBox: "0 0 40 40",
|
@@ -325,7 +337,7 @@ var Loading = ({
|
|
325
337
|
classNames == null ? void 0 : classNames.container
|
326
338
|
)
|
327
339
|
},
|
328
|
-
/* @__PURE__ */
|
340
|
+
/* @__PURE__ */ React5.createElement(
|
329
341
|
"circle",
|
330
342
|
{
|
331
343
|
className: cn(
|
@@ -344,7 +356,7 @@ var Loading = ({
|
|
344
356
|
pathLength: "100"
|
345
357
|
}
|
346
358
|
),
|
347
|
-
/* @__PURE__ */
|
359
|
+
/* @__PURE__ */ React5.createElement(
|
348
360
|
"circle",
|
349
361
|
{
|
350
362
|
className: cn(
|
@@ -395,13 +407,10 @@ var buttonVariants = cva(
|
|
395
407
|
smallIcon: "hawa-h-7 hawa-w-7"
|
396
408
|
}
|
397
409
|
},
|
398
|
-
defaultVariants: {
|
399
|
-
variant: "default",
|
400
|
-
size: "default"
|
401
|
-
}
|
410
|
+
defaultVariants: { variant: "default", size: "default" }
|
402
411
|
}
|
403
412
|
);
|
404
|
-
var Button =
|
413
|
+
var Button = React6.forwardRef(
|
405
414
|
({
|
406
415
|
className,
|
407
416
|
label,
|
@@ -411,11 +420,13 @@ var Button = React5.forwardRef(
|
|
411
420
|
centered = true,
|
412
421
|
isLoading,
|
413
422
|
children,
|
423
|
+
labelProps,
|
424
|
+
showHelperText = false,
|
414
425
|
...props
|
415
426
|
}, ref) => {
|
416
427
|
const Comp = "button";
|
417
428
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
418
|
-
return /* @__PURE__ */
|
429
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React6.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React6.createElement(
|
419
430
|
Comp,
|
420
431
|
{
|
421
432
|
className: cn(
|
@@ -425,7 +436,7 @@ var Button = React5.forwardRef(
|
|
425
436
|
ref,
|
426
437
|
...props
|
427
438
|
},
|
428
|
-
isLoading ? /* @__PURE__ */
|
439
|
+
isLoading ? /* @__PURE__ */ React6.createElement(
|
429
440
|
Loading,
|
430
441
|
{
|
431
442
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -434,20 +445,20 @@ var Button = React5.forwardRef(
|
|
434
445
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
435
446
|
}
|
436
447
|
) : children
|
437
|
-
));
|
448
|
+
), showHelperText && /* @__PURE__ */ React6.createElement(HelperText, { helperText: props.helperText }));
|
438
449
|
}
|
439
450
|
);
|
440
451
|
Button.displayName = "Button";
|
441
452
|
|
442
453
|
// elements/dropdownMenu/DropdownMenu.tsx
|
443
|
-
import * as
|
454
|
+
import * as React7 from "react";
|
444
455
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
445
456
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
446
457
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
447
458
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
448
459
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
449
460
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
450
|
-
var DropdownMenuSubTrigger =
|
461
|
+
var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
451
462
|
DropdownMenuPrimitive.SubTrigger,
|
452
463
|
{
|
453
464
|
ref,
|
@@ -458,9 +469,9 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
458
469
|
),
|
459
470
|
...props
|
460
471
|
},
|
461
|
-
/* @__PURE__ */
|
472
|
+
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
462
473
|
" ",
|
463
|
-
/* @__PURE__ */
|
474
|
+
/* @__PURE__ */ React7.createElement(
|
464
475
|
"svg",
|
465
476
|
{
|
466
477
|
"aria-label": "Chevron Right Icon",
|
@@ -472,7 +483,7 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
472
483
|
width: "1em",
|
473
484
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
474
485
|
},
|
475
|
-
/* @__PURE__ */
|
486
|
+
/* @__PURE__ */ React7.createElement(
|
476
487
|
"path",
|
477
488
|
{
|
478
489
|
fillRule: "evenodd",
|
@@ -482,7 +493,7 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
482
493
|
)
|
483
494
|
));
|
484
495
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
485
|
-
var DropdownMenuSubContent =
|
496
|
+
var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
486
497
|
DropdownMenuPrimitive.SubContent,
|
487
498
|
{
|
488
499
|
ref,
|
@@ -494,7 +505,7 @@ var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) =>
|
|
494
505
|
}
|
495
506
|
));
|
496
507
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
497
|
-
var DropdownMenuContent =
|
508
|
+
var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React7.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React7.createElement(
|
498
509
|
DropdownMenuPrimitive.Content,
|
499
510
|
{
|
500
511
|
ref,
|
@@ -507,8 +518,8 @@ var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...pro
|
|
507
518
|
}
|
508
519
|
)));
|
509
520
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
510
|
-
var DropdownMenuItem =
|
511
|
-
return /* @__PURE__ */
|
521
|
+
var DropdownMenuItem = React7.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
522
|
+
return /* @__PURE__ */ React7.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React7.createElement(
|
512
523
|
DropdownMenuPrimitive.Item,
|
513
524
|
{
|
514
525
|
disabled: props.disabled,
|
@@ -521,14 +532,14 @@ var DropdownMenuItem = React6.forwardRef(({ className, inset, badged, slug, Link
|
|
521
532
|
),
|
522
533
|
...props
|
523
534
|
},
|
524
|
-
/* @__PURE__ */
|
535
|
+
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
525
536
|
props.end && props.end,
|
526
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
527
|
-
!props.end && badged && /* @__PURE__ */
|
537
|
+
!props.end && props.shortcut && /* @__PURE__ */ React7.createElement(DropdownMenuShortcut, null, props.shortcut),
|
538
|
+
!props.end && badged && /* @__PURE__ */ React7.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
528
539
|
));
|
529
540
|
});
|
530
541
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
531
|
-
var DropdownMenuCheckboxItem =
|
542
|
+
var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
532
543
|
DropdownMenuPrimitive.CheckboxItem,
|
533
544
|
{
|
534
545
|
ref,
|
@@ -539,7 +550,7 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
539
550
|
checked,
|
540
551
|
...props
|
541
552
|
},
|
542
|
-
/* @__PURE__ */
|
553
|
+
/* @__PURE__ */ React7.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__ */ React7.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React7.createElement(
|
543
554
|
"svg",
|
544
555
|
{
|
545
556
|
"aria-label": "Check Mark",
|
@@ -550,12 +561,12 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
550
561
|
height: "0.60em",
|
551
562
|
width: "0.60em"
|
552
563
|
},
|
553
|
-
/* @__PURE__ */
|
564
|
+
/* @__PURE__ */ React7.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" })
|
554
565
|
), " ")),
|
555
566
|
children
|
556
567
|
));
|
557
568
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
558
|
-
var DropdownMenuRadioItem =
|
569
|
+
var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
559
570
|
DropdownMenuPrimitive.RadioItem,
|
560
571
|
{
|
561
572
|
ref,
|
@@ -565,7 +576,7 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }
|
|
565
576
|
),
|
566
577
|
...props
|
567
578
|
},
|
568
|
-
/* @__PURE__ */
|
579
|
+
/* @__PURE__ */ React7.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__ */ React7.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React7.createElement(
|
569
580
|
"svg",
|
570
581
|
{
|
571
582
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -580,12 +591,12 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }
|
|
580
591
|
strokeLinejoin: "round",
|
581
592
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
582
593
|
},
|
583
|
-
/* @__PURE__ */
|
594
|
+
/* @__PURE__ */ React7.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
584
595
|
))),
|
585
596
|
children
|
586
597
|
));
|
587
598
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
588
|
-
var DropdownMenuLabel =
|
599
|
+
var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
589
600
|
DropdownMenuPrimitive.Label,
|
590
601
|
{
|
591
602
|
ref,
|
@@ -598,7 +609,7 @@ var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref)
|
|
598
609
|
}
|
599
610
|
));
|
600
611
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
601
|
-
var DropdownMenuSeparator =
|
612
|
+
var DropdownMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
602
613
|
DropdownMenuPrimitive.Separator,
|
603
614
|
{
|
604
615
|
ref,
|
@@ -611,7 +622,7 @@ var DropdownMenuShortcut = ({
|
|
611
622
|
className,
|
612
623
|
...props
|
613
624
|
}) => {
|
614
|
-
return /* @__PURE__ */
|
625
|
+
return /* @__PURE__ */ React7.createElement(
|
615
626
|
"span",
|
616
627
|
{
|
617
628
|
className: cn(
|
@@ -651,10 +662,10 @@ var DropdownMenu = ({
|
|
651
662
|
default: "hawa-px-2 hawa-py-3 ",
|
652
663
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
653
664
|
};
|
654
|
-
let [values, setValues] =
|
665
|
+
let [values, setValues] = React7.useState(
|
655
666
|
items.map((item) => item.currentOption)
|
656
667
|
);
|
657
|
-
return /* @__PURE__ */
|
668
|
+
return /* @__PURE__ */ React7.createElement(
|
658
669
|
DropdownMenuRoot,
|
659
670
|
{
|
660
671
|
onOpenChange,
|
@@ -662,8 +673,8 @@ var DropdownMenu = ({
|
|
662
673
|
modal: false,
|
663
674
|
dir: direction
|
664
675
|
},
|
665
|
-
/* @__PURE__ */
|
666
|
-
/* @__PURE__ */
|
676
|
+
/* @__PURE__ */ React7.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
677
|
+
/* @__PURE__ */ React7.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React7.createElement(
|
667
678
|
DropdownMenuContent,
|
668
679
|
{
|
669
680
|
side,
|
@@ -684,12 +695,12 @@ var DropdownMenu = ({
|
|
684
695
|
var _a;
|
685
696
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
686
697
|
if (item.itemType === "separator") {
|
687
|
-
return /* @__PURE__ */
|
698
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuSeparator, { key: index });
|
688
699
|
} else if (item.itemType === "label") {
|
689
|
-
return /* @__PURE__ */
|
700
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuLabel, { key: index }, item.label);
|
690
701
|
} else if (item.itemType === "radio") {
|
691
702
|
let dd = item.currentOption;
|
692
|
-
return /* @__PURE__ */
|
703
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React7.createElement(
|
693
704
|
DropdownMenuSubTrigger,
|
694
705
|
{
|
695
706
|
dir: direction,
|
@@ -697,7 +708,7 @@ var DropdownMenu = ({
|
|
697
708
|
},
|
698
709
|
item.icon && item.icon,
|
699
710
|
item.label && item.label
|
700
|
-
), /* @__PURE__ */
|
711
|
+
), /* @__PURE__ */ React7.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React7.createElement(
|
701
712
|
DropdownMenuRadioGroup,
|
702
713
|
{
|
703
714
|
value: values[index],
|
@@ -711,12 +722,12 @@ var DropdownMenu = ({
|
|
711
722
|
}
|
712
723
|
}
|
713
724
|
},
|
714
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
725
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React7.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
715
726
|
)));
|
716
727
|
} else if (item.itemType === "custom") {
|
717
|
-
return /* @__PURE__ */
|
728
|
+
return /* @__PURE__ */ React7.createElement("div", { key: index }, item.content);
|
718
729
|
} else {
|
719
|
-
return item.subitems ? /* @__PURE__ */
|
730
|
+
return item.subitems ? /* @__PURE__ */ React7.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React7.createElement(
|
720
731
|
DropdownMenuSubTrigger,
|
721
732
|
{
|
722
733
|
dir: direction,
|
@@ -724,9 +735,9 @@ var DropdownMenu = ({
|
|
724
735
|
},
|
725
736
|
item.icon && item.icon,
|
726
737
|
item.label && item.label
|
727
|
-
), /* @__PURE__ */
|
738
|
+
), /* @__PURE__ */ React7.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React7.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
728
739
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
729
|
-
return /* @__PURE__ */
|
740
|
+
return /* @__PURE__ */ React7.createElement(
|
730
741
|
DropdownMenuItem,
|
731
742
|
{
|
732
743
|
key: subIndex,
|
@@ -755,7 +766,7 @@ var DropdownMenu = ({
|
|
755
766
|
subitem.icon && subitem.icon,
|
756
767
|
subitem.label && subitem.label
|
757
768
|
);
|
758
|
-
})))) : /* @__PURE__ */
|
769
|
+
})))) : /* @__PURE__ */ React7.createElement(
|
759
770
|
DropdownMenuItem,
|
760
771
|
{
|
761
772
|
LinkComponent: ItemLinkComponent,
|
@@ -809,12 +820,12 @@ var DropdownMenu = ({
|
|
809
820
|
};
|
810
821
|
|
811
822
|
// layout/sidebar/Sidebar.tsx
|
812
|
-
import * as
|
823
|
+
import * as React9 from "react";
|
813
824
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
814
825
|
|
815
826
|
// elements/chip/Chip.tsx
|
816
|
-
import
|
817
|
-
var Chip =
|
827
|
+
import React8 from "react";
|
828
|
+
var Chip = React8.forwardRef(
|
818
829
|
({
|
819
830
|
label,
|
820
831
|
size = "normal",
|
@@ -856,7 +867,7 @@ var Chip = React7.forwardRef(
|
|
856
867
|
oceanic: "hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
857
868
|
};
|
858
869
|
if (label) {
|
859
|
-
return /* @__PURE__ */
|
870
|
+
return /* @__PURE__ */ React8.createElement(
|
860
871
|
"span",
|
861
872
|
{
|
862
873
|
...rest,
|
@@ -868,7 +879,7 @@ var Chip = React7.forwardRef(
|
|
868
879
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
869
880
|
)
|
870
881
|
},
|
871
|
-
dotType && /* @__PURE__ */
|
882
|
+
dotType && /* @__PURE__ */ React8.createElement(
|
872
883
|
"span",
|
873
884
|
{
|
874
885
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -878,7 +889,7 @@ var Chip = React7.forwardRef(
|
|
878
889
|
label
|
879
890
|
);
|
880
891
|
} else {
|
881
|
-
return /* @__PURE__ */
|
892
|
+
return /* @__PURE__ */ React8.createElement(
|
882
893
|
"span",
|
883
894
|
{
|
884
895
|
...rest,
|
@@ -896,9 +907,9 @@ var Chip = React7.forwardRef(
|
|
896
907
|
// layout/sidebar/Sidebar.tsx
|
897
908
|
var Accordion = AccordionPrimitive.Root;
|
898
909
|
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";
|
899
|
-
var AccordionItem =
|
910
|
+
var AccordionItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
900
911
|
AccordionItem.displayName = "AccordionItem";
|
901
|
-
var AccordionTrigger =
|
912
|
+
var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React9.createElement(
|
902
913
|
AccordionPrimitive.Trigger,
|
903
914
|
{
|
904
915
|
ref,
|
@@ -906,7 +917,7 @@ var AccordionTrigger = React8.forwardRef(({ className, showArrow, children, ...p
|
|
906
917
|
...props
|
907
918
|
},
|
908
919
|
children,
|
909
|
-
showArrow && /* @__PURE__ */
|
920
|
+
showArrow && /* @__PURE__ */ React9.createElement(
|
910
921
|
"svg",
|
911
922
|
{
|
912
923
|
"aria-label": "Chevron Right Icon",
|
@@ -917,11 +928,11 @@ var AccordionTrigger = React8.forwardRef(({ className, showArrow, children, ...p
|
|
917
928
|
width: "1em",
|
918
929
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
919
930
|
},
|
920
|
-
/* @__PURE__ */
|
931
|
+
/* @__PURE__ */ React9.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" })
|
921
932
|
)
|
922
933
|
)));
|
923
934
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
924
|
-
var AccordionContent =
|
935
|
+
var AccordionContent = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React9.createElement(
|
925
936
|
AccordionPrimitive.Content,
|
926
937
|
{
|
927
938
|
ref,
|
@@ -931,7 +942,7 @@ var AccordionContent = React8.forwardRef(({ className, children, ...props }, ref
|
|
931
942
|
),
|
932
943
|
...props
|
933
944
|
},
|
934
|
-
/* @__PURE__ */
|
945
|
+
/* @__PURE__ */ React9.createElement("div", null, children)
|
935
946
|
));
|
936
947
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
937
948
|
var SidebarGroup = ({
|
@@ -947,7 +958,7 @@ var SidebarGroup = ({
|
|
947
958
|
...props
|
948
959
|
}) => {
|
949
960
|
const LinkComponent = props.LinkComponent || "a";
|
950
|
-
return /* @__PURE__ */
|
961
|
+
return /* @__PURE__ */ React9.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React9.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React9.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React9.createElement(
|
951
962
|
Accordion,
|
952
963
|
{
|
953
964
|
value: openedItem,
|
@@ -958,7 +969,7 @@ var SidebarGroup = ({
|
|
958
969
|
collapsible: true,
|
959
970
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
960
971
|
},
|
961
|
-
items.map((item, idx) => /* @__PURE__ */
|
972
|
+
items.map((item, idx) => /* @__PURE__ */ React9.createElement(
|
962
973
|
SidebarItem,
|
963
974
|
{
|
964
975
|
isOpen,
|
@@ -986,14 +997,14 @@ var SidebarItem = ({
|
|
986
997
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
987
998
|
};
|
988
999
|
if (item.subitems) {
|
989
|
-
return /* @__PURE__ */
|
1000
|
+
return /* @__PURE__ */ React9.createElement(
|
990
1001
|
AccordionItem,
|
991
1002
|
{
|
992
1003
|
value: item.value,
|
993
1004
|
className: "hawa-overflow-x-clip ",
|
994
1005
|
dir: direction
|
995
1006
|
},
|
996
|
-
/* @__PURE__ */
|
1007
|
+
/* @__PURE__ */ React9.createElement(
|
997
1008
|
AccordionTrigger,
|
998
1009
|
{
|
999
1010
|
className: cn(
|
@@ -1005,7 +1016,7 @@ var SidebarItem = ({
|
|
1005
1016
|
),
|
1006
1017
|
showArrow: isOpen
|
1007
1018
|
},
|
1008
|
-
/* @__PURE__ */
|
1019
|
+
/* @__PURE__ */ React9.createElement(
|
1009
1020
|
"div",
|
1010
1021
|
{
|
1011
1022
|
className: cn(
|
@@ -1013,7 +1024,7 @@ var SidebarItem = ({
|
|
1013
1024
|
)
|
1014
1025
|
},
|
1015
1026
|
item.icon && item.icon,
|
1016
|
-
/* @__PURE__ */
|
1027
|
+
/* @__PURE__ */ React9.createElement(
|
1017
1028
|
"span",
|
1018
1029
|
{
|
1019
1030
|
className: cn(
|
@@ -1025,14 +1036,14 @@ var SidebarItem = ({
|
|
1025
1036
|
)
|
1026
1037
|
)
|
1027
1038
|
),
|
1028
|
-
item.subitems && /* @__PURE__ */
|
1039
|
+
item.subitems && /* @__PURE__ */ React9.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React9.createElement(
|
1029
1040
|
"div",
|
1030
1041
|
{
|
1031
1042
|
className: cn(
|
1032
1043
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
1033
1044
|
)
|
1034
1045
|
},
|
1035
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1046
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React9.createElement(
|
1036
1047
|
LinkComponent,
|
1037
1048
|
{
|
1038
1049
|
href: subitem.slug,
|
@@ -1063,7 +1074,7 @@ var SidebarItem = ({
|
|
1063
1074
|
))
|
1064
1075
|
);
|
1065
1076
|
} else {
|
1066
|
-
return /* @__PURE__ */
|
1077
|
+
return /* @__PURE__ */ React9.createElement(
|
1067
1078
|
LinkComponent,
|
1068
1079
|
{
|
1069
1080
|
href: item.slug,
|
@@ -1087,7 +1098,7 @@ var SidebarItem = ({
|
|
1087
1098
|
"hawa-overflow-x-clip "
|
1088
1099
|
)
|
1089
1100
|
},
|
1090
|
-
/* @__PURE__ */
|
1101
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React9.createElement(
|
1091
1102
|
"span",
|
1092
1103
|
{
|
1093
1104
|
className: cn(
|
@@ -1097,7 +1108,7 @@ var SidebarItem = ({
|
|
1097
1108
|
},
|
1098
1109
|
item.label,
|
1099
1110
|
" ",
|
1100
|
-
item.badge && /* @__PURE__ */
|
1111
|
+
item.badge && /* @__PURE__ */ React9.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1101
1112
|
))
|
1102
1113
|
);
|
1103
1114
|
}
|
@@ -1176,7 +1187,7 @@ var AppLayout = ({
|
|
1176
1187
|
setOpenSideMenu(false);
|
1177
1188
|
}
|
1178
1189
|
}, [size]);
|
1179
|
-
return /* @__PURE__ */
|
1190
|
+
return /* @__PURE__ */ React10.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ React10.createElement(
|
1180
1191
|
"div",
|
1181
1192
|
{
|
1182
1193
|
dir: direction,
|
@@ -1185,7 +1196,7 @@ var AppLayout = ({
|
|
1185
1196
|
bordered && "hawa-border-b-[1px]"
|
1186
1197
|
)
|
1187
1198
|
},
|
1188
|
-
size > 600 ? /* @__PURE__ */
|
1199
|
+
size > 600 ? /* @__PURE__ */ React10.createElement(
|
1189
1200
|
"div",
|
1190
1201
|
{
|
1191
1202
|
className: cn(
|
@@ -1199,24 +1210,24 @@ var AppLayout = ({
|
|
1199
1210
|
props.pageTitle
|
1200
1211
|
) : (
|
1201
1212
|
// Mobile Drawer Menu Button
|
1202
|
-
/* @__PURE__ */
|
1213
|
+
/* @__PURE__ */ React10.createElement(
|
1203
1214
|
"div",
|
1204
1215
|
{
|
1205
1216
|
dir: direction,
|
1206
1217
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1207
1218
|
},
|
1208
|
-
/* @__PURE__ */
|
1219
|
+
/* @__PURE__ */ React10.createElement(
|
1209
1220
|
"div",
|
1210
1221
|
{
|
1211
1222
|
onClick: () => setOpenSideMenu(true),
|
1212
1223
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1213
1224
|
},
|
1214
|
-
/* @__PURE__ */
|
1225
|
+
/* @__PURE__ */ React10.createElement(MenuIcon, null)
|
1215
1226
|
),
|
1216
|
-
props.pageTitle ? /* @__PURE__ */
|
1227
|
+
props.pageTitle ? /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React10.createElement("div", null)
|
1217
1228
|
)
|
1218
1229
|
),
|
1219
|
-
/* @__PURE__ */
|
1230
|
+
/* @__PURE__ */ React10.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ React10.createElement("div", null, props.email)) : null, /* @__PURE__ */ React10.createElement(
|
1220
1231
|
DropdownMenu,
|
1221
1232
|
{
|
1222
1233
|
LinkComponent: MenuLinkComponent,
|
@@ -1229,13 +1240,13 @@ var AppLayout = ({
|
|
1229
1240
|
direction,
|
1230
1241
|
items: props.profileMenuItems || [],
|
1231
1242
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1232
|
-
trigger: /* @__PURE__ */
|
1243
|
+
trigger: /* @__PURE__ */ React10.createElement(
|
1233
1244
|
"div",
|
1234
1245
|
{
|
1235
1246
|
onClick: onAvatarClick,
|
1236
1247
|
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"
|
1237
1248
|
},
|
1238
|
-
props.avatarImage ? /* @__PURE__ */
|
1249
|
+
props.avatarImage ? /* @__PURE__ */ React10.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React10.createElement(
|
1239
1250
|
"svg",
|
1240
1251
|
{
|
1241
1252
|
"aria-label": "Avatar Icon",
|
@@ -1243,7 +1254,7 @@ var AppLayout = ({
|
|
1243
1254
|
fill: "currentColor",
|
1244
1255
|
viewBox: "0 0 20 20"
|
1245
1256
|
},
|
1246
|
-
/* @__PURE__ */
|
1257
|
+
/* @__PURE__ */ React10.createElement(
|
1247
1258
|
"path",
|
1248
1259
|
{
|
1249
1260
|
fillRule: "evenodd",
|
@@ -1255,7 +1266,7 @@ var AppLayout = ({
|
|
1255
1266
|
)
|
1256
1267
|
}
|
1257
1268
|
))
|
1258
|
-
), /* @__PURE__ */
|
1269
|
+
), /* @__PURE__ */ React10.createElement(
|
1259
1270
|
"div",
|
1260
1271
|
{
|
1261
1272
|
className: cn(
|
@@ -1283,7 +1294,7 @@ var AppLayout = ({
|
|
1283
1294
|
},
|
1284
1295
|
ref
|
1285
1296
|
},
|
1286
|
-
/* @__PURE__ */
|
1297
|
+
/* @__PURE__ */ React10.createElement(
|
1287
1298
|
"div",
|
1288
1299
|
{
|
1289
1300
|
onClick: props.onLogoClick,
|
@@ -1298,7 +1309,7 @@ var AppLayout = ({
|
|
1298
1309
|
}
|
1299
1310
|
},
|
1300
1311
|
openSideMenu && props.header && props.header,
|
1301
|
-
!props.header && /* @__PURE__ */
|
1312
|
+
!props.header && /* @__PURE__ */ React10.createElement(
|
1302
1313
|
"img",
|
1303
1314
|
{
|
1304
1315
|
className: cn(
|
@@ -1309,7 +1320,7 @@ var AppLayout = ({
|
|
1309
1320
|
src: props.logoLink
|
1310
1321
|
}
|
1311
1322
|
),
|
1312
|
-
size > 600 ? /* @__PURE__ */
|
1323
|
+
size > 600 ? /* @__PURE__ */ React10.createElement(
|
1313
1324
|
"img",
|
1314
1325
|
{
|
1315
1326
|
className: cn(
|
@@ -1321,7 +1332,7 @@ var AppLayout = ({
|
|
1321
1332
|
}
|
1322
1333
|
) : null
|
1323
1334
|
),
|
1324
|
-
/* @__PURE__ */
|
1335
|
+
/* @__PURE__ */ React10.createElement(
|
1325
1336
|
"div",
|
1326
1337
|
{
|
1327
1338
|
className: cn(
|
@@ -1332,7 +1343,7 @@ var AppLayout = ({
|
|
1332
1343
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1333
1344
|
}
|
1334
1345
|
},
|
1335
|
-
/* @__PURE__ */
|
1346
|
+
/* @__PURE__ */ React10.createElement(
|
1336
1347
|
SidebarGroup,
|
1337
1348
|
{
|
1338
1349
|
direction,
|
@@ -1355,7 +1366,7 @@ var AppLayout = ({
|
|
1355
1366
|
}
|
1356
1367
|
)
|
1357
1368
|
),
|
1358
|
-
/* @__PURE__ */
|
1369
|
+
/* @__PURE__ */ React10.createElement(
|
1359
1370
|
"div",
|
1360
1371
|
{
|
1361
1372
|
className: cn(
|
@@ -1366,8 +1377,8 @@ var AppLayout = ({
|
|
1366
1377
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1367
1378
|
}
|
1368
1379
|
},
|
1369
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
1370
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
1380
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, DrawerFooterActions) : null,
|
1381
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ React10.createElement(
|
1371
1382
|
Tooltip,
|
1372
1383
|
{
|
1373
1384
|
side: "left",
|
@@ -1375,7 +1386,7 @@ var AppLayout = ({
|
|
1375
1386
|
triggerProps: { asChild: true },
|
1376
1387
|
content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
|
1377
1388
|
},
|
1378
|
-
/* @__PURE__ */
|
1389
|
+
/* @__PURE__ */ React10.createElement(
|
1379
1390
|
Button,
|
1380
1391
|
{
|
1381
1392
|
variant: "outline",
|
@@ -1388,7 +1399,7 @@ var AppLayout = ({
|
|
1388
1399
|
setKeepDrawerOpen(newKeepOpenState);
|
1389
1400
|
}
|
1390
1401
|
},
|
1391
|
-
/* @__PURE__ */
|
1402
|
+
/* @__PURE__ */ React10.createElement(
|
1392
1403
|
"svg",
|
1393
1404
|
{
|
1394
1405
|
className: cn(
|
@@ -1398,7 +1409,7 @@ var AppLayout = ({
|
|
1398
1409
|
fill: "currentColor",
|
1399
1410
|
viewBox: "0 0 20 20"
|
1400
1411
|
},
|
1401
|
-
/* @__PURE__ */
|
1412
|
+
/* @__PURE__ */ React10.createElement(
|
1402
1413
|
"path",
|
1403
1414
|
{
|
1404
1415
|
fillRule: "evenodd",
|
@@ -1410,7 +1421,7 @@ var AppLayout = ({
|
|
1410
1421
|
)
|
1411
1422
|
) : null
|
1412
1423
|
)
|
1413
|
-
), /* @__PURE__ */
|
1424
|
+
), /* @__PURE__ */ React10.createElement(
|
1414
1425
|
"div",
|
1415
1426
|
{
|
1416
1427
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
@@ -1429,7 +1440,7 @@ var AppLayout = ({
|
|
1429
1440
|
props.children
|
1430
1441
|
));
|
1431
1442
|
};
|
1432
|
-
var MenuIcon = () => /* @__PURE__ */
|
1443
|
+
var MenuIcon = () => /* @__PURE__ */ React10.createElement(
|
1433
1444
|
"svg",
|
1434
1445
|
{
|
1435
1446
|
"aria-label": "Menu Button",
|
@@ -1441,7 +1452,7 @@ var MenuIcon = () => /* @__PURE__ */ React9.createElement(
|
|
1441
1452
|
height: "1.6em",
|
1442
1453
|
width: "1.6em"
|
1443
1454
|
},
|
1444
|
-
/* @__PURE__ */
|
1455
|
+
/* @__PURE__ */ React10.createElement(
|
1445
1456
|
"path",
|
1446
1457
|
{
|
1447
1458
|
fillRule: "evenodd",
|