@sikka/hawa 0.1.55 → 0.1.57
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/1.bug_report.yml +100 -0
- package/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/dist/index.d.mts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +529 -541
- package/dist/index.mjs +794 -801
- package/package.json +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +3 -1
- package/src/elements/Card.tsx +9 -11
- package/src/elements/DropdownMenu.tsx +14 -4
- package/src/elements/HawaItemCard.tsx +2 -2
- package/src/elements/HawaRadio.tsx +0 -1
- package/src/elements/HawaTable.tsx +298 -147
- package/src/elements/InterfaceSettings.tsx +0 -5
- package/.github/ISSUE_TEMPLATE.yml +0 -121
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;
|
|
@@ -1197,7 +1197,6 @@ var HawaRadio = function(_param) {
|
|
|
1197
1197
|
var dir = window.getComputedStyle(ref.current.parentNode).direction;
|
|
1198
1198
|
setParentDirection(dir);
|
|
1199
1199
|
}
|
|
1200
|
-
console.log("how many times");
|
|
1201
1200
|
});
|
|
1202
1201
|
switch(design){
|
|
1203
1202
|
case "tabs":
|
|
@@ -1622,124 +1621,10 @@ var HawaAlert = function(_param) {
|
|
|
1622
1621
|
})))));
|
|
1623
1622
|
};
|
|
1624
1623
|
// 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"));
|
|
1624
|
+
var import_react19 = __toESM(require("react"));
|
|
1629
1625
|
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
1626
|
// src/hooks/useTable.ts
|
|
1742
|
-
var
|
|
1627
|
+
var import_react18 = require("react");
|
|
1743
1628
|
var calculateRange = function(data, rowsPerPage) {
|
|
1744
1629
|
var _data;
|
|
1745
1630
|
var range = [];
|
|
@@ -1778,9 +1663,9 @@ var sortData = function(data, sortColumn, sortDirection) {
|
|
|
1778
1663
|
return data;
|
|
1779
1664
|
};
|
|
1780
1665
|
var useTable = function(data, page, rowsPerPage, sortColumn, sortDirection) {
|
|
1781
|
-
var _ref = _sliced_to_array((0,
|
|
1782
|
-
var _ref1 = _sliced_to_array((0,
|
|
1783
|
-
(0,
|
|
1666
|
+
var _ref = _sliced_to_array((0, import_react18.useState)([]), 2), tableRange = _ref[0], setTableRange = _ref[1];
|
|
1667
|
+
var _ref1 = _sliced_to_array((0, import_react18.useState)([]), 2), slice = _ref1[0], setSlice = _ref1[1];
|
|
1668
|
+
(0, import_react18.useEffect)(function() {
|
|
1784
1669
|
if (data) {
|
|
1785
1670
|
var range = calculateRange(data, rowsPerPage);
|
|
1786
1671
|
setTableRange(_to_consumable_array(range));
|
|
@@ -1802,7 +1687,205 @@ var useTable = function(data, page, rowsPerPage, sortColumn, sortDirection) {
|
|
|
1802
1687
|
};
|
|
1803
1688
|
};
|
|
1804
1689
|
var useTable_default = useTable;
|
|
1690
|
+
// src/elements/DropdownMenu.tsx
|
|
1691
|
+
var React22 = __toESM(require("react"));
|
|
1692
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1693
|
+
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
1694
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1695
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1696
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1697
|
+
var DropdownMenuSubTrigger = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1698
|
+
var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties(_param, [
|
|
1699
|
+
"className",
|
|
1700
|
+
"inset",
|
|
1701
|
+
"children"
|
|
1702
|
+
]);
|
|
1703
|
+
return React22.createElement(DropdownMenuPrimitive.SubTrigger, _object_spread({
|
|
1704
|
+
ref: ref,
|
|
1705
|
+
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)
|
|
1706
|
+
}, props), /* @__PURE__ */ React22.createElement("div", {
|
|
1707
|
+
className: "flex flex-row items-center gap-1"
|
|
1708
|
+
}, children), " ", /* @__PURE__ */ React22.createElement("svg", {
|
|
1709
|
+
"aria-label": "Chevron Right Icon",
|
|
1710
|
+
stroke: "currentColor",
|
|
1711
|
+
fill: "currentColor",
|
|
1712
|
+
"stroke-width": "0",
|
|
1713
|
+
viewBox: "0 0 16 16",
|
|
1714
|
+
height: "1em",
|
|
1715
|
+
width: "1em",
|
|
1716
|
+
className: cn(props.dir === "rtl" ? "rotate-180" : "")
|
|
1717
|
+
}, /* @__PURE__ */ React22.createElement("path", {
|
|
1718
|
+
"fill-rule": "evenodd",
|
|
1719
|
+
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"
|
|
1720
|
+
})));
|
|
1721
|
+
});
|
|
1722
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1723
|
+
var DropdownMenuSubContent = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1724
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1725
|
+
"className"
|
|
1726
|
+
]);
|
|
1727
|
+
return React22.createElement(DropdownMenuPrimitive.SubContent, _object_spread({
|
|
1728
|
+
ref: ref,
|
|
1729
|
+
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)
|
|
1730
|
+
}, props));
|
|
1731
|
+
});
|
|
1732
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1733
|
+
var DropdownMenuContent = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1734
|
+
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
1735
|
+
"className",
|
|
1736
|
+
"sideOffset"
|
|
1737
|
+
]);
|
|
1738
|
+
return React22.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.Content, _object_spread({
|
|
1739
|
+
ref: ref,
|
|
1740
|
+
sideOffset: sideOffset,
|
|
1741
|
+
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)
|
|
1742
|
+
}, props)));
|
|
1743
|
+
});
|
|
1744
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1745
|
+
var DropdownMenuItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1746
|
+
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
1747
|
+
"className",
|
|
1748
|
+
"inset"
|
|
1749
|
+
]);
|
|
1750
|
+
return React22.createElement(DropdownMenuPrimitive.Item, _object_spread({
|
|
1751
|
+
ref: ref,
|
|
1752
|
+
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)
|
|
1753
|
+
}, props));
|
|
1754
|
+
});
|
|
1755
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1756
|
+
var DropdownMenuCheckboxItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1757
|
+
var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties(_param, [
|
|
1758
|
+
"className",
|
|
1759
|
+
"children",
|
|
1760
|
+
"checked"
|
|
1761
|
+
]);
|
|
1762
|
+
return React22.createElement(DropdownMenuPrimitive.CheckboxItem, _object_spread({
|
|
1763
|
+
ref: ref,
|
|
1764
|
+
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),
|
|
1765
|
+
checked: checked
|
|
1766
|
+
}, props), /* @__PURE__ */ React22.createElement("span", {
|
|
1767
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1768
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React22.createElement("svg", {
|
|
1769
|
+
"aria-label": "Check Mark",
|
|
1770
|
+
stroke: "currentColor",
|
|
1771
|
+
fill: "currentColor",
|
|
1772
|
+
"stroke-width": "0",
|
|
1773
|
+
viewBox: "0 0 512 512",
|
|
1774
|
+
height: "0.60em",
|
|
1775
|
+
width: "0.60em"
|
|
1776
|
+
}, /* @__PURE__ */ React22.createElement("path", {
|
|
1777
|
+
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"
|
|
1778
|
+
})), " ")), children);
|
|
1779
|
+
});
|
|
1780
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1781
|
+
var DropdownMenuRadioItem = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1782
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1783
|
+
"className",
|
|
1784
|
+
"children"
|
|
1785
|
+
]);
|
|
1786
|
+
return React22.createElement(DropdownMenuPrimitive.RadioItem, _object_spread({
|
|
1787
|
+
ref: ref,
|
|
1788
|
+
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)
|
|
1789
|
+
}, props), /* @__PURE__ */ React22.createElement("span", {
|
|
1790
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1791
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React22.createElement("svg", {
|
|
1792
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1793
|
+
width: "24",
|
|
1794
|
+
"aria-label": "Circle",
|
|
1795
|
+
height: "24",
|
|
1796
|
+
viewBox: "0 0 24 24",
|
|
1797
|
+
fill: "none",
|
|
1798
|
+
stroke: "currentColor",
|
|
1799
|
+
"stroke-width": "2",
|
|
1800
|
+
"stroke-linecap": "round",
|
|
1801
|
+
"stroke-linejoin": "round",
|
|
1802
|
+
className: "h-2 w-2 fill-current"
|
|
1803
|
+
}, /* @__PURE__ */ React22.createElement("circle", {
|
|
1804
|
+
cx: "12",
|
|
1805
|
+
cy: "12",
|
|
1806
|
+
r: "10"
|
|
1807
|
+
})))), children);
|
|
1808
|
+
});
|
|
1809
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1810
|
+
var DropdownMenuLabel = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1811
|
+
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
1812
|
+
"className",
|
|
1813
|
+
"inset"
|
|
1814
|
+
]);
|
|
1815
|
+
return React22.createElement(DropdownMenuPrimitive.Label, _object_spread({
|
|
1816
|
+
ref: ref,
|
|
1817
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)
|
|
1818
|
+
}, props));
|
|
1819
|
+
});
|
|
1820
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1821
|
+
var DropdownMenuSeparator = React22.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1822
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1823
|
+
"className"
|
|
1824
|
+
]);
|
|
1825
|
+
return React22.createElement(DropdownMenuPrimitive.Separator, _object_spread({
|
|
1826
|
+
ref: ref,
|
|
1827
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
1828
|
+
}, props));
|
|
1829
|
+
});
|
|
1830
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1831
|
+
var DropdownMenuShortcut = function(_param) {
|
|
1832
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1833
|
+
"className"
|
|
1834
|
+
]);
|
|
1835
|
+
return /* @__PURE__ */ React22.createElement("span", _object_spread({
|
|
1836
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className)
|
|
1837
|
+
}, props));
|
|
1838
|
+
};
|
|
1839
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1840
|
+
var DropdownMenu = function(param) {
|
|
1841
|
+
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;
|
|
1842
|
+
return /* @__PURE__ */ React22.createElement(DropdownMenuRoot, {
|
|
1843
|
+
dir: direction
|
|
1844
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuTrigger, {
|
|
1845
|
+
className: triggerClassname
|
|
1846
|
+
}, trigger), /* @__PURE__ */ React22.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React22.createElement(DropdownMenuContent, {
|
|
1847
|
+
side: side,
|
|
1848
|
+
sideOffset: sideOffset,
|
|
1849
|
+
className: cn(className, "flex flex-col gap-1"),
|
|
1850
|
+
align: align,
|
|
1851
|
+
alignOffset: alignOffset
|
|
1852
|
+
}, items.map(function(item, index) {
|
|
1853
|
+
return item.subitems ? /* @__PURE__ */ React22.createElement(DropdownMenuSub, {
|
|
1854
|
+
key: index
|
|
1855
|
+
}, /* @__PURE__ */ React22.createElement(DropdownMenuSubTrigger, {
|
|
1856
|
+
dir: direction
|
|
1857
|
+
}, item.icon && item.icon, item.label), /* @__PURE__ */ React22.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React22.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
|
|
1858
|
+
return /* @__PURE__ */ React22.createElement(DropdownMenuItem, {
|
|
1859
|
+
className: "flex flex-row gap-1",
|
|
1860
|
+
onSelect: function() {
|
|
1861
|
+
return subitem.action();
|
|
1862
|
+
},
|
|
1863
|
+
key: subIndex
|
|
1864
|
+
}, subitem.icon && subitem.icon, subitem.label);
|
|
1865
|
+
})))) : /* @__PURE__ */ React22.createElement(DropdownMenuItem, {
|
|
1866
|
+
className: "flex flex-row gap-1",
|
|
1867
|
+
key: index,
|
|
1868
|
+
onSelect: function() {
|
|
1869
|
+
return item.action();
|
|
1870
|
+
}
|
|
1871
|
+
}, item.icon && item.icon, item.label);
|
|
1872
|
+
}))));
|
|
1873
|
+
};
|
|
1805
1874
|
// src/elements/HawaTable.tsx
|
|
1875
|
+
var ChevronIcon = function() {
|
|
1876
|
+
return /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1877
|
+
"aria-label": "Chevron Right Icon",
|
|
1878
|
+
stroke: "currentColor",
|
|
1879
|
+
fill: "currentColor",
|
|
1880
|
+
"stroke-width": "0",
|
|
1881
|
+
viewBox: "0 0 16 16",
|
|
1882
|
+
height: "1em",
|
|
1883
|
+
width: "1em"
|
|
1884
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1885
|
+
"fill-rule": "evenodd",
|
|
1886
|
+
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"
|
|
1887
|
+
}));
|
|
1888
|
+
};
|
|
1806
1889
|
var HawaTable = function(_param) {
|
|
1807
1890
|
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
1891
|
"size",
|
|
@@ -1815,13 +1898,19 @@ var HawaTable = function(_param) {
|
|
|
1815
1898
|
"pagination"
|
|
1816
1899
|
]);
|
|
1817
1900
|
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,
|
|
1901
|
+
var _ref = _sliced_to_array((0, import_react19.useState)(10), 2), perPage = _ref[0], setPerPage = _ref[1];
|
|
1902
|
+
var _ref1 = _sliced_to_array((0, import_react19.useState)(null), 2), enteredPage = _ref1[0], setEnteredPage = _ref1[1];
|
|
1903
|
+
var _ref2 = _sliced_to_array((0, import_react19.useState)(1), 2), page = _ref2[0], setPage = _ref2[1];
|
|
1904
|
+
var _ref3 = _sliced_to_array((0, import_react19.useState)(null), 2), sortingCol = _ref3[0], setSortingCol = _ref3[1];
|
|
1905
|
+
var _ref4 = _sliced_to_array((0, import_react19.useState)(props.rows), 2), sortedRows = _ref4[0], setSortedRows = _ref4[1];
|
|
1906
|
+
var _ref5 = _sliced_to_array((0, import_react19.useState)(null), 2), sortColumn = _ref5[0], setSortColumn = _ref5[1];
|
|
1907
|
+
var _ref6 = _sliced_to_array((0, import_react19.useState)(null), 2), sortDirection = _ref6[0], setSortDirection = _ref6[1];
|
|
1908
|
+
var _useTable_default = useTable_default(props.rows, page, perPage, sortColumn, sortDirection), slice = _useTable_default.slice, range = _useTable_default.range;
|
|
1909
|
+
var isRTL = direction === "rtl";
|
|
1910
|
+
var sizeStyles2 = {
|
|
1911
|
+
normal: "py-3 px-6",
|
|
1912
|
+
small: "px-3 py-1"
|
|
1913
|
+
};
|
|
1825
1914
|
var handleSort = function(colIndex, sortable) {
|
|
1826
1915
|
if (sortable) {
|
|
1827
1916
|
setSortColumn(colIndex);
|
|
@@ -1830,12 +1919,6 @@ var HawaTable = function(_param) {
|
|
|
1830
1919
|
});
|
|
1831
1920
|
}
|
|
1832
1921
|
};
|
|
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
1922
|
var changePage = function() {
|
|
1840
1923
|
var _slice;
|
|
1841
1924
|
if (((_slice = slice) === null || _slice === void 0 ? void 0 : _slice.length) < 1 && page !== 1) {
|
|
@@ -1845,21 +1928,21 @@ var HawaTable = function(_param) {
|
|
|
1845
1928
|
setPage(enteredPage);
|
|
1846
1929
|
}
|
|
1847
1930
|
};
|
|
1848
|
-
(0,
|
|
1931
|
+
(0, import_react19.useEffect)(function() {
|
|
1849
1932
|
changePage();
|
|
1850
1933
|
}, [
|
|
1851
1934
|
slice,
|
|
1852
1935
|
page
|
|
1853
1936
|
]);
|
|
1854
1937
|
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__ */
|
|
1938
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1856
1939
|
className: "relative flex flex-col gap-2 "
|
|
1857
|
-
}, /* @__PURE__ */
|
|
1940
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1858
1941
|
className: "overflow-x-auto rounded bg-".concat(headerColor)
|
|
1859
|
-
}, props.headerTools && /* @__PURE__ */
|
|
1942
|
+
}, props.headerTools && /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1860
1943
|
className: "flex flex-row items-center justify-between gap-2 border bg-background px-4 py-2"
|
|
1861
|
-
}, /* @__PURE__ */
|
|
1862
|
-
icon: /* @__PURE__ */
|
|
1944
|
+
}, /* @__PURE__ */ import_react19.default.createElement(HawaTextField, {
|
|
1945
|
+
icon: /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1863
1946
|
"aria-label": "Search Icon",
|
|
1864
1947
|
stroke: "currentColor",
|
|
1865
1948
|
fill: "gray",
|
|
@@ -1867,67 +1950,66 @@ var HawaTable = function(_param) {
|
|
|
1867
1950
|
viewBox: "0 0 512 512",
|
|
1868
1951
|
height: "1em",
|
|
1869
1952
|
width: "1em"
|
|
1870
|
-
}, /* @__PURE__ */
|
|
1953
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1871
1954
|
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
1955
|
})),
|
|
1873
1956
|
placeholder: "Search",
|
|
1874
1957
|
width: "full",
|
|
1875
1958
|
margin: "none"
|
|
1876
|
-
}), /* @__PURE__ */
|
|
1959
|
+
}), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1877
1960
|
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) {
|
|
1961
|
+
}, /* @__PURE__ */ import_react19.default.createElement(Button, {
|
|
1962
|
+
className: "flex flex-row gap-2"
|
|
1963
|
+
}, /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
1964
|
+
"aria-label": "Filter Icon",
|
|
1965
|
+
stroke: "currentColor",
|
|
1966
|
+
fill: "currentColor",
|
|
1967
|
+
"stroke-width": "0",
|
|
1968
|
+
viewBox: "0 0 16 16",
|
|
1969
|
+
height: "1em",
|
|
1970
|
+
width: "1em"
|
|
1971
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1972
|
+
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"
|
|
1973
|
+
})), (_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", {
|
|
1974
|
+
"aria-label": "Chevron Right Icon",
|
|
1975
|
+
stroke: "currentColor",
|
|
1976
|
+
fill: "currentColor",
|
|
1977
|
+
"stroke-width": "0",
|
|
1978
|
+
viewBox: "0 0 16 16",
|
|
1979
|
+
height: "1em",
|
|
1980
|
+
width: "1em"
|
|
1981
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
1982
|
+
"fill-rule": "evenodd",
|
|
1983
|
+
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"
|
|
1984
|
+
}))))), /* @__PURE__ */ import_react19.default.createElement("table", {
|
|
1985
|
+
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))
|
|
1986
|
+
}, /* @__PURE__ */ import_react19.default.createElement("thead", {
|
|
1987
|
+
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 " : "")
|
|
1988
|
+
}, /* @__PURE__ */ import_react19.default.createElement("tr", null, props.columns.map(function(col, i) {
|
|
1907
1989
|
if (col.hidden) {
|
|
1908
1990
|
return;
|
|
1909
1991
|
} else {
|
|
1910
|
-
return /* @__PURE__ */
|
|
1992
|
+
return /* @__PURE__ */ import_react19.default.createElement("th", {
|
|
1911
1993
|
onClick: function() {
|
|
1912
1994
|
return col.sortable && handleSort(i, col.sortable);
|
|
1913
1995
|
},
|
|
1914
1996
|
key: i,
|
|
1915
1997
|
scope: "col",
|
|
1916
1998
|
colSpan: 2,
|
|
1917
|
-
className: (0,
|
|
1918
|
-
}, col.value, sortColumn === i && /* @__PURE__ */
|
|
1999
|
+
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]") : "")
|
|
2000
|
+
}, col.value, sortColumn === i && /* @__PURE__ */ import_react19.default.createElement("span", null, sortDirection === "asc" ? " ▲" : " ▼"));
|
|
1919
2001
|
}
|
|
1920
|
-
}), props.actions ? /* @__PURE__ */
|
|
2002
|
+
}), props.actions ? /* @__PURE__ */ import_react19.default.createElement("th", {
|
|
1921
2003
|
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__ */
|
|
2004
|
+
className: (0, import_clsx12.default)(sizeStyles2[size], "w-[calc(1%)] text-center")
|
|
2005
|
+
}, (_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
2006
|
className: bodyColor && props.rows ? "bg-".concat(bodyColor) : "bg-transparent"
|
|
1925
2007
|
}, sortedRows ? (_slice = slice) === null || _slice === void 0 ? void 0 : _slice.map(function(singleRow, rowIndex) {
|
|
1926
2008
|
var _slice, _singleRow;
|
|
1927
2009
|
var lastRow = rowIndex == ((_slice = slice) === null || _slice === void 0 ? void 0 : _slice.length) - 1;
|
|
1928
|
-
return /* @__PURE__ */
|
|
2010
|
+
return /* @__PURE__ */ import_react19.default.createElement("tr", {
|
|
1929
2011
|
key: rowIndex,
|
|
1930
|
-
className: (0,
|
|
2012
|
+
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
2013
|
}, (_singleRow = singleRow) === null || _singleRow === void 0 ? void 0 : _singleRow.map(function(r, i) {
|
|
1932
2014
|
var _singleRow;
|
|
1933
2015
|
var firstCell = i === 0;
|
|
@@ -1939,87 +2021,66 @@ var HawaTable = function(_param) {
|
|
|
1939
2021
|
if (r.hidden) {
|
|
1940
2022
|
return;
|
|
1941
2023
|
} else {
|
|
1942
|
-
return /* @__PURE__ */
|
|
2024
|
+
return /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1943
2025
|
colSpan: 2,
|
|
1944
2026
|
key: i,
|
|
1945
|
-
className: (0,
|
|
2027
|
+
className: (0, import_clsx12.default)(// borders === "outer" ? "border" : "",
|
|
1946
2028
|
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
2029
|
}, r.value, " ", r.suffix && r.suffix);
|
|
1948
2030
|
}
|
|
1949
|
-
}), props.actions
|
|
2031
|
+
}), props.actions && /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1950
2032
|
align: isRTL ? "right" : "left",
|
|
1951
|
-
className: (
|
|
2033
|
+
className: cn(isRTL && lastRow && "rounded-bl rounded-br-none", !isRTL && lastRow && "rounded-bl-none rounded-br"),
|
|
1952
2034
|
colSpan: 1
|
|
1953
|
-
}, /* @__PURE__ */
|
|
2035
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1954
2036
|
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", {
|
|
2037
|
+
}, /* @__PURE__ */ import_react19.default.createElement(DropdownMenu, {
|
|
2038
|
+
direction: direction,
|
|
2039
|
+
side: "right",
|
|
2040
|
+
items: props.actions,
|
|
2041
|
+
trigger: /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2042
|
+
className: "flex w-fit cursor-pointer items-center justify-center rounded p-2 hover:bg-gray-200 dark:hover:bg-gray-600"
|
|
2043
|
+
}, /* @__PURE__ */ import_react19.default.createElement("svg", {
|
|
2044
|
+
"aria-label": "Vertical Three Dots Menu Icon",
|
|
2045
|
+
stroke: "currentColor",
|
|
2046
|
+
fill: "currentColor",
|
|
2047
|
+
"stroke-width": "0",
|
|
2048
|
+
viewBox: "0 0 16 16",
|
|
2049
|
+
height: "1em",
|
|
2050
|
+
width: "1em"
|
|
2051
|
+
}, /* @__PURE__ */ import_react19.default.createElement("path", {
|
|
2052
|
+
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"
|
|
2053
|
+
})))
|
|
2054
|
+
}))));
|
|
2055
|
+
}) : /* @__PURE__ */ import_react19.default.createElement("tr", {
|
|
1984
2056
|
className: "bg-transparent"
|
|
1985
|
-
}, /* @__PURE__ */
|
|
2057
|
+
}, /* @__PURE__ */ import_react19.default.createElement("td", {
|
|
1986
2058
|
colSpan: 20
|
|
1987
|
-
}, /* @__PURE__ */
|
|
1988
|
-
className: (0,
|
|
2059
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2060
|
+
className: (0, import_clsx12.default)("w-full rounded-b border p-5 text-center", // bodyColor ? `bg-${bodyColor}` : "bg-background"
|
|
1989
2061
|
"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__ */
|
|
2062
|
+
}, (_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
2063
|
className: "flex flex-row items-center justify-between "
|
|
1992
|
-
}, range.length > 1 ? /* @__PURE__ */
|
|
2064
|
+
}, range.length > 1 ? /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
1993
2065
|
className: "flex w-fit flex-row items-stretch justify-center gap-2 overflow-clip rounded "
|
|
1994
|
-
}, /* @__PURE__ */
|
|
1995
|
-
className: (
|
|
2066
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2067
|
+
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
2068
|
onClick: function() {
|
|
1997
2069
|
return page <= 1 ? setPage(range.length) : setPage(page - 1);
|
|
1998
2070
|
}
|
|
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", {
|
|
2071
|
+
}, /* @__PURE__ */ import_react19.default.createElement(ChevronIcon, null)), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2011
2072
|
className: "flex flex-row items-center overflow-clip rounded transition-all"
|
|
2012
2073
|
}, range.length > 6 && range.map(function(el, index) {
|
|
2013
2074
|
if (index <= 0) {
|
|
2014
|
-
return /* @__PURE__ */
|
|
2075
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2015
2076
|
key: index,
|
|
2016
|
-
className: (0,
|
|
2077
|
+
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
2078
|
onClick: function() {
|
|
2018
2079
|
return setPage(el);
|
|
2019
2080
|
}
|
|
2020
2081
|
}, el);
|
|
2021
2082
|
}
|
|
2022
|
-
}), ((_range = range) === null || _range === void 0 ? void 0 : _range.length) > 6 && /* @__PURE__ */
|
|
2083
|
+
}), ((_range = range) === null || _range === void 0 ? void 0 : _range.length) > 6 && /* @__PURE__ */ import_react19.default.createElement("input", {
|
|
2023
2084
|
type: "text",
|
|
2024
2085
|
className: " w-10 bg-gray-100 p-1 text-center text-xs",
|
|
2025
2086
|
defaultValue: page !== 0 || page !== range.length - 1 ? page : "...",
|
|
@@ -2035,118 +2096,112 @@ var HawaTable = function(_param) {
|
|
|
2035
2096
|
}
|
|
2036
2097
|
}), ((_range1 = range) === null || _range1 === void 0 ? void 0 : _range1.length) > 6 && range.map(function(el, index) {
|
|
2037
2098
|
if (index >= range.length - 1) {
|
|
2038
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2039
2100
|
key: index,
|
|
2040
|
-
className: (0,
|
|
2101
|
+
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
2102
|
onClick: function() {
|
|
2042
2103
|
return setPage(el);
|
|
2043
2104
|
}
|
|
2044
2105
|
}, el);
|
|
2045
2106
|
}
|
|
2046
2107
|
}), ((_range2 = range) === null || _range2 === void 0 ? void 0 : _range2.length) <= 6 && range.map(function(el, index) {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2108
|
+
return /* @__PURE__ */ import_react19.default.createElement("button", {
|
|
2048
2109
|
key: index,
|
|
2049
|
-
className: (0,
|
|
2110
|
+
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'
|
|
2111
|
+
direction === "rtl" ? // If direction is 'rtl', then check for the index conditions
|
|
2112
|
+
// and apply respective classes along with the 'something' class
|
|
2113
|
+
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
|
|
2114
|
+
// and apply respective classes along with the 'something else' class
|
|
2115
|
+
index === 0 ? "rounded-l border-r-0" : index === range.length - 1 ? "rounded-r border-l-0" : ""),
|
|
2050
2116
|
onClick: function() {
|
|
2051
2117
|
return setPage(el);
|
|
2052
2118
|
}
|
|
2053
2119
|
}, el);
|
|
2054
|
-
})), /* @__PURE__ */
|
|
2120
|
+
})), /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2055
2121
|
onClick: function() {
|
|
2056
2122
|
return page >= range.length ? setPage(1) : setPage(page + 1);
|
|
2057
2123
|
},
|
|
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", {
|
|
2124
|
+
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")
|
|
2125
|
+
}, /* @__PURE__ */ import_react19.default.createElement(ChevronIcon, null))) : /* @__PURE__ */ import_react19.default.createElement("div", null), props.rows ? /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2071
2126
|
className: "flex w-fit flex-row items-center gap-2 "
|
|
2072
|
-
}, /* @__PURE__ */
|
|
2127
|
+
}, /* @__PURE__ */ import_react19.default.createElement("div", {
|
|
2073
2128
|
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__ */
|
|
2129
|
+
}, 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
2130
|
value: perPage,
|
|
2076
2131
|
className: "h-6 cursor-pointer rounded border bg-background px-2 text-xs",
|
|
2077
2132
|
onChange: function(e) {
|
|
2078
2133
|
setPerPage(parseInt(e.target.value));
|
|
2079
2134
|
}
|
|
2080
|
-
}, /* @__PURE__ */
|
|
2135
|
+
}, /* @__PURE__ */ import_react19.default.createElement("option", {
|
|
2081
2136
|
value: 10,
|
|
2082
2137
|
style: {
|
|
2083
2138
|
fontSize: 10
|
|
2084
2139
|
}
|
|
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__ */
|
|
2140
|
+
}, "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
2141
|
value: 20,
|
|
2087
2142
|
style: {
|
|
2088
2143
|
fontSize: 10
|
|
2089
2144
|
}
|
|
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__ */
|
|
2145
|
+
}, "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
2146
|
value: 30,
|
|
2092
2147
|
style: {
|
|
2093
2148
|
fontSize: 10
|
|
2094
2149
|
}
|
|
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__ */
|
|
2150
|
+
}, "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
2151
|
value: 50,
|
|
2097
2152
|
style: {
|
|
2098
2153
|
fontSize: 10
|
|
2099
2154
|
}
|
|
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__ */
|
|
2155
|
+
}, "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
2156
|
value: 100,
|
|
2102
2157
|
style: {
|
|
2103
2158
|
fontSize: 10
|
|
2104
2159
|
}
|
|
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__ */
|
|
2160
|
+
}, "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
2161
|
};
|
|
2107
2162
|
// src/elements/HawaSearchBar.tsx
|
|
2108
|
-
var
|
|
2163
|
+
var import_react20 = __toESM(require("react"));
|
|
2109
2164
|
var HawaSearchBar = function(props) {
|
|
2110
|
-
return /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ import_react20.default.createElement(HawaTextField, _object_spread({
|
|
2111
2166
|
type: "search"
|
|
2112
2167
|
}, props));
|
|
2113
2168
|
};
|
|
2114
2169
|
// src/elements/HawaAccordion.tsx
|
|
2115
|
-
var
|
|
2116
|
-
var
|
|
2170
|
+
var import_react21 = __toESM(require("react"));
|
|
2171
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
2117
2172
|
var HawaAccordion = function(props) {
|
|
2118
|
-
var _ref = _sliced_to_array((0,
|
|
2119
|
-
return /* @__PURE__ */
|
|
2173
|
+
var _ref = _sliced_to_array((0, import_react21.useState)(false), 2), collapse = _ref[0], setCollapse = _ref[1];
|
|
2174
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
2120
2175
|
className: "h-fit w-full"
|
|
2121
|
-
}, /* @__PURE__ */
|
|
2176
|
+
}, /* @__PURE__ */ import_react21.default.createElement("button", {
|
|
2122
2177
|
id: "accordion-collapse-heading-" + props.index,
|
|
2123
2178
|
type: "button",
|
|
2124
|
-
className: (0,
|
|
2179
|
+
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
2180
|
onClick: function() {
|
|
2126
2181
|
return setCollapse(!collapse);
|
|
2127
2182
|
},
|
|
2128
2183
|
"data-accordion-target": "#accordion-collapse-body-" + props.index,
|
|
2129
2184
|
"aria-expanded": "true",
|
|
2130
2185
|
"aria-controls": "accordion-collapse-body-" + props.index
|
|
2131
|
-
}, /* @__PURE__ */
|
|
2186
|
+
}, /* @__PURE__ */ import_react21.default.createElement("span", null, props.title), /* @__PURE__ */ import_react21.default.createElement("svg", {
|
|
2132
2187
|
"data-accordion-icon": "",
|
|
2133
2188
|
className: "h-6 w-6 ".concat(collapse ? "" : "rotate-180", " shrink-0 transition-all"),
|
|
2134
2189
|
fill: "currentColor",
|
|
2135
2190
|
viewBox: "0 0 20 20"
|
|
2136
|
-
}, /* @__PURE__ */
|
|
2191
|
+
}, /* @__PURE__ */ import_react21.default.createElement("path", {
|
|
2137
2192
|
fillRule: "evenodd",
|
|
2138
2193
|
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
2194
|
clipRule: "evenodd"
|
|
2140
|
-
}))), /* @__PURE__ */
|
|
2195
|
+
}))), /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
2141
2196
|
id: "accordion-collapse-body-" + props.index,
|
|
2142
2197
|
"aria-labelledby": "accordion-collapse-heading-" + props.index,
|
|
2143
|
-
className: (0,
|
|
2144
|
-
}, /* @__PURE__ */
|
|
2198
|
+
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")
|
|
2199
|
+
}, /* @__PURE__ */ import_react21.default.createElement("p", {
|
|
2145
2200
|
className: "mb-2 text-gray-500 dark:text-gray-400"
|
|
2146
2201
|
}, props.content)));
|
|
2147
2202
|
};
|
|
2148
2203
|
// src/elements/HawaPhoneInput.tsx
|
|
2149
|
-
var
|
|
2204
|
+
var import_react22 = __toESM(require("react"));
|
|
2150
2205
|
// src/countries.ts
|
|
2151
2206
|
var countries = [
|
|
2152
2207
|
{
|
|
@@ -3849,7 +3904,7 @@ var Menu2 = function(_param) {
|
|
|
3849
3904
|
"innerProps",
|
|
3850
3905
|
"innerRef"
|
|
3851
3906
|
]);
|
|
3852
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", _object_spread({
|
|
3853
3908
|
className: "absolute z-50 w-[190px] rounded border bg-background",
|
|
3854
3909
|
ref: innerRef
|
|
3855
3910
|
}, innerProps), children);
|
|
@@ -3862,28 +3917,28 @@ var Option2 = function(_param) /* @__PURE__ */ {
|
|
|
3862
3917
|
"innerProps",
|
|
3863
3918
|
"innerRef"
|
|
3864
3919
|
]);
|
|
3865
|
-
return
|
|
3920
|
+
return import_react22.default.createElement("div", _object_spread({
|
|
3866
3921
|
ref: innerRef,
|
|
3867
3922
|
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__ */
|
|
3923
|
+
}, innerProps), /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3869
3924
|
className: "flex flex-row items-center justify-center gap-1"
|
|
3870
|
-
}, /* @__PURE__ */
|
|
3925
|
+
}, /* @__PURE__ */ import_react22.default.createElement("img", {
|
|
3871
3926
|
className: "h-8 w-8",
|
|
3872
3927
|
src: props.data.image
|
|
3873
|
-
}), /* @__PURE__ */
|
|
3928
|
+
}), /* @__PURE__ */ import_react22.default.createElement("span", {
|
|
3874
3929
|
className: "text-[10px]"
|
|
3875
3930
|
}, props.data.country_label)), children);
|
|
3876
3931
|
};
|
|
3877
3932
|
var HawaPhoneInput = function(props) {
|
|
3878
|
-
var _ref = _sliced_to_array((0,
|
|
3879
|
-
return /* @__PURE__ */
|
|
3933
|
+
var _ref = _sliced_to_array((0, import_react22.useState)("+966"), 2), selectedCountry = _ref[0], setSelectedCountry = _ref[1];
|
|
3934
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3880
3935
|
className: "mb-3 flex flex-col"
|
|
3881
|
-
}, props.label && /* @__PURE__ */
|
|
3936
|
+
}, props.label && /* @__PURE__ */ import_react22.default.createElement("label", {
|
|
3882
3937
|
className: "mb-2 block text-sm font-medium"
|
|
3883
|
-
}, props.label), /* @__PURE__ */
|
|
3938
|
+
}, props.label), /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
3884
3939
|
dir: "ltr",
|
|
3885
3940
|
className: "flex flex-row "
|
|
3886
|
-
}, /* @__PURE__ */
|
|
3941
|
+
}, /* @__PURE__ */ import_react22.default.createElement(import_react_select2.default, {
|
|
3887
3942
|
classNames: {
|
|
3888
3943
|
// container: () => "cursor-pointer z-10 border rounded-l bg-background",
|
|
3889
3944
|
control: function() {
|
|
@@ -3946,17 +4001,17 @@ var HawaPhoneInput = function(props) {
|
|
|
3946
4001
|
onChange: function(newValue, action) {
|
|
3947
4002
|
return setSelectedCountry(newValue);
|
|
3948
4003
|
}
|
|
3949
|
-
}), /* @__PURE__ */
|
|
4004
|
+
}), /* @__PURE__ */ import_react22.default.createElement("input", {
|
|
3950
4005
|
onChange: props.handleChange,
|
|
3951
4006
|
type: "number",
|
|
3952
4007
|
placeholder: "531045453",
|
|
3953
4008
|
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__ */
|
|
4009
|
+
}), props.helperText && /* @__PURE__ */ import_react22.default.createElement("p", {
|
|
3955
4010
|
className: "mb-1 mt-1 text-xs text-red-600 dark:text-red-500"
|
|
3956
4011
|
}, props.helperText)));
|
|
3957
4012
|
};
|
|
3958
4013
|
// src/elements/HawaTabs.tsx
|
|
3959
|
-
var
|
|
4014
|
+
var import_react23 = __toESM(require("react"));
|
|
3960
4015
|
var HawaTabs = function(_param) {
|
|
3961
4016
|
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
4017
|
"orientation",
|
|
@@ -3966,7 +4021,7 @@ var HawaTabs = function(_param) {
|
|
|
3966
4021
|
"pill"
|
|
3967
4022
|
]);
|
|
3968
4023
|
var _props_options_, _props_options;
|
|
3969
|
-
var _ref = _sliced_to_array((0,
|
|
4024
|
+
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
4025
|
var activeTabStyle = {
|
|
3971
4026
|
vertical: "inline-block py-2 px-4 text-white bg-primary active",
|
|
3972
4027
|
horizontal: "inline-block py-2 px-4 text-white bg-primary active"
|
|
@@ -3997,10 +4052,10 @@ var HawaTabs = function(_param) {
|
|
|
3997
4052
|
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
4053
|
horizontal: "flex w-fit flex-wrap border-b-primary text-center text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
3999
4054
|
};
|
|
4000
|
-
return /* @__PURE__ */
|
|
4055
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4001
4056
|
dir: direction,
|
|
4002
4057
|
className: cn(containerStyle[orientation], props.options[selectedOption] ? "border-b-2" : "border-b-0")
|
|
4003
|
-
}, /* @__PURE__ */
|
|
4058
|
+
}, /* @__PURE__ */ import_react23.default.createElement("ul", {
|
|
4004
4059
|
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
4060
|
// ? direction === "rtl"
|
|
4006
4061
|
// ? "rounded-none rounded-r border-l-2"
|
|
@@ -4008,7 +4063,7 @@ var HawaTabs = function(_param) {
|
|
|
4008
4063
|
// : "border-b-2",
|
|
4009
4064
|
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
4065
|
}, (_props_options = props.options) === null || _props_options === void 0 ? void 0 : _props_options.map(function(opt, o) {
|
|
4011
|
-
return /* @__PURE__ */
|
|
4066
|
+
return /* @__PURE__ */ import_react23.default.createElement("button", {
|
|
4012
4067
|
key: o,
|
|
4013
4068
|
"aria-current": "page",
|
|
4014
4069
|
onClick: function() {
|
|
@@ -4023,18 +4078,18 @@ var HawaTabs = function(_param) {
|
|
|
4023
4078
|
] : 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
4079
|
"flex w-fit flex-row items-center gap-2 transition-all ")
|
|
4025
4080
|
}, opt.icon, opt.label);
|
|
4026
|
-
})), /* @__PURE__ */
|
|
4081
|
+
})), /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4027
4082
|
className: "flex-1 transition-all"
|
|
4028
4083
|
}, props.options.map(function(tab, i) {
|
|
4029
|
-
return /* @__PURE__ */
|
|
4084
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
4030
4085
|
key: i,
|
|
4031
4086
|
className: cn(selectedOption === tab.value ? "" : "hidden")
|
|
4032
4087
|
}, tab.content);
|
|
4033
4088
|
})));
|
|
4034
4089
|
};
|
|
4035
4090
|
// src/elements/HawaModal.tsx
|
|
4036
|
-
var
|
|
4037
|
-
var
|
|
4091
|
+
var import_react24 = __toESM(require("react"));
|
|
4092
|
+
var import_clsx14 = __toESM(require("clsx"));
|
|
4038
4093
|
var HawaModal = function(_param) {
|
|
4039
4094
|
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
4095
|
"open",
|
|
@@ -4043,7 +4098,7 @@ var HawaModal = function(_param) {
|
|
|
4043
4098
|
"closeOnClickOutside"
|
|
4044
4099
|
]);
|
|
4045
4100
|
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,
|
|
4101
|
+
(0, import_react24.useEffect)(function() {
|
|
4047
4102
|
if (closeOnClickOutside && open) {
|
|
4048
4103
|
window.onclick = function(e) {
|
|
4049
4104
|
e.stopPropagation();
|
|
@@ -4056,43 +4111,157 @@ var HawaModal = function(_param) {
|
|
|
4056
4111
|
}, [
|
|
4057
4112
|
open
|
|
4058
4113
|
]);
|
|
4059
|
-
return /* @__PURE__ */
|
|
4060
|
-
className: (0,
|
|
4061
|
-
}, /* @__PURE__ */
|
|
4062
|
-
className: (0,
|
|
4063
|
-
}), /* @__PURE__ */
|
|
4114
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4115
|
+
className: (0, import_clsx14.default)(defaultStyle, open ? "z-10 opacity-100 " : "invisible -z-10 opacity-0")
|
|
4116
|
+
}, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4117
|
+
className: (0, import_clsx14.default)("absolute h-screen w-full bg-gray-500 opacity-50", open ? "opacity-50" : "opacity-0")
|
|
4118
|
+
}), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4064
4119
|
className: "relative w-1/2 max-w-md rounded bg-white p-1 shadow-lg dark:bg-gray-700"
|
|
4065
|
-
}, /* @__PURE__ */
|
|
4120
|
+
}, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4066
4121
|
className: "flex items-start justify-between rounded-t p-3 dark:border-gray-600"
|
|
4067
|
-
}, /* @__PURE__ */
|
|
4122
|
+
}, /* @__PURE__ */ import_react24.default.createElement("h3", {
|
|
4068
4123
|
className: "text-xl font-semibold text-gray-900 dark:text-white"
|
|
4069
|
-
}, title), /* @__PURE__ */
|
|
4124
|
+
}, title), /* @__PURE__ */ import_react24.default.createElement("button", {
|
|
4070
4125
|
type: "button",
|
|
4071
4126
|
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
4127
|
"data-modal-toggle": "defaultModal",
|
|
4073
4128
|
onClick: function(e) {
|
|
4074
4129
|
onClose();
|
|
4075
4130
|
}
|
|
4076
|
-
}, /* @__PURE__ */
|
|
4131
|
+
}, /* @__PURE__ */ import_react24.default.createElement("svg", {
|
|
4077
4132
|
"aria-hidden": "true",
|
|
4078
4133
|
className: "h-5 w-5",
|
|
4079
4134
|
fill: "currentColor",
|
|
4080
4135
|
viewBox: "0 0 20 20"
|
|
4081
|
-
}, /* @__PURE__ */
|
|
4136
|
+
}, /* @__PURE__ */ import_react24.default.createElement("path", {
|
|
4082
4137
|
fillRule: "evenodd",
|
|
4083
4138
|
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
4139
|
clipRule: "evenodd"
|
|
4085
|
-
})), /* @__PURE__ */
|
|
4140
|
+
})), /* @__PURE__ */ import_react24.default.createElement("span", {
|
|
4086
4141
|
className: "sr-only"
|
|
4087
|
-
}, "Close modal"))), /* @__PURE__ */
|
|
4142
|
+
}, "Close modal"))), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4088
4143
|
className: "space-y-6 p-3"
|
|
4089
|
-
}, props.children), /* @__PURE__ */
|
|
4144
|
+
}, props.children), /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4090
4145
|
className: "mx-2 flex items-center justify-end space-x-1 p-0 dark:border-gray-600"
|
|
4091
4146
|
}, props.actions)));
|
|
4092
4147
|
};
|
|
4148
|
+
// src/elements/HawaMenu.tsx
|
|
4149
|
+
var import_react25 = __toESM(require("react"));
|
|
4150
|
+
var import_clsx15 = __toESM(require("clsx"));
|
|
4151
|
+
var HawaMenu = function(param) {
|
|
4152
|
+
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;
|
|
4153
|
+
var _menuItems;
|
|
4154
|
+
var _ref = _sliced_to_array((0, import_react25.useState)(false), 2), menuOpened = _ref[0], setMenuOpened = _ref[1];
|
|
4155
|
+
var childrenRef = (0, import_react25.useRef)(null);
|
|
4156
|
+
var _ref1 = _sliced_to_array((0, import_react25.useState)(null), 2), childrenHeight = _ref1[0], setChildrenHeight = _ref1[1];
|
|
4157
|
+
var _ref2 = _sliced_to_array((0, import_react25.useState)(null), 2), childrenWidth = _ref2[0], setChildrenWidth = _ref2[1];
|
|
4158
|
+
var menuRef = (0, import_react25.useRef)(null);
|
|
4159
|
+
var _ref3 = _sliced_to_array((0, import_react25.useState)(null), 2), menuWidth = _ref3[0], setMenuWidth = _ref3[1];
|
|
4160
|
+
var _ref4 = _sliced_to_array((0, import_react25.useState)(null), 2), menuHeight = _ref4[0], setMenuHeight = _ref4[1];
|
|
4161
|
+
(0, import_react25.useEffect)(function() {
|
|
4162
|
+
var _menuRef_current, _menuRef_current1, _childrenRef_current, _childrenRef_current1;
|
|
4163
|
+
setMenuHeight((_menuRef_current = menuRef.current) === null || _menuRef_current === void 0 ? void 0 : _menuRef_current.getBoundingClientRect().height);
|
|
4164
|
+
setMenuWidth((_menuRef_current1 = menuRef.current) === null || _menuRef_current1 === void 0 ? void 0 : _menuRef_current1.getBoundingClientRect().width);
|
|
4165
|
+
setChildrenHeight((_childrenRef_current = childrenRef.current) === null || _childrenRef_current === void 0 ? void 0 : _childrenRef_current.getBoundingClientRect().height);
|
|
4166
|
+
setChildrenWidth((_childrenRef_current1 = childrenRef.current) === null || _childrenRef_current1 === void 0 ? void 0 : _childrenRef_current1.getBoundingClientRect().width);
|
|
4167
|
+
var handleClickOutside = function(event) {
|
|
4168
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
4169
|
+
setMenuOpened(false);
|
|
4170
|
+
}
|
|
4171
|
+
};
|
|
4172
|
+
document.addEventListener("click", handleClickOutside, true);
|
|
4173
|
+
return function() {
|
|
4174
|
+
document.removeEventListener("click", handleClickOutside, true);
|
|
4175
|
+
};
|
|
4176
|
+
}, [
|
|
4177
|
+
onClickOutside
|
|
4178
|
+
]);
|
|
4179
|
+
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";
|
|
4180
|
+
var sizeStyles2 = {
|
|
4181
|
+
small: "text-[11px] p-1 px-4 m-0",
|
|
4182
|
+
normal: "py-2 px-4",
|
|
4183
|
+
large: ""
|
|
4184
|
+
};
|
|
4185
|
+
var menuCoordinates;
|
|
4186
|
+
var spacing = 5;
|
|
4187
|
+
switch(position){
|
|
4188
|
+
case "top-right":
|
|
4189
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "0px, -".concat(menuHeight + childrenHeight + spacing, "px");
|
|
4190
|
+
break;
|
|
4191
|
+
case "top-left":
|
|
4192
|
+
menuCoordinates = direction === "rtl" ? "".concat(0, "px, -").concat(menuHeight + childrenHeight + spacing, "px") : "-".concat(menuWidth - childrenWidth, "px, -").concat(menuHeight + childrenHeight + spacing, "px");
|
|
4193
|
+
break;
|
|
4194
|
+
case "bottom-right":
|
|
4195
|
+
menuCoordinates = direction === "rtl" ? "-".concat(0, "px, ").concat(spacing, "px") : "-".concat(childrenWidth - menuWidth, "px, ").concat(spacing, "px");
|
|
4196
|
+
break;
|
|
4197
|
+
case "bottom-left":
|
|
4198
|
+
menuCoordinates = direction === "rtl" ? "0px, ".concat(spacing, "px") : "-".concat(menuWidth - childrenWidth, "px,").concat(spacing, "px");
|
|
4199
|
+
break;
|
|
4200
|
+
case "right-bottom":
|
|
4201
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
4202
|
+
break;
|
|
4203
|
+
case "right-top":
|
|
4204
|
+
menuCoordinates = direction === "rtl" ? "".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px") : "".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
4205
|
+
break;
|
|
4206
|
+
case "left-bottom":
|
|
4207
|
+
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(childrenHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(childrenHeight, "px");
|
|
4208
|
+
break;
|
|
4209
|
+
case "left-top":
|
|
4210
|
+
menuCoordinates = direction === "rtl" ? "-".concat(childrenWidth + spacing, "px, -").concat(menuHeight, "px") : "-".concat(menuWidth + spacing, "px, -").concat(menuHeight, "px");
|
|
4211
|
+
break;
|
|
4212
|
+
default:
|
|
4213
|
+
menuCoordinates = "-".concat(menuWidth / 2, "px, -").concat(childrenHeight + menuHeight / 2, "px");
|
|
4214
|
+
break;
|
|
4215
|
+
}
|
|
4216
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4217
|
+
onClick: function() {
|
|
4218
|
+
if (menuOpened) setMenuOpened(false);
|
|
4219
|
+
else setMenuOpened(true);
|
|
4220
|
+
}
|
|
4221
|
+
}, /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4222
|
+
ref: childrenRef
|
|
4223
|
+
}, children), /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4224
|
+
ref: menuRef,
|
|
4225
|
+
style: {
|
|
4226
|
+
position: "absolute",
|
|
4227
|
+
width: "max-content",
|
|
4228
|
+
transform: "translate(".concat(menuCoordinates, ")"),
|
|
4229
|
+
maxWidth: "200px"
|
|
4230
|
+
},
|
|
4231
|
+
className: (0, import_clsx15.default)(defaultStyles, menuOpened ? "opacity-100" : "invisible opacity-0")
|
|
4232
|
+
}, withHeader && /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4233
|
+
className: "px-4 py-3 text-xs text-gray-900 dark:text-white"
|
|
4234
|
+
}, /* @__PURE__ */ import_react25.default.createElement("div", null, headerTitle), /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4235
|
+
className: "truncate font-medium"
|
|
4236
|
+
}, headerSubtitle)), (_menuItems = menuItems) === null || _menuItems === void 0 ? void 0 : _menuItems.map(function(group, o) {
|
|
4237
|
+
var _group;
|
|
4238
|
+
return /* @__PURE__ */ import_react25.default.createElement("ul", {
|
|
4239
|
+
key: o,
|
|
4240
|
+
className: "bg-layout-1200 flex flex-col gap-1 p-1 text-gray-700 dark:text-gray-200"
|
|
4241
|
+
}, (_group = group) === null || _group === void 0 ? void 0 : _group.map(function(item, indx) {
|
|
4242
|
+
return item.element ? /* @__PURE__ */ import_react25.default.createElement("li", {
|
|
4243
|
+
key: indx,
|
|
4244
|
+
className: "cursor-pointer items-center rounded hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4245
|
+
}, item.element) : /* @__PURE__ */ import_react25.default.createElement("li", {
|
|
4246
|
+
key: indx,
|
|
4247
|
+
onClick: function() {
|
|
4248
|
+
if (item.disabled) {
|
|
4249
|
+
console.log("button is disabled");
|
|
4250
|
+
} else {
|
|
4251
|
+
var _item;
|
|
4252
|
+
(_item = item) === null || _item === void 0 ? void 0 : _item.action(actionedItem);
|
|
4253
|
+
}
|
|
4254
|
+
},
|
|
4255
|
+
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])
|
|
4256
|
+
}, item.icon && /* @__PURE__ */ import_react25.default.createElement("div", {
|
|
4257
|
+
className: size === "small" ? "mr-1 rtl:ml-1" : "mr-2 rtl:ml-2"
|
|
4258
|
+
}, item.icon), item.label);
|
|
4259
|
+
}));
|
|
4260
|
+
})));
|
|
4261
|
+
};
|
|
4093
4262
|
// src/elements/HawaDropdownMenu.tsx
|
|
4094
4263
|
var import_react26 = __toESM(require("react"));
|
|
4095
|
-
var
|
|
4264
|
+
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
4096
4265
|
var HawaDropdownMenu = function(param) {
|
|
4097
4266
|
var children = param.children, direction = param.direction;
|
|
4098
4267
|
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 +4303,22 @@ var HawaDropdownMenu = function(param) {
|
|
|
4134
4303
|
}
|
|
4135
4304
|
]
|
|
4136
4305
|
};
|
|
4137
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4306
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Root, {
|
|
4138
4307
|
dir: direction
|
|
4139
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4308
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Trigger, {
|
|
4140
4309
|
asChild: true
|
|
4141
|
-
}, children), /* @__PURE__ */ import_react26.default.createElement(
|
|
4310
|
+
}, children), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Portal, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Content, {
|
|
4142
4311
|
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
4312
|
sideOffset: 5
|
|
4144
4313
|
}, dropdownData.items.map(function(it, i) {
|
|
4145
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4314
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4146
4315
|
key: i,
|
|
4147
4316
|
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
4317
|
disabled: it.disabled
|
|
4149
4318
|
}, it.label, /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4150
4319
|
className: " text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white"
|
|
4151
4320
|
}, it.shortcut));
|
|
4152
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4321
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Sub, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.SubTrigger, {
|
|
4153
4322
|
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
4323
|
}, "More Tools", /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4155
4324
|
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 +4333,31 @@ var HawaDropdownMenu = function(param) {
|
|
|
4164
4333
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4165
4334
|
"fill-rule": "evenodd",
|
|
4166
4335
|
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(
|
|
4336
|
+
})))), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Portal, null, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.SubContent, {
|
|
4168
4337
|
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
4338
|
sideOffset: 2,
|
|
4170
4339
|
alignOffset: -5
|
|
4171
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4340
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4172
4341
|
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
4342
|
}, "Save Page As…", " ", /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4174
4343
|
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(
|
|
4344
|
+
}, "⌘+S")), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4176
4345
|
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(
|
|
4346
|
+
}, "Create Shortcut…"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4178
4347
|
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(
|
|
4348
|
+
}, "Name Window…"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4180
4349
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4181
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4350
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Item, {
|
|
4182
4351
|
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(
|
|
4352
|
+
}, "Developer Tools")))), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4184
4353
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4185
4354
|
}), dropdownData.checkboxes.map(function(ch, i) {
|
|
4186
|
-
return /* @__PURE__ */ import_react26.default.createElement(
|
|
4355
|
+
return /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.CheckboxItem, {
|
|
4187
4356
|
key: i,
|
|
4188
4357
|
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
4358
|
checked: bookmarksChecked,
|
|
4190
4359
|
onCheckedChange: setBookmarksChecked
|
|
4191
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4360
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4192
4361
|
className: "absolute inline-flex w-[25px] items-center justify-center ltr:left-0 rtl:right-0"
|
|
4193
4362
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4194
4363
|
"aria-label": "Check Mark",
|
|
@@ -4203,17 +4372,17 @@ var HawaDropdownMenu = function(param) {
|
|
|
4203
4372
|
})), " "), ch.label, /* @__PURE__ */ import_react26.default.createElement("div", {
|
|
4204
4373
|
className: " text-mauve-11 group-data-[disabled]:text-mauve-8 group-data-[highlighted]:text-white"
|
|
4205
4374
|
}, ch.shortcut));
|
|
4206
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4375
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Separator, {
|
|
4207
4376
|
className: "m-[5px] h-[1px] bg-violet-6"
|
|
4208
|
-
}), /* @__PURE__ */ import_react26.default.createElement(
|
|
4377
|
+
}), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Label, {
|
|
4209
4378
|
className: "pl-[25px] text-xs leading-[25px] text-mauve-11"
|
|
4210
|
-
}, "People"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4379
|
+
}, "People"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioGroup, {
|
|
4211
4380
|
value: person,
|
|
4212
4381
|
onValueChange: setPerson
|
|
4213
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4382
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioItem, {
|
|
4214
4383
|
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
4384
|
value: "pedro"
|
|
4216
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4385
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4217
4386
|
className: "absolute left-0 inline-flex w-[25px] items-center justify-center"
|
|
4218
4387
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4219
4388
|
"aria-label": "Filled Dot",
|
|
@@ -4224,10 +4393,10 @@ var HawaDropdownMenu = function(param) {
|
|
|
4224
4393
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4225
4394
|
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
4395
|
fill: "currentColor"
|
|
4227
|
-
})), " "), "Pedro Duarte"), /* @__PURE__ */ import_react26.default.createElement(
|
|
4396
|
+
})), " "), "Pedro Duarte"), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.RadioItem, {
|
|
4228
4397
|
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
4398
|
value: "colm"
|
|
4230
|
-
}, /* @__PURE__ */ import_react26.default.createElement(
|
|
4399
|
+
}, /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.ItemIndicator, {
|
|
4231
4400
|
className: "absolute left-0 inline-flex w-[25px] items-center justify-center"
|
|
4232
4401
|
}, /* @__PURE__ */ import_react26.default.createElement("svg", {
|
|
4233
4402
|
"aria-label": "Filled Dot",
|
|
@@ -4238,7 +4407,7 @@ var HawaDropdownMenu = function(param) {
|
|
|
4238
4407
|
}, /* @__PURE__ */ import_react26.default.createElement("path", {
|
|
4239
4408
|
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
4409
|
fill: "currentColor"
|
|
4241
|
-
})), " "), "Colm Tuite")), /* @__PURE__ */ import_react26.default.createElement(
|
|
4410
|
+
})), " "), "Colm Tuite")), /* @__PURE__ */ import_react26.default.createElement(DropdownMenu2.Arrow, {
|
|
4242
4411
|
className: "fill-white"
|
|
4243
4412
|
}))));
|
|
4244
4413
|
};
|
|
@@ -4302,63 +4471,64 @@ var HawaStepper = function(_param) {
|
|
|
4302
4471
|
// src/elements/HawaStats.tsx
|
|
4303
4472
|
var import_react30 = __toESM(require("react"));
|
|
4304
4473
|
// src/elements/Card.tsx
|
|
4305
|
-
var
|
|
4306
|
-
var Card =
|
|
4474
|
+
var React33 = __toESM(require("react"));
|
|
4475
|
+
var Card = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4307
4476
|
var className = _param.className, _param_clickable = _param.clickable, clickable = _param_clickable === void 0 ? false : _param_clickable, props = _object_without_properties(_param, [
|
|
4308
4477
|
"className",
|
|
4309
4478
|
"clickable"
|
|
4310
4479
|
]);
|
|
4311
|
-
return
|
|
4480
|
+
return React33.createElement("div", _object_spread({
|
|
4312
4481
|
ref: ref,
|
|
4313
4482
|
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
4483
|
}, props));
|
|
4315
4484
|
});
|
|
4316
4485
|
Card.displayName = "Card";
|
|
4317
|
-
var CardHeader =
|
|
4486
|
+
var CardHeader = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4318
4487
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4319
4488
|
"className"
|
|
4320
4489
|
]);
|
|
4321
|
-
return
|
|
4490
|
+
return React33.createElement("div", _object_spread({
|
|
4322
4491
|
ref: ref,
|
|
4323
4492
|
className: cn("flex flex-col space-y-1.5 p-6", className)
|
|
4324
4493
|
}, props));
|
|
4325
4494
|
});
|
|
4326
4495
|
CardHeader.displayName = "CardHeader";
|
|
4327
|
-
var CardTitle =
|
|
4496
|
+
var CardTitle = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4328
4497
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4329
4498
|
"className"
|
|
4330
4499
|
]);
|
|
4331
|
-
return
|
|
4500
|
+
return React33.createElement("h3", _object_spread({
|
|
4332
4501
|
ref: ref,
|
|
4333
4502
|
className: cn("text-2xl font-semibold leading-none tracking-tight", className)
|
|
4334
4503
|
}, props));
|
|
4335
4504
|
});
|
|
4336
4505
|
CardTitle.displayName = "CardTitle";
|
|
4337
|
-
var CardDescription =
|
|
4506
|
+
var CardDescription = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4338
4507
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
4339
4508
|
"className"
|
|
4340
4509
|
]);
|
|
4341
|
-
return
|
|
4510
|
+
return React33.createElement("p", _object_spread({
|
|
4342
4511
|
ref: ref,
|
|
4343
4512
|
className: cn("text-sm text-muted-foreground", className)
|
|
4344
4513
|
}, props));
|
|
4345
4514
|
});
|
|
4346
4515
|
CardDescription.displayName = "CardDescription";
|
|
4347
|
-
var CardContent =
|
|
4348
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
4516
|
+
var CardContent = React33.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
4517
|
+
var headless = _param.headless, className = _param.className, props = _object_without_properties(_param, [
|
|
4518
|
+
"headless",
|
|
4349
4519
|
"className"
|
|
4350
4520
|
]);
|
|
4351
|
-
return
|
|
4521
|
+
return React33.createElement("div", _object_spread({
|
|
4352
4522
|
ref: ref,
|
|
4353
|
-
className: cn("p-6",
|
|
4523
|
+
className: cn("p-6", 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));
|
|
@@ -6249,7 +6419,7 @@ var HawaItemCard = function(_param) {
|
|
|
6249
6419
|
d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
|
|
6250
6420
|
}))))), header && /* @__PURE__ */ import_react49.default.createElement("h5", {
|
|
6251
6421
|
className: "mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"
|
|
6252
|
-
}, header), content && /* @__PURE__ */ import_react49.default.createElement("
|
|
6422
|
+
}, header), content && /* @__PURE__ */ import_react49.default.createElement("span", {
|
|
6253
6423
|
className: "w-full font-normal text-gray-700 dark:text-gray-400"
|
|
6254
6424
|
}, content), actions || counts ? /* @__PURE__ */ import_react49.default.createElement("div", {
|
|
6255
6425
|
className: (0, import_clsx25.default)("mt-3 flex items-center rounded-b-lg dark:text-white ", actions && counts ? "justify-between" : "justify-end")
|
|
@@ -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,
|
|
@@ -6698,9 +6868,7 @@ var InterfaceSettings = function(_param) {
|
|
|
6698
6868
|
className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90"
|
|
6699
6869
|
}, /* @__PURE__ */ import_react57.default.createElement("path", {
|
|
6700
6870
|
d: "M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",
|
|
6701
|
-
fill: "currentColor"
|
|
6702
|
-
"fill-rule": "evenodd",
|
|
6703
|
-
"clip-rule": "evenodd"
|
|
6871
|
+
fill: "currentColor"
|
|
6704
6872
|
}))
|
|
6705
6873
|
},
|
|
6706
6874
|
{
|
|
@@ -6712,9 +6880,6 @@ var InterfaceSettings = function(_param) {
|
|
|
6712
6880
|
viewBox: "0 0 24 24",
|
|
6713
6881
|
fill: "none",
|
|
6714
6882
|
stroke: "currentColor",
|
|
6715
|
-
"stroke-width": "2",
|
|
6716
|
-
"stroke-linecap": "round",
|
|
6717
|
-
"stroke-linejoin": "round",
|
|
6718
6883
|
className: "h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100"
|
|
6719
6884
|
}, /* @__PURE__ */ import_react57.default.createElement("path", {
|
|
6720
6885
|
d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"
|
|
@@ -6723,184 +6888,6 @@ var InterfaceSettings = function(_param) {
|
|
|
6723
6888
|
]
|
|
6724
6889
|
}));
|
|
6725
6890
|
};
|
|
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
6891
|
// src/elements/Popover.tsx
|
|
6905
6892
|
var React63 = __toESM(require("react"));
|
|
6906
6893
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
@@ -7661,7 +7648,7 @@ var AppLayout = function(_param) {
|
|
|
7661
7648
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
7662
7649
|
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
7663
7650
|
className: "font-bold"
|
|
7664
|
-
}, props.username), " ", /* @__PURE__ */ import_react64.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react64.default.createElement(
|
|
7651
|
+
}, props.username), " ", /* @__PURE__ */ import_react64.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react64.default.createElement(DropdownMenu, {
|
|
7665
7652
|
triggerClassname: "mx-2",
|
|
7666
7653
|
align: "end",
|
|
7667
7654
|
alignOffset: 8,
|
|
@@ -8125,7 +8112,7 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8125
8112
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
8126
8113
|
}, /* @__PURE__ */ import_react66.default.createElement("div", {
|
|
8127
8114
|
className: "font-bold"
|
|
8128
|
-
}, props.username), " ", /* @__PURE__ */ import_react66.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react66.default.createElement(
|
|
8115
|
+
}, props.username), " ", /* @__PURE__ */ import_react66.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react66.default.createElement(DropdownMenu, {
|
|
8129
8116
|
triggerClassname: "mx-2",
|
|
8130
8117
|
align: "end",
|
|
8131
8118
|
alignOffset: 8,
|
|
@@ -9018,7 +9005,7 @@ var import_clsx36 = __toESM(require("clsx"));
|
|
|
9018
9005
|
var SignUpForm = function(props) {
|
|
9019
9006
|
var methods = (0, import_react_hook_form4.useForm)();
|
|
9020
9007
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9021
|
-
var _field_value, _field_value1, _field_value2
|
|
9008
|
+
var _field_value, _field_value1, _field_value2;
|
|
9022
9009
|
return /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9023
9010
|
className: "flex flex-col gap-4"
|
|
9024
9011
|
}, /* @__PURE__ */ import_react76.default.createElement(Card, {
|
|
@@ -9061,6 +9048,7 @@ var SignUpForm = function(props) {
|
|
|
9061
9048
|
if (fld === "email") {
|
|
9062
9049
|
var _field_value1;
|
|
9063
9050
|
return /* @__PURE__ */ import_react76.default.createElement(import_react_hook_form4.Controller, {
|
|
9051
|
+
key: i,
|
|
9064
9052
|
control: control,
|
|
9065
9053
|
name: "email",
|
|
9066
9054
|
render: function(param) {
|
|
@@ -9089,6 +9077,7 @@ var SignUpForm = function(props) {
|
|
|
9089
9077
|
if (fld === "username") {
|
|
9090
9078
|
var _field_value2;
|
|
9091
9079
|
return /* @__PURE__ */ import_react76.default.createElement(import_react_hook_form4.Controller, {
|
|
9080
|
+
key: i,
|
|
9092
9081
|
control: control,
|
|
9093
9082
|
name: "username",
|
|
9094
9083
|
render: function(param) {
|
|
@@ -9159,11 +9148,10 @@ var SignUpForm = function(props) {
|
|
|
9159
9148
|
return /* @__PURE__ */ import_react76.default.createElement(HawaTextField, {
|
|
9160
9149
|
width: "full",
|
|
9161
9150
|
type: "text",
|
|
9162
|
-
defaultValue: (_field_value2 = field.value) !== null && _field_value2 !== void 0 ? _field_value2 : "",
|
|
9163
9151
|
label: props.texts.refCode,
|
|
9164
9152
|
placeholder: props.texts.passwordPlaceholder,
|
|
9165
9153
|
helpertext: (_errors_password = errors.password) === null || _errors_password === void 0 ? void 0 : _errors_password.message,
|
|
9166
|
-
value: (
|
|
9154
|
+
value: (_field_value2 = field.value) !== null && _field_value2 !== void 0 ? _field_value2 : "",
|
|
9167
9155
|
onChange: field.onChange
|
|
9168
9156
|
});
|
|
9169
9157
|
}
|