@sikka/hawa 0.0.11 → 0.0.14
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 +3 -3
- package/src/blocks/Account/{UserProfile.js → UserProfileForm.js} +16 -7
- package/src/blocks/Account/UserSettingsForm.js +13 -0
- package/src/blocks/Account/index.js +2 -2
- package/src/blocks/AuthForms/NewPasswordForm.js +1 -1
- package/src/blocks/AuthForms/ResetPasswordForm.js +1 -1
- package/src/blocks/AuthForms/SignInForm.js +10 -11
- package/src/blocks/AuthForms/SignUpForm.js +2 -1
- package/src/blocks/Payment/ChargeWalletForm.js +40 -37
- package/src/blocks/Payment/CreditCardForm.js +50 -45
- package/src/blocks/Payment/PayWithWallet.js +17 -7
- package/src/blocks/Payment/SelectPayment.js +8 -9
- package/src/blocks/Pricing/PricingPlans.js +47 -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 +0 -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/{ui → elements}/HawaLogoButton.js +0 -0
- package/src/elements/HawaPricingCard.js +115 -0
- package/src/elements/HawaRadio.js +30 -0
- package/src/elements/HawaSettingsRow.js +27 -0
- package/src/elements/HawaSwitch.js +6 -0
- package/src/{ui → elements}/HawaTextArea.js +0 -0
- package/src/{ui → elements}/HawaTextField.js +0 -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 +1 -1
- package/src/stories/BlocksStories/Account/UserProfile.stories.js +21 -0
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +55 -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/{PaymentForm.stories.js → Payment/PaymentSelection.stories.js} +12 -23
- package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +46 -0
- package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +45 -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/ElementsStories/LogoButtons.stories.js +73 -0
- 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/Box.stories.js +10 -24
- package/src/styles.css +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.e382d866.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.5eab66d3.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js.map +1 -0
- package/src/blocks/Account/UserSettings.js +0 -14
- package/src/stories/BlocksStories/AuthForm.stories.js +0 -171
- package/src/stories/BlocksStories/UserForm.stories.js +0 -27
- 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/LogoButtons.stories.js +0 -86
- package/src/stories/UIStories/RadioSelector.stories.js +0 -50
- 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/HawaRadio.js +0 -64
- package/src/ui/HawaSettingsRow.js +0 -45
- package/storybook-static/main.b00949db.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
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors~main.5eab66d3.iframe.bundle.js","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HawaTextField, ActionButton } from "../../ui";
|
|
2
|
-
import { Box } from "../../layout";
|
|
3
|
-
|
|
4
|
-
export const UserSettings = (props) => {
|
|
5
|
-
return (
|
|
6
|
-
<Box maxWidth={400}>
|
|
7
|
-
<HawaTextField type="text" inputLabel="First Name" />
|
|
8
|
-
<HawaTextField type="text" inputLabel="Last Name" />
|
|
9
|
-
<HawaTextField type="email" inputLabel="Email" />
|
|
10
|
-
<HawaTextField type="password" inputLabel="Password" />
|
|
11
|
-
<ActionButton last text="Update Account" />
|
|
12
|
-
</Box>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { ThemeProvider } from "@mui/material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import {
|
|
4
|
-
NewPasswordForm,
|
|
5
|
-
ResetPasswordForm,
|
|
6
|
-
SignInForm,
|
|
7
|
-
SignUpForm
|
|
8
|
-
} from "../../blocks/AuthForms";
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: "Blocks/AuthBlocks",
|
|
12
|
-
component: [SignInForm, SignUpForm, NewPasswordForm, NewPasswordForm],
|
|
13
|
-
argTypes: {
|
|
14
|
-
theme: {
|
|
15
|
-
options: ["primary", "secondary", "default"],
|
|
16
|
-
control: { type: "select" }
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const SignInTemplate = (args) => {
|
|
22
|
-
return (
|
|
23
|
-
<SignInForm
|
|
24
|
-
{...args}
|
|
25
|
-
error={args.showError}
|
|
26
|
-
texts={{
|
|
27
|
-
emailLabel: "Email",
|
|
28
|
-
emailPlaceholder: "Enter your email",
|
|
29
|
-
emailRequiredText: "Email is required",
|
|
30
|
-
emailInvalidText: "Invalid email address",
|
|
31
|
-
passwordLabel: "Password",
|
|
32
|
-
passwordPlaceholder: "Enter password",
|
|
33
|
-
passwordRequiredText: "Password is required",
|
|
34
|
-
forgotPasswordText: "Forgot password?",
|
|
35
|
-
newUserText: "New user?",
|
|
36
|
-
signUpText: "Sign up",
|
|
37
|
-
signInText: "Sign in",
|
|
38
|
-
googleButtonLabel: "Sign in with Google",
|
|
39
|
-
githubButtonLabel: "Sign in with Github",
|
|
40
|
-
twitterButtonLabel: "Sign in with Twitter"
|
|
41
|
-
}}
|
|
42
|
-
handleSignIn={(e) => console.log("singing in via email", e)}
|
|
43
|
-
handleForgotPassword={() => console.log("user forgot password")}
|
|
44
|
-
handleGoogleSignIn={() => console.log("signing in via google")}
|
|
45
|
-
handleGithubSignIn={() => console.log("signing in via github")}
|
|
46
|
-
handleTwitterSignIn={() => console.log("signing in via Twitter")}
|
|
47
|
-
handleRouteToSignUp={() => console.log("switching to sign up")}
|
|
48
|
-
viaGoogle={args.viaGoogle}
|
|
49
|
-
viaGithub={args.viaGithub}
|
|
50
|
-
viaTwitter={args.viaTwitter}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const SignIn = SignInTemplate.bind({});
|
|
56
|
-
SignIn.args = {
|
|
57
|
-
viaGoogle: true,
|
|
58
|
-
viaGithub: true,
|
|
59
|
-
viaTwitter: true,
|
|
60
|
-
showError: false,
|
|
61
|
-
theme: "primary"
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const SignUpTemplate = (args) => {
|
|
65
|
-
return (
|
|
66
|
-
<SignUpForm
|
|
67
|
-
{...args}
|
|
68
|
-
texts={{
|
|
69
|
-
fullNameLabel: "Full Name",
|
|
70
|
-
fullNamePlaceholder: "Fulan AlFulani",
|
|
71
|
-
emailLabel: "Email",
|
|
72
|
-
emailPlaceholder: "Enter your email",
|
|
73
|
-
emailRequiredText: "Email is required",
|
|
74
|
-
emailInvalidText: "Invalid email address",
|
|
75
|
-
passwordLabel: "Password",
|
|
76
|
-
passwordPlaceholder: "Minimum 8 characters",
|
|
77
|
-
passwordRequiredText: "Password is required",
|
|
78
|
-
passwordTooShortText: "Password too short",
|
|
79
|
-
forgotPasswordText: "Forgot password?",
|
|
80
|
-
newUserText: "New user?",
|
|
81
|
-
signUpText: "Sign up",
|
|
82
|
-
signInText: "Sign in",
|
|
83
|
-
googleButtonLabel: "Sign in with Google",
|
|
84
|
-
githubButtonLabel: "Sign in with Github",
|
|
85
|
-
twitterButtonLabel: "Sign in with Twitter"
|
|
86
|
-
}}
|
|
87
|
-
error={args.showError}
|
|
88
|
-
viaGoogle={args.viaGoogle}
|
|
89
|
-
viaGithub={args.viaGithub}
|
|
90
|
-
viaTwitter={args.viaTwitter}
|
|
91
|
-
handleSignUp={() => console.log("singing up via email")}
|
|
92
|
-
handleGoogleSignUp={() => console.log("signing up via google")}
|
|
93
|
-
handleGithubSignUp={() => console.log("signing up via github")}
|
|
94
|
-
handleTwitterSignUp={() => console.log("signing up via Twitter")}
|
|
95
|
-
handleRouteToSignIn={() => console.log("switching to sign in")}
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
export const SignUp = SignUpTemplate.bind({});
|
|
100
|
-
SignUp.args = {
|
|
101
|
-
viaGoogle: true,
|
|
102
|
-
viaGithub: true,
|
|
103
|
-
viaTwitter: true,
|
|
104
|
-
showError: false,
|
|
105
|
-
theme: "primary"
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const ResetPasswordTemplate = (args) => {
|
|
109
|
-
return (
|
|
110
|
-
<ResetPasswordForm
|
|
111
|
-
error={args.showError}
|
|
112
|
-
texts={{
|
|
113
|
-
emailLabel: "Email",
|
|
114
|
-
emailPlaceholder: "Enter your email",
|
|
115
|
-
emailRequiredText: "Email is required",
|
|
116
|
-
emailInvalidText: "Invalid email address",
|
|
117
|
-
passwordLabel: "Password",
|
|
118
|
-
resetPassword: "Reset Password",
|
|
119
|
-
passwordRequiredText: "Password is required",
|
|
120
|
-
forgotPasswordText: "Forgot password?",
|
|
121
|
-
newUserText: "New user?",
|
|
122
|
-
signUpText: "Sign up",
|
|
123
|
-
signInText: "Sign in",
|
|
124
|
-
googleButtonLabel: "Sign in with Google",
|
|
125
|
-
githubButtonLabel: "Sign in with Github",
|
|
126
|
-
twitterButtonLabel: "Sign in with Twitter"
|
|
127
|
-
}}
|
|
128
|
-
{...args}
|
|
129
|
-
handleResetPassword={() => console.log("resetting password")}
|
|
130
|
-
/>
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
export const ResetPassword = ResetPasswordTemplate.bind({});
|
|
134
|
-
ResetPassword.args = {
|
|
135
|
-
theme: "primary",
|
|
136
|
-
showError: false,
|
|
137
|
-
sent: false
|
|
138
|
-
};
|
|
139
|
-
const NewPasswordTemplate = (args) => {
|
|
140
|
-
return (
|
|
141
|
-
<NewPasswordForm
|
|
142
|
-
texts={{
|
|
143
|
-
emailLabel: "Email",
|
|
144
|
-
emailPlaceholder: "Enter your email",
|
|
145
|
-
emailRequiredText: "Email is required",
|
|
146
|
-
passwordPlaceholder: "Enter password",
|
|
147
|
-
updatePassword: "Update Password",
|
|
148
|
-
passwordRequiredText: "Password is required",
|
|
149
|
-
passwordLabel: "Choose new password",
|
|
150
|
-
confirmPasswordPlaceholder: "Confirm password",
|
|
151
|
-
confirmPasswordLabel: "Confirm",
|
|
152
|
-
forgotPasswordText: "Forgot password?",
|
|
153
|
-
newUserText: "New user?",
|
|
154
|
-
signUpText: "Sign up",
|
|
155
|
-
signInText: "Sign in",
|
|
156
|
-
googleButtonLabel: "Sign in with Google",
|
|
157
|
-
githubButtonLabel: "Sign in with Github",
|
|
158
|
-
twitterButtonLabel: "Sign in with Twitter"
|
|
159
|
-
}}
|
|
160
|
-
error={args.showError}
|
|
161
|
-
theme={args.theme}
|
|
162
|
-
{...args}
|
|
163
|
-
/>
|
|
164
|
-
);
|
|
165
|
-
};
|
|
166
|
-
export const NewPassword = NewPasswordTemplate.bind({});
|
|
167
|
-
NewPassword.args = {
|
|
168
|
-
theme: "primary",
|
|
169
|
-
showError: false,
|
|
170
|
-
passwordChanged: false
|
|
171
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { UserProfile } from "../../blocks/Account";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Blocks/UserBlocks",
|
|
6
|
-
component: UserProfile,
|
|
7
|
-
argTypes: {
|
|
8
|
-
theme: {
|
|
9
|
-
options: ["primary", "secondary", "default"],
|
|
10
|
-
control: { type: "select" }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const UserAccount = (args) => {
|
|
16
|
-
return <UserProfile {...args} />;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
UserAccount.args = {
|
|
20
|
-
theme: "primary"
|
|
21
|
-
};
|
|
22
|
-
export const UserSettings = (args) => {
|
|
23
|
-
return <UserProfile {...args} />;
|
|
24
|
-
};
|
|
25
|
-
UserSettings.args = {
|
|
26
|
-
theme: "primary"
|
|
27
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ActionButton } from "../../ui";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Elements/Buttons/ActionButton",
|
|
6
|
-
component: ActionButton,
|
|
7
|
-
argTypes: {
|
|
8
|
-
theme: {
|
|
9
|
-
options: ["primary", "secondary", "default"],
|
|
10
|
-
control: { type: "select" }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const Template = (args) => {
|
|
15
|
-
return <ActionButton text={args.buttonLabel} />;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
Template.args = {
|
|
19
|
-
showText: true,
|
|
20
|
-
buttonLabel: "test",
|
|
21
|
-
theme: "primary"
|
|
22
|
-
};
|
|
23
|
-
export const Primary = Template.bind({});
|
|
24
|
-
Primary.args = {
|
|
25
|
-
showText: true,
|
|
26
|
-
buttonLabel: "test",
|
|
27
|
-
theme: "primary"
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Secondary = Template.bind({});
|
|
31
|
-
Secondary.args = {
|
|
32
|
-
showText: true,
|
|
33
|
-
buttonLabel: "test",
|
|
34
|
-
theme: "secondary"
|
|
35
|
-
};
|
|
36
|
-
export const Default = Template.bind({});
|
|
37
|
-
Default.args = {
|
|
38
|
-
showText: true,
|
|
39
|
-
buttonLabel: "test",
|
|
40
|
-
theme: "default"
|
|
41
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import CastIcon from "@mui/icons-material/Cast";
|
|
3
|
-
import { AdaptiveButton } from "../../ui";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Elements/Buttons/AdaptiveButton",
|
|
7
|
-
component: AdaptiveButton,
|
|
8
|
-
argsTypes: {
|
|
9
|
-
buttonLabel: { control: "text" },
|
|
10
|
-
borderRadius: { control: "number" },
|
|
11
|
-
buttonColor: { control: "color" },
|
|
12
|
-
padding: { control: "number" },
|
|
13
|
-
hintTitle: { control: "text" },
|
|
14
|
-
hintContent: { control: "text" },
|
|
15
|
-
theme: {
|
|
16
|
-
options: ["primary", "secondary", "default"],
|
|
17
|
-
control: { type: "select" }
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
args: {
|
|
21
|
-
hintTitle: "test",
|
|
22
|
-
hintContent: "more test",
|
|
23
|
-
buttonColor: "#f9f9f9",
|
|
24
|
-
theme: "primary"
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const Template = (args) => {
|
|
29
|
-
return <AdaptiveButton {...args} />;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const FullButton = Template.bind({});
|
|
33
|
-
FullButton.args = {
|
|
34
|
-
// showText: true,
|
|
35
|
-
// buttonLabel: "test",
|
|
36
|
-
// borderRadius: 5,
|
|
37
|
-
// icon: <CastIcon />,
|
|
38
|
-
// textColor: "#000000",
|
|
39
|
-
// buttonColor: "#f9f9f9",
|
|
40
|
-
theme: "primary"
|
|
41
|
-
// placeholder: "Example ...",
|
|
42
|
-
// defaultValue: "This is default value",
|
|
43
|
-
// inputLabel: "Text Field",
|
|
44
|
-
// padding: 10
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const IconOnly = Template.bind({});
|
|
48
|
-
IconOnly.args = {
|
|
49
|
-
// showText: true,
|
|
50
|
-
// buttonLabel: "test",
|
|
51
|
-
// borderRadius: 5,
|
|
52
|
-
// buttonColor: "#878787",
|
|
53
|
-
// textColor: "#ffffff",
|
|
54
|
-
// icon: <CastIcon />,
|
|
55
|
-
theme: "primary"
|
|
56
|
-
|
|
57
|
-
// placeholder: "Exemple ...",
|
|
58
|
-
// defaultValue: "This is default value",
|
|
59
|
-
// inputLabel: "Text Field",
|
|
60
|
-
// padding: 10
|
|
61
|
-
};
|
|
62
|
-
export const Danger = Template.bind({});
|
|
63
|
-
Danger.args = {
|
|
64
|
-
// showText: true,
|
|
65
|
-
// buttonLabel: "test",
|
|
66
|
-
// borderRadius: 5,
|
|
67
|
-
// buttonColor: "#c0c0c0",
|
|
68
|
-
// danger: true,
|
|
69
|
-
// icon: <CastIcon />,
|
|
70
|
-
theme: "primary"
|
|
71
|
-
|
|
72
|
-
// placeholder: "Exemple ...",
|
|
73
|
-
// defaultValue: "This is default value",
|
|
74
|
-
// inputLabel: "Text Field",
|
|
75
|
-
// padding: 10
|
|
76
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaCheckbox } from "../../ui";
|
|
3
|
-
|
|
4
|
-
const Template = (args) => {
|
|
5
|
-
return <HawaCheckbox {...args} />;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: "UI/Checkbox",
|
|
10
|
-
component: HawaCheckbox,
|
|
11
|
-
argsTypes: {
|
|
12
|
-
defaultValue: {
|
|
13
|
-
options: [true, false],
|
|
14
|
-
control: { type: "radio" }
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
defaultValue: true,
|
|
19
|
-
disabled: true
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Light = Template.bind({});
|
|
24
|
-
export const Dark = Template.bind({});
|
|
25
|
-
|
|
26
|
-
Light.args = {
|
|
27
|
-
color: "red",
|
|
28
|
-
defaultValue: false,
|
|
29
|
-
label: "test"
|
|
30
|
-
};
|
|
31
|
-
Dark.args = {
|
|
32
|
-
color: "gray",
|
|
33
|
-
defaultValue: false
|
|
34
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ActionButton, HawaLogoButton } from "../../ui";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Elements/Buttons/LogoButtons",
|
|
6
|
-
component: ActionButton,
|
|
7
|
-
argTypes: {
|
|
8
|
-
theme: {
|
|
9
|
-
options: ["primary", "secondary", "default"],
|
|
10
|
-
control: { type: "select" }
|
|
11
|
-
},
|
|
12
|
-
buttonLabel: { control: "text" },
|
|
13
|
-
logo: { control: "text" }
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
buttonLabel: "test",
|
|
17
|
-
logo: "google",
|
|
18
|
-
theme: "primary"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const Template = (args) => {
|
|
23
|
-
return <HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Google = Template.bind({});
|
|
27
|
-
Google.args = {
|
|
28
|
-
buttonLabel: "Sign in via Google",
|
|
29
|
-
logo: "google",
|
|
30
|
-
theme: "primary"
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Twitter = Template.bind({});
|
|
34
|
-
Twitter.args = {
|
|
35
|
-
buttonLabel: "Sign in via Twitter",
|
|
36
|
-
logo: "twitter",
|
|
37
|
-
theme: "primary"
|
|
38
|
-
};
|
|
39
|
-
export const Github = Template.bind({});
|
|
40
|
-
Github.args = {
|
|
41
|
-
buttonLabel: "Sign in via Github",
|
|
42
|
-
logo: "github",
|
|
43
|
-
theme: "primary"
|
|
44
|
-
};
|
|
45
|
-
export const WalletPay = Template.bind({});
|
|
46
|
-
WalletPay.args = {
|
|
47
|
-
buttonLabel: "Pay with Wallet",
|
|
48
|
-
logo: "wallet",
|
|
49
|
-
theme: "primary"
|
|
50
|
-
};
|
|
51
|
-
export const GooglePay = Template.bind({});
|
|
52
|
-
GooglePay.args = {
|
|
53
|
-
buttonLabel: "Google Pay",
|
|
54
|
-
logo: "googlepay",
|
|
55
|
-
theme: "primary"
|
|
56
|
-
};
|
|
57
|
-
export const ApplePay = Template.bind({});
|
|
58
|
-
ApplePay.args = {
|
|
59
|
-
buttonLabel: "Apple Pay",
|
|
60
|
-
logo: "applepay",
|
|
61
|
-
theme: "primary"
|
|
62
|
-
};
|
|
63
|
-
export const STCPay = Template.bind({});
|
|
64
|
-
STCPay.args = {
|
|
65
|
-
buttonLabel: "STC Pay",
|
|
66
|
-
logo: "stcpay",
|
|
67
|
-
theme: "primary"
|
|
68
|
-
};
|
|
69
|
-
export const VisaMasterPay = Template.bind({});
|
|
70
|
-
VisaMasterPay.args = {
|
|
71
|
-
buttonLabel: "Visa / Mastercard",
|
|
72
|
-
logo: "visa/master",
|
|
73
|
-
theme: "primary"
|
|
74
|
-
};
|
|
75
|
-
export const PayPal = Template.bind({});
|
|
76
|
-
PayPal.args = {
|
|
77
|
-
buttonLabel: "PayPal",
|
|
78
|
-
logo: "paypal",
|
|
79
|
-
theme: "primary"
|
|
80
|
-
};
|
|
81
|
-
export const Mada = Template.bind({});
|
|
82
|
-
Mada.args = {
|
|
83
|
-
buttonLabel: "Mada",
|
|
84
|
-
logo: "mada",
|
|
85
|
-
theme: "primary"
|
|
86
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaRadio } from "../../ui";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "UI/RadioSelector",
|
|
6
|
-
component: HawaRadio,
|
|
7
|
-
argTypes: {
|
|
8
|
-
theme: {
|
|
9
|
-
options: ["primary", "secondary", "default"],
|
|
10
|
-
control: { type: "select" }
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
args: {
|
|
14
|
-
theme: "primary"
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Template = (args) => {
|
|
19
|
-
return (
|
|
20
|
-
<HawaRadio
|
|
21
|
-
defaultValue="option1"
|
|
22
|
-
options={[
|
|
23
|
-
{ text: "Option 1", label: "option1" },
|
|
24
|
-
{ text: "Option 2", label: "option2" },
|
|
25
|
-
{ text: "Option 3", label: "option3" }
|
|
26
|
-
]}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
export const Light = Template.bind({});
|
|
31
|
-
|
|
32
|
-
Light.args = {
|
|
33
|
-
theme: "primary",
|
|
34
|
-
|
|
35
|
-
handleChange: () => {
|
|
36
|
-
console.log("handleChange goes here");
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
export const Dark = Template.bind({});
|
|
40
|
-
Dark.args = {
|
|
41
|
-
options: [
|
|
42
|
-
{ text: "Option 1", label: "option1" },
|
|
43
|
-
{ text: "Option 2", label: "option2" },
|
|
44
|
-
{ text: "Option 3", label: "option3" }
|
|
45
|
-
],
|
|
46
|
-
defaultValue: "option2",
|
|
47
|
-
handleChange: () => {
|
|
48
|
-
console.log("handleChange goes here");
|
|
49
|
-
}
|
|
50
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
SelectPayment,
|
|
4
|
-
CreditCardForm,
|
|
5
|
-
ChargeWalletForm,
|
|
6
|
-
PayWithWallet
|
|
7
|
-
} from "../../blocks/Payment";
|
|
8
|
-
import { HawaSettingsRow } from "../../ui";
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: "UI/SettingsRow",
|
|
12
|
-
component: [SelectPayment, CreditCardForm],
|
|
13
|
-
argTypes: {
|
|
14
|
-
theme: {
|
|
15
|
-
options: ["primary", "secondary", "default"],
|
|
16
|
-
control: { type: "select" }
|
|
17
|
-
},
|
|
18
|
-
type: {
|
|
19
|
-
options: ["checkbox", "text", "default"],
|
|
20
|
-
control: { type: "select" }
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
args: {
|
|
24
|
-
theme: "primary",
|
|
25
|
-
type: "checkbox"
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const HawaSettingsRowTemplate = (args) => {
|
|
30
|
-
return <HawaSettingsRow settingsType={args.type} />;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Checkbox = HawaSettingsRowTemplate.bind({});
|
|
34
|
-
Checkbox.args = {
|
|
35
|
-
theme: "primary",
|
|
36
|
-
type: "checkbox"
|
|
37
|
-
};
|
|
38
|
-
export const Text = (args) => {
|
|
39
|
-
return <HawaSettingsRow settingsType={args.type} />;
|
|
40
|
-
};
|
|
41
|
-
Text.args = {
|
|
42
|
-
theme: "primary",
|
|
43
|
-
type: "text"
|
|
44
|
-
};
|
|
45
|
-
export const Radio = (args) => {
|
|
46
|
-
return <HawaSettingsRow settingsType={args.type} />;
|
|
47
|
-
};
|
|
48
|
-
Radio.args = {
|
|
49
|
-
theme: "primary",
|
|
50
|
-
type: "radio"
|
|
51
|
-
};
|