@sikka/hawa 0.0.47 → 0.0.48

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.
@@ -29,6 +29,70 @@ const MenuButton = () => {
29
29
  </button>
30
30
  );
31
31
  };
32
+ const ProfileDropdown = (props) => {
33
+ return (
34
+ <div
35
+ id="userDropdown"
36
+ class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600"
37
+ data-popper-reference-hidden=""
38
+ data-popper-escaped=""
39
+ data-popper-placement="bottom-start"
40
+ // style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 295.5px, 0px);"
41
+ >
42
+ <div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
43
+ <div>{props.username}</div>
44
+ <div class="font-medium truncate">{props.userEmail}</div>
45
+ </div>
46
+ <ul
47
+ class="py-1 text-sm text-gray-700 dark:text-gray-200"
48
+ aria-labelledby="avatarButton"
49
+ >
50
+ {props.profileItems.map((it) => {
51
+ return <ProfileItem text={it.text} link={it.slug} />;
52
+ })}
53
+ </ul>
54
+ <div class="py-1">
55
+ <a
56
+ href="#"
57
+ class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
58
+ >
59
+ Sign out
60
+ </a>
61
+ </div>
62
+ </div>
63
+ );
64
+ };
65
+ const DrawerContent = (props) => {
66
+ return (
67
+ <div
68
+ id="drawer-navigation"
69
+ class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800"
70
+ tabindex="-1"
71
+ aria-labelledby="drawer-navigation-label"
72
+ >
73
+ <div href={props.logoHref} class="flex items-center">
74
+ <img
75
+ src={
76
+ "https://my.qawaim.app/_next/image?url=%2Fqawaim-logo.svg&w=256&q=75"
77
+ }
78
+ // src={props.logoLink}
79
+ class="h-9"
80
+ alt="Flowbite Logo"
81
+ />
82
+ </div>
83
+ <CloseButton />
84
+ <div class="py-4 overflow-y-auto">
85
+ <ul class="space-y-2">
86
+ {props.drawerItems.map((item, i) => {
87
+ return (
88
+ <HawaDrawerItem action={item.action} key={i} text={item.text} />
89
+ );
90
+ })}
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ );
95
+ };
32
96
 
33
97
  const ProfileItem = (props) => {
34
98
  return (
@@ -72,31 +136,42 @@ export const HawaLayout = (props) => {
72
136
  <div>
73
137
  <nav class="border-gray-200 rounded dark:bg-gray-900">
74
138
  <div class="flex p-3 flex-row-reverse items-center justify-between w-full">
75
- <div href={props.logoHref} class="flex items-center">
139
+ {/* <div href={props.logoHref} class="flex items-center">
76
140
  <img src={props.logoLink} class="h-9" alt="Flowbite Logo" />
141
+ </div> */}
142
+ <div
143
+ data-dropdown-toggle="userDropdown"
144
+ data-dropdown-placement="bottom-start"
145
+ class="overflow-hidden mr-2 relative w-10 h-10 bg-gray-100 rounded-full dark:bg-gray-600"
146
+ >
147
+ <svg
148
+ class="absolute -left-1 w-12 h-12 text-gray-400"
149
+ fill="currentColor"
150
+ viewBox="0 0 20 20"
151
+ xmlns="http://www.w3.org/2000/svg"
152
+ >
153
+ <path
154
+ fill-rule="evenodd"
155
+ d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
156
+ clip-rule="evenodd"
157
+ ></path>
158
+ </svg>
77
159
  </div>
160
+
161
+ {/* <div href={props.logoHref} class="flex items-center">
162
+ <img
163
+ src={
164
+ // "https://my.qawaim.app/_next/image?url=%2Fqawaim-logo.svg&w=256&q=75"
165
+ "https://qawaim-images.s3-ap-southeast-1.amazonaws.com/614580f79706137eab618399"
166
+ }
167
+ // src={props.logoLink}
168
+ class="h-12"
169
+ alt="Flowbite Logo"
170
+ />
171
+ </div> */}
172
+ <div>{props.pageTitle ?? "Home"}</div>
78
173
  <div className="flex flex-row-reverse">
79
174
  <MenuButton />
80
-
81
- <div
82
- data-dropdown-toggle="userDropdown"
83
- data-dropdown-placement="bottom-start"
84
- class="overflow-hidden mr-2 relative w-10 h-10 bg-gray-100 rounded-full dark:bg-gray-600"
85
- >
86
- <svg
87
- class="absolute -left-1 w-12 h-12 text-gray-400"
88
- fill="currentColor"
89
- viewBox="0 0 20 20"
90
- xmlns="http://www.w3.org/2000/svg"
91
- >
92
- <path
93
- fill-rule="evenodd"
94
- d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
95
- clip-rule="evenodd"
96
- ></path>
97
- </svg>
98
- </div>
99
-
100
175
  {/* <img
101
176
  id="avatarButton"
102
177
  type="button"
@@ -110,59 +185,12 @@ export const HawaLayout = (props) => {
110
185
  </div>
111
186
  </nav>
112
187
  </div>
113
- <div
114
- id="userDropdown"
115
- class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600"
116
- data-popper-reference-hidden=""
117
- data-popper-escaped=""
118
- data-popper-placement="bottom-start"
119
- // style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 295.5px, 0px);"
120
- >
121
- <div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
122
- <div>{props.username}</div>
123
- <div class="font-medium truncate">{props.userEmail}</div>
124
- </div>
125
- <ul
126
- class="py-1 text-sm text-gray-700 dark:text-gray-200"
127
- aria-labelledby="avatarButton"
128
- >
129
- {props.profileItems.map((it) => {
130
- return <ProfileItem text={it.text} link={it.slug} />;
131
- })}
132
- </ul>
133
- <div class="py-1">
134
- <a
135
- href="#"
136
- class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
137
- >
138
- Sign out
139
- </a>
140
- </div>
141
- </div>
142
-
143
- <div
144
- id="drawer-navigation"
145
- class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800"
146
- tabindex="-1"
147
- aria-labelledby="drawer-navigation-label"
148
- >
149
- <h5
150
- id="drawer-navigation-label"
151
- class="text-base font-semibold text-gray-500 uppercase dark:text-gray-400"
152
- >
153
- {props.appTitle}
154
- </h5>
155
- <CloseButton />
156
- <div class="py-4 overflow-y-auto">
157
- <ul class="space-y-2">
158
- {props.drawerItems.map((item, i) => {
159
- return (
160
- <HawaDrawerItem action={item.action} key={i} text={item.text} />
161
- );
162
- })}
163
- </ul>
164
- </div>
165
- </div>
188
+ <ProfileDropdown profileItems={props.profileItems} />
189
+ <DrawerContent
190
+ logoHref={props.logoHref}
191
+ appTitle={props.appTitle}
192
+ drawerItems={props.drawerItems}
193
+ />
166
194
  <div className="p-3">{props.children}</div>
167
195
  </div>
168
196
  );
@@ -1,7 +1,6 @@
1
1
  export * from "./Box";
2
2
  export * from "./HawaAppLayout";
3
3
  export * from "./HawaDialog";
4
- export * from "./HawaAppBar";
5
4
  export * from "./HawaPageControls";
6
5
  export * from "./HawaBottomAppBar";
7
6
  export * from "./HawaDrawer";
@@ -361,4 +361,4 @@
361
361
 
362
362
 
363
363
 
364
- window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.0e8a2888.iframe.bundle.js"></script><script src="vendors~main.bff3812a.iframe.bundle.js"></script><script src="main.07f6e990.iframe.bundle.js"></script></body></html>
364
+ window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.0e8a2888.iframe.bundle.js"></script><script src="vendors~main.ceb9a32a.iframe.bundle.js"></script><script src="main.7d233d65.iframe.bundle.js"></script></body></html>