@sikka/hawa 0.0.120 → 0.0.122
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/styles.css +13 -10
- package/es/index.es.js +1 -1
- package/es/layout/HawaAppLayout.d.ts +5 -2
- package/lib/index.js +1 -1
- package/lib/layout/HawaAppLayout.d.ts +5 -2
- package/package.json +1 -1
- package/src/elements/HawaStats.tsx +1 -1
- package/src/layout/HawaAppLayout.tsx +23 -11
- package/src/styles.css +13 -10
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type HawaAppLayoutTypes = {
|
|
3
|
-
logoLink: string;
|
|
4
3
|
drawerItems: {
|
|
5
4
|
label: string;
|
|
6
5
|
icon: any;
|
|
7
6
|
slug: string;
|
|
8
7
|
action: () => void;
|
|
9
8
|
}[];
|
|
10
|
-
currentPage
|
|
9
|
+
currentPage: string;
|
|
10
|
+
logoSymbol?: any;
|
|
11
|
+
logoLink?: string;
|
|
12
|
+
logoText?: any;
|
|
13
|
+
children?: any;
|
|
11
14
|
};
|
|
12
15
|
export declare const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes>;
|
|
13
16
|
export {};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ type StatTypes = {
|
|
|
11
11
|
handleClick?: () => void
|
|
12
12
|
}
|
|
13
13
|
export const HawaStats: React.FunctionComponent<StatTypes> = (props) => {
|
|
14
|
-
let defaultStyle = "flex flex-col gap-1 rounded-lg p-4 text-sm"
|
|
14
|
+
let defaultStyle = "flex flex-col gap-1 rounded-lg p-4 text-sm h-fit max-h-fit"
|
|
15
15
|
let statStyles = {
|
|
16
16
|
plain: "",
|
|
17
17
|
contained: "bg-primary-200 w-fit",
|
|
@@ -2,27 +2,37 @@ import clsx from "clsx"
|
|
|
2
2
|
import React, { useState } from "react"
|
|
3
3
|
|
|
4
4
|
type HawaAppLayoutTypes = {
|
|
5
|
-
logoLink: string
|
|
6
5
|
drawerItems: { label: string; icon: any; slug: string; action: () => void }[]
|
|
7
|
-
currentPage
|
|
6
|
+
currentPage: string
|
|
7
|
+
logoSymbol?: any
|
|
8
|
+
logoLink?: string
|
|
9
|
+
logoText?: any
|
|
10
|
+
children?: any
|
|
8
11
|
}
|
|
9
12
|
export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
10
13
|
props: any
|
|
11
14
|
) => {
|
|
12
15
|
const [openSideMenu, setOpenSideMenu] = useState(false)
|
|
13
|
-
|
|
14
16
|
return (
|
|
15
17
|
<div className="flex">
|
|
16
18
|
<div
|
|
17
19
|
onMouseEnter={() => setOpenSideMenu(true)}
|
|
18
20
|
onMouseLeave={() => setOpenSideMenu(false)}
|
|
19
|
-
className="top-0 z-10 flex h-screen w-12 flex-col gap-0 bg-blue-300 transition-all hover:w-40"
|
|
21
|
+
className="absolute top-0 left-0 z-10 flex h-screen w-12 flex-col gap-0 bg-blue-300 transition-all hover:w-40"
|
|
20
22
|
>
|
|
21
|
-
<div className="m-1 flex flex-row
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<div className="bg-red- m-1 flex flex-row p-2">
|
|
24
|
+
{/* full logo */}
|
|
25
|
+
{openSideMenu ? (
|
|
26
|
+
<img
|
|
27
|
+
className={clsx("h-10", !openSideMenu ? "invisible" : "visible")}
|
|
28
|
+
src="https://beta-my.qawaim.app/_next/image?url=%2Fqawaim-logo.svg&w=256&q=75"
|
|
29
|
+
/>
|
|
30
|
+
) : (
|
|
31
|
+
<img
|
|
32
|
+
className={clsx("h-10", openSideMenu ? "invisible" : "visible")}
|
|
33
|
+
src="https://beta-admin.qawaim.app/_next/image?url=%2Fqawaim-symbol.svg&w=128&q=75"
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
26
36
|
</div>
|
|
27
37
|
{props.drawerItems.map((dItem, i) => (
|
|
28
38
|
<div
|
|
@@ -31,7 +41,7 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
31
41
|
className={clsx(
|
|
32
42
|
"m-1 flex cursor-pointer flex-row items-center overflow-x-clip rounded-lg p-2 pl-3 transition-all hover:bg-primary-400",
|
|
33
43
|
props.currentPage === dItem.slug
|
|
34
|
-
? "bg-primary-600 text-white"
|
|
44
|
+
? "bg-primary-600 text-white hover:bg-primary-600"
|
|
35
45
|
: ""
|
|
36
46
|
)}
|
|
37
47
|
>
|
|
@@ -48,7 +58,9 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
48
58
|
))}
|
|
49
59
|
</div>
|
|
50
60
|
|
|
51
|
-
<div className="w-
|
|
61
|
+
<div className=" absolute top-0 h-screen w-[calc(100%-3rem)] translate-x-8 overflow-scroll p-2">
|
|
62
|
+
{props.children}
|
|
63
|
+
</div>
|
|
52
64
|
</div>
|
|
53
65
|
)
|
|
54
66
|
}
|
package/src/styles.css
CHANGED
|
@@ -838,6 +838,9 @@ video {
|
|
|
838
838
|
.w-12 {
|
|
839
839
|
width: 3rem;
|
|
840
840
|
}
|
|
841
|
+
.w-\[calc\(100\%-3rem\)\] {
|
|
842
|
+
width: calc(100% - 3rem);
|
|
843
|
+
}
|
|
841
844
|
.w-80 {
|
|
842
845
|
width: 20rem;
|
|
843
846
|
}
|
|
@@ -892,18 +895,12 @@ video {
|
|
|
892
895
|
--tw-translate-y: -50%;
|
|
893
896
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
894
897
|
}
|
|
895
|
-
.
|
|
896
|
-
--tw-
|
|
898
|
+
.translate-x-8 {
|
|
899
|
+
--tw-translate-x: 2rem;
|
|
897
900
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
898
901
|
}
|
|
899
|
-
.
|
|
900
|
-
--tw-
|
|
901
|
-
--tw-scale-y: 1;
|
|
902
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
903
|
-
}
|
|
904
|
-
.scale-0 {
|
|
905
|
-
--tw-scale-x: 0;
|
|
906
|
-
--tw-scale-y: 0;
|
|
902
|
+
.rotate-180 {
|
|
903
|
+
--tw-rotate: 180deg;
|
|
907
904
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
908
905
|
}
|
|
909
906
|
.transform {
|
|
@@ -959,6 +956,9 @@ video {
|
|
|
959
956
|
.items-stretch {
|
|
960
957
|
align-items: stretch;
|
|
961
958
|
}
|
|
959
|
+
.justify-start {
|
|
960
|
+
justify-content: flex-start;
|
|
961
|
+
}
|
|
962
962
|
.justify-end {
|
|
963
963
|
justify-content: flex-end;
|
|
964
964
|
}
|
|
@@ -1035,6 +1035,9 @@ video {
|
|
|
1035
1035
|
.overflow-hidden {
|
|
1036
1036
|
overflow: hidden;
|
|
1037
1037
|
}
|
|
1038
|
+
.overflow-scroll {
|
|
1039
|
+
overflow: scroll;
|
|
1040
|
+
}
|
|
1038
1041
|
.overflow-x-auto {
|
|
1039
1042
|
overflow-x: auto;
|
|
1040
1043
|
}
|