@sikka/hawa 0.0.5 → 0.0.8
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 +4 -5
- package/src/blocks/Account/UserProfile.js +57 -7
- package/src/blocks/AuthForms/NewPasswordForm.js +100 -17
- package/src/blocks/AuthForms/ResetPasswordForm.js +61 -5
- package/src/blocks/AuthForms/SignInForm.js +101 -26
- package/src/blocks/AuthForms/SignUpForm.js +113 -32
- package/src/blocks/Payment/ChargeWalletForm.js +53 -0
- package/src/blocks/Payment/CreditCardForm.js +50 -21
- package/src/blocks/Payment/PayWithWallet.js +14 -0
- package/src/blocks/Payment/SelectPayment.js +20 -42
- package/src/blocks/Payment/index.js +2 -0
- package/src/layout/Box.js +9 -10
- package/src/stories/BlocksStories/AuthForm.stories.js +18 -12
- package/src/stories/BlocksStories/PaymentForm.stories.js +15 -40
- package/src/stories/BlocksStories/UserForm.stories.js +41 -0
- package/src/stories/{Introduction.stories.js → Introduction.stories.mdx} +45 -27
- package/src/stories/LayoutStories/Box.stories.js +4 -4
- package/src/stories/{ActionButton.stories.js → UIStories/ActionButton.stories.js} +16 -23
- package/src/stories/UIStories/AdaptiveButton.stories.js +81 -0
- package/src/stories/UIStories/Alert.stories.js +42 -0
- package/src/stories/{CheckBox.stories.js → UIStories/CheckBox.stories.js} +3 -4
- package/src/stories/UIStories/InputLabel.stories.js +13 -0
- package/src/stories/UIStories/LogoButtons.stories.js +90 -0
- package/src/stories/UIStories/RadioSelector.stories.js +53 -0
- package/src/stories/UIStories/SettingsRow.stories.js +64 -0
- package/src/stories/{TextField.stories.js → UIStories/TextField.stories.js} +4 -5
- package/src/themes/HawaProvider.js +107 -11
- package/src/ui/ActionButton.js +12 -11
- package/src/ui/AdaptiveButton.js +43 -159
- package/src/ui/HawaAlert.js +37 -0
- package/src/ui/HawaButton.js +48 -0
- package/src/ui/{Checkbox.js → HawaCheckbox.js} +1 -1
- package/src/ui/HawaInputLabel.js +4 -5
- package/src/ui/HawaLogoButton.js +138 -0
- package/src/ui/HawaRadio.js +73 -0
- package/src/ui/HawaSettingsRow.js +71 -0
- package/src/ui/HawaTextField.js +69 -80
- package/src/ui/HawaTypography.js +28 -0
- package/src/ui/index.js +9 -19
- package/storybook-static/{1.95be85dd.iframe.bundle.js → 0.0d994c92.iframe.bundle.js} +3 -3
- package/storybook-static/{1.95be85dd.iframe.bundle.js.LICENSE.txt → 0.0d994c92.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/0.0d994c92.iframe.bundle.js.map +1 -0
- package/storybook-static/1.aabc3f3a.iframe.bundle.js +1 -0
- package/storybook-static/{3.d72f7fac.iframe.bundle.js → 2.430bf1e3.iframe.bundle.js} +1 -1
- package/storybook-static/{7.ffb0d84b.iframe.bundle.js → 6.704d1e8d.iframe.bundle.js} +1 -1
- package/storybook-static/{8.68cd1217.iframe.bundle.js → 7.9ce807e3.iframe.bundle.js} +3 -3
- package/storybook-static/{8.68cd1217.iframe.bundle.js.LICENSE.txt → 7.9ce807e3.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/7.9ce807e3.iframe.bundle.js.map +1 -0
- package/storybook-static/{9.488e3969.iframe.bundle.js → 8.c4cb6081.iframe.bundle.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.5731dbe3.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.cfefe972.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.d75dc38b.iframe.bundle.js.LICENSE.txt → vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +1 -0
- package/src/stories/AdaptiveButton.stories.js +0 -80
- package/src/stories/Alert.stories.js +0 -41
- package/src/stories/BlocksStories/UserAccount.stories.js +0 -46
- package/src/stories/GlobalVariables.stories.js +0 -44
- package/src/stories/InputLabel.stories.js +0 -92
- package/src/stories/RadioSelector.stories.js +0 -69
- package/src/ui/ApplePayButton.js +0 -94
- package/src/ui/GithubButton.js +0 -91
- package/src/ui/GoogleButton.js +0 -83
- package/src/ui/GooglePayButton.js +0 -94
- package/src/ui/MadaButton.js +0 -94
- package/src/ui/PayPalButton.js +0 -94
- package/src/ui/RadioSelector.js +0 -51
- package/src/ui/STCPayButton.js +0 -94
- package/src/ui/StyledAlert.js +0 -30
- package/src/ui/TwitterButton.js +0 -84
- package/src/ui/VisaMasterButton.js +0 -94
- package/src/ui/WalletButton.js +0 -91
- package/storybook-static/0.54f7e52e.iframe.bundle.js +0 -1
- package/storybook-static/1.95be85dd.iframe.bundle.js.map +0 -1
- package/storybook-static/2.eb601582.iframe.bundle.js +0 -1
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
- package/storybook-static/main.044648aa.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.3e280e98.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.d75dc38b.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.d75dc38b.iframe.bundle.js.map +0 -1
package/src/ui/WalletButton.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
2
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
3
|
-
import Button from "@mui/material/Button";
|
|
4
|
-
import { styled, darken } from "@mui/material/styles";
|
|
5
|
-
|
|
6
|
-
import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
|
|
7
|
-
|
|
8
|
-
export const WalletButton = (props) => {
|
|
9
|
-
const theme = useContext(ThemeProvider);
|
|
10
|
-
let buttonStyle = {};
|
|
11
|
-
|
|
12
|
-
console.log(Object.keys(theme.actionButton));
|
|
13
|
-
let currentTheme = Object.keys(theme.actionButton).find(
|
|
14
|
-
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
15
|
-
);
|
|
16
|
-
if (currentTheme) {
|
|
17
|
-
buttonStyle = {
|
|
18
|
-
cursor: "pointer",
|
|
19
|
-
display: "flex",
|
|
20
|
-
flexDirection: "row",
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
justifyContent: "center",
|
|
23
|
-
padding: 0,
|
|
24
|
-
marginTop: theme.actionButton[currentTheme].margin,
|
|
25
|
-
border: props.outlined ? "2px solid black" : "none",
|
|
26
|
-
borderRadius: theme.actionButton[currentTheme].borderRadius,
|
|
27
|
-
backgroundColor: "white",
|
|
28
|
-
"&:hover": {
|
|
29
|
-
backgroundColor: darken("#ffffff", 0.1)
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
} else {
|
|
33
|
-
buttonStyle = {
|
|
34
|
-
cursor: "pointer",
|
|
35
|
-
display: "flex",
|
|
36
|
-
flexDirection: "row",
|
|
37
|
-
alignItems: "center",
|
|
38
|
-
justifyContent: "center",
|
|
39
|
-
marginTop: theme.margins,
|
|
40
|
-
border: props.outlined ? "2px solid black" : "none",
|
|
41
|
-
borderRadius: 0,
|
|
42
|
-
backgroundColor: "white",
|
|
43
|
-
"&:hover": {
|
|
44
|
-
backgroundColor: darken("#ffffff", 0.1)
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const StyledButton = styled(Button)(({ theme }) => {
|
|
50
|
-
return {
|
|
51
|
-
// "label + &": {
|
|
52
|
-
// marginTop: theme.spacing(3)
|
|
53
|
-
// },
|
|
54
|
-
|
|
55
|
-
borderRadius: 4,
|
|
56
|
-
position: "relative",
|
|
57
|
-
border: "1px solid #ced4da",
|
|
58
|
-
fontSize: 16,
|
|
59
|
-
// width: "auto",
|
|
60
|
-
height: 50,
|
|
61
|
-
// padding: "10px 12px",
|
|
62
|
-
...buttonStyle,
|
|
63
|
-
"&:focus": {
|
|
64
|
-
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
65
|
-
borderColor: theme.palette.primary.main
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<StyledButton
|
|
72
|
-
// style={buttonStyle}
|
|
73
|
-
onClick={props.handleClick}
|
|
74
|
-
>
|
|
75
|
-
<WalletIcon />
|
|
76
|
-
<div style={{ width: 10 }} />
|
|
77
|
-
<p
|
|
78
|
-
style={{
|
|
79
|
-
color: "black",
|
|
80
|
-
fontSize: 14,
|
|
81
|
-
textAlign: "center",
|
|
82
|
-
letterSpacing: 0.4,
|
|
83
|
-
fontFamily: "Roboto",
|
|
84
|
-
fontWeight: 500
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
{props.buttonText}
|
|
88
|
-
</p>
|
|
89
|
-
</StyledButton>
|
|
90
|
-
);
|
|
91
|
-
};
|