@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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Hawa Publish Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
- uses: actions/setup-node@v2
|
|
16
|
+
with:
|
|
17
|
+
node-version: 16
|
|
18
|
+
- run: |
|
|
19
|
+
if [ -e 'package-lock.json' ]; then
|
|
20
|
+
npm ci
|
|
21
|
+
else
|
|
22
|
+
npm install
|
|
23
|
+
fi
|
|
24
|
+
#- run: npm test
|
|
25
|
+
|
|
26
|
+
publish-npm:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v2
|
|
31
|
+
- uses: actions/setup-node@v2
|
|
32
|
+
with:
|
|
33
|
+
node-version: 16
|
|
34
|
+
registry-url: https://registry.npmjs.org/
|
|
35
|
+
- run: |
|
|
36
|
+
if [ -e 'package-lock.json' ]; then
|
|
37
|
+
npm ci
|
|
38
|
+
else
|
|
39
|
+
npm install
|
|
40
|
+
fi
|
|
41
|
+
- run: npm run build-lib
|
|
42
|
+
- run: npm run build:styles
|
|
43
|
+
- run: npm publish
|
|
44
|
+
env:
|
|
45
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Hawa Publish Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
- uses: actions/setup-node@v2
|
|
16
|
+
with:
|
|
17
|
+
node-version: 16
|
|
18
|
+
- run: |
|
|
19
|
+
if [ -e 'package-lock.json' ]; then
|
|
20
|
+
npm ci
|
|
21
|
+
else
|
|
22
|
+
npm install
|
|
23
|
+
fi
|
|
24
|
+
#- run: npm test
|
|
25
|
+
|
|
26
|
+
publish-npm:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v2
|
|
31
|
+
- uses: actions/setup-node@v2
|
|
32
|
+
with:
|
|
33
|
+
node-version: 16
|
|
34
|
+
registry-url: https://registry.npmjs.org/
|
|
35
|
+
- run: |
|
|
36
|
+
if [ -e 'package-lock.json' ]; then
|
|
37
|
+
npm ci
|
|
38
|
+
else
|
|
39
|
+
npm install
|
|
40
|
+
fi
|
|
41
|
+
- run: npm run build-lib
|
|
42
|
+
- run: npm run build:styles
|
|
43
|
+
- run: npm publish
|
|
44
|
+
env:
|
|
45
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.prettierrc
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"semi": false,
|
|
3
|
-
"overrides": [
|
|
4
|
-
{
|
|
5
|
-
"files": ["*.jsx", "*.js"],
|
|
6
|
-
"options": {
|
|
7
|
-
"arrowParens": "always",
|
|
8
|
-
"bracketSpacing": true,
|
|
9
|
-
"endOfLine": "lf",
|
|
10
|
-
"htmlWhitespaceSensitivity": "css",
|
|
11
|
-
"insertPragma": false,
|
|
12
|
-
"jsxBracketSameLine": false,
|
|
13
|
-
"jsxSingleQuote": false,
|
|
14
|
-
"printWidth": 80,
|
|
15
|
-
"proseWrap": "preserve",
|
|
16
|
-
"quoteProps": "as-needed",
|
|
17
|
-
"requirePragma": false,
|
|
18
|
-
"semi": true,
|
|
19
|
-
"singleQuote": false,
|
|
20
|
-
"tabWidth": 2,
|
|
21
|
-
"trailingComma": "none",
|
|
22
|
-
"useTabs": false,
|
|
23
|
-
"vueIndentScriptAndStyle": false,
|
|
24
|
-
"parser": "babel"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"semi": false,
|
|
3
|
+
"overrides": [
|
|
4
|
+
{
|
|
5
|
+
"files": ["*.jsx", "*.js"],
|
|
6
|
+
"options": {
|
|
7
|
+
"arrowParens": "always",
|
|
8
|
+
"bracketSpacing": true,
|
|
9
|
+
"endOfLine": "lf",
|
|
10
|
+
"htmlWhitespaceSensitivity": "css",
|
|
11
|
+
"insertPragma": false,
|
|
12
|
+
"jsxBracketSameLine": false,
|
|
13
|
+
"jsxSingleQuote": false,
|
|
14
|
+
"printWidth": 80,
|
|
15
|
+
"proseWrap": "preserve",
|
|
16
|
+
"quoteProps": "as-needed",
|
|
17
|
+
"requirePragma": false,
|
|
18
|
+
"semi": true,
|
|
19
|
+
"singleQuote": false,
|
|
20
|
+
"tabWidth": 2,
|
|
21
|
+
"trailingComma": "none",
|
|
22
|
+
"useTabs": false,
|
|
23
|
+
"vueIndentScriptAndStyle": false,
|
|
24
|
+
"parser": "babel"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/README.md
CHANGED
|
@@ -1,119 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://xakher-images.s3.ap-southeast-1.amazonaws.com/hawa-logo.png" alt="Hawa | هواء" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Hawa | هواء
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@sikka/hawa)
|
|
8
|
+
[](https://www.npmjs.com/package/@sikka/hawa)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
> Opinionated UI Kit for web apps and websites.
|
|
13
|
+
|
|
14
|
+
# Concept
|
|
15
|
+
|
|
16
|
+
### Components
|
|
17
|
+
|
|
18
|
+
The smallest elements of this UI kit are the typical low-level components. Examples of components:
|
|
19
|
+
|
|
20
|
+
- InputField
|
|
21
|
+
- Checkboxes
|
|
22
|
+
- Modal
|
|
23
|
+
- Drag-Drop Image(s)
|
|
24
|
+
- Button
|
|
25
|
+
- etc ...
|
|
26
|
+
|
|
27
|
+
### Blocks
|
|
28
|
+
|
|
29
|
+
Blocks are commonly used collection of components. Examples of blocks:
|
|
30
|
+
|
|
31
|
+
- Sign-In
|
|
32
|
+
- Sign-Up
|
|
33
|
+
- Reset Password
|
|
34
|
+
- SaaS Pricing Plans
|
|
35
|
+
- Payment Methods Block (to list saved methods)
|
|
36
|
+
- Account Block (to edit account info)
|
|
37
|
+
- etc ...
|
|
38
|
+
|
|
39
|
+
### Boxes
|
|
40
|
+
|
|
41
|
+
Most components and blocks will live inside **boxes**. Windows can show anything. It can show a video, image, form, iFrame, etc. Boxes make out the layout of your website or application. Boxes can be arranged in different layouts
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="https://user-images.githubusercontent.com/46135573/143972102-0c104239-b8f6-4a7b-9aad-54f6d91a8906.png" alt="layout-types" />
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
Points
|
|
48
|
+
|
|
49
|
+
- The content inside each box can be scrollable (vertical/horizontal/Both) with one prop
|
|
50
|
+
- you can control the spacing of the content inside each box with one prop
|
|
51
|
+
- you can also control the spacing of all the box in the layout
|
|
52
|
+
- some boxes can float (animation of open and close modal)
|
|
53
|
+
- some boxes can go full screen (animation to transition)
|
|
54
|
+
|
|
55
|
+
### Utilities
|
|
56
|
+
|
|
57
|
+
- [x] **getTextColor(bgColor)**
|
|
58
|
+
determine if text should be black or white based on the contrast of `bgColor`
|
|
59
|
+
|
|
60
|
+
- [ ] **darkenColor(color,percent)**
|
|
61
|
+
darken a given `color` by a given `percent`
|
|
62
|
+
|
|
63
|
+
- [ ] **lightenColor(color,percent)**
|
|
64
|
+
lighten a given `color` by a given `percent`
|
|
65
|
+
|
|
66
|
+
# Features
|
|
67
|
+
|
|
68
|
+
- [ ] Change borders and margin, padding in one place
|
|
69
|
+
- [ ] Drag and drop tool to create a layout of boxes
|
|
70
|
+
|
|
71
|
+
## Components
|
|
72
|
+
|
|
73
|
+
- [ ] Layout
|
|
74
|
+
- [ ] Box
|
|
75
|
+
- [ ] TextField
|
|
76
|
+
- [ ] TextArea
|
|
77
|
+
- [ ] Radio Selector
|
|
78
|
+
- [ ] PasswordField
|
|
79
|
+
- [ ] Autocomplete
|
|
80
|
+
- [ ] Tabs
|
|
81
|
+
- [ ] Alerts
|
|
82
|
+
- [ ] Badges
|
|
83
|
+
|
|
84
|
+
## Install
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
|
|
88
|
+
npm install --save @sikka/hawa
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Usage
|
|
93
|
+
|
|
94
|
+
```jsx
|
|
95
|
+
//example coming soon inshallah
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Contributing
|
|
99
|
+
|
|
100
|
+
To contribute, clone this github repository and run the development server
|
|
101
|
+
|
|
102
|
+
- clone repository
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone git@github.com:sikka-software/hawa.git
|
|
106
|
+
cd hawa
|
|
107
|
+
npm install
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## TESTING
|
|
111
|
+
|
|
112
|
+
- Run development server
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
git clone git@github.com:sikka-software/hawa.git
|
|
116
|
+
cd hawa
|
|
117
|
+
npm install
|
|
118
|
+
npm run storybook
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
- Edit **Hawa/src/stories/Hawa.stories.js\_** file
|
|
122
|
+
|
|
123
|
+
- Add your custom testing component in **Hawa.stories.js** file
|
|
124
|
+
|
|
125
|
+
- Or you can preview without running development server. [See Preview](https://sikka-software.github.io/Hawa/storybook-static/)
|
|
126
|
+
|
|
127
|
+
```jsx
|
|
128
|
+
//example coming soon inshallah
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Deployment
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm run build-storybook
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Publishing (Admin)
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm version [major | minor | patch]
|
|
141
|
+
npm run build-lib
|
|
142
|
+
npm publish --access public
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
<!-- https://github.com/react-component/drawer -->
|
|
148
|
+
|
|
149
|
+
MIT © [SIKKA SOFTWARE](https://sikka.sa)
|