@sikka/hawa 0.30.22-next → 0.30.24-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-sSnQc6fT.d.ts → DropdownMenu-o_-MnT5h.d.mts} +6 -6
- package/dist/{DropdownMenu-arqV1gRt.d.mts → DropdownMenu-p-Ha-y2R.d.ts} +6 -6
- package/dist/appLayout/index.d.mts +8 -1
- package/dist/appLayout/index.d.ts +8 -1
- package/dist/appLayout/index.js +31 -0
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +35 -4
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.d.mts +5 -2
- package/dist/appTopbar/index.d.ts +5 -2
- package/dist/appTopbar/index.js +31 -0
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +31 -0
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +31 -0
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/pricing/index.mjs +3 -3
- package/dist/{chunk-CXBN42TF.mjs → chunk-7LAUVLVZ.mjs} +1 -1
- package/dist/{chunk-HOE4FCIF.mjs → chunk-DGOT2FVH.mjs} +30 -0
- package/dist/{chunk-MH5K6NEO.mjs → chunk-TKSAYWDH.mjs} +1 -1
- package/dist/combobox/index.d.mts +2 -2
- package/dist/combobox/index.d.ts +2 -2
- package/dist/combobox/index.js +45 -36
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +45 -36
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/commonTypes-52DloiYq.d.mts +7 -0
- package/dist/commonTypes-52DloiYq.d.ts +7 -0
- package/dist/dataTable/index.js +31 -0
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +31 -0
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/docsLayout/index.d.mts +1 -1
- package/dist/docsLayout/index.d.ts +1 -1
- package/dist/dropdownMenu/index.d.mts +9 -5
- package/dist/dropdownMenu/index.d.ts +9 -5
- package/dist/dropdownMenu/index.js +30 -0
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +30 -0
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +3 -3
- package/dist/elements/index.d.ts +3 -3
- package/dist/elements/index.js +75 -36
- package/dist/elements/index.mjs +48 -39
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +75 -36
- package/dist/index.mjs +180 -141
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +31 -0
- package/dist/layout/index.mjs +2 -2
- package/dist/splitButton/index.d.mts +8 -1
- package/dist/splitButton/index.d.ts +8 -1
- package/dist/splitButton/index.js +31 -0
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +31 -0
- package/dist/splitButton/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/elements/index.js
CHANGED
@@ -825,6 +825,9 @@ var DropdownMenu = ({
|
|
825
825
|
default: "hawa-px-2 hawa-py-3 ",
|
826
826
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
827
827
|
};
|
828
|
+
let [values, setValues] = React5.useState(
|
829
|
+
items.map((item) => item.currentOption)
|
830
|
+
);
|
828
831
|
return /* @__PURE__ */ React5.createElement(
|
829
832
|
DropdownMenuRoot,
|
830
833
|
{
|
@@ -852,11 +855,38 @@ var DropdownMenu = ({
|
|
852
855
|
},
|
853
856
|
header && header,
|
854
857
|
items && items.map((item, index) => {
|
858
|
+
var _a;
|
855
859
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
856
860
|
if (item.itemType === "separator") {
|
857
861
|
return /* @__PURE__ */ React5.createElement(DropdownMenuSeparator, { key: index });
|
858
862
|
} else if (item.itemType === "label") {
|
859
863
|
return /* @__PURE__ */ React5.createElement(DropdownMenuLabel, { key: index }, item.label);
|
864
|
+
} else if (item.itemType === "radio") {
|
865
|
+
let dd = item.currentOption;
|
866
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
867
|
+
DropdownMenuSubTrigger,
|
868
|
+
{
|
869
|
+
dir: direction,
|
870
|
+
className: cn(sizeStyles2[size])
|
871
|
+
},
|
872
|
+
item.icon && item.icon,
|
873
|
+
item.label && item.label
|
874
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React5.createElement(
|
875
|
+
DropdownMenuRadioGroup,
|
876
|
+
{
|
877
|
+
value: values[index],
|
878
|
+
onValueChange: (e) => {
|
879
|
+
let newValues = [...values];
|
880
|
+
newValues[index] = e;
|
881
|
+
setValues(newValues);
|
882
|
+
console.log("changing to ", e);
|
883
|
+
if (item.onOptionChange) {
|
884
|
+
item.onOptionChange(e);
|
885
|
+
}
|
886
|
+
}
|
887
|
+
},
|
888
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React5.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
889
|
+
)));
|
860
890
|
} else if (item.itemType === "custom") {
|
861
891
|
return /* @__PURE__ */ React5.createElement("div", { key: index }, item.content);
|
862
892
|
} else {
|
@@ -3611,7 +3641,7 @@ var Combobox = React27.forwardRef(
|
|
3611
3641
|
const [value, setValue] = React27.useState(defaultValue);
|
3612
3642
|
const containerRef = React27.useRef(null);
|
3613
3643
|
function getProperty(obj, key) {
|
3614
|
-
return
|
3644
|
+
return key.split(".").reduce((o, k) => (o || {})[k], obj);
|
3615
3645
|
}
|
3616
3646
|
const handleOpenChange = (open2) => {
|
3617
3647
|
if (!(props.isLoading || props.preview)) {
|
@@ -3704,46 +3734,55 @@ var Combobox = React27.forwardRef(
|
|
3704
3734
|
}
|
3705
3735
|
),
|
3706
3736
|
/* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
3707
|
-
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
3708
|
-
|
3737
|
+
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
3738
|
+
CommandGroup,
|
3709
3739
|
{
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3713
|
-
|
3714
|
-
|
3715
|
-
|
3716
|
-
|
3717
|
-
|
3740
|
+
className: cn(
|
3741
|
+
"hawa-max-h-[200px]",
|
3742
|
+
data.length > 0 && "hawa-overflow-y-scroll"
|
3743
|
+
)
|
3744
|
+
},
|
3745
|
+
data.map((item, i) => /* @__PURE__ */ React27.createElement(
|
3746
|
+
CommandItem,
|
3747
|
+
{
|
3748
|
+
key: i,
|
3749
|
+
onSelect: () => {
|
3750
|
+
const newValue = getProperty(item, valueKey);
|
3751
|
+
setValue(
|
3718
3752
|
newValue === value ? "" : newValue
|
3719
3753
|
);
|
3754
|
+
if (props.onChange) {
|
3755
|
+
props.onChange(
|
3756
|
+
newValue === value ? "" : newValue
|
3757
|
+
);
|
3758
|
+
}
|
3759
|
+
setOpen(false);
|
3720
3760
|
}
|
3721
|
-
setOpen(false);
|
3722
|
-
}
|
3723
|
-
},
|
3724
|
-
/* @__PURE__ */ React27.createElement(
|
3725
|
-
"svg",
|
3726
|
-
{
|
3727
|
-
"aria-label": "Check Icon",
|
3728
|
-
xmlns: "http://www.w3.org/2000/svg",
|
3729
|
-
width: "24",
|
3730
|
-
height: "24",
|
3731
|
-
viewBox: "0 0 24 24",
|
3732
|
-
fill: "none",
|
3733
|
-
stroke: "currentColor",
|
3734
|
-
strokeWidth: "2",
|
3735
|
-
strokeLinecap: "round",
|
3736
|
-
strokeLinejoin: "round",
|
3737
|
-
className: cn(
|
3738
|
-
"hawa-icon",
|
3739
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
3740
|
-
),
|
3741
|
-
style: { marginInlineEnd: "0.5rem" }
|
3742
3761
|
},
|
3743
|
-
/* @__PURE__ */ React27.createElement(
|
3744
|
-
|
3745
|
-
|
3746
|
-
|
3762
|
+
/* @__PURE__ */ React27.createElement(
|
3763
|
+
"svg",
|
3764
|
+
{
|
3765
|
+
"aria-label": "Check Icon",
|
3766
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3767
|
+
width: "24",
|
3768
|
+
height: "24",
|
3769
|
+
viewBox: "0 0 24 24",
|
3770
|
+
fill: "none",
|
3771
|
+
stroke: "currentColor",
|
3772
|
+
strokeWidth: "2",
|
3773
|
+
strokeLinecap: "round",
|
3774
|
+
strokeLinejoin: "round",
|
3775
|
+
className: cn(
|
3776
|
+
"hawa-icon",
|
3777
|
+
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
3778
|
+
),
|
3779
|
+
style: { marginInlineEnd: "0.5rem" }
|
3780
|
+
},
|
3781
|
+
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
3782
|
+
),
|
3783
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
3784
|
+
))
|
3785
|
+
))
|
3747
3786
|
)
|
3748
3787
|
))
|
3749
3788
|
);
|
package/dist/elements/index.mjs
CHANGED
@@ -28,7 +28,7 @@ import {
|
|
28
28
|
TabsTrigger,
|
29
29
|
Textarea,
|
30
30
|
UncheckMark
|
31
|
-
} from "../chunk-
|
31
|
+
} from "../chunk-7LAUVLVZ.mjs";
|
32
32
|
import {
|
33
33
|
Sheet,
|
34
34
|
SheetClose,
|
@@ -40,7 +40,7 @@ import {
|
|
40
40
|
SheetPortal,
|
41
41
|
SheetTitle,
|
42
42
|
SheetTrigger
|
43
|
-
} from "../chunk-
|
43
|
+
} from "../chunk-TKSAYWDH.mjs";
|
44
44
|
import {
|
45
45
|
Button,
|
46
46
|
Card,
|
@@ -74,7 +74,7 @@ import {
|
|
74
74
|
buttonVariants,
|
75
75
|
calculateLuminance,
|
76
76
|
cn
|
77
|
-
} from "../chunk-
|
77
|
+
} from "../chunk-DGOT2FVH.mjs";
|
78
78
|
import {
|
79
79
|
__require
|
80
80
|
} from "../chunk-4OOSUQZG.mjs";
|
@@ -1484,7 +1484,7 @@ var Combobox = React13.forwardRef(
|
|
1484
1484
|
const [value, setValue] = React13.useState(defaultValue);
|
1485
1485
|
const containerRef = React13.useRef(null);
|
1486
1486
|
function getProperty(obj, key) {
|
1487
|
-
return
|
1487
|
+
return key.split(".").reduce((o, k) => (o || {})[k], obj);
|
1488
1488
|
}
|
1489
1489
|
const handleOpenChange = (open2) => {
|
1490
1490
|
if (!(props.isLoading || props.preview)) {
|
@@ -1577,46 +1577,55 @@ var Combobox = React13.forwardRef(
|
|
1577
1577
|
}
|
1578
1578
|
),
|
1579
1579
|
/* @__PURE__ */ React13.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
1580
|
-
/* @__PURE__ */ React13.createElement(CommandList, null, /* @__PURE__ */ React13.createElement(
|
1581
|
-
|
1580
|
+
/* @__PURE__ */ React13.createElement(CommandList, null, /* @__PURE__ */ React13.createElement(
|
1581
|
+
CommandGroup,
|
1582
1582
|
{
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1583
|
+
className: cn(
|
1584
|
+
"hawa-max-h-[200px]",
|
1585
|
+
data.length > 0 && "hawa-overflow-y-scroll"
|
1586
|
+
)
|
1587
|
+
},
|
1588
|
+
data.map((item, i) => /* @__PURE__ */ React13.createElement(
|
1589
|
+
CommandItem,
|
1590
|
+
{
|
1591
|
+
key: i,
|
1592
|
+
onSelect: () => {
|
1593
|
+
const newValue = getProperty(item, valueKey);
|
1594
|
+
setValue(
|
1591
1595
|
newValue === value ? "" : newValue
|
1592
1596
|
);
|
1597
|
+
if (props.onChange) {
|
1598
|
+
props.onChange(
|
1599
|
+
newValue === value ? "" : newValue
|
1600
|
+
);
|
1601
|
+
}
|
1602
|
+
setOpen(false);
|
1593
1603
|
}
|
1594
|
-
setOpen(false);
|
1595
|
-
}
|
1596
|
-
},
|
1597
|
-
/* @__PURE__ */ React13.createElement(
|
1598
|
-
"svg",
|
1599
|
-
{
|
1600
|
-
"aria-label": "Check Icon",
|
1601
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1602
|
-
width: "24",
|
1603
|
-
height: "24",
|
1604
|
-
viewBox: "0 0 24 24",
|
1605
|
-
fill: "none",
|
1606
|
-
stroke: "currentColor",
|
1607
|
-
strokeWidth: "2",
|
1608
|
-
strokeLinecap: "round",
|
1609
|
-
strokeLinejoin: "round",
|
1610
|
-
className: cn(
|
1611
|
-
"hawa-icon",
|
1612
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
1613
|
-
),
|
1614
|
-
style: { marginInlineEnd: "0.5rem" }
|
1615
1604
|
},
|
1616
|
-
/* @__PURE__ */ React13.createElement(
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1605
|
+
/* @__PURE__ */ React13.createElement(
|
1606
|
+
"svg",
|
1607
|
+
{
|
1608
|
+
"aria-label": "Check Icon",
|
1609
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1610
|
+
width: "24",
|
1611
|
+
height: "24",
|
1612
|
+
viewBox: "0 0 24 24",
|
1613
|
+
fill: "none",
|
1614
|
+
stroke: "currentColor",
|
1615
|
+
strokeWidth: "2",
|
1616
|
+
strokeLinecap: "round",
|
1617
|
+
strokeLinejoin: "round",
|
1618
|
+
className: cn(
|
1619
|
+
"hawa-icon",
|
1620
|
+
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
1621
|
+
),
|
1622
|
+
style: { marginInlineEnd: "0.5rem" }
|
1623
|
+
},
|
1624
|
+
/* @__PURE__ */ React13.createElement("polyline", { points: "20 6 9 17 4 12" })
|
1625
|
+
),
|
1626
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
1627
|
+
))
|
1628
|
+
))
|
1620
1629
|
)
|
1621
1630
|
))
|
1622
1631
|
);
|
package/dist/index.d.mts
CHANGED
@@ -149,10 +149,13 @@ type MenuItemType = {
|
|
149
149
|
slug?: string;
|
150
150
|
end?: any;
|
151
151
|
presist?: boolean;
|
152
|
-
itemType?: "separator" | "label" | "custom";
|
152
|
+
itemType?: "separator" | "label" | "custom" | "radio";
|
153
153
|
action?: () => void;
|
154
154
|
highlighted?: boolean;
|
155
155
|
subitems?: SubItem$1[];
|
156
|
+
options?: RadioOptionType[];
|
157
|
+
currentOption?: string;
|
158
|
+
onOptionChange?: (value: string) => void;
|
156
159
|
disabled?: boolean;
|
157
160
|
onMiddleClick?: (e: any) => void;
|
158
161
|
onClick?: any;
|
@@ -180,10 +183,7 @@ interface DropdownMenuRadioProps {
|
|
180
183
|
trigger?: React$1.ReactNode;
|
181
184
|
side?: ExtendedDropdownMenuContentProps["side"];
|
182
185
|
align?: ExtendedDropdownMenuContentProps["align"];
|
183
|
-
options:
|
184
|
-
label?: any;
|
185
|
-
value: string;
|
186
|
-
}[];
|
186
|
+
options: RadioOptionType[];
|
187
187
|
value: string;
|
188
188
|
onValueChange: any;
|
189
189
|
label?: string;
|
@@ -570,8 +570,8 @@ declare const CommandShortcut: {
|
|
570
570
|
};
|
571
571
|
|
572
572
|
type ComboboxTypes<T> = {
|
573
|
-
labelKey?: keyof T;
|
574
|
-
valueKey?: keyof T;
|
573
|
+
labelKey?: keyof T | any;
|
574
|
+
valueKey?: keyof T | any;
|
575
575
|
data: T[];
|
576
576
|
width?: string;
|
577
577
|
texts?: {
|
package/dist/index.d.ts
CHANGED
@@ -149,10 +149,13 @@ type MenuItemType = {
|
|
149
149
|
slug?: string;
|
150
150
|
end?: any;
|
151
151
|
presist?: boolean;
|
152
|
-
itemType?: "separator" | "label" | "custom";
|
152
|
+
itemType?: "separator" | "label" | "custom" | "radio";
|
153
153
|
action?: () => void;
|
154
154
|
highlighted?: boolean;
|
155
155
|
subitems?: SubItem$1[];
|
156
|
+
options?: RadioOptionType[];
|
157
|
+
currentOption?: string;
|
158
|
+
onOptionChange?: (value: string) => void;
|
156
159
|
disabled?: boolean;
|
157
160
|
onMiddleClick?: (e: any) => void;
|
158
161
|
onClick?: any;
|
@@ -180,10 +183,7 @@ interface DropdownMenuRadioProps {
|
|
180
183
|
trigger?: React$1.ReactNode;
|
181
184
|
side?: ExtendedDropdownMenuContentProps["side"];
|
182
185
|
align?: ExtendedDropdownMenuContentProps["align"];
|
183
|
-
options:
|
184
|
-
label?: any;
|
185
|
-
value: string;
|
186
|
-
}[];
|
186
|
+
options: RadioOptionType[];
|
187
187
|
value: string;
|
188
188
|
onValueChange: any;
|
189
189
|
label?: string;
|
@@ -570,8 +570,8 @@ declare const CommandShortcut: {
|
|
570
570
|
};
|
571
571
|
|
572
572
|
type ComboboxTypes<T> = {
|
573
|
-
labelKey?: keyof T;
|
574
|
-
valueKey?: keyof T;
|
573
|
+
labelKey?: keyof T | any;
|
574
|
+
valueKey?: keyof T | any;
|
575
575
|
data: T[];
|
576
576
|
width?: string;
|
577
577
|
texts?: {
|
package/dist/index.js
CHANGED
@@ -892,6 +892,9 @@ var DropdownMenu = ({
|
|
892
892
|
default: "hawa-px-2 hawa-py-3 ",
|
893
893
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
894
894
|
};
|
895
|
+
let [values, setValues] = React5.useState(
|
896
|
+
items.map((item) => item.currentOption)
|
897
|
+
);
|
895
898
|
return /* @__PURE__ */ React5.createElement(
|
896
899
|
DropdownMenuRoot,
|
897
900
|
{
|
@@ -919,11 +922,38 @@ var DropdownMenu = ({
|
|
919
922
|
},
|
920
923
|
header && header,
|
921
924
|
items && items.map((item, index) => {
|
925
|
+
var _a;
|
922
926
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
923
927
|
if (item.itemType === "separator") {
|
924
928
|
return /* @__PURE__ */ React5.createElement(DropdownMenuSeparator, { key: index });
|
925
929
|
} else if (item.itemType === "label") {
|
926
930
|
return /* @__PURE__ */ React5.createElement(DropdownMenuLabel, { key: index }, item.label);
|
931
|
+
} else if (item.itemType === "radio") {
|
932
|
+
let dd = item.currentOption;
|
933
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
934
|
+
DropdownMenuSubTrigger,
|
935
|
+
{
|
936
|
+
dir: direction,
|
937
|
+
className: cn(sizeStyles2[size])
|
938
|
+
},
|
939
|
+
item.icon && item.icon,
|
940
|
+
item.label && item.label
|
941
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React5.createElement(
|
942
|
+
DropdownMenuRadioGroup,
|
943
|
+
{
|
944
|
+
value: values[index],
|
945
|
+
onValueChange: (e) => {
|
946
|
+
let newValues = [...values];
|
947
|
+
newValues[index] = e;
|
948
|
+
setValues(newValues);
|
949
|
+
console.log("changing to ", e);
|
950
|
+
if (item.onOptionChange) {
|
951
|
+
item.onOptionChange(e);
|
952
|
+
}
|
953
|
+
}
|
954
|
+
},
|
955
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React5.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
956
|
+
)));
|
927
957
|
} else if (item.itemType === "custom") {
|
928
958
|
return /* @__PURE__ */ React5.createElement("div", { key: index }, item.content);
|
929
959
|
} else {
|
@@ -3678,7 +3708,7 @@ var Combobox = React27.forwardRef(
|
|
3678
3708
|
const [value, setValue] = React27.useState(defaultValue);
|
3679
3709
|
const containerRef = React27.useRef(null);
|
3680
3710
|
function getProperty(obj, key) {
|
3681
|
-
return
|
3711
|
+
return key.split(".").reduce((o, k) => (o || {})[k], obj);
|
3682
3712
|
}
|
3683
3713
|
const handleOpenChange = (open2) => {
|
3684
3714
|
if (!(props.isLoading || props.preview)) {
|
@@ -3771,46 +3801,55 @@ var Combobox = React27.forwardRef(
|
|
3771
3801
|
}
|
3772
3802
|
),
|
3773
3803
|
/* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
3774
|
-
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
3775
|
-
|
3804
|
+
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
3805
|
+
CommandGroup,
|
3776
3806
|
{
|
3777
|
-
|
3778
|
-
|
3779
|
-
|
3780
|
-
|
3781
|
-
|
3782
|
-
|
3783
|
-
|
3784
|
-
|
3807
|
+
className: cn(
|
3808
|
+
"hawa-max-h-[200px]",
|
3809
|
+
data.length > 0 && "hawa-overflow-y-scroll"
|
3810
|
+
)
|
3811
|
+
},
|
3812
|
+
data.map((item, i) => /* @__PURE__ */ React27.createElement(
|
3813
|
+
CommandItem,
|
3814
|
+
{
|
3815
|
+
key: i,
|
3816
|
+
onSelect: () => {
|
3817
|
+
const newValue = getProperty(item, valueKey);
|
3818
|
+
setValue(
|
3785
3819
|
newValue === value ? "" : newValue
|
3786
3820
|
);
|
3821
|
+
if (props.onChange) {
|
3822
|
+
props.onChange(
|
3823
|
+
newValue === value ? "" : newValue
|
3824
|
+
);
|
3825
|
+
}
|
3826
|
+
setOpen(false);
|
3787
3827
|
}
|
3788
|
-
setOpen(false);
|
3789
|
-
}
|
3790
|
-
},
|
3791
|
-
/* @__PURE__ */ React27.createElement(
|
3792
|
-
"svg",
|
3793
|
-
{
|
3794
|
-
"aria-label": "Check Icon",
|
3795
|
-
xmlns: "http://www.w3.org/2000/svg",
|
3796
|
-
width: "24",
|
3797
|
-
height: "24",
|
3798
|
-
viewBox: "0 0 24 24",
|
3799
|
-
fill: "none",
|
3800
|
-
stroke: "currentColor",
|
3801
|
-
strokeWidth: "2",
|
3802
|
-
strokeLinecap: "round",
|
3803
|
-
strokeLinejoin: "round",
|
3804
|
-
className: cn(
|
3805
|
-
"hawa-icon",
|
3806
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
3807
|
-
),
|
3808
|
-
style: { marginInlineEnd: "0.5rem" }
|
3809
3828
|
},
|
3810
|
-
/* @__PURE__ */ React27.createElement(
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3829
|
+
/* @__PURE__ */ React27.createElement(
|
3830
|
+
"svg",
|
3831
|
+
{
|
3832
|
+
"aria-label": "Check Icon",
|
3833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3834
|
+
width: "24",
|
3835
|
+
height: "24",
|
3836
|
+
viewBox: "0 0 24 24",
|
3837
|
+
fill: "none",
|
3838
|
+
stroke: "currentColor",
|
3839
|
+
strokeWidth: "2",
|
3840
|
+
strokeLinecap: "round",
|
3841
|
+
strokeLinejoin: "round",
|
3842
|
+
className: cn(
|
3843
|
+
"hawa-icon",
|
3844
|
+
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
3845
|
+
),
|
3846
|
+
style: { marginInlineEnd: "0.5rem" }
|
3847
|
+
},
|
3848
|
+
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
3849
|
+
),
|
3850
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
3851
|
+
))
|
3852
|
+
))
|
3814
3853
|
)
|
3815
3854
|
))
|
3816
3855
|
);
|