@sikka/hawa 0.0.3 → 0.0.6
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/.github/workflows/hawa-publish-push.yml +45 -0
- package/.github/workflows/hawa-publish.yml +2 -0
- package/es/index.es.js +1 -0
- package/lib/index.js +1 -0
- package/package.json +24 -13
- package/rollup.config.js +2 -2
- package/src/Assets/images/card-background/1.jpeg +0 -0
- package/src/Assets/images/card-background/10.jpeg +0 -0
- package/src/Assets/images/card-background/11.jpeg +0 -0
- package/src/Assets/images/card-background/12.jpeg +0 -0
- package/src/Assets/images/card-background/13.jpeg +0 -0
- package/src/Assets/images/card-background/14.jpeg +0 -0
- package/src/Assets/images/card-background/15.jpeg +0 -0
- package/src/Assets/images/card-background/16.jpeg +0 -0
- package/src/Assets/images/card-background/17.jpeg +0 -0
- package/src/Assets/images/card-background/18.jpeg +0 -0
- package/src/Assets/images/card-background/19.jpeg +0 -0
- package/src/Assets/images/card-background/2.jpeg +0 -0
- package/src/Assets/images/card-background/20.jpeg +0 -0
- package/src/Assets/images/card-background/21.jpeg +0 -0
- package/src/Assets/images/card-background/22.jpeg +0 -0
- package/src/Assets/images/card-background/23.jpeg +0 -0
- package/src/Assets/images/card-background/24.jpeg +0 -0
- package/src/Assets/images/card-background/25.jpeg +0 -0
- package/src/Assets/images/card-background/3.jpeg +0 -0
- package/src/Assets/images/card-background/4.jpeg +0 -0
- package/src/Assets/images/card-background/5.jpeg +0 -0
- package/src/Assets/images/card-background/6.jpeg +0 -0
- package/src/Assets/images/card-background/7.jpeg +0 -0
- package/src/Assets/images/card-background/8.jpeg +0 -0
- package/src/Assets/images/card-background/9.jpeg +0 -0
- package/src/Assets/images/card-type/amex.png +0 -0
- package/src/Assets/images/card-type/diners.png +0 -0
- package/src/Assets/images/card-type/discover.png +0 -0
- package/src/Assets/images/card-type/mastercard.png +0 -0
- package/src/Assets/images/card-type/troy.png +0 -0
- package/src/Assets/images/card-type/unionpay.png +0 -0
- package/src/Assets/images/card-type/visa.png +0 -0
- package/src/blocks/Account/UserProfile.js +11 -11
- package/src/blocks/Account/UserSettings.js +11 -11
- package/src/blocks/AuthForms/NewPasswordForm.js +83 -10
- package/src/blocks/AuthForms/ResetPasswordForm.js +50 -8
- package/src/blocks/AuthForms/SignInForm.js +96 -13
- package/src/blocks/AuthForms/SignUpForm.js +113 -13
- package/src/blocks/Payment/ChargeWalletForm.js +32 -0
- package/src/blocks/Payment/CreditCardForm.js +31 -0
- package/src/blocks/Payment/Form/CForm.js +328 -0
- package/src/blocks/Payment/Form/Card.js +242 -0
- package/src/blocks/Payment/Gateway/GooglePay.js +251 -0
- package/src/blocks/Payment/Gateway/Payfort.js +90 -0
- package/src/blocks/Payment/Gateway/Paypal.js +138 -0
- package/src/blocks/Payment/Gateway/Wallet.js +149 -0
- package/src/blocks/Payment/PayWithWallet.js +35 -0
- package/src/blocks/Payment/PaymentMethod.js +132 -0
- package/src/blocks/Payment/SelectPayment.js +94 -0
- package/src/blocks/Payment/index.js +18 -0
- package/src/index.js +4 -1
- package/src/layout/Box.js +30 -17
- package/src/stories/BlocksStories/AuthForm.stories.js +105 -0
- package/src/stories/BlocksStories/PaymentForm.stories.js +82 -0
- package/src/stories/{UserAccount.stories.js → BlocksStories/UserAccount.stories.js} +2 -2
- package/src/stories/GlobalVariables.stories.js +33 -90
- package/src/stories/HawaProvider.stories.js +0 -1
- package/src/stories/Introduction.stories.js +132 -110
- package/src/stories/LayoutStories/Box.stories.js +56 -0
- package/src/stories/UIStories/ActionButton.stories.js +53 -0
- package/src/stories/{AdaptiveButton.stories.js → UIStories/AdaptiveButton.stories.js} +3 -3
- package/src/stories/UIStories/Alert.stories.js +55 -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/{RadioSelector.stories.js → UIStories/RadioSelector.stories.js} +5 -6
- package/src/stories/{TextField.stories.js → UIStories/TextField.stories.js} +4 -5
- package/src/styles.scss +679 -0
- package/src/themes/HawaProvider.js +110 -16
- package/src/ui/ActionButton.js +35 -10
- package/src/ui/AdaptiveButton.js +29 -29
- package/src/ui/ApplePayButton.js +93 -0
- package/src/ui/AutoCompleteField.js +0 -1
- package/src/ui/DragDropImages.js +2 -2
- package/src/ui/GithubButton.js +90 -0
- package/src/ui/GoogleButton.js +82 -0
- package/src/ui/GooglePayButton.js +93 -0
- package/src/ui/HawaAlert.js +37 -0
- package/src/ui/HawaButton.js +48 -0
- package/src/ui/{Checkbox.js → HawaCheckbox.js} +3 -3
- package/src/ui/HawaInputLabel.js +32 -0
- package/src/ui/HawaLogoButton.js +48 -0
- package/src/ui/{RadioSelector.js → HawaRadio.js} +1 -1
- package/src/ui/{TextArea.js → HawaTextArea.js} +2 -2
- package/src/ui/HawaTextField.js +113 -0
- package/src/ui/HawaTypography.js +29 -0
- package/src/ui/MadaButton.js +93 -0
- package/src/ui/PayPalButton.js +93 -0
- package/src/ui/RadioBox.js +2 -2
- package/src/ui/STCPayButton.js +93 -0
- package/src/ui/SelectedField.js +4 -4
- package/src/ui/StyledTooltip.js +1 -1
- package/src/ui/TabPanel.js +1 -1
- package/src/ui/TwitterButton.js +83 -0
- package/src/ui/VisaMasterButton.js +93 -0
- package/src/ui/WalletButton.js +24 -0
- package/src/ui/index.js +23 -11
- package/storybook-static/0.0d994c92.iframe.bundle.js +3 -0
- package/storybook-static/{1.4e43f671.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/0.f47eb24a4893a96ec307.manager.bundle.js +1 -0
- package/storybook-static/1.aabc3f3a.iframe.bundle.js +1 -0
- package/storybook-static/{3.c1dc7159.iframe.bundle.js → 2.430bf1e3.iframe.bundle.js} +1 -1
- package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +2 -0
- package/storybook-static/{4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt → 4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/{5.88fe62ee92ff5ca67829.manager.bundle.js → 5.63ab4f94d50a3acf080d.manager.bundle.js} +1 -1
- package/storybook-static/{7.69d2e532.iframe.bundle.js → 6.704d1e8d.iframe.bundle.js} +1 -1
- package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js → 6.a6d45262f7e98f3f18d3.manager.bundle.js} +2 -2
- package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt → 6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/{7.5ec31f3702b08ab0b71c.manager.bundle.js → 7.097710753af9a1c41b80.manager.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/{8.5ce13be7612bd3a6b864.manager.bundle.js → 8.76c3cbf398692028e834.manager.bundle.js} +1 -1
- 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/index.html +1 -1
- package/storybook-static/main.ac6e4b72b033097dad76.manager.bundle.js +1 -0
- package/storybook-static/main.e55ce615.iframe.bundle.js +1 -0
- package/storybook-static/{runtime~main.cc29f4c2175f187a3707.manager.bundle.js → runtime~main.c8dac23bc753439736f0.manager.bundle.js} +1 -1
- package/storybook-static/runtime~main.cfefe972.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.30a2c5d7.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.d144d840.iframe.bundle.js.LICENSE.txt → vendors~main.30a2c5d7.iframe.bundle.js.LICENSE.txt} +3 -30
- package/storybook-static/vendors~main.30a2c5d7.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.a697e07137d366f95f76.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt → vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt} +0 -0
- package/tools/build-styles.js +17 -0
- package/src/blocks/AuthForms/viaFacebook.js +0 -0
- package/src/blocks/AuthForms/viaGithub.js +0 -0
- package/src/blocks/AuthForms/viaGoogle.js +0 -0
- package/src/blocks/AuthForms/viaTwitter.js +0 -0
- package/src/stories/ActionButton.stories.js +0 -49
- package/src/stories/Alert.stories.js +0 -41
- package/src/stories/AuthForm.stories.js +0 -79
- package/src/stories/Box.stories.js +0 -64
- package/src/stories/InputLabel.stories.js +0 -92
- package/src/ui/StyledAlert.js +0 -30
- package/src/ui/StyledInputLabel.js +0 -19
- package/src/ui/TextField.js +0 -62
- package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +0 -1
- package/storybook-static/0.dd3d47f5.iframe.bundle.js +0 -1
- package/storybook-static/1.4e43f671.iframe.bundle.js +0 -3
- package/storybook-static/1.4e43f671.iframe.bundle.js.map +0 -1
- package/storybook-static/2.9a757207.iframe.bundle.js +0 -1
- package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +0 -2
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
- package/storybook-static/main.65cb2769.iframe.bundle.js +0 -1
- package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.6e2e1544.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +0 -2
- package/yarn-error.log +0 -10910
|
@@ -5,37 +5,131 @@ export const defaultTheme = {
|
|
|
5
5
|
borderRadius: 10,
|
|
6
6
|
primaryColor: "blue",
|
|
7
7
|
secondaryColor: "grey",
|
|
8
|
-
primaryActionColor: '#f72585', //Colors of the buttons
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
// primaryActionColor: '#f72585', //Colors of the buttons
|
|
9
|
+
primaryActionColor: "grey", //Colors of the buttons
|
|
10
|
+
secondaryActionColor: "#4cc9f0", //Colors of the buttons
|
|
11
|
+
layoutColor: "#d3d4d9", //Colors of boxes and cards
|
|
12
|
+
textColor: "black", //Colors of text everywhere
|
|
13
|
+
inputColor: "white", //Color of input fields
|
|
14
|
+
lightBackground: "#FBF5F3", //
|
|
15
|
+
darkBackground: "#0F0E0E",
|
|
16
|
+
testcolor: "green",
|
|
17
|
+
margins: 10,
|
|
18
|
+
paddings: 10,
|
|
19
|
+
allBorderRadius: 10,
|
|
20
|
+
typography: {
|
|
21
|
+
primary: { color: "black" },
|
|
22
|
+
secondary: { color: "white" }
|
|
23
|
+
},
|
|
24
|
+
logoButton: {
|
|
25
|
+
primary: {
|
|
26
|
+
borderRadius: 10,
|
|
27
|
+
backgroundColor: "#f90900",
|
|
16
28
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
padding: 10,
|
|
30
|
+
border: "1px solid #ced4da",
|
|
31
|
+
height: 50,
|
|
32
|
+
"&:focus": {
|
|
33
|
+
borderColor: "green"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
secondary: {
|
|
37
|
+
borderRadius: 10,
|
|
38
|
+
backgroundColor: "#f90900",
|
|
39
|
+
padding: 10,
|
|
40
|
+
border: "1px solid #ced4da",
|
|
41
|
+
height: 50,
|
|
42
|
+
"&:focus": {
|
|
43
|
+
borderColor: "green"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
actionButton: {
|
|
48
|
+
primary: {
|
|
49
|
+
borderRadius: 10,
|
|
50
|
+
backgroundColor: "#f90900",
|
|
51
|
+
color: "white",
|
|
52
|
+
margin: 10,
|
|
53
|
+
padding: 10,
|
|
54
|
+
border: "1px solid #ced4da",
|
|
55
|
+
fontSize: 16,
|
|
56
|
+
height: 50,
|
|
57
|
+
"&:focus": {
|
|
58
|
+
borderColor: "red"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
secondary: {
|
|
62
|
+
borderRadius: 10,
|
|
63
|
+
margin: 10,
|
|
64
|
+
padding: 10,
|
|
65
|
+
backgroundColor: "#FF8811",
|
|
66
|
+
color: "black"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
20
69
|
layout: {
|
|
21
70
|
primary: {
|
|
22
|
-
backgroundColor:
|
|
71
|
+
backgroundColor: "#d3d4d9",
|
|
72
|
+
color: "black",
|
|
73
|
+
margin: 10,
|
|
74
|
+
padding: 10,
|
|
75
|
+
borderRadius: 10
|
|
23
76
|
},
|
|
24
77
|
secondary: {
|
|
25
|
-
backgroundColor:
|
|
78
|
+
backgroundColor: "#001E3C",
|
|
79
|
+
// backgroundColor: "red",
|
|
80
|
+
color: "white",
|
|
81
|
+
margin: 10,
|
|
82
|
+
padding: 10,
|
|
83
|
+
borderRadius: 10
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
inputFields: {
|
|
87
|
+
primary: {
|
|
88
|
+
backgroundColor: "white",
|
|
89
|
+
display: "flex",
|
|
90
|
+
flexDirection: "column",
|
|
91
|
+
alignItems: "flex-start",
|
|
92
|
+
justifyContent: "flex-start",
|
|
93
|
+
borderRadius: 10,
|
|
94
|
+
"&:focus": {
|
|
95
|
+
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
96
|
+
// borderColor: theme.palette.primary.main
|
|
97
|
+
borderColor: "#f90900"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
secondary: {
|
|
101
|
+
backgroundColor: "white",
|
|
102
|
+
display: "flex",
|
|
103
|
+
flexDirection: "column",
|
|
104
|
+
alignItems: "flex-start",
|
|
105
|
+
justifyContent: "flex-start",
|
|
106
|
+
borderRadius: 10
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
alerts: {
|
|
110
|
+
primary: {
|
|
111
|
+
// marginTop: 10,
|
|
112
|
+
marginBottom: 10,
|
|
113
|
+
padding: 10,
|
|
114
|
+
borderRadius: 10
|
|
115
|
+
},
|
|
116
|
+
secondary: {
|
|
117
|
+
marginBottom: 10,
|
|
118
|
+
padding: 10,
|
|
119
|
+
borderRadius: 10
|
|
26
120
|
}
|
|
27
121
|
}
|
|
28
|
-
}
|
|
122
|
+
};
|
|
29
123
|
|
|
30
124
|
export const ThemeProvider = createContext(defaultTheme);
|
|
31
125
|
|
|
32
126
|
export const HawaProvider = ({ theme, ...props }) => {
|
|
33
|
-
if (props.size ===
|
|
127
|
+
if (props.size === "large") {
|
|
34
128
|
theme = {
|
|
35
129
|
...theme,
|
|
36
130
|
paddings: 20,
|
|
37
131
|
margins: 20
|
|
38
|
-
}
|
|
132
|
+
};
|
|
39
133
|
}
|
|
40
134
|
return (
|
|
41
135
|
<ThemeProvider.Provider value={theme || defaultTheme}>
|
package/src/ui/ActionButton.js
CHANGED
|
@@ -1,15 +1,40 @@
|
|
|
1
|
-
import Button from "@material
|
|
1
|
+
import Button from "@mui/material/Button";
|
|
2
2
|
import { useContext } from "react";
|
|
3
3
|
import { ThemeProvider } from "../themes/HawaProvider";
|
|
4
|
+
import { styled, darken } from "@mui/material/styles";
|
|
4
5
|
|
|
5
6
|
export const ActionButton = (props) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const theme = useContext(ThemeProvider);
|
|
8
|
+
const currentTheme = Object.keys(theme.actionButton).find(
|
|
9
|
+
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
10
|
+
);
|
|
11
|
+
let actionButtonStyle = {};
|
|
12
|
+
|
|
13
|
+
if (currentTheme) {
|
|
14
|
+
actionButtonStyle = {
|
|
15
|
+
...theme.actionButton[currentTheme],
|
|
16
|
+
margin: props.last ? 0 : theme.actionButton[currentTheme].margin,
|
|
17
|
+
marginTop: props.last ? theme.actionButton[currentTheme].margin * 2 : 0,
|
|
18
|
+
"&:hover": {
|
|
19
|
+
backgroundColor: darken(
|
|
20
|
+
theme.actionButton[currentTheme]?.backgroundColor,
|
|
21
|
+
0.1
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
} else {
|
|
26
|
+
actionButtonStyle = {
|
|
27
|
+
backgroundColor: "black",
|
|
28
|
+
color: "white",
|
|
29
|
+
padding: 10,
|
|
30
|
+
marginTop: props.last ? 10 * 2 : 0
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const StyledButton = styled(Button)(({ theme }) => {
|
|
35
|
+
return {
|
|
36
|
+
...actionButtonStyle
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
return <StyledButton {...props}>{props.text}</StyledButton>;
|
|
15
40
|
};
|
package/src/ui/AdaptiveButton.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useContext } from "react";
|
|
2
|
-
import Button from "@material
|
|
3
|
-
import Tooltip from "@material
|
|
2
|
+
import Button from "@mui/material/Button";
|
|
3
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
4
4
|
import { motion } from "framer-motion";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { ThemeProvider } from "../themes/HawaProvider";
|
|
@@ -101,30 +101,30 @@ export const AdaptiveButton = (props) => {
|
|
|
101
101
|
props.hint ? (
|
|
102
102
|
props.hint
|
|
103
103
|
) : (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
</div>
|
|
116
|
-
<div
|
|
117
|
-
style={{
|
|
118
|
-
fontSize: 13,
|
|
119
|
-
fontWeight: 100,
|
|
120
|
-
padding: 10,
|
|
121
|
-
textAlign: "center"
|
|
122
|
-
}}
|
|
123
|
-
>
|
|
124
|
-
{props.hintContent}
|
|
125
|
-
</div>
|
|
104
|
+
<div>
|
|
105
|
+
<div
|
|
106
|
+
style={{
|
|
107
|
+
fontSize: 20,
|
|
108
|
+
fontWeight: 800,
|
|
109
|
+
padding: 10,
|
|
110
|
+
paddingBottom: 5,
|
|
111
|
+
textAlign: "center"
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
{props.hintTitle}
|
|
126
115
|
</div>
|
|
127
|
-
|
|
116
|
+
<div
|
|
117
|
+
style={{
|
|
118
|
+
fontSize: 13,
|
|
119
|
+
fontWeight: 100,
|
|
120
|
+
padding: 10,
|
|
121
|
+
textAlign: "center"
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
{props.hintContent}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
)
|
|
128
128
|
}
|
|
129
129
|
>
|
|
130
130
|
<Button
|
|
@@ -139,8 +139,8 @@ export const AdaptiveButton = (props) => {
|
|
|
139
139
|
color: hovered
|
|
140
140
|
? "#ffffff"
|
|
141
141
|
: props.danger
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
? "#f50057"
|
|
143
|
+
: "var(--blue)"
|
|
144
144
|
}}
|
|
145
145
|
>
|
|
146
146
|
{props.buttonLabel}
|
|
@@ -197,8 +197,8 @@ export const AdaptiveButton = (props) => {
|
|
|
197
197
|
color: hovered
|
|
198
198
|
? "#ffffff"
|
|
199
199
|
: props.danger
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
? "#f50057"
|
|
201
|
+
: "var(--blue)"
|
|
202
202
|
}}
|
|
203
203
|
>
|
|
204
204
|
{props.icon}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 GitHubIcon from "@mui/icons-material/GitHub";
|
|
7
|
+
|
|
8
|
+
export const ApplePayButton = (props) => {
|
|
9
|
+
const theme = useContext(ThemeProvider);
|
|
10
|
+
let buttonStyle = {};
|
|
11
|
+
|
|
12
|
+
let currentTheme = Object.keys(theme.actionButton).find(
|
|
13
|
+
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
14
|
+
);
|
|
15
|
+
if (currentTheme) {
|
|
16
|
+
buttonStyle = {
|
|
17
|
+
cursor: "pointer",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
padding: 0,
|
|
23
|
+
marginTop: theme.actionButton[currentTheme].margin,
|
|
24
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
25
|
+
borderRadius: theme.actionButton[currentTheme].borderRadius,
|
|
26
|
+
backgroundColor: "white",
|
|
27
|
+
"&:hover": {
|
|
28
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
buttonStyle = {
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
marginTop: theme.margins,
|
|
39
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
40
|
+
borderRadius: 0,
|
|
41
|
+
backgroundColor: "white",
|
|
42
|
+
"&:hover": {
|
|
43
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const StyledButton = styled(Button)(({ theme }) => {
|
|
49
|
+
return {
|
|
50
|
+
// "label + &": {
|
|
51
|
+
// marginTop: theme.spacing(3)
|
|
52
|
+
// },
|
|
53
|
+
|
|
54
|
+
borderRadius: 4,
|
|
55
|
+
position: "relative",
|
|
56
|
+
border: "1px solid #ced4da",
|
|
57
|
+
fontSize: 16,
|
|
58
|
+
// width: "auto",
|
|
59
|
+
height: 50,
|
|
60
|
+
// padding: "10px 12px",
|
|
61
|
+
...buttonStyle,
|
|
62
|
+
"&:focus": {
|
|
63
|
+
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
64
|
+
borderColor: theme.palette.primary.main
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<StyledButton
|
|
71
|
+
// style={buttonStyle}
|
|
72
|
+
onClick={props.handleClick}
|
|
73
|
+
>
|
|
74
|
+
<img
|
|
75
|
+
src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png"
|
|
76
|
+
height={40}
|
|
77
|
+
/>{" "}
|
|
78
|
+
<div style={{ width: 10 }} />
|
|
79
|
+
<p
|
|
80
|
+
style={{
|
|
81
|
+
color: "black",
|
|
82
|
+
fontSize: 14,
|
|
83
|
+
textAlign: "center",
|
|
84
|
+
letterSpacing: 0.4,
|
|
85
|
+
fontFamily: "Roboto",
|
|
86
|
+
fontWeight: 500
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
{props.buttonText}
|
|
90
|
+
</p>
|
|
91
|
+
</StyledButton>
|
|
92
|
+
);
|
|
93
|
+
};
|
package/src/ui/DragDropImages.js
CHANGED
|
@@ -3,8 +3,8 @@ import React, { useEffect, useState } from "react";
|
|
|
3
3
|
import { getToken } from "../token";
|
|
4
4
|
import { useDropzone } from "react-dropzone";
|
|
5
5
|
import useTranslation from "next-translate/useTranslation";
|
|
6
|
-
import Badge from "@material
|
|
7
|
-
import CloseIcon from "@
|
|
6
|
+
import Badge from "@mui/material/Badge";
|
|
7
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
8
8
|
import styles from "../styles/Theme.module.css";
|
|
9
9
|
|
|
10
10
|
const thumbsContainer = {
|
|
@@ -0,0 +1,90 @@
|
|
|
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 GitHubIcon from "@mui/icons-material/GitHub";
|
|
7
|
+
|
|
8
|
+
export const GithubButton = (props) => {
|
|
9
|
+
const theme = useContext(ThemeProvider);
|
|
10
|
+
let buttonStyle = {};
|
|
11
|
+
|
|
12
|
+
let currentTheme = Object.keys(theme.actionButton).find(
|
|
13
|
+
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
14
|
+
);
|
|
15
|
+
if (currentTheme) {
|
|
16
|
+
buttonStyle = {
|
|
17
|
+
cursor: "pointer",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
padding: 0,
|
|
23
|
+
marginTop: theme.actionButton[currentTheme].margin,
|
|
24
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
25
|
+
borderRadius: theme.actionButton[currentTheme].borderRadius,
|
|
26
|
+
backgroundColor: "white",
|
|
27
|
+
"&:hover": {
|
|
28
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
buttonStyle = {
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
marginTop: theme.margins,
|
|
39
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
40
|
+
borderRadius: 0,
|
|
41
|
+
backgroundColor: "white",
|
|
42
|
+
"&:hover": {
|
|
43
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const StyledButton = styled(Button)(({ theme }) => {
|
|
49
|
+
return {
|
|
50
|
+
// "label + &": {
|
|
51
|
+
// marginTop: theme.spacing(3)
|
|
52
|
+
// },
|
|
53
|
+
|
|
54
|
+
borderRadius: 4,
|
|
55
|
+
position: "relative",
|
|
56
|
+
border: "1px solid #ced4da",
|
|
57
|
+
fontSize: 16,
|
|
58
|
+
// width: "auto",
|
|
59
|
+
height: 50,
|
|
60
|
+
// padding: "10px 12px",
|
|
61
|
+
...buttonStyle,
|
|
62
|
+
"&:focus": {
|
|
63
|
+
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
64
|
+
borderColor: theme.palette.primary.main
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<StyledButton
|
|
71
|
+
// style={buttonStyle}
|
|
72
|
+
onClick={props.handleClick}
|
|
73
|
+
>
|
|
74
|
+
<GitHubIcon />
|
|
75
|
+
<div style={{ width: 10 }} />
|
|
76
|
+
<p
|
|
77
|
+
style={{
|
|
78
|
+
color: "black",
|
|
79
|
+
fontSize: 14,
|
|
80
|
+
textAlign: "center",
|
|
81
|
+
letterSpacing: 0.4,
|
|
82
|
+
fontFamily: "Roboto",
|
|
83
|
+
fontWeight: 500
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
{props.buttonText}
|
|
87
|
+
</p>
|
|
88
|
+
</StyledButton>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { ThemeProvider } from "../themes/HawaProvider";
|
|
3
|
+
import { styled, darken } from "@mui/material/styles";
|
|
4
|
+
import Button from "@mui/material/Button";
|
|
5
|
+
|
|
6
|
+
export const GoogleButton = (props) => {
|
|
7
|
+
const theme = useContext(ThemeProvider);
|
|
8
|
+
let buttonStyle = {};
|
|
9
|
+
|
|
10
|
+
let currentTheme = Object.keys(theme.actionButton).find(
|
|
11
|
+
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
12
|
+
);
|
|
13
|
+
if (currentTheme) {
|
|
14
|
+
buttonStyle = {
|
|
15
|
+
cursor: "pointer",
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
marginTop: theme.layout[currentTheme].margin,
|
|
21
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
22
|
+
borderRadius: theme.layout[currentTheme].borderRadius,
|
|
23
|
+
backgroundColor: "white",
|
|
24
|
+
"&:hover": {
|
|
25
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
} else {
|
|
29
|
+
buttonStyle = {
|
|
30
|
+
cursor: "pointer",
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "row",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
marginTop: theme.margins,
|
|
36
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
37
|
+
borderRadius: 0,
|
|
38
|
+
backgroundColor: "white",
|
|
39
|
+
"&:hover": {
|
|
40
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const StyledButton = styled(Button)(({ theme }) => {
|
|
45
|
+
return {
|
|
46
|
+
// "label + &": {
|
|
47
|
+
// marginTop: theme.spacing(3)
|
|
48
|
+
// },
|
|
49
|
+
|
|
50
|
+
borderRadius: 4,
|
|
51
|
+
position: "relative",
|
|
52
|
+
border: "1px solid #ced4da",
|
|
53
|
+
fontSize: 16,
|
|
54
|
+
// width: "auto",
|
|
55
|
+
height: 50,
|
|
56
|
+
// padding: "10px 12px",
|
|
57
|
+
...buttonStyle,
|
|
58
|
+
"&:focus": {
|
|
59
|
+
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
60
|
+
borderColor: theme.palette.primary.main
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
return (
|
|
65
|
+
<StyledButton onClick={props.handleClick}>
|
|
66
|
+
<img src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" />
|
|
67
|
+
<div style={{ width: 10 }} />
|
|
68
|
+
<p
|
|
69
|
+
style={{
|
|
70
|
+
color: "black",
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
textAlign: "center",
|
|
73
|
+
letterSpacing: 0.4,
|
|
74
|
+
fontFamily: "Roboto",
|
|
75
|
+
fontWeight: 500
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
{props.buttonText}
|
|
79
|
+
</p>
|
|
80
|
+
</StyledButton>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
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 GitHubIcon from "@mui/icons-material/GitHub";
|
|
7
|
+
|
|
8
|
+
export const GooglePayButton = (props) => {
|
|
9
|
+
const theme = useContext(ThemeProvider);
|
|
10
|
+
let buttonStyle = {};
|
|
11
|
+
|
|
12
|
+
let currentTheme = Object.keys(theme.actionButton).find(
|
|
13
|
+
(themeName) => themeName.toLowerCase() === props.themeType?.toLowerCase()
|
|
14
|
+
);
|
|
15
|
+
if (currentTheme) {
|
|
16
|
+
buttonStyle = {
|
|
17
|
+
cursor: "pointer",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
padding: 0,
|
|
23
|
+
marginTop: theme.actionButton[currentTheme].margin,
|
|
24
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
25
|
+
borderRadius: theme.actionButton[currentTheme].borderRadius,
|
|
26
|
+
backgroundColor: "white",
|
|
27
|
+
"&:hover": {
|
|
28
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
buttonStyle = {
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
marginTop: theme.margins,
|
|
39
|
+
border: props.outlined ? "2px solid black" : "none",
|
|
40
|
+
borderRadius: 0,
|
|
41
|
+
backgroundColor: "white",
|
|
42
|
+
"&:hover": {
|
|
43
|
+
backgroundColor: darken("#ffffff", 0.1)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const StyledButton = styled(Button)(({ theme }) => {
|
|
49
|
+
return {
|
|
50
|
+
// "label + &": {
|
|
51
|
+
// marginTop: theme.spacing(3)
|
|
52
|
+
// },
|
|
53
|
+
|
|
54
|
+
borderRadius: 4,
|
|
55
|
+
position: "relative",
|
|
56
|
+
border: "1px solid #ced4da",
|
|
57
|
+
fontSize: 16,
|
|
58
|
+
// width: "auto",
|
|
59
|
+
height: 50,
|
|
60
|
+
// padding: "10px 12px",
|
|
61
|
+
...buttonStyle,
|
|
62
|
+
"&:focus": {
|
|
63
|
+
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
|
|
64
|
+
borderColor: theme.palette.primary.main
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<StyledButton
|
|
71
|
+
// style={buttonStyle}
|
|
72
|
+
onClick={props.handleClick}
|
|
73
|
+
>
|
|
74
|
+
<img
|
|
75
|
+
src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png"
|
|
76
|
+
height={20}
|
|
77
|
+
/>{" "}
|
|
78
|
+
<div style={{ width: 10 }} />
|
|
79
|
+
<p
|
|
80
|
+
style={{
|
|
81
|
+
color: "black",
|
|
82
|
+
fontSize: 14,
|
|
83
|
+
textAlign: "center",
|
|
84
|
+
letterSpacing: 0.4,
|
|
85
|
+
fontFamily: "Roboto",
|
|
86
|
+
fontWeight: 500
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
{props.buttonText}
|
|
90
|
+
</p>
|
|
91
|
+
</StyledButton>
|
|
92
|
+
);
|
|
93
|
+
};
|