@sikka/hawa 0.0.44 → 0.0.46
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/elements/HawaAccordian.js +103 -17
- package/src/elements/HawaAlert.js +19 -6
- package/src/elements/HawaCheckbox.js +25 -10
- package/src/elements/HawaChip.js +5 -2
- package/src/elements/HawaItemCard.js +163 -41
- package/src/elements/HawaSnackbar.js +38 -41
- package/src/elements/HawaSwitch.js +17 -2
- package/src/elements/HawaTextField.js +18 -25
- package/src/elements/index.js +1 -0
- package/src/layout/HawaLayout.js +124 -27
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.e8029a3c.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/vendors~main.bfb520c7.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.337d03df.iframe.bundle.js.LICENSE.txt → vendors~main.bfb520c7.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.bfb520c7.iframe.bundle.js.map +1 -0
- package/storybook-static/main.3795aede.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js.map +0 -1
package/src/layout/HawaLayout.js
CHANGED
|
@@ -1,32 +1,132 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
import "flowbite";
|
|
4
4
|
import HawaDrawerItem from "../elements/HawaDrawerItem";
|
|
5
|
+
|
|
6
|
+
const MenuButton = () => {
|
|
7
|
+
return (
|
|
8
|
+
<button
|
|
9
|
+
data-drawer-target="drawer-navigation"
|
|
10
|
+
data-drawer-show="drawer-navigation"
|
|
11
|
+
aria-controls="drawer-navigation"
|
|
12
|
+
type="button"
|
|
13
|
+
class="inline-flex items-center p-2 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
|
|
14
|
+
>
|
|
15
|
+
<span class="sr-only">Open main menu</span>
|
|
16
|
+
<svg
|
|
17
|
+
aria-hidden="true"
|
|
18
|
+
class="w-6 h-6"
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
viewBox="0 0 20 20"
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
>
|
|
23
|
+
<path
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
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"
|
|
26
|
+
clip-rule="evenodd"
|
|
27
|
+
></path>
|
|
28
|
+
</svg>
|
|
29
|
+
</button>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
5
32
|
export const HawaLayout = (props) => {
|
|
6
33
|
return (
|
|
7
34
|
<div>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
35
|
+
<div>
|
|
36
|
+
<nav class="border-gray-200 rounded dark:bg-gray-900">
|
|
37
|
+
<div class="flex p-3 flex-row-reverse items-center justify-between w-full">
|
|
38
|
+
<div href={props.logoLink} class="flex items-center">
|
|
39
|
+
<img
|
|
40
|
+
src="https://flowbite.com/docs/images/logo.svg"
|
|
41
|
+
class="h-9"
|
|
42
|
+
alt="Flowbite Logo"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="flex flex-row-reverse">
|
|
46
|
+
<MenuButton />
|
|
47
|
+
|
|
48
|
+
<div
|
|
49
|
+
data-dropdown-toggle="userDropdown"
|
|
50
|
+
data-dropdown-placement="bottom-start"
|
|
51
|
+
class="overflow-hidden mr-2 relative w-10 h-10 bg-gray-100 rounded-full dark:bg-gray-600"
|
|
52
|
+
>
|
|
53
|
+
<svg
|
|
54
|
+
class="absolute -left-1 w-12 h-12 text-gray-400"
|
|
55
|
+
fill="currentColor"
|
|
56
|
+
viewBox="0 0 20 20"
|
|
57
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
58
|
+
>
|
|
59
|
+
<path
|
|
60
|
+
fill-rule="evenodd"
|
|
61
|
+
d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
|
|
62
|
+
clip-rule="evenodd"
|
|
63
|
+
></path>
|
|
64
|
+
</svg>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{/* <img
|
|
68
|
+
id="avatarButton"
|
|
69
|
+
type="button"
|
|
70
|
+
data-dropdown-toggle="userDropdown"
|
|
71
|
+
data-dropdown-placement="bottom-start"
|
|
72
|
+
class="w-10 h-10 rounded-full cursor-pointer"
|
|
73
|
+
src="/docs/images/people/profile-picture-5.jpg"
|
|
74
|
+
alt="User dropdown"
|
|
75
|
+
/> */}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</nav>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
id="userDropdown"
|
|
82
|
+
class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600"
|
|
83
|
+
data-popper-reference-hidden=""
|
|
84
|
+
data-popper-escaped=""
|
|
85
|
+
data-popper-placement="bottom-start"
|
|
86
|
+
// style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 295.5px, 0px);"
|
|
14
87
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
88
|
+
<div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
|
|
89
|
+
<div>Bonnie Green</div>
|
|
90
|
+
<div class="font-medium truncate">name@flowbite.com</div>
|
|
91
|
+
</div>
|
|
92
|
+
<ul
|
|
93
|
+
class="py-1 text-sm text-gray-700 dark:text-gray-200"
|
|
94
|
+
aria-labelledby="avatarButton"
|
|
22
95
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
96
|
+
<li>
|
|
97
|
+
<a
|
|
98
|
+
href="#"
|
|
99
|
+
class="block py-2 px-4 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
100
|
+
>
|
|
101
|
+
Dashboard
|
|
102
|
+
</a>
|
|
103
|
+
</li>
|
|
104
|
+
<li>
|
|
105
|
+
<a
|
|
106
|
+
href="#"
|
|
107
|
+
class="block py-2 px-4 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
108
|
+
>
|
|
109
|
+
Settings
|
|
110
|
+
</a>
|
|
111
|
+
</li>
|
|
112
|
+
<li>
|
|
113
|
+
<a
|
|
114
|
+
href="#"
|
|
115
|
+
class="block py-2 px-4 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
116
|
+
>
|
|
117
|
+
Earnings
|
|
118
|
+
</a>
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
121
|
+
<div class="py-1">
|
|
122
|
+
<a
|
|
123
|
+
href="#"
|
|
124
|
+
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"
|
|
125
|
+
>
|
|
126
|
+
Sign out
|
|
127
|
+
</a>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
30
130
|
|
|
31
131
|
<div
|
|
32
132
|
id="drawer-navigation"
|
|
@@ -59,7 +159,6 @@ export const HawaLayout = (props) => {
|
|
|
59
159
|
clip-rule="evenodd"
|
|
60
160
|
></path>
|
|
61
161
|
</svg>
|
|
62
|
-
<span class="sr-only">Close menu</span>
|
|
63
162
|
</button>
|
|
64
163
|
<div class="py-4 overflow-y-auto">
|
|
65
164
|
<ul class="space-y-2">
|
|
@@ -73,8 +172,6 @@ export const HawaLayout = (props) => {
|
|
|
73
172
|
);
|
|
74
173
|
};
|
|
75
174
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
// showText: PropTypes.bool,
|
|
80
|
-
// };
|
|
175
|
+
HawaLayout.propTypes = {
|
|
176
|
+
logoLink: PropTypes.string
|
|
177
|
+
};
|
|
@@ -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.bfb520c7.iframe.bundle.js"></script><script src="main.e8029a3c.iframe.bundle.js"></script></body></html>
|