@sikka/hawa 0.12.11-next → 0.12.13-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +3 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +88 -91
- package/dist/index.mjs +72 -71
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6691,30 +6691,7 @@ var SidebarItem = function(_param) {
|
|
|
6691
6691
|
}
|
|
6692
6692
|
};
|
|
6693
6693
|
// components/layout/AppLayout.tsx
|
|
6694
|
-
var
|
|
6695
|
-
// components/hooks/useBreakpoint.ts
|
|
6696
|
-
var import_react33 = require("react");
|
|
6697
|
-
var useBreakpoint = function() {
|
|
6698
|
-
var _window;
|
|
6699
|
-
var _ref = _sliced_to_array((0, import_react33.useState)((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth), 2), breakpoint = _ref[0], setBreakpoint = _ref[1];
|
|
6700
|
-
var resize = function() {
|
|
6701
|
-
var _window;
|
|
6702
|
-
setBreakpoint((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
|
|
6703
|
-
};
|
|
6704
|
-
(0, import_react33.useEffect)(function() {
|
|
6705
|
-
if (typeof window !== "undefined") {
|
|
6706
|
-
var _window, _window1;
|
|
6707
|
-
setBreakpoint((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
|
|
6708
|
-
(_window1 = window) === null || _window1 === void 0 ? void 0 : _window1.addEventListener("resize", resize);
|
|
6709
|
-
return function() {
|
|
6710
|
-
var _window;
|
|
6711
|
-
(_window = window) === null || _window === void 0 ? void 0 : _window.removeEventListener("resize", resize);
|
|
6712
|
-
};
|
|
6713
|
-
}
|
|
6714
|
-
}, []);
|
|
6715
|
-
return breakpoint;
|
|
6716
|
-
};
|
|
6717
|
-
// components/layout/AppLayout.tsx
|
|
6694
|
+
var import_react33 = __toESM(require("react"));
|
|
6718
6695
|
var AppLayout = function(_param) {
|
|
6719
6696
|
var _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, _param_drawerSize = _param.drawerSize, drawerSize = _param_drawerSize === void 0 ? "md" : _param_drawerSize, onSettingsClick = _param.onSettingsClick, DrawerFooterActions = _param.DrawerFooterActions, currentPage = _param.currentPage, clickedItem = _param.clickedItem, keepOpen = _param.keepOpen, setKeepOpen = _param.setKeepOpen, _param_design = _param.design, design = _param_design === void 0 ? "default" : _param_design, props = _object_without_properties(_param, [
|
|
6720
6697
|
"direction",
|
|
@@ -6742,17 +6719,14 @@ var AppLayout = function(_param) {
|
|
|
6742
6719
|
lg: closeDrawerWidth
|
|
6743
6720
|
}
|
|
6744
6721
|
};
|
|
6745
|
-
var ref = (0,
|
|
6722
|
+
var ref = (0, import_react33.useRef)(null);
|
|
6746
6723
|
var isRTL = direction === "rtl";
|
|
6747
|
-
var _ref = _sliced_to_array((0,
|
|
6748
|
-
var _ref1 = _sliced_to_array((0,
|
|
6749
|
-
var size =
|
|
6750
|
-
|
|
6751
|
-
size = 1200;
|
|
6752
|
-
}
|
|
6753
|
-
var _ref2 = _sliced_to_array((0, import_react34.useState)(size > 600 ? keepOpen : false), 2), openSideMenu = _ref2[0], setOpenSideMenu = _ref2[1];
|
|
6724
|
+
var _ref = _sliced_to_array((0, import_react33.useState)(""), 2), openedSidebarItem = _ref[0], setOpenedSidebarItem = _ref[1];
|
|
6725
|
+
var _ref1 = _sliced_to_array((0, import_react33.useState)(currentPage), 2), selectedItem = _ref1[0], setSelectedItem = _ref1[1];
|
|
6726
|
+
var size = 1200;
|
|
6727
|
+
var _ref2 = _sliced_to_array((0, import_react33.useState)(size > 600 ? keepOpen : false), 2), openSideMenu = _ref2[0], setOpenSideMenu = _ref2[1];
|
|
6754
6728
|
var drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
6755
|
-
(0,
|
|
6729
|
+
(0, import_react33.useEffect)(function() {
|
|
6756
6730
|
var handleClickOutside = function(event) {
|
|
6757
6731
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
6758
6732
|
setOpenSideMenu(false);
|
|
@@ -6765,11 +6739,11 @@ var AppLayout = function(_param) {
|
|
|
6765
6739
|
}, [
|
|
6766
6740
|
keepOpen
|
|
6767
6741
|
]);
|
|
6768
|
-
return /* @__PURE__ */
|
|
6742
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6769
6743
|
className: "hawa-fixed hawa-left-0"
|
|
6770
|
-
}, props.topBar && /* @__PURE__ */
|
|
6744
|
+
}, props.topBar && /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6771
6745
|
className: cn("hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-30 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2", isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row")
|
|
6772
|
-
}, size > 600 ? /* @__PURE__ */
|
|
6746
|
+
}, size > 600 ? /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6773
6747
|
className: cn("dark:hawa-text-white", isRTL ? [
|
|
6774
6748
|
size > 600 ? "hawa-mr-14" : "hawa-mr-2",
|
|
6775
6749
|
keepOpen ? "hawa-mr-40" : ""
|
|
@@ -6783,15 +6757,15 @@ var AppLayout = function(_param) {
|
|
|
6783
6757
|
marginLeft: "".concat(drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize], "px")
|
|
6784
6758
|
}
|
|
6785
6759
|
}, props.pageTitle) : // Mobile Drawer Menu Button
|
|
6786
|
-
/* @__PURE__ */
|
|
6760
|
+
/* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6787
6761
|
dir: direction,
|
|
6788
6762
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
|
6789
|
-
}, /* @__PURE__ */
|
|
6763
|
+
}, /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6790
6764
|
onClick: function() {
|
|
6791
6765
|
return setOpenSideMenu(true);
|
|
6792
6766
|
},
|
|
6793
6767
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
|
6794
|
-
}, /* @__PURE__ */
|
|
6768
|
+
}, /* @__PURE__ */ import_react33.default.createElement("svg", {
|
|
6795
6769
|
stroke: "currentColor",
|
|
6796
6770
|
fill: "currentColor",
|
|
6797
6771
|
strokeWidth: 0,
|
|
@@ -6799,19 +6773,19 @@ var AppLayout = function(_param) {
|
|
|
6799
6773
|
"aria-hidden": "true",
|
|
6800
6774
|
height: "1.6em",
|
|
6801
6775
|
width: "1.6em"
|
|
6802
|
-
}, /* @__PURE__ */
|
|
6776
|
+
}, /* @__PURE__ */ import_react33.default.createElement("path", {
|
|
6803
6777
|
fillRule: "evenodd",
|
|
6804
6778
|
clipRule: "evenodd",
|
|
6805
6779
|
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
6806
|
-
}))), props.pageTitle ? /* @__PURE__ */
|
|
6780
|
+
}))), props.pageTitle ? /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6807
6781
|
className: "hawa-text-sm"
|
|
6808
|
-
}, props.pageTitle) : /* @__PURE__ */
|
|
6782
|
+
}, props.pageTitle) : /* @__PURE__ */ import_react33.default.createElement("div", null)), /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6809
6783
|
className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white", isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row")
|
|
6810
|
-
}, size > 600 ? /* @__PURE__ */
|
|
6784
|
+
}, size > 600 ? /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6811
6785
|
className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
|
|
6812
|
-
}, /* @__PURE__ */
|
|
6786
|
+
}, /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6813
6787
|
className: "hawa-font-bold"
|
|
6814
|
-
}, props.username), " ", /* @__PURE__ */
|
|
6788
|
+
}, props.username), " ", /* @__PURE__ */ import_react33.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react33.default.createElement(DropdownMenu, {
|
|
6815
6789
|
triggerClassname: "hawa-mx-2",
|
|
6816
6790
|
align: "end",
|
|
6817
6791
|
alignOffset: 8,
|
|
@@ -6823,23 +6797,23 @@ var AppLayout = function(_param) {
|
|
|
6823
6797
|
onItemSelect: function(e) {
|
|
6824
6798
|
return console.log("selecting item ", e);
|
|
6825
6799
|
},
|
|
6826
|
-
trigger: /* @__PURE__ */
|
|
6800
|
+
trigger: /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6827
6801
|
className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600"
|
|
6828
|
-
}, props.avatarImage ? /* @__PURE__ */
|
|
6802
|
+
}, props.avatarImage ? /* @__PURE__ */ import_react33.default.createElement("img", {
|
|
6829
6803
|
src: props.avatarImage,
|
|
6830
6804
|
alt: "User Avatar"
|
|
6831
|
-
}) : /* @__PURE__ */
|
|
6805
|
+
}) : /* @__PURE__ */ import_react33.default.createElement("svg", {
|
|
6832
6806
|
"aria-label": "Avatar Icon",
|
|
6833
6807
|
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
|
6834
6808
|
fill: "currentColor",
|
|
6835
6809
|
viewBox: "0 0 20 20"
|
|
6836
|
-
}, /* @__PURE__ */
|
|
6810
|
+
}, /* @__PURE__ */ import_react33.default.createElement("path", {
|
|
6837
6811
|
fillRule: "evenodd",
|
|
6838
6812
|
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
6839
6813
|
clipRule: "evenodd"
|
|
6840
6814
|
})))
|
|
6841
|
-
}))), /* @__PURE__ */
|
|
6842
|
-
className: cn("hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all", design === "floating" ? isRTL ? "hawa-right-5 hawa-top-5" : "hawa-bottom-5 hawa-left-5 hawa-top-5" : isRTL ? "hawa-right-0 hawa-top-0 hawa-h-
|
|
6815
|
+
}))), /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6816
|
+
className: cn("hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all", design === "floating" ? isRTL ? "hawa-right-5 hawa-top-5" : "hawa-bottom-5 hawa-left-5 hawa-top-5" : isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14", "hawa-h-[calc(100dvh)]"),
|
|
6843
6817
|
style: {
|
|
6844
6818
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
6845
6819
|
},
|
|
@@ -6855,27 +6829,32 @@ var AppLayout = function(_param) {
|
|
|
6855
6829
|
}
|
|
6856
6830
|
},
|
|
6857
6831
|
ref: ref
|
|
6858
|
-
}, /* @__PURE__ */
|
|
6832
|
+
}, /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6859
6833
|
onClick: props.onLogoClick,
|
|
6860
6834
|
dir: direction,
|
|
6861
6835
|
className: cn("hawa-fixed hawa-z-50 hawa-mb-2 hawa-flex hawa-h-14 hawa-w-full hawa-flex-row hawa-items-center hawa-justify-center hawa-bg-primary-foreground hawa-transition-all", props.onLogoClick && "hawa-cursor-pointer"),
|
|
6862
6836
|
style: {
|
|
6863
6837
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
6864
6838
|
}
|
|
6865
|
-
}, /* @__PURE__ */
|
|
6839
|
+
}, /* @__PURE__ */ import_react33.default.createElement("img", {
|
|
6866
6840
|
className: cn("hawa-h-9 hawa-opacity-0 hawa-transition-all", !openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100"),
|
|
6867
6841
|
src: props.logoLink
|
|
6868
|
-
}), size > 600 ? /* @__PURE__ */
|
|
6842
|
+
}), size > 600 ? /* @__PURE__ */ import_react33.default.createElement("img", {
|
|
6869
6843
|
className: cn("hawa-fixed hawa-h-9 hawa-transition-all", // isRTL ? "right-2.5" : "left-2.5",
|
|
6870
6844
|
design === "floating" ? isRTL ? "hawa-right-7.5 hawa-top-7" : "hawa-left-7.5 hawa-top-7" : isRTL ? "hawa-right-2.5 hawa-top-2.5" : "hawa-left-2.5 hawa-top-2.5", openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100"),
|
|
6871
6845
|
src: props.logoSymbol
|
|
6872
|
-
}) : null), /* @__PURE__ */
|
|
6873
|
-
className: cn(
|
|
6846
|
+
}) : null), /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6847
|
+
className: cn(// hawa-h-[calc(100dvh)]
|
|
6848
|
+
"hawa-fixed hawa-bottom-14 hawa-bg-primary-foreground hawa-p-0 hawa-py-2 hawa-transition-all", design === "floating" ? "hawa-top-[76px]" : "hawa-top-14", openSideMenu ? "hawa-overflow-auto" : "hawa-overflow-hidden"),
|
|
6874
6849
|
style: {
|
|
6875
|
-
height:
|
|
6876
|
-
|
|
6850
|
+
// height:
|
|
6851
|
+
// design === "floating"
|
|
6852
|
+
// ? "calc(100% - 152px)"
|
|
6853
|
+
// : "0px",
|
|
6854
|
+
// : "calc(100% - 112px)",
|
|
6855
|
+
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : drawerSizeCondition, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
6877
6856
|
}
|
|
6878
|
-
}, /* @__PURE__ */
|
|
6857
|
+
}, /* @__PURE__ */ import_react33.default.createElement(SidebarGroup, {
|
|
6879
6858
|
direction: direction,
|
|
6880
6859
|
onItemClick: function(values) {
|
|
6881
6860
|
if (clickedItem) {
|
|
@@ -6892,18 +6871,18 @@ var AppLayout = function(_param) {
|
|
|
6892
6871
|
setOpenedItem: function(e) {
|
|
6893
6872
|
return setOpenedSidebarItem(e);
|
|
6894
6873
|
},
|
|
6895
|
-
isOpen: openSideMenu,
|
|
6874
|
+
isOpen: keepOpen || openSideMenu,
|
|
6896
6875
|
items: props.drawerItems
|
|
6897
|
-
})), /* @__PURE__ */
|
|
6898
|
-
className: cn("hawa-fixed hawa-flex hawa-h-14
|
|
6876
|
+
})), /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6877
|
+
className: cn("hawa-fixed hawa-flex hawa-h-14 hawa-items-center hawa-justify-center hawa-gap-2 hawa-overflow-clip hawa-bg-primary-foreground hawa-transition-all", direction === "rtl" ? "hawa-flex-row-reverse" : "hawa-flex-row", "hawa-bottom-0"),
|
|
6899
6878
|
style: {
|
|
6900
6879
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
6901
6880
|
}
|
|
6902
|
-
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
|
6881
|
+
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, DrawerFooterActions) : null, size > 600 && openSideMenu ? /* @__PURE__ */ import_react33.default.createElement(Tooltip, {
|
|
6903
6882
|
side: "left",
|
|
6904
6883
|
delayDuration: 500,
|
|
6905
6884
|
content: keepOpen ? ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.collapseSidebar) || "Collapse Sidebar" : ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.expandSidebar) || "Expand Sidebar"
|
|
6906
|
-
}, /* @__PURE__ */
|
|
6885
|
+
}, /* @__PURE__ */ import_react33.default.createElement(Button, {
|
|
6907
6886
|
variant: "light",
|
|
6908
6887
|
onClick: function() {
|
|
6909
6888
|
var newKeepOpenState = !keepOpen;
|
|
@@ -6913,15 +6892,15 @@ var AppLayout = function(_param) {
|
|
|
6913
6892
|
setKeepOpen(newKeepOpenState);
|
|
6914
6893
|
},
|
|
6915
6894
|
size: "smallIcon"
|
|
6916
|
-
}, /* @__PURE__ */
|
|
6895
|
+
}, /* @__PURE__ */ import_react33.default.createElement("svg", {
|
|
6917
6896
|
className: cn("hawa-h-6 hawa-w-6 hawa-shrink-0 hawa-text-primary hawa-transition-all disabled:hawa-bg-gray-200 ", keepOpen ? isRTL ? "hawa--rotate-90" : "hawa-rotate-90" : isRTL ? "hawa-rotate-90" : "hawa--rotate-90"),
|
|
6918
6897
|
fill: "currentColor",
|
|
6919
6898
|
viewBox: "0 0 20 20"
|
|
6920
|
-
}, /* @__PURE__ */
|
|
6899
|
+
}, /* @__PURE__ */ import_react33.default.createElement("path", {
|
|
6921
6900
|
fillRule: "evenodd",
|
|
6922
6901
|
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",
|
|
6923
6902
|
clipRule: "evenodd"
|
|
6924
|
-
})))) : null)), /* @__PURE__ */
|
|
6903
|
+
})))) : null)), /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
6925
6904
|
className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
|
|
6926
6905
|
style: design === "floating" ? isRTL ? {
|
|
6927
6906
|
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
@@ -6947,22 +6926,22 @@ var AppLayout = function(_param) {
|
|
|
6947
6926
|
}, props.children));
|
|
6948
6927
|
};
|
|
6949
6928
|
// components/layout/Copyrights.tsx
|
|
6950
|
-
var
|
|
6929
|
+
var import_react34 = __toESM(require("react"));
|
|
6951
6930
|
var Copyrights = function(props) {
|
|
6952
|
-
return /* @__PURE__ */
|
|
6931
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", {
|
|
6953
6932
|
className: "hawa-my-2 hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-1 hawa-text-xs hawa-text-gray-400"
|
|
6954
|
-
}, props.withLogo ? /* @__PURE__ */
|
|
6933
|
+
}, props.withLogo ? /* @__PURE__ */ import_react34.default.createElement("a", {
|
|
6955
6934
|
href: props.onLogoClicked
|
|
6956
|
-
}, /* @__PURE__ */
|
|
6935
|
+
}, /* @__PURE__ */ import_react34.default.createElement("div", {
|
|
6957
6936
|
className: "hawa-cursor-pointer"
|
|
6958
|
-
}, /* @__PURE__ */
|
|
6937
|
+
}, /* @__PURE__ */ import_react34.default.createElement("image", {
|
|
6959
6938
|
href: props.logoURL,
|
|
6960
6939
|
width: 100,
|
|
6961
6940
|
height: 50
|
|
6962
|
-
}))) : null, /* @__PURE__ */
|
|
6941
|
+
}))) : null, /* @__PURE__ */ import_react34.default.createElement("div", null, props.version), props.credits ? props.credits : null);
|
|
6963
6942
|
};
|
|
6964
6943
|
// components/layout/Navbar.tsx
|
|
6965
|
-
var
|
|
6944
|
+
var import_react35 = __toESM(require("react"));
|
|
6966
6945
|
// components/elements/Collapsible.tsx
|
|
6967
6946
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
6968
6947
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
@@ -6970,58 +6949,76 @@ var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
|
6970
6949
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
6971
6950
|
// components/layout/Navbar.tsx
|
|
6972
6951
|
var Navbar = function(props) {
|
|
6973
|
-
var _ref = _sliced_to_array((0,
|
|
6974
|
-
return /* @__PURE__ */
|
|
6952
|
+
var _ref = _sliced_to_array((0, import_react35.useState)(false), 2), isOpen = _ref[0], setIsOpen = _ref[1];
|
|
6953
|
+
return /* @__PURE__ */ import_react35.default.createElement("nav", {
|
|
6975
6954
|
className: "hawa-bg-gray-800 hawa-p-4 hawa-transition-all"
|
|
6976
|
-
}, /* @__PURE__ */
|
|
6955
|
+
}, /* @__PURE__ */ import_react35.default.createElement(Collapsible, null, /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6977
6956
|
className: "hawa-container hawa-mx-auto hawa-flex hawa-justify-between hawa-items-center"
|
|
6978
|
-
}, /* @__PURE__ */
|
|
6957
|
+
}, /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6979
6958
|
className: "hawa-flex hawa-items-center"
|
|
6980
|
-
}, /* @__PURE__ */
|
|
6959
|
+
}, /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
6981
6960
|
href: "/",
|
|
6982
6961
|
className: "hawa-text-white hawa-text-xl hawa-font-bold"
|
|
6983
|
-
}, "YourLogo")), /* @__PURE__ */
|
|
6962
|
+
}, "YourLogo")), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6984
6963
|
className: "hawa-hidden hawa-md:hawa-flex hawa-space-x-4"
|
|
6985
|
-
}, /* @__PURE__ */
|
|
6964
|
+
}, /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
6986
6965
|
href: "/about",
|
|
6987
6966
|
className: "hawa-text-white"
|
|
6988
|
-
}, "About"), /* @__PURE__ */
|
|
6967
|
+
}, "About"), /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
6989
6968
|
href: "/services",
|
|
6990
6969
|
className: "hawa-text-white"
|
|
6991
|
-
}, "Services"), /* @__PURE__ */
|
|
6970
|
+
}, "Services"), /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
6992
6971
|
href: "/contact",
|
|
6993
6972
|
className: "hawa-text-white"
|
|
6994
|
-
}, "Contact")), /* @__PURE__ */
|
|
6973
|
+
}, "Contact")), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6995
6974
|
className: "hawa-md:hawa-hidden"
|
|
6996
|
-
}, /* @__PURE__ */
|
|
6975
|
+
}, /* @__PURE__ */ import_react35.default.createElement(CollapsibleTrigger2, {
|
|
6997
6976
|
className: "hawa-text-white hawa-p-2",
|
|
6998
6977
|
"aria-label": "Toggle menu"
|
|
6999
|
-
}, /* @__PURE__ */
|
|
6978
|
+
}, /* @__PURE__ */ import_react35.default.createElement("svg", {
|
|
7000
6979
|
className: "hawa-w-6 hawa-h-6",
|
|
7001
6980
|
fill: "none",
|
|
7002
6981
|
stroke: "currentColor",
|
|
7003
6982
|
viewBox: "0 0 24 24",
|
|
7004
6983
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7005
|
-
}, /* @__PURE__ */
|
|
6984
|
+
}, /* @__PURE__ */ import_react35.default.createElement("path", {
|
|
7006
6985
|
strokeLinecap: "round",
|
|
7007
6986
|
strokeLinejoin: "round",
|
|
7008
6987
|
strokeWidth: "2",
|
|
7009
6988
|
d: "M4 6h16M4 12h16m-7 6h7"
|
|
7010
|
-
}))))), /* @__PURE__ */
|
|
6989
|
+
}))))), /* @__PURE__ */ import_react35.default.createElement(CollapsibleContent2, {
|
|
7011
6990
|
className: "hwa-transition-all hawa-fade-in-0 data-[state=open]:hawa-zoom-in-95 data-[state=open]:hawa-animate-in hawa-flex hawa-flex-col hawa-space-y-2 hawa-mt-4"
|
|
7012
|
-
}, /* @__PURE__ */
|
|
6991
|
+
}, /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
7013
6992
|
href: "/about",
|
|
7014
6993
|
className: "hawa-text-white hawa-px-2"
|
|
7015
|
-
}, "About"), /* @__PURE__ */
|
|
6994
|
+
}, "About"), /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
7016
6995
|
href: "/services",
|
|
7017
6996
|
className: "hawa-text-white hawa-px-2"
|
|
7018
|
-
}, "Services"), /* @__PURE__ */
|
|
6997
|
+
}, "Services"), /* @__PURE__ */ import_react35.default.createElement("a", {
|
|
7019
6998
|
href: "/contact",
|
|
7020
6999
|
className: "hawa-text-white hawa-px-2"
|
|
7021
7000
|
}, "Contact"))));
|
|
7022
7001
|
};
|
|
7023
7002
|
// components/layout/DocsLayout.tsx
|
|
7024
7003
|
var import_react38 = __toESM(require("react"));
|
|
7004
|
+
// components/hooks/useBreakpoint.ts
|
|
7005
|
+
var import_react36 = require("react");
|
|
7006
|
+
var useBreakpoint = function() {
|
|
7007
|
+
var _ref = _sliced_to_array((0, import_react36.useState)(null), 2), breakpoint = _ref[0], setBreakpoint = _ref[1];
|
|
7008
|
+
(0, import_react36.useEffect)(function() {
|
|
7009
|
+
if (typeof window !== "undefined") {
|
|
7010
|
+
var resize = function() {
|
|
7011
|
+
setBreakpoint(window.innerWidth);
|
|
7012
|
+
};
|
|
7013
|
+
resize();
|
|
7014
|
+
window.addEventListener("resize", resize);
|
|
7015
|
+
return function() {
|
|
7016
|
+
window.removeEventListener("resize", resize);
|
|
7017
|
+
};
|
|
7018
|
+
}
|
|
7019
|
+
}, []);
|
|
7020
|
+
return breakpoint;
|
|
7021
|
+
};
|
|
7025
7022
|
// components/layout/DocsSidebar.tsx
|
|
7026
7023
|
var import_react37 = __toESM(require("react"));
|
|
7027
7024
|
var DocsSidebar = function(_param) {
|
package/dist/index.mjs
CHANGED
|
@@ -6522,28 +6522,7 @@ var SidebarItem = ({
|
|
|
6522
6522
|
};
|
|
6523
6523
|
|
|
6524
6524
|
// components/layout/AppLayout.tsx
|
|
6525
|
-
import
|
|
6526
|
-
|
|
6527
|
-
// components/hooks/useBreakpoint.ts
|
|
6528
|
-
import { useState as useState21, useEffect as useEffect14 } from "react";
|
|
6529
|
-
var useBreakpoint = () => {
|
|
6530
|
-
const [breakpoint, setBreakpoint] = useState21(window?.innerWidth);
|
|
6531
|
-
const resize = () => {
|
|
6532
|
-
setBreakpoint(window?.innerWidth);
|
|
6533
|
-
};
|
|
6534
|
-
useEffect14(() => {
|
|
6535
|
-
if (typeof window !== "undefined") {
|
|
6536
|
-
setBreakpoint(window?.innerWidth);
|
|
6537
|
-
window?.addEventListener("resize", resize);
|
|
6538
|
-
return () => {
|
|
6539
|
-
window?.removeEventListener("resize", resize);
|
|
6540
|
-
};
|
|
6541
|
-
}
|
|
6542
|
-
}, []);
|
|
6543
|
-
return breakpoint;
|
|
6544
|
-
};
|
|
6545
|
-
|
|
6546
|
-
// components/layout/AppLayout.tsx
|
|
6525
|
+
import React58, { useEffect as useEffect14, useRef as useRef8, useState as useState21 } from "react";
|
|
6547
6526
|
var AppLayout = ({
|
|
6548
6527
|
direction = "ltr",
|
|
6549
6528
|
drawerSize = "md",
|
|
@@ -6572,17 +6551,14 @@ var AppLayout = ({
|
|
|
6572
6551
|
};
|
|
6573
6552
|
const ref = useRef8(null);
|
|
6574
6553
|
const isRTL = direction === "rtl";
|
|
6575
|
-
const [openedSidebarItem, setOpenedSidebarItem] =
|
|
6576
|
-
const [selectedItem, setSelectedItem] =
|
|
6577
|
-
let size =
|
|
6578
|
-
|
|
6579
|
-
size = 1200;
|
|
6580
|
-
}
|
|
6581
|
-
const [openSideMenu, setOpenSideMenu] = useState22(
|
|
6554
|
+
const [openedSidebarItem, setOpenedSidebarItem] = useState21("");
|
|
6555
|
+
const [selectedItem, setSelectedItem] = useState21(currentPage);
|
|
6556
|
+
let size = 1200;
|
|
6557
|
+
const [openSideMenu, setOpenSideMenu] = useState21(
|
|
6582
6558
|
size > 600 ? keepOpen : false
|
|
6583
6559
|
);
|
|
6584
6560
|
let drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
6585
|
-
|
|
6561
|
+
useEffect14(() => {
|
|
6586
6562
|
const handleClickOutside = (event) => {
|
|
6587
6563
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
6588
6564
|
setOpenSideMenu(false);
|
|
@@ -6593,7 +6569,7 @@ var AppLayout = ({
|
|
|
6593
6569
|
document.removeEventListener("click", handleClickOutside, true);
|
|
6594
6570
|
};
|
|
6595
6571
|
}, [keepOpen]);
|
|
6596
|
-
return /* @__PURE__ */
|
|
6572
|
+
return /* @__PURE__ */ React58.createElement("div", { className: "hawa-fixed hawa-left-0" }, props.topBar && /* @__PURE__ */ React58.createElement(
|
|
6597
6573
|
"div",
|
|
6598
6574
|
{
|
|
6599
6575
|
className: cn(
|
|
@@ -6601,7 +6577,7 @@ var AppLayout = ({
|
|
|
6601
6577
|
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
|
|
6602
6578
|
)
|
|
6603
6579
|
},
|
|
6604
|
-
size > 600 ? /* @__PURE__ */
|
|
6580
|
+
size > 600 ? /* @__PURE__ */ React58.createElement(
|
|
6605
6581
|
"div",
|
|
6606
6582
|
{
|
|
6607
6583
|
className: cn(
|
|
@@ -6623,19 +6599,19 @@ var AppLayout = ({
|
|
|
6623
6599
|
props.pageTitle
|
|
6624
6600
|
) : (
|
|
6625
6601
|
// Mobile Drawer Menu Button
|
|
6626
|
-
/* @__PURE__ */
|
|
6602
|
+
/* @__PURE__ */ React58.createElement(
|
|
6627
6603
|
"div",
|
|
6628
6604
|
{
|
|
6629
6605
|
dir: direction,
|
|
6630
6606
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
|
6631
6607
|
},
|
|
6632
|
-
/* @__PURE__ */
|
|
6608
|
+
/* @__PURE__ */ React58.createElement(
|
|
6633
6609
|
"div",
|
|
6634
6610
|
{
|
|
6635
6611
|
onClick: () => setOpenSideMenu(true),
|
|
6636
6612
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
|
6637
6613
|
},
|
|
6638
|
-
/* @__PURE__ */
|
|
6614
|
+
/* @__PURE__ */ React58.createElement(
|
|
6639
6615
|
"svg",
|
|
6640
6616
|
{
|
|
6641
6617
|
stroke: "currentColor",
|
|
@@ -6646,7 +6622,7 @@ var AppLayout = ({
|
|
|
6646
6622
|
height: "1.6em",
|
|
6647
6623
|
width: "1.6em"
|
|
6648
6624
|
},
|
|
6649
|
-
/* @__PURE__ */
|
|
6625
|
+
/* @__PURE__ */ React58.createElement(
|
|
6650
6626
|
"path",
|
|
6651
6627
|
{
|
|
6652
6628
|
fillRule: "evenodd",
|
|
@@ -6656,10 +6632,10 @@ var AppLayout = ({
|
|
|
6656
6632
|
)
|
|
6657
6633
|
)
|
|
6658
6634
|
),
|
|
6659
|
-
props.pageTitle ? /* @__PURE__ */
|
|
6635
|
+
props.pageTitle ? /* @__PURE__ */ React58.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React58.createElement("div", null)
|
|
6660
6636
|
)
|
|
6661
6637
|
),
|
|
6662
|
-
/* @__PURE__ */
|
|
6638
|
+
/* @__PURE__ */ React58.createElement(
|
|
6663
6639
|
"div",
|
|
6664
6640
|
{
|
|
6665
6641
|
className: cn(
|
|
@@ -6667,16 +6643,16 @@ var AppLayout = ({
|
|
|
6667
6643
|
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
|
|
6668
6644
|
)
|
|
6669
6645
|
},
|
|
6670
|
-
size > 600 ? /* @__PURE__ */
|
|
6646
|
+
size > 600 ? /* @__PURE__ */ React58.createElement(
|
|
6671
6647
|
"div",
|
|
6672
6648
|
{
|
|
6673
6649
|
className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
|
|
6674
6650
|
},
|
|
6675
|
-
/* @__PURE__ */
|
|
6651
|
+
/* @__PURE__ */ React58.createElement("div", { className: "hawa-font-bold" }, props.username),
|
|
6676
6652
|
" ",
|
|
6677
|
-
/* @__PURE__ */
|
|
6653
|
+
/* @__PURE__ */ React58.createElement("div", null, props.email)
|
|
6678
6654
|
) : null,
|
|
6679
|
-
/* @__PURE__ */
|
|
6655
|
+
/* @__PURE__ */ React58.createElement(
|
|
6680
6656
|
DropdownMenu,
|
|
6681
6657
|
{
|
|
6682
6658
|
triggerClassname: "hawa-mx-2",
|
|
@@ -6688,7 +6664,7 @@ var AppLayout = ({
|
|
|
6688
6664
|
direction: isRTL ? "rtl" : "ltr",
|
|
6689
6665
|
items: props.profileMenuItems,
|
|
6690
6666
|
onItemSelect: (e) => console.log("selecting item ", e),
|
|
6691
|
-
trigger: /* @__PURE__ */
|
|
6667
|
+
trigger: /* @__PURE__ */ React58.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ React58.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React58.createElement(
|
|
6692
6668
|
"svg",
|
|
6693
6669
|
{
|
|
6694
6670
|
"aria-label": "Avatar Icon",
|
|
@@ -6696,7 +6672,7 @@ var AppLayout = ({
|
|
|
6696
6672
|
fill: "currentColor",
|
|
6697
6673
|
viewBox: "0 0 20 20"
|
|
6698
6674
|
},
|
|
6699
|
-
/* @__PURE__ */
|
|
6675
|
+
/* @__PURE__ */ React58.createElement(
|
|
6700
6676
|
"path",
|
|
6701
6677
|
{
|
|
6702
6678
|
fillRule: "evenodd",
|
|
@@ -6708,12 +6684,13 @@ var AppLayout = ({
|
|
|
6708
6684
|
}
|
|
6709
6685
|
)
|
|
6710
6686
|
)
|
|
6711
|
-
), /* @__PURE__ */
|
|
6687
|
+
), /* @__PURE__ */ React58.createElement(
|
|
6712
6688
|
"div",
|
|
6713
6689
|
{
|
|
6714
6690
|
className: cn(
|
|
6715
6691
|
"hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all",
|
|
6716
|
-
design === "floating" ? isRTL ? "hawa-right-5 hawa-top-5" : "hawa-bottom-5 hawa-left-5 hawa-top-5" : isRTL ? "hawa-right-0 hawa-top-0 hawa-h-
|
|
6692
|
+
design === "floating" ? isRTL ? "hawa-right-5 hawa-top-5" : "hawa-bottom-5 hawa-left-5 hawa-top-5" : isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14",
|
|
6693
|
+
"hawa-h-[calc(100dvh)]"
|
|
6717
6694
|
),
|
|
6718
6695
|
style: {
|
|
6719
6696
|
width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
|
|
@@ -6731,7 +6708,7 @@ var AppLayout = ({
|
|
|
6731
6708
|
},
|
|
6732
6709
|
ref
|
|
6733
6710
|
},
|
|
6734
|
-
/* @__PURE__ */
|
|
6711
|
+
/* @__PURE__ */ React58.createElement(
|
|
6735
6712
|
"div",
|
|
6736
6713
|
{
|
|
6737
6714
|
onClick: props.onLogoClick,
|
|
@@ -6744,7 +6721,7 @@ var AppLayout = ({
|
|
|
6744
6721
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
|
6745
6722
|
}
|
|
6746
6723
|
},
|
|
6747
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ React58.createElement(
|
|
6748
6725
|
"img",
|
|
6749
6726
|
{
|
|
6750
6727
|
className: cn(
|
|
@@ -6754,7 +6731,7 @@ var AppLayout = ({
|
|
|
6754
6731
|
src: props.logoLink
|
|
6755
6732
|
}
|
|
6756
6733
|
),
|
|
6757
|
-
size > 600 ? /* @__PURE__ */
|
|
6734
|
+
size > 600 ? /* @__PURE__ */ React58.createElement(
|
|
6758
6735
|
"img",
|
|
6759
6736
|
{
|
|
6760
6737
|
className: cn(
|
|
@@ -6767,20 +6744,25 @@ var AppLayout = ({
|
|
|
6767
6744
|
}
|
|
6768
6745
|
) : null
|
|
6769
6746
|
),
|
|
6770
|
-
/* @__PURE__ */
|
|
6747
|
+
/* @__PURE__ */ React58.createElement(
|
|
6771
6748
|
"div",
|
|
6772
6749
|
{
|
|
6773
6750
|
className: cn(
|
|
6751
|
+
// hawa-h-[calc(100dvh)]
|
|
6774
6752
|
"hawa-fixed hawa-bottom-14 hawa-bg-primary-foreground hawa-p-0 hawa-py-2 hawa-transition-all",
|
|
6775
6753
|
design === "floating" ? "hawa-top-[76px]" : "hawa-top-14",
|
|
6776
6754
|
openSideMenu ? "hawa-overflow-auto" : "hawa-overflow-hidden"
|
|
6777
6755
|
),
|
|
6778
6756
|
style: {
|
|
6779
|
-
height:
|
|
6780
|
-
|
|
6757
|
+
// height:
|
|
6758
|
+
// design === "floating"
|
|
6759
|
+
// ? "calc(100% - 152px)"
|
|
6760
|
+
// : "0px",
|
|
6761
|
+
// : "calc(100% - 112px)",
|
|
6762
|
+
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
|
6781
6763
|
}
|
|
6782
6764
|
},
|
|
6783
|
-
/* @__PURE__ */
|
|
6765
|
+
/* @__PURE__ */ React58.createElement(
|
|
6784
6766
|
SidebarGroup,
|
|
6785
6767
|
{
|
|
6786
6768
|
direction,
|
|
@@ -6797,32 +6779,32 @@ var AppLayout = ({
|
|
|
6797
6779
|
selectedItem: currentPage,
|
|
6798
6780
|
openedItem: openedSidebarItem,
|
|
6799
6781
|
setOpenedItem: (e) => setOpenedSidebarItem(e),
|
|
6800
|
-
isOpen: openSideMenu,
|
|
6782
|
+
isOpen: keepOpen || openSideMenu,
|
|
6801
6783
|
items: props.drawerItems
|
|
6802
6784
|
}
|
|
6803
6785
|
)
|
|
6804
6786
|
),
|
|
6805
|
-
/* @__PURE__ */
|
|
6787
|
+
/* @__PURE__ */ React58.createElement(
|
|
6806
6788
|
"div",
|
|
6807
6789
|
{
|
|
6808
6790
|
className: cn(
|
|
6809
|
-
"hawa-fixed hawa-flex hawa-h-14
|
|
6791
|
+
"hawa-fixed hawa-flex hawa-h-14 hawa-items-center hawa-justify-center hawa-gap-2 hawa-overflow-clip hawa-bg-primary-foreground hawa-transition-all",
|
|
6810
6792
|
direction === "rtl" ? "hawa-flex-row-reverse" : "hawa-flex-row",
|
|
6811
|
-
|
|
6793
|
+
"hawa-bottom-0"
|
|
6812
6794
|
),
|
|
6813
6795
|
style: {
|
|
6814
6796
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
|
6815
6797
|
}
|
|
6816
6798
|
},
|
|
6817
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
|
6818
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
|
6799
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, DrawerFooterActions) : null,
|
|
6800
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ React58.createElement(
|
|
6819
6801
|
Tooltip,
|
|
6820
6802
|
{
|
|
6821
6803
|
side: "left",
|
|
6822
6804
|
delayDuration: 500,
|
|
6823
6805
|
content: keepOpen ? props.texts?.collapseSidebar || "Collapse Sidebar" : props.texts?.expandSidebar || "Expand Sidebar"
|
|
6824
6806
|
},
|
|
6825
|
-
/* @__PURE__ */
|
|
6807
|
+
/* @__PURE__ */ React58.createElement(
|
|
6826
6808
|
Button,
|
|
6827
6809
|
{
|
|
6828
6810
|
variant: "light",
|
|
@@ -6835,7 +6817,7 @@ var AppLayout = ({
|
|
|
6835
6817
|
},
|
|
6836
6818
|
size: "smallIcon"
|
|
6837
6819
|
},
|
|
6838
|
-
/* @__PURE__ */
|
|
6820
|
+
/* @__PURE__ */ React58.createElement(
|
|
6839
6821
|
"svg",
|
|
6840
6822
|
{
|
|
6841
6823
|
className: cn(
|
|
@@ -6845,7 +6827,7 @@ var AppLayout = ({
|
|
|
6845
6827
|
fill: "currentColor",
|
|
6846
6828
|
viewBox: "0 0 20 20"
|
|
6847
6829
|
},
|
|
6848
|
-
/* @__PURE__ */
|
|
6830
|
+
/* @__PURE__ */ React58.createElement(
|
|
6849
6831
|
"path",
|
|
6850
6832
|
{
|
|
6851
6833
|
fillRule: "evenodd",
|
|
@@ -6857,7 +6839,7 @@ var AppLayout = ({
|
|
|
6857
6839
|
)
|
|
6858
6840
|
) : null
|
|
6859
6841
|
)
|
|
6860
|
-
), /* @__PURE__ */
|
|
6842
|
+
), /* @__PURE__ */ React58.createElement(
|
|
6861
6843
|
"div",
|
|
6862
6844
|
{
|
|
6863
6845
|
className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
|
|
@@ -6888,13 +6870,13 @@ var AppLayout = ({
|
|
|
6888
6870
|
};
|
|
6889
6871
|
|
|
6890
6872
|
// components/layout/Copyrights.tsx
|
|
6891
|
-
import
|
|
6873
|
+
import React59 from "react";
|
|
6892
6874
|
var Copyrights = (props) => {
|
|
6893
|
-
return /* @__PURE__ */
|
|
6875
|
+
return /* @__PURE__ */ React59.createElement("div", { className: "hawa-my-2 hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-1 hawa-text-xs hawa-text-gray-400" }, props.withLogo ? /* @__PURE__ */ React59.createElement("a", { href: props.onLogoClicked }, /* @__PURE__ */ React59.createElement("div", { className: "hawa-cursor-pointer" }, /* @__PURE__ */ React59.createElement("image", { href: props.logoURL, width: 100, height: 50 }))) : null, /* @__PURE__ */ React59.createElement("div", null, props.version), props.credits ? props.credits : null);
|
|
6894
6876
|
};
|
|
6895
6877
|
|
|
6896
6878
|
// components/layout/Navbar.tsx
|
|
6897
|
-
import
|
|
6879
|
+
import React60, { useState as useState22 } from "react";
|
|
6898
6880
|
|
|
6899
6881
|
// components/elements/Collapsible.tsx
|
|
6900
6882
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
@@ -6904,14 +6886,14 @@ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
|
6904
6886
|
|
|
6905
6887
|
// components/layout/Navbar.tsx
|
|
6906
6888
|
var Navbar = (props) => {
|
|
6907
|
-
const [isOpen, setIsOpen] =
|
|
6908
|
-
return /* @__PURE__ */
|
|
6889
|
+
const [isOpen, setIsOpen] = useState22(false);
|
|
6890
|
+
return /* @__PURE__ */ React60.createElement("nav", { className: "hawa-bg-gray-800 hawa-p-4 hawa-transition-all" }, /* @__PURE__ */ React60.createElement(Collapsible, null, /* @__PURE__ */ React60.createElement("div", { className: "hawa-container hawa-mx-auto hawa-flex hawa-justify-between hawa-items-center" }, /* @__PURE__ */ React60.createElement("div", { className: "hawa-flex hawa-items-center" }, /* @__PURE__ */ React60.createElement("a", { href: "/", className: "hawa-text-white hawa-text-xl hawa-font-bold" }, "YourLogo")), /* @__PURE__ */ React60.createElement("div", { className: "hawa-hidden hawa-md:hawa-flex hawa-space-x-4" }, /* @__PURE__ */ React60.createElement("a", { href: "/about", className: "hawa-text-white" }, "About"), /* @__PURE__ */ React60.createElement("a", { href: "/services", className: "hawa-text-white" }, "Services"), /* @__PURE__ */ React60.createElement("a", { href: "/contact", className: "hawa-text-white" }, "Contact")), /* @__PURE__ */ React60.createElement("div", { className: "hawa-md:hawa-hidden" }, /* @__PURE__ */ React60.createElement(
|
|
6909
6891
|
CollapsibleTrigger2,
|
|
6910
6892
|
{
|
|
6911
6893
|
className: "hawa-text-white hawa-p-2",
|
|
6912
6894
|
"aria-label": "Toggle menu"
|
|
6913
6895
|
},
|
|
6914
|
-
/* @__PURE__ */
|
|
6896
|
+
/* @__PURE__ */ React60.createElement(
|
|
6915
6897
|
"svg",
|
|
6916
6898
|
{
|
|
6917
6899
|
className: "hawa-w-6 hawa-h-6",
|
|
@@ -6920,7 +6902,7 @@ var Navbar = (props) => {
|
|
|
6920
6902
|
viewBox: "0 0 24 24",
|
|
6921
6903
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6922
6904
|
},
|
|
6923
|
-
/* @__PURE__ */
|
|
6905
|
+
/* @__PURE__ */ React60.createElement(
|
|
6924
6906
|
"path",
|
|
6925
6907
|
{
|
|
6926
6908
|
strokeLinecap: "round",
|
|
@@ -6930,12 +6912,31 @@ var Navbar = (props) => {
|
|
|
6930
6912
|
}
|
|
6931
6913
|
)
|
|
6932
6914
|
)
|
|
6933
|
-
))), /* @__PURE__ */
|
|
6915
|
+
))), /* @__PURE__ */ React60.createElement(CollapsibleContent2, { className: "hwa-transition-all hawa-fade-in-0 data-[state=open]:hawa-zoom-in-95 data-[state=open]:hawa-animate-in hawa-flex hawa-flex-col hawa-space-y-2 hawa-mt-4" }, /* @__PURE__ */ React60.createElement("a", { href: "/about", className: "hawa-text-white hawa-px-2" }, "About"), /* @__PURE__ */ React60.createElement("a", { href: "/services", className: "hawa-text-white hawa-px-2" }, "Services"), /* @__PURE__ */ React60.createElement("a", { href: "/contact", className: "hawa-text-white hawa-px-2" }, "Contact"))));
|
|
6934
6916
|
};
|
|
6935
6917
|
|
|
6936
6918
|
// components/layout/DocsLayout.tsx
|
|
6937
6919
|
import React63, { useEffect as useEffect16, useRef as useRef9, useState as useState24 } from "react";
|
|
6938
6920
|
|
|
6921
|
+
// components/hooks/useBreakpoint.ts
|
|
6922
|
+
import { useState as useState23, useEffect as useEffect15 } from "react";
|
|
6923
|
+
var useBreakpoint = () => {
|
|
6924
|
+
const [breakpoint, setBreakpoint] = useState23(null);
|
|
6925
|
+
useEffect15(() => {
|
|
6926
|
+
if (typeof window !== "undefined") {
|
|
6927
|
+
const resize = () => {
|
|
6928
|
+
setBreakpoint(window.innerWidth);
|
|
6929
|
+
};
|
|
6930
|
+
resize();
|
|
6931
|
+
window.addEventListener("resize", resize);
|
|
6932
|
+
return () => {
|
|
6933
|
+
window.removeEventListener("resize", resize);
|
|
6934
|
+
};
|
|
6935
|
+
}
|
|
6936
|
+
}, []);
|
|
6937
|
+
return breakpoint;
|
|
6938
|
+
};
|
|
6939
|
+
|
|
6939
6940
|
// components/layout/DocsSidebar.tsx
|
|
6940
6941
|
import React62 from "react";
|
|
6941
6942
|
var DocsSidebar = ({ test, ...props }) => {
|