@sikka/hawa 0.1.55 → 0.1.56
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/.github/ISSUE_TEMPLATE.yml +33 -61
- package/dist/index.d.mts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +520 -528
- package/dist/index.mjs +778 -782
- package/package.json +1 -1
- package/src/elements/DropdownMenu.tsx +14 -4
- package/src/elements/HawaTable.tsx +298 -147
package/dist/index.js
CHANGED
|
@@ -284,7 +284,7 @@ __export(src_exports, {
|
|
|
284
284
|
return DraggableCard;
|
|
285
285
|
},
|
|
286
286
|
DropdownMenu: function() {
|
|
287
|
-
return
|
|
287
|
+
return DropdownMenu;
|
|
288
288
|
},
|
|
289
289
|
EmptyState: function() {
|
|
290
290
|
return EmptyState;
|
|
@@ -1622,124 +1622,10 @@ var HawaAlert = function(_param) {
|
|
|
1622
1622
|
})))));
|
|
1623
1623
|
};
|
|
1624
1624
|
// src/elements/HawaTable.tsx
|
|
1625
|
-
var
|
|
1626
|
-
var import_clsx13 = __toESM(require("clsx"));
|
|
1627
|
-
// src/elements/HawaMenu.tsx
|
|
1628
|
-
var import_react18 = __toESM(require("react"));
|
|
1625
|
+
var import_react19 = __toESM(require("react"));
|
|
1629
1626
|
var import_clsx12 = __toESM(require("clsx"));
|
|
1630
|
-
var HawaMenu = function(param) {
|
|
1631
|
-
var menuItems = param.menuItems, withHeader = param.withHeader, _param_direction = param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, headerTitle = param.headerTitle, headerSubtitle = param.headerSubtitle, _param_size = param.size, size = _param_size === void 0 ? "normal" : _param_size, children = param.children, onClickOutside = param.onClickOutside, actionedItem = param.actionedItem, _param_position = param.position, position = _param_position === void 0 ? "top-right" : _param_position;
|
|
1632
|
-
var _menuItems;
|
|
1633
|
-
var _ref = _sliced_to_array((0, import_react18.useState)(false), 2), menuOpened = _ref[0], setMenuOpened = _ref[1];
|
|
1634
|
-
var childrenRef = (0, import_react18.useRef)(null);
|
|
1635
|
-
var _ref1 = _sliced_to_array((0, import_react18.useState)(null), 2), childrenHeight = _ref1[0], setChildrenHeight = _ref1[1];
|
|
1636
|
-
var _ref2 = _sliced_to_array((0, import_react18.useState)(null), 2), childrenWidth = _ref2[0], setChildrenWidth = _ref2[1];
|
|
1637
|
-
var menuRef = (0, import_react18.useRef)(null);
|
|
1638
|
-
var _ref3 = _sliced_to_array((0, import_react18.useState)(null), 2), menuWidth = _ref3[0], setMenuWidth = _ref3[1];
|
|
1639
|
-
var _ref4 = _sliced_to_array((0, import_react18.useState)(null), 2), menuHeight = _ref4[0], setMenuHeight = _ref4[1];
|
|
1640
|
-
(0, import_react18.useEffect)(function() {
|
|
1641
|
-
var _menuRef_current, _menuRef_current1, _childrenRef_current, _childrenRef_current1;
|
|
1642
|
-
setMenuHeight((_menuRef_current = menuRef.current) === null || _menuRef_current === void 0 ? void 0 : _menuRef_current.getBoundingClientRect().height);
|
|
1643
|
-
setMenuWidth((_menuRef_current1 = menuRef.current) === null || _menuRef_current1 === void 0 ? void 0 : _menuRef_current1.getBoundingClientRect().width);
|
|
1644
|
-
setChildrenHeight((_childrenRef_current = childrenRef.current) === null || _childrenRef_current === void 0 ? void 0 : _childrenRef_current.getBoundingClientRect().height);
|
|
1645
|
-
setChildrenWidth((_childrenRef_current1 = childrenRef.current) === null || _childrenRef_current1 === void 0 ? void 0 : _childrenRef_current1.getBoundingClientRect().width);
|
|
1646
|
-
var handleClickOutside = function(event) {
|
|
1647
|
-
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
1648
|
-
setMenuOpened(false);
|
|
1649
|
-
}
|
|
1650
|
-
};
|
|
1651
|
-
document.addEventListener("click", handleClickOutside, true);
|
|
1652
|
-
return function() {
|
|
1653
|
-
document.removeEventListener("click", handleClickOutside, true);
|
|
1654
|
-
};
|
|
1655
|
-
}, [
|
|
1656
|
-
onClickOutside
|
|
1657
|
-
]);
|
|
1658
|
-
var defaultStyles = "border-none absolute ring-offset-1 absolute z-10 w-44 divide-y divide-gray-100 overflow-y-clip rounded bg-gray-50 shadow-lg transition-all dark:bg-gray-700";
|
|
1659
|
-
var sizeStyles2 = {
|
|
1660
|
-
small: "text-[11px] p-1 px-4 m-0",
|
|
1661
|
-
normal: "py-2 px-4",
|
|
1662
|
-
large: ""
|
|
1663
|
-
};
|
|
1664
|
-
var menuCoordinates;
|
|
1665
|
-
var spacing = 5;
|
|
1666
|
-
switch(position){
|
|
1667
|
-
case "top-right":
|
|
1668
|
-
menuCoordinates = direction === "rtl" ? "".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "0px, -".concat(menuHeight + childrenHeight + spacing, "px");
|
|
1669
|
-
break;
|
|
1670
|
-
case "top-left":
|
|
1671
|
-
menuCoordinates = direction === "rtl" ? "".concat(0, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "-".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px");
|
|
1672
|
-
break;
|
|
1673
|
-
case "bottom-right":
|
|
1674
|
-
menuCoordinates = direction === "rtl" ? "-".concat(0, "px, ").concat(spacing, "px") : "-".concat(childrenWidth - menuWidth, "px, ").concat(spacing, "px");
|
|
1675
|
-
break;
|
|
1676
|
-
case "bottom-left":
|
|
1677
|
-
menuCoordinates = direction === "rtl" ? "0px, ".concat(spacing, "px") : "-".concat(menuWidth - childrenWidth, "px,").concat(spacing, "px");
|
|
1678
|
-
break;
|
|
1679
|
-
case "right-bottom":
|
|
1680
|
-
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
1681
|
-
break;
|
|
1682
|
-
case "right-top":
|
|
1683
|
-
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
1684
|
-
break;
|
|
1685
|
-
case "left-bottom":
|
|
1686
|
-
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
1687
|
-
break;
|
|
1688
|
-
case "left-top":
|
|
1689
|
-
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
1690
|
-
break;
|
|
1691
|
-
default:
|
|
1692
|
-
menuCoordinates = "-".concat(menuWidth / 2, "px, -").concat(childrenHeight + menuHeight / 2, "px");
|
|
1693
|
-
break;
|
|
1694
|
-
}
|
|
1695
|
-
return /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1696
|
-
onClick: function() {
|
|
1697
|
-
if (menuOpened) setMenuOpened(false);
|
|
1698
|
-
else setMenuOpened(true);
|
|
1699
|
-
}
|
|
1700
|
-
}, /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1701
|
-
ref: childrenRef
|
|
1702
|
-
}, children), /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1703
|
-
ref: menuRef,
|
|
1704
|
-
style: {
|
|
1705
|
-
position: "absolute",
|
|
1706
|
-
width: "max-content",
|
|
1707
|
-
transform: "translate(".concat(menuCoordinates, ")"),
|
|
1708
|
-
maxWidth: "200px"
|
|
1709
|
-
},
|
|
1710
|
-
className: (0, import_clsx12.default)(defaultStyles, menuOpened ? "opacity-100" : "invisible opacity-0")
|
|
1711
|
-
}, withHeader && /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1712
|
-
className: "px-4 py-3 text-xs text-gray-900 dark:text-white"
|
|
1713
|
-
}, /* @__PURE__ */ import_react18.default.createElement("div", null, headerTitle), /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1714
|
-
className: "truncate font-medium"
|
|
1715
|
-
}, headerSubtitle)), (_menuItems = menuItems) === null || _menuItems === void 0 ? void 0 : _menuItems.map(function(group, o) {
|
|
1716
|
-
var _group;
|
|
1717
|
-
return /* @__PURE__ */ import_react18.default.createElement("ul", {
|
|
1718
|
-
key: o,
|
|
1719
|
-
className: "bg-layout-1200 flex flex-col gap-1 p-1 text-gray-700 dark:text-gray-200"
|
|
1720
|
-
}, (_group = group) === null || _group === void 0 ? void 0 : _group.map(function(item, indx) {
|
|
1721
|
-
return item.element ? /* @__PURE__ */ import_react18.default.createElement("li", {
|
|
1722
|
-
key: indx,
|
|
1723
|
-
className: "cursor-pointer items-center rounded hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white"
|
|
1724
|
-
}, item.element) : /* @__PURE__ */ import_react18.default.createElement("li", {
|
|
1725
|
-
key: indx,
|
|
1726
|
-
onClick: function() {
|
|
1727
|
-
if (item.disabled) {
|
|
1728
|
-
console.log("button is disabled");
|
|
1729
|
-
} else {
|
|
1730
|
-
var _item;
|
|
1731
|
-
(_item = item) === null || _item === void 0 ? void 0 : _item.action(actionedItem);
|
|
1732
|
-
}
|
|
1733
|
-
},
|
|
1734
|
-
className: (0, import_clsx12.default)("transition-all", item.isButton ? "flex cursor-pointer flex-row items-center rounded-inner bg-buttonPrimary-500 px-4 py-2 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse" : item.disabled ? "text-gray-300" : " flex cursor-pointer flex-row items-center rounded-inner hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white ", sizeStyles2[size])
|
|
1735
|
-
}, item.icon && /* @__PURE__ */ import_react18.default.createElement("div", {
|
|
1736
|
-
className: size === "small" ? "mr-1 rtl:ml-1" : "mr-2 rtl:ml-2"
|
|
1737
|
-
}, item.icon), item.label);
|
|
1738
|
-
}));
|
|
1739
|
-
})));
|
|
1740
|
-
};
|
|
1741
1627
|
// src/hooks/useTable.ts
|
|
1742
|
-
var
|
|
1628
|
+
var import_react18 = require("react");
|
|
1743
1629
|
var calculateRange = function(data, rowsPerPage) {
|
|
1744
1630
|
var _data;
|
|
1745
1631
|
var range = [];
|
|
@@ -1778,9 +1664,9 @@ var sortData = function(data, sortColumn, sortDirection) {
|
|
|
1778
1664
|
return data;
|
|
1779
1665
|
};
|
|
1780
1666
|
var useTable = function(data, page, rowsPerPage, sortColumn, sortDirection) {
|
|
1781
|
-
var _ref = _sliced_to_array((0,
|
|
1782
|
-
var _ref1 = _sliced_to_array((0,
|
|
1783
|
-
(0,
|
|
1667
|
+
var _ref = _sliced_to_array((0, import_react18.useState)([]), 2), tableRange = _ref[0], setTableRange = _ref[1];
|
|
1668
|
+
var _ref1 = _sliced_to_array((0, import_react18.useState)([]), 2), slice = _ref1[0], setSlice = _ref1[1];
|
|
1669
|
+
(0, import_react18.useEffect)(function() {
|
|
1784
1670
|
if (data) {
|
|
1785
1671
|
var range = calculateRange(data, rowsPerPage);
|
|
1786
1672
|
setTableRange(_to_consumable_array(range));
|
|
@@ -1802,7 +1688,205 @@ var useTable = function(data, page, rowsPerPage, sortColumn, sortDirection) {
|
|
|
1802
1688
|
};
|
|
1803
1689
|
};
|
|
1804
1690
|
var useTable_default = useTable;
|
|
1691
|
+
// src/elements/DropdownMenu.tsx
|
|
1692
|
+
var React22 = __toESM(require("react"));
|
|
1693
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1694
|
+
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
1695
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1696
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1697
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1698
|
+
var DropdownMenuSubTrigger = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1699
|
+
var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties(_param, [
|
|
1700
|
+
"className",
|
|
1701
|
+
"inset",
|
|
1702
|
+
"children"
|
|
1703
|
+
]);
|
|
1704
|
+
return React22.createElement(DropdownMenuPrimitive.SubTrigger, _object_spread({
|
|
1705
|
+
ref: ref,
|
|
1706
|
+
className: cn("flex cursor-default select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className)
|
|
1707
|
+
}, props), /* @__PURE__ */ React22.createElement("div", {
|
|
1708
|
+
className: "flex flex-row items-center gap-1"
|
|
1709
|
+
}, children), " ", /* @__PURE__ */ React22.createElement("svg", {
|
|
1710
|
+
"aria-label": "Chevron Right Icon",
|
|
1711
|
+
stroke: "currentColor",
|
|
1712
|
+
fill: "currentColor",
|
|
1713
|
+
"stroke-width": "0",
|
|
1714
|
+
viewBox: "0 0 16 16",
|
|
1715
|
+
height: "1em",
|
|
1716
|
+
width: "1em",
|
|
1717
|
+
className: cn(props.dir === "rtl" ? "rotate-180" : "")
|
|
1718
|
+
}, /* @__PURE__ */ React22.createElement("path", {
|
|
1719
|
+
"fill-rule": "evenodd",
|
|
1720
|
+
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"
|
|
1721
|
+
})));
|
|
1722
|
+
});
|
|
1723
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1724
|
+
var DropdownMenuSubContent = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1725
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1726
|
+
"className"
|
|
1727
|
+
]);
|
|
1728
|
+
return React22.createElement(DropdownMenuPrimitive.SubContent, _object_spread({
|
|
1729
|
+
ref: ref,
|
|
1730
|
+
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
1731
|
+
}, props));
|
|
1732
|
+
});
|
|
1733
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1734
|
+
var DropdownMenuContent = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1735
|
+
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
1736
|
+
"className",
|
|
1737
|
+
"sideOffset"
|
|
1738
|
+
]);
|
|
1739
|
+
return React22.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.Content, _object_spread({
|
|
1740
|
+
ref: ref,
|
|
1741
|
+
sideOffset: sideOffset,
|
|
1742
|
+
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
1743
|
+
}, props)));
|
|
1744
|
+
});
|
|
1745
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1746
|
+
var DropdownMenuItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1747
|
+
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
1748
|
+
"className",
|
|
1749
|
+
"inset"
|
|
1750
|
+
]);
|
|
1751
|
+
return React22.createElement(DropdownMenuPrimitive.Item, _object_spread({
|
|
1752
|
+
ref: ref,
|
|
1753
|
+
className: cn("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)
|
|
1754
|
+
}, props));
|
|
1755
|
+
});
|
|
1756
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1757
|
+
var DropdownMenuCheckboxItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1758
|
+
var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties(_param, [
|
|
1759
|
+
"className",
|
|
1760
|
+
"children",
|
|
1761
|
+
"checked"
|
|
1762
|
+
]);
|
|
1763
|
+
return React22.createElement(DropdownMenuPrimitive.CheckboxItem, _object_spread({
|
|
1764
|
+
ref: ref,
|
|
1765
|
+
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
1766
|
+
checked: checked
|
|
1767
|
+
}, props), /* @__PURE__ */ React22.createElement("span", {
|
|
1768
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1769
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React22.createElement("svg", {
|
|
1770
|
+
"aria-label": "Check Mark",
|
|
1771
|
+
stroke: "currentColor",
|
|
1772
|
+
fill: "currentColor",
|
|
1773
|
+
"stroke-width": "0",
|
|
1774
|
+
viewBox: "0 0 512 512",
|
|
1775
|
+
height: "0.60em",
|
|
1776
|
+
width: "0.60em"
|
|
1777
|
+
}, /* @__PURE__ */ React22.createElement("path", {
|
|
1778
|
+
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"
|
|
1779
|
+
})), " ")), children);
|
|
1780
|
+
});
|
|
1781
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1782
|
+
var DropdownMenuRadioItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1783
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1784
|
+
"className",
|
|
1785
|
+
"children"
|
|
1786
|
+
]);
|
|
1787
|
+
return React22.createElement(DropdownMenuPrimitive.RadioItem, _object_spread({
|
|
1788
|
+
ref: ref,
|
|
1789
|
+
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)
|
|
1790
|
+
}, props), /* @__PURE__ */ React22.createElement("span", {
|
|
1791
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1792
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React22.createElement("svg", {
|
|
1793
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1794
|
+
width: "24",
|
|
1795
|
+
"aria-label": "Circle",
|
|
1796
|
+
height: "24",
|
|
1797
|
+
viewBox: "0 0 24 24",
|
|
1798
|
+
fill: "none",
|
|
1799
|
+
stroke: "currentColor",
|
|
1800
|
+
"stroke-width": "2",
|
|
1801
|
+
"stroke-linecap": "round",
|
|
1802
|
+
"stroke-linejoin": "round",
|
|
1803
|
+
className: "h-2 w-2 fill-current"
|
|
1804
|
+
}, /* @__PURE__ */ React22.createElement("circle", {
|
|
1805
|
+
cx: "12",
|
|
1806
|
+
cy: "12",
|
|
1807
|
+
r: "10"
|
|
1808
|
+
})))), children);
|
|
1809
|
+
});
|
|
1810
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1811
|
+
var DropdownMenuLabel = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1812
|
+
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
1813
|
+
"className",
|
|
1814
|
+
"inset"
|
|
1815
|
+
]);
|
|
1816
|
+
return React22.createElement(DropdownMenuPrimitive.Label, _object_spread({
|
|
1817
|
+
ref: ref,
|
|
1818
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)
|
|
1819
|
+
}, props));
|
|
1820
|
+
});
|
|
1821
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1822
|
+
var DropdownMenuSeparator = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1823
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1824
|
+
"className"
|
|
1825
|
+
]);
|
|
1826
|
+
return React22.createElement(DropdownMenuPrimitive.Separator, _object_spread({
|
|
1827
|
+
ref: ref,
|
|
1828
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
1829
|
+
}, props));
|
|
1830
|
+
});
|
|
1831
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1832
|
+
var DropdownMenuShortcut = function(_param) {
|
|
1833
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1834
|
+
"className"
|
|
1835
|
+
]);
|
|
1836
|
+
return /* @__PURE__ */ React22.createElement("span", _object_spread({
|
|
1837
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className)
|
|
1838
|
+
}, props));
|
|
1839
|
+
};
|
|
1840
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1841
|
+
var DropdownMenu = function(param) {
|
|
1842
|
+
var trigger = param.trigger, items = param.items, direction = param.direction, onItemSelect = param.onItemSelect, sideOffset = param.sideOffset, side = param.side, className = param.className, triggerClassname = param.triggerClassname, align = param.align, alignOffset = param.alignOffset;
|
|
1843
|
+
return /* @__PURE__ */ React22.createElement(DropdownMenuRoot, {
|
|
1844
|
+
dir: direction
|
|
1845
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuTrigger, {
|
|
1846
|
+
className: triggerClassname
|
|
1847
|
+
}, trigger), /* @__PURE__ */ React22.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React22.createElement(DropdownMenuContent, {
|
|
1848
|
+
side: side,
|
|
1849
|
+
sideOffset: sideOffset,
|
|
1850
|
+
className: cn(className, "flex flex-col gap-1"),
|
|
1851
|
+
align: align,
|
|
1852
|
+
alignOffset: alignOffset
|
|
1853
|
+
}, items.map(function(item, index) {
|
|
1854
|
+
return item.subitems ? /* @__PURE__ */ React22.createElement(DropdownMenuSub, {
|
|
1855
|
+
key: index
|
|
1856
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuSubTrigger, {
|
|
1857
|
+
dir: direction
|
|
1858
|
+
}, item.icon && item.icon, item.label), /* @__PURE__ */ React22.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React22.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
|
|
1859
|
+
return /* @__PURE__ */ React22.createElement(DropdownMenuItem, {
|
|
1860
|
+
className: "flex flex-row gap-1",
|
|
1861
|
+
onSelect: function() {
|
|
1862
|
+
return subitem.action();
|
|
1863
|
+
},
|
|
1864
|
+
key: subIndex
|
|
1865
|
+
}, subitem.icon && subitem.icon, subitem.label);
|
|
1866
|
+
})))) : /* @__PURE__ */ React22.createElement(DropdownMenuItem, {
|
|
1867
|
+
className: "flex flex-row gap-1",
|
|
1868
|
+
key: index,
|
|
1869
|
+
onSelect: function() {
|
|
1870
|
+
return item.action();
|
|
1871
|
+
}
|
|
1872
|
+
}, item.icon && item.icon, item.label);
|
|
1873
|
+
}))));
|
|
1874
|
+
};
|
|
1805
1875
|
// src/elements/HawaTable.tsx
|
|
1876
|
+
var ChevronIcon = function() {
|
|
1877
|
+
return /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1878
|
+
"aria-label": "Chevron Right Icon",
|
|
1879
|
+
stroke: "currentColor",
|
|
1880
|
+
fill: "currentColor",
|
|
1881
|
+
"stroke-width": "0",
|
|
1882
|
+
viewBox: "0 0 16 16",
|
|
1883
|
+
height: "1em",
|
|
1884
|
+
width: "1em"
|
|
1885
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1886
|
+
"fill-rule": "evenodd",
|
|
1887
|
+
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"
|
|
1888
|
+
}));
|
|
1889
|
+
};
|
|
1806
1890
|
var HawaTable = function(_param) {
|
|
1807
1891
|
var _param_size = _param.size, size = _param_size === void 0 ? "normal" : _param_size, _param_bodyColor = _param.bodyColor, bodyColor = _param_bodyColor === void 0 ? "white" : _param_bodyColor, _param_headerColor = _param.headerColor, headerColor = _param_headerColor === void 0 ? "gray-200" : _param_headerColor, _param_borders = _param.borders, borders = _param_borders === void 0 ? "all" : _param_borders, _param_highlightFirst = _param.highlightFirst, highlightFirst = _param_highlightFirst === void 0 ? false : _param_highlightFirst, _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, _param_bordersWidth = _param.bordersWidth, bordersWidth = _param_bordersWidth === void 0 ? "1" : _param_bordersWidth, _param_pagination = _param.pagination, pagination = _param_pagination === void 0 ? true : _param_pagination, props = _object_without_properties(_param, [
|
|
1808
1892
|
"size",
|
|
@@ -1815,13 +1899,19 @@ var HawaTable = function(_param) {
|
|
|
1815
1899
|
"pagination"
|
|
1816
1900
|
]);
|
|
1817
1901
|
var _props_texts, _props_texts1, _slice, _props_texts2, _range, _range1, _range2, _props_texts3, _props_texts4, _props_texts5, _props_texts6, _props_texts7, _props_texts8;
|
|
1818
|
-
var _ref = _sliced_to_array((0,
|
|
1819
|
-
var _ref1 = _sliced_to_array((0,
|
|
1820
|
-
var _ref2 = _sliced_to_array((0,
|
|
1821
|
-
var _ref3 = _sliced_to_array((0,
|
|
1822
|
-
var _ref4 = _sliced_to_array((0,
|
|
1823
|
-
var _ref5 = _sliced_to_array((0,
|
|
1824
|
-
var _ref6 = _sliced_to_array((0,
|
|
1902
|
+
var _ref = _sliced_to_array((0, import_react19.useState)(10), 2), perPage = _ref[0], setPerPage = _ref[1];
|
|
1903
|
+
var _ref1 = _sliced_to_array((0, import_react19.useState)(null), 2), enteredPage = _ref1[0], setEnteredPage = _ref1[1];
|
|
1904
|
+
var _ref2 = _sliced_to_array((0, import_react19.useState)(1), 2), page = _ref2[0], setPage = _ref2[1];
|
|
1905
|
+
var _ref3 = _sliced_to_array((0, import_react19.useState)(null), 2), sortingCol = _ref3[0], setSortingCol = _ref3[1];
|
|
1906
|
+
var _ref4 = _sliced_to_array((0, import_react19.useState)(props.rows), 2), sortedRows = _ref4[0], setSortedRows = _ref4[1];
|
|
1907
|
+
var _ref5 = _sliced_to_array((0, import_react19.useState)(null), 2), sortColumn = _ref5[0], setSortColumn = _ref5[1];
|
|
1908
|
+
var _ref6 = _sliced_to_array((0, import_react19.useState)(null), 2), sortDirection = _ref6[0], setSortDirection = _ref6[1];
|
|
1909
|
+
var _useTable_default = useTable_default(props.rows, page, perPage, sortColumn, sortDirection), slice = _useTable_default.slice, range = _useTable_default.range;
|
|
1910
|
+
var isRTL = direction === "rtl";
|
|
1911
|
+
var sizeStyles2 = {
|
|
1912
|
+
normal: "py-3 px-6",
|
|
1913
|
+
small: "px-3 py-1"
|
|
1914
|
+
};
|
|
1825
1915
|
var handleSort = function(colIndex, sortable) {
|
|
1826
1916
|
if (sortable) {
|
|
1827
1917
|
setSortColumn(colIndex);
|
|
@@ -1830,12 +1920,6 @@ var HawaTable = function(_param) {
|
|
|
1830
1920
|
});
|
|
1831
1921
|
}
|
|
1832
1922
|
};
|
|
1833
|
-
var _useTable_default = useTable_default(props.rows, page, perPage, sortColumn, sortDirection), slice = _useTable_default.slice, range = _useTable_default.range;
|
|
1834
|
-
var isRTL = direction === "rtl";
|
|
1835
|
-
var sizeStyles2 = {
|
|
1836
|
-
normal: "py-3 px-6",
|
|
1837
|
-
small: "px-3 py-1"
|
|
1838
|
-
};
|
|
1839
1923
|
var changePage = function() {
|
|
1840
1924
|
var _slice;
|
|
1841
1925
|
if (((_slice = slice) === null || _slice === void 0 ? void 0 : _slice.length) < 1 && page !== 1) {
|
|
@@ -1845,21 +1929,21 @@ var HawaTable = function(_param) {
|
|
|
1845
1929
|
setPage(enteredPage);
|
|
1846
1930
|
}
|
|
1847
1931
|
};
|
|
1848
|
-
(0,
|
|
1932
|
+
(0, import_react19.useEffect)(function() {
|
|
1849
1933
|
changePage();
|
|
1850
1934
|
}, [
|
|
1851
1935
|
slice,
|
|
1852
1936
|
page
|
|
1853
1937
|
]);
|
|
1854
1938
|
var _props_texts_filter, _props_texts_actions, _props_texts_noData, _props_texts_items, _props_texts_page, _props_texts_page1, _props_texts_page2, _props_texts_page3, _props_texts_page4;
|
|
1855
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1856
1940
|
className: "relative flex flex-col gap-2 "
|
|
1857
|
-
}, /* @__PURE__ */
|
|
1941
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1858
1942
|
className: "overflow-x-auto rounded bg-".concat(headerColor)
|
|
1859
|
-
}, props.headerTools && /* @__PURE__ */
|
|
1943
|
+
}, props.headerTools && /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1860
1944
|
className: "flex flex-row items-center justify-between gap-2 border bg-background px-4 py-2"
|
|
1861
|
-
}, /* @__PURE__ */
|
|
1862
|
-
icon: /* @__PURE__ */
|
|
1945
|
+
}, /* @__PURE__ */ import_react19.default.createElement(HawaTextField, {
|
|
1946
|
+
icon: /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1863
1947
|
"aria-label": "Search Icon",
|
|
1864
1948
|
stroke: "currentColor",
|
|
1865
1949
|
fill: "gray",
|
|
@@ -1867,67 +1951,66 @@ var HawaTable = function(_param) {
|
|
|
1867
1951
|
viewBox: "0 0 512 512",
|
|
1868
1952
|
height: "1em",
|
|
1869
1953
|
width: "1em"
|
|
1870
|
-
}, /* @__PURE__ */
|
|
1954
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1871
1955
|
d: "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"
|
|
1872
1956
|
})),
|
|
1873
1957
|
placeholder: "Search",
|
|
1874
1958
|
width: "full",
|
|
1875
1959
|
margin: "none"
|
|
1876
|
-
}), /* @__PURE__ */
|
|
1960
|
+
}), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1877
1961
|
className: "flex flex-row items-center justify-between gap-2"
|
|
1878
|
-
}, /* @__PURE__ */
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
}, /* @__PURE__ */ import_react20.default.createElement("tr", null, props.columns.map(function(col, i) {
|
|
1962
|
+
}, /* @__PURE__ */ import_react19.default.createElement(Button, {
|
|
1963
|
+
className: "flex flex-row gap-2"
|
|
1964
|
+
}, /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1965
|
+
"aria-label": "Filter Icon",
|
|
1966
|
+
stroke: "currentColor",
|
|
1967
|
+
fill: "currentColor",
|
|
1968
|
+
"stroke-width": "0",
|
|
1969
|
+
viewBox: "0 0 16 16",
|
|
1970
|
+
height: "1em",
|
|
1971
|
+
width: "1em"
|
|
1972
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1973
|
+
d: "M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"
|
|
1974
|
+
})), (_props_texts_filter = (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.filter) !== null && _props_texts_filter !== void 0 ? _props_texts_filter : "Filter", /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1975
|
+
"aria-label": "Chevron Right Icon",
|
|
1976
|
+
stroke: "currentColor",
|
|
1977
|
+
fill: "currentColor",
|
|
1978
|
+
"stroke-width": "0",
|
|
1979
|
+
viewBox: "0 0 16 16",
|
|
1980
|
+
height: "1em",
|
|
1981
|
+
width: "1em"
|
|
1982
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1983
|
+
"fill-rule": "evenodd",
|
|
1984
|
+
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"
|
|
1985
|
+
}))))), /* @__PURE__ */ import_react19.default.createElement("table", {
|
|
1986
|
+
className: (0, import_clsx12.default)(borders === "outer" || borders === "all" ? "outline outline-[".concat(bordersWidth, "px] -outline-offset-1 outline-gray-300 dark:outline-gray-700") : "", "w-full rounded text-left text-sm text-gray-500 dark:text-gray-400", "bg-".concat(headerColor))
|
|
1987
|
+
}, /* @__PURE__ */ import_react19.default.createElement("thead", {
|
|
1988
|
+
className: (0, import_clsx12.default)("text-xs uppercase text-gray-700 dark:bg-gray-700 dark:text-gray-400", borders === "rows" || borders === "all" || borders === "inner" ? "border-b " : "")
|
|
1989
|
+
}, /* @__PURE__ */ import_react19.default.createElement("tr", null, props.columns.map(function(col, i) {
|
|
1907
1990
|
if (col.hidden) {
|
|
1908
1991
|
return;
|
|
1909
1992
|
} else {
|
|
1910
|
-
return /* @__PURE__ */
|
|
1993
|
+
return /* @__PURE__ */ import_react19.default.createElement("th", {
|
|
1911
1994
|
onClick: function() {
|
|
1912
1995
|
return col.sortable && handleSort(i, col.sortable);
|
|
1913
1996
|
},
|
|
1914
1997
|
key: i,
|
|
1915
1998
|
scope: "col",
|
|
1916
1999
|
colSpan: 2,
|
|
1917
|
-
className: (0,
|
|
1918
|
-
}, col.value, sortColumn === i && /* @__PURE__ */
|
|
2000
|
+
className: (0, import_clsx12.default)(col.sortable ? "cursor-pointer hover:bg-gray-300" : "", sizeStyles2[size], i !== 0 && (borders === "cols" || borders === "all" || borders === "inner") ? "border-r border-r-[".concat(bordersWidth, "px] border-l border-l-[").concat(bordersWidth, "px]") : "")
|
|
2001
|
+
}, col.value, sortColumn === i && /* @__PURE__ */ import_react19.default.createElement("span", null, sortDirection === "asc" ? " ▲" : " ▼"));
|
|
1919
2002
|
}
|
|
1920
|
-
}), props.actions ? /* @__PURE__ */
|
|
2003
|
+
}), props.actions ? /* @__PURE__ */ import_react19.default.createElement("th", {
|
|
1921
2004
|
scope: "col",
|
|
1922
|
-
className: (0,
|
|
1923
|
-
}, (_props_texts_actions = (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.actions) !== null && _props_texts_actions !== void 0 ? _props_texts_actions : "Actions") : null)), /* @__PURE__ */
|
|
2005
|
+
className: (0, import_clsx12.default)(sizeStyles2[size], "w-[calc(1%)] text-center")
|
|
2006
|
+
}, (_props_texts_actions = (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.actions) !== null && _props_texts_actions !== void 0 ? _props_texts_actions : "Actions") : null)), /* @__PURE__ */ import_react19.default.createElement("tbody", {
|
|
1924
2007
|
className: bodyColor && props.rows ? "bg-".concat(bodyColor) : "bg-transparent"
|
|
1925
2008
|
}, sortedRows ? (_slice = slice) === null || _slice === void 0 ? void 0 : _slice.map(function(singleRow, rowIndex) {
|
|
1926
2009
|
var _slice, _singleRow;
|
|
1927
2010
|
var lastRow = rowIndex == ((_slice = slice) === null || _slice === void 0 ? void 0 : _slice.length) - 1;
|
|
1928
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ import_react19.default.createElement("tr", {
|
|
1929
2012
|
key: rowIndex,
|
|
1930
|
-
className: (0,
|
|
2013
|
+
className: (0, import_clsx12.default)(" dark:border-gray-700 dark:bg-gray-800", props.clickable ? "hover:bg-gray-100" : "", !lastRow && (borders === "all" || borders === "rows" || borders === "inner") ? "border-b border-b-[".concat(bordersWidth, "px]") : "")
|
|
1931
2014
|
}, (_singleRow = singleRow) === null || _singleRow === void 0 ? void 0 : _singleRow.map(function(r, i) {
|
|
1932
2015
|
var _singleRow;
|
|
1933
2016
|
var firstCell = i === 0;
|
|
@@ -1939,87 +2022,66 @@ var HawaTable = function(_param) {
|
|
|
1939
2022
|
if (r.hidden) {
|
|
1940
2023
|
return;
|
|
1941
2024
|
} else {
|
|
1942
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1943
2026
|
colSpan: 2,
|
|
1944
2027
|
key: i,
|
|
1945
|
-
className: (0,
|
|
2028
|
+
className: (0, import_clsx12.default)(// borders === "outer" ? "border" : "",
|
|
1946
2029
|
sizeStyles2[size], highlightFirst && firstCell ? "font-bold" : "font-normal", isRTLFirstCell ? "rounded-bl-none rounded-br" : isRTLLastCell ? "rounded-bl rounded-br-none" : isLTRFirstCell ? "rounded-bl rounded-br-none" : isLTRLastCell ? "rounded-bl-none rounded-br" : "", !firstCell && !lastCell && (borders === "cols" || borders === "inner" || borders === "all") ? "border-l border-l-[".concat(bordersWidth, "px] border-r border-r-[").concat(bordersWidth, "px]") : !firstCell && props.actions && (borders === "cols" || borders === "inner" || borders === "all") ? "border-l border-l-[".concat(bordersWidth, "px] border-r border-r-[").concat(bordersWidth, "px]") : "")
|
|
1947
2030
|
}, r.value, " ", r.suffix && r.suffix);
|
|
1948
2031
|
}
|
|
1949
|
-
}), props.actions
|
|
2032
|
+
}), props.actions && /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1950
2033
|
align: isRTL ? "right" : "left",
|
|
1951
|
-
className: (
|
|
2034
|
+
className: cn(isRTL && lastRow && "rounded-bl rounded-br-none", !isRTL && lastRow && "rounded-bl-none rounded-br"),
|
|
1952
2035
|
colSpan: 1
|
|
1953
|
-
}, /* @__PURE__ */
|
|
2036
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1954
2037
|
className: "flex items-center justify-center"
|
|
1955
|
-
}, /* @__PURE__ */
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
}, /* @__PURE__ */ import_react20.default.createElement("path", {
|
|
1975
|
-
d: "M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"
|
|
1976
|
-
})))))) : /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
1977
|
-
className: "flex flex-row items-center justify-center gap-2 p-1"
|
|
1978
|
-
}, props.actions[0].map(function(act) {
|
|
1979
|
-
return /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
1980
|
-
className: " p-1 transition-all hover:bg-gray-100"
|
|
1981
|
-
}, act.icon);
|
|
1982
|
-
})) : null);
|
|
1983
|
-
}) : /* @__PURE__ */ import_react20.default.createElement("tr", {
|
|
2038
|
+
}, /* @__PURE__ */ import_react19.default.createElement(DropdownMenu, {
|
|
2039
|
+
direction: direction,
|
|
2040
|
+
side: "right",
|
|
2041
|
+
items: props.actions,
|
|
2042
|
+
trigger: /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2043
|
+
className: "flex w-fit cursor-pointer items-center justify-center rounded p-2 hover:bg-gray-200 dark:hover:bg-gray-600"
|
|
2044
|
+
}, /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
2045
|
+
"aria-label": "Vertical Three Dots Menu Icon",
|
|
2046
|
+
stroke: "currentColor",
|
|
2047
|
+
fill: "currentColor",
|
|
2048
|
+
"stroke-width": "0",
|
|
2049
|
+
viewBox: "0 0 16 16",
|
|
2050
|
+
height: "1em",
|
|
2051
|
+
width: "1em"
|
|
2052
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
2053
|
+
d: "M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"
|
|
2054
|
+
})))
|
|
2055
|
+
}))));
|
|
2056
|
+
}) : /* @__PURE__ */ import_react19.default.createElement("tr", {
|
|
1984
2057
|
className: "bg-transparent"
|
|
1985
|
-
}, /* @__PURE__ */
|
|
2058
|
+
}, /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1986
2059
|
colSpan: 20
|
|
1987
|
-
}, /* @__PURE__ */
|
|
1988
|
-
className: (0,
|
|
2060
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2061
|
+
className: (0, import_clsx12.default)("w-full rounded-b border p-5 text-center", // bodyColor ? `bg-${bodyColor}` : "bg-background"
|
|
1989
2062
|
"bg-background")
|
|
1990
|
-
}, (_props_texts_noData = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.noData) !== null && _props_texts_noData !== void 0 ? _props_texts_noData : "No Data")))))), pagination && /* @__PURE__ */
|
|
2063
|
+
}, (_props_texts_noData = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.noData) !== null && _props_texts_noData !== void 0 ? _props_texts_noData : "No Data")))))), pagination && /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1991
2064
|
className: "flex flex-row items-center justify-between "
|
|
1992
|
-
}, range.length > 1 ? /* @__PURE__ */
|
|
2065
|
+
}, range.length > 1 ? /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1993
2066
|
className: "flex w-fit flex-row items-stretch justify-center gap-2 overflow-clip rounded "
|
|
1994
|
-
}, /* @__PURE__ */
|
|
1995
|
-
className: (
|
|
2067
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2068
|
+
className: cn("flex h-6 w-6 rotate-180 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10", direction === "rtl" && "rotate-0"),
|
|
1996
2069
|
onClick: function() {
|
|
1997
2070
|
return page <= 1 ? setPage(range.length) : setPage(page - 1);
|
|
1998
2071
|
}
|
|
1999
|
-
}, /* @__PURE__ */
|
|
2000
|
-
"aria-label": "Chevron Right Icon",
|
|
2001
|
-
stroke: "currentColor",
|
|
2002
|
-
fill: "currentColor",
|
|
2003
|
-
"stroke-width": "0",
|
|
2004
|
-
viewBox: "0 0 16 16",
|
|
2005
|
-
height: "1em",
|
|
2006
|
-
width: "1em"
|
|
2007
|
-
}, /* @__PURE__ */ import_react20.default.createElement("path", {
|
|
2008
|
-
"fill-rule": "evenodd",
|
|
2009
|
-
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"
|
|
2010
|
-
}))), /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
2072
|
+
}, /* @__PURE__ */ import_react19.default.createElement(ChevronIcon, null)), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2011
2073
|
className: "flex flex-row items-center overflow-clip rounded transition-all"
|
|
2012
2074
|
}, range.length > 6 && range.map(function(el, index) {
|
|
2013
2075
|
if (index <= 0) {
|
|
2014
|
-
return /* @__PURE__ */
|
|
2076
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2015
2077
|
key: index,
|
|
2016
|
-
className: (0,
|
|
2078
|
+
className: (0, import_clsx12.default)("w-10 p-1 text-xs hover:bg-gray-200", page === el ? "bg-primary text-primary-foreground hover:bg-primary" : "bg-gray-100"),
|
|
2017
2079
|
onClick: function() {
|
|
2018
2080
|
return setPage(el);
|
|
2019
2081
|
}
|
|
2020
2082
|
}, el);
|
|
2021
2083
|
}
|
|
2022
|
-
}), ((_range = range) === null || _range === void 0 ? void 0 : _range.length) > 6 && /* @__PURE__ */
|
|
2084
|
+
}), ((_range = range) === null || _range === void 0 ? void 0 : _range.length) > 6 && /* @__PURE__ */ import_react19.default.createElement("input", {
|
|
2023
2085
|
type: "text",
|
|
2024
2086
|
className: " w-10 bg-gray-100 p-1 text-center text-xs",
|
|
2025
2087
|
defaultValue: page !== 0 || page !== range.length - 1 ? page : "...",
|
|
@@ -2035,118 +2097,112 @@ var HawaTable = function(_param) {
|
|
|
2035
2097
|
}
|
|
2036
2098
|
}), ((_range1 = range) === null || _range1 === void 0 ? void 0 : _range1.length) > 6 && range.map(function(el, index) {
|
|
2037
2099
|
if (index >= range.length - 1) {
|
|
2038
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2039
2101
|
key: index,
|
|
2040
|
-
className: (0,
|
|
2102
|
+
className: (0, import_clsx12.default)("w-10 p-1 text-xs hover:bg-gray-200", page === el ? "bg-primary text-primary-foreground hover:bg-primary" : "bg-gray-100"),
|
|
2041
2103
|
onClick: function() {
|
|
2042
2104
|
return setPage(el);
|
|
2043
2105
|
}
|
|
2044
2106
|
}, el);
|
|
2045
2107
|
}
|
|
2046
2108
|
}), ((_range2 = range) === null || _range2 === void 0 ? void 0 : _range2.length) <= 6 && range.map(function(el, index) {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2048
2110
|
key: index,
|
|
2049
|
-
className: (0,
|
|
2111
|
+
className: (0, import_clsx12.default)("w-10 p-1 text-xs", page === el ? "bg-primary text-primary-foreground " : "border bg-background hover:bg-primary/10 dark:hover:bg-primary/10", // Check if the direction is 'rtl'
|
|
2112
|
+
direction === "rtl" ? // If direction is 'rtl', then check for the index conditions
|
|
2113
|
+
// and apply respective classes along with the 'something' class
|
|
2114
|
+
index === 0 ? "rounded-r border-l-0" : index === range.length - 1 ? "rounded-l border-r-0" : "" : // If direction is not 'rtl', then again check for the index conditions
|
|
2115
|
+
// and apply respective classes along with the 'something else' class
|
|
2116
|
+
index === 0 ? "rounded-l border-r-0" : index === range.length - 1 ? "rounded-r border-l-0" : ""),
|
|
2050
2117
|
onClick: function() {
|
|
2051
2118
|
return setPage(el);
|
|
2052
2119
|
}
|
|
2053
2120
|
}, el);
|
|
2054
|
-
})), /* @__PURE__ */
|
|
2121
|
+
})), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2055
2122
|
onClick: function() {
|
|
2056
2123
|
return page >= range.length ? setPage(1) : setPage(page + 1);
|
|
2057
2124
|
},
|
|
2058
|
-
className: (
|
|
2059
|
-
}, /* @__PURE__ */
|
|
2060
|
-
"aria-label": "Chevron Right Icon",
|
|
2061
|
-
stroke: "currentColor",
|
|
2062
|
-
fill: "currentColor",
|
|
2063
|
-
"stroke-width": "0",
|
|
2064
|
-
viewBox: "0 0 16 16",
|
|
2065
|
-
height: "1em",
|
|
2066
|
-
width: "1em"
|
|
2067
|
-
}, /* @__PURE__ */ import_react20.default.createElement("path", {
|
|
2068
|
-
"fill-rule": "evenodd",
|
|
2069
|
-
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"
|
|
2070
|
-
})))) : /* @__PURE__ */ import_react20.default.createElement("div", null), props.rows ? /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
2125
|
+
className: cn("flex h-6 w-6 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10", direction === "rtl" && "rotate-180")
|
|
2126
|
+
}, /* @__PURE__ */ import_react19.default.createElement(ChevronIcon, null))) : /* @__PURE__ */ import_react19.default.createElement("div", null), props.rows ? /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2071
2127
|
className: "flex w-fit flex-row items-center gap-2 "
|
|
2072
|
-
}, /* @__PURE__ */
|
|
2128
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2073
2129
|
className: "text-xs "
|
|
2074
|
-
}, props.rows.length, " ", (_props_texts_items = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.items) !== null && _props_texts_items !== void 0 ? _props_texts_items : "Items"), /* @__PURE__ */
|
|
2130
|
+
}, props.rows.length, " ", (_props_texts_items = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.items) !== null && _props_texts_items !== void 0 ? _props_texts_items : "Items"), /* @__PURE__ */ import_react19.default.createElement("select", {
|
|
2075
2131
|
value: perPage,
|
|
2076
2132
|
className: "h-6 cursor-pointer rounded border bg-background px-2 text-xs",
|
|
2077
2133
|
onChange: function(e) {
|
|
2078
2134
|
setPerPage(parseInt(e.target.value));
|
|
2079
2135
|
}
|
|
2080
|
-
}, /* @__PURE__ */
|
|
2136
|
+
}, /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2081
2137
|
value: 10,
|
|
2082
2138
|
style: {
|
|
2083
2139
|
fontSize: 10
|
|
2084
2140
|
}
|
|
2085
|
-
}, "10 / ", (_props_texts_page = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.page) !== null && _props_texts_page !== void 0 ? _props_texts_page : "Page"), /* @__PURE__ */
|
|
2141
|
+
}, "10 / ", (_props_texts_page = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.page) !== null && _props_texts_page !== void 0 ? _props_texts_page : "Page"), /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2086
2142
|
value: 20,
|
|
2087
2143
|
style: {
|
|
2088
2144
|
fontSize: 10
|
|
2089
2145
|
}
|
|
2090
|
-
}, "20 / ", (_props_texts_page1 = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.page) !== null && _props_texts_page1 !== void 0 ? _props_texts_page1 : "Page"), /* @__PURE__ */
|
|
2146
|
+
}, "20 / ", (_props_texts_page1 = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.page) !== null && _props_texts_page1 !== void 0 ? _props_texts_page1 : "Page"), /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2091
2147
|
value: 30,
|
|
2092
2148
|
style: {
|
|
2093
2149
|
fontSize: 10
|
|
2094
2150
|
}
|
|
2095
|
-
}, "30 / ", (_props_texts_page2 = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.page) !== null && _props_texts_page2 !== void 0 ? _props_texts_page2 : "Page"), /* @__PURE__ */
|
|
2151
|
+
}, "30 / ", (_props_texts_page2 = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.page) !== null && _props_texts_page2 !== void 0 ? _props_texts_page2 : "Page"), /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2096
2152
|
value: 50,
|
|
2097
2153
|
style: {
|
|
2098
2154
|
fontSize: 10
|
|
2099
2155
|
}
|
|
2100
|
-
}, "50 / ", (_props_texts_page3 = (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.page) !== null && _props_texts_page3 !== void 0 ? _props_texts_page3 : "Page"), /* @__PURE__ */
|
|
2156
|
+
}, "50 / ", (_props_texts_page3 = (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.page) !== null && _props_texts_page3 !== void 0 ? _props_texts_page3 : "Page"), /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2101
2157
|
value: 100,
|
|
2102
2158
|
style: {
|
|
2103
2159
|
fontSize: 10
|
|
2104
2160
|
}
|
|
2105
|
-
}, "100 / ", (_props_texts_page4 = (_props_texts8 = props.texts) === null || _props_texts8 === void 0 ? void 0 : _props_texts8.page) !== null && _props_texts_page4 !== void 0 ? _props_texts_page4 : "Page"))) : /* @__PURE__ */
|
|
2161
|
+
}, "100 / ", (_props_texts_page4 = (_props_texts8 = props.texts) === null || _props_texts8 === void 0 ? void 0 : _props_texts8.page) !== null && _props_texts_page4 !== void 0 ? _props_texts_page4 : "Page"))) : /* @__PURE__ */ import_react19.default.createElement("div", null)));
|
|
2106
2162
|
};
|
|
2107
2163
|
// src/elements/HawaSearchBar.tsx
|
|
2108
|
-
var
|
|
2164
|
+
var import_react20 = __toESM(require("react"));
|
|
2109
2165
|
var HawaSearchBar = function(props) {
|
|
2110
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ import_react20.default.createElement(HawaTextField, _object_spread({
|
|
2111
2167
|
type: "search"
|
|
2112
2168
|
}, props));
|
|
2113
2169
|
};
|
|
2114
2170
|
// src/elements/HawaAccordion.tsx
|
|
2115
|
-
var
|
|
2116
|
-
var
|
|
2171
|
+
var import_react21 = __toESM(require("react"));
|
|
2172
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
2117
2173
|
var HawaAccordion = function(props) {
|
|
2118
|
-
var _ref = _sliced_to_array((0,
|
|
2119
|
-
return /* @__PURE__ */
|
|
2174
|
+
var _ref = _sliced_to_array((0, import_react21.useState)(false), 2), collapse = _ref[0], setCollapse = _ref[1];
|
|
2175
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
2120
2176
|
className: "h-fit w-full"
|
|
2121
|
-
}, /* @__PURE__ */
|
|
2177
|
+
}, /* @__PURE__ */ import_react21.default.createElement("button", {
|
|
2122
2178
|
id: "accordion-collapse-heading-" + props.index,
|
|
2123
2179
|
type: "button",
|
|
2124
|
-
className: (0,
|
|
2180
|
+
className: (0, import_clsx13.default)(collapse ? "rounded" : "rounded-t", "flex w-full items-center justify-between border border-gray-200 bg-gray-100 p-5 text-left font-medium text-gray-900 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-800 dark:focus:ring-gray-800"),
|
|
2125
2181
|
onClick: function() {
|
|
2126
2182
|
return setCollapse(!collapse);
|
|
2127
2183
|
},
|
|
2128
2184
|
"data-accordion-target": "#accordion-collapse-body-" + props.index,
|
|
2129
2185
|
"aria-expanded": "true",
|
|
2130
2186
|
"aria-controls": "accordion-collapse-body-" + props.index
|
|
2131
|
-
}, /* @__PURE__ */
|
|
2187
|
+
}, /* @__PURE__ */ import_react21.default.createElement("span", null, props.title), /* @__PURE__ */ import_react21.default.createElement("svg", {
|
|
2132
2188
|
"data-accordion-icon": "",
|
|
2133
2189
|
className: "h-6 w-6 ".concat(collapse ? "" : "rotate-180", " shrink-0 transition-all"),
|
|
2134
2190
|
fill: "currentColor",
|
|
2135
2191
|
viewBox: "0 0 20 20"
|
|
2136
|
-
}, /* @__PURE__ */
|
|
2192
|
+
}, /* @__PURE__ */ import_react21.default.createElement("path", {
|
|
2137
2193
|
fillRule: "evenodd",
|
|
2138
2194
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
2139
2195
|
clipRule: "evenodd"
|
|
2140
|
-
}))), /* @__PURE__ */
|
|
2196
|
+
}))), /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
2141
2197
|
id: "accordion-collapse-body-" + props.index,
|
|
2142
2198
|
"aria-labelledby": "accordion-collapse-heading-" + props.index,
|
|
2143
|
-
className: (0,
|
|
2144
|
-
}, /* @__PURE__ */
|
|
2199
|
+
className: (0, import_clsx13.default)(collapse ? "invisible hidden h-0 p-0" : "visible h-full", "w-full rounded-b border border-t-0 border-gray-200 p-5 font-light dark:border-gray-700 dark:bg-gray-900")
|
|
2200
|
+
}, /* @__PURE__ */ import_react21.default.createElement("p", {
|
|
2145
2201
|
className: "mb-2 text-gray-500 dark:text-gray-400"
|
|
2146
2202
|
}, props.content)));
|
|
2147
2203
|
};
|
|
2148
2204
|
// src/elements/HawaPhoneInput.tsx
|
|
2149
|
-
var
|
|
2205
|
+
var import_react22 = __toESM(require("react"));
|
|
2150
2206
|
// src/countries.ts
|
|
2151
2207
|
var countries = [
|
|
2152
2208
|
{
|
|
@@ -3849,7 +3905,7 @@ var Menu2 = function(_param) {
|
|
|
3849
3905
|
"innerProps",
|
|
3850
3906
|
"innerRef"
|
|
3851
3907
|
]);
|
|
3852
|
-
return /* @__PURE__ */
|
|
3908
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", _object_spread({
|
|
3853
3909
|
className: "absolute z-50 w-[190px] rounded border bg-background",
|
|
3854
3910
|
ref: innerRef
|
|
3855
3911
|
}, innerProps), children);
|
|
@@ -3862,28 +3918,28 @@ var Option2 = function(_param) /* @__PURE__ */ {
|
|
|
3862
3918
|
"innerProps",
|
|
3863
3919
|
"innerRef"
|
|
3864
3920
|
]);
|
|
3865
|
-
return
|
|
3921
|
+
return import_react22.default.createElement("div", _object_spread({
|
|
3866
3922
|
ref: innerRef,
|
|
3867
3923
|
className: "m-2 flex cursor-pointer flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground"
|
|
3868
|
-
}, innerProps), /* @__PURE__ */
|
|
3924
|
+
}, innerProps), /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3869
3925
|
className: "flex flex-row items-center justify-center gap-1"
|
|
3870
|
-
}, /* @__PURE__ */
|
|
3926
|
+
}, /* @__PURE__ */ import_react22.default.createElement("img", {
|
|
3871
3927
|
className: "h-8 w-8",
|
|
3872
3928
|
src: props.data.image
|
|
3873
|
-
}), /* @__PURE__ */
|
|
3929
|
+
}), /* @__PURE__ */ import_react22.default.createElement("span", {
|
|
3874
3930
|
className: "text-[10px]"
|
|
3875
3931
|
}, props.data.country_label)), children);
|
|
3876
3932
|
};
|
|
3877
3933
|
var HawaPhoneInput = function(props) {
|
|
3878
|
-
var _ref = _sliced_to_array((0,
|
|
3879
|
-
return /* @__PURE__ */
|
|
3934
|
+
var _ref = _sliced_to_array((0, import_react22.useState)("+966"), 2), selectedCountry = _ref[0], setSelectedCountry = _ref[1];
|
|
3935
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3880
3936
|
className: "mb-3 flex flex-col"
|
|
3881
|
-
}, props.label && /* @__PURE__ */
|
|
3937
|
+
}, props.label && /* @__PURE__ */ import_react22.default.createElement("label", {
|
|
3882
3938
|
className: "mb-2 block text-sm font-medium"
|
|
3883
|
-
}, props.label), /* @__PURE__ */
|
|
3939
|
+
}, props.label), /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3884
3940
|
dir: "ltr",
|
|
3885
3941
|
className: "flex flex-row "
|
|
3886
|
-
}, /* @__PURE__ */
|
|
3942
|
+
}, /* @__PURE__ */ import_react22.default.createElement(import_react_select2.default, {
|
|
3887
3943
|
classNames: {
|
|
3888
3944
|
// container: () => "cursor-pointer z-10 border rounded-l bg-background",
|
|
3889
3945
|
control: function() {
|
|
@@ -3946,17 +4002,17 @@ var HawaPhoneInput = function(props) {
|
|
|
3946
4002
|
onChange: function(newValue, action) {
|
|
3947
4003
|
return setSelectedCountry(newValue);
|
|
3948
4004
|
}
|
|
3949
|
-
}), /* @__PURE__ */
|
|
4005
|
+
}), /* @__PURE__ */ import_react22.default.createElement("input", {
|
|
3950
4006
|
onChange: props.handleChange,
|
|
3951
4007
|
type: "number",
|
|
3952
4008
|
placeholder: "531045453",
|
|
3953
4009
|
className: "block w-full rounded-r border bg-background p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500"
|
|
3954
|
-
}), props.helperText && /* @__PURE__ */
|
|
4010
|
+
}), props.helperText && /* @__PURE__ */ import_react22.default.createElement("p", {
|
|
3955
4011
|
className: "mb-1 mt-1 text-xs text-red-600 dark:text-red-500"
|
|
3956
4012
|
}, props.helperText)));
|
|
3957
4013
|
};
|
|
3958
4014
|
// src/elements/HawaTabs.tsx
|
|
3959
|
-
var
|
|
4015
|
+
var import_react23 = __toESM(require("react"));
|
|
3960
4016
|
var HawaTabs = function(_param) {
|
|
3961
4017
|
var _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, _param_width = _param.width, width = _param_width === void 0 ? "normal" : _param_width, _param_marginBetween = _param.marginBetween, marginBetween = _param_marginBetween === void 0 ? 0 : _param_marginBetween, _param_pill = _param.pill, pill = _param_pill === void 0 ? false : _param_pill, props = _object_without_properties(_param, [
|
|
3962
4018
|
"orientation",
|
|
@@ -3966,7 +4022,7 @@ var HawaTabs = function(_param) {
|
|
|
3966
4022
|
"pill"
|
|
3967
4023
|
]);
|
|
3968
4024
|
var _props_options_, _props_options;
|
|
3969
|
-
var _ref = _sliced_to_array((0,
|
|
4025
|
+
var _ref = _sliced_to_array((0, import_react23.useState)((_props_options_ = props.options[0]) === null || _props_options_ === void 0 ? void 0 : _props_options_.value), 2), selectedOption = _ref[0], setSelectedOption = _ref[1];
|
|
3970
4026
|
var activeTabStyle = {
|
|
3971
4027
|
vertical: "inline-block py-2 px-4 text-white bg-primary active",
|
|
3972
4028
|
horizontal: "inline-block py-2 px-4 text-white bg-primary active"
|
|
@@ -3997,10 +4053,10 @@ var HawaTabs = function(_param) {
|
|
|
3997
4053
|
vertical: "sticky top-2 h-fit flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400",
|
|
3998
4054
|
horizontal: "flex w-fit flex-wrap border-b-primary text-center text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
3999
4055
|
};
|
|
4000
|
-
return /* @__PURE__ */
|
|
4056
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4001
4057
|
dir: direction,
|
|
4002
4058
|
className: cn(containerStyle[orientation], props.options[selectedOption] ? "border-b-2" : "border-b-0")
|
|
4003
|
-
}, /* @__PURE__ */
|
|
4059
|
+
}, /* @__PURE__ */ import_react23.default.createElement("ul", {
|
|
4004
4060
|
className: cn("w-full border-primary", marginBetween ? orientation === "vertical" ? "mb-0" : "mb-" + marginBetween : "", marginBetween && direction === "rtl" ? "ml-" + marginBetween : "mr-" + marginBetween, tabsStyle[orientation], orientation === "horizontal" ? "grid grid-cols-3 gap-1 sm:flex sm:flex-row sm:gap-0 " : "", // orientation === "vertical"
|
|
4005
4061
|
// ? direction === "rtl"
|
|
4006
4062
|
// ? "rounded-none rounded-r border-l-2"
|
|
@@ -4008,7 +4064,7 @@ var HawaTabs = function(_param) {
|
|
|
4008
4064
|
// : "border-b-2",
|
|
4009
4065
|
widthStyles2[width], pill ? "gap-0.5 rounded border-none bg-gray-100 p-0.5" : orientation === "vertical" ? direction === "rtl" ? "rounded-none rounded-r border-l-2" : "rounded-none rounded-l border-r-2" : "border-b-0 sm:border-b-2")
|
|
4010
4066
|
}, (_props_options = props.options) === null || _props_options === void 0 ? void 0 : _props_options.map(function(opt, o) {
|
|
4011
|
-
return /* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ import_react23.default.createElement("button", {
|
|
4012
4068
|
key: o,
|
|
4013
4069
|
"aria-current": "page",
|
|
4014
4070
|
onClick: function() {
|
|
@@ -4023,18 +4079,18 @@ var HawaTabs = function(_param) {
|
|
|
4023
4079
|
] : inactiveTabStyle[orientation], pill ? "rounded" : orientation === "vertical" ? "rounded rounded-bl-none rounded-tl-none" : "rounded sm:rounded-b-none", // direction === "rtl" ? "bg-yellow-400" : "bg-yellow-400"
|
|
4024
4080
|
"flex w-fit flex-row items-center gap-2 transition-all ")
|
|
4025
4081
|
}, opt.icon, opt.label);
|
|
4026
|
-
})), /* @__PURE__ */
|
|
4082
|
+
})), /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4027
4083
|
className: "flex-1 transition-all"
|
|
4028
4084
|
}, props.options.map(function(tab, i) {
|
|
4029
|
-
return /* @__PURE__ */
|
|
4085
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4030
4086
|
key: i,
|
|
4031
4087
|
className: cn(selectedOption === tab.value ? "" : "hidden")
|
|
4032
4088
|
}, tab.content);
|
|
4033
4089
|
})));
|
|
4034
4090
|
};
|
|
4035
4091
|
// src/elements/HawaModal.tsx
|
|
4036
|
-
var
|
|
4037
|
-
var
|
|
4092
|
+
var import_react24 = __toESM(require("react"));
|
|
4093
|
+
var import_clsx14 = __toESM(require("clsx"));
|
|
4038
4094
|
var HawaModal = function(_param) {
|
|
4039
4095
|
var open = _param.open, title = _param.title, onClose = _param.onClose, _param_closeOnClickOutside = _param.closeOnClickOutside, closeOnClickOutside = _param_closeOnClickOutside === void 0 ? true : _param_closeOnClickOutside, props = _object_without_properties(_param, [
|
|
4040
4096
|
"open",
|
|
@@ -4043,7 +4099,7 @@ var HawaModal = function(_param) {
|
|
|
4043
4099
|
"closeOnClickOutside"
|
|
4044
4100
|
]);
|
|
4045
4101
|
var defaultStyle = "absolute top-1/2 left-1/2 w-full h-screen flex flex-col justify-center items-center -translate-x-1/2 -translate-y-1/2 transition-all";
|
|
4046
|
-
(0,
|
|
4102
|
+
(0, import_react24.useEffect)(function() {
|
|
4047
4103
|
if (closeOnClickOutside && open) {
|
|
4048
4104
|
window.onclick = function(e) {
|
|
4049
4105
|
e.stopPropagation();
|
|
@@ -4056,43 +4112,157 @@ var HawaModal = function(_param) {
|
|
|
4056
4112
|
}, [
|
|
4057
4113
|
open
|
|
4058
4114
|
]);
|
|
4059
|
-
return /* @__PURE__ */
|
|
4060
|
-
className: (0,
|
|
4061
|
-
}, /* @__PURE__ */
|
|
4062
|
-
className: (0,
|
|
4063
|
-
}), /* @__PURE__ */
|
|
4115
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4116
|
+
className: (0, import_clsx14.default)(defaultStyle, open ? "z-10 opacity-100 " : "invisible -z-10 opacity-0")
|
|
4117
|
+
}, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4118
|
+
className: (0, import_clsx14.default)("absolute h-screen w-full bg-gray-500 opacity-50", open ? "opacity-50" : "opacity-0")
|
|
4119
|
+
}), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4064
4120
|
className: "relative w-1/2 max-w-md rounded bg-white p-1 shadow-lg dark:bg-gray-700"
|
|
4065
|
-
}, /* @__PURE__ */
|
|
4121
|
+
}, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4066
4122
|
className: "flex items-start justify-between rounded-t p-3 dark:border-gray-600"
|
|
4067
|
-
}, /* @__PURE__ */
|
|
4123
|
+
}, /* @__PURE__ */ import_react24.default.createElement("h3", {
|
|
4068
4124
|
className: "text-xl font-semibold text-gray-900 dark:text-white"
|
|
4069
|
-
}, title), /* @__PURE__ */
|
|
4125
|
+
}, title), /* @__PURE__ */ import_react24.default.createElement("button", {
|
|
4070
4126
|
type: "button",
|
|
4071
4127
|
className: "inline-flex items-center rounded bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white",
|
|
4072
4128
|
"data-modal-toggle": "defaultModal",
|
|
4073
4129
|
onClick: function(e) {
|
|
4074
4130
|
onClose();
|
|
4075
4131
|
}
|
|
4076
|
-
}, /* @__PURE__ */
|
|
4132
|
+
}, /* @__PURE__ */ import_react24.default.createElement("svg", {
|
|
4077
4133
|
"aria-hidden": "true",
|
|
4078
4134
|
className: "h-5 w-5",
|
|
4079
4135
|
fill: "currentColor",
|
|
4080
4136
|
viewBox: "0 0 20 20"
|
|
4081
|
-
}, /* @__PURE__ */
|
|
4137
|
+
}, /* @__PURE__ */ import_react24.default.createElement("path", {
|
|
4082
4138
|
fillRule: "evenodd",
|
|
4083
4139
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
4084
4140
|
clipRule: "evenodd"
|
|
4085
|
-
})), /* @__PURE__ */
|
|
4141
|
+
})), /* @__PURE__ */ import_react24.default.createElement("span", {
|
|
4086
4142
|
className: "sr-only"
|
|
4087
|
-
}, "Close modal"))), /* @__PURE__ */
|
|
4143
|
+
}, "Close modal"))), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4088
4144
|
className: "space-y-6 p-3"
|
|
4089
|
-
}, props.children), /* @__PURE__ */
|
|
4145
|
+
}, props.children), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4090
4146
|
className: "mx-2 flex items-center justify-end space-x-1 p-0 dark:border-gray-600"
|
|
4091
4147
|
}, props.actions)));
|
|
4092
4148
|
};
|
|
4149
|
+
// src/elements/HawaMenu.tsx
|
|
4150
|
+
var import_react25 = __toESM(require("react"));
|
|
4151
|
+
var import_clsx15 = __toESM(require("clsx"));
|
|
4152
|
+
var HawaMenu = function(param) {
|
|
4153
|
+
var menuItems = param.menuItems, withHeader = param.withHeader, _param_direction = param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, headerTitle = param.headerTitle, headerSubtitle = param.headerSubtitle, _param_size = param.size, size = _param_size === void 0 ? "normal" : _param_size, children = param.children, onClickOutside = param.onClickOutside, actionedItem = param.actionedItem, _param_position = param.position, position = _param_position === void 0 ? "top-right" : _param_position;
|
|
4154
|
+
var _menuItems;
|
|
4155
|
+
var _ref = _sliced_to_array((0, import_react25.useState)(false), 2), menuOpened = _ref[0], setMenuOpened = _ref[1];
|
|
4156
|
+
var childrenRef = (0, import_react25.useRef)(null);
|
|
4157
|
+
var _ref1 = _sliced_to_array((0, import_react25.useState)(null), 2), childrenHeight = _ref1[0], setChildrenHeight = _ref1[1];
|
|
4158
|
+
var _ref2 = _sliced_to_array((0, import_react25.useState)(null), 2), childrenWidth = _ref2[0], setChildrenWidth = _ref2[1];
|
|
4159
|
+
var menuRef = (0, import_react25.useRef)(null);
|
|
4160
|
+
var _ref3 = _sliced_to_array((0, import_react25.useState)(null), 2), menuWidth = _ref3[0], setMenuWidth = _ref3[1];
|
|
4161
|
+
var _ref4 = _sliced_to_array((0, import_react25.useState)(null), 2), menuHeight = _ref4[0], setMenuHeight = _ref4[1];
|
|
4162
|
+
(0, import_react25.useEffect)(function() {
|
|
4163
|
+
var _menuRef_current, _menuRef_current1, _childrenRef_current, _childrenRef_current1;
|
|
4164
|
+
setMenuHeight((_menuRef_current = menuRef.current) === null || _menuRef_current === void 0 ? void 0 : _menuRef_current.getBoundingClientRect().height);
|
|
4165
|
+
setMenuWidth((_menuRef_current1 = menuRef.current) === null || _menuRef_current1 === void 0 ? void 0 : _menuRef_current1.getBoundingClientRect().width);
|
|
4166
|
+
setChildrenHeight((_childrenRef_current = childrenRef.current) === null || _childrenRef_current === void 0 ? void 0 : _childrenRef_current.getBoundingClientRect().height);
|
|
4167
|
+
setChildrenWidth((_childrenRef_current1 = childrenRef.current) === null || _childrenRef_current1 === void 0 ? void 0 : _childrenRef_current1.getBoundingClientRect().width);
|
|
4168
|
+
var handleClickOutside = function(event) {
|
|
4169
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
4170
|
+
setMenuOpened(false);
|
|
4171
|
+
}
|
|
4172
|
+
};
|
|
4173
|
+
document.addEventListener("click", handleClickOutside, true);
|
|
4174
|
+
return function() {
|
|
4175
|
+
document.removeEventListener("click", handleClickOutside, true);
|
|
4176
|
+
};
|
|
4177
|
+
}, [
|
|
4178
|
+
onClickOutside
|
|
4179
|
+
]);
|
|
4180
|
+
var defaultStyles = "border-none absolute ring-offset-1 absolute z-10 w-44 divide-y divide-gray-100 overflow-y-clip rounded bg-gray-50 shadow-lg transition-all dark:bg-gray-700";
|
|
4181
|
+
var sizeStyles2 = {
|
|
4182
|
+
small: "text-[11px] p-1 px-4 m-0",
|
|
4183
|
+
normal: "py-2 px-4",
|
|
4184
|
+
large: ""
|
|
4185
|
+
};
|
|
4186
|
+
var menuCoordinates;
|
|
4187
|
+
var spacing = 5;
|
|
4188
|
+
switch(position){
|
|
4189
|
+
case "top-right":
|
|
4190
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "0px, -".concat(menuHeight + childrenHeight + spacing, "px");
|
|
4191
|
+
break;
|
|
4192
|
+
case "top-left":
|
|
4193
|
+
menuCoordinates = direction === "rtl" ? "".concat(0, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "-".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px");
|
|
4194
|
+
break;
|
|
4195
|
+
case "bottom-right":
|
|
4196
|
+
menuCoordinates = direction === "rtl" ? "-".concat(0, "px, ").concat(spacing, "px") : "-".concat(childrenWidth - menuWidth, "px, ").concat(spacing, "px");
|
|
4197
|
+
break;
|
|
4198
|
+
case "bottom-left":
|
|
4199
|
+
menuCoordinates = direction === "rtl" ? "0px, ".concat(spacing, "px") : "-".concat(menuWidth - childrenWidth, "px,").concat(spacing, "px");
|
|
4200
|
+
break;
|
|
4201
|
+
case "right-bottom":
|
|
4202
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
4203
|
+
break;
|
|
4204
|
+
case "right-top":
|
|
4205
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
4206
|
+
break;
|
|
4207
|
+
case "left-bottom":
|
|
4208
|
+
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
4209
|
+
break;
|
|
4210
|
+
case "left-top":
|
|
4211
|
+
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
4212
|
+
break;
|
|
4213
|
+
default:
|
|
4214
|
+
menuCoordinates = "-".concat(menuWidth / 2, "px, -").concat(childrenHeight + menuHeight / 2, "px");
|
|
4215
|
+
break;
|
|
4216
|
+
}
|
|
4217
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4218
|
+
onClick: function() {
|
|
4219
|
+
if (menuOpened) setMenuOpened(false);
|
|
4220
|
+
else setMenuOpened(true);
|
|
4221
|
+
}
|
|
4222
|
+
}, /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4223
|
+
ref: childrenRef
|
|
4224
|
+
}, children), /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4225
|
+
ref: menuRef,
|
|
4226
|
+
style: {
|
|
4227
|
+
position: "absolute",
|
|
4228
|
+
width: "max-content",
|
|
4229
|
+
transform: "translate(".concat(menuCoordinates, ")"),
|
|
4230
|
+
maxWidth: "200px"
|
|
4231
|
+
},
|
|
4232
|
+
className: (0, import_clsx15.default)(defaultStyles, menuOpened ? "opacity-100" : "invisible opacity-0")
|
|
4233
|
+
}, withHeader && /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4234
|
+
className: "px-4 py-3 text-xs text-gray-900 dark:text-white"
|
|
4235
|
+
}, /* @__PURE__ */ import_react25.default.createElement("div", null, headerTitle), /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4236
|
+
className: "truncate font-medium"
|
|
4237
|
+
}, headerSubtitle)), (_menuItems = menuItems) === null || _menuItems === void 0 ? void 0 : _menuItems.map(function(group, o) {
|
|
4238
|
+
var _group;
|
|
4239
|
+
return /* @__PURE__ */ import_react25.default.createElement("ul", {
|
|
4240
|
+
key: o,
|
|
4241
|
+
className: "bg-layout-1200 flex flex-col gap-1 p-1 text-gray-700 dark:text-gray-200"
|
|
4242
|
+
}, (_group = group) === null || _group === void 0 ? void 0 : _group.map(function(item, indx) {
|
|
4243
|
+
return item.element ? /* @__PURE__ */ import_react25.default.createElement("li", {
|
|
4244
|
+
key: indx,
|
|
4245
|
+
className: "cursor-pointer items-center rounded hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4246
|
+
}, item.element) : /* @__PURE__ */ import_react25.default.createElement("li", {
|
|
4247
|
+
key: indx,
|
|
4248
|
+
onClick: function() {
|
|
4249
|
+
if (item.disabled) {
|
|
4250
|
+
console.log("button is disabled");
|
|
4251
|
+
} else {
|
|
4252
|
+
var _item;
|
|
4253
|
+
(_item = item) === null || _item === void 0 ? void 0 : _item.action(actionedItem);
|
|
4254
|
+
}
|
|
4255
|
+
},
|
|
4256
|
+
className: (0, import_clsx15.default)("transition-all", item.isButton ? "flex cursor-pointer flex-row items-center rounded-inner bg-buttonPrimary-500 px-4 py-2 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse" : item.disabled ? "text-gray-300" : " flex cursor-pointer flex-row items-center rounded-inner hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white ", sizeStyles2[size])
|
|
4257
|
+
}, item.icon && /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4258
|
+
className: size === "small" ? "mr-1 rtl:ml-1" : "mr-2 rtl:ml-2"
|
|
4259
|
+
}, item.icon), item.label);
|
|
4260
|
+
}));
|
|
4261
|
+
})));
|
|
4262
|
+
};
|
|
4093
4263
|
// src/elements/HawaDropdownMenu.tsx
|
|
4094
4264
|
var import_react26 = __toESM(require("react"));
|
|
4095
|
-
var
|
|
4265
|
+
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
4096
4266
|
var HawaDropdownMenu = function(param) {
|
|
4097
4267
|
var children = param.children, direction = param.direction;
|
|
4098
4268
|
var _import_react26_default_useState = _sliced_to_array(import_react26.default.useState(true), 2), bookmarksChecked = _import_react26_default_useState[0], setBookmarksChecked = _import_react26_default_useState[1];
|
|
@@ -4134,22 +4304,22 @@ var HawaDropdownMenu = function(param) {
|
|
|
4134
4304
|
}
|
|
4135
4305
|
]
|
|
4136
4306
|
};
|
|
4137
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4307
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Root, {
|
|
4138
4308
|
dir: direction
|
|
4139
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4309
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Trigger, {
|
|
4140
4310
|
asChild: true
|
|
4141
|
-
}, children), /* @__PURE__ */ import_react26.default.createElement(
|
|
4311
|
+
}, children), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Portal, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Content, {
|
|
4142
4312
|
className: "min-w-[220px] rounded bg-white p-[5px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] will-change-[opacity,transform] data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade",
|
|
4143
4313
|
sideOffset: 5
|
|
4144
4314
|
}, dropdownData.items.map(function(it, i) {
|
|
4145
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4315
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4146
4316
|
key: i,
|
|
4147
4317
|
className: "group relative flex h-[25px] select-none items-center justify-between \n rounded-inner px-[5px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8\n data-[highlighted]:text-violet-1 ",
|
|
4148
4318
|
disabled: it.disabled
|
|
4149
4319
|
}, it.label, /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4150
4320
|
className: " text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white"
|
|
4151
4321
|
}, it.shortcut));
|
|
4152
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4322
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Sub, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.SubTrigger, {
|
|
4153
4323
|
className: " group relative flex h-[25px] select-none \n items-center rounded-inner justify-between flex-row\n px-[5px] text-[13px] leading-none text-violet-11\n outline-none data-[disabled]:pointer-events-none\n data-[highlighted]:bg-violet-9 data-[highlighted]:data-[state=open]:bg-violet-9\n data-[state=open]:bg-violet-4 data-[disabled]:text-mauve-8 data-[highlighted]:data-[state=open]:text-violet-1\n data-[highlighted]:text-violet-1 data-[state=open]:text-violet-11 ltr:pl-[25px] rtl:pl-[0px] "
|
|
4154
4324
|
}, "More Tools", /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4155
4325
|
className: "ltr:ml-auto rtl:pr-[5px] ltr:pl-[0px] text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white\n rtl:mr-auto rtl:rotate-180 rtl:pl-[0px]"
|
|
@@ -4164,31 +4334,31 @@ var HawaDropdownMenu = function(param) {
|
|
|
4164
4334
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4165
4335
|
"fill-rule": "evenodd",
|
|
4166
4336
|
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"
|
|
4167
|
-
})))), /* @__PURE__ */ import_react26.default.createElement(
|
|
4337
|
+
})))), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Portal, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.SubContent, {
|
|
4168
4338
|
className: "min-w-[220px] rounded-inner bg-white p-[5px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] will-change-[opacity,transform] data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade",
|
|
4169
4339
|
sideOffset: 2,
|
|
4170
4340
|
alignOffset: -5
|
|
4171
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4341
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4172
4342
|
className: "group relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1"
|
|
4173
4343
|
}, "Save Page As…", " ", /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4174
4344
|
className: "ml-auto pl-[20px] text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white"
|
|
4175
|
-
}, "⌘+S")), /* @__PURE__ */ import_react26.default.createElement(
|
|
4345
|
+
}, "⌘+S")), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4176
4346
|
className: "relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1"
|
|
4177
|
-
}, "Create Shortcut…"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4347
|
+
}, "Create Shortcut…"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4178
4348
|
className: "relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1"
|
|
4179
|
-
}, "Name Window…"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4349
|
+
}, "Name Window…"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4180
4350
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4181
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4351
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4182
4352
|
className: "relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1"
|
|
4183
|
-
}, "Developer Tools")))), /* @__PURE__ */ import_react26.default.createElement(
|
|
4353
|
+
}, "Developer Tools")))), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4184
4354
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4185
4355
|
}), dropdownData.checkboxes.map(function(ch, i) {
|
|
4186
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4356
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.CheckboxItem, {
|
|
4187
4357
|
key: i,
|
|
4188
4358
|
className: "group relative flex h-[25px] select-none items-center\n justify-between rounded-inner px-[5px] text-[13px] leading-none text-violet-11\n outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8\n data-[highlighted]:text-violet-1",
|
|
4189
4359
|
checked: bookmarksChecked,
|
|
4190
4360
|
onCheckedChange: setBookmarksChecked
|
|
4191
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4361
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4192
4362
|
className: "absolute inline-flex w-[25px] items-center justify-center ltr:left-0 rtl:right-0"
|
|
4193
4363
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4194
4364
|
"aria-label": "Check Mark",
|
|
@@ -4203,17 +4373,17 @@ var HawaDropdownMenu = function(param) {
|
|
|
4203
4373
|
})), " "), ch.label, /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4204
4374
|
className: " text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white"
|
|
4205
4375
|
}, ch.shortcut));
|
|
4206
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4376
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4207
4377
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4208
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4378
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Label, {
|
|
4209
4379
|
className: "pl-[25px] text-xs leading-[25px] text-mauve-11"
|
|
4210
|
-
}, "People"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4380
|
+
}, "People"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioGroup, {
|
|
4211
4381
|
value: person,
|
|
4212
4382
|
onValueChange: setPerson
|
|
4213
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4383
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioItem, {
|
|
4214
4384
|
className: "relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1",
|
|
4215
4385
|
value: "pedro"
|
|
4216
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4386
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4217
4387
|
className: "absolute left-0 inline-flex w-[25px] items-center justify-center"
|
|
4218
4388
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4219
4389
|
"aria-label": "Filled Dot",
|
|
@@ -4224,10 +4394,10 @@ var HawaDropdownMenu = function(param) {
|
|
|
4224
4394
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4225
4395
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
4226
4396
|
fill: "currentColor"
|
|
4227
|
-
})), " "), "Pedro Duarte"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4397
|
+
})), " "), "Pedro Duarte"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioItem, {
|
|
4228
4398
|
className: "relative flex h-[25px] select-none items-center rounded-inner px-[5px] pl-[25px] text-[13px] leading-none text-violet-11 outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-violet-9 data-[disabled]:text-mauve-8 data-[highlighted]:text-violet-1",
|
|
4229
4399
|
value: "colm"
|
|
4230
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4400
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4231
4401
|
className: "absolute left-0 inline-flex w-[25px] items-center justify-center"
|
|
4232
4402
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4233
4403
|
"aria-label": "Filled Dot",
|
|
@@ -4238,7 +4408,7 @@ var HawaDropdownMenu = function(param) {
|
|
|
4238
4408
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4239
4409
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
4240
4410
|
fill: "currentColor"
|
|
4241
|
-
})), " "), "Colm Tuite")), /* @__PURE__ */ import_react26.default.createElement(
|
|
4411
|
+
})), " "), "Colm Tuite")), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Arrow, {
|
|
4242
4412
|
className: "fill-white"
|
|
4243
4413
|
}))));
|
|
4244
4414
|
};
|
|
@@ -4302,63 +4472,63 @@ var HawaStepper = function(_param) {
|
|
|
4302
4472
|
// src/elements/HawaStats.tsx
|
|
4303
4473
|
var import_react30 = __toESM(require("react"));
|
|
4304
4474
|
// src/elements/Card.tsx
|
|
4305
|
-
var
|
|
4306
|
-
var Card =
|
|
4475
|
+
var React33 = __toESM(require("react"));
|
|
4476
|
+
var Card = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4307
4477
|
var className = _param.className, _param_clickable = _param.clickable, clickable = _param_clickable === void 0 ? false : _param_clickable, props = _object_without_properties(_param, [
|
|
4308
4478
|
"className",
|
|
4309
4479
|
"clickable"
|
|
4310
4480
|
]);
|
|
4311
|
-
return
|
|
4481
|
+
return React33.createElement("div", _object_spread({
|
|
4312
4482
|
ref: ref,
|
|
4313
4483
|
className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", clickable && "cursor-pointer transition-all hover:drop-shadow-md dark:hover:shadow-dark", className)
|
|
4314
4484
|
}, props));
|
|
4315
4485
|
});
|
|
4316
4486
|
Card.displayName = "Card";
|
|
4317
|
-
var CardHeader =
|
|
4487
|
+
var CardHeader = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4318
4488
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4319
4489
|
"className"
|
|
4320
4490
|
]);
|
|
4321
|
-
return
|
|
4491
|
+
return React33.createElement("div", _object_spread({
|
|
4322
4492
|
ref: ref,
|
|
4323
4493
|
className: cn("flex flex-col space-y-1.5 p-6", className)
|
|
4324
4494
|
}, props));
|
|
4325
4495
|
});
|
|
4326
4496
|
CardHeader.displayName = "CardHeader";
|
|
4327
|
-
var CardTitle =
|
|
4497
|
+
var CardTitle = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4328
4498
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4329
4499
|
"className"
|
|
4330
4500
|
]);
|
|
4331
|
-
return
|
|
4501
|
+
return React33.createElement("h3", _object_spread({
|
|
4332
4502
|
ref: ref,
|
|
4333
4503
|
className: cn("text-2xl font-semibold leading-none tracking-tight", className)
|
|
4334
4504
|
}, props));
|
|
4335
4505
|
});
|
|
4336
4506
|
CardTitle.displayName = "CardTitle";
|
|
4337
|
-
var CardDescription =
|
|
4507
|
+
var CardDescription = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4338
4508
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4339
4509
|
"className"
|
|
4340
4510
|
]);
|
|
4341
|
-
return
|
|
4511
|
+
return React33.createElement("p", _object_spread({
|
|
4342
4512
|
ref: ref,
|
|
4343
4513
|
className: cn("text-sm text-muted-foreground", className)
|
|
4344
4514
|
}, props));
|
|
4345
4515
|
});
|
|
4346
4516
|
CardDescription.displayName = "CardDescription";
|
|
4347
|
-
var CardContent =
|
|
4517
|
+
var CardContent = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4348
4518
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4349
4519
|
"className"
|
|
4350
4520
|
]);
|
|
4351
|
-
return
|
|
4521
|
+
return React33.createElement("div", _object_spread({
|
|
4352
4522
|
ref: ref,
|
|
4353
4523
|
className: cn("p-6", props.headless ? "pt-6" : "pt-0", className)
|
|
4354
4524
|
}, props));
|
|
4355
4525
|
});
|
|
4356
4526
|
CardContent.displayName = "CardContent";
|
|
4357
|
-
var CardFooter =
|
|
4527
|
+
var CardFooter = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4358
4528
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4359
4529
|
"className"
|
|
4360
4530
|
]);
|
|
4361
|
-
return
|
|
4531
|
+
return React33.createElement("div", _object_spread({
|
|
4362
4532
|
ref: ref,
|
|
4363
4533
|
className: cn("flex items-center p-6 pt-0", className)
|
|
4364
4534
|
}, props));
|
|
@@ -6630,14 +6800,14 @@ var Carousel = function(param) {
|
|
|
6630
6800
|
}));
|
|
6631
6801
|
};
|
|
6632
6802
|
// src/elements/Input.tsx
|
|
6633
|
-
var
|
|
6634
|
-
var Input =
|
|
6803
|
+
var React61 = __toESM(require("react"));
|
|
6804
|
+
var Input = React61.forwardRef(function(_param, ref) {
|
|
6635
6805
|
var className = _param.className, preview = _param.preview, type = _param.type, props = _object_without_properties(_param, [
|
|
6636
6806
|
"className",
|
|
6637
6807
|
"preview",
|
|
6638
6808
|
"type"
|
|
6639
6809
|
]);
|
|
6640
|
-
return /* @__PURE__ */
|
|
6810
|
+
return /* @__PURE__ */ React61.createElement("input", _object_spread({
|
|
6641
6811
|
type: type,
|
|
6642
6812
|
className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className, preview && " disabled:cursor-default disabled:opacity-100 border-opacity-25 "),
|
|
6643
6813
|
disabled: preview,
|
|
@@ -6723,184 +6893,6 @@ var InterfaceSettings = function(_param) {
|
|
|
6723
6893
|
]
|
|
6724
6894
|
}));
|
|
6725
6895
|
};
|
|
6726
|
-
// src/elements/DropdownMenu.tsx
|
|
6727
|
-
var React62 = __toESM(require("react"));
|
|
6728
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
6729
|
-
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
6730
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
6731
|
-
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
6732
|
-
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
6733
|
-
var DropdownMenuSubTrigger = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6734
|
-
var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties(_param, [
|
|
6735
|
-
"className",
|
|
6736
|
-
"inset",
|
|
6737
|
-
"children"
|
|
6738
|
-
]);
|
|
6739
|
-
return React62.createElement(DropdownMenuPrimitive.SubTrigger, _object_spread({
|
|
6740
|
-
ref: ref,
|
|
6741
|
-
className: cn("flex cursor-default select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className)
|
|
6742
|
-
}, props), children, /* @__PURE__ */ React62.createElement("svg", {
|
|
6743
|
-
"aria-label": "Chevron Right Icon",
|
|
6744
|
-
stroke: "currentColor",
|
|
6745
|
-
fill: "currentColor",
|
|
6746
|
-
"stroke-width": "0",
|
|
6747
|
-
viewBox: "0 0 16 16",
|
|
6748
|
-
height: "1em",
|
|
6749
|
-
width: "1em",
|
|
6750
|
-
className: cn(props.dir === "rtl" ? "rotate-180" : "")
|
|
6751
|
-
}, /* @__PURE__ */ React62.createElement("path", {
|
|
6752
|
-
"fill-rule": "evenodd",
|
|
6753
|
-
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"
|
|
6754
|
-
})));
|
|
6755
|
-
});
|
|
6756
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6757
|
-
var DropdownMenuSubContent = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6758
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
6759
|
-
"className"
|
|
6760
|
-
]);
|
|
6761
|
-
return React62.createElement(DropdownMenuPrimitive.SubContent, _object_spread({
|
|
6762
|
-
ref: ref,
|
|
6763
|
-
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
6764
|
-
}, props));
|
|
6765
|
-
});
|
|
6766
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6767
|
-
var DropdownMenuContent = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6768
|
-
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
6769
|
-
"className",
|
|
6770
|
-
"sideOffset"
|
|
6771
|
-
]);
|
|
6772
|
-
return React62.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React62.createElement(DropdownMenuPrimitive.Content, _object_spread({
|
|
6773
|
-
ref: ref,
|
|
6774
|
-
sideOffset: sideOffset,
|
|
6775
|
-
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
6776
|
-
}, props)));
|
|
6777
|
-
});
|
|
6778
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6779
|
-
var DropdownMenuItem = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6780
|
-
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
6781
|
-
"className",
|
|
6782
|
-
"inset"
|
|
6783
|
-
]);
|
|
6784
|
-
return React62.createElement(DropdownMenuPrimitive.Item, _object_spread({
|
|
6785
|
-
ref: ref,
|
|
6786
|
-
className: cn("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)
|
|
6787
|
-
}, props));
|
|
6788
|
-
});
|
|
6789
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6790
|
-
var DropdownMenuCheckboxItem = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6791
|
-
var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties(_param, [
|
|
6792
|
-
"className",
|
|
6793
|
-
"children",
|
|
6794
|
-
"checked"
|
|
6795
|
-
]);
|
|
6796
|
-
return React62.createElement(DropdownMenuPrimitive.CheckboxItem, _object_spread({
|
|
6797
|
-
ref: ref,
|
|
6798
|
-
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
6799
|
-
checked: checked
|
|
6800
|
-
}, props), /* @__PURE__ */ React62.createElement("span", {
|
|
6801
|
-
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
6802
|
-
}, /* @__PURE__ */ React62.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React62.createElement("svg", {
|
|
6803
|
-
"aria-label": "Check Mark",
|
|
6804
|
-
stroke: "currentColor",
|
|
6805
|
-
fill: "currentColor",
|
|
6806
|
-
"stroke-width": "0",
|
|
6807
|
-
viewBox: "0 0 512 512",
|
|
6808
|
-
height: "0.60em",
|
|
6809
|
-
width: "0.60em"
|
|
6810
|
-
}, /* @__PURE__ */ React62.createElement("path", {
|
|
6811
|
-
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"
|
|
6812
|
-
})), " ")), children);
|
|
6813
|
-
});
|
|
6814
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6815
|
-
var DropdownMenuRadioItem = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6816
|
-
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
6817
|
-
"className",
|
|
6818
|
-
"children"
|
|
6819
|
-
]);
|
|
6820
|
-
return React62.createElement(DropdownMenuPrimitive.RadioItem, _object_spread({
|
|
6821
|
-
ref: ref,
|
|
6822
|
-
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)
|
|
6823
|
-
}, props), /* @__PURE__ */ React62.createElement("span", {
|
|
6824
|
-
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
6825
|
-
}, /* @__PURE__ */ React62.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React62.createElement("svg", {
|
|
6826
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6827
|
-
width: "24",
|
|
6828
|
-
"aria-label": "Circle",
|
|
6829
|
-
height: "24",
|
|
6830
|
-
viewBox: "0 0 24 24",
|
|
6831
|
-
fill: "none",
|
|
6832
|
-
stroke: "currentColor",
|
|
6833
|
-
"stroke-width": "2",
|
|
6834
|
-
"stroke-linecap": "round",
|
|
6835
|
-
"stroke-linejoin": "round",
|
|
6836
|
-
className: "h-2 w-2 fill-current"
|
|
6837
|
-
}, /* @__PURE__ */ React62.createElement("circle", {
|
|
6838
|
-
cx: "12",
|
|
6839
|
-
cy: "12",
|
|
6840
|
-
r: "10"
|
|
6841
|
-
})))), children);
|
|
6842
|
-
});
|
|
6843
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6844
|
-
var DropdownMenuLabel = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6845
|
-
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
6846
|
-
"className",
|
|
6847
|
-
"inset"
|
|
6848
|
-
]);
|
|
6849
|
-
return React62.createElement(DropdownMenuPrimitive.Label, _object_spread({
|
|
6850
|
-
ref: ref,
|
|
6851
|
-
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)
|
|
6852
|
-
}, props));
|
|
6853
|
-
});
|
|
6854
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6855
|
-
var DropdownMenuSeparator = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6856
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
6857
|
-
"className"
|
|
6858
|
-
]);
|
|
6859
|
-
return React62.createElement(DropdownMenuPrimitive.Separator, _object_spread({
|
|
6860
|
-
ref: ref,
|
|
6861
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
6862
|
-
}, props));
|
|
6863
|
-
});
|
|
6864
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
6865
|
-
var DropdownMenuShortcut = function(_param) {
|
|
6866
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
6867
|
-
"className"
|
|
6868
|
-
]);
|
|
6869
|
-
return /* @__PURE__ */ React62.createElement("span", _object_spread({
|
|
6870
|
-
className: cn("ml-auto text-xs tracking-widest opacity-60", className)
|
|
6871
|
-
}, props));
|
|
6872
|
-
};
|
|
6873
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
6874
|
-
var DropdownMenu2 = function(param) {
|
|
6875
|
-
var trigger = param.trigger, items = param.items, direction = param.direction, onItemSelect = param.onItemSelect, sideOffset = param.sideOffset, side = param.side, className = param.className, triggerClassname = param.triggerClassname, align = param.align, alignOffset = param.alignOffset;
|
|
6876
|
-
return /* @__PURE__ */ React62.createElement(DropdownMenuRoot, {
|
|
6877
|
-
dir: direction
|
|
6878
|
-
}, /* @__PURE__ */ React62.createElement(DropdownMenuTrigger, {
|
|
6879
|
-
className: triggerClassname
|
|
6880
|
-
}, trigger), /* @__PURE__ */ React62.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React62.createElement(DropdownMenuContent, {
|
|
6881
|
-
side: side,
|
|
6882
|
-
sideOffset: sideOffset,
|
|
6883
|
-
className: cn(className),
|
|
6884
|
-
align: align,
|
|
6885
|
-
alignOffset: alignOffset
|
|
6886
|
-
}, items.map(function(item, index) {
|
|
6887
|
-
return item.subitems ? /* @__PURE__ */ React62.createElement(DropdownMenuSub, null, /* @__PURE__ */ React62.createElement(DropdownMenuSubTrigger, {
|
|
6888
|
-
dir: direction
|
|
6889
|
-
}, item.label), /* @__PURE__ */ React62.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React62.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
|
|
6890
|
-
return /* @__PURE__ */ React62.createElement(DropdownMenuItem, {
|
|
6891
|
-
onSelect: function() {
|
|
6892
|
-
return subitem.action();
|
|
6893
|
-
},
|
|
6894
|
-
key: subIndex
|
|
6895
|
-
}, subitem.label);
|
|
6896
|
-
})))) : /* @__PURE__ */ React62.createElement(DropdownMenuItem, {
|
|
6897
|
-
key: index,
|
|
6898
|
-
onSelect: function() {
|
|
6899
|
-
return item.action();
|
|
6900
|
-
}
|
|
6901
|
-
}, item.label);
|
|
6902
|
-
}))));
|
|
6903
|
-
};
|
|
6904
6896
|
// src/elements/Popover.tsx
|
|
6905
6897
|
var React63 = __toESM(require("react"));
|
|
6906
6898
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
@@ -7661,7 +7653,7 @@ var AppLayout = function(_param) {
|
|
|
7661
7653
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
7662
7654
|
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
7663
7655
|
className: "font-bold"
|
|
7664
|
-
}, props.username), " ", /* @__PURE__ */ import_react64.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react64.default.createElement(
|
|
7656
|
+
}, props.username), " ", /* @__PURE__ */ import_react64.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react64.default.createElement(DropdownMenu, {
|
|
7665
7657
|
triggerClassname: "mx-2",
|
|
7666
7658
|
align: "end",
|
|
7667
7659
|
alignOffset: 8,
|
|
@@ -8125,7 +8117,7 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8125
8117
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
8126
8118
|
}, /* @__PURE__ */ import_react66.default.createElement("div", {
|
|
8127
8119
|
className: "font-bold"
|
|
8128
|
-
}, props.username), " ", /* @__PURE__ */ import_react66.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react66.default.createElement(
|
|
8120
|
+
}, props.username), " ", /* @__PURE__ */ import_react66.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react66.default.createElement(DropdownMenu, {
|
|
8129
8121
|
triggerClassname: "mx-2",
|
|
8130
8122
|
align: "end",
|
|
8131
8123
|
alignOffset: 8,
|