@sikka/hawa 0.0.4 → 0.0.7
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 +9 -8
- package/src/blocks/Account/UserProfile.js +61 -11
- package/src/blocks/Account/UserSettings.js +11 -11
- package/src/blocks/AuthForms/NewPasswordForm.js +85 -11
- package/src/blocks/AuthForms/ResetPasswordForm.js +47 -8
- package/src/blocks/AuthForms/SignInForm.js +91 -13
- package/src/blocks/AuthForms/SignUpForm.js +119 -12
- package/src/blocks/Payment/ChargeWalletForm.js +53 -0
- package/src/blocks/Payment/CreditCardForm.js +60 -0
- package/src/blocks/Payment/Form/CForm.js +10 -8
- package/src/blocks/Payment/Gateway/Wallet.js +5 -5
- package/src/blocks/Payment/PayWithWallet.js +14 -0
- package/src/blocks/Payment/PaymentMethod.js +2 -2
- package/src/blocks/Payment/SelectPayment.js +76 -0
- package/src/blocks/Payment/index.js +18 -0
- package/src/index.js +3 -1
- package/src/layout/Box.js +31 -18
- package/src/stories/BlocksStories/AuthForm.stories.js +103 -0
- package/src/stories/BlocksStories/PaymentForm.stories.js +86 -0
- package/src/stories/BlocksStories/UserForm.stories.js +41 -0
- 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 +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/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 +151 -18
- package/src/ui/ActionButton.js +38 -10
- package/src/ui/AdaptiveButton.js +29 -29
- package/src/ui/ApplePayButton.js +26 -0
- package/src/ui/AutoCompleteField.js +0 -1
- package/src/ui/DragDropImages.js +2 -2
- package/src/ui/GithubButton.js +24 -0
- package/src/ui/GoogleButton.js +23 -0
- package/src/ui/GooglePayButton.js +26 -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 +43 -0
- package/src/ui/HawaRadio.js +73 -0
- package/src/ui/HawaSettingsRow.js +71 -0
- package/src/ui/{TextArea.js → HawaTextArea.js} +2 -2
- package/src/ui/HawaTextField.js +110 -0
- package/src/ui/HawaTypography.js +29 -0
- package/src/ui/MadaButton.js +26 -0
- package/src/ui/PayPalButton.js +26 -0
- package/src/ui/RadioBox.js +2 -2
- package/src/ui/STCPayButton.js +26 -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 +27 -0
- package/src/ui/VisaMasterButton.js +26 -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.b7ffaed0.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.8ebae370.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.d144d840.iframe.bundle.js.LICENSE.txt → vendors~main.8ebae370.iframe.bundle.js.LICENSE.txt} +3 -30
- package/storybook-static/vendors~main.8ebae370.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/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/blocks/index.js +0 -13
- 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/stories/RadioSelector.stories.js +0 -69
- package/src/stories/UserAccount.stories.js +0 -46
- package/src/ui/RadioSelector.js +0 -51
- 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
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { Meta } from
|
|
2
|
-
import Code from
|
|
3
|
-
import Colors from
|
|
4
|
-
import Comments from
|
|
5
|
-
import Direction from
|
|
6
|
-
import Flow from
|
|
7
|
-
import Plugin from
|
|
8
|
-
import Repo from
|
|
9
|
-
import StackAlt from
|
|
10
|
-
|
|
11
|
-
<Meta title="Example/Introduction"
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
// import Code from "./assets/code-brackets.svg";
|
|
3
|
+
// import Colors from "./assets/colors.svg";
|
|
4
|
+
// import Comments from "./assets/comments.svg";
|
|
5
|
+
// import Direction from "./assets/direction.svg";
|
|
6
|
+
// import Flow from "./assets/flow.svg";
|
|
7
|
+
// import Plugin from "./assets/plugin.svg";
|
|
8
|
+
// import Repo from "./assets/repo.svg";
|
|
9
|
+
// import StackAlt from "./assets/stackalt.svg";
|
|
10
|
+
|
|
11
|
+
<Meta title="Example/Introduction" />;
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
/* <style>
|
|
15
|
+
{`
|
|
14
16
|
.subheading {
|
|
15
17
|
--mediumdark: '#999999';
|
|
16
18
|
font-weight: 900;
|
|
@@ -112,100 +114,120 @@ import StackAlt from './assets/stackalt.svg';
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
|
|
115
|
-
`}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
117
|
+
`}
|
|
118
|
+
</style> */
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// # Welcome to Storybook
|
|
122
|
+
|
|
123
|
+
// Storybook helps you build UI components in isolation from your app's business logic, data, and context.
|
|
124
|
+
// That makes it easy to develop hard - to - reach states.Save these UI states as ** stories ** to revisit during development, testing, or QA.
|
|
125
|
+
|
|
126
|
+
// Browse example stories now by navigating to them in the sidebar.
|
|
127
|
+
// View their code in the`src/stories` directory to learn how they work.
|
|
128
|
+
// We recommend building UIs with a[** component - driven **](https://componentdriven.org) process starting with atomic components and ending with pages.
|
|
129
|
+
|
|
130
|
+
<>
|
|
131
|
+
<div className="subheading">Configure</div>
|
|
132
|
+
|
|
133
|
+
<div className="link-list">
|
|
134
|
+
<a
|
|
135
|
+
className="link-item"
|
|
136
|
+
href="https://storybook.js.org/docs/react/addons/addon-types"
|
|
137
|
+
target="_blank"
|
|
138
|
+
>
|
|
139
|
+
{/* <img src={Plugin} alt="plugin" /> */}
|
|
140
|
+
<span>
|
|
141
|
+
<strong>Presets for popular tools</strong>
|
|
142
|
+
Easy setup for TypeScript, SCSS and more.
|
|
143
|
+
</span>
|
|
144
|
+
</a>
|
|
145
|
+
<a
|
|
146
|
+
className="link-item"
|
|
147
|
+
href="https://storybook.js.org/docs/react/configure/webpack"
|
|
148
|
+
target="_blank"
|
|
149
|
+
>
|
|
150
|
+
{/* <img src={StackAlt} alt="Build" /> */}
|
|
151
|
+
<span>
|
|
152
|
+
<strong>Build configuration</strong>
|
|
153
|
+
How to customize webpack and Babel
|
|
154
|
+
</span>
|
|
155
|
+
</a>
|
|
156
|
+
<a
|
|
157
|
+
className="link-item"
|
|
158
|
+
href="https://storybook.js.org/docs/react/configure/styling-and-css"
|
|
159
|
+
target="_blank"
|
|
160
|
+
>
|
|
161
|
+
{/* <img src={Colors} alt="colors" /> */}
|
|
162
|
+
<span>
|
|
163
|
+
<strong>Styling</strong>
|
|
164
|
+
How to load and configure CSS libraries
|
|
165
|
+
</span>
|
|
166
|
+
</a>
|
|
167
|
+
<a
|
|
168
|
+
className="link-item"
|
|
169
|
+
href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
|
|
170
|
+
target="_blank"
|
|
171
|
+
>
|
|
172
|
+
{/* <img src={Flow} alt="flow" /> */}
|
|
173
|
+
<span>
|
|
174
|
+
<strong>Data</strong>
|
|
175
|
+
Providers and mocking for data libraries
|
|
176
|
+
</span>
|
|
177
|
+
</a>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div className="subheading">Learn</div>
|
|
181
|
+
|
|
182
|
+
<div className="link-list">
|
|
183
|
+
<a
|
|
184
|
+
className="link-item"
|
|
185
|
+
href="https://storybook.js.org/docs"
|
|
186
|
+
target="_blank"
|
|
187
|
+
>
|
|
188
|
+
{/* <img src={Repo} alt="repo" /> */}
|
|
189
|
+
<span>
|
|
190
|
+
<strong>Storybook documentation</strong>
|
|
191
|
+
Configure, customize, and extend
|
|
192
|
+
</span>
|
|
193
|
+
</a>
|
|
194
|
+
<a
|
|
195
|
+
className="link-item"
|
|
196
|
+
href="https://storybook.js.org/tutorials/"
|
|
197
|
+
target="_blank"
|
|
198
|
+
>
|
|
199
|
+
{/* <img src={Direction} alt="direction" /> */}
|
|
200
|
+
<span>
|
|
201
|
+
<strong>In-depth guides</strong>
|
|
202
|
+
Best practices from leading teams
|
|
203
|
+
</span>
|
|
204
|
+
</a>
|
|
205
|
+
<a
|
|
206
|
+
className="link-item"
|
|
207
|
+
href="https://github.com/storybookjs/storybook"
|
|
208
|
+
target="_blank"
|
|
209
|
+
>
|
|
210
|
+
{/* <img src={Code} alt="code" /> */}
|
|
211
|
+
<span>
|
|
212
|
+
<strong>GitHub project</strong>
|
|
213
|
+
View the source and add issues
|
|
214
|
+
</span>
|
|
215
|
+
</a>
|
|
216
|
+
<a
|
|
217
|
+
className="link-item"
|
|
218
|
+
href="https://discord.gg/storybook"
|
|
219
|
+
target="_blank"
|
|
220
|
+
>
|
|
221
|
+
{/* <img src={Comments} alt="comments" /> */}
|
|
222
|
+
<span>
|
|
223
|
+
<strong>Discord chat</strong>
|
|
224
|
+
Chat with maintainers and the community
|
|
225
|
+
</span>
|
|
226
|
+
</a>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div className="tip-wrapper">
|
|
230
|
+
<span className="tip">Tip</span>Edit the Markdown in{" "}
|
|
231
|
+
<code>src/stories/Introduction.stories.mdx</code>
|
|
232
|
+
</div>
|
|
233
|
+
</>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box } from "../../layout";
|
|
3
|
+
import { HawaProvider, defaultTheme } from "../../themes/HawaProvider";
|
|
4
|
+
const theme = {
|
|
5
|
+
...defaultTheme
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => {
|
|
9
|
+
return (
|
|
10
|
+
<HawaProvider size={args.size} themeName={"secondary"}>
|
|
11
|
+
<Box>Box 1</Box>
|
|
12
|
+
<Box>
|
|
13
|
+
<div style={{ backgroundColor: "white", padding: 10, color: "black" }}>
|
|
14
|
+
testing box in box
|
|
15
|
+
</div>
|
|
16
|
+
</Box>
|
|
17
|
+
<Box>Box 3</Box>
|
|
18
|
+
</HawaProvider>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export default {
|
|
22
|
+
title: "Layout/Box",
|
|
23
|
+
component: <Box />,
|
|
24
|
+
parameters: {
|
|
25
|
+
backgrounds: {
|
|
26
|
+
default: "light",
|
|
27
|
+
values: [
|
|
28
|
+
{ name: "light", value: theme.lightBackground },
|
|
29
|
+
{ name: "dark", value: theme.darkBackground }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Normal = Template.bind({});
|
|
36
|
+
Normal.args = {
|
|
37
|
+
size: "large",
|
|
38
|
+
showText: true,
|
|
39
|
+
buttonLabel: "test",
|
|
40
|
+
borderRadius: 5,
|
|
41
|
+
padding: theme.paddings,
|
|
42
|
+
textColor: "#000000",
|
|
43
|
+
buttonColor: "#f9f9f9"
|
|
44
|
+
};
|
|
45
|
+
export const Compact = Template.bind({});
|
|
46
|
+
Compact.args = {
|
|
47
|
+
size: "small",
|
|
48
|
+
showText: true,
|
|
49
|
+
buttonLabel: "test",
|
|
50
|
+
theme: {
|
|
51
|
+
borderRadius: 5,
|
|
52
|
+
paddings: theme.paddings / 2,
|
|
53
|
+
textColor: "#000000",
|
|
54
|
+
buttonColor: "#f9f9f9"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
4
|
+
import { ActionButton } from "../../ui";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
return (
|
|
8
|
+
<HawaProvider themeName={args.theme}>
|
|
9
|
+
<ActionButton text={args.buttonLabel} />
|
|
10
|
+
</HawaProvider>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
//types:
|
|
14
|
+
//error (red)
|
|
15
|
+
//warning (red)
|
|
16
|
+
//notice (blue)
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: "UI/ActionButton",
|
|
20
|
+
component: ActionButton,
|
|
21
|
+
argTypes: {
|
|
22
|
+
theme: {
|
|
23
|
+
description: "overwritten description",
|
|
24
|
+
table: {
|
|
25
|
+
type: {
|
|
26
|
+
summary: "something short"
|
|
27
|
+
},
|
|
28
|
+
defaultValue: { summary: "Hello" }
|
|
29
|
+
},
|
|
30
|
+
options: ["primary", "secondary", "default"],
|
|
31
|
+
control: { type: "select" }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Template.args = {
|
|
37
|
+
showText: true,
|
|
38
|
+
buttonLabel: "test",
|
|
39
|
+
theme: "primary"
|
|
40
|
+
};
|
|
41
|
+
export const Primary = Template.bind({});
|
|
42
|
+
Primary.args = {
|
|
43
|
+
showText: true,
|
|
44
|
+
buttonLabel: "test",
|
|
45
|
+
theme: "primary"
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Secondary = Template.bind({});
|
|
49
|
+
Secondary.args = {
|
|
50
|
+
showText: true,
|
|
51
|
+
buttonLabel: "test",
|
|
52
|
+
theme: "secondary"
|
|
53
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import CastIcon from "@
|
|
3
|
-
import { HawaProvider } from "
|
|
4
|
-
import { AdaptiveButton } from "
|
|
2
|
+
import CastIcon from "@mui/icons-material/Cast";
|
|
3
|
+
import { HawaProvider } from "../../themes/HawaProvider";
|
|
4
|
+
import { AdaptiveButton } from "../../ui";
|
|
5
5
|
|
|
6
6
|
const Template = (args) => {
|
|
7
7
|
const theme = {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
4
|
+
import { HawaAlert } from "../../ui";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
return (
|
|
8
|
+
<HawaProvider themeName={args.theme}>
|
|
9
|
+
<HawaAlert
|
|
10
|
+
title="What?"
|
|
11
|
+
text="This is a success alert"
|
|
12
|
+
severity="success"
|
|
13
|
+
/>
|
|
14
|
+
<HawaAlert text="This is an info alert" severity="info" />
|
|
15
|
+
<HawaAlert text="This is a warning alert" severity="warning" />
|
|
16
|
+
<HawaAlert text="This is an error alert" severity="error" />
|
|
17
|
+
</HawaProvider>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
//types:
|
|
21
|
+
//error (red)
|
|
22
|
+
//warning (red)
|
|
23
|
+
//notice (blue)
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
title: "UI/Alert",
|
|
27
|
+
component: HawaAlert,
|
|
28
|
+
argTypes: {
|
|
29
|
+
theme: {
|
|
30
|
+
options: ["primary", "secondary", "default"],
|
|
31
|
+
control: { type: "select" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
theme: "primary"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const Default = Template.bind({});
|
|
40
|
+
Default.args = {
|
|
41
|
+
theme: "primary"
|
|
42
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import "../styles.css";
|
|
2
|
+
import { HawaCheckbox } from "../../ui";
|
|
4
3
|
|
|
5
4
|
const Template = (args) => {
|
|
6
|
-
return <
|
|
5
|
+
return <HawaCheckbox {...args} />;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default {
|
|
10
9
|
title: "UI/Checkbox",
|
|
11
|
-
component:
|
|
10
|
+
component: HawaCheckbox,
|
|
12
11
|
argsTypes: {
|
|
13
12
|
defaultValue: {
|
|
14
13
|
options: [true, false],
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { storiesOf } from "@storybook/react";
|
|
2
|
+
import { HawaInputLabel } from "../../ui";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/InputLabel",
|
|
6
|
+
component: [HawaInputLabel],
|
|
7
|
+
argTypes: {
|
|
8
|
+
resize: {
|
|
9
|
+
options: ["vertical", "horizontal", "both"],
|
|
10
|
+
control: { type: "radio" }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HawaProvider } from "../../themes/HawaProvider";
|
|
3
|
+
import { HawaRadio } from "../../ui";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "UI/RadioSelector",
|
|
7
|
+
component: HawaRadio,
|
|
8
|
+
argTypes: {
|
|
9
|
+
theme: {
|
|
10
|
+
options: ["primary", "secondary", "default"],
|
|
11
|
+
control: { type: "select" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
theme: "primary"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const Template = (args) => {
|
|
20
|
+
return (
|
|
21
|
+
<HawaProvider themeName={args.theme}>
|
|
22
|
+
<HawaRadio
|
|
23
|
+
defaultValue="option1"
|
|
24
|
+
options={[
|
|
25
|
+
{ text: "Option 1", label: "option1" },
|
|
26
|
+
{ text: "Option 2", label: "option2" },
|
|
27
|
+
{ text: "Option 3", label: "option3" }
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
</HawaProvider>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export const Light = Template.bind({});
|
|
34
|
+
|
|
35
|
+
Light.args = {
|
|
36
|
+
theme: "primary",
|
|
37
|
+
|
|
38
|
+
handleChange: () => {
|
|
39
|
+
console.log("handleChange goes here");
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const Dark = Template.bind({});
|
|
43
|
+
Dark.args = {
|
|
44
|
+
options: [
|
|
45
|
+
{ text: "Option 1", label: "option1" },
|
|
46
|
+
{ text: "Option 2", label: "option2" },
|
|
47
|
+
{ text: "Option 3", label: "option3" }
|
|
48
|
+
],
|
|
49
|
+
defaultValue: "option2",
|
|
50
|
+
handleChange: () => {
|
|
51
|
+
console.log("handleChange goes here");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
SelectPayment,
|
|
4
|
+
CreditCardForm,
|
|
5
|
+
ChargeWalletForm,
|
|
6
|
+
PayWithWallet
|
|
7
|
+
} from "../../blocks/Payment";
|
|
8
|
+
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
9
|
+
import { HawaSettingsRow } from "../../ui";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "UI/SettingsRow",
|
|
13
|
+
component: [SelectPayment, CreditCardForm],
|
|
14
|
+
argTypes: {
|
|
15
|
+
theme: {
|
|
16
|
+
options: ["primary", "secondary", "default"],
|
|
17
|
+
control: { type: "select" }
|
|
18
|
+
},
|
|
19
|
+
type: {
|
|
20
|
+
options: ["checkbox", "text", "default"],
|
|
21
|
+
control: { type: "select" }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
args: {
|
|
25
|
+
theme: "primary",
|
|
26
|
+
type: "checkbox"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const HawaSettingsRowTemplate = (args) => {
|
|
31
|
+
return (
|
|
32
|
+
<HawaProvider themeName={args.theme}>
|
|
33
|
+
<HawaSettingsRow settingsType={args.type} />
|
|
34
|
+
</HawaProvider>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Checkbox = HawaSettingsRowTemplate.bind({});
|
|
39
|
+
Checkbox.args = {
|
|
40
|
+
theme: "primary",
|
|
41
|
+
type: "checkbox"
|
|
42
|
+
};
|
|
43
|
+
export const Text = (args) => {
|
|
44
|
+
return (
|
|
45
|
+
<HawaProvider themeName={args.theme}>
|
|
46
|
+
<HawaSettingsRow settingsType={args.type} />
|
|
47
|
+
</HawaProvider>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
Text.args = {
|
|
51
|
+
theme: "primary",
|
|
52
|
+
type: "text"
|
|
53
|
+
};
|
|
54
|
+
export const Radio = (args) => {
|
|
55
|
+
return (
|
|
56
|
+
<HawaProvider themeName={args.theme}>
|
|
57
|
+
<HawaSettingsRow settingsType={args.type} />
|
|
58
|
+
</HawaProvider>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
Radio.args = {
|
|
62
|
+
theme: "primary",
|
|
63
|
+
type: "radio"
|
|
64
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import "../styles.css";
|
|
2
|
+
import { HawaTextField } from "../../ui";
|
|
4
3
|
|
|
5
4
|
const Template = (args) => {
|
|
6
|
-
return <
|
|
5
|
+
return <HawaTextField {...args} />;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default {
|
|
10
|
-
title: "
|
|
11
|
-
component:
|
|
9
|
+
title: "UI/TextField",
|
|
10
|
+
component: HawaTextField,
|
|
12
11
|
argsTypes: {
|
|
13
12
|
type: {
|
|
14
13
|
name: "type",
|