@sikka/hawa 0.38.14-next → 0.40.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/{DropdownMenu-B3cTLPDi.d.mts → DropdownMenu-FVVDS2rX.d.mts} +6 -1
- package/dist/{DropdownMenu-BO1TNMm5.d.ts → DropdownMenu-SFJtRGAw.d.ts} +6 -1
- package/dist/{Radio-lgoClQrv.d.ts → Radio-DlPwVCG4.d.ts} +6 -0
- package/dist/{Radio-uQ7DtzcI.d.mts → Radio-Dyvlywnk.d.mts} +6 -0
- package/dist/alert/index.js +2 -2
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +2 -2
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.d.mts +2 -0
- package/dist/appLayout/index.d.ts +2 -0
- package/dist/appLayout/index.js +14 -3
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +14 -3
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +2 -2
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +2 -2
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +77 -2
- package/dist/blocks/auth/index.mjs +79 -4
- package/dist/blocks/feedback/index.js +162 -119
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +5 -2
- package/dist/blocks/index.d.ts +5 -2
- package/dist/blocks/index.js +525 -450
- package/dist/blocks/index.mjs +12 -4
- package/dist/blocks/misc/index.d.mts +3 -0
- package/dist/blocks/misc/index.d.ts +3 -0
- package/dist/blocks/misc/index.js +246 -289
- package/dist/blocks/misc/index.mjs +155 -200
- package/dist/blocks/pricing/index.js +162 -119
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +2 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +2 -2
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +2 -2
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +2 -2
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-SL4ONYNR.mjs → chunk-27G5FKOP.mjs} +1 -1
- package/dist/{chunk-IC5WYNKN.mjs → chunk-AJTYKC5R.mjs} +1 -1
- package/dist/{chunk-UMOBOCED.mjs → chunk-CTNKKP2O.mjs} +2 -2
- package/dist/chunk-CTZRVSTI.mjs +346 -0
- package/dist/{chunk-XFSBC5VI.mjs → chunk-DYPGZ2IP.mjs} +1 -1
- package/dist/{chunk-UJ5SXC3M.mjs → chunk-GN7EIDTE.mjs} +1 -1
- package/dist/{chunk-VE7EQ6VH.mjs → chunk-GU2DOJ7Q.mjs} +106 -8
- package/dist/{chunk-RTK6REIK.mjs → chunk-QZIENYTE.mjs} +1 -1
- package/dist/{chunk-EZBHA2IL.mjs → chunk-RT2Q3SH7.mjs} +1 -1
- package/dist/{chunk-AONESDSB.mjs → chunk-UBUVHGW4.mjs} +238 -248
- package/dist/{chunk-ZBUBNKF6.mjs → chunk-XCW5YNMS.mjs} +34 -1
- package/dist/codeBlock/index.js +2 -2
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +2 -2
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js +1 -1
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/command/index.mjs.map +1 -1
- package/dist/commonTypes-189mW5eB.d.mts +8 -0
- package/dist/commonTypes-189mW5eB.d.ts +8 -0
- package/dist/commonTypes-DUY2LJm1.d.mts +3 -0
- package/dist/commonTypes-DUY2LJm1.d.ts +3 -0
- package/dist/commonTypes-D_7LV7Ri.d.mts +5 -0
- package/dist/commonTypes-D_7LV7Ri.d.ts +5 -0
- package/dist/dataTable/index.d.mts +1 -0
- package/dist/dataTable/index.d.ts +1 -0
- package/dist/dataTable/index.js +3 -3
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +3 -3
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +1 -1
- package/dist/datePicker/index.d.ts +1 -1
- package/dist/datePicker/index.js +3 -3
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +3 -3
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +77 -2
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +77 -2
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.d.mts +6 -1
- package/dist/dropdownMenu/index.d.ts +6 -1
- package/dist/dropdownMenu/index.js +29 -6
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +29 -6
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +13 -5
- package/dist/elements/index.d.ts +13 -5
- package/dist/elements/index.js +622 -532
- package/dist/elements/index.mjs +6 -6
- package/dist/fileDropzone/index.d.mts +2 -2
- package/dist/fileDropzone/index.d.ts +2 -2
- package/dist/fileDropzone/index.js +2 -2
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +2 -2
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/fileUploader/index.d.mts +2 -2
- package/dist/fileUploader/index.d.ts +2 -2
- package/dist/glow/index.d.mts +3 -3
- package/dist/glow/index.d.ts +3 -3
- package/dist/hooks/index.d.mts +8 -1
- package/dist/hooks/index.d.ts +8 -1
- package/dist/hooks/index.js +35 -0
- package/dist/hooks/index.mjs +5 -1
- package/dist/index.css +0 -91
- package/dist/index.d.mts +35 -4
- package/dist/index.d.ts +35 -4
- package/dist/index.js +1104 -960
- package/dist/index.mjs +1055 -913
- package/dist/input/index.d.mts +2 -9
- package/dist/input/index.d.ts +2 -9
- package/dist/interfaceSettings/index.js +160 -117
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +160 -117
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/label/index.d.mts +1 -2
- package/dist/label/index.d.ts +1 -2
- package/dist/layout/index.d.mts +3 -1
- package/dist/layout/index.d.ts +3 -1
- package/dist/layout/index.js +89 -3
- package/dist/layout/index.mjs +14 -3
- package/dist/logos/index.d.mts +5 -0
- package/dist/logos/index.d.ts +5 -0
- package/dist/logos/index.js +75 -0
- package/dist/logos/index.js.map +1 -1
- package/dist/logos/index.mjs +75 -0
- package/dist/logos/index.mjs.map +1 -1
- package/dist/navigationMenu/index.d.mts +2 -1
- package/dist/navigationMenu/index.d.ts +2 -1
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/phoneInput/index.d.mts +1 -1
- package/dist/phoneInput/index.d.ts +1 -1
- package/dist/progress/index.d.mts +8 -1
- package/dist/progress/index.d.ts +8 -1
- package/dist/radio/index.d.mts +15 -1
- package/dist/radio/index.d.ts +15 -1
- package/dist/radio/index.js +160 -117
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +160 -117
- package/dist/radio/index.mjs.map +1 -1
- 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 +1 -2
- package/dist/signature/index.d.ts +1 -2
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/sonner/index.d.mts +1 -1
- package/dist/sonner/index.d.ts +1 -1
- package/dist/sortButton/index.js +2 -2
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +2 -2
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +3 -9
- package/dist/splitButton/index.d.ts +3 -9
- package/dist/splitButton/index.js +2 -2
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +2 -2
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +4 -2
- package/dist/tabs/index.d.ts +4 -2
- package/dist/tabs/index.js +123 -174
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +118 -169
- package/dist/tabs/index.mjs.map +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 +4 -22
- package/dist/toaster/index.d.ts +4 -22
- package/dist/tooltip/index.d.mts +4 -3
- package/dist/tooltip/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/Label-UbMDLtJF.d.mts +0 -14
- package/dist/Label-UbMDLtJF.d.ts +0 -14
- package/dist/chunk-WDCKXU54.mjs +0 -303
- package/dist/commonTypes-CgDwjGvU.d.mts +0 -5
- package/dist/commonTypes-CgDwjGvU.d.ts +0 -5
- package/dist/commonTypes-DZdITB5m.d.mts +0 -4
- package/dist/commonTypes-DZdITB5m.d.ts +0 -4
- package/dist/floatBox/index.d.mts +0 -15
- package/dist/floatBox/index.d.ts +0 -15
- package/dist/floatBox/index.js +0 -105
- package/dist/floatBox/index.js.map +0 -1
- package/dist/floatBox/index.mjs +0 -69
- package/dist/floatBox/index.mjs.map +0 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
-
|
4
|
-
} from "./chunk-
|
3
|
+
useViewportSize
|
4
|
+
} from "./chunk-XCW5YNMS.mjs";
|
5
5
|
import {
|
6
6
|
Button,
|
7
7
|
Chip,
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
Label,
|
10
10
|
Skeleton,
|
11
11
|
cn
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-GU2DOJ7Q.mjs";
|
13
13
|
|
14
14
|
// elements/alert/Alert.tsx
|
15
15
|
import React, { useRef, useState, useEffect } from "react";
|
@@ -2611,6 +2611,7 @@ var Radio = forwardRef7(
|
|
2611
2611
|
tabsContainerClassName,
|
2612
2612
|
forceHideHelperText = false,
|
2613
2613
|
onChange,
|
2614
|
+
containerClassNames,
|
2614
2615
|
...props
|
2615
2616
|
}, ref) => {
|
2616
2617
|
var _a, _b, _c;
|
@@ -2666,161 +2667,203 @@ var Radio = forwardRef7(
|
|
2666
2667
|
];
|
2667
2668
|
switch (design) {
|
2668
2669
|
case "tabs":
|
2669
|
-
return /* @__PURE__ */ React9.createElement(
|
2670
|
-
"
|
2670
|
+
return /* @__PURE__ */ React9.createElement(
|
2671
|
+
"div",
|
2671
2672
|
{
|
2672
|
-
ref: parentRef,
|
2673
2673
|
className: cn(
|
2674
|
-
|
2675
|
-
|
2676
|
-
orientationStyle[orientation],
|
2677
|
-
widthStyle[width],
|
2678
|
-
tabsContainerClassName
|
2674
|
+
"hawa-gap-2 hawa-flex hawa-flex-col",
|
2675
|
+
containerClassNames == null ? void 0 : containerClassNames.tabs
|
2679
2676
|
)
|
2680
2677
|
},
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2678
|
+
props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label),
|
2679
|
+
/* @__PURE__ */ React9.createElement(
|
2680
|
+
"ul",
|
2681
|
+
{
|
2682
|
+
ref: parentRef,
|
2683
|
+
className: cn(
|
2684
|
+
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
2685
|
+
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
|
2686
|
+
orientationStyle[orientation],
|
2687
|
+
widthStyle[width],
|
2688
|
+
tabsContainerClassName
|
2689
|
+
)
|
2690
|
+
},
|
2691
|
+
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
2692
|
+
return opt.tooltip ? /* @__PURE__ */ React9.createElement(
|
2693
|
+
PopoverRoot,
|
2691
2694
|
{
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
+
key: o,
|
2696
|
+
open: o === openTooltip,
|
2697
|
+
onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
|
2695
2698
|
},
|
2696
2699
|
/* @__PURE__ */ React9.createElement(
|
2697
|
-
|
2700
|
+
PopoverTrigger,
|
2698
2701
|
{
|
2699
|
-
|
2700
|
-
|
2701
|
-
|
2702
|
-
|
2703
|
-
|
2702
|
+
onMouseEnter: () => setOpenTooltip(o),
|
2703
|
+
onMouseLeave: () => setOpenTooltip(null),
|
2704
|
+
asChild: true
|
2705
|
+
},
|
2706
|
+
/* @__PURE__ */ React9.createElement(
|
2707
|
+
"li",
|
2708
|
+
{
|
2709
|
+
"aria-current": "page",
|
2710
|
+
onClick: () => {
|
2711
|
+
if (props.disabled || opt.disabled)
|
2712
|
+
return;
|
2713
|
+
handleChange(opt);
|
2714
|
+
},
|
2715
|
+
className: cn(
|
2716
|
+
...radio_option_tabs_styling,
|
2717
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
2718
|
+
)
|
2704
2719
|
},
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2708
|
-
|
2720
|
+
opt.icon && opt.icon,
|
2721
|
+
opt.label
|
2722
|
+
)
|
2723
|
+
),
|
2724
|
+
/* @__PURE__ */ React9.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
2725
|
+
) : /* @__PURE__ */ React9.createElement(
|
2726
|
+
"li",
|
2727
|
+
{
|
2728
|
+
key: o,
|
2729
|
+
"aria-current": "page",
|
2730
|
+
onClick: () => {
|
2731
|
+
if (props.disabled || opt.disabled)
|
2732
|
+
return;
|
2733
|
+
handleChange(opt);
|
2709
2734
|
},
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2735
|
+
className: cn(
|
2736
|
+
...radio_option_tabs_styling,
|
2737
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
2738
|
+
)
|
2739
|
+
},
|
2740
|
+
opt.icon && opt.icon,
|
2741
|
+
opt.label
|
2742
|
+
);
|
2743
|
+
})
|
2744
|
+
),
|
2745
|
+
!forceHideHelperText && /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText })
|
2746
|
+
);
|
2747
|
+
case "bordered":
|
2748
|
+
return /* @__PURE__ */ React9.createElement(
|
2749
|
+
"div",
|
2750
|
+
{
|
2751
|
+
className: cn(
|
2752
|
+
orientationStyle[orientation],
|
2753
|
+
"hawa-gap-4",
|
2754
|
+
containerClassNames == null ? void 0 : containerClassNames.bordered
|
2755
|
+
)
|
2756
|
+
},
|
2757
|
+
props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React9.createElement(
|
2758
|
+
"div",
|
2759
|
+
{
|
2760
|
+
className: cn(
|
2761
|
+
"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
|
2762
|
+
props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
|
2713
2763
|
),
|
2714
|
-
|
2715
|
-
|
2716
|
-
|
2764
|
+
key: i + 1
|
2765
|
+
},
|
2766
|
+
/* @__PURE__ */ React9.createElement(
|
2767
|
+
"input",
|
2717
2768
|
{
|
2718
|
-
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
-
|
2723
|
-
|
2724
|
-
|
2769
|
+
disabled: opt.disabled,
|
2770
|
+
id: opt.value.toString(),
|
2771
|
+
type: "radio",
|
2772
|
+
value: opt.value,
|
2773
|
+
name,
|
2774
|
+
onChange: () => handleChange(opt)
|
2775
|
+
}
|
2776
|
+
),
|
2777
|
+
/* @__PURE__ */ React9.createElement(
|
2778
|
+
"label",
|
2779
|
+
{
|
2780
|
+
htmlFor: opt.value.toString(),
|
2725
2781
|
className: cn(
|
2726
|
-
|
2727
|
-
|
2782
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white",
|
2783
|
+
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
2728
2784
|
)
|
2729
2785
|
},
|
2730
|
-
opt.icon && opt.icon,
|
2731
2786
|
opt.label
|
2732
|
-
)
|
2733
|
-
|
2734
|
-
)
|
2735
|
-
case "
|
2736
|
-
return /* @__PURE__ */ React9.createElement(
|
2737
|
-
"
|
2787
|
+
)
|
2788
|
+
)))
|
2789
|
+
);
|
2790
|
+
case "cards":
|
2791
|
+
return /* @__PURE__ */ React9.createElement(
|
2792
|
+
"ul",
|
2738
2793
|
{
|
2739
2794
|
className: cn(
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2795
|
+
orientationStyle[orientation],
|
2796
|
+
"hawa-gap-4",
|
2797
|
+
containerClassNames == null ? void 0 : containerClassNames.cards
|
2798
|
+
)
|
2744
2799
|
},
|
2745
|
-
/* @__PURE__ */ React9.createElement(
|
2800
|
+
(_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React9.createElement(
|
2746
2801
|
"input",
|
2747
2802
|
{
|
2748
|
-
disabled: opt.disabled,
|
2749
|
-
id: opt.value.toString(),
|
2750
2803
|
type: "radio",
|
2751
|
-
|
2804
|
+
id: opt.value.toString(),
|
2752
2805
|
name,
|
2753
|
-
|
2806
|
+
value: opt.value.toString(),
|
2807
|
+
className: "hawa-peer hawa-hidden",
|
2808
|
+
required: true,
|
2809
|
+
disabled: opt.disabled
|
2754
2810
|
}
|
2755
|
-
),
|
2756
|
-
/* @__PURE__ */ React9.createElement(
|
2811
|
+
), /* @__PURE__ */ React9.createElement(
|
2757
2812
|
"label",
|
2758
2813
|
{
|
2759
2814
|
htmlFor: opt.value.toString(),
|
2760
2815
|
className: cn(
|
2761
|
-
"hawa-
|
2762
|
-
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-
|
2816
|
+
"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
2817
|
+
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
|
2763
2818
|
)
|
2764
2819
|
},
|
2765
|
-
opt.label
|
2766
|
-
)
|
2767
|
-
)
|
2768
|
-
case "cards":
|
2769
|
-
return /* @__PURE__ */ React9.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React9.createElement(
|
2770
|
-
"input",
|
2771
|
-
{
|
2772
|
-
type: "radio",
|
2773
|
-
id: opt.value.toString(),
|
2774
|
-
name,
|
2775
|
-
value: opt.value.toString(),
|
2776
|
-
className: "hawa-peer hawa-hidden",
|
2777
|
-
required: true,
|
2778
|
-
disabled: opt.disabled
|
2779
|
-
}
|
2780
|
-
), /* @__PURE__ */ React9.createElement(
|
2781
|
-
"label",
|
2782
|
-
{
|
2783
|
-
htmlFor: opt.value.toString(),
|
2784
|
-
className: cn(
|
2785
|
-
"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
2786
|
-
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
|
2787
|
-
)
|
2788
|
-
},
|
2789
|
-
/* @__PURE__ */ React9.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
2790
|
-
))));
|
2820
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React9.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
2821
|
+
)))
|
2822
|
+
);
|
2791
2823
|
default:
|
2792
|
-
return /* @__PURE__ */ React9.createElement(
|
2824
|
+
return /* @__PURE__ */ React9.createElement(
|
2793
2825
|
"div",
|
2794
2826
|
{
|
2795
2827
|
className: cn(
|
2796
|
-
"
|
2797
|
-
|
2798
|
-
)
|
2799
|
-
key: i + 1
|
2828
|
+
"hawa-flex hawa-flex-col hawa-gap-2",
|
2829
|
+
containerClassNames == null ? void 0 : containerClassNames.default
|
2830
|
+
)
|
2800
2831
|
},
|
2801
|
-
/* @__PURE__ */ React9.createElement(
|
2802
|
-
|
2832
|
+
props.label && /* @__PURE__ */ React9.createElement(Label, { ...labelProps }, props.label),
|
2833
|
+
/* @__PURE__ */ React9.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement(
|
2834
|
+
"div",
|
2803
2835
|
{
|
2804
|
-
disabled: opt.disabled,
|
2805
|
-
id: opt.value.toString(),
|
2806
|
-
type: "radio",
|
2807
|
-
value: opt.value,
|
2808
|
-
name,
|
2809
|
-
onChange: () => handleChange(opt)
|
2810
|
-
}
|
2811
|
-
),
|
2812
|
-
/* @__PURE__ */ React9.createElement(
|
2813
|
-
"label",
|
2814
|
-
{
|
2815
|
-
htmlFor: opt.value.toString(),
|
2816
2836
|
className: cn(
|
2817
|
-
"
|
2818
|
-
|
2819
|
-
)
|
2837
|
+
"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
|
2838
|
+
props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
|
2839
|
+
),
|
2840
|
+
key: i + 1
|
2820
2841
|
},
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2842
|
+
/* @__PURE__ */ React9.createElement(
|
2843
|
+
"input",
|
2844
|
+
{
|
2845
|
+
disabled: opt.disabled,
|
2846
|
+
id: opt.value.toString(),
|
2847
|
+
type: "radio",
|
2848
|
+
value: opt.value,
|
2849
|
+
name,
|
2850
|
+
onChange: () => handleChange(opt)
|
2851
|
+
}
|
2852
|
+
),
|
2853
|
+
/* @__PURE__ */ React9.createElement(
|
2854
|
+
"label",
|
2855
|
+
{
|
2856
|
+
htmlFor: opt.value.toString(),
|
2857
|
+
className: cn(
|
2858
|
+
"hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
2859
|
+
opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
|
2860
|
+
)
|
2861
|
+
},
|
2862
|
+
opt.label
|
2863
|
+
)
|
2864
|
+
))),
|
2865
|
+
/* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText })
|
2866
|
+
);
|
2824
2867
|
}
|
2825
2868
|
}
|
2826
2869
|
);
|
@@ -2998,66 +3041,10 @@ var ScrollBar = React11.forwardRef(({ className, orientation = "vertical", ...pr
|
|
2998
3041
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
2999
3042
|
|
3000
3043
|
// elements/tabs/Tabs.tsx
|
3001
|
-
import * as
|
3044
|
+
import * as React12 from "react";
|
3045
|
+
import * as Popover2 from "@radix-ui/react-popover";
|
3002
3046
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
3003
3047
|
import { tv } from "tailwind-variants";
|
3004
|
-
|
3005
|
-
// elements/floatBox/FloatBox.tsx
|
3006
|
-
import * as React12 from "react";
|
3007
|
-
var FloatBox = ({
|
3008
|
-
className,
|
3009
|
-
open,
|
3010
|
-
side = "bottom",
|
3011
|
-
sideOffset = 40,
|
3012
|
-
align = "center",
|
3013
|
-
withArrow = false,
|
3014
|
-
...props
|
3015
|
-
}) => {
|
3016
|
-
let stylesMap = {
|
3017
|
-
bottom: {
|
3018
|
-
start: { top: sideOffset, insetInlineStart: 0 },
|
3019
|
-
center: { top: sideOffset },
|
3020
|
-
end: { top: sideOffset, insetInlineEnd: 0 }
|
3021
|
-
},
|
3022
|
-
top: {
|
3023
|
-
start: { bottom: sideOffset, insetInlineStart: 0 },
|
3024
|
-
center: { bottom: sideOffset },
|
3025
|
-
end: { bottom: sideOffset, insetInlineEnd: 0 }
|
3026
|
-
},
|
3027
|
-
right: {
|
3028
|
-
start: { left: sideOffset, top: -5 },
|
3029
|
-
center: { left: sideOffset },
|
3030
|
-
end: { left: sideOffset, bottom: 0 }
|
3031
|
-
},
|
3032
|
-
left: {
|
3033
|
-
start: { right: sideOffset, top: 0 },
|
3034
|
-
center: { right: sideOffset },
|
3035
|
-
end: { right: sideOffset, bottom: 0 }
|
3036
|
-
}
|
3037
|
-
};
|
3038
|
-
const arrowDirection = {
|
3039
|
-
top: "hawa-arrow-default-bottom",
|
3040
|
-
bottom: "hawa-arrow-default-top",
|
3041
|
-
right: "hawa-arrow-default-left",
|
3042
|
-
left: "hawa-arrow-default-right"
|
3043
|
-
};
|
3044
|
-
return /* @__PURE__ */ React12.createElement(
|
3045
|
-
"div",
|
3046
|
-
{
|
3047
|
-
className: cn(
|
3048
|
-
"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2 hawa-bg-popover",
|
3049
|
-
className
|
3050
|
-
),
|
3051
|
-
style: { ...stylesMap[side][align] },
|
3052
|
-
"data-side": side,
|
3053
|
-
"data-floatbox-state": open ? "open" : "closed"
|
3054
|
-
},
|
3055
|
-
withArrow && /* @__PURE__ */ React12.createElement("div", { className: cn(arrowDirection[side]) }),
|
3056
|
-
/* @__PURE__ */ React12.createElement("span", null, props.children)
|
3057
|
-
);
|
3058
|
-
};
|
3059
|
-
|
3060
|
-
// elements/tabs/Tabs.tsx
|
3061
3048
|
var tabsListVariant = tv({
|
3062
3049
|
base: "",
|
3063
3050
|
variants: {
|
@@ -3116,39 +3103,27 @@ var tabsTriggerVariant = tv({
|
|
3116
3103
|
],
|
3117
3104
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
3118
3105
|
});
|
3119
|
-
var TabsContext =
|
3120
|
-
var Tabs =
|
3121
|
-
|
3122
|
-
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
|
3132
|
-
)
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
);
|
3138
|
-
|
3139
|
-
|
3140
|
-
const resize = () => {
|
3141
|
-
setSize(window.innerWidth);
|
3142
|
-
};
|
3143
|
-
resize();
|
3144
|
-
window.addEventListener("resize", resize);
|
3145
|
-
return () => {
|
3146
|
-
window.removeEventListener("resize", resize);
|
3147
|
-
};
|
3148
|
-
}
|
3149
|
-
}, []);
|
3150
|
-
if (props.scrollable && size < 768 && orientation === "horizontal") {
|
3151
|
-
return /* @__PURE__ */ React13.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React13.createElement(
|
3106
|
+
var TabsContext = React12.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
|
3107
|
+
var Tabs = React12.forwardRef(
|
3108
|
+
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
3109
|
+
TabsPrimitive.Root,
|
3110
|
+
{
|
3111
|
+
ref,
|
3112
|
+
className: cn(
|
3113
|
+
"hawa-flex hawa-gap-2",
|
3114
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3115
|
+
className
|
3116
|
+
),
|
3117
|
+
...props
|
3118
|
+
},
|
3119
|
+
/* @__PURE__ */ React12.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
|
3120
|
+
)
|
3121
|
+
);
|
3122
|
+
var TabsList = React12.forwardRef(({ className, classNames, ...props }, ref) => {
|
3123
|
+
const { orientation, variant, scrollable } = React12.useContext(TabsContext);
|
3124
|
+
const { width } = useViewportSize();
|
3125
|
+
if (scrollable && width < 768 && orientation === "horizontal") {
|
3126
|
+
return /* @__PURE__ */ React12.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React12.createElement(
|
3152
3127
|
TabsPrimitive.List,
|
3153
3128
|
{
|
3154
3129
|
ref,
|
@@ -3161,7 +3136,7 @@ var TabsList = React13.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
3161
3136
|
}
|
3162
3137
|
));
|
3163
3138
|
} else {
|
3164
|
-
return /* @__PURE__ */
|
3139
|
+
return /* @__PURE__ */ React12.createElement(
|
3165
3140
|
TabsPrimitive.List,
|
3166
3141
|
{
|
3167
3142
|
ref,
|
@@ -3176,37 +3151,52 @@ var TabsList = React13.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
3176
3151
|
);
|
3177
3152
|
}
|
3178
3153
|
});
|
3179
|
-
var TabsTrigger =
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3154
|
+
var TabsTrigger = React12.forwardRef(
|
3155
|
+
({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
|
3156
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
3157
|
+
if (withPopover) {
|
3158
|
+
return /* @__PURE__ */ React12.createElement(Popover2.Root, { open: props.showPopover }, /* @__PURE__ */ React12.createElement(Popover2.Anchor, { asChild: true }, /* @__PURE__ */ React12.createElement(
|
3159
|
+
TabsPrimitive.Trigger,
|
3160
|
+
{
|
3161
|
+
className: cn(
|
3162
|
+
tabsTriggerVariant({ variant, orientation }),
|
3163
|
+
"hawa-relative",
|
3164
|
+
className
|
3165
|
+
),
|
3166
|
+
...props
|
3167
|
+
},
|
3168
|
+
props.children,
|
3169
|
+
chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps })
|
3170
|
+
)), /* @__PURE__ */ React12.createElement(
|
3171
|
+
Popover2.Content,
|
3172
|
+
{
|
3173
|
+
onClick: onPopoverClick,
|
3174
|
+
asChild: true,
|
3175
|
+
className: cn(
|
3176
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
3177
|
+
"hawa-arrow-default-top hawa-mt-2"
|
3178
|
+
)
|
3179
|
+
},
|
3180
|
+
/* @__PURE__ */ React12.createElement("div", { className: "hawa-p-2" }, " ", props.popoverContent)
|
3181
|
+
));
|
3182
|
+
} else {
|
3183
|
+
return /* @__PURE__ */ React12.createElement(
|
3184
|
+
TabsPrimitive.Trigger,
|
3185
|
+
{
|
3186
|
+
className: cn(
|
3187
|
+
tabsTriggerVariant({ variant, orientation }),
|
3188
|
+
"hawa-relative",
|
3189
|
+
className
|
3190
|
+
),
|
3191
|
+
...props
|
3192
|
+
},
|
3193
|
+
props.children,
|
3194
|
+
chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps })
|
3195
|
+
);
|
3196
|
+
}
|
3197
|
+
}
|
3198
|
+
);
|
3199
|
+
var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
3210
3200
|
TabsPrimitive.Content,
|
3211
3201
|
{
|
3212
3202
|
ref,
|
@@ -3223,12 +3213,12 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3223
3213
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
3224
3214
|
|
3225
3215
|
// elements/separator/Separator.tsx
|
3226
|
-
import * as
|
3216
|
+
import * as React13 from "react";
|
3227
3217
|
var Separator = ({
|
3228
3218
|
className,
|
3229
3219
|
orientation = "horizontal",
|
3230
3220
|
...props
|
3231
|
-
}) => /* @__PURE__ */
|
3221
|
+
}) => /* @__PURE__ */ React13.createElement(
|
3232
3222
|
"div",
|
3233
3223
|
{
|
3234
3224
|
className: cn(
|
@@ -3241,9 +3231,9 @@ var Separator = ({
|
|
3241
3231
|
);
|
3242
3232
|
|
3243
3233
|
// elements/progress/Progress.tsx
|
3244
|
-
import * as
|
3234
|
+
import * as React14 from "react";
|
3245
3235
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
3246
|
-
var Progress =
|
3236
|
+
var Progress = React14.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React14.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React14.createElement(Label, { ...props.labelProps }, props.label), /* @__PURE__ */ React14.createElement(
|
3247
3237
|
ProgressPrimitive.Root,
|
3248
3238
|
{
|
3249
3239
|
ref,
|
@@ -3253,7 +3243,7 @@ var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
3253
3243
|
),
|
3254
3244
|
...props
|
3255
3245
|
},
|
3256
|
-
/* @__PURE__ */
|
3246
|
+
/* @__PURE__ */ React14.createElement(
|
3257
3247
|
ProgressPrimitive.Indicator,
|
3258
3248
|
{
|
3259
3249
|
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
@@ -483,6 +483,37 @@ function useShortcuts(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], t
|
|
483
483
|
}, [hotkeys]);
|
484
484
|
}
|
485
485
|
|
486
|
+
// hooks/useWindowEvent.ts
|
487
|
+
import { useEffect as useEffect14 } from "react";
|
488
|
+
function useWindowEvent(type, listener, options) {
|
489
|
+
useEffect14(() => {
|
490
|
+
window.addEventListener(type, listener, options);
|
491
|
+
return () => window.removeEventListener(type, listener, options);
|
492
|
+
}, [type, listener]);
|
493
|
+
}
|
494
|
+
|
495
|
+
// hooks/useViewportSize.ts
|
496
|
+
import { useCallback, useEffect as useEffect15, useState as useState15 } from "react";
|
497
|
+
var eventListerOptions = {
|
498
|
+
passive: true
|
499
|
+
};
|
500
|
+
function useViewportSize() {
|
501
|
+
const [windowSize, setWindowSize] = useState15({
|
502
|
+
width: 0,
|
503
|
+
height: 0
|
504
|
+
});
|
505
|
+
const setSize = useCallback(() => {
|
506
|
+
setWindowSize({
|
507
|
+
width: window.innerWidth || 0,
|
508
|
+
height: window.innerHeight || 0
|
509
|
+
});
|
510
|
+
}, []);
|
511
|
+
useWindowEvent("resize", setSize, eventListerOptions);
|
512
|
+
useWindowEvent("orientationchange", setSize, eventListerOptions);
|
513
|
+
useEffect15(setSize, []);
|
514
|
+
return windowSize;
|
515
|
+
}
|
516
|
+
|
486
517
|
export {
|
487
518
|
useIsomorphicEffect,
|
488
519
|
reducer,
|
@@ -499,5 +530,7 @@ export {
|
|
499
530
|
parseHotkey,
|
500
531
|
getHotkeyMatcher,
|
501
532
|
getHotkeyHandler,
|
502
|
-
useShortcuts
|
533
|
+
useShortcuts,
|
534
|
+
useWindowEvent,
|
535
|
+
useViewportSize
|
503
536
|
};
|