@sikka/hawa 0.29.12-next → 0.29.14-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-aAiNsg4d.d.ts → Radio-MHGhfbpA.d.ts} +3 -2
- package/dist/{Radio-H5-wIs2r.d.mts → Radio-ZM5l4CwH.d.mts} +3 -2
- package/dist/appLayout/index.js +38 -42
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +38 -42
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.js +36 -32
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +36 -32
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/blocks/feedback/index.js +9 -4
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +45 -36
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/pricing/index.js +9 -4
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-WEQJRNY5.mjs → chunk-FVBEK44Y.mjs} +36 -32
- package/dist/{chunk-JESKKO3W.mjs → chunk-JMBRP2WR.mjs} +9 -4
- package/dist/{chunk-BRR5Q4AR.mjs → chunk-XKVSLAKW.mjs} +10 -5
- package/dist/{chunk-LAR4X4XW.mjs → chunk-ZXUDZYZZ.mjs} +1 -1
- package/dist/dataTable/index.js +36 -32
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +36 -32
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.js +36 -32
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +36 -32
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +45 -36
- package/dist/elements/index.mjs +3 -3
- package/dist/index.css +0 -3
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +47 -46
- package/dist/index.mjs +47 -46
- package/dist/interfaceSettings/index.js +9 -4
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +9 -4
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.js +38 -42
- package/dist/layout/index.mjs +4 -12
- package/dist/radio/index.d.mts +3 -2
- package/dist/radio/index.d.ts +3 -2
- package/dist/radio/index.js +9 -4
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +9 -4
- package/dist/radio/index.mjs.map +1 -1
- package/dist/splitButton/index.js +36 -32
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +36 -32
- package/dist/splitButton/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/blocks/index.js
CHANGED
@@ -4654,7 +4654,8 @@ var Radio = ({
|
|
4654
4654
|
props.defaultValue || props.value
|
4655
4655
|
);
|
4656
4656
|
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
4657
|
-
let inactiveTabStyle =
|
4657
|
+
let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
|
4658
|
+
${props.disabled ? "" : "hover:hawa-bg-muted"}`;
|
4658
4659
|
let orientationStyle = {
|
4659
4660
|
horizontal: "hawa-flex hawa-flex-row",
|
4660
4661
|
vertical: "hawa-flex hawa-flex-col"
|
@@ -4708,14 +4709,18 @@ var Radio = ({
|
|
4708
4709
|
"li",
|
4709
4710
|
{
|
4710
4711
|
"aria-current": "page",
|
4711
|
-
onClick: () =>
|
4712
|
+
onClick: () => {
|
4713
|
+
if (props.disabled)
|
4714
|
+
return;
|
4715
|
+
handleChange(opt);
|
4716
|
+
},
|
4712
4717
|
className: cn(
|
4713
|
-
"hawa-w-full hawa-
|
4718
|
+
"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
4719
|
+
!props.disabled && "hawa-cursor-pointer",
|
4714
4720
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
4715
4721
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
4716
4722
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
4717
4723
|
tabSizeStyle[size],
|
4718
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
4719
4724
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
4720
4725
|
),
|
4721
4726
|
key: o
|
@@ -6531,6 +6536,8 @@ var DropdownMenu = ({
|
|
6531
6536
|
{
|
6532
6537
|
side,
|
6533
6538
|
sideOffset,
|
6539
|
+
align,
|
6540
|
+
alignOffset,
|
6534
6541
|
className: cn(
|
6535
6542
|
className,
|
6536
6543
|
widthStyles[width],
|
@@ -6538,12 +6545,11 @@ var DropdownMenu = ({
|
|
6538
6545
|
),
|
6539
6546
|
style: {
|
6540
6547
|
maxHeight: "var(--radix-dropdown-menu-content-available-height)"
|
6541
|
-
}
|
6542
|
-
align,
|
6543
|
-
alignOffset
|
6548
|
+
}
|
6544
6549
|
},
|
6545
6550
|
header && header,
|
6546
6551
|
items && items.map((item, index) => {
|
6552
|
+
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
6547
6553
|
if (item.itemType === "separator") {
|
6548
6554
|
return /* @__PURE__ */ React48.createElement(DropdownMenuSeparator, { key: index });
|
6549
6555
|
} else if (item.itemType === "label") {
|
@@ -6554,43 +6560,46 @@ var DropdownMenu = ({
|
|
6554
6560
|
return item.subitems ? /* @__PURE__ */ React48.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React48.createElement(
|
6555
6561
|
DropdownMenuSubTrigger,
|
6556
6562
|
{
|
6557
|
-
|
6558
|
-
|
6563
|
+
dir: direction,
|
6564
|
+
className: cn(sizeStyles[size])
|
6559
6565
|
},
|
6560
6566
|
item.icon && item.icon,
|
6561
6567
|
item.label && item.label
|
6562
|
-
), /* @__PURE__ */ React48.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React48.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) =>
|
6563
|
-
|
6564
|
-
|
6565
|
-
|
6566
|
-
|
6567
|
-
|
6568
|
-
|
6569
|
-
|
6570
|
-
|
6571
|
-
|
6568
|
+
), /* @__PURE__ */ React48.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React48.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
6569
|
+
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
6570
|
+
return /* @__PURE__ */ React48.createElement(
|
6571
|
+
DropdownMenuItem,
|
6572
|
+
{
|
6573
|
+
key: subIndex,
|
6574
|
+
LinkComponent: SubitemLinkComponent,
|
6575
|
+
slug: subitem.slug,
|
6576
|
+
disabled: subitem.disabled,
|
6577
|
+
className: cn(
|
6578
|
+
sizeStyles[size],
|
6579
|
+
!item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
|
6580
|
+
),
|
6581
|
+
onMouseDown: (event) => {
|
6582
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
6583
|
+
event.preventDefault();
|
6584
|
+
if (subitem.onMiddleClick) {
|
6585
|
+
subitem.onMiddleClick(item.value);
|
6586
|
+
}
|
6587
|
+
}
|
6588
|
+
},
|
6589
|
+
onSelect: () => {
|
6590
|
+
subitem.action && subitem.action();
|
6591
|
+
if (onItemSelect) {
|
6592
|
+
onItemSelect(subitem.value);
|
6572
6593
|
}
|
6573
6594
|
}
|
6574
6595
|
},
|
6575
|
-
|
6576
|
-
|
6577
|
-
|
6578
|
-
|
6579
|
-
),
|
6580
|
-
disabled: subitem.disabled,
|
6581
|
-
onSelect: () => {
|
6582
|
-
subitem.action && subitem.action();
|
6583
|
-
if (onItemSelect) {
|
6584
|
-
onItemSelect(subitem.value);
|
6585
|
-
}
|
6586
|
-
}
|
6587
|
-
},
|
6588
|
-
subitem.icon && subitem.icon,
|
6589
|
-
subitem.label && subitem.label
|
6590
|
-
))))) : /* @__PURE__ */ React48.createElement(
|
6596
|
+
subitem.icon && subitem.icon,
|
6597
|
+
subitem.label && subitem.label
|
6598
|
+
);
|
6599
|
+
})))) : /* @__PURE__ */ React48.createElement(
|
6591
6600
|
DropdownMenuItem,
|
6592
6601
|
{
|
6593
|
-
LinkComponent:
|
6602
|
+
LinkComponent: ItemLinkComponent,
|
6594
6603
|
slug: item.slug,
|
6595
6604
|
key: index,
|
6596
6605
|
disabled: item.disabled,
|
package/dist/blocks/index.mjs
CHANGED
@@ -26,7 +26,7 @@ import {
|
|
26
26
|
UncheckMark,
|
27
27
|
VeryBadEmoji,
|
28
28
|
VeryGoodEmoji
|
29
|
-
} from "../chunk-
|
29
|
+
} from "../chunk-XKVSLAKW.mjs";
|
30
30
|
import {
|
31
31
|
Button,
|
32
32
|
Card,
|
@@ -42,7 +42,7 @@ import {
|
|
42
42
|
Skeleton,
|
43
43
|
Tooltip,
|
44
44
|
cn
|
45
|
-
} from "../chunk-
|
45
|
+
} from "../chunk-FVBEK44Y.mjs";
|
46
46
|
import "../chunk-4OOSUQZG.mjs";
|
47
47
|
|
48
48
|
// blocks/auth/AuthButtons.tsx
|
@@ -1011,7 +1011,8 @@ var Radio = ({
|
|
1011
1011
|
props.defaultValue || props.value
|
1012
1012
|
);
|
1013
1013
|
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
1014
|
-
let inactiveTabStyle =
|
1014
|
+
let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
|
1015
|
+
${props.disabled ? "" : "hover:hawa-bg-muted"}`;
|
1015
1016
|
let orientationStyle = {
|
1016
1017
|
horizontal: "hawa-flex hawa-flex-row",
|
1017
1018
|
vertical: "hawa-flex hawa-flex-col"
|
@@ -1065,14 +1066,18 @@ var Radio = ({
|
|
1065
1066
|
"li",
|
1066
1067
|
{
|
1067
1068
|
"aria-current": "page",
|
1068
|
-
onClick: () =>
|
1069
|
+
onClick: () => {
|
1070
|
+
if (props.disabled)
|
1071
|
+
return;
|
1072
|
+
handleChange(opt);
|
1073
|
+
},
|
1069
1074
|
className: cn(
|
1070
|
-
"hawa-w-full hawa-
|
1075
|
+
"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
1076
|
+
!props.disabled && "hawa-cursor-pointer",
|
1071
1077
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
1072
1078
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
1073
1079
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
1074
1080
|
tabSizeStyle[size],
|
1075
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
1076
1081
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
1077
1082
|
),
|
1078
1083
|
key: o
|
@@ -1168,6 +1168,8 @@ var DropdownMenu = ({
|
|
1168
1168
|
{
|
1169
1169
|
side,
|
1170
1170
|
sideOffset,
|
1171
|
+
align,
|
1172
|
+
alignOffset,
|
1171
1173
|
className: cn(
|
1172
1174
|
className,
|
1173
1175
|
widthStyles[width],
|
@@ -1175,12 +1177,11 @@ var DropdownMenu = ({
|
|
1175
1177
|
),
|
1176
1178
|
style: {
|
1177
1179
|
maxHeight: "var(--radix-dropdown-menu-content-available-height)"
|
1178
|
-
}
|
1179
|
-
align,
|
1180
|
-
alignOffset
|
1180
|
+
}
|
1181
1181
|
},
|
1182
1182
|
header && header,
|
1183
1183
|
items && items.map((item, index) => {
|
1184
|
+
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
1184
1185
|
if (item.itemType === "separator") {
|
1185
1186
|
return /* @__PURE__ */ React8.createElement(DropdownMenuSeparator, { key: index });
|
1186
1187
|
} else if (item.itemType === "label") {
|
@@ -1191,43 +1192,46 @@ var DropdownMenu = ({
|
|
1191
1192
|
return item.subitems ? /* @__PURE__ */ React8.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React8.createElement(
|
1192
1193
|
DropdownMenuSubTrigger,
|
1193
1194
|
{
|
1194
|
-
|
1195
|
-
|
1195
|
+
dir: direction,
|
1196
|
+
className: cn(sizeStyles[size])
|
1196
1197
|
},
|
1197
1198
|
item.icon && item.icon,
|
1198
1199
|
item.label && item.label
|
1199
|
-
), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) =>
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1200
|
+
), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
1201
|
+
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
1202
|
+
return /* @__PURE__ */ React8.createElement(
|
1203
|
+
DropdownMenuItem,
|
1204
|
+
{
|
1205
|
+
key: subIndex,
|
1206
|
+
LinkComponent: SubitemLinkComponent,
|
1207
|
+
slug: subitem.slug,
|
1208
|
+
disabled: subitem.disabled,
|
1209
|
+
className: cn(
|
1210
|
+
sizeStyles[size],
|
1211
|
+
!item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
|
1212
|
+
),
|
1213
|
+
onMouseDown: (event) => {
|
1214
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
1215
|
+
event.preventDefault();
|
1216
|
+
if (subitem.onMiddleClick) {
|
1217
|
+
subitem.onMiddleClick(item.value);
|
1218
|
+
}
|
1219
|
+
}
|
1220
|
+
},
|
1221
|
+
onSelect: () => {
|
1222
|
+
subitem.action && subitem.action();
|
1223
|
+
if (onItemSelect) {
|
1224
|
+
onItemSelect(subitem.value);
|
1209
1225
|
}
|
1210
1226
|
}
|
1211
1227
|
},
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
),
|
1217
|
-
disabled: subitem.disabled,
|
1218
|
-
onSelect: () => {
|
1219
|
-
subitem.action && subitem.action();
|
1220
|
-
if (onItemSelect) {
|
1221
|
-
onItemSelect(subitem.value);
|
1222
|
-
}
|
1223
|
-
}
|
1224
|
-
},
|
1225
|
-
subitem.icon && subitem.icon,
|
1226
|
-
subitem.label && subitem.label
|
1227
|
-
))))) : /* @__PURE__ */ React8.createElement(
|
1228
|
+
subitem.icon && subitem.icon,
|
1229
|
+
subitem.label && subitem.label
|
1230
|
+
);
|
1231
|
+
})))) : /* @__PURE__ */ React8.createElement(
|
1228
1232
|
DropdownMenuItem,
|
1229
1233
|
{
|
1230
|
-
LinkComponent:
|
1234
|
+
LinkComponent: ItemLinkComponent,
|
1231
1235
|
slug: item.slug,
|
1232
1236
|
key: index,
|
1233
1237
|
disabled: item.disabled,
|
@@ -23,7 +23,8 @@ var Radio = ({
|
|
23
23
|
props.defaultValue || props.value
|
24
24
|
);
|
25
25
|
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
26
|
-
let inactiveTabStyle =
|
26
|
+
let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
|
27
|
+
${props.disabled ? "" : "hover:hawa-bg-muted"}`;
|
27
28
|
let orientationStyle = {
|
28
29
|
horizontal: "hawa-flex hawa-flex-row",
|
29
30
|
vertical: "hawa-flex hawa-flex-col"
|
@@ -77,14 +78,18 @@ var Radio = ({
|
|
77
78
|
"li",
|
78
79
|
{
|
79
80
|
"aria-current": "page",
|
80
|
-
onClick: () =>
|
81
|
+
onClick: () => {
|
82
|
+
if (props.disabled)
|
83
|
+
return;
|
84
|
+
handleChange(opt);
|
85
|
+
},
|
81
86
|
className: cn(
|
82
|
-
"hawa-w-full hawa-
|
87
|
+
"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
88
|
+
!props.disabled && "hawa-cursor-pointer",
|
83
89
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
84
90
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
85
91
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
86
92
|
tabSizeStyle[size],
|
87
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
88
93
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
89
94
|
),
|
90
95
|
key: o
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
Skeleton,
|
6
6
|
Tooltip,
|
7
7
|
cn
|
8
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-FVBEK44Y.mjs";
|
9
9
|
|
10
10
|
// elements/alert/Alert.tsx
|
11
11
|
import React, { useRef, useState, useEffect } from "react";
|
@@ -2473,7 +2473,8 @@ var Radio = ({
|
|
2473
2473
|
props.defaultValue || props.value
|
2474
2474
|
);
|
2475
2475
|
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
2476
|
-
let inactiveTabStyle =
|
2476
|
+
let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
|
2477
|
+
${props.disabled ? "" : "hover:hawa-bg-muted"}`;
|
2477
2478
|
let orientationStyle = {
|
2478
2479
|
horizontal: "hawa-flex hawa-flex-row",
|
2479
2480
|
vertical: "hawa-flex hawa-flex-col"
|
@@ -2527,14 +2528,18 @@ var Radio = ({
|
|
2527
2528
|
"li",
|
2528
2529
|
{
|
2529
2530
|
"aria-current": "page",
|
2530
|
-
onClick: () =>
|
2531
|
+
onClick: () => {
|
2532
|
+
if (props.disabled)
|
2533
|
+
return;
|
2534
|
+
handleChange(opt);
|
2535
|
+
},
|
2531
2536
|
className: cn(
|
2532
|
-
"hawa-w-full hawa-
|
2537
|
+
"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
2538
|
+
!props.disabled && "hawa-cursor-pointer",
|
2533
2539
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
2534
2540
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
2535
2541
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
2536
2542
|
tabSizeStyle[size],
|
2537
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
2538
2543
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
2539
2544
|
),
|
2540
2545
|
key: o
|
package/dist/dataTable/index.js
CHANGED
@@ -565,6 +565,8 @@ var DropdownMenu = ({
|
|
565
565
|
{
|
566
566
|
side,
|
567
567
|
sideOffset,
|
568
|
+
align,
|
569
|
+
alignOffset,
|
568
570
|
className: cn(
|
569
571
|
className,
|
570
572
|
widthStyles[width],
|
@@ -572,12 +574,11 @@ var DropdownMenu = ({
|
|
572
574
|
),
|
573
575
|
style: {
|
574
576
|
maxHeight: "var(--radix-dropdown-menu-content-available-height)"
|
575
|
-
}
|
576
|
-
align,
|
577
|
-
alignOffset
|
577
|
+
}
|
578
578
|
},
|
579
579
|
header && header,
|
580
580
|
items && items.map((item, index) => {
|
581
|
+
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
581
582
|
if (item.itemType === "separator") {
|
582
583
|
return /* @__PURE__ */ React3.createElement(DropdownMenuSeparator, { key: index });
|
583
584
|
} else if (item.itemType === "label") {
|
@@ -588,43 +589,46 @@ var DropdownMenu = ({
|
|
588
589
|
return item.subitems ? /* @__PURE__ */ React3.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React3.createElement(
|
589
590
|
DropdownMenuSubTrigger,
|
590
591
|
{
|
591
|
-
|
592
|
-
|
592
|
+
dir: direction,
|
593
|
+
className: cn(sizeStyles[size])
|
593
594
|
},
|
594
595
|
item.icon && item.icon,
|
595
596
|
item.label && item.label
|
596
|
-
), /* @__PURE__ */ React3.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React3.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) =>
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
597
|
+
), /* @__PURE__ */ React3.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React3.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
598
|
+
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
599
|
+
return /* @__PURE__ */ React3.createElement(
|
600
|
+
DropdownMenuItem,
|
601
|
+
{
|
602
|
+
key: subIndex,
|
603
|
+
LinkComponent: SubitemLinkComponent,
|
604
|
+
slug: subitem.slug,
|
605
|
+
disabled: subitem.disabled,
|
606
|
+
className: cn(
|
607
|
+
sizeStyles[size],
|
608
|
+
!item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
|
609
|
+
),
|
610
|
+
onMouseDown: (event) => {
|
611
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
612
|
+
event.preventDefault();
|
613
|
+
if (subitem.onMiddleClick) {
|
614
|
+
subitem.onMiddleClick(item.value);
|
615
|
+
}
|
616
|
+
}
|
617
|
+
},
|
618
|
+
onSelect: () => {
|
619
|
+
subitem.action && subitem.action();
|
620
|
+
if (onItemSelect) {
|
621
|
+
onItemSelect(subitem.value);
|
606
622
|
}
|
607
623
|
}
|
608
624
|
},
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
),
|
614
|
-
disabled: subitem.disabled,
|
615
|
-
onSelect: () => {
|
616
|
-
subitem.action && subitem.action();
|
617
|
-
if (onItemSelect) {
|
618
|
-
onItemSelect(subitem.value);
|
619
|
-
}
|
620
|
-
}
|
621
|
-
},
|
622
|
-
subitem.icon && subitem.icon,
|
623
|
-
subitem.label && subitem.label
|
624
|
-
))))) : /* @__PURE__ */ React3.createElement(
|
625
|
+
subitem.icon && subitem.icon,
|
626
|
+
subitem.label && subitem.label
|
627
|
+
);
|
628
|
+
})))) : /* @__PURE__ */ React3.createElement(
|
625
629
|
DropdownMenuItem,
|
626
630
|
{
|
627
|
-
LinkComponent:
|
631
|
+
LinkComponent: ItemLinkComponent,
|
628
632
|
slug: item.slug,
|
629
633
|
key: index,
|
630
634
|
disabled: item.disabled,
|