@sikka/hawa 0.0.49 → 0.0.51
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/Account/UserProfileForm.js +2 -3
- package/src/blocks/Account/UserSettingsForm.js +2 -3
- package/src/blocks/Misc/NotFound.js +8 -23
- package/src/blocks/Payment/ChargeWalletForm.js +5 -12
- package/src/blocks/Payment/CheckoutForm.js +185 -195
- package/src/blocks/Payment/Confirmation.js +31 -74
- package/src/blocks/Payment/CreditCardForm.js +3 -4
- package/src/blocks/Payment/Form/CForm.js +3 -4
- package/src/blocks/Payment/Form/PaymentMethod.js +2 -9
- package/src/blocks/Payment/Gateway/Wallet.js +145 -145
- package/src/blocks/Payment/PayWithWallet.js +6 -13
- package/src/blocks/Payment/SelectPayment.js +2 -3
- package/src/blocks/Pricing/PricingPlans.js +4 -5
- package/src/elements/DraggableCard.js +18 -28
- package/src/elements/HawaCheckbox.js +0 -2
- package/src/elements/HawaPanelTabs.js +116 -22
- package/src/elements/HawaSelect.js +17 -7
- package/src/elements/HawaTooltip.js +54 -0
- package/src/elements/ResponsiveButton.js +9 -5
- package/src/elements/index.js +1 -0
- package/src/layout/HawaAppLayout2.js +34 -40
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.030838f5.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/vendors~main.8ab765cf.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.ceb9a32a.iframe.bundle.js.LICENSE.txt → vendors~main.8ab765cf.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.8ab765cf.iframe.bundle.js.map +1 -0
- package/src/elements/StyledTooltip.js +0 -46
- package/storybook-static/main.8bf9785a.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.ceb9a32a.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.ceb9a32a.iframe.bundle.js.map +0 -1
|
@@ -1,32 +1,126 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
|
|
3
|
-
import Container from "@mui/material/Container";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import "flowbite";
|
|
5
5
|
|
|
6
6
|
export const HawaPanelTabs = (props) => {
|
|
7
7
|
const [value, setValue] = useState(props.defaultValue);
|
|
8
8
|
return (
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
<div>
|
|
10
|
+
<div class="mb-4 border-b border-gray-200 dark:border-gray-700">
|
|
11
|
+
<ul
|
|
12
|
+
class="flex flex-wrap -mb-px text-sm font-medium text-center"
|
|
13
|
+
id="myTab"
|
|
14
|
+
data-tabs-toggle="#myTabContent"
|
|
15
|
+
role="tablist"
|
|
16
|
+
>
|
|
17
|
+
{props.options.map((option) => {
|
|
18
|
+
return (
|
|
19
|
+
<li class="mr-2" role="presentation">
|
|
20
|
+
<button
|
|
21
|
+
class="inline-block p-4 rounded-t-lg border-b-2 text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500"
|
|
22
|
+
id="profile-tab"
|
|
23
|
+
data-tabs-target="#profile"
|
|
24
|
+
type="button"
|
|
25
|
+
role="tab"
|
|
26
|
+
aria-controls="profile"
|
|
27
|
+
aria-selected="true"
|
|
28
|
+
>
|
|
29
|
+
{option.label}
|
|
30
|
+
</button>
|
|
31
|
+
</li>
|
|
32
|
+
);
|
|
33
|
+
})}
|
|
34
|
+
</ul>
|
|
35
|
+
</div>
|
|
36
|
+
{/* <div id="myTabContent">
|
|
37
|
+
<div
|
|
38
|
+
class="p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
|
|
39
|
+
id="profile"
|
|
40
|
+
role="tabpanel"
|
|
41
|
+
aria-labelledby="profile-tab"
|
|
42
|
+
>
|
|
43
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">
|
|
44
|
+
This is some placeholder content the{" "}
|
|
45
|
+
<strong class="font-medium text-gray-800 dark:text-white">
|
|
46
|
+
Profile tab's associated content
|
|
47
|
+
</strong>
|
|
48
|
+
. Clicking another tab will toggle the visibility of this one for
|
|
49
|
+
the next. The tab JavaScript swaps classes to control the content
|
|
50
|
+
visibility and styling.
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
class="hidden p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
|
|
55
|
+
id="dashboard"
|
|
56
|
+
role="tabpanel"
|
|
57
|
+
aria-labelledby="dashboard-tab"
|
|
58
|
+
>
|
|
59
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">
|
|
60
|
+
This is some placeholder content the{" "}
|
|
61
|
+
<strong class="font-medium text-gray-800 dark:text-white">
|
|
62
|
+
Dashboard tab's associated content
|
|
63
|
+
</strong>
|
|
64
|
+
. Clicking another tab will toggle the visibility of this one for
|
|
65
|
+
the next. The tab JavaScript swaps classes to control the content
|
|
66
|
+
visibility and styling.
|
|
67
|
+
</p>
|
|
68
|
+
</div>
|
|
69
|
+
<div
|
|
70
|
+
class="hidden p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
|
|
71
|
+
id="settings"
|
|
72
|
+
role="tabpanel"
|
|
73
|
+
aria-labelledby="settings-tab"
|
|
74
|
+
>
|
|
75
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">
|
|
76
|
+
This is some placeholder content the{" "}
|
|
77
|
+
<strong class="font-medium text-gray-800 dark:text-white">
|
|
78
|
+
Settings tab's associated content
|
|
79
|
+
</strong>
|
|
80
|
+
. Clicking another tab will toggle the visibility of this one for
|
|
81
|
+
the next. The tab JavaScript swaps classes to control the content
|
|
82
|
+
visibility and styling.
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
<div
|
|
86
|
+
class="hidden p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
|
|
87
|
+
id="contacts"
|
|
88
|
+
role="tabpanel"
|
|
89
|
+
aria-labelledby="contacts-tab"
|
|
90
|
+
>
|
|
91
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">
|
|
92
|
+
This is some placeholder content the{" "}
|
|
93
|
+
<strong class="font-medium text-gray-800 dark:text-white">
|
|
94
|
+
Contacts tab's associated content
|
|
95
|
+
</strong>
|
|
96
|
+
. Clicking another tab will toggle the visibility of this one for
|
|
97
|
+
the next. The tab JavaScript swaps classes to control the content
|
|
98
|
+
visibility and styling.
|
|
99
|
+
</p>
|
|
100
|
+
</div>
|
|
101
|
+
</div> */}
|
|
102
|
+
</div>
|
|
103
|
+
// <Container variant={props.location || "panelTabs"}>
|
|
104
|
+
// {props.options.map((singleOption, i) => {
|
|
105
|
+
// return (
|
|
106
|
+
// <button
|
|
107
|
+
// key={i}
|
|
108
|
+
// onClick={() => {
|
|
109
|
+
// props.handleChange(singleOption.value);
|
|
110
|
+
// setValue(singleOption.value);
|
|
111
|
+
// }}
|
|
112
|
+
// fullWidth
|
|
113
|
+
// variant={
|
|
114
|
+
// value?.toLowerCase() === singleOption.value?.toLowerCase()
|
|
115
|
+
// ? "selected"
|
|
116
|
+
// : "unselected"
|
|
117
|
+
// }
|
|
118
|
+
// >
|
|
119
|
+
// {singleOption.label}
|
|
120
|
+
// </button>
|
|
121
|
+
// );
|
|
122
|
+
// })}
|
|
123
|
+
// </Container>
|
|
30
124
|
);
|
|
31
125
|
};
|
|
32
126
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import InputLabel from "@mui/material/InputLabel";
|
|
3
|
-
import Select from "@mui/material/Select";
|
|
4
|
-
import Typography from "@mui/material/Typography";
|
|
5
2
|
|
|
6
3
|
export const HawaSelect = (props) => {
|
|
7
4
|
return (
|
|
8
5
|
<div style={{ width: "100%" }}>
|
|
9
|
-
<
|
|
6
|
+
<label
|
|
7
|
+
for="first_name"
|
|
8
|
+
className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
9
|
+
>
|
|
10
|
+
{props.label}
|
|
11
|
+
</label>
|
|
12
|
+
|
|
13
|
+
{/* <div
|
|
10
14
|
style={{
|
|
11
15
|
display: "flex",
|
|
12
16
|
flexDirection: "row",
|
|
@@ -14,13 +18,19 @@ export const HawaSelect = (props) => {
|
|
|
14
18
|
alignItems: "center"
|
|
15
19
|
}}
|
|
16
20
|
>
|
|
17
|
-
<InputLabel>{props.label}</InputLabel>
|
|
18
21
|
|
|
19
22
|
{props.helperText && (
|
|
20
23
|
<Typography variant="validation">{props.helperText}</Typography>
|
|
21
24
|
)}
|
|
22
|
-
</div>
|
|
23
|
-
<Select {...props}>{props.children}</Select>
|
|
25
|
+
</div> */}
|
|
26
|
+
{/* <Select {...props}>{props.children}</Select> */}
|
|
27
|
+
|
|
28
|
+
<select
|
|
29
|
+
id="countries"
|
|
30
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
31
|
+
>
|
|
32
|
+
{props.children}
|
|
33
|
+
</select>
|
|
24
34
|
</div>
|
|
25
35
|
);
|
|
26
36
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "flowbite";
|
|
3
|
+
export const HawaTooltip = (props) => {
|
|
4
|
+
const screenSize = {
|
|
5
|
+
width: 1500,
|
|
6
|
+
height: 200
|
|
7
|
+
};
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
id={props.tooltipID}
|
|
11
|
+
role="tooltip"
|
|
12
|
+
class="inline-block absolute invisible z-10 py-2 px-3 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity duration-300 tooltip dark:bg-gray-700"
|
|
13
|
+
>
|
|
14
|
+
Tooltip content
|
|
15
|
+
<div class="tooltip-arrow" data-popper-arrow></div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
// <Tooltip
|
|
19
|
+
// placement={screenSize.width > 400 ? "bottom-center" : "top-center"}
|
|
20
|
+
// enterTouchDelay={100}
|
|
21
|
+
// title={
|
|
22
|
+
// props.hint ? (
|
|
23
|
+
// props.hint
|
|
24
|
+
// ) : (
|
|
25
|
+
// <div>
|
|
26
|
+
// <div
|
|
27
|
+
// style={{
|
|
28
|
+
// fontSize: 20,
|
|
29
|
+
// fontWeight: 800,
|
|
30
|
+
// padding: 10,
|
|
31
|
+
// paddingBottom: 5,
|
|
32
|
+
// textAlign: "center"
|
|
33
|
+
// }}
|
|
34
|
+
// >
|
|
35
|
+
// {props.hintTitle}
|
|
36
|
+
// </div>
|
|
37
|
+
// <div
|
|
38
|
+
// style={{
|
|
39
|
+
// fontSize: 13,
|
|
40
|
+
// fontWeight: 100,
|
|
41
|
+
// padding: 10,
|
|
42
|
+
// textAlign: "center"
|
|
43
|
+
// }}
|
|
44
|
+
// >
|
|
45
|
+
// {props.hintContent}
|
|
46
|
+
// </div>
|
|
47
|
+
// </div>
|
|
48
|
+
// )
|
|
49
|
+
// }
|
|
50
|
+
// >
|
|
51
|
+
// {props.children}
|
|
52
|
+
// </Tooltip>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Tooltip from "@mui/material/Tooltip";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
3
|
|
|
5
4
|
export const ResponsiveButton = (props) => {
|
|
@@ -14,11 +13,16 @@ export const ResponsiveButton = (props) => {
|
|
|
14
13
|
} else {
|
|
15
14
|
//icon only
|
|
16
15
|
return (
|
|
17
|
-
|
|
18
|
-
<button
|
|
16
|
+
<>
|
|
17
|
+
<button
|
|
18
|
+
data-tooltip-target="btn1"
|
|
19
|
+
variant="adaptive-dark"
|
|
20
|
+
onClick={props.onClick}
|
|
21
|
+
>
|
|
19
22
|
{props.icon}
|
|
20
23
|
</button>
|
|
21
|
-
|
|
24
|
+
<HawaTooltip tooltipID="btn1" content={props.buttonText} />
|
|
25
|
+
</>
|
|
22
26
|
);
|
|
23
27
|
}
|
|
24
28
|
};
|
|
@@ -26,5 +30,5 @@ export const ResponsiveButton = (props) => {
|
|
|
26
30
|
ResponsiveButton.propTypes = {
|
|
27
31
|
buttonText: PropTypes.string,
|
|
28
32
|
onClick: PropTypes.func,
|
|
29
|
-
showText: PropTypes.bool
|
|
33
|
+
showText: PropTypes.bool
|
|
30
34
|
};
|
package/src/elements/index.js
CHANGED
|
@@ -14,7 +14,6 @@ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
|
14
14
|
import ListItemButton from "@mui/material/ListItemButton";
|
|
15
15
|
import ListItemText from "@mui/material/ListItemText";
|
|
16
16
|
import Avatar from "@mui/material/Avatar";
|
|
17
|
-
import Tooltip from "@mui/material/Tooltip";
|
|
18
17
|
import { HawaPopMenu } from "../elements/HawaPopMenu";
|
|
19
18
|
|
|
20
19
|
const drawerWidth = 200;
|
|
@@ -154,18 +153,15 @@ export function HawaAppLayout(props) {
|
|
|
154
153
|
</Typography>
|
|
155
154
|
|
|
156
155
|
<Box style={{ position: "absolute", right: 10 }}>
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/>
|
|
167
|
-
</IconButton>
|
|
168
|
-
</Tooltip>
|
|
156
|
+
<IconButton
|
|
157
|
+
onClick={handleOpenUserMenu}
|
|
158
|
+
// sx={{ p: 0 }}
|
|
159
|
+
size="small"
|
|
160
|
+
>
|
|
161
|
+
<Avatar style={{ width: 30, height: 30 }} fontSize="inherit" />
|
|
162
|
+
</IconButton>
|
|
163
|
+
{/* <Tooltip title="Open settings">
|
|
164
|
+
</Tooltip> */}
|
|
169
165
|
<HawaPopMenu
|
|
170
166
|
menuItems={props.accountMenu}
|
|
171
167
|
anchor={anchorElUser}
|
|
@@ -207,34 +203,32 @@ export function HawaAppLayout(props) {
|
|
|
207
203
|
>
|
|
208
204
|
{props.pages.map((p, jk) => {
|
|
209
205
|
return (
|
|
210
|
-
<Tooltip
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
206
|
+
// <Tooltip
|
|
207
|
+
// title={p.text}
|
|
208
|
+
// key={jk}
|
|
209
|
+
// placement={"right"}
|
|
210
|
+
// arrow={true}
|
|
211
|
+
// PopperProps={{ style: { opacity: open ? 0 : 1 } }}
|
|
212
|
+
// >
|
|
213
|
+
|
|
214
|
+
// </Tooltip>
|
|
215
|
+
<ListItemButton
|
|
216
|
+
variant={
|
|
217
|
+
props.pageName?.toLowerCase() === p.slug?.toLowerCase() &&
|
|
218
|
+
"clicked"
|
|
219
|
+
}
|
|
220
|
+
onClick={p.action}
|
|
221
|
+
key={p.text}
|
|
222
|
+
sx={{
|
|
223
|
+
minHeight: 48,
|
|
224
|
+
justifyContent: open ? "initial" : "center",
|
|
225
|
+
px: 2.5
|
|
226
|
+
}}
|
|
216
227
|
>
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
onClick={p.action}
|
|
223
|
-
key={p.text}
|
|
224
|
-
sx={{
|
|
225
|
-
minHeight: 48,
|
|
226
|
-
justifyContent: open ? "initial" : "center",
|
|
227
|
-
px: 2.5
|
|
228
|
-
}}
|
|
229
|
-
>
|
|
230
|
-
<p.icon />
|
|
231
|
-
<div style={{ width: 20 }} />
|
|
232
|
-
<ListItemText
|
|
233
|
-
primary={p.text}
|
|
234
|
-
sx={{ opacity: open ? 1 : 0 }}
|
|
235
|
-
/>
|
|
236
|
-
</ListItemButton>
|
|
237
|
-
</Tooltip>
|
|
228
|
+
<p.icon />
|
|
229
|
+
<div style={{ width: 20 }} />
|
|
230
|
+
<ListItemText primary={p.text} sx={{ opacity: open ? 1 : 0 }} />
|
|
231
|
+
</ListItemButton>
|
|
238
232
|
);
|
|
239
233
|
})}
|
|
240
234
|
</List>
|
|
@@ -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.8ab765cf.iframe.bundle.js"></script><script src="main.030838f5.iframe.bundle.js"></script></body></html>
|