@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.
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/blocks/AuthForms/CodeConfirmation.js +5 -21
- package/src/blocks/AuthForms/NewPasswordForm.js +6 -22
- package/src/blocks/AuthForms/ResetPasswordForm.js +6 -17
- package/src/blocks/AuthForms/SignInForm.js +59 -82
- package/src/blocks/AuthForms/SignInPhone.js +5 -9
- package/src/blocks/AuthForms/SignUpForm.js +38 -69
- package/src/elements/HawaButton.js +7 -4
- package/src/elements/HawaPhoneInput.js +17 -0
- package/src/elements/HawaTextField.js +3 -3
- package/src/layout/HawaLayout.js +102 -74
- package/src/layout/index.js +0 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.7d233d65.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js → vendors~main.ceb9a32a.iframe.bundle.js} +3 -3
- package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js.LICENSE.txt → vendors~main.ceb9a32a.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.ceb9a32a.iframe.bundle.js.map +1 -0
- package/src/layout/HawaAppBar.js +0 -97
- package/storybook-static/main.07f6e990.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.bff3812a.iframe.bundle.js.map +0 -1
package/src/layout/HawaLayout.js
CHANGED
|
@@ -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
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
);
|
package/src/layout/index.js
CHANGED
|
@@ -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.
|
|
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>
|