@sikka/hawa 0.29.9-next → 0.29.10-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.
@@ -6545,6 +6545,7 @@ var DropdownMenu = ({
6545
6545
  },
6546
6546
  header && header,
6547
6547
  items && items.map((item, index) => {
6548
+ var _a;
6548
6549
  if (item.itemType === "separator") {
6549
6550
  return /* @__PURE__ */ React48.createElement(DropdownMenuSeparator, { key: index });
6550
6551
  } else if (item.itemType === "label") {
@@ -6560,38 +6561,41 @@ var DropdownMenu = ({
6560
6561
  },
6561
6562
  item.icon && item.icon,
6562
6563
  item.label && item.label
6563
- ), /* @__PURE__ */ React48.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React48.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React48.createElement(
6564
- DropdownMenuItem,
6565
- {
6566
- LinkComponent: subitem.slug ? LinkComponent : "a",
6567
- slug: subitem.slug,
6568
- onMouseDown: (event) => {
6569
- if (event.button === 1 || event.button === 0 && event.ctrlKey) {
6570
- event.preventDefault();
6571
- if (subitem.onMiddleClick) {
6572
- subitem.onMiddleClick(item.value);
6564
+ ), /* @__PURE__ */ React48.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React48.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
6565
+ var _a2;
6566
+ return /* @__PURE__ */ React48.createElement(
6567
+ DropdownMenuItem,
6568
+ {
6569
+ LinkComponent: (_a2 = subitem.slug) != null ? _a2 : LinkComponent,
6570
+ slug: subitem.slug,
6571
+ onMouseDown: (event) => {
6572
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
6573
+ event.preventDefault();
6574
+ if (subitem.onMiddleClick) {
6575
+ subitem.onMiddleClick(item.value);
6576
+ }
6577
+ }
6578
+ },
6579
+ key: subIndex,
6580
+ className: cn(
6581
+ sizeStyles[size],
6582
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
6583
+ ),
6584
+ disabled: subitem.disabled,
6585
+ onSelect: () => {
6586
+ subitem.action && subitem.action();
6587
+ if (onItemSelect) {
6588
+ onItemSelect(subitem.value);
6573
6589
  }
6574
6590
  }
6575
6591
  },
6576
- key: subIndex,
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
- disabled: subitem.disabled,
6582
- onSelect: () => {
6583
- subitem.action && subitem.action();
6584
- if (onItemSelect) {
6585
- onItemSelect(subitem.value);
6586
- }
6587
- }
6588
- },
6589
- subitem.icon && subitem.icon,
6590
- subitem.label && subitem.label
6591
- ))))) : /* @__PURE__ */ React48.createElement(
6592
+ subitem.icon && subitem.icon,
6593
+ subitem.label && subitem.label
6594
+ );
6595
+ })))) : /* @__PURE__ */ React48.createElement(
6592
6596
  DropdownMenuItem,
6593
6597
  {
6594
- LinkComponent: item.slug ? LinkComponent : "a",
6598
+ LinkComponent: (_a = item.slug) != null ? _a : LinkComponent,
6595
6599
  slug: item.slug,
6596
6600
  key: index,
6597
6601
  disabled: item.disabled,
@@ -26,7 +26,7 @@ import {
26
26
  UncheckMark,
27
27
  VeryBadEmoji,
28
28
  VeryGoodEmoji
29
- } from "../chunk-KAKN4C2M.mjs";
29
+ } from "../chunk-MHBN32IO.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-GUWBWOKE.mjs";
45
+ } from "../chunk-25DLKHA3.mjs";
46
46
  import "../chunk-4OOSUQZG.mjs";
47
47
 
48
48
  // blocks/auth/AuthButtons.tsx
@@ -1182,6 +1182,7 @@ var DropdownMenu = ({
1182
1182
  },
1183
1183
  header && header,
1184
1184
  items && items.map((item, index) => {
1185
+ var _a;
1185
1186
  if (item.itemType === "separator") {
1186
1187
  return /* @__PURE__ */ React8.createElement(DropdownMenuSeparator, { key: index });
1187
1188
  } else if (item.itemType === "label") {
@@ -1197,38 +1198,41 @@ var DropdownMenu = ({
1197
1198
  },
1198
1199
  item.icon && item.icon,
1199
1200
  item.label && item.label
1200
- ), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React8.createElement(
1201
- DropdownMenuItem,
1202
- {
1203
- LinkComponent: subitem.slug ? LinkComponent : "a",
1204
- slug: subitem.slug,
1205
- onMouseDown: (event) => {
1206
- if (event.button === 1 || event.button === 0 && event.ctrlKey) {
1207
- event.preventDefault();
1208
- if (subitem.onMiddleClick) {
1209
- subitem.onMiddleClick(item.value);
1201
+ ), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
1202
+ var _a2;
1203
+ return /* @__PURE__ */ React8.createElement(
1204
+ DropdownMenuItem,
1205
+ {
1206
+ LinkComponent: (_a2 = subitem.slug) != null ? _a2 : LinkComponent,
1207
+ slug: subitem.slug,
1208
+ onMouseDown: (event) => {
1209
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
1210
+ event.preventDefault();
1211
+ if (subitem.onMiddleClick) {
1212
+ subitem.onMiddleClick(item.value);
1213
+ }
1214
+ }
1215
+ },
1216
+ key: subIndex,
1217
+ className: cn(
1218
+ sizeStyles[size],
1219
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
1220
+ ),
1221
+ disabled: subitem.disabled,
1222
+ onSelect: () => {
1223
+ subitem.action && subitem.action();
1224
+ if (onItemSelect) {
1225
+ onItemSelect(subitem.value);
1210
1226
  }
1211
1227
  }
1212
1228
  },
1213
- key: subIndex,
1214
- className: cn(
1215
- sizeStyles[size],
1216
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
1217
- ),
1218
- disabled: subitem.disabled,
1219
- onSelect: () => {
1220
- subitem.action && subitem.action();
1221
- if (onItemSelect) {
1222
- onItemSelect(subitem.value);
1223
- }
1224
- }
1225
- },
1226
- subitem.icon && subitem.icon,
1227
- subitem.label && subitem.label
1228
- ))))) : /* @__PURE__ */ React8.createElement(
1229
+ subitem.icon && subitem.icon,
1230
+ subitem.label && subitem.label
1231
+ );
1232
+ })))) : /* @__PURE__ */ React8.createElement(
1229
1233
  DropdownMenuItem,
1230
1234
  {
1231
- LinkComponent: item.slug ? LinkComponent : "a",
1235
+ LinkComponent: (_a = item.slug) != null ? _a : LinkComponent,
1232
1236
  slug: item.slug,
1233
1237
  key: index,
1234
1238
  disabled: item.disabled,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  cn
4
- } from "./chunk-GUWBWOKE.mjs";
4
+ } from "./chunk-25DLKHA3.mjs";
5
5
 
6
6
  // elements/sheet/Sheet.tsx
7
7
  import * as React from "react";
@@ -5,7 +5,7 @@ import {
5
5
  Skeleton,
6
6
  Tooltip,
7
7
  cn
8
- } from "./chunk-GUWBWOKE.mjs";
8
+ } from "./chunk-25DLKHA3.mjs";
9
9
 
10
10
  // elements/alert/Alert.tsx
11
11
  import React, { useRef, useState, useEffect } from "react";
@@ -579,6 +579,7 @@ var DropdownMenu = ({
579
579
  },
580
580
  header && header,
581
581
  items && items.map((item, index) => {
582
+ var _a;
582
583
  if (item.itemType === "separator") {
583
584
  return /* @__PURE__ */ React3.createElement(DropdownMenuSeparator, { key: index });
584
585
  } else if (item.itemType === "label") {
@@ -594,38 +595,41 @@ var DropdownMenu = ({
594
595
  },
595
596
  item.icon && item.icon,
596
597
  item.label && item.label
597
- ), /* @__PURE__ */ React3.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React3.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React3.createElement(
598
- DropdownMenuItem,
599
- {
600
- LinkComponent: subitem.slug ? LinkComponent : "a",
601
- slug: subitem.slug,
602
- onMouseDown: (event) => {
603
- if (event.button === 1 || event.button === 0 && event.ctrlKey) {
604
- event.preventDefault();
605
- if (subitem.onMiddleClick) {
606
- subitem.onMiddleClick(item.value);
598
+ ), /* @__PURE__ */ React3.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React3.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
599
+ var _a2;
600
+ return /* @__PURE__ */ React3.createElement(
601
+ DropdownMenuItem,
602
+ {
603
+ LinkComponent: (_a2 = subitem.slug) != null ? _a2 : LinkComponent,
604
+ slug: subitem.slug,
605
+ onMouseDown: (event) => {
606
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
607
+ event.preventDefault();
608
+ if (subitem.onMiddleClick) {
609
+ subitem.onMiddleClick(item.value);
610
+ }
611
+ }
612
+ },
613
+ key: subIndex,
614
+ className: cn(
615
+ sizeStyles[size],
616
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
617
+ ),
618
+ disabled: subitem.disabled,
619
+ onSelect: () => {
620
+ subitem.action && subitem.action();
621
+ if (onItemSelect) {
622
+ onItemSelect(subitem.value);
607
623
  }
608
624
  }
609
625
  },
610
- key: subIndex,
611
- className: cn(
612
- sizeStyles[size],
613
- !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
614
- ),
615
- disabled: subitem.disabled,
616
- onSelect: () => {
617
- subitem.action && subitem.action();
618
- if (onItemSelect) {
619
- onItemSelect(subitem.value);
620
- }
621
- }
622
- },
623
- subitem.icon && subitem.icon,
624
- subitem.label && subitem.label
625
- ))))) : /* @__PURE__ */ React3.createElement(
626
+ subitem.icon && subitem.icon,
627
+ subitem.label && subitem.label
628
+ );
629
+ })))) : /* @__PURE__ */ React3.createElement(
626
630
  DropdownMenuItem,
627
631
  {
628
- LinkComponent: item.slug ? LinkComponent : "a",
632
+ LinkComponent: (_a = item.slug) != null ? _a : LinkComponent,
629
633
  slug: item.slug,
630
634
  key: index,
631
635
  disabled: item.disabled,