@sikka/hawa 0.0.12 → 0.0.15
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 +3 -4
- package/src/blocks/Account/UserSettingsForm.js +3 -7
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -38
- package/src/blocks/AuthForms/ResetPasswordForm.js +36 -39
- package/src/blocks/AuthForms/SignInForm.js +73 -65
- package/src/blocks/AuthForms/SignUpForm.js +61 -44
- package/src/blocks/Payment/ChargeWalletForm.js +1 -1
- package/src/blocks/Payment/CreditCardForm.js +1 -1
- package/src/blocks/Payment/PayWithWallet.js +1 -1
- package/src/blocks/Payment/SelectPayment.js +1 -1
- package/src/blocks/Pricing/PricingPlans.js +57 -0
- package/src/{ui → elements}/ActionButton.js +0 -0
- package/src/elements/AdaptiveButton.js +32 -0
- package/src/{ui → elements}/AutoCompleteField.js +0 -0
- package/src/{ui → elements}/DragDropImages.js +0 -0
- package/src/{ui → elements}/Hawa.js +0 -0
- package/src/{ui → elements}/HawaAlert.js +1 -1
- package/src/elements/HawaAppBar.js +139 -0
- package/src/{ui → elements}/HawaButton.js +0 -0
- package/src/{ui → elements}/HawaCheckbox.js +0 -0
- package/src/{ui → elements}/HawaInputLabel.js +0 -0
- package/src/elements/HawaListItem.js +21 -0
- package/src/{ui → elements}/HawaLogoButton.js +0 -0
- package/src/elements/HawaPricingCard.js +133 -0
- package/src/{ui → elements}/HawaRadio.js +1 -1
- package/src/elements/HawaSettingsRow.js +27 -0
- package/src/elements/HawaSwitch.js +6 -0
- package/src/{ui → elements}/HawaTextArea.js +0 -0
- package/src/elements/HawaTextField.js +26 -0
- package/src/{ui → elements}/HawaTypography.js +0 -0
- package/src/{ui → elements}/RadioBox.js +0 -0
- package/src/{ui → elements}/Row.js +0 -0
- package/src/{ui → elements}/SelectedField.js +0 -0
- package/src/{ui → elements}/StyledTooltip.js +0 -0
- package/src/{ui → elements}/TabPanel.js +0 -0
- package/src/{ui → elements}/index.js +3 -1
- package/src/layout/HawaAppLayout.js +246 -0
- package/src/layout/index.js +1 -0
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +36 -2
- package/src/stories/BlocksStories/Auth/NewPassword.stories.js +2 -1
- package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +1 -2
- package/src/stories/BlocksStories/Auth/SignUp.stories.js +1 -0
- package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +63 -0
- package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +63 -0
- package/src/stories/ElementsStories/AdaptiveButton.stories.js +51 -0
- package/src/stories/{UIStories → ElementsStories}/Alert.stories.js +1 -1
- package/src/stories/{UIStories → ElementsStories}/InputLabel.stories.js +1 -1
- package/src/stories/ElementsStories/ItemCard.stories.js +18 -0
- package/src/stories/{UIStories → ElementsStories}/LogoButtons.stories.js +1 -1
- package/src/stories/ElementsStories/PricingCard.stories.js +91 -0
- package/src/stories/ElementsStories/RadioSelector.stories.js +36 -0
- package/src/stories/ElementsStories/SettingsRow.stories.js +63 -0
- package/src/stories/{UIStories → ElementsStories}/TextField.stories.js +1 -1
- package/src/stories/LayoutStories/AppBar.stories.js +29 -0
- package/src/stories/LayoutStories/AppLayout.stories.js +52 -0
- package/src/stories/LayoutStories/Box.stories.js +4 -13
- package/src/styles.css +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.66955578.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.b4186832.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js.map +1 -0
- package/src/stories/UIStories/ActionButton.stories.js +0 -41
- package/src/stories/UIStories/AdaptiveButton.stories.js +0 -76
- package/src/stories/UIStories/CheckBox.stories.js +0 -34
- package/src/stories/UIStories/RadioSelector.stories.js +0 -24
- package/src/stories/UIStories/SettingsRow.stories.js +0 -51
- package/src/themes/HawaProvider.js +0 -192
- package/src/themes/QawaimTheme.js +0 -199
- package/src/ui/AdaptiveButton.js +0 -131
- package/src/ui/HawaSettingsRow.js +0 -45
- package/src/ui/HawaTextField.js +0 -160
- package/storybook-static/main.a9a16923.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +0 -1
package/src/ui/AdaptiveButton.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import Button from "@mui/material/Button";
|
|
3
|
-
import Tooltip from "@mui/material/Tooltip";
|
|
4
|
-
import PropTypes from "prop-types";
|
|
5
|
-
import { StyledTooltip } from "./StyledTooltip";
|
|
6
|
-
import { getTextColor } from "../util";
|
|
7
|
-
|
|
8
|
-
export const AdaptiveButton = (props) => {
|
|
9
|
-
const { showText } = props;
|
|
10
|
-
|
|
11
|
-
const [tooltip, setTooltip] = useState(false);
|
|
12
|
-
const [hovered, setHovered] = useState(false);
|
|
13
|
-
//full button
|
|
14
|
-
if (showText) {
|
|
15
|
-
return (
|
|
16
|
-
<Button
|
|
17
|
-
disableRipple
|
|
18
|
-
disabled={props.disabled}
|
|
19
|
-
aria-label={props.buttonLabel}
|
|
20
|
-
color={props.danger ? "secondary" : "primary"}
|
|
21
|
-
onClick={props.handleClick}
|
|
22
|
-
style={{
|
|
23
|
-
backgroundColor: theme.primaryColor,
|
|
24
|
-
// borderRadius: theme.borderRadius,
|
|
25
|
-
padding: theme.paddings,
|
|
26
|
-
color: getTextColor(theme.primaryColor)
|
|
27
|
-
// color: hovered
|
|
28
|
-
// ? "#ffffff"
|
|
29
|
-
// : props.danger
|
|
30
|
-
// ? "#f50057"
|
|
31
|
-
// : "var(--blue)"
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
{props.icon}
|
|
35
|
-
{props.showText ? (
|
|
36
|
-
<span style={{ marginLeft: props.icon ? 5 : 0 }}>
|
|
37
|
-
{props.buttonLabel}
|
|
38
|
-
</span>
|
|
39
|
-
) : null}
|
|
40
|
-
</Button>
|
|
41
|
-
);
|
|
42
|
-
} else if (props.buttonLabelOnly) {
|
|
43
|
-
return (
|
|
44
|
-
<>
|
|
45
|
-
<Tooltip
|
|
46
|
-
placement={screenSize.width > 400 ? "bottom-center" : "top-center"}
|
|
47
|
-
enterTouchDelay={100}
|
|
48
|
-
title={
|
|
49
|
-
props.hint ? (
|
|
50
|
-
props.hint
|
|
51
|
-
) : (
|
|
52
|
-
<div>
|
|
53
|
-
<div
|
|
54
|
-
style={{
|
|
55
|
-
fontSize: 20,
|
|
56
|
-
fontWeight: 800,
|
|
57
|
-
padding: 10,
|
|
58
|
-
paddingBottom: 5,
|
|
59
|
-
textAlign: "center"
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
{props.hintTitle}
|
|
63
|
-
</div>
|
|
64
|
-
<div
|
|
65
|
-
style={{
|
|
66
|
-
fontSize: 13,
|
|
67
|
-
fontWeight: 100,
|
|
68
|
-
padding: 10,
|
|
69
|
-
textAlign: "center"
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
{props.hintContent}
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
>
|
|
78
|
-
<Button
|
|
79
|
-
disabled={props.disabled}
|
|
80
|
-
size="small"
|
|
81
|
-
disableRipple
|
|
82
|
-
aria-label={props.buttonLabel}
|
|
83
|
-
onClick={props.handleClick}
|
|
84
|
-
color={props.danger ? "secondary" : "primary"}
|
|
85
|
-
style={{
|
|
86
|
-
padding: 10,
|
|
87
|
-
color: hovered
|
|
88
|
-
? "#ffffff"
|
|
89
|
-
: props.danger
|
|
90
|
-
? "#f50057"
|
|
91
|
-
: "var(--blue)"
|
|
92
|
-
}}
|
|
93
|
-
>
|
|
94
|
-
{props.buttonLabel}
|
|
95
|
-
</Button>
|
|
96
|
-
</Tooltip>
|
|
97
|
-
</>
|
|
98
|
-
);
|
|
99
|
-
} else {
|
|
100
|
-
//icon only
|
|
101
|
-
return (
|
|
102
|
-
<StyledTooltip hintTitle="Example" hintContent="More explaination here">
|
|
103
|
-
<Button
|
|
104
|
-
disabled={props.disabled}
|
|
105
|
-
size="small"
|
|
106
|
-
disableRipple
|
|
107
|
-
aria-label={props.buttonLabel}
|
|
108
|
-
onClick={props.handleClick}
|
|
109
|
-
color={props.danger ? "secondary" : "primary"}
|
|
110
|
-
style={{
|
|
111
|
-
padding: 10,
|
|
112
|
-
color: hovered
|
|
113
|
-
? "#ffffff"
|
|
114
|
-
: props.danger
|
|
115
|
-
? "#f50057"
|
|
116
|
-
: "var(--blue)"
|
|
117
|
-
}}
|
|
118
|
-
>
|
|
119
|
-
{props.icon}
|
|
120
|
-
</Button>
|
|
121
|
-
</StyledTooltip>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
AdaptiveButton.propTypes = {
|
|
127
|
-
buttonLabel: PropTypes.string,
|
|
128
|
-
danger: PropTypes.bool,
|
|
129
|
-
disabled: PropTypes.bool,
|
|
130
|
-
showText: PropTypes.bool
|
|
131
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { Box } from "../layout";
|
|
5
|
-
import Checkbox from "@mui/material/Checkbox";
|
|
6
|
-
import TextField from "@mui/material/TextField";
|
|
7
|
-
import { HawaTypography } from "./HawaTypography";
|
|
8
|
-
export const HawaSettingsRow = (props) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<Box noColor>
|
|
13
|
-
{props.settingsType === "checkbox" && (
|
|
14
|
-
<div style={{ ...settingsRowStyle }}>
|
|
15
|
-
<HawaTypography>Checkbox Label</HawaTypography> <Checkbox />
|
|
16
|
-
</div>
|
|
17
|
-
)}
|
|
18
|
-
{props.settingsType === "text" && (
|
|
19
|
-
<div style={{ ...settingsRowStyle }}>
|
|
20
|
-
Text Label{" "}
|
|
21
|
-
<TextField
|
|
22
|
-
InputProps={{
|
|
23
|
-
style: {
|
|
24
|
-
...hawaTheme.inputFields[currentTheme],
|
|
25
|
-
// borderRadius: 0,
|
|
26
|
-
// padding: 0,
|
|
27
|
-
// backgroundColor: "white",
|
|
28
|
-
height: 40
|
|
29
|
-
}
|
|
30
|
-
}}
|
|
31
|
-
style={{
|
|
32
|
-
padding: 0
|
|
33
|
-
}}
|
|
34
|
-
placeholder="test"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
)}
|
|
38
|
-
</Box>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
HawaSettingsRow.propTypes = {
|
|
43
|
-
type: PropTypes.oneOf(["text", "number", "password"]),
|
|
44
|
-
helperText: PropTypes.string
|
|
45
|
-
};
|
package/src/ui/HawaTextField.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
// import InputBase from "@mui/material/InputBase";
|
|
3
|
-
// import Typography from "@mui/material/Typography";
|
|
4
|
-
// import { styled } from "@mui/material/styles";
|
|
5
|
-
// import PropTypes from "prop-types";
|
|
6
|
-
// import { HawaInputLabel } from "./HawaInputLabel";
|
|
7
|
-
// import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
-
import Input from "@mui/material/Input";
|
|
9
|
-
import InputLabel from "@mui/material/InputLabel";
|
|
10
|
-
|
|
11
|
-
export const HawaTextField = (props) => {
|
|
12
|
-
// const { control, register } = useFormContext();
|
|
13
|
-
|
|
14
|
-
// const currentTheme = Object.keys(hawaTheme.inputFields).find(
|
|
15
|
-
// (tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
16
|
-
// );
|
|
17
|
-
// let textFieldStyle = {};
|
|
18
|
-
|
|
19
|
-
// if (currentTheme) {
|
|
20
|
-
// textFieldStyle = {
|
|
21
|
-
// ...hawaTheme.inputFields[currentTheme],
|
|
22
|
-
// margin: props.last ? 0 : hawaTheme.inputFields[currentTheme].margin,
|
|
23
|
-
// marginTop: props.last
|
|
24
|
-
// ? hawaTheme.inputFields[currentTheme].margin * 2
|
|
25
|
-
// : 0,
|
|
26
|
-
// };
|
|
27
|
-
// } else {
|
|
28
|
-
// textFieldStyle = {
|
|
29
|
-
// backgroundColor: "white"
|
|
30
|
-
// };
|
|
31
|
-
// }
|
|
32
|
-
|
|
33
|
-
// const StyledTextField = styled(InputBase)(({ theme }) => {
|
|
34
|
-
// return {
|
|
35
|
-
// // "& .MuiInputBase-input": {
|
|
36
|
-
// // // border: "1px solid #ced4da",
|
|
37
|
-
// // fontSize: 16,
|
|
38
|
-
// // // padding: "10px 12px",
|
|
39
|
-
// // marginBottom: props.helperText ? 5 : 0,
|
|
40
|
-
// // // paddingLeft: 10,
|
|
41
|
-
// // // paddingRight: 10,
|
|
42
|
-
// // ...textFieldStyle
|
|
43
|
-
// // },
|
|
44
|
-
// // "& .MuiInputBase-root": {
|
|
45
|
-
// // border: "1px solid #ced4da",
|
|
46
|
-
// // fontSize: 16,
|
|
47
|
-
// // // width: "auto",
|
|
48
|
-
// // // padding: "10px 12px",
|
|
49
|
-
// // marginBottom: props.helperText ? 5 : 0,
|
|
50
|
-
// // // paddingLeft: 10,
|
|
51
|
-
// // // paddingRight: 10,
|
|
52
|
-
|
|
53
|
-
// // // ...textFieldStyle,
|
|
54
|
-
// // backgroundColor: "blue"
|
|
55
|
-
// // // "&:focus": {
|
|
56
|
-
// // // borderColor: "red",
|
|
57
|
-
// // // borderWidth: 1,
|
|
58
|
-
// // // outline: "1px solid black",
|
|
59
|
-
// // // backgroundColor: "red"
|
|
60
|
-
// // // }
|
|
61
|
-
// // // "& input:valid + fieldset": {
|
|
62
|
-
// // // borderColor: "green",
|
|
63
|
-
// // // borderWidth: 2
|
|
64
|
-
// // // },
|
|
65
|
-
// // // "& input:invalid + fieldset": {
|
|
66
|
-
// // // borderColor: "red",
|
|
67
|
-
// // // borderWidth: 2
|
|
68
|
-
// // // },
|
|
69
|
-
// // // "& input:valid:focus + fieldset": {
|
|
70
|
-
// // // borderLeftWidth: 6,
|
|
71
|
-
// // // padding: "4px !important" // override inline-style
|
|
72
|
-
// // // }
|
|
73
|
-
// // },
|
|
74
|
-
|
|
75
|
-
// // "&:hover": {
|
|
76
|
-
// // borderColor: "red",
|
|
77
|
-
// // borderWidth: 1,
|
|
78
|
-
// // outline: "1px solid black"
|
|
79
|
-
// // },
|
|
80
|
-
|
|
81
|
-
// // paddingLeft: 10,
|
|
82
|
-
// // paddingRight: 10,
|
|
83
|
-
// // border: "none"
|
|
84
|
-
|
|
85
|
-
// // position: "relative",
|
|
86
|
-
// // backgroundColor: "green"
|
|
87
|
-
// ...textFieldStyle
|
|
88
|
-
// };
|
|
89
|
-
// });
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<>
|
|
93
|
-
<InputLabel>{props.label}</InputLabel>
|
|
94
|
-
<Input disableUnderline {...props} />
|
|
95
|
-
</>
|
|
96
|
-
// <FormControl variant="hawa" style={{ marginTop: 10 }}>
|
|
97
|
-
|
|
98
|
-
// </FormControl>
|
|
99
|
-
// <TextField
|
|
100
|
-
// fullWidth
|
|
101
|
-
// type="text"
|
|
102
|
-
// // inputProps={{
|
|
103
|
-
// // shrink: true
|
|
104
|
-
// // }}
|
|
105
|
-
// // InputProps={{
|
|
106
|
-
// // disableUnderline: true,
|
|
107
|
-
// // shrink: true
|
|
108
|
-
// // }}
|
|
109
|
-
// InputLabelProps={{
|
|
110
|
-
// shrink: true
|
|
111
|
-
// }}
|
|
112
|
-
// {...props}
|
|
113
|
-
// />
|
|
114
|
-
// <Controller
|
|
115
|
-
// render={({ field }) => (
|
|
116
|
-
// <>
|
|
117
|
-
// {props.inputLabel && <InputLabel label={props.inputLabel} />}
|
|
118
|
-
|
|
119
|
-
// <TextField
|
|
120
|
-
// fullWidth={true}
|
|
121
|
-
// // helperText={props.helperText}
|
|
122
|
-
// type={props.type ?? "text"}
|
|
123
|
-
// // placeholder={props.placeholder}
|
|
124
|
-
// // inputProps={
|
|
125
|
-
// // props.type === "number"
|
|
126
|
-
// // ? {
|
|
127
|
-
// // inputMode: "numeric",
|
|
128
|
-
// // min: "0",
|
|
129
|
-
// // max: "9999999",
|
|
130
|
-
// // step: "0.01"
|
|
131
|
-
// // }
|
|
132
|
-
// // : {}
|
|
133
|
-
// // }
|
|
134
|
-
|
|
135
|
-
// defaultValue={props.defaultValue && ""}
|
|
136
|
-
// value={props.value && ""}
|
|
137
|
-
// {...props}
|
|
138
|
-
// // {...field}
|
|
139
|
-
// {...register(props.name)}
|
|
140
|
-
// />
|
|
141
|
-
// <Typography
|
|
142
|
-
// variant="caption"
|
|
143
|
-
// style={{ margin: 5, marginBottom: 0, color: "red" }}
|
|
144
|
-
// >
|
|
145
|
-
// {props.helperText}
|
|
146
|
-
// </Typography>
|
|
147
|
-
// </>
|
|
148
|
-
// )}
|
|
149
|
-
// name={props.name}
|
|
150
|
-
// rules={props.rules}
|
|
151
|
-
// control={control}
|
|
152
|
-
// shouldUnregister={props.shouldUnregister}
|
|
153
|
-
// />
|
|
154
|
-
);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
// HawaTextField.propTypes = {
|
|
158
|
-
// type: PropTypes.oneOf(["text", "number", "password"]),
|
|
159
|
-
// helperText: PropTypes.string
|
|
160
|
-
// };
|