@sikka/hawa 0.0.144 → 0.0.145
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/es/layout/HawaAppLayout.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/layout/HawaAppLayout.d.ts +1 -1
- package/package.json +1 -1
- package/src/elements/HawaMenu.tsx +5 -2
- package/src/elements/HawaPanelTabs.tsx +2 -2
- package/src/elements/HawaPricingCard.tsx +2 -2
- package/src/elements/HawaRadio.tsx +2 -2
- package/src/elements/HawaTabs.tsx +2 -2
- package/src/layout/HawaAppLayout.tsx +23 -6
- package/src/layout/HawaSiteLayout.tsx +4 -4
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.caad440f.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/main.f25e7d6a.iframe.bundle.js +0 -1
package/package.json
CHANGED
|
@@ -89,9 +89,12 @@ export const HawaMenu: React.FunctionComponent<TMenuTypes> = ({
|
|
|
89
89
|
<div className="truncate font-medium">{headerSubtitle}</div>
|
|
90
90
|
</div>
|
|
91
91
|
)}
|
|
92
|
-
{menuItems.map((group) => {
|
|
92
|
+
{menuItems.map((group, o) => {
|
|
93
93
|
return (
|
|
94
|
-
<ul
|
|
94
|
+
<ul
|
|
95
|
+
key={o}
|
|
96
|
+
className="py-1 text-sm text-gray-700 dark:text-gray-200"
|
|
97
|
+
>
|
|
95
98
|
{group?.map((item) => {
|
|
96
99
|
return (
|
|
97
100
|
<li
|
|
@@ -26,9 +26,9 @@ export const HawaPanelTabs: React.FunctionComponent<PanelTabsTypes> = (
|
|
|
26
26
|
data-tabs-toggle="#myTabContent"
|
|
27
27
|
role="tablist"
|
|
28
28
|
>
|
|
29
|
-
{props.options.map((option: any) => {
|
|
29
|
+
{props.options.map((option: any, o) => {
|
|
30
30
|
return (
|
|
31
|
-
<li className="mr-2" role="presentation">
|
|
31
|
+
<li key={o} className="mr-2" role="presentation">
|
|
32
32
|
<button
|
|
33
33
|
className="inline-block rounded-t-lg border-b-2 border-blue-600 p-4 text-blue-600 hover:text-blue-600 dark:border-blue-500 dark:text-blue-500 dark:hover:text-blue-500"
|
|
34
34
|
id={`${option.value}-tab`}
|
|
@@ -95,9 +95,9 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
|
95
95
|
</span>
|
|
96
96
|
</div>
|
|
97
97
|
<ul role="list" className="my-7 space-y-0">
|
|
98
|
-
{featuresMapping?.map((feature) => {
|
|
98
|
+
{featuresMapping?.map((feature, o) => {
|
|
99
99
|
return (
|
|
100
|
-
<li className="flex ">
|
|
100
|
+
<li key={o} className="flex ">
|
|
101
101
|
<svg
|
|
102
102
|
aria-hidden="true"
|
|
103
103
|
className="m-2 h-5 w-5 flex-shrink-0 text-blue-600 dark:text-blue-500"
|
|
@@ -28,8 +28,8 @@ export const HawaRadio: React.FunctionComponent<RadioTypes> = (props) => {
|
|
|
28
28
|
"flex max-w-fit flex-row whitespace-nowrap rounded-lg bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
29
29
|
)}
|
|
30
30
|
>
|
|
31
|
-
{props.options?.map((opt: any) => (
|
|
32
|
-
<li className="w-full">
|
|
31
|
+
{props.options?.map((opt: any, o) => (
|
|
32
|
+
<li className="w-full" key={o}>
|
|
33
33
|
<button
|
|
34
34
|
aria-current="page"
|
|
35
35
|
onClick={() => {
|
|
@@ -21,8 +21,8 @@ export const HawaTabs: React.FunctionComponent<TabsTypes> = (props) => {
|
|
|
21
21
|
selectedOption ? "border-b-2" : "border-b-0"
|
|
22
22
|
)}
|
|
23
23
|
>
|
|
24
|
-
{props.options?.map((opt: any) => (
|
|
25
|
-
<li>
|
|
24
|
+
{props.options?.map((opt: any, o) => (
|
|
25
|
+
<li key={o}>
|
|
26
26
|
<button
|
|
27
27
|
aria-current="page"
|
|
28
28
|
onClick={() => {
|
|
@@ -5,7 +5,12 @@ import { HawaMenu } from "../elements"
|
|
|
5
5
|
import { HiMenu } from "react-icons/hi"
|
|
6
6
|
import useBreakpoint from "../hooks/useBreakpoint"
|
|
7
7
|
type HawaAppLayoutTypes = {
|
|
8
|
-
drawerItems: {
|
|
8
|
+
drawerItems: {
|
|
9
|
+
label: string
|
|
10
|
+
icon: any
|
|
11
|
+
slug: string
|
|
12
|
+
action: () => void
|
|
13
|
+
}[][]
|
|
9
14
|
currentPage: string
|
|
10
15
|
pageTitle?: string
|
|
11
16
|
logoSymbol?: any
|
|
@@ -51,6 +56,11 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
51
56
|
}
|
|
52
57
|
}, [])
|
|
53
58
|
|
|
59
|
+
//States of the side menu
|
|
60
|
+
//larger than 600
|
|
61
|
+
//as a bar and expands when hover
|
|
62
|
+
//less than 600
|
|
63
|
+
//as nothing and expands as button is clicked
|
|
54
64
|
return (
|
|
55
65
|
<>
|
|
56
66
|
{props.topBar && (
|
|
@@ -100,12 +110,12 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
100
110
|
onMouseLeave={() => setOpenSideMenu(false)}
|
|
101
111
|
ref={ref}
|
|
102
112
|
className={clsx(
|
|
103
|
-
"fixed top-0 left-0 z-50 flex h-full flex-col bg-primary-400 transition-all
|
|
104
|
-
size > 600 ? "w-12" : "w-0",
|
|
105
|
-
openSideMenu ? "w-40" : ""
|
|
113
|
+
"fixed top-0 left-0 z-50 flex h-full flex-col overflow-x-clip bg-primary-400 transition-all hover:overflow-auto",
|
|
114
|
+
size > 600 ? "w-12 hover:w-40" : "w-0",
|
|
115
|
+
openSideMenu ? "w-40" : "w-0"
|
|
106
116
|
)}
|
|
107
117
|
>
|
|
108
|
-
<div className="
|
|
118
|
+
<div className="mb-9 h-12 w-12 p-2">
|
|
109
119
|
<img
|
|
110
120
|
className={clsx(
|
|
111
121
|
"fixed top-2 h-9",
|
|
@@ -140,7 +150,13 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
140
150
|
</div>
|
|
141
151
|
|
|
142
152
|
{props.drawerItems.map((dSection, j) => (
|
|
143
|
-
<div
|
|
153
|
+
<div
|
|
154
|
+
key={j}
|
|
155
|
+
className={clsx(
|
|
156
|
+
"flex flex-col items-stretch justify-center"
|
|
157
|
+
// !openSideMenu ? "invisible" : "visible"
|
|
158
|
+
)}
|
|
159
|
+
>
|
|
144
160
|
{dSection.map((dItem, i) => {
|
|
145
161
|
return (
|
|
146
162
|
<div
|
|
@@ -151,6 +167,7 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
151
167
|
props.currentPage === dItem.slug
|
|
152
168
|
? "bg-primary-600 text-white hover:bg-primary-600"
|
|
153
169
|
: ""
|
|
170
|
+
// !openSideMenu ? " h-0 w-0" : ""
|
|
154
171
|
)}
|
|
155
172
|
>
|
|
156
173
|
<div className="flex items-center justify-center">
|
|
@@ -46,8 +46,8 @@ const ProfileDropdown = (props: any) => {
|
|
|
46
46
|
className="py-1 text-sm text-gray-700 dark:text-gray-200"
|
|
47
47
|
aria-labelledby="avatarButton"
|
|
48
48
|
>
|
|
49
|
-
{props.profileItems.map((it: any) => {
|
|
50
|
-
return <ProfileItem text={it.text} link={it.slug} />
|
|
49
|
+
{props.profileItems.map((it: any, o) => {
|
|
50
|
+
return <ProfileItem key={o} text={it.text} link={it.slug} />
|
|
51
51
|
})}
|
|
52
52
|
</ul>
|
|
53
53
|
<div className="py-1">
|
|
@@ -85,7 +85,7 @@ const DrawerContent = (props: any) => {
|
|
|
85
85
|
<div className="overflow-y-auto py-4">
|
|
86
86
|
<ul className="space-y-2">
|
|
87
87
|
{props.drawerItems.map((item: any, i: any) => {
|
|
88
|
-
return <div>{item.text}</div>
|
|
88
|
+
return <div key={i}>{item.text}</div>
|
|
89
89
|
})}
|
|
90
90
|
</ul>
|
|
91
91
|
</div>
|
|
@@ -236,7 +236,7 @@ export const HawaSiteLayout: React.FunctionComponent<LayoutTypes> = (
|
|
|
236
236
|
<div className="overflow-y-auto py-4">
|
|
237
237
|
<ul className="space-y-2">
|
|
238
238
|
{props.drawerItems.map((item: any, i: any) => {
|
|
239
|
-
return <div>{item.text}</div>
|
|
239
|
+
return <div key={i}>{item.text}</div>
|
|
240
240
|
})}
|
|
241
241
|
</ul>
|
|
242
242
|
</div>
|
|
@@ -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.4a2964ac.iframe.bundle.js"></script><script src="870.32eb3abe.iframe.bundle.js"></script><script src="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.4a2964ac.iframe.bundle.js"></script><script src="870.32eb3abe.iframe.bundle.js"></script><script src="main.caad440f.iframe.bundle.js"></script></body></html>
|