@sikka/hawa 0.34.7-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 +7 -10
- package/dist/chunk-IQEBXGLM.mjs +0 -215
package/dist/appLayout/index.js
CHANGED
@@ -65,11 +65,23 @@ function cn(...inputs) {
|
|
65
65
|
}
|
66
66
|
|
67
67
|
// elements/button/Button.tsx
|
68
|
-
var
|
68
|
+
var React6 = __toESM(require("react"));
|
69
69
|
var import_class_variance_authority = require("class-variance-authority");
|
70
70
|
|
71
|
+
// elements/helperText/HelperText.tsx
|
72
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
73
|
+
"p",
|
74
|
+
{
|
75
|
+
className: cn(
|
76
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
77
|
+
helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
78
|
+
)
|
79
|
+
},
|
80
|
+
helperText
|
81
|
+
);
|
82
|
+
|
71
83
|
// elements/label/Label.tsx
|
72
|
-
var
|
84
|
+
var React4 = __toESM(require("react"));
|
73
85
|
|
74
86
|
// elements/tooltip/Tooltip.tsx
|
75
87
|
var import_react2 = __toESM(require("react"));
|
@@ -143,7 +155,7 @@ var Tooltip = ({
|
|
143
155
|
};
|
144
156
|
|
145
157
|
// elements/label/Label.tsx
|
146
|
-
var Label =
|
158
|
+
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(
|
147
159
|
"label",
|
148
160
|
{
|
149
161
|
ref,
|
@@ -154,8 +166,8 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
154
166
|
...props
|
155
167
|
},
|
156
168
|
children,
|
157
|
-
required && /* @__PURE__ */
|
158
|
-
), hint && /* @__PURE__ */
|
169
|
+
required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
170
|
+
), hint && /* @__PURE__ */ React4.createElement(
|
159
171
|
Tooltip,
|
160
172
|
{
|
161
173
|
content: hint,
|
@@ -165,7 +177,7 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
165
177
|
onClick: (event) => event.preventDefault()
|
166
178
|
}
|
167
179
|
},
|
168
|
-
/* @__PURE__ */
|
180
|
+
/* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
|
169
181
|
"svg",
|
170
182
|
{
|
171
183
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -177,9 +189,9 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
177
189
|
strokeLinecap: "round",
|
178
190
|
strokeLinejoin: "round"
|
179
191
|
},
|
180
|
-
/* @__PURE__ */
|
181
|
-
/* @__PURE__ */
|
182
|
-
/* @__PURE__ */
|
192
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
193
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
194
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
|
183
195
|
))
|
184
196
|
)));
|
185
197
|
Label.displayName = "Label";
|
@@ -430,13 +442,10 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
430
442
|
smallIcon: "hawa-h-7 hawa-w-7"
|
431
443
|
}
|
432
444
|
},
|
433
|
-
defaultVariants: {
|
434
|
-
variant: "default",
|
435
|
-
size: "default"
|
436
|
-
}
|
445
|
+
defaultVariants: { variant: "default", size: "default" }
|
437
446
|
}
|
438
447
|
);
|
439
|
-
var Button =
|
448
|
+
var Button = React6.forwardRef(
|
440
449
|
({
|
441
450
|
className,
|
442
451
|
label,
|
@@ -446,11 +455,13 @@ var Button = React5.forwardRef(
|
|
446
455
|
centered = true,
|
447
456
|
isLoading,
|
448
457
|
children,
|
458
|
+
labelProps,
|
459
|
+
showHelperText = false,
|
449
460
|
...props
|
450
461
|
}, ref) => {
|
451
462
|
const Comp = "button";
|
452
463
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
453
|
-
return /* @__PURE__ */
|
464
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React6.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React6.createElement(
|
454
465
|
Comp,
|
455
466
|
{
|
456
467
|
className: cn(
|
@@ -460,7 +471,7 @@ var Button = React5.forwardRef(
|
|
460
471
|
ref,
|
461
472
|
...props
|
462
473
|
},
|
463
|
-
isLoading ? /* @__PURE__ */
|
474
|
+
isLoading ? /* @__PURE__ */ React6.createElement(
|
464
475
|
Loading,
|
465
476
|
{
|
466
477
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -469,20 +480,20 @@ var Button = React5.forwardRef(
|
|
469
480
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
470
481
|
}
|
471
482
|
) : children
|
472
|
-
));
|
483
|
+
), showHelperText && /* @__PURE__ */ React6.createElement(HelperText, { helperText: props.helperText }));
|
473
484
|
}
|
474
485
|
);
|
475
486
|
Button.displayName = "Button";
|
476
487
|
|
477
488
|
// elements/dropdownMenu/DropdownMenu.tsx
|
478
|
-
var
|
489
|
+
var React7 = __toESM(require("react"));
|
479
490
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
480
491
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
481
492
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
482
493
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
483
494
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
484
495
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
485
|
-
var DropdownMenuSubTrigger =
|
496
|
+
var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
486
497
|
DropdownMenuPrimitive.SubTrigger,
|
487
498
|
{
|
488
499
|
ref,
|
@@ -493,9 +504,9 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
493
504
|
),
|
494
505
|
...props
|
495
506
|
},
|
496
|
-
/* @__PURE__ */
|
507
|
+
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
497
508
|
" ",
|
498
|
-
/* @__PURE__ */
|
509
|
+
/* @__PURE__ */ React7.createElement(
|
499
510
|
"svg",
|
500
511
|
{
|
501
512
|
"aria-label": "Chevron Right Icon",
|
@@ -507,7 +518,7 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
507
518
|
width: "1em",
|
508
519
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
509
520
|
},
|
510
|
-
/* @__PURE__ */
|
521
|
+
/* @__PURE__ */ React7.createElement(
|
511
522
|
"path",
|
512
523
|
{
|
513
524
|
fillRule: "evenodd",
|
@@ -517,7 +528,7 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
517
528
|
)
|
518
529
|
));
|
519
530
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
520
|
-
var DropdownMenuSubContent =
|
531
|
+
var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
521
532
|
DropdownMenuPrimitive.SubContent,
|
522
533
|
{
|
523
534
|
ref,
|
@@ -529,7 +540,7 @@ var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) =>
|
|
529
540
|
}
|
530
541
|
));
|
531
542
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
532
|
-
var DropdownMenuContent =
|
543
|
+
var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React7.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React7.createElement(
|
533
544
|
DropdownMenuPrimitive.Content,
|
534
545
|
{
|
535
546
|
ref,
|
@@ -542,8 +553,8 @@ var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...pro
|
|
542
553
|
}
|
543
554
|
)));
|
544
555
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
545
|
-
var DropdownMenuItem =
|
546
|
-
return /* @__PURE__ */
|
556
|
+
var DropdownMenuItem = React7.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
557
|
+
return /* @__PURE__ */ React7.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React7.createElement(
|
547
558
|
DropdownMenuPrimitive.Item,
|
548
559
|
{
|
549
560
|
disabled: props.disabled,
|
@@ -556,14 +567,14 @@ var DropdownMenuItem = React6.forwardRef(({ className, inset, badged, slug, Link
|
|
556
567
|
),
|
557
568
|
...props
|
558
569
|
},
|
559
|
-
/* @__PURE__ */
|
570
|
+
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
560
571
|
props.end && props.end,
|
561
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
562
|
-
!props.end && badged && /* @__PURE__ */
|
572
|
+
!props.end && props.shortcut && /* @__PURE__ */ React7.createElement(DropdownMenuShortcut, null, props.shortcut),
|
573
|
+
!props.end && badged && /* @__PURE__ */ React7.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
563
574
|
));
|
564
575
|
});
|
565
576
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
566
|
-
var DropdownMenuCheckboxItem =
|
577
|
+
var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
567
578
|
DropdownMenuPrimitive.CheckboxItem,
|
568
579
|
{
|
569
580
|
ref,
|
@@ -574,7 +585,7 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
574
585
|
checked,
|
575
586
|
...props
|
576
587
|
},
|
577
|
-
/* @__PURE__ */
|
588
|
+
/* @__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(
|
578
589
|
"svg",
|
579
590
|
{
|
580
591
|
"aria-label": "Check Mark",
|
@@ -585,12 +596,12 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
585
596
|
height: "0.60em",
|
586
597
|
width: "0.60em"
|
587
598
|
},
|
588
|
-
/* @__PURE__ */
|
599
|
+
/* @__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" })
|
589
600
|
), " ")),
|
590
601
|
children
|
591
602
|
));
|
592
603
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
593
|
-
var DropdownMenuRadioItem =
|
604
|
+
var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
594
605
|
DropdownMenuPrimitive.RadioItem,
|
595
606
|
{
|
596
607
|
ref,
|
@@ -600,7 +611,7 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }
|
|
600
611
|
),
|
601
612
|
...props
|
602
613
|
},
|
603
|
-
/* @__PURE__ */
|
614
|
+
/* @__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(
|
604
615
|
"svg",
|
605
616
|
{
|
606
617
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -615,12 +626,12 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }
|
|
615
626
|
strokeLinejoin: "round",
|
616
627
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
617
628
|
},
|
618
|
-
/* @__PURE__ */
|
629
|
+
/* @__PURE__ */ React7.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
619
630
|
))),
|
620
631
|
children
|
621
632
|
));
|
622
633
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
623
|
-
var DropdownMenuLabel =
|
634
|
+
var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
624
635
|
DropdownMenuPrimitive.Label,
|
625
636
|
{
|
626
637
|
ref,
|
@@ -633,7 +644,7 @@ var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref)
|
|
633
644
|
}
|
634
645
|
));
|
635
646
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
636
|
-
var DropdownMenuSeparator =
|
647
|
+
var DropdownMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
637
648
|
DropdownMenuPrimitive.Separator,
|
638
649
|
{
|
639
650
|
ref,
|
@@ -646,7 +657,7 @@ var DropdownMenuShortcut = ({
|
|
646
657
|
className,
|
647
658
|
...props
|
648
659
|
}) => {
|
649
|
-
return /* @__PURE__ */
|
660
|
+
return /* @__PURE__ */ React7.createElement(
|
650
661
|
"span",
|
651
662
|
{
|
652
663
|
className: cn(
|
@@ -686,10 +697,10 @@ var DropdownMenu = ({
|
|
686
697
|
default: "hawa-px-2 hawa-py-3 ",
|
687
698
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
688
699
|
};
|
689
|
-
let [values, setValues] =
|
700
|
+
let [values, setValues] = React7.useState(
|
690
701
|
items.map((item) => item.currentOption)
|
691
702
|
);
|
692
|
-
return /* @__PURE__ */
|
703
|
+
return /* @__PURE__ */ React7.createElement(
|
693
704
|
DropdownMenuRoot,
|
694
705
|
{
|
695
706
|
onOpenChange,
|
@@ -697,8 +708,8 @@ var DropdownMenu = ({
|
|
697
708
|
modal: false,
|
698
709
|
dir: direction
|
699
710
|
},
|
700
|
-
/* @__PURE__ */
|
701
|
-
/* @__PURE__ */
|
711
|
+
/* @__PURE__ */ React7.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
712
|
+
/* @__PURE__ */ React7.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React7.createElement(
|
702
713
|
DropdownMenuContent,
|
703
714
|
{
|
704
715
|
side,
|
@@ -719,12 +730,12 @@ var DropdownMenu = ({
|
|
719
730
|
var _a;
|
720
731
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
721
732
|
if (item.itemType === "separator") {
|
722
|
-
return /* @__PURE__ */
|
733
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuSeparator, { key: index });
|
723
734
|
} else if (item.itemType === "label") {
|
724
|
-
return /* @__PURE__ */
|
735
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuLabel, { key: index }, item.label);
|
725
736
|
} else if (item.itemType === "radio") {
|
726
737
|
let dd = item.currentOption;
|
727
|
-
return /* @__PURE__ */
|
738
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React7.createElement(
|
728
739
|
DropdownMenuSubTrigger,
|
729
740
|
{
|
730
741
|
dir: direction,
|
@@ -732,7 +743,7 @@ var DropdownMenu = ({
|
|
732
743
|
},
|
733
744
|
item.icon && item.icon,
|
734
745
|
item.label && item.label
|
735
|
-
), /* @__PURE__ */
|
746
|
+
), /* @__PURE__ */ React7.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React7.createElement(
|
736
747
|
DropdownMenuRadioGroup,
|
737
748
|
{
|
738
749
|
value: values[index],
|
@@ -746,12 +757,12 @@ var DropdownMenu = ({
|
|
746
757
|
}
|
747
758
|
}
|
748
759
|
},
|
749
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
760
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React7.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
750
761
|
)));
|
751
762
|
} else if (item.itemType === "custom") {
|
752
|
-
return /* @__PURE__ */
|
763
|
+
return /* @__PURE__ */ React7.createElement("div", { key: index }, item.content);
|
753
764
|
} else {
|
754
|
-
return item.subitems ? /* @__PURE__ */
|
765
|
+
return item.subitems ? /* @__PURE__ */ React7.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React7.createElement(
|
755
766
|
DropdownMenuSubTrigger,
|
756
767
|
{
|
757
768
|
dir: direction,
|
@@ -759,9 +770,9 @@ var DropdownMenu = ({
|
|
759
770
|
},
|
760
771
|
item.icon && item.icon,
|
761
772
|
item.label && item.label
|
762
|
-
), /* @__PURE__ */
|
773
|
+
), /* @__PURE__ */ React7.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React7.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
763
774
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
764
|
-
return /* @__PURE__ */
|
775
|
+
return /* @__PURE__ */ React7.createElement(
|
765
776
|
DropdownMenuItem,
|
766
777
|
{
|
767
778
|
key: subIndex,
|
@@ -790,7 +801,7 @@ var DropdownMenu = ({
|
|
790
801
|
subitem.icon && subitem.icon,
|
791
802
|
subitem.label && subitem.label
|
792
803
|
);
|
793
|
-
})))) : /* @__PURE__ */
|
804
|
+
})))) : /* @__PURE__ */ React7.createElement(
|
794
805
|
DropdownMenuItem,
|
795
806
|
{
|
796
807
|
LinkComponent: ItemLinkComponent,
|
@@ -844,7 +855,7 @@ var DropdownMenu = ({
|
|
844
855
|
};
|
845
856
|
|
846
857
|
// layout/sidebar/Sidebar.tsx
|
847
|
-
var
|
858
|
+
var React9 = __toESM(require("react"));
|
848
859
|
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
849
860
|
|
850
861
|
// elements/chip/Chip.tsx
|
@@ -931,9 +942,9 @@ var Chip = import_react4.default.forwardRef(
|
|
931
942
|
// layout/sidebar/Sidebar.tsx
|
932
943
|
var Accordion = AccordionPrimitive.Root;
|
933
944
|
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";
|
934
|
-
var AccordionItem =
|
945
|
+
var AccordionItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
935
946
|
AccordionItem.displayName = "AccordionItem";
|
936
|
-
var AccordionTrigger =
|
947
|
+
var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React9.createElement(
|
937
948
|
AccordionPrimitive.Trigger,
|
938
949
|
{
|
939
950
|
ref,
|
@@ -941,7 +952,7 @@ var AccordionTrigger = React8.forwardRef(({ className, showArrow, children, ...p
|
|
941
952
|
...props
|
942
953
|
},
|
943
954
|
children,
|
944
|
-
showArrow && /* @__PURE__ */
|
955
|
+
showArrow && /* @__PURE__ */ React9.createElement(
|
945
956
|
"svg",
|
946
957
|
{
|
947
958
|
"aria-label": "Chevron Right Icon",
|
@@ -952,11 +963,11 @@ var AccordionTrigger = React8.forwardRef(({ className, showArrow, children, ...p
|
|
952
963
|
width: "1em",
|
953
964
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
954
965
|
},
|
955
|
-
/* @__PURE__ */
|
966
|
+
/* @__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" })
|
956
967
|
)
|
957
968
|
)));
|
958
969
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
959
|
-
var AccordionContent =
|
970
|
+
var AccordionContent = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React9.createElement(
|
960
971
|
AccordionPrimitive.Content,
|
961
972
|
{
|
962
973
|
ref,
|
@@ -966,7 +977,7 @@ var AccordionContent = React8.forwardRef(({ className, children, ...props }, ref
|
|
966
977
|
),
|
967
978
|
...props
|
968
979
|
},
|
969
|
-
/* @__PURE__ */
|
980
|
+
/* @__PURE__ */ React9.createElement("div", null, children)
|
970
981
|
));
|
971
982
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
972
983
|
var SidebarGroup = ({
|
@@ -982,7 +993,7 @@ var SidebarGroup = ({
|
|
982
993
|
...props
|
983
994
|
}) => {
|
984
995
|
const LinkComponent = props.LinkComponent || "a";
|
985
|
-
return /* @__PURE__ */
|
996
|
+
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(
|
986
997
|
Accordion,
|
987
998
|
{
|
988
999
|
value: openedItem,
|
@@ -993,7 +1004,7 @@ var SidebarGroup = ({
|
|
993
1004
|
collapsible: true,
|
994
1005
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
995
1006
|
},
|
996
|
-
items.map((item, idx) => /* @__PURE__ */
|
1007
|
+
items.map((item, idx) => /* @__PURE__ */ React9.createElement(
|
997
1008
|
SidebarItem,
|
998
1009
|
{
|
999
1010
|
isOpen,
|
@@ -1021,14 +1032,14 @@ var SidebarItem = ({
|
|
1021
1032
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
1022
1033
|
};
|
1023
1034
|
if (item.subitems) {
|
1024
|
-
return /* @__PURE__ */
|
1035
|
+
return /* @__PURE__ */ React9.createElement(
|
1025
1036
|
AccordionItem,
|
1026
1037
|
{
|
1027
1038
|
value: item.value,
|
1028
1039
|
className: "hawa-overflow-x-clip ",
|
1029
1040
|
dir: direction
|
1030
1041
|
},
|
1031
|
-
/* @__PURE__ */
|
1042
|
+
/* @__PURE__ */ React9.createElement(
|
1032
1043
|
AccordionTrigger,
|
1033
1044
|
{
|
1034
1045
|
className: cn(
|
@@ -1040,7 +1051,7 @@ var SidebarItem = ({
|
|
1040
1051
|
),
|
1041
1052
|
showArrow: isOpen
|
1042
1053
|
},
|
1043
|
-
/* @__PURE__ */
|
1054
|
+
/* @__PURE__ */ React9.createElement(
|
1044
1055
|
"div",
|
1045
1056
|
{
|
1046
1057
|
className: cn(
|
@@ -1048,7 +1059,7 @@ var SidebarItem = ({
|
|
1048
1059
|
)
|
1049
1060
|
},
|
1050
1061
|
item.icon && item.icon,
|
1051
|
-
/* @__PURE__ */
|
1062
|
+
/* @__PURE__ */ React9.createElement(
|
1052
1063
|
"span",
|
1053
1064
|
{
|
1054
1065
|
className: cn(
|
@@ -1060,14 +1071,14 @@ var SidebarItem = ({
|
|
1060
1071
|
)
|
1061
1072
|
)
|
1062
1073
|
),
|
1063
|
-
item.subitems && /* @__PURE__ */
|
1074
|
+
item.subitems && /* @__PURE__ */ React9.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React9.createElement(
|
1064
1075
|
"div",
|
1065
1076
|
{
|
1066
1077
|
className: cn(
|
1067
1078
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
1068
1079
|
)
|
1069
1080
|
},
|
1070
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1081
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React9.createElement(
|
1071
1082
|
LinkComponent,
|
1072
1083
|
{
|
1073
1084
|
href: subitem.slug,
|
@@ -1098,7 +1109,7 @@ var SidebarItem = ({
|
|
1098
1109
|
))
|
1099
1110
|
);
|
1100
1111
|
} else {
|
1101
|
-
return /* @__PURE__ */
|
1112
|
+
return /* @__PURE__ */ React9.createElement(
|
1102
1113
|
LinkComponent,
|
1103
1114
|
{
|
1104
1115
|
href: item.slug,
|
@@ -1122,7 +1133,7 @@ var SidebarItem = ({
|
|
1122
1133
|
"hawa-overflow-x-clip "
|
1123
1134
|
)
|
1124
1135
|
},
|
1125
|
-
/* @__PURE__ */
|
1136
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React9.createElement(
|
1126
1137
|
"span",
|
1127
1138
|
{
|
1128
1139
|
className: cn(
|
@@ -1132,7 +1143,7 @@ var SidebarItem = ({
|
|
1132
1143
|
},
|
1133
1144
|
item.label,
|
1134
1145
|
" ",
|
1135
|
-
item.badge && /* @__PURE__ */
|
1146
|
+
item.badge && /* @__PURE__ */ React9.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1136
1147
|
))
|
1137
1148
|
);
|
1138
1149
|
}
|