@sikka/hawa 0.0.9 → 0.0.12
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 +5 -4
- package/src/blocks/Account/UserProfileForm.js +80 -0
- package/src/blocks/Account/UserSettingsForm.js +17 -0
- package/src/blocks/Account/index.js +2 -2
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -85
- package/src/blocks/AuthForms/ResetPasswordForm.js +43 -42
- package/src/blocks/AuthForms/SignInForm.js +99 -98
- package/src/blocks/AuthForms/SignUpForm.js +106 -104
- package/src/blocks/Payment/ChargeWalletForm.js +40 -37
- package/src/blocks/Payment/CreditCardForm.js +49 -44
- package/src/blocks/Payment/PayWithWallet.js +16 -6
- package/src/blocks/Payment/PaymentMethod.js +0 -1
- package/src/blocks/Payment/SelectPayment.js +53 -55
- package/src/index.js +0 -1
- package/src/layout/Box.js +36 -33
- package/src/stories/BlocksStories/Account/UserProfile.stories.js +21 -0
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +21 -0
- package/src/stories/BlocksStories/Auth/NewPassword.stories.js +60 -0
- package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +59 -0
- package/src/stories/BlocksStories/Auth/SignIn.stories.js +89 -0
- package/src/stories/BlocksStories/Auth/SignUp.stories.js +90 -0
- package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +30 -0
- package/src/stories/BlocksStories/Payment/PayWithCreditCard.stories.js +37 -0
- package/src/stories/BlocksStories/Payment/PayWithWallet.stories.js +17 -0
- package/src/stories/BlocksStories/Payment/PaymentSelection.stories.js +60 -0
- package/src/stories/LayoutStories/Box.stories.js +9 -20
- package/src/stories/UIStories/ActionButton.stories.js +1 -6
- package/src/stories/UIStories/AdaptiveButton.stories.js +1 -6
- package/src/stories/UIStories/Alert.stories.js +2 -3
- package/src/stories/UIStories/LogoButtons.stories.js +47 -64
- package/src/stories/UIStories/RadioSelector.stories.js +15 -44
- package/src/stories/UIStories/SettingsRow.stories.js +3 -16
- package/src/themes/HawaProvider.js +187 -178
- package/src/themes/QawaimTheme.js +199 -0
- package/src/ui/ActionButton.js +32 -35
- package/src/ui/AdaptiveButton.js +3 -8
- package/src/ui/HawaAlert.js +22 -24
- package/src/ui/HawaButton.js +43 -44
- package/src/ui/HawaInputLabel.js +22 -23
- package/src/ui/HawaLogoButton.js +7 -45
- package/src/ui/HawaRadio.js +18 -61
- package/src/ui/HawaSettingsRow.js +1 -27
- package/src/ui/HawaTextArea.js +1 -1
- package/src/ui/HawaTextField.js +146 -93
- package/src/ui/HawaTypography.js +19 -21
- package/src/ui/Row.js +1 -1
- package/src/ui/StyledTooltip.js +1 -1
- package/src/ui/TabPanel.js +1 -1
- package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.a9a16923.iframe.bundle.js +1 -0
- package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +1 -0
- package/src/blocks/Account/UserProfile.js +0 -65
- package/src/blocks/Account/UserSettings.js +0 -15
- package/src/stories/BlocksStories/AuthForm.stories.js +0 -105
- package/src/stories/BlocksStories/PaymentForm.stories.js +0 -86
- package/src/stories/BlocksStories/UserForm.stories.js +0 -41
- package/src/stories/HawaProvider.stories.js +0 -22
- package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
- package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
|
@@ -1,183 +1,192 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme } from "@mui/system";
|
|
2
|
+
// import { createContext } from "react";
|
|
2
3
|
|
|
3
|
-
//make the text color of the action buttons different from the text color of the layout
|
|
4
|
-
let allPrimaryBG = "#f90900";
|
|
5
|
-
let allPrimaryAction = "#B20D30";
|
|
6
|
-
export const defaultTheme = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
4
|
+
// //make the text color of the action buttons different from the text color of the layout
|
|
5
|
+
// let allPrimaryBG = "#f90900";
|
|
6
|
+
// let allPrimaryAction = "#B20D30";
|
|
7
|
+
// export const defaultTheme = {
|
|
8
|
+
// allPrimaryBG: "#f90900",
|
|
9
|
+
// allPrimaryAction: "#138A36",
|
|
10
|
+
// allBorderRadius: 10,
|
|
11
|
+
// borderRadius: 10,
|
|
12
|
+
// primaryColor: "blue",
|
|
13
|
+
// secondaryColor: "grey",
|
|
14
|
+
// // primaryActionColor: '#f72585', //Colors of the buttons
|
|
15
|
+
// primaryActionColor: "grey", //Colors of the buttons
|
|
16
|
+
// secondaryActionColor: "#4cc9f0", //Colors of the buttons
|
|
17
|
+
// layoutColor: "#d3d4d9", //Colors of boxes and cards
|
|
18
|
+
// textColor: "black", //Colors of text everywhere
|
|
19
|
+
// inputColor: "white", //Color of input fields
|
|
20
|
+
// lightBackground: "#FBF5F3", //
|
|
21
|
+
// darkBackground: "#0F0E0E",
|
|
22
|
+
// testcolor: "green",
|
|
23
|
+
// margins: 10,
|
|
24
|
+
// paddings: 10,
|
|
25
|
+
// typography: {
|
|
26
|
+
// fontFamily: ["IBMPlex"].join(","),
|
|
27
|
+
// primary: { color: "black" },
|
|
28
|
+
// secondary: { color: "white" }
|
|
29
|
+
// },
|
|
30
|
+
// logoButton: {
|
|
31
|
+
// primary: {
|
|
32
|
+
// borderRadius: 10,
|
|
33
|
+
// backgroundColor: allPrimaryAction,
|
|
34
|
+
// // margin: 10,
|
|
35
|
+
// marginTop: 10,
|
|
36
|
+
// padding: 30,
|
|
37
|
+
// paddingTop: 0,
|
|
38
|
+
// paddingBottom: 0,
|
|
39
|
+
// border: "1px solid #ced4da",
|
|
40
|
+
// height: 50,
|
|
41
|
+
// "&:focus": {
|
|
42
|
+
// borderColor: allPrimaryAction
|
|
43
|
+
// }
|
|
44
|
+
// },
|
|
45
|
+
// secondary: {
|
|
46
|
+
// borderRadius: 10,
|
|
47
|
+
// backgroundColor: "#f90900",
|
|
48
|
+
// marginTop: 10,
|
|
49
|
+
// padding: 30,
|
|
50
|
+
// paddingTop: 0,
|
|
51
|
+
// paddingBottom: 0,
|
|
52
|
+
// border: "1px solid #ced4da",
|
|
53
|
+
// height: 50,
|
|
54
|
+
// "&:focus": {
|
|
55
|
+
// borderColor: "green"
|
|
56
|
+
// }
|
|
57
|
+
// }
|
|
58
|
+
// },
|
|
59
|
+
// actionButton: {
|
|
60
|
+
// primary: {
|
|
61
|
+
// borderRadius: 10,
|
|
62
|
+
// // backgroundColor: "#f90900",
|
|
63
|
+
// backgroundColor: allPrimaryAction,
|
|
64
|
+
// color: "white",
|
|
65
|
+
// margin: 10,
|
|
66
|
+
// padding: 10,
|
|
67
|
+
// border: "1px solid #ced4da",
|
|
68
|
+
// fontSize: 16,
|
|
69
|
+
// height: 50,
|
|
70
|
+
// "&:focus": {
|
|
71
|
+
// borderColor: "red"
|
|
72
|
+
// }
|
|
73
|
+
// },
|
|
74
|
+
// secondary: {
|
|
75
|
+
// borderRadius: 10,
|
|
76
|
+
// margin: 10,
|
|
77
|
+
// padding: 10,
|
|
78
|
+
// backgroundColor: "#FF8811",
|
|
79
|
+
// color: "black"
|
|
80
|
+
// }
|
|
81
|
+
// },
|
|
82
|
+
// layout: {
|
|
83
|
+
// primary: {
|
|
84
|
+
// backgroundColor: "#d3d4d9",
|
|
85
|
+
// color: "black",
|
|
86
|
+
// margin: 10,
|
|
87
|
+
// padding: 10,
|
|
88
|
+
// borderRadius: 10
|
|
89
|
+
// },
|
|
90
|
+
// secondary: {
|
|
91
|
+
// backgroundColor: "#001E3C",
|
|
92
|
+
// // backgroundColor: "red",
|
|
93
|
+
// color: "white",
|
|
94
|
+
// margin: 10,
|
|
95
|
+
// padding: 10,
|
|
96
|
+
// borderRadius: 10
|
|
97
|
+
// }
|
|
98
|
+
// },
|
|
99
|
+
// inputFields: {
|
|
100
|
+
// primary: {
|
|
101
|
+
// backgroundColor: "white",
|
|
102
|
+
// borderRadius: 10,
|
|
103
|
+
// padding: 10,
|
|
104
|
+
// "&:hover": {
|
|
105
|
+
// borderColor: "red",
|
|
106
|
+
// borderWidth: 1,
|
|
107
|
+
// outline: "1px solid black"
|
|
108
|
+
// }
|
|
109
|
+
// },
|
|
110
|
+
// secondary: {
|
|
111
|
+
// backgroundColor: "white",
|
|
112
|
+
// borderRadius: 10,
|
|
113
|
+
// padding: 10
|
|
114
|
+
// }
|
|
115
|
+
// },
|
|
116
|
+
// alerts: {
|
|
117
|
+
// primary: {
|
|
118
|
+
// marginBottom: 10,
|
|
119
|
+
// padding: 10,
|
|
120
|
+
// borderRadius: 10
|
|
121
|
+
// },
|
|
122
|
+
// secondary: {
|
|
123
|
+
// marginBottom: 10,
|
|
124
|
+
// padding: 10,
|
|
125
|
+
// borderRadius: 10
|
|
126
|
+
// }
|
|
127
|
+
// },
|
|
128
|
+
// settingsRow: {
|
|
129
|
+
// primary: {
|
|
130
|
+
// display: "flex",
|
|
131
|
+
// flexDirection: "row",
|
|
132
|
+
// justifyContent: "space-between",
|
|
133
|
+
// alignItems: "center",
|
|
134
|
+
// backgroundColor: "#F5F5F5",
|
|
135
|
+
// margin: 0,
|
|
136
|
+
// padding: 10,
|
|
137
|
+
// borderRadius: 10
|
|
138
|
+
// },
|
|
139
|
+
// secondary: {
|
|
140
|
+
// display: "flex",
|
|
141
|
+
// flexDirection: "row",
|
|
142
|
+
// justifyContent: "space-between",
|
|
143
|
+
// alignItems: "center",
|
|
144
|
+
// backgroundColor: "blue",
|
|
145
|
+
// margin: 0,
|
|
146
|
+
// padding: 5,
|
|
147
|
+
// borderRadius: 10
|
|
148
|
+
// }
|
|
149
|
+
// },
|
|
150
|
+
// radioSelector: {
|
|
151
|
+
// primary: {
|
|
152
|
+
// padding: 10,
|
|
153
|
+
// borderRadius: 10
|
|
154
|
+
// },
|
|
155
|
+
// secondary: {
|
|
156
|
+
// padding: 10,
|
|
157
|
+
// borderRadius: 10
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
160
|
+
// };
|
|
115
161
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
justifyContent: "space-between",
|
|
136
|
-
alignItems: "center",
|
|
137
|
-
backgroundColor: "#F5F5F5",
|
|
138
|
-
margin: 0,
|
|
139
|
-
padding: 10,
|
|
140
|
-
borderRadius: 10
|
|
141
|
-
},
|
|
142
|
-
secondary: {
|
|
143
|
-
display: "flex",
|
|
144
|
-
flexDirection: "row",
|
|
145
|
-
justifyContent: "space-between",
|
|
146
|
-
alignItems: "center",
|
|
147
|
-
backgroundColor: "blue",
|
|
148
|
-
margin: 0,
|
|
149
|
-
padding: 5,
|
|
150
|
-
borderRadius: 10
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
radioSelector: {
|
|
154
|
-
primary: {
|
|
155
|
-
padding: 10,
|
|
156
|
-
borderRadius: 10
|
|
162
|
+
export const QawaimTheme = createTheme({
|
|
163
|
+
components: {
|
|
164
|
+
MuiButton: {
|
|
165
|
+
variants: [
|
|
166
|
+
{
|
|
167
|
+
props: { variant: "withLogo" },
|
|
168
|
+
style: {
|
|
169
|
+
textTransform: "none",
|
|
170
|
+
border: `2px solid blue`,
|
|
171
|
+
backgroundColor: "red"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
props: { variant: "dashed", color: "secondary" },
|
|
176
|
+
style: {
|
|
177
|
+
border: `4px dashed red`
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
]
|
|
157
181
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
182
|
+
MuiButton: {
|
|
183
|
+
styleOverrides: {
|
|
184
|
+
// Name of the slot
|
|
185
|
+
root: {
|
|
186
|
+
// Some CSS
|
|
187
|
+
fontSize: "3rem"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
161
190
|
}
|
|
162
191
|
}
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const ThemeProvider = createContext(defaultTheme);
|
|
166
|
-
|
|
167
|
-
export const HawaProvider = ({ theme, ...props }) => {
|
|
168
|
-
console.log("theme is ", theme);
|
|
169
|
-
if (props.size === "large") {
|
|
170
|
-
theme = {
|
|
171
|
-
...theme,
|
|
172
|
-
paddings: 20,
|
|
173
|
-
margins: 20
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
return (
|
|
177
|
-
<ThemeProvider.Provider
|
|
178
|
-
value={{ hawaTheme: defaultTheme, themeName: props.themeName }}
|
|
179
|
-
>
|
|
180
|
-
{props.children}
|
|
181
|
-
</ThemeProvider.Provider>
|
|
182
|
-
);
|
|
183
|
-
};
|
|
192
|
+
});
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { createTheme } from "@mui/system";
|
|
2
|
+
// import { createContext } from "react";
|
|
3
|
+
|
|
4
|
+
// //make the text color of the action buttons different from the text color of the layout
|
|
5
|
+
// let allPrimaryBG = "#f90900";
|
|
6
|
+
// let allPrimaryAction = "#B20D30";
|
|
7
|
+
// export const defaultTheme = {
|
|
8
|
+
// allPrimaryBG: "#f90900",
|
|
9
|
+
// allPrimaryAction: "#138A36",
|
|
10
|
+
// allBorderRadius: 10,
|
|
11
|
+
// borderRadius: 10,
|
|
12
|
+
// primaryColor: "blue",
|
|
13
|
+
// secondaryColor: "grey",
|
|
14
|
+
// // primaryActionColor: '#f72585', //Colors of the buttons
|
|
15
|
+
// primaryActionColor: "grey", //Colors of the buttons
|
|
16
|
+
// secondaryActionColor: "#4cc9f0", //Colors of the buttons
|
|
17
|
+
// layoutColor: "#d3d4d9", //Colors of boxes and cards
|
|
18
|
+
// textColor: "black", //Colors of text everywhere
|
|
19
|
+
// inputColor: "white", //Color of input fields
|
|
20
|
+
// lightBackground: "#FBF5F3", //
|
|
21
|
+
// darkBackground: "#0F0E0E",
|
|
22
|
+
// testcolor: "green",
|
|
23
|
+
// margins: 10,
|
|
24
|
+
// paddings: 10,
|
|
25
|
+
// typography: {
|
|
26
|
+
// fontFamily: ["IBMPlex"].join(","),
|
|
27
|
+
// primary: { color: "black" },
|
|
28
|
+
// secondary: { color: "white" }
|
|
29
|
+
// },
|
|
30
|
+
// logoButton: {
|
|
31
|
+
// primary: {
|
|
32
|
+
// borderRadius: 10,
|
|
33
|
+
// backgroundColor: allPrimaryAction,
|
|
34
|
+
// // margin: 10,
|
|
35
|
+
// marginTop: 10,
|
|
36
|
+
// padding: 30,
|
|
37
|
+
// paddingTop: 0,
|
|
38
|
+
// paddingBottom: 0,
|
|
39
|
+
// border: "1px solid #ced4da",
|
|
40
|
+
// height: 50,
|
|
41
|
+
// "&:focus": {
|
|
42
|
+
// borderColor: allPrimaryAction
|
|
43
|
+
// }
|
|
44
|
+
// },
|
|
45
|
+
// secondary: {
|
|
46
|
+
// borderRadius: 10,
|
|
47
|
+
// backgroundColor: "#f90900",
|
|
48
|
+
// marginTop: 10,
|
|
49
|
+
// padding: 30,
|
|
50
|
+
// paddingTop: 0,
|
|
51
|
+
// paddingBottom: 0,
|
|
52
|
+
// border: "1px solid #ced4da",
|
|
53
|
+
// height: 50,
|
|
54
|
+
// "&:focus": {
|
|
55
|
+
// borderColor: "green"
|
|
56
|
+
// }
|
|
57
|
+
// }
|
|
58
|
+
// },
|
|
59
|
+
// actionButton: {
|
|
60
|
+
// primary: {
|
|
61
|
+
// borderRadius: 10,
|
|
62
|
+
// // backgroundColor: "#f90900",
|
|
63
|
+
// backgroundColor: allPrimaryAction,
|
|
64
|
+
// color: "white",
|
|
65
|
+
// margin: 10,
|
|
66
|
+
// padding: 10,
|
|
67
|
+
// border: "1px solid #ced4da",
|
|
68
|
+
// fontSize: 16,
|
|
69
|
+
// height: 50,
|
|
70
|
+
// "&:focus": {
|
|
71
|
+
// borderColor: "red"
|
|
72
|
+
// }
|
|
73
|
+
// },
|
|
74
|
+
// secondary: {
|
|
75
|
+
// borderRadius: 10,
|
|
76
|
+
// margin: 10,
|
|
77
|
+
// padding: 10,
|
|
78
|
+
// backgroundColor: "#FF8811",
|
|
79
|
+
// color: "black"
|
|
80
|
+
// }
|
|
81
|
+
// },
|
|
82
|
+
// layout: {
|
|
83
|
+
// primary: {
|
|
84
|
+
// backgroundColor: "#d3d4d9",
|
|
85
|
+
// color: "black",
|
|
86
|
+
// margin: 10,
|
|
87
|
+
// padding: 10,
|
|
88
|
+
// borderRadius: 10
|
|
89
|
+
// },
|
|
90
|
+
// secondary: {
|
|
91
|
+
// backgroundColor: "#001E3C",
|
|
92
|
+
// // backgroundColor: "red",
|
|
93
|
+
// color: "white",
|
|
94
|
+
// margin: 10,
|
|
95
|
+
// padding: 10,
|
|
96
|
+
// borderRadius: 10
|
|
97
|
+
// }
|
|
98
|
+
// },
|
|
99
|
+
// inputFields: {
|
|
100
|
+
// primary: {
|
|
101
|
+
// backgroundColor: "white",
|
|
102
|
+
// borderRadius: 10,
|
|
103
|
+
// padding: 10,
|
|
104
|
+
// "&:hover": {
|
|
105
|
+
// borderColor: "red",
|
|
106
|
+
// borderWidth: 1,
|
|
107
|
+
// outline: "1px solid black"
|
|
108
|
+
// }
|
|
109
|
+
// },
|
|
110
|
+
// secondary: {
|
|
111
|
+
// backgroundColor: "white",
|
|
112
|
+
// borderRadius: 10,
|
|
113
|
+
// padding: 10
|
|
114
|
+
// }
|
|
115
|
+
// },
|
|
116
|
+
// alerts: {
|
|
117
|
+
// primary: {
|
|
118
|
+
// marginBottom: 10,
|
|
119
|
+
// padding: 10,
|
|
120
|
+
// borderRadius: 10
|
|
121
|
+
// },
|
|
122
|
+
// secondary: {
|
|
123
|
+
// marginBottom: 10,
|
|
124
|
+
// padding: 10,
|
|
125
|
+
// borderRadius: 10
|
|
126
|
+
// }
|
|
127
|
+
// },
|
|
128
|
+
// settingsRow: {
|
|
129
|
+
// primary: {
|
|
130
|
+
// display: "flex",
|
|
131
|
+
// flexDirection: "row",
|
|
132
|
+
// justifyContent: "space-between",
|
|
133
|
+
// alignItems: "center",
|
|
134
|
+
// backgroundColor: "#F5F5F5",
|
|
135
|
+
// margin: 0,
|
|
136
|
+
// padding: 10,
|
|
137
|
+
// borderRadius: 10
|
|
138
|
+
// },
|
|
139
|
+
// secondary: {
|
|
140
|
+
// display: "flex",
|
|
141
|
+
// flexDirection: "row",
|
|
142
|
+
// justifyContent: "space-between",
|
|
143
|
+
// alignItems: "center",
|
|
144
|
+
// backgroundColor: "blue",
|
|
145
|
+
// margin: 0,
|
|
146
|
+
// padding: 5,
|
|
147
|
+
// borderRadius: 10
|
|
148
|
+
// }
|
|
149
|
+
// },
|
|
150
|
+
// radioSelector: {
|
|
151
|
+
// primary: {
|
|
152
|
+
// padding: 10,
|
|
153
|
+
// borderRadius: 10
|
|
154
|
+
// },
|
|
155
|
+
// secondary: {
|
|
156
|
+
// padding: 10,
|
|
157
|
+
// borderRadius: 10
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
160
|
+
// };
|
|
161
|
+
|
|
162
|
+
export const QawaimTheme = createTheme({
|
|
163
|
+
components: {
|
|
164
|
+
MuiButton: {
|
|
165
|
+
styleOverrides: {
|
|
166
|
+
// Name of the slot
|
|
167
|
+
root: {
|
|
168
|
+
// Some CSS
|
|
169
|
+
fontSize: "1rem"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
variants: [
|
|
173
|
+
{
|
|
174
|
+
props: { variant: "withLogo" },
|
|
175
|
+
style: {
|
|
176
|
+
textTransform: "none",
|
|
177
|
+
border: `2px solid blue`,
|
|
178
|
+
backgroundColor: "red"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
props: { variant: "dashed", color: "secondary" },
|
|
183
|
+
style: {
|
|
184
|
+
border: `4px dashed red`
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
MuiButton: {
|
|
190
|
+
styleOverrides: {
|
|
191
|
+
// Name of the slot
|
|
192
|
+
root: {
|
|
193
|
+
// Some CSS
|
|
194
|
+
fontSize: "3rem"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
});
|
package/src/ui/ActionButton.js
CHANGED
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
import Button from "@mui/material/Button";
|
|
2
|
-
import {
|
|
3
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
4
|
-
import { styled, darken } from "@mui/material/styles";
|
|
2
|
+
// import { styled, darken } from "@mui/material/styles";
|
|
5
3
|
|
|
6
4
|
export const ActionButton = (props) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
let actionButtonStyle = {};
|
|
5
|
+
// const currentTheme = Object.keys(hawaTheme.actionButton).find(
|
|
6
|
+
// (tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
7
|
+
// );
|
|
8
|
+
// let actionButtonStyle = {};
|
|
12
9
|
|
|
13
|
-
if (currentTheme) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} else {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
10
|
+
// if (currentTheme) {
|
|
11
|
+
// actionButtonStyle = {
|
|
12
|
+
// ...hawaTheme.actionButton[currentTheme],
|
|
13
|
+
// margin: props.last ? 0 : hawaTheme.actionButton[currentTheme].margin,
|
|
14
|
+
// marginTop: props.last
|
|
15
|
+
// ? hawaTheme.actionButton[currentTheme].margin * 2
|
|
16
|
+
// : 0,
|
|
17
|
+
// "&:hover": {
|
|
18
|
+
// backgroundColor: darken(
|
|
19
|
+
// hawaTheme.actionButton[currentTheme]?.backgroundColor,
|
|
20
|
+
// 0.1
|
|
21
|
+
// )
|
|
22
|
+
// }
|
|
23
|
+
// };
|
|
24
|
+
// } else {
|
|
25
|
+
// actionButtonStyle = {
|
|
26
|
+
// backgroundColor: "black",
|
|
27
|
+
// color: "white",
|
|
28
|
+
// padding: 10,
|
|
29
|
+
// marginTop: props.last ? 10 * 2 : 0,
|
|
30
|
+
// borderRadius: 0
|
|
31
|
+
// };
|
|
32
|
+
// }
|
|
36
33
|
|
|
37
|
-
const StyledButton = styled(Button)(({ theme }) => {
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
return <
|
|
34
|
+
// const StyledButton = styled(Button)(({ theme }) => {
|
|
35
|
+
// return { ...actionButtonStyle };
|
|
36
|
+
// });
|
|
37
|
+
return <Button {...props}>{props.text}</Button>;
|
|
41
38
|
};
|
package/src/ui/AdaptiveButton.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import Button from "@mui/material/Button";
|
|
3
3
|
import Tooltip from "@mui/material/Tooltip";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
6
5
|
import { StyledTooltip } from "./StyledTooltip";
|
|
7
6
|
import { getTextColor } from "../util";
|
|
8
7
|
|
|
9
8
|
export const AdaptiveButton = (props) => {
|
|
10
9
|
const { showText } = props;
|
|
11
|
-
|
|
12
|
-
const screenSize = {
|
|
13
|
-
width: 1500,
|
|
14
|
-
height: 200
|
|
15
|
-
};
|
|
10
|
+
|
|
16
11
|
const [tooltip, setTooltip] = useState(false);
|
|
17
12
|
const [hovered, setHovered] = useState(false);
|
|
18
13
|
//full button
|
|
@@ -26,7 +21,7 @@ export const AdaptiveButton = (props) => {
|
|
|
26
21
|
onClick={props.handleClick}
|
|
27
22
|
style={{
|
|
28
23
|
backgroundColor: theme.primaryColor,
|
|
29
|
-
borderRadius: theme.borderRadius,
|
|
24
|
+
// borderRadius: theme.borderRadius,
|
|
30
25
|
padding: theme.paddings,
|
|
31
26
|
color: getTextColor(theme.primaryColor)
|
|
32
27
|
// color: hovered
|