@sikka/hawa 0.0.2 → 0.0.5
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 -148
- package/es/index.es.js +1 -0
- package/lib/index.js +1 -0
- package/package.json +62 -47
- package/rollup.config.js +30 -30
- 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 +24 -0
- package/src/blocks/AuthForms/ResetPasswordForm.js +13 -0
- package/src/blocks/AuthForms/SignInForm.js +55 -0
- package/src/blocks/AuthForms/SignUpForm.js +68 -0
- package/src/{components/Hawa → blocks}/AuthForms/index.js +4 -4
- package/src/blocks/Payment/CreditCardForm.js +31 -0
- package/src/blocks/Payment/Form/CForm.js +328 -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/Payment/SelectPayment.js +95 -0
- package/src/blocks/Payment/index.js +16 -0
- package/src/index.js +4 -1
- package/src/layout/Box.js +39 -0
- package/src/layout/index.js +1 -0
- package/src/stories/ActionButton.stories.js +53 -0
- package/src/stories/AdaptiveButton.stories.js +80 -80
- package/src/stories/Alert.stories.js +41 -48
- package/src/stories/BlocksStories/AuthForm.stories.js +99 -0
- package/src/stories/BlocksStories/PaymentForm.stories.js +111 -0
- package/src/stories/BlocksStories/UserAccount.stories.js +46 -0
- package/src/stories/CheckBox.stories.js +35 -34
- package/src/stories/GlobalVariables.stories.js +44 -108
- package/src/stories/HawaProvider.stories.js +22 -23
- package/src/stories/InputLabel.stories.js +92 -100
- package/src/stories/Introduction.stories.js +211 -0
- package/src/stories/LayoutStories/Box.stories.js +56 -0
- package/src/stories/RadioSelector.stories.js +69 -69
- package/src/stories/TextField.stories.js +50 -50
- package/src/styles.css +400 -400
- package/src/styles.scss +679 -0
- package/src/themes/HawaProvider.js +87 -0
- package/src/ui/ActionButton.js +40 -0
- package/src/{components/Hawa/AdaptiveButton → ui}/AdaptiveButton.js +252 -254
- package/src/ui/ApplePayButton.js +94 -0
- package/src/{components/Hawa/AutoCompleteField/AutoCompleteField.jsx → ui/AutoCompleteField.js} +32 -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/ui/GithubButton.js +91 -0
- package/src/ui/GoogleButton.js +83 -0
- package/src/ui/GooglePayButton.js +94 -0
- package/src/{components/Hawa/Hawa.jsx → ui/Hawa.js} +3 -3
- package/src/ui/HawaInputLabel.js +33 -0
- package/src/{components/Hawa/TextArea/TextArea.jsx → ui/HawaTextArea.js} +38 -38
- package/src/ui/HawaTextField.js +118 -0
- package/src/ui/MadaButton.js +94 -0
- package/src/ui/PayPalButton.js +94 -0
- 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/{components/Hawa/Row/Row.jsx → ui/Row.js} +21 -21
- package/src/ui/STCPayButton.js +94 -0
- package/src/{components/Hawa/SelectedField/SelectedField.jsx → ui/SelectedField.js} +46 -46
- package/src/ui/StyledAlert.js +30 -0
- package/src/{components/Hawa/StyledTooltip → ui}/StyledTooltip.js +46 -46
- package/src/{components/Hawa/TabPanel/TabPanel.jsx → ui/TabPanel.js} +37 -37
- package/src/ui/TwitterButton.js +84 -0
- package/src/ui/VisaMasterButton.js +94 -0
- package/src/ui/WalletButton.js +91 -0
- package/src/ui/index.js +22 -0
- package/src/util.js +20 -20
- package/storybook-static/0.54f7e52e.iframe.bundle.js +1 -0
- package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +1 -0
- package/storybook-static/1.95be85dd.iframe.bundle.js +3 -0
- package/storybook-static/{1.7c0dc86d.iframe.bundle.js.LICENSE.txt → 1.95be85dd.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/1.95be85dd.iframe.bundle.js.map +1 -0
- package/storybook-static/2.eb601582.iframe.bundle.js +1 -0
- package/storybook-static/{3.592ce28f.iframe.bundle.js → 3.d72f7fac.iframe.bundle.js} +0 -0
- package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +2 -0
- package/storybook-static/{5.f459d151315e6780c20f.manager.bundle.js.LICENSE.txt → 4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/5.63ab4f94d50a3acf080d.manager.bundle.js +1 -0
- package/storybook-static/6.a6d45262f7e98f3f18d3.manager.bundle.js +2 -0
- package/storybook-static/{11.f4e922583ae35da460f3.manager.bundle.js.LICENSE.txt → 6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/{7.3d04765dbf3f1dcd706c.manager.bundle.js → 7.097710753af9a1c41b80.manager.bundle.js} +1 -1
- package/storybook-static/7.ffb0d84b.iframe.bundle.js +1 -0
- package/storybook-static/{8.8e2132ec.iframe.bundle.js → 8.68cd1217.iframe.bundle.js} +2 -2
- package/storybook-static/{8.8e2132ec.iframe.bundle.js.LICENSE.txt → 8.68cd1217.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +1 -0
- package/storybook-static/8.76c3cbf398692028e834.manager.bundle.js +1 -0
- package/storybook-static/{9.109ea555.iframe.bundle.js → 9.488e3969.iframe.bundle.js} +0 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +9 -1
- package/storybook-static/main.044648aa.iframe.bundle.js +1 -0
- package/storybook-static/main.ac6e4b72b033097dad76.manager.bundle.js +1 -0
- package/storybook-static/{runtime~main.ffc8677e.iframe.bundle.js → runtime~main.3e280e98.iframe.bundle.js} +1 -1
- package/storybook-static/runtime~main.c8dac23bc753439736f0.manager.bundle.js +1 -0
- package/storybook-static/vendors~main.a697e07137d366f95f76.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.a935f15a2179a6eff5fd.manager.bundle.js.LICENSE.txt → vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt} +6 -12
- package/storybook-static/vendors~main.d75dc38b.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.4aa936b1.iframe.bundle.js.LICENSE.txt → vendors~main.d75dc38b.iframe.bundle.js.LICENSE.txt} +3 -45
- package/storybook-static/vendors~main.d75dc38b.iframe.bundle.js.map +1 -0
- package/tools/build-styles.js +17 -0
- package/dist/index.es.js +0 -37
- package/dist/index.js +0 -37
- package/src/components/Hawa/AdaptiveButton/index.js +0 -1
- package/src/components/Hawa/AuthForms/NewPasswordForm.js +0 -23
- package/src/components/Hawa/AuthForms/ResetPasswordForm.js +0 -21
- package/src/components/Hawa/AuthForms/SignInForm.js +0 -25
- package/src/components/Hawa/AuthForms/SignUpForm.js +0 -26
- package/src/components/Hawa/AuthForms/viaFacebook.js +0 -0
- package/src/components/Hawa/AuthForms/viaGithub.js +0 -0
- package/src/components/Hawa/AuthForms/viaGoogle.js +0 -0
- package/src/components/Hawa/AuthForms/viaTwitter.js +0 -0
- package/src/components/Hawa/AutoCompleteField/index.js +0 -1
- package/src/components/Hawa/Box/Box.js +0 -18
- package/src/components/Hawa/Box/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.js +0 -15
- 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/index.js +0 -1
- package/src/components/Hawa/SelectedField/index.js +0 -1
- package/src/components/Hawa/StyledAlert/StyledAlert.js +0 -15
- package/src/components/Hawa/StyledAlert/index.js +0 -1
- package/src/components/Hawa/StyledTooltip/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.js +0 -54
- package/src/components/Hawa/TextField/index.js +0 -1
- package/src/components/Hawa/index.js +0 -10
- package/src/stories/AuthForm.stories.js +0 -76
- package/src/stories/Box.stories.js +0 -45
- package/storybook-static/0.12392f0b.iframe.bundle.js +0 -1
- package/storybook-static/0.55b012452099ace2dca6.manager.bundle.js +0 -1
- package/storybook-static/1.0f38715c61c7c3cd11db.manager.bundle.js +0 -1
- package/storybook-static/1.7c0dc86d.iframe.bundle.js +0 -3
- package/storybook-static/1.7c0dc86d.iframe.bundle.js.map +0 -1
- package/storybook-static/10.9f2923a7561bc20fffdb.manager.bundle.js +0 -1
- package/storybook-static/11.f4e922583ae35da460f3.manager.bundle.js +0 -2
- package/storybook-static/12.1415460941f0bdcb8fa8.manager.bundle.js +0 -1
- package/storybook-static/2.ee357266.iframe.bundle.js +0 -1
- package/storybook-static/5.f459d151315e6780c20f.manager.bundle.js +0 -2
- package/storybook-static/6.3bd64d820f3745f262ff.manager.bundle.js +0 -1
- package/storybook-static/7.af56919f.iframe.bundle.js +0 -1
- package/storybook-static/8.8e2132ec.iframe.bundle.js.map +0 -1
- package/storybook-static/8.b541eadfcb9164835dfc.manager.bundle.js +0 -1
- package/storybook-static/9.411ac8e451bbb10926c7.manager.bundle.js +0 -1
- package/storybook-static/main.78b7d418.iframe.bundle.js +0 -1
- package/storybook-static/main.9bb085ebb152f5b19a2a.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.9468098d21070636985f.manager.bundle.js +0 -1
- package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.a935f15a2179a6eff5fd.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,148 +1,149 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- Sign-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
- you can
|
|
51
|
-
-
|
|
52
|
-
- some boxes can
|
|
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
|
-
npm
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
npm
|
|
141
|
-
npm
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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)
|
package/es/index.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{createContext as t,useContext as o}from"react";import r from"@mui/material/Button";import n,{jsx as i,jsxs as a,Fragment as l}from"react/jsx-runtime";import{darken as d,styled as c,alpha as u}from"@mui/material/styles";import s from"@mui/material/InputBase";import p from"prop-types";import f from"@mui/material/InputLabel";import h from"@mui/material/utils";function m(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function b(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){g(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function g(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var y=t({borderRadius:10,primaryColor:"blue",secondaryColor:"grey",primaryActionColor:"grey",secondaryActionColor:"#4cc9f0",layoutColor:"#d3d4d9",textColor:"black",inputColor:"white",lightBackground:"#FBF5F3",darkBackground:"#0F0E0E",margins:10,paddings:10,allBorderRadius:10,actionButton:{primary:{borderRadius:10,backgroundColor:"#f90900",color:"white",margin:10,padding:10},secondary:{borderRadius:10,margin:10,padding:10,backgroundColor:"#FF8811",color:"black"}},layout:{primary:{backgroundColor:"#d3d4d9",color:"black",margin:10,padding:10,borderRadius:10},secondary:{backgroundColor:"#001E3C",color:"white",margin:10,padding:10,borderRadius:10}},inputFields:{primary:{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",borderRadius:10},secondary:{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",borderRadius:10}}}),v=function(e){var t,n=o(y),a=Object.keys(n.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())})),l={};a?l=b(b({},n.actionButton[a]),{},{margin:e.last?0:n.actionButton[a].margin,marginTop:e.last?2*n.actionButton[a].margin:0,"&:hover":{backgroundColor:d(null===(t=n.actionButton[a])||void 0===t?void 0:t.backgroundColor,.1)}}):l={backgroundColor:"black",color:"white",padding:10,marginTop:e.last?20:0};var u=c(r)((function(e){return e.theme,b({},l)}));return i(u,b(b({},e),{},{children:e.text}))},C=function(e){var t=o(y),r={};console.log(Object.keys(t.actionButton));var n=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));return r=n?{margin:15,marginRight:5,marginLeft:5,color:t.layout[n].color}:{margin:15,marginRight:0,marginLeft:0,color:"black"},i(f,{style:r,children:i("div",{style:{fontSize:15},children:e.label})})},k=function(e){var t=o(y),r=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())})),n={};n=r?b(b({},t.inputFields[r]),{},{margin:e.last?0:t.inputFields[r].margin,marginTop:e.last?2*t.inputFields[r].margin:0}):{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start"};var d=c(s)((function(e){var t=e.theme;return{"& .MuiInputBase-input":b({backgroundColor:"light"===t.palette.mode?"#fcfcfb":"#2b2b2b",transition:t.transitions.create(["border-color","background-color","box-shadow"]),"&:focus":{boxShadow:"".concat(u(t.palette.primary.main,.25)," 0 0 0 0.2rem"),borderColor:t.palette.primary.main},borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,padding:"10px 12px"},n)}}));return a(l,{children:[e.inputLabel?i(C,{themeType:e.themeType,label:e.inputLabel}):null,i(d,{fullWidth:!0,"aria-label":"dws"})]})};k.propTypes={type:p.oneOf(["text","number"]),helperText:p.string};var x,w=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.layout[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.layout[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"}),i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},T={},j={exports:{}};(x=j).exports=function(e){return e&&e.__esModule?e:{default:e}},x.exports.__esModule=!0,x.exports.default=x.exports;var O={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=h}(O);var L=j.exports;Object.defineProperty(T,"__esModule",{value:!0});var R=T.default=void 0;!function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=B(t);if(o&&o.has(e))return o.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,o&&o.set(e,r)}(e);var P=n;function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(B=function(e){return e?o:t})(e)}var S=(0,L(O).default)((0,P.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");R=T.default=S;var I=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i(R,{}),i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},M={},D=j.exports;Object.defineProperty(M,"__esModule",{value:!0});var z=M.default=void 0;!function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=F(t);if(o&&o.has(e))return o.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,o&&o.set(e,r)}(e);var W=n;function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(F=function(e){return e?o:t})(e)}var A=(0,D(O).default)((0,W.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"}),"Twitter");z=M.default=A;var _=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.layout[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.layout[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i(z,{}),i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},G=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},E=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:30})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},U=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:30})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},N=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:30})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},H=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},V=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:30})," ",i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},q={},J=j.exports;Object.defineProperty(q,"__esModule",{value:!0});var K=q.default=void 0,Q=n,X=(0,J(O).default)((0,Q.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),"AccountBalanceWallet");K=q.default=X;var Y=function(e){var t=o(y),n={};console.log(Object.keys(t.actionButton));var l=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));n=l?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:t.actionButton[l].margin,border:e.outlined?"2px solid black":"none",borderRadius:t.actionButton[l].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:t.margins,border:e.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var u=c(r)((function(e){var t=e.theme;return b(b({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},n),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return a(u,{onClick:e.handleClick,children:[i(K,{}),i("div",{style:{width:10}}),i("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]})},Z=function(e){var t=o(y),r={};console.log(Object.keys(t.actionButton));var n=Object.keys(t.actionButton).find((function(t){var o;return t.toLowerCase()===(null===(o=e.themeType)||void 0===o?void 0:o.toLowerCase())}));return r=n?b(b({display:"flex",flexDirection:"column"},t.layout[n]),{},{backgroundColor:e.noColor?"none":t.layout[n].backgroundColor,padding:e.noPadding?0:t.layout[n].padding,margin:e.noMargin?0:t.layout[n].margin,maxWidth:e.maxWidth}):{display:"flex",flexDirection:"column",color:"white",marginTop:e.last?20:0,backgroundColor:e.noColor?"none":"lightGrey",padding:e.noPadding?0:10,margin:e.noMargin?0:10,maxWidth:e.maxWidth,borderRadius:0},i("div",{style:r,children:e.children})},$=function(e){return a(Z,{maxWidth:400,children:[i(C,{type:"text",inputLabel:"First Name"}),i(C,{type:"text",inputLabel:"Last Name"}),i(C,{type:"email",inputLabel:"Email"}),i(C,{type:"password",inputLabel:"Password"}),i(v,{last:!0,text:"Update Account"})]})},ee=function(e){return a(Z,{maxWidth:400,children:[i(k,{type:"text",inputLabel:"First Name"}),i(k,{type:"text",inputLabel:"Last Name"}),i(k,{type:"email",inputLabel:"Email"}),i(k,{type:"password",inputLabel:"Password"}),i(v,{last:!0,text:"Update Account"})]})},te=function(e){return o(y),i(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:a(Z,{themeType:e.theme,noMargin:!0,children:[i(k,{themeType:e.theme,type:"password",inputLabel:"Password"}),i(k,{themeType:e.theme,type:"password",inputLabel:"Confirm Password"}),i(v,{themeType:e.theme,last:!0,text:"Reset Password"})]})})},oe=function(e){return i(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:a(Z,{themeType:e.theme,noMargin:!0,children:[i(k,{themeType:e.theme,type:"text",inputLabel:"Email"}),i(v,{themeType:e.theme,last:!0,text:"Reset Password"})]})})},re=function(e){return a(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[a(Z,{themeType:e.theme,noMargin:!0,children:[i(k,{themeType:e.theme,type:"text",inputLabel:"Email"}),i(k,{themeType:e.theme,type:"text",inputLabel:"Password"}),i(k,{themeType:e.theme,type:"text",inputLabel:"Confirm Password"}),i(v,{text:"Sign Up",last:!0,themeType:e.theme,onClick:e.handleSignUp})]}),e.viaGoogle&&i(w,{outlined:!0,themeType:e.theme,buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&i(I,{outlined:!0,themeType:e.theme,buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignUp}),e.viaTwitter&&i(_,{outlined:!0,themeType:e.theme,buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})};re.propTypes={theme:p.oneOf(["secondary","primary"])};var ne=function(e){return a(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[a(Z,{themeType:e.theme,noMargin:!0,children:[i(k,{themeType:e.theme,type:"text",inputLabel:"Email"}),i(k,{themeType:e.theme,type:"text",inputLabel:"Password"}),i(v,{last:!0,text:"Sign In",themeType:e.theme,onClick:e.handleSignIn})]}),e.viaGoogle&&i(w,{themeType:e.theme,outlined:!0,buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&i(I,{outlined:!0,themeType:e.theme,buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignIn}),e.viaTwitter&&i(_,{outlined:!0,themeType:e.theme,buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})},ie=function(e){return i(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:a(Z,{themeType:e.theme,noMargin:!0,children:[i("div",{children:"Choose Payment"}),e.viaWallet&&i(Y,{themeType:e.theme,outlined:!0,buttonText:e.walletLabel,handleClick:e.handleWallet}),e.viaCreditCard&&i(G,{themeType:e.theme,outlined:!0,buttonText:e.visaMasterLabel,handleClick:e.handleCreditCard}),e.viaMada&&i(E,{themeType:e.theme,outlined:!0,buttonText:e.madaLabel,handleClick:e.handleMada}),e.viaSTCPay&&i(U,{themeType:e.theme,outlined:!0,buttonText:e.stcPayLabel,handleClick:e.handleSTCPay}),e.viaPayPal&&i(N,{themeType:e.theme,outlined:!0,buttonText:e.paypalLabel,handleClick:e.handlePayPal}),e.viaGooglePay&&i(V,{themeType:e.theme,outlined:!0,buttonText:e.googlePayLabel,handleClick:e.handleGooglePay}),e.viaApplePay&&i(H,{themeType:e.theme,outlined:!0,buttonText:e.applePayLabel,handleClick:e.handleApplePay})]})})};k.propTypes={theme:p.oneOf(["secondary","primary"]),viaApplePay:p.bool,viaGooglePay:p.bool,viaSTCPay:p.bool,viaCreditCard:p.bool,viaPayPal:p.bool,handleApplePay:p.func};var ae=function(e){return i(Z,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:a(Z,{themeType:e.theme,noMargin:!0,children:[i(k,{themeType:e.theme,type:"text",inputLabel:"Email"}),i(k,{themeType:e.theme,type:"text",inputLabel:"Password"}),i(v,{last:!0,text:"Sign In",themeType:e.theme,onClick:e.handleSignIn})]})})};export{ae as CreditCardForm,te as NewPasswordForm,oe as ResetPasswordForm,ie as SelectPayment,ne as SignInForm,re as SignUpForm,$ as UserProfile,ee as UserSettings};
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/Button"),o=require("react/jsx-runtime"),r=require("@mui/material/styles"),n=require("@mui/material/InputBase"),i=require("prop-types"),a=require("@mui/material/InputLabel"),l=require("@mui/material/utils");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=d(e),u=d(t),c=d(o),f=d(n),p=d(i),h=d(a),b=d(l);function m(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function g(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){y(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function y(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var x={borderRadius:10,primaryColor:"blue",secondaryColor:"grey",primaryActionColor:"grey",secondaryActionColor:"#4cc9f0",layoutColor:"#d3d4d9",textColor:"black",inputColor:"white",lightBackground:"#FBF5F3",darkBackground:"#0F0E0E",margins:10,paddings:10,allBorderRadius:10,actionButton:{primary:{borderRadius:10,backgroundColor:"#f90900",color:"white",margin:10,padding:10},secondary:{borderRadius:10,margin:10,padding:10,backgroundColor:"#FF8811",color:"black"}},layout:{primary:{backgroundColor:"#d3d4d9",color:"black",margin:10,padding:10,borderRadius:10},secondary:{backgroundColor:"#001E3C",color:"white",margin:10,padding:10,borderRadius:10}},inputFields:{primary:{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",borderRadius:10},secondary:{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",borderRadius:10}}},v=e.createContext(x),C=function(t){var n,i=e.useContext(v),a=Object.keys(i.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())})),l={};a?l=g(g({},i.actionButton[a]),{},{margin:t.last?0:i.actionButton[a].margin,marginTop:t.last?2*i.actionButton[a].margin:0,"&:hover":{backgroundColor:r.darken(null===(n=i.actionButton[a])||void 0===n?void 0:n.backgroundColor,.1)}}):l={backgroundColor:"black",color:"white",padding:10,marginTop:t.last?20:0};var d=r.styled(u.default)((function(e){return e.theme,g({},l)}));return o.jsx(d,g(g({},t),{},{children:t.text}))},k=function(t){var r=e.useContext(v),n={};console.log(Object.keys(r.actionButton));var i=Object.keys(r.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));return n=i?{margin:15,marginRight:5,marginLeft:5,color:r.layout[i].color}:{margin:15,marginRight:0,marginLeft:0,color:"black"},o.jsx(h.default,{style:n,children:o.jsx("div",{style:{fontSize:15},children:t.label})})},j=function(t){var n=e.useContext(v),i=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())})),a={};a=i?g(g({},n.inputFields[i]),{},{margin:t.last?0:n.inputFields[i].margin,marginTop:t.last?2*n.inputFields[i].margin:0}):{backgroundColor:"white",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start"};var l=r.styled(f.default)((function(e){var t=e.theme;return{"& .MuiInputBase-input":g({backgroundColor:"light"===t.palette.mode?"#fcfcfb":"#2b2b2b",transition:t.transitions.create(["border-color","background-color","box-shadow"]),"&:focus":{boxShadow:"".concat(r.alpha(t.palette.primary.main,.25)," 0 0 0 0.2rem"),borderColor:t.palette.primary.main},borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,padding:"10px 12px"},a)}}));return o.jsxs(o.Fragment,{children:[t.inputLabel?o.jsx(k,{themeType:t.themeType,label:t.inputLabel}):null,o.jsx(l,{fullWidth:!0,"aria-label":"dws"})]})};j.propTypes={type:p.default.oneOf(["text","number"]),helperText:p.default.string};var w,T=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.layout[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.layout[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"}),o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},O={},L={exports:{}};(w=L).exports=function(e){return e&&e.__esModule?e:{default:e}},w.exports.__esModule=!0,w.exports.default=w.exports;var P={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=b.default}(P);var R=L.exports;Object.defineProperty(O,"__esModule",{value:!0});var B=O.default=void 0;!function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=M(t);if(o&&o.has(e))return o.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,o&&o.set(e,r)}(s.default);var S=R(P),I=c.default;function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(M=function(e){return e?o:t})(e)}var D=(0,S.default)((0,I.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");B=O.default=D;var z=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx(B,{}),o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},W={},F=L.exports;Object.defineProperty(W,"__esModule",{value:!0});var A=W.default=void 0;!function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=E(t);if(o&&o.has(e))return o.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,o&&o.set(e,r)}(s.default);var _=F(P),G=c.default;function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(E=function(e){return e?o:t})(e)}var q=(0,_.default)((0,G.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"}),"Twitter");A=W.default=q;var U=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.layout[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.layout[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx(A,{}),o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},N=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},H=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:30})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},V=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:30})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},J=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:30})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},K=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},Q=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:30})," ",o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},X={},Y=L.exports;Object.defineProperty(X,"__esModule",{value:!0});var Z=X.default=void 0,$=Y(P),ee=c.default,te=(0,$.default)((0,ee.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),"AccountBalanceWallet");Z=X.default=te;var oe=function(t){var n=e.useContext(v),i={};console.log(Object.keys(n.actionButton));var a=Object.keys(n.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));i=a?{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0,marginTop:n.actionButton[a].margin,border:t.outlined?"2px solid black":"none",borderRadius:n.actionButton[a].borderRadius,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}}:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:n.margins,border:t.outlined?"2px solid black":"none",borderRadius:0,backgroundColor:"white","&:hover":{backgroundColor:r.darken("#ffffff",.1)}};var l=r.styled(u.default)((function(e){var t=e.theme;return g(g({borderRadius:4,position:"relative",border:"1px solid #ced4da",fontSize:16,height:50},i),{},{"&:focus":{borderColor:t.palette.primary.main}})}));return o.jsxs(l,{onClick:t.handleClick,children:[o.jsx(Z,{}),o.jsx("div",{style:{width:10}}),o.jsx("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:t.buttonText})]})},re=function(t){var r=e.useContext(v),n={};console.log(Object.keys(r.actionButton));var i=Object.keys(r.actionButton).find((function(e){var o;return e.toLowerCase()===(null===(o=t.themeType)||void 0===o?void 0:o.toLowerCase())}));return n=i?g(g({display:"flex",flexDirection:"column"},r.layout[i]),{},{backgroundColor:t.noColor?"none":r.layout[i].backgroundColor,padding:t.noPadding?0:r.layout[i].padding,margin:t.noMargin?0:r.layout[i].margin,maxWidth:t.maxWidth}):{display:"flex",flexDirection:"column",color:"white",marginTop:t.last?20:0,backgroundColor:t.noColor?"none":"lightGrey",padding:t.noPadding?0:10,margin:t.noMargin?0:10,maxWidth:t.maxWidth,borderRadius:0},o.jsx("div",{style:n,children:t.children})},ne=function(e){return o.jsxs(re,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[o.jsxs(re,{themeType:e.theme,noMargin:!0,children:[o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Email"}),o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Password"}),o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Confirm Password"}),o.jsx(C,{text:"Sign Up",last:!0,themeType:e.theme,onClick:e.handleSignUp})]}),e.viaGoogle&&o.jsx(T,{outlined:!0,themeType:e.theme,buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&o.jsx(z,{outlined:!0,themeType:e.theme,buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignUp}),e.viaTwitter&&o.jsx(U,{outlined:!0,themeType:e.theme,buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})};ne.propTypes={theme:p.default.oneOf(["secondary","primary"])};j.propTypes={theme:p.default.oneOf(["secondary","primary"]),viaApplePay:p.default.bool,viaGooglePay:p.default.bool,viaSTCPay:p.default.bool,viaCreditCard:p.default.bool,viaPayPal:p.default.bool,handleApplePay:p.default.func};exports.CreditCardForm=function(e){return o.jsx(re,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:o.jsxs(re,{themeType:e.theme,noMargin:!0,children:[o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Email"}),o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Password"}),o.jsx(C,{last:!0,text:"Sign In",themeType:e.theme,onClick:e.handleSignIn})]})})},exports.NewPasswordForm=function(t){return e.useContext(v),o.jsx(re,{themeType:t.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:o.jsxs(re,{themeType:t.theme,noMargin:!0,children:[o.jsx(j,{themeType:t.theme,type:"password",inputLabel:"Password"}),o.jsx(j,{themeType:t.theme,type:"password",inputLabel:"Confirm Password"}),o.jsx(C,{themeType:t.theme,last:!0,text:"Reset Password"})]})})},exports.ResetPasswordForm=function(e){return o.jsx(re,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:o.jsxs(re,{themeType:e.theme,noMargin:!0,children:[o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Email"}),o.jsx(C,{themeType:e.theme,last:!0,text:"Reset Password"})]})})},exports.SelectPayment=function(e){return o.jsx(re,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:o.jsxs(re,{themeType:e.theme,noMargin:!0,children:[o.jsx("div",{children:"Choose Payment"}),e.viaWallet&&o.jsx(oe,{themeType:e.theme,outlined:!0,buttonText:e.walletLabel,handleClick:e.handleWallet}),e.viaCreditCard&&o.jsx(N,{themeType:e.theme,outlined:!0,buttonText:e.visaMasterLabel,handleClick:e.handleCreditCard}),e.viaMada&&o.jsx(H,{themeType:e.theme,outlined:!0,buttonText:e.madaLabel,handleClick:e.handleMada}),e.viaSTCPay&&o.jsx(V,{themeType:e.theme,outlined:!0,buttonText:e.stcPayLabel,handleClick:e.handleSTCPay}),e.viaPayPal&&o.jsx(J,{themeType:e.theme,outlined:!0,buttonText:e.paypalLabel,handleClick:e.handlePayPal}),e.viaGooglePay&&o.jsx(Q,{themeType:e.theme,outlined:!0,buttonText:e.googlePayLabel,handleClick:e.handleGooglePay}),e.viaApplePay&&o.jsx(K,{themeType:e.theme,outlined:!0,buttonText:e.applePayLabel,handleClick:e.handleApplePay})]})})},exports.SignInForm=function(e){return o.jsxs(re,{themeType:e.theme,maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[o.jsxs(re,{themeType:e.theme,noMargin:!0,children:[o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Email"}),o.jsx(j,{themeType:e.theme,type:"text",inputLabel:"Password"}),o.jsx(C,{last:!0,text:"Sign In",themeType:e.theme,onClick:e.handleSignIn})]}),e.viaGoogle&&o.jsx(T,{themeType:e.theme,outlined:!0,buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&o.jsx(z,{outlined:!0,themeType:e.theme,buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignIn}),e.viaTwitter&&o.jsx(U,{outlined:!0,themeType:e.theme,buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})},exports.SignUpForm=ne,exports.UserProfile=function(e){return o.jsxs(re,{maxWidth:400,children:[o.jsx(k,{type:"text",inputLabel:"First Name"}),o.jsx(k,{type:"text",inputLabel:"Last Name"}),o.jsx(k,{type:"email",inputLabel:"Email"}),o.jsx(k,{type:"password",inputLabel:"Password"}),o.jsx(C,{last:!0,text:"Update Account"})]})},exports.UserSettings=function(e){return o.jsxs(re,{maxWidth:400,children:[o.jsx(j,{type:"text",inputLabel:"First Name"}),o.jsx(j,{type:"text",inputLabel:"Last Name"}),o.jsx(j,{type:"email",inputLabel:"Email"}),o.jsx(j,{type:"password",inputLabel:"Password"}),o.jsx(C,{last:!0,text:"Update Account"})]})};
|