@sikka/hawa 0.12.14-next → 0.12.15-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 +0 -12
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -33
- package/dist/index.mjs +33 -42
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -751,9 +751,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
751
751
|
.hawa-bottom-4 {
|
|
752
752
|
bottom: 1rem;
|
|
753
753
|
}
|
|
754
|
-
.hawa-bottom-5 {
|
|
755
|
-
bottom: 1.25rem;
|
|
756
|
-
}
|
|
757
754
|
.hawa-left-0 {
|
|
758
755
|
left: 0px;
|
|
759
756
|
}
|
|
@@ -769,9 +766,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
769
766
|
.hawa-left-4 {
|
|
770
767
|
left: 1rem;
|
|
771
768
|
}
|
|
772
|
-
.hawa-left-5 {
|
|
773
|
-
left: 1.25rem;
|
|
774
|
-
}
|
|
775
769
|
.hawa-left-\[50\%\] {
|
|
776
770
|
left: 50%;
|
|
777
771
|
}
|
|
@@ -790,9 +784,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
790
784
|
.hawa-right-4 {
|
|
791
785
|
right: 1rem;
|
|
792
786
|
}
|
|
793
|
-
.hawa-right-5 {
|
|
794
|
-
right: 1.25rem;
|
|
795
|
-
}
|
|
796
787
|
.hawa-top-0 {
|
|
797
788
|
top: 0px;
|
|
798
789
|
}
|
|
@@ -811,9 +802,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
811
802
|
.hawa-top-4 {
|
|
812
803
|
top: 1rem;
|
|
813
804
|
}
|
|
814
|
-
.hawa-top-5 {
|
|
815
|
-
top: 1.25rem;
|
|
816
|
-
}
|
|
817
805
|
.hawa-top-\[1px\] {
|
|
818
806
|
top: 1px;
|
|
819
807
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -875,7 +875,7 @@ type NavbarType = {
|
|
|
875
875
|
declare const Navbar: React__default.FC<NavbarType>;
|
|
876
876
|
|
|
877
877
|
type AppLayoutTypes$1 = {
|
|
878
|
-
design?: "default"
|
|
878
|
+
design?: "default";
|
|
879
879
|
/** The pages of the side drawer */
|
|
880
880
|
drawerItems: Item[];
|
|
881
881
|
/** The direction of the layout */
|
package/dist/index.d.ts
CHANGED
|
@@ -875,7 +875,7 @@ type NavbarType = {
|
|
|
875
875
|
declare const Navbar: React__default.FC<NavbarType>;
|
|
876
876
|
|
|
877
877
|
type AppLayoutTypes$1 = {
|
|
878
|
-
design?: "default"
|
|
878
|
+
design?: "default";
|
|
879
879
|
/** The pages of the side drawer */
|
|
880
880
|
drawerItems: Item[];
|
|
881
881
|
/** The direction of the layout */
|
package/dist/index.js
CHANGED
|
@@ -6800,7 +6800,7 @@ var AppLayout = function(_param) {
|
|
|
6800
6800
|
var isRTL = direction === "rtl";
|
|
6801
6801
|
var _ref = _sliced_to_array((0, import_react35.useState)(""), 2), openedSidebarItem = _ref[0], setOpenedSidebarItem = _ref[1];
|
|
6802
6802
|
var _ref1 = _sliced_to_array((0, import_react35.useState)(1200), 2), size = _ref1[0], setSize = _ref1[1];
|
|
6803
|
-
var _ref2 = _sliced_to_array((0, import_react35.useState)(
|
|
6803
|
+
var _ref2 = _sliced_to_array((0, import_react35.useState)(true), 2), openSideMenu = _ref2[0], setOpenSideMenu = _ref2[1];
|
|
6804
6804
|
var drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
6805
6805
|
(0, import_react35.useEffect)(function() {
|
|
6806
6806
|
if (typeof window !== "undefined") {
|
|
@@ -6814,6 +6814,15 @@ var AppLayout = function(_param) {
|
|
|
6814
6814
|
};
|
|
6815
6815
|
}
|
|
6816
6816
|
}, []);
|
|
6817
|
+
(0, import_react35.useEffect)(function() {
|
|
6818
|
+
if (size > 600) {
|
|
6819
|
+
setOpenSideMenu(keepOpen);
|
|
6820
|
+
} else {
|
|
6821
|
+
setOpenSideMenu(false);
|
|
6822
|
+
}
|
|
6823
|
+
}, [
|
|
6824
|
+
size
|
|
6825
|
+
]);
|
|
6817
6826
|
(0, import_react35.useEffect)(function() {
|
|
6818
6827
|
var handleClickOutside = function(event) {
|
|
6819
6828
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
@@ -6853,19 +6862,7 @@ var AppLayout = function(_param) {
|
|
|
6853
6862
|
return setOpenSideMenu(true);
|
|
6854
6863
|
},
|
|
6855
6864
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
|
6856
|
-
}, /* @__PURE__ */ import_react35.default.createElement("
|
|
6857
|
-
stroke: "currentColor",
|
|
6858
|
-
fill: "currentColor",
|
|
6859
|
-
strokeWidth: 0,
|
|
6860
|
-
viewBox: "0 0 20 20",
|
|
6861
|
-
"aria-hidden": "true",
|
|
6862
|
-
height: "1.6em",
|
|
6863
|
-
width: "1.6em"
|
|
6864
|
-
}, /* @__PURE__ */ import_react35.default.createElement("path", {
|
|
6865
|
-
fillRule: "evenodd",
|
|
6866
|
-
clipRule: "evenodd",
|
|
6867
|
-
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"
|
|
6868
|
-
}))), props.pageTitle ? /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6865
|
+
}, /* @__PURE__ */ import_react35.default.createElement(MenuIcon, null)), props.pageTitle ? /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6869
6866
|
className: "hawa-text-sm"
|
|
6870
6867
|
}, props.pageTitle) : /* @__PURE__ */ import_react35.default.createElement("div", null)), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6871
6868
|
className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white", isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row")
|
|
@@ -6901,7 +6898,7 @@ var AppLayout = function(_param) {
|
|
|
6901
6898
|
clipRule: "evenodd"
|
|
6902
6899
|
})))
|
|
6903
6900
|
}))), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6904
|
-
className: cn("hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all",
|
|
6901
|
+
className: cn("hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all", isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14", "hawa-h-[calc(100dvh)]"),
|
|
6905
6902
|
style: {
|
|
6906
6903
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
6907
6904
|
},
|
|
@@ -6935,14 +6932,8 @@ var AppLayout = function(_param) {
|
|
|
6935
6932
|
className: cn("hawa-fixed hawa-h-9 hawa-transition-all", 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"),
|
|
6936
6933
|
src: props.logoSymbol
|
|
6937
6934
|
}) : null), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6938
|
-
className: cn(
|
|
6939
|
-
"hawa-fixed hawa-bottom-14 hawa-bg-primary-foreground hawa-p-0 hawa-py-2 hawa-transition-all hawa-top-14", openSideMenu ? "hawa-overflow-auto" : "hawa-overflow-hidden"),
|
|
6935
|
+
className: cn("hawa-fixed hawa-bottom-14 hawa-bg-primary-foreground hawa-p-0 hawa-py-2 hawa-transition-all hawa-top-14", openSideMenu ? "hawa-overflow-auto" : "hawa-overflow-hidden"),
|
|
6940
6936
|
style: {
|
|
6941
|
-
// height:
|
|
6942
|
-
// design === "floating"
|
|
6943
|
-
// ? "calc(100% - 152px)"
|
|
6944
|
-
// : "0px",
|
|
6945
|
-
// : "calc(100% - 112px)",
|
|
6946
6937
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : drawerSizeCondition, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
6947
6938
|
}
|
|
6948
6939
|
}, /* @__PURE__ */ import_react35.default.createElement(SidebarGroup, {
|
|
@@ -6993,17 +6984,7 @@ var AppLayout = function(_param) {
|
|
|
6993
6984
|
clipRule: "evenodd"
|
|
6994
6985
|
})))) : null)), /* @__PURE__ */ import_react35.default.createElement("div", {
|
|
6995
6986
|
className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
|
|
6996
|
-
style:
|
|
6997
|
-
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
6998
|
-
width: "calc(100% - ".concat(drawerSizeCondition + 20, "px)"),
|
|
6999
|
-
left: "0px",
|
|
7000
|
-
top: props.topBar ? "56px" : "0px"
|
|
7001
|
-
} : {
|
|
7002
|
-
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
7003
|
-
width: "calc(100% - ".concat(drawerSizeCondition + 20, "px)"),
|
|
7004
|
-
left: "".concat(drawerSizeCondition + 20, "px"),
|
|
7005
|
-
top: props.topBar ? "56px" : "0px"
|
|
7006
|
-
} : isRTL ? {
|
|
6987
|
+
style: isRTL ? {
|
|
7007
6988
|
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
7008
6989
|
width: "calc(100% - ".concat(drawerSizeCondition, "px)"),
|
|
7009
6990
|
left: "0px",
|
|
@@ -7016,6 +6997,22 @@ var AppLayout = function(_param) {
|
|
|
7016
6997
|
}
|
|
7017
6998
|
}, props.children));
|
|
7018
6999
|
};
|
|
7000
|
+
var MenuIcon = function() {
|
|
7001
|
+
return /* @__PURE__ */ import_react35.default.createElement("svg", {
|
|
7002
|
+
"aria-label": "Menu Button",
|
|
7003
|
+
stroke: "currentColor",
|
|
7004
|
+
fill: "currentColor",
|
|
7005
|
+
strokeWidth: 0,
|
|
7006
|
+
viewBox: "0 0 20 20",
|
|
7007
|
+
"aria-hidden": "true",
|
|
7008
|
+
height: "1.6em",
|
|
7009
|
+
width: "1.6em"
|
|
7010
|
+
}, /* @__PURE__ */ import_react35.default.createElement("path", {
|
|
7011
|
+
fillRule: "evenodd",
|
|
7012
|
+
clipRule: "evenodd",
|
|
7013
|
+
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"
|
|
7014
|
+
}));
|
|
7015
|
+
};
|
|
7019
7016
|
// components/layout/AppTopbar.tsx
|
|
7020
7017
|
var import_react36 = __toESM(require("react"));
|
|
7021
7018
|
var AppTopbar = function(_param) {
|
package/dist/index.mjs
CHANGED
|
@@ -6599,10 +6599,8 @@ var AppLayout = ({
|
|
|
6599
6599
|
const isRTL = direction === "rtl";
|
|
6600
6600
|
const [openedSidebarItem, setOpenedSidebarItem] = useState22("");
|
|
6601
6601
|
const [size, setSize] = useState22(1200);
|
|
6602
|
-
const [openSideMenu, setOpenSideMenu] = useState22(
|
|
6603
|
-
|
|
6604
|
-
);
|
|
6605
|
-
let drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
6602
|
+
const [openSideMenu, setOpenSideMenu] = useState22(true);
|
|
6603
|
+
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
6606
6604
|
useEffect14(() => {
|
|
6607
6605
|
if (typeof window !== "undefined") {
|
|
6608
6606
|
const resize = () => {
|
|
@@ -6615,6 +6613,13 @@ var AppLayout = ({
|
|
|
6615
6613
|
};
|
|
6616
6614
|
}
|
|
6617
6615
|
}, []);
|
|
6616
|
+
useEffect14(() => {
|
|
6617
|
+
if (size > 600) {
|
|
6618
|
+
setOpenSideMenu(keepOpen);
|
|
6619
|
+
} else {
|
|
6620
|
+
setOpenSideMenu(false);
|
|
6621
|
+
}
|
|
6622
|
+
}, [size]);
|
|
6618
6623
|
useEffect14(() => {
|
|
6619
6624
|
const handleClickOutside = (event) => {
|
|
6620
6625
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
@@ -6668,26 +6673,7 @@ var AppLayout = ({
|
|
|
6668
6673
|
onClick: () => setOpenSideMenu(true),
|
|
6669
6674
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
|
6670
6675
|
},
|
|
6671
|
-
/* @__PURE__ */ React60.createElement(
|
|
6672
|
-
"svg",
|
|
6673
|
-
{
|
|
6674
|
-
stroke: "currentColor",
|
|
6675
|
-
fill: "currentColor",
|
|
6676
|
-
strokeWidth: 0,
|
|
6677
|
-
viewBox: "0 0 20 20",
|
|
6678
|
-
"aria-hidden": "true",
|
|
6679
|
-
height: "1.6em",
|
|
6680
|
-
width: "1.6em"
|
|
6681
|
-
},
|
|
6682
|
-
/* @__PURE__ */ React60.createElement(
|
|
6683
|
-
"path",
|
|
6684
|
-
{
|
|
6685
|
-
fillRule: "evenodd",
|
|
6686
|
-
clipRule: "evenodd",
|
|
6687
|
-
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"
|
|
6688
|
-
}
|
|
6689
|
-
)
|
|
6690
|
-
)
|
|
6676
|
+
/* @__PURE__ */ React60.createElement(MenuIcon, null)
|
|
6691
6677
|
),
|
|
6692
6678
|
props.pageTitle ? /* @__PURE__ */ React60.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React60.createElement("div", null)
|
|
6693
6679
|
)
|
|
@@ -6746,7 +6732,7 @@ var AppLayout = ({
|
|
|
6746
6732
|
{
|
|
6747
6733
|
className: cn(
|
|
6748
6734
|
"hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all",
|
|
6749
|
-
|
|
6735
|
+
isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14",
|
|
6750
6736
|
"hawa-h-[calc(100dvh)]"
|
|
6751
6737
|
),
|
|
6752
6738
|
style: {
|
|
@@ -6808,16 +6794,10 @@ var AppLayout = ({
|
|
|
6808
6794
|
"div",
|
|
6809
6795
|
{
|
|
6810
6796
|
className: cn(
|
|
6811
|
-
// hawa-h-[calc(100dvh)]
|
|
6812
6797
|
"hawa-fixed hawa-bottom-14 hawa-bg-primary-foreground hawa-p-0 hawa-py-2 hawa-transition-all hawa-top-14",
|
|
6813
6798
|
openSideMenu ? "hawa-overflow-auto" : "hawa-overflow-hidden"
|
|
6814
6799
|
),
|
|
6815
6800
|
style: {
|
|
6816
|
-
// height:
|
|
6817
|
-
// design === "floating"
|
|
6818
|
-
// ? "calc(100% - 152px)"
|
|
6819
|
-
// : "0px",
|
|
6820
|
-
// : "calc(100% - 112px)",
|
|
6821
6801
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
|
6822
6802
|
}
|
|
6823
6803
|
},
|
|
@@ -6902,17 +6882,7 @@ var AppLayout = ({
|
|
|
6902
6882
|
"div",
|
|
6903
6883
|
{
|
|
6904
6884
|
className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
|
|
6905
|
-
style:
|
|
6906
|
-
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
|
|
6907
|
-
width: `calc(100% - ${drawerSizeCondition + 20}px)`,
|
|
6908
|
-
left: "0px",
|
|
6909
|
-
top: props.topBar ? "56px" : "0px"
|
|
6910
|
-
} : {
|
|
6911
|
-
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
|
|
6912
|
-
width: `calc(100% - ${drawerSizeCondition + 20}px)`,
|
|
6913
|
-
left: `${drawerSizeCondition + 20}px`,
|
|
6914
|
-
top: props.topBar ? "56px" : "0px"
|
|
6915
|
-
} : isRTL ? {
|
|
6885
|
+
style: isRTL ? {
|
|
6916
6886
|
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
|
|
6917
6887
|
width: `calc(100% - ${drawerSizeCondition}px)`,
|
|
6918
6888
|
left: "0px",
|
|
@@ -6927,6 +6897,27 @@ var AppLayout = ({
|
|
|
6927
6897
|
props.children
|
|
6928
6898
|
));
|
|
6929
6899
|
};
|
|
6900
|
+
var MenuIcon = () => /* @__PURE__ */ React60.createElement(
|
|
6901
|
+
"svg",
|
|
6902
|
+
{
|
|
6903
|
+
"aria-label": "Menu Button",
|
|
6904
|
+
stroke: "currentColor",
|
|
6905
|
+
fill: "currentColor",
|
|
6906
|
+
strokeWidth: 0,
|
|
6907
|
+
viewBox: "0 0 20 20",
|
|
6908
|
+
"aria-hidden": "true",
|
|
6909
|
+
height: "1.6em",
|
|
6910
|
+
width: "1.6em"
|
|
6911
|
+
},
|
|
6912
|
+
/* @__PURE__ */ React60.createElement(
|
|
6913
|
+
"path",
|
|
6914
|
+
{
|
|
6915
|
+
fillRule: "evenodd",
|
|
6916
|
+
clipRule: "evenodd",
|
|
6917
|
+
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"
|
|
6918
|
+
}
|
|
6919
|
+
)
|
|
6920
|
+
);
|
|
6930
6921
|
|
|
6931
6922
|
// components/layout/AppTopbar.tsx
|
|
6932
6923
|
import React61 from "react";
|