@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.
Files changed (123) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +9 -8
  4. package/src/blocks/Account/UserProfile.js +61 -11
  5. package/src/blocks/Account/UserSettings.js +11 -11
  6. package/src/blocks/AuthForms/NewPasswordForm.js +85 -11
  7. package/src/blocks/AuthForms/ResetPasswordForm.js +47 -8
  8. package/src/blocks/AuthForms/SignInForm.js +91 -13
  9. package/src/blocks/AuthForms/SignUpForm.js +119 -12
  10. package/src/blocks/Payment/ChargeWalletForm.js +53 -0
  11. package/src/blocks/Payment/CreditCardForm.js +60 -0
  12. package/src/blocks/Payment/Form/CForm.js +10 -8
  13. package/src/blocks/Payment/Gateway/Wallet.js +5 -5
  14. package/src/blocks/Payment/PayWithWallet.js +14 -0
  15. package/src/blocks/Payment/PaymentMethod.js +2 -2
  16. package/src/blocks/Payment/SelectPayment.js +76 -0
  17. package/src/blocks/Payment/index.js +18 -0
  18. package/src/index.js +3 -1
  19. package/src/layout/Box.js +31 -18
  20. package/src/stories/BlocksStories/AuthForm.stories.js +103 -0
  21. package/src/stories/BlocksStories/PaymentForm.stories.js +86 -0
  22. package/src/stories/BlocksStories/UserForm.stories.js +41 -0
  23. package/src/stories/GlobalVariables.stories.js +33 -90
  24. package/src/stories/HawaProvider.stories.js +0 -1
  25. package/src/stories/Introduction.stories.js +132 -110
  26. package/src/stories/LayoutStories/Box.stories.js +56 -0
  27. package/src/stories/UIStories/ActionButton.stories.js +53 -0
  28. package/src/stories/{AdaptiveButton.stories.js → UIStories/AdaptiveButton.stories.js} +3 -3
  29. package/src/stories/UIStories/Alert.stories.js +42 -0
  30. package/src/stories/{CheckBox.stories.js → UIStories/CheckBox.stories.js} +3 -4
  31. package/src/stories/UIStories/InputLabel.stories.js +13 -0
  32. package/src/stories/UIStories/RadioSelector.stories.js +53 -0
  33. package/src/stories/UIStories/SettingsRow.stories.js +64 -0
  34. package/src/stories/{TextField.stories.js → UIStories/TextField.stories.js} +4 -5
  35. package/src/themes/HawaProvider.js +151 -18
  36. package/src/ui/ActionButton.js +38 -10
  37. package/src/ui/AdaptiveButton.js +29 -29
  38. package/src/ui/ApplePayButton.js +26 -0
  39. package/src/ui/AutoCompleteField.js +0 -1
  40. package/src/ui/DragDropImages.js +2 -2
  41. package/src/ui/GithubButton.js +24 -0
  42. package/src/ui/GoogleButton.js +23 -0
  43. package/src/ui/GooglePayButton.js +26 -0
  44. package/src/ui/HawaAlert.js +37 -0
  45. package/src/ui/HawaButton.js +48 -0
  46. package/src/ui/{Checkbox.js → HawaCheckbox.js} +3 -3
  47. package/src/ui/HawaInputLabel.js +32 -0
  48. package/src/ui/HawaLogoButton.js +43 -0
  49. package/src/ui/HawaRadio.js +73 -0
  50. package/src/ui/HawaSettingsRow.js +71 -0
  51. package/src/ui/{TextArea.js → HawaTextArea.js} +2 -2
  52. package/src/ui/HawaTextField.js +110 -0
  53. package/src/ui/HawaTypography.js +29 -0
  54. package/src/ui/MadaButton.js +26 -0
  55. package/src/ui/PayPalButton.js +26 -0
  56. package/src/ui/RadioBox.js +2 -2
  57. package/src/ui/STCPayButton.js +26 -0
  58. package/src/ui/SelectedField.js +4 -4
  59. package/src/ui/StyledTooltip.js +1 -1
  60. package/src/ui/TabPanel.js +1 -1
  61. package/src/ui/TwitterButton.js +27 -0
  62. package/src/ui/VisaMasterButton.js +26 -0
  63. package/src/ui/WalletButton.js +24 -0
  64. package/src/ui/index.js +23 -11
  65. package/storybook-static/0.0d994c92.iframe.bundle.js +3 -0
  66. package/storybook-static/{1.4e43f671.iframe.bundle.js.LICENSE.txt → 0.0d994c92.iframe.bundle.js.LICENSE.txt} +0 -0
  67. package/storybook-static/0.0d994c92.iframe.bundle.js.map +1 -0
  68. package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +1 -0
  69. package/storybook-static/1.aabc3f3a.iframe.bundle.js +1 -0
  70. package/storybook-static/{3.c1dc7159.iframe.bundle.js → 2.430bf1e3.iframe.bundle.js} +1 -1
  71. package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +2 -0
  72. package/storybook-static/{4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt → 4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt} +0 -0
  73. package/storybook-static/{5.88fe62ee92ff5ca67829.manager.bundle.js → 5.63ab4f94d50a3acf080d.manager.bundle.js} +1 -1
  74. package/storybook-static/{7.69d2e532.iframe.bundle.js → 6.704d1e8d.iframe.bundle.js} +1 -1
  75. package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js → 6.a6d45262f7e98f3f18d3.manager.bundle.js} +2 -2
  76. package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt → 6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt} +0 -0
  77. package/storybook-static/{7.5ec31f3702b08ab0b71c.manager.bundle.js → 7.097710753af9a1c41b80.manager.bundle.js} +1 -1
  78. package/storybook-static/{8.68cd1217.iframe.bundle.js → 7.9ce807e3.iframe.bundle.js} +3 -3
  79. package/storybook-static/{8.68cd1217.iframe.bundle.js.LICENSE.txt → 7.9ce807e3.iframe.bundle.js.LICENSE.txt} +0 -0
  80. package/storybook-static/7.9ce807e3.iframe.bundle.js.map +1 -0
  81. package/storybook-static/{8.5ce13be7612bd3a6b864.manager.bundle.js → 8.76c3cbf398692028e834.manager.bundle.js} +1 -1
  82. package/storybook-static/{9.488e3969.iframe.bundle.js → 8.c4cb6081.iframe.bundle.js} +1 -1
  83. package/storybook-static/iframe.html +1 -1
  84. package/storybook-static/index.html +1 -1
  85. package/storybook-static/main.ac6e4b72b033097dad76.manager.bundle.js +1 -0
  86. package/storybook-static/main.b7ffaed0.iframe.bundle.js +1 -0
  87. package/storybook-static/{runtime~main.cc29f4c2175f187a3707.manager.bundle.js → runtime~main.c8dac23bc753439736f0.manager.bundle.js} +1 -1
  88. package/storybook-static/runtime~main.cfefe972.iframe.bundle.js +1 -0
  89. package/storybook-static/vendors~main.8ebae370.iframe.bundle.js +76 -0
  90. package/storybook-static/{vendors~main.d144d840.iframe.bundle.js.LICENSE.txt → vendors~main.8ebae370.iframe.bundle.js.LICENSE.txt} +3 -30
  91. package/storybook-static/vendors~main.8ebae370.iframe.bundle.js.map +1 -0
  92. package/storybook-static/vendors~main.a697e07137d366f95f76.manager.bundle.js +2 -0
  93. package/storybook-static/{vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt → vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt} +0 -0
  94. package/src/blocks/AuthForms/viaFacebook.js +0 -0
  95. package/src/blocks/AuthForms/viaGithub.js +0 -0
  96. package/src/blocks/AuthForms/viaGoogle.js +0 -0
  97. package/src/blocks/AuthForms/viaTwitter.js +0 -0
  98. package/src/blocks/index.js +0 -13
  99. package/src/stories/ActionButton.stories.js +0 -49
  100. package/src/stories/Alert.stories.js +0 -41
  101. package/src/stories/AuthForm.stories.js +0 -79
  102. package/src/stories/Box.stories.js +0 -64
  103. package/src/stories/InputLabel.stories.js +0 -92
  104. package/src/stories/RadioSelector.stories.js +0 -69
  105. package/src/stories/UserAccount.stories.js +0 -46
  106. package/src/ui/RadioSelector.js +0 -51
  107. package/src/ui/StyledAlert.js +0 -30
  108. package/src/ui/StyledInputLabel.js +0 -19
  109. package/src/ui/TextField.js +0 -62
  110. package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +0 -1
  111. package/storybook-static/0.dd3d47f5.iframe.bundle.js +0 -1
  112. package/storybook-static/1.4e43f671.iframe.bundle.js +0 -3
  113. package/storybook-static/1.4e43f671.iframe.bundle.js.map +0 -1
  114. package/storybook-static/2.9a757207.iframe.bundle.js +0 -1
  115. package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +0 -2
  116. package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
  117. package/storybook-static/main.65cb2769.iframe.bundle.js +0 -1
  118. package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +0 -1
  119. package/storybook-static/runtime~main.6e2e1544.iframe.bundle.js +0 -1
  120. package/storybook-static/vendors~main.d144d840.iframe.bundle.js +0 -3
  121. package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +0 -1
  122. package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +0 -2
  123. package/yarn-error.log +0 -10910
@@ -1,16 +1,18 @@
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
- <style>{`
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
- `}</style>
116
-
117
- # Welcome to Storybook
118
-
119
- Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
- That makes it easy to develop hard - to - reach states.Save these UI states as ** stories ** to revisit during development, testing, or QA.
121
-
122
- Browse example stories now by navigating to them in the sidebar.
123
- View their code in the`src/stories` directory to learn how they work.
124
- We recommend building UIs with a[** component - driven **](https://componentdriven.org) process starting with atomic components and ending with pages.
125
-
126
- <div className="subheading">Configure</div>
127
-
128
- <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
134
- <img src={Plugin} alt="plugin" />
135
- <span>
136
- <strong>Presets for popular tools</strong>
137
- Easy setup for TypeScript, SCSS and more.
138
- </span>
139
- </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
145
- <img src={StackAlt} alt="Build" />
146
- <span>
147
- <strong>Build configuration</strong>
148
- How to customize webpack and Babel
149
- </span>
150
- </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
156
- <img src={Colors} alt="colors" />
157
- <span>
158
- <strong>Styling</strong>
159
- How to load and configure CSS libraries
160
- </span>
161
- </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
167
- <img src={Flow} alt="flow" />
168
- <span>
169
- <strong>Data</strong>
170
- Providers and mocking for data libraries
171
- </span>
172
- </a>
173
- </div>
174
-
175
- <div className="subheading">Learn</div>
176
-
177
- <div className="link-list">
178
- <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
- <img src={Repo} alt="repo" />
180
- <span>
181
- <strong>Storybook documentation</strong>
182
- Configure, customize, and extend
183
- </span>
184
- </a>
185
- <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
- <img src={Direction} alt="direction" />
187
- <span>
188
- <strong>In-depth guides</strong>
189
- Best practices from leading teams
190
- </span>
191
- </a>
192
- <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
- <img src={Code} alt="code" />
194
- <span>
195
- <strong>GitHub project</strong>
196
- View the source and add issues
197
- </span>
198
- </a>
199
- <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
- <img src={Comments} alt="comments" />
201
- <span>
202
- <strong>Discord chat</strong>
203
- Chat with maintainers and the community
204
- </span>
205
- </a>
206
- </div>
207
-
208
- <div className="tip-wrapper">
209
- <span className="tip">Tip</span>Edit the Markdown in{' '}
210
- <code>src/stories/Introduction.stories.mdx</code>
211
- </div>
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 "@material-ui/icons/Cast";
3
- import { HawaProvider } from "../themes/HawaProvider";
4
- import { AdaptiveButton } from "../ui";
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 { StyledCheckbox } from "../ui";
3
- import "../styles.css";
2
+ import { HawaCheckbox } from "../../ui";
4
3
 
5
4
  const Template = (args) => {
6
- return <StyledCheckbox {...args} />;
5
+ return <HawaCheckbox {...args} />;
7
6
  };
8
7
 
9
8
  export default {
10
9
  title: "UI/Checkbox",
11
- component: Light,
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 { StyledTextField } from "../ui";
3
- import "../styles.css";
2
+ import { HawaTextField } from "../../ui";
4
3
 
5
4
  const Template = (args) => {
6
- return <StyledTextField {...args} />;
5
+ return <HawaTextField {...args} />;
7
6
  };
8
7
 
9
8
  export default {
10
- title: "Components/TextField",
11
- component: StyledTextField,
9
+ title: "UI/TextField",
10
+ component: HawaTextField,
12
11
  argsTypes: {
13
12
  type: {
14
13
  name: "type",