@sikka/hawa 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/hawa-publish-push.yml +45 -0
- package/.github/workflows/hawa-publish.yml +45 -0
- package/.prettierrc +28 -28
- package/README.md +149 -119
- package/es/index.es.js +1 -0
- package/lib/index.js +1 -0
- package/package.json +59 -47
- package/rollup.config.js +30 -40
- package/src/Assets/images/card-background/1.jpeg +0 -0
- package/src/Assets/images/card-background/10.jpeg +0 -0
- package/src/Assets/images/card-background/11.jpeg +0 -0
- package/src/Assets/images/card-background/12.jpeg +0 -0
- package/src/Assets/images/card-background/13.jpeg +0 -0
- package/src/Assets/images/card-background/14.jpeg +0 -0
- package/src/Assets/images/card-background/15.jpeg +0 -0
- package/src/Assets/images/card-background/16.jpeg +0 -0
- package/src/Assets/images/card-background/17.jpeg +0 -0
- package/src/Assets/images/card-background/18.jpeg +0 -0
- package/src/Assets/images/card-background/19.jpeg +0 -0
- package/src/Assets/images/card-background/2.jpeg +0 -0
- package/src/Assets/images/card-background/20.jpeg +0 -0
- package/src/Assets/images/card-background/21.jpeg +0 -0
- package/src/Assets/images/card-background/22.jpeg +0 -0
- package/src/Assets/images/card-background/23.jpeg +0 -0
- package/src/Assets/images/card-background/24.jpeg +0 -0
- package/src/Assets/images/card-background/25.jpeg +0 -0
- package/src/Assets/images/card-background/3.jpeg +0 -0
- package/src/Assets/images/card-background/4.jpeg +0 -0
- package/src/Assets/images/card-background/5.jpeg +0 -0
- package/src/Assets/images/card-background/6.jpeg +0 -0
- package/src/Assets/images/card-background/7.jpeg +0 -0
- package/src/Assets/images/card-background/8.jpeg +0 -0
- package/src/Assets/images/card-background/9.jpeg +0 -0
- package/src/Assets/images/card-type/amex.png +0 -0
- package/src/Assets/images/card-type/diners.png +0 -0
- package/src/Assets/images/card-type/discover.png +0 -0
- package/src/Assets/images/card-type/mastercard.png +0 -0
- package/src/Assets/images/card-type/troy.png +0 -0
- package/src/Assets/images/card-type/unionpay.png +0 -0
- package/src/Assets/images/card-type/visa.png +0 -0
- package/src/blocks/Account/UserProfile.js +15 -0
- package/src/blocks/Account/UserSettings.js +15 -0
- package/src/blocks/Account/index.js +2 -0
- package/src/blocks/AuthForms/NewPasswordForm.js +17 -0
- package/src/blocks/AuthForms/ResetPasswordForm.js +14 -0
- package/src/blocks/AuthForms/SignInForm.js +19 -0
- package/src/blocks/AuthForms/SignUpForm.js +20 -0
- package/src/blocks/AuthForms/index.js +4 -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/Payment/Form/CForm.js +326 -0
- package/src/blocks/Payment/Form/Card.js +242 -0
- package/src/blocks/Payment/Gateway/GooglePay.js +251 -0
- package/src/blocks/Payment/Gateway/Payfort.js +90 -0
- package/src/blocks/Payment/Gateway/Paypal.js +138 -0
- package/src/blocks/Payment/Gateway/Wallet.js +149 -0
- package/src/blocks/Payment/PaymentMethod.js +132 -0
- package/src/blocks/index.js +13 -0
- package/src/index.js +2 -1
- package/src/layout/Box.js +25 -0
- package/src/layout/index.js +1 -0
- package/src/stories/ActionButton.stories.js +49 -0
- package/src/stories/AdaptiveButton.stories.js +80 -84
- package/src/stories/Alert.stories.js +41 -0
- package/src/stories/AuthForm.stories.js +79 -0
- package/src/stories/Box.stories.js +64 -0
- package/src/stories/CheckBox.stories.js +35 -33
- package/src/stories/GlobalVariables.stories.js +101 -108
- package/src/stories/HawaProvider.stories.js +23 -23
- package/src/stories/InputLabel.stories.js +92 -100
- package/src/stories/Introduction.stories.js +211 -0
- package/src/stories/RadioSelector.stories.js +69 -69
- package/src/stories/TextField.stories.js +50 -59
- package/src/stories/UserAccount.stories.js +46 -0
- package/src/styles.css +400 -403
- package/src/styles.scss +679 -0
- package/src/themes/HawaProvider.js +45 -0
- package/src/ui/ActionButton.js +15 -0
- package/src/{components/Hawa/AdaptiveButton/AdaptiveButton.jsx → ui/AdaptiveButton.js} +252 -261
- package/src/{components/Hawa/AutoCompleteField/AutoCompleteField.jsx → ui/AutoCompleteField.js} +33 -33
- package/src/{components/Hawa/Checkbox/Checkbox.jsx → ui/Checkbox.js} +21 -20
- package/src/{components/Hawa/DragDropImages/DragDropImages.jsx → ui/DragDropImages.js} +180 -180
- package/src/{components/Hawa/Hawa.jsx → ui/Hawa.js} +3 -3
- package/src/{components/Hawa/RadioBox/RadioBox.jsx → ui/RadioBox.js} +29 -29
- package/src/{components/Hawa/RadioSelector/RadioSelector.jsx → ui/RadioSelector.js} +51 -51
- package/src/ui/Row.js +21 -0
- package/src/{components/Hawa/SelectedField/SelectedField.jsx → ui/SelectedField.js} +46 -46
- package/src/ui/StyledAlert.js +30 -0
- package/src/ui/StyledInputLabel.js +19 -0
- package/src/ui/StyledTooltip.js +46 -0
- package/src/{components/Hawa/TabPanel/TabPanel.jsx → ui/TabPanel.js} +37 -38
- package/src/{components/Hawa/TextArea/TextArea.jsx → ui/TextArea.js} +38 -39
- package/src/ui/TextField.js +62 -0
- package/src/{components/Hawa → ui}/index.js +13 -11
- package/src/util.js +20 -0
- package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +1 -0
- package/storybook-static/0.dd3d47f5.iframe.bundle.js +1 -0
- package/storybook-static/1.4e43f671.iframe.bundle.js +3 -0
- package/storybook-static/{4.f6eb74f4.iframe.bundle.js.LICENSE.txt → 1.4e43f671.iframe.bundle.js.LICENSE.txt} +8 -8
- package/storybook-static/1.4e43f671.iframe.bundle.js.map +1 -0
- package/storybook-static/2.9a757207.iframe.bundle.js +1 -0
- package/storybook-static/3.c1dc7159.iframe.bundle.js +1 -0
- package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +2 -0
- package/storybook-static/{5.fa71488e730c5c7f885f.manager.bundle.js.LICENSE.txt → 4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt} +8 -8
- package/storybook-static/5.88fe62ee92ff5ca67829.manager.bundle.js +1 -0
- package/storybook-static/6.96d184f368dea006cb52.manager.bundle.js +2 -0
- package/storybook-static/{11.49c687eaa6261f8b7be2.manager.bundle.js.LICENSE.txt → 6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt} +12 -12
- package/storybook-static/{7.a806a38f.iframe.bundle.js → 7.5ec31f3702b08ab0b71c.manager.bundle.js} +1 -1
- package/storybook-static/7.69d2e532.iframe.bundle.js +1 -0
- package/storybook-static/8.5ce13be7612bd3a6b864.manager.bundle.js +1 -0
- package/storybook-static/8.68cd1217.iframe.bundle.js +3 -0
- package/storybook-static/{6.fbc7b90b.iframe.bundle.js.LICENSE.txt → 8.68cd1217.iframe.bundle.js.LICENSE.txt} +12 -12
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +1 -0
- package/storybook-static/9.488e3969.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +348 -138
- package/storybook-static/index.html +59 -47
- package/storybook-static/main.65cb2769.iframe.bundle.js +1 -0
- package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.6e2e1544.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.cc29f4c2175f187a3707.manager.bundle.js +1 -0
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js +3 -0
- package/storybook-static/{vendors~main.73411ca9.iframe.bundle.js.LICENSE.txt → vendors~main.d144d840.iframe.bundle.js.LICENSE.txt} +148 -148
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.d3455eed64b243c89325.manager.bundle.js.LICENSE.txt → vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt} +104 -88
- package/tools/build-styles.js +17 -0
- package/yarn-error.log +10910 -0
- package/src/components/Hawa/AdaptiveButton/index.js +0 -1
- package/src/components/Hawa/AutoCompleteField/index.js +0 -1
- package/src/components/Hawa/Checkbox/index.js +0 -1
- package/src/components/Hawa/DragDropImages/index.js +0 -1
- package/src/components/Hawa/HawaProvider/HawaProvider.js +0 -19
- package/src/components/Hawa/HawaProvider/index.js +0 -1
- package/src/components/Hawa/InputLabel/StyledInputLabel.jsx +0 -36
- package/src/components/Hawa/InputLabel/index.js +0 -1
- package/src/components/Hawa/RadioBox/index.js +0 -1
- package/src/components/Hawa/RadioSelector/index.js +0 -1
- package/src/components/Hawa/Row/Row.jsx +0 -23
- package/src/components/Hawa/Row/index.js +0 -1
- package/src/components/Hawa/SelectedField/index.js +0 -1
- package/src/components/Hawa/TabPanel/index.js +0 -1
- package/src/components/Hawa/TextArea/index.js +0 -1
- package/src/components/Hawa/TextField/TextField.jsx +0 -41
- package/src/components/Hawa/TextField/index.js +0 -1
- package/storybook-static/0.86a7edfd.iframe.bundle.js +0 -1
- package/storybook-static/0.b73eaee9a88f178d62ed.manager.bundle.js +0 -1
- package/storybook-static/1.f296d183a17268696d73.manager.bundle.js +0 -1
- package/storybook-static/10.9998ba67d65d81d20896.manager.bundle.js +0 -1
- package/storybook-static/11.49c687eaa6261f8b7be2.manager.bundle.js +0 -2
- package/storybook-static/12.c9538ed3766c96f289e7.manager.bundle.js +0 -1
- package/storybook-static/4.f6eb74f4.iframe.bundle.js +0 -3
- package/storybook-static/4.f6eb74f4.iframe.bundle.js.map +0 -1
- package/storybook-static/5.ec6f37af.iframe.bundle.js +0 -1
- package/storybook-static/5.fa71488e730c5c7f885f.manager.bundle.js +0 -2
- package/storybook-static/6.8096ae4aadde0743697b.manager.bundle.js +0 -1
- package/storybook-static/6.fbc7b90b.iframe.bundle.js +0 -3
- package/storybook-static/6.fbc7b90b.iframe.bundle.js.map +0 -1
- package/storybook-static/7.b34baecbd082bc7b188d.manager.bundle.js +0 -1
- package/storybook-static/8.15577edffecf900a8de2.manager.bundle.js +0 -1
- package/storybook-static/9.d7d85aa0a49a98f17218.manager.bundle.js +0 -1
- package/storybook-static/main.355ffc59.iframe.bundle.js +0 -1
- package/storybook-static/main.ce406c7e93b98325390e.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.3d81579b.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.909d038f912f063e8837.manager.bundle.js +0 -1
- package/storybook-static/vendors~main.73411ca9.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.73411ca9.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.d3455eed64b243c89325.manager.bundle.js +0 -2
|
@@ -1,100 +1,92 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
// const
|
|
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
|
-
// selectedColor: "blue",
|
|
95
|
-
// bdRadius: 12,
|
|
96
|
-
// defaultValue: "option2",
|
|
97
|
-
// bgSelectedColor: "red",
|
|
98
|
-
// textSelectedColor: "black"
|
|
99
|
-
// };
|
|
100
|
-
/****************************/
|
|
1
|
+
import { storiesOf } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import "../styles.css";
|
|
4
|
+
|
|
5
|
+
const stories = storiesOf("InputLabel", module);
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Components/InputLabel",
|
|
9
|
+
component: [
|
|
10
|
+
StyledCheckBox,
|
|
11
|
+
StyledTextFieldT,
|
|
12
|
+
StyledTextAreaT,
|
|
13
|
+
StyledRadioSeletorT
|
|
14
|
+
],
|
|
15
|
+
argTypes: {
|
|
16
|
+
resize: {
|
|
17
|
+
options: ["vertical", "horizontal", "both"],
|
|
18
|
+
control: { type: "radio" }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/****************************/
|
|
24
|
+
// STYLED CHECKBOX TEMPLATE
|
|
25
|
+
// const StyledCheckBoxTemplate = (args) => {
|
|
26
|
+
// const methods = useForm();
|
|
27
|
+
// return (
|
|
28
|
+
// <FormProvider {...methods}>
|
|
29
|
+
// <StyledCheckbox {...args} />
|
|
30
|
+
// </FormProvider>
|
|
31
|
+
// );
|
|
32
|
+
// };
|
|
33
|
+
// export const StyledCheckBox = StyledCheckBoxTemplate.bind({});
|
|
34
|
+
// StyledCheckBox.args = {
|
|
35
|
+
// name: "Components/InputLabel",
|
|
36
|
+
// label: "CheckBox",
|
|
37
|
+
// color: "blue",
|
|
38
|
+
// rules: { required: true },
|
|
39
|
+
// defaultValue: true
|
|
40
|
+
// };
|
|
41
|
+
/****************************/
|
|
42
|
+
|
|
43
|
+
/****************************/
|
|
44
|
+
// STYLED TextField TEMPLATE
|
|
45
|
+
// const StyledTextFieldTemplate = (args) => {
|
|
46
|
+
// const methods = useForm();
|
|
47
|
+
// return (
|
|
48
|
+
// <FormProvider {...methods}>
|
|
49
|
+
// <StyledTextField {...args} />
|
|
50
|
+
// </FormProvider>
|
|
51
|
+
// );
|
|
52
|
+
// };
|
|
53
|
+
|
|
54
|
+
// export const StyledTextFieldT = StyledTextFieldTemplate.bind({});
|
|
55
|
+
// StyledTextFieldT.args = {
|
|
56
|
+
// name: "Components/InputLabel",
|
|
57
|
+
// inputLabel: "Label",
|
|
58
|
+
// bdRadius: 12,
|
|
59
|
+
// bgColor: "lightgray",
|
|
60
|
+
// helperText: "This is HelperText",
|
|
61
|
+
// type: "text",
|
|
62
|
+
// placeholder: "exemple ..."
|
|
63
|
+
// };
|
|
64
|
+
|
|
65
|
+
/****************************/
|
|
66
|
+
// Radio Selector Template
|
|
67
|
+
// const styledRadioSelectorTempalte = (args) => {
|
|
68
|
+
// const methods = useForm();
|
|
69
|
+
|
|
70
|
+
// return (
|
|
71
|
+
// <FormProvider {...methods}>
|
|
72
|
+
// <StyledRadioSelector {...args} />
|
|
73
|
+
// </FormProvider>
|
|
74
|
+
// );
|
|
75
|
+
// };
|
|
76
|
+
|
|
77
|
+
// export const StyledRadioSeletorT = styledRadioSelectorTempalte.bind({});
|
|
78
|
+
// StyledRadioSeletorT.args = {
|
|
79
|
+
// name: "Components/InputLabel",
|
|
80
|
+
// shouldUnregister: true,
|
|
81
|
+
// options: [
|
|
82
|
+
// { text: "Option 1", label: "option1" },
|
|
83
|
+
// { text: "Option 2", label: "option2" },
|
|
84
|
+
// { text: "Option 3", label: "option3" }
|
|
85
|
+
// ],
|
|
86
|
+
// selectedColor: "blue",
|
|
87
|
+
// bdRadius: 12,
|
|
88
|
+
// defaultValue: "option2",
|
|
89
|
+
// bgSelectedColor: "red",
|
|
90
|
+
// textSelectedColor: "black"
|
|
91
|
+
// };
|
|
92
|
+
/****************************/
|
|
@@ -0,0 +1,211 @@
|
|
|
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>{`
|
|
14
|
+
.subheading {
|
|
15
|
+
--mediumdark: '#999999';
|
|
16
|
+
font-weight: 900;
|
|
17
|
+
font-size: 13px;
|
|
18
|
+
color: #999;
|
|
19
|
+
letter-spacing: 6px;
|
|
20
|
+
line-height: 24px;
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
margin-bottom: 12px;
|
|
23
|
+
margin-top: 40px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link-list {
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: 1fr;
|
|
29
|
+
grid-template-rows: 1fr 1fr;
|
|
30
|
+
row-gap: 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (min-width: 620px) {
|
|
34
|
+
.link-list {
|
|
35
|
+
row-gap: 20px;
|
|
36
|
+
column-gap: 20px;
|
|
37
|
+
grid-template-columns: 1fr 1fr;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media all and (-ms-high-contrast:none) {
|
|
42
|
+
.link-list {
|
|
43
|
+
display: -ms-grid;
|
|
44
|
+
-ms-grid-columns: 1fr 1fr;
|
|
45
|
+
-ms-grid-rows: 1fr 1fr;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.link-item {
|
|
50
|
+
display: block;
|
|
51
|
+
padding: 20px 30px 20px 15px;
|
|
52
|
+
border: 1px solid #00000010;
|
|
53
|
+
border-radius: 5px;
|
|
54
|
+
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
55
|
+
color: #333333;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.link-item:hover {
|
|
61
|
+
border-color: #1EA7FD50;
|
|
62
|
+
transform: translate3d(0, -3px, 0);
|
|
63
|
+
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.link-item:active {
|
|
67
|
+
border-color: #1EA7FD;
|
|
68
|
+
transform: translate3d(0, 0, 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.link-item strong {
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
display: block;
|
|
74
|
+
margin-bottom: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.link-item img {
|
|
78
|
+
height: 40px;
|
|
79
|
+
width: 40px;
|
|
80
|
+
margin-right: 15px;
|
|
81
|
+
flex: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.link-item span {
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
line-height: 20px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tip {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
border-radius: 1em;
|
|
92
|
+
font-size: 11px;
|
|
93
|
+
line-height: 12px;
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
background: #E7FDD8;
|
|
96
|
+
color: #66BF3C;
|
|
97
|
+
padding: 4px 12px;
|
|
98
|
+
margin-right: 10px;
|
|
99
|
+
vertical-align: top;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.tip-wrapper {
|
|
103
|
+
font-size: 13px;
|
|
104
|
+
line-height: 20px;
|
|
105
|
+
margin-top: 40px;
|
|
106
|
+
margin-bottom: 40px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.tip-wrapper code {
|
|
110
|
+
font-size: 12px;
|
|
111
|
+
display: inline-block;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
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>
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyledRadioSelector } from "../
|
|
3
|
-
import { HawaProvider } from "../
|
|
4
|
-
import "../styles.css";
|
|
5
|
-
|
|
6
|
-
const Template = (args) => {
|
|
7
|
-
const theme = {
|
|
8
|
-
borderRadius: 5,
|
|
9
|
-
primaryColor: "green",
|
|
10
|
-
secondaryColor: "red",
|
|
11
|
-
// margins: "10px",
|
|
12
|
-
paddings: 10
|
|
13
|
-
};
|
|
14
|
-
return (
|
|
15
|
-
<HawaProvider theme={theme}>
|
|
16
|
-
<StyledRadioSelector {...args} />
|
|
17
|
-
</HawaProvider>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export default {
|
|
21
|
-
title: "Components/RadioSelector",
|
|
22
|
-
component: Light,
|
|
23
|
-
argTypes: {
|
|
24
|
-
options: {
|
|
25
|
-
control: "array"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
args: {
|
|
29
|
-
options: [
|
|
30
|
-
{ text: "Option 1", label: "option1" },
|
|
31
|
-
{ text: "Option 2", label: "option2" },
|
|
32
|
-
{ text: "Option 3", label: "option3" }
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const Light = Template.bind({});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{ text: "Option
|
|
43
|
-
{ text: "Option
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
Dark.args = {
|
|
56
|
-
options: [
|
|
57
|
-
{ text: "Option 1", label: "option1" },
|
|
58
|
-
{ text: "Option 2", label: "option2" },
|
|
59
|
-
{ text: "Option 3", label: "option3" }
|
|
60
|
-
],
|
|
61
|
-
selectedColor: "blue",
|
|
62
|
-
borderRadius: 12,
|
|
63
|
-
defaultValue: "option2",
|
|
64
|
-
bgSelectedColor: "blue",
|
|
65
|
-
textSelectedColor: "white",
|
|
66
|
-
handleChange: () => {
|
|
67
|
-
console.log("handleChange goes here");
|
|
68
|
-
}
|
|
69
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyledRadioSelector } from "../ui";
|
|
3
|
+
import { HawaProvider } from "../themes/HawaProvider";
|
|
4
|
+
import "../styles.css";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
const theme = {
|
|
8
|
+
borderRadius: 5,
|
|
9
|
+
primaryColor: "green",
|
|
10
|
+
secondaryColor: "red",
|
|
11
|
+
// margins: "10px",
|
|
12
|
+
paddings: 10
|
|
13
|
+
};
|
|
14
|
+
return (
|
|
15
|
+
<HawaProvider theme={theme}>
|
|
16
|
+
<StyledRadioSelector {...args} />
|
|
17
|
+
</HawaProvider>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export default {
|
|
21
|
+
title: "Components/RadioSelector",
|
|
22
|
+
component: Light,
|
|
23
|
+
argTypes: {
|
|
24
|
+
options: {
|
|
25
|
+
control: "array"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
args: {
|
|
29
|
+
options: [
|
|
30
|
+
{ text: "Option 1", label: "option1" },
|
|
31
|
+
{ text: "Option 2", label: "option2" },
|
|
32
|
+
{ text: "Option 3", label: "option3" }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const Light = Template.bind({});
|
|
38
|
+
|
|
39
|
+
Light.args = {
|
|
40
|
+
options: [
|
|
41
|
+
{ text: "Option 1", label: "option1" },
|
|
42
|
+
{ text: "Option 2", label: "option2" },
|
|
43
|
+
{ text: "Option 3", label: "option3" }
|
|
44
|
+
],
|
|
45
|
+
selectedColor: "blue",
|
|
46
|
+
borderRadius: 12,
|
|
47
|
+
defaultValue: "option2",
|
|
48
|
+
bgSelectedColor: "red",
|
|
49
|
+
textSelectedColor: "white",
|
|
50
|
+
handleChange: () => {
|
|
51
|
+
console.log("handleChange goes here");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export const Dark = Template.bind({});
|
|
55
|
+
Dark.args = {
|
|
56
|
+
options: [
|
|
57
|
+
{ text: "Option 1", label: "option1" },
|
|
58
|
+
{ text: "Option 2", label: "option2" },
|
|
59
|
+
{ text: "Option 3", label: "option3" }
|
|
60
|
+
],
|
|
61
|
+
selectedColor: "blue",
|
|
62
|
+
borderRadius: 12,
|
|
63
|
+
defaultValue: "option2",
|
|
64
|
+
bgSelectedColor: "blue",
|
|
65
|
+
textSelectedColor: "white",
|
|
66
|
+
handleChange: () => {
|
|
67
|
+
console.log("handleChange goes here");
|
|
68
|
+
}
|
|
69
|
+
};
|
|
@@ -1,59 +1,50 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyledTextField } from "../
|
|
3
|
-
import "../styles.css";
|
|
4
|
-
|
|
5
|
-
const Template = (args) => {
|
|
6
|
-
return <StyledTextField {...args} />;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: "Components/TextField",
|
|
11
|
-
component:
|
|
12
|
-
argsTypes: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
control: { type: "
|
|
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
|
-
padding: 10
|
|
52
|
-
};
|
|
53
|
-
Dark.args = {
|
|
54
|
-
placeholder: "Exemple ...",
|
|
55
|
-
defaultValue: "This is default value",
|
|
56
|
-
inputLabel: "Text Field",
|
|
57
|
-
bgColor: "lightgray",
|
|
58
|
-
padding: 10
|
|
59
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyledTextField } from "../ui";
|
|
3
|
+
import "../styles.css";
|
|
4
|
+
|
|
5
|
+
const Template = (args) => {
|
|
6
|
+
return <StyledTextField {...args} />;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Components/TextField",
|
|
11
|
+
component: StyledTextField,
|
|
12
|
+
argsTypes: {
|
|
13
|
+
type: {
|
|
14
|
+
name: "type",
|
|
15
|
+
type: { name: "string", required: true },
|
|
16
|
+
options: ["text", "number", "date"],
|
|
17
|
+
control: { type: "radio" },
|
|
18
|
+
defaultValue: "text",
|
|
19
|
+
description: "Styled Text Field",
|
|
20
|
+
table: {
|
|
21
|
+
type: { summary: "string" },
|
|
22
|
+
defaultValue: { summary: "Hello" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
// args: {
|
|
27
|
+
// bdRadius: 15,
|
|
28
|
+
// defaultValue: "Test",
|
|
29
|
+
// type: "date"
|
|
30
|
+
// }
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const Light = Template.bind({});
|
|
34
|
+
export const Dark = Template.bind({});
|
|
35
|
+
|
|
36
|
+
Light.args = {
|
|
37
|
+
placeholder: "Exemple ...",
|
|
38
|
+
defaultValue: "This isko default value",
|
|
39
|
+
inputLabel: "Text Field",
|
|
40
|
+
bgColor: "lightgray",
|
|
41
|
+
padding: 10
|
|
42
|
+
// type: "number"
|
|
43
|
+
};
|
|
44
|
+
Dark.args = {
|
|
45
|
+
placeholder: "Exemple ...",
|
|
46
|
+
defaultValue: "This is default value",
|
|
47
|
+
inputLabel: "Text Field",
|
|
48
|
+
bgColor: "lightgray",
|
|
49
|
+
padding: 10
|
|
50
|
+
};
|