@sikka/hawa 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/.github/workflows/hawa-publish.yml +43 -0
  2. package/.prettierrc +28 -28
  3. package/README.md +149 -148
  4. package/package.json +49 -47
  5. package/rollup.config.js +30 -30
  6. package/src/blocks/Account/UserProfile.js +15 -0
  7. package/src/blocks/Account/UserSettings.js +15 -0
  8. package/src/blocks/Account/index.js +2 -0
  9. package/src/blocks/AuthForms/NewPasswordForm.js +17 -0
  10. package/src/blocks/AuthForms/ResetPasswordForm.js +14 -0
  11. package/src/blocks/AuthForms/SignInForm.js +19 -0
  12. package/src/{components/Hawa → blocks}/AuthForms/SignUpForm.js +20 -26
  13. package/src/{components/Hawa → blocks}/AuthForms/index.js +4 -4
  14. package/src/{components/Hawa → blocks}/AuthForms/viaFacebook.js +0 -0
  15. package/src/{components/Hawa → blocks}/AuthForms/viaGithub.js +0 -0
  16. package/src/{components/Hawa → blocks}/AuthForms/viaGoogle.js +0 -0
  17. package/src/{components/Hawa → blocks}/AuthForms/viaTwitter.js +0 -0
  18. package/src/index.js +1 -1
  19. package/src/layout/Box.js +25 -0
  20. package/src/layout/index.js +1 -0
  21. package/src/stories/ActionButton.stories.js +49 -0
  22. package/src/stories/AdaptiveButton.stories.js +80 -80
  23. package/src/stories/Alert.stories.js +41 -48
  24. package/src/stories/AuthForm.stories.js +79 -76
  25. package/src/stories/Box.stories.js +64 -45
  26. package/src/stories/CheckBox.stories.js +35 -34
  27. package/src/stories/GlobalVariables.stories.js +101 -108
  28. package/src/stories/HawaProvider.stories.js +23 -23
  29. package/src/stories/InputLabel.stories.js +92 -100
  30. package/src/stories/Introduction.stories.js +211 -0
  31. package/src/stories/RadioSelector.stories.js +69 -69
  32. package/src/stories/TextField.stories.js +50 -50
  33. package/src/stories/UserAccount.stories.js +46 -0
  34. package/src/styles.css +400 -400
  35. package/src/themes/HawaProvider.js +45 -0
  36. package/src/ui/ActionButton.js +15 -0
  37. package/src/{components/Hawa/AdaptiveButton → ui}/AdaptiveButton.js +252 -254
  38. package/src/{components/Hawa/AutoCompleteField/AutoCompleteField.jsx → ui/AutoCompleteField.js} +33 -33
  39. package/src/{components/Hawa/Checkbox/Checkbox.jsx → ui/Checkbox.js} +21 -20
  40. package/src/{components/Hawa/DragDropImages/DragDropImages.jsx → ui/DragDropImages.js} +180 -180
  41. package/src/{components/Hawa/Hawa.jsx → ui/Hawa.js} +3 -3
  42. package/src/{components/Hawa/RadioBox/RadioBox.jsx → ui/RadioBox.js} +29 -29
  43. package/src/{components/Hawa/RadioSelector/RadioSelector.jsx → ui/RadioSelector.js} +51 -51
  44. package/src/{components/Hawa/Row/Row.jsx → ui/Row.js} +21 -21
  45. package/src/{components/Hawa/SelectedField/SelectedField.jsx → ui/SelectedField.js} +46 -46
  46. package/src/ui/StyledAlert.js +30 -0
  47. package/src/ui/StyledInputLabel.js +19 -0
  48. package/src/{components/Hawa/StyledTooltip → ui}/StyledTooltip.js +46 -46
  49. package/src/{components/Hawa/TabPanel/TabPanel.jsx → ui/TabPanel.js} +37 -37
  50. package/src/{components/Hawa/TextArea/TextArea.jsx → ui/TextArea.js} +38 -38
  51. package/src/{components/Hawa/TextField → ui}/TextField.js +62 -54
  52. package/src/{components/Hawa → ui}/index.js +13 -10
  53. package/src/util.js +20 -20
  54. package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +1 -0
  55. package/storybook-static/0.dd3d47f5.iframe.bundle.js +1 -0
  56. package/storybook-static/1.4e43f671.iframe.bundle.js +3 -0
  57. package/storybook-static/{1.7c0dc86d.iframe.bundle.js.LICENSE.txt → 1.4e43f671.iframe.bundle.js.LICENSE.txt} +0 -0
  58. package/storybook-static/1.4e43f671.iframe.bundle.js.map +1 -0
  59. package/storybook-static/2.9a757207.iframe.bundle.js +1 -0
  60. package/storybook-static/{3.592ce28f.iframe.bundle.js → 3.c1dc7159.iframe.bundle.js} +0 -0
  61. package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +2 -0
  62. package/storybook-static/{5.f459d151315e6780c20f.manager.bundle.js.LICENSE.txt → 4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt} +0 -0
  63. package/storybook-static/5.88fe62ee92ff5ca67829.manager.bundle.js +1 -0
  64. package/storybook-static/6.96d184f368dea006cb52.manager.bundle.js +2 -0
  65. package/storybook-static/{11.f4e922583ae35da460f3.manager.bundle.js.LICENSE.txt → 6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt} +0 -0
  66. package/storybook-static/{7.3d04765dbf3f1dcd706c.manager.bundle.js → 7.5ec31f3702b08ab0b71c.manager.bundle.js} +1 -1
  67. package/storybook-static/7.69d2e532.iframe.bundle.js +1 -0
  68. package/storybook-static/8.5ce13be7612bd3a6b864.manager.bundle.js +1 -0
  69. package/storybook-static/{8.8e2132ec.iframe.bundle.js → 8.68cd1217.iframe.bundle.js} +2 -2
  70. package/storybook-static/{8.8e2132ec.iframe.bundle.js.LICENSE.txt → 8.68cd1217.iframe.bundle.js.LICENSE.txt} +0 -0
  71. package/storybook-static/8.68cd1217.iframe.bundle.js.map +1 -0
  72. package/storybook-static/{9.109ea555.iframe.bundle.js → 9.488e3969.iframe.bundle.js} +0 -0
  73. package/storybook-static/iframe.html +2 -2
  74. package/storybook-static/index.html +9 -1
  75. package/storybook-static/main.65cb2769.iframe.bundle.js +1 -0
  76. package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +1 -0
  77. package/storybook-static/{runtime~main.ffc8677e.iframe.bundle.js → runtime~main.6e2e1544.iframe.bundle.js} +1 -1
  78. package/storybook-static/runtime~main.cc29f4c2175f187a3707.manager.bundle.js +1 -0
  79. package/storybook-static/vendors~main.d144d840.iframe.bundle.js +3 -0
  80. package/storybook-static/{vendors~main.4aa936b1.iframe.bundle.js.LICENSE.txt → vendors~main.d144d840.iframe.bundle.js.LICENSE.txt} +0 -0
  81. package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +1 -0
  82. package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +2 -0
  83. package/storybook-static/{vendors~main.a935f15a2179a6eff5fd.manager.bundle.js.LICENSE.txt → vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt} +6 -12
  84. package/yarn-error.log +10910 -0
  85. package/dist/index.es.js +0 -37
  86. package/dist/index.js +0 -37
  87. package/src/components/Hawa/AdaptiveButton/index.js +0 -1
  88. package/src/components/Hawa/AuthForms/NewPasswordForm.js +0 -23
  89. package/src/components/Hawa/AuthForms/ResetPasswordForm.js +0 -21
  90. package/src/components/Hawa/AuthForms/SignInForm.js +0 -25
  91. package/src/components/Hawa/AutoCompleteField/index.js +0 -1
  92. package/src/components/Hawa/Box/Box.js +0 -18
  93. package/src/components/Hawa/Box/index.js +0 -1
  94. package/src/components/Hawa/Checkbox/index.js +0 -1
  95. package/src/components/Hawa/DragDropImages/index.js +0 -1
  96. package/src/components/Hawa/HawaProvider/HawaProvider.js +0 -19
  97. package/src/components/Hawa/HawaProvider/index.js +0 -1
  98. package/src/components/Hawa/InputLabel/StyledInputLabel.js +0 -15
  99. package/src/components/Hawa/InputLabel/index.js +0 -1
  100. package/src/components/Hawa/RadioBox/index.js +0 -1
  101. package/src/components/Hawa/RadioSelector/index.js +0 -1
  102. package/src/components/Hawa/Row/index.js +0 -1
  103. package/src/components/Hawa/SelectedField/index.js +0 -1
  104. package/src/components/Hawa/StyledAlert/StyledAlert.js +0 -15
  105. package/src/components/Hawa/StyledAlert/index.js +0 -1
  106. package/src/components/Hawa/StyledTooltip/index.js +0 -1
  107. package/src/components/Hawa/TabPanel/index.js +0 -1
  108. package/src/components/Hawa/TextArea/index.js +0 -1
  109. package/src/components/Hawa/TextField/index.js +0 -1
  110. package/storybook-static/0.12392f0b.iframe.bundle.js +0 -1
  111. package/storybook-static/0.55b012452099ace2dca6.manager.bundle.js +0 -1
  112. package/storybook-static/1.0f38715c61c7c3cd11db.manager.bundle.js +0 -1
  113. package/storybook-static/1.7c0dc86d.iframe.bundle.js +0 -3
  114. package/storybook-static/1.7c0dc86d.iframe.bundle.js.map +0 -1
  115. package/storybook-static/10.9f2923a7561bc20fffdb.manager.bundle.js +0 -1
  116. package/storybook-static/11.f4e922583ae35da460f3.manager.bundle.js +0 -2
  117. package/storybook-static/12.1415460941f0bdcb8fa8.manager.bundle.js +0 -1
  118. package/storybook-static/2.ee357266.iframe.bundle.js +0 -1
  119. package/storybook-static/5.f459d151315e6780c20f.manager.bundle.js +0 -2
  120. package/storybook-static/6.3bd64d820f3745f262ff.manager.bundle.js +0 -1
  121. package/storybook-static/7.af56919f.iframe.bundle.js +0 -1
  122. package/storybook-static/8.8e2132ec.iframe.bundle.js.map +0 -1
  123. package/storybook-static/8.b541eadfcb9164835dfc.manager.bundle.js +0 -1
  124. package/storybook-static/9.411ac8e451bbb10926c7.manager.bundle.js +0 -1
  125. package/storybook-static/main.78b7d418.iframe.bundle.js +0 -1
  126. package/storybook-static/main.9bb085ebb152f5b19a2a.manager.bundle.js +0 -1
  127. package/storybook-static/runtime~main.9468098d21070636985f.manager.bundle.js +0 -1
  128. package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js +0 -3
  129. package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js.map +0 -1
  130. package/storybook-static/vendors~main.a935f15a2179a6eff5fd.manager.bundle.js +0 -2
@@ -0,0 +1,43 @@
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 publish
42
+ env:
43
+ 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
- [![NPM](https://img.shields.io/npm/v/@sikka/hawa.svg)](https://www.npmjs.com/package/@sikka/hawa)
8
- [![NPM](https://img.shields.io/npm/dt/@sikka/hawa.svg)](https://www.npmjs.com/package/@sikka/hawa)
9
- [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
10
-
11
- > Opinionated UI Kit for web apps and websites.
12
-
13
- # Concept
14
-
15
- ### Components
16
-
17
- The smallest elements of this UI kit are the typical low-level components. Examples of components:
18
-
19
- - InputField
20
- - Checkboxes
21
- - Modal
22
- - Drag-Drop Image(s)
23
- - Button
24
- - etc ...
25
-
26
- ### Blocks
27
-
28
- Blocks are commonly used collection of components. Examples of blocks:
29
-
30
- - Sign-In
31
- - Sign-Up
32
- - Reset Password
33
- - SaaS Pricing Plans
34
- - Payment Methods Block (to list saved methods)
35
- - Account Block (to edit account info)
36
- - etc ...
37
-
38
- ### Boxes
39
-
40
- 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
41
-
42
- <p align="center">
43
- <img src="https://user-images.githubusercontent.com/46135573/143972102-0c104239-b8f6-4a7b-9aad-54f6d91a8906.png" alt="layout-types" />
44
- </p>
45
-
46
- Points
47
-
48
- - The content inside each box can be scrollable (vertical/horizontal/Both) with one prop
49
- - you can control the spacing of the content inside each box with one prop
50
- - you can also control the spacing of all the box in the layout
51
- - some boxes can float (animation of open and close modal)
52
- - some boxes can go full screen (animation to transition)
53
-
54
- ### Utilities
55
-
56
- [x] **getTextColor(bgColor)**
57
- determine if text should be black or white based on the contrast of `bgColor`
58
-
59
- [ ] **darkenColor(color,percent)**
60
- darken a given `color` by a given `percent`
61
-
62
- [ ] **lightenColor(color,percent)**
63
- lighten a given `color` by a given `percent`
64
-
65
- # Features
66
-
67
- - [ ] Change borders and margin, padding in one place
68
- - [ ] Drag and drop tool to create a layout of boxes
69
-
70
- ## Components
71
-
72
- - [ ] Layout
73
- - [ ] Box
74
- - [ ] TextField
75
- - [ ] TextArea
76
- - [ ] Radio Selector
77
- - [ ] PasswordField
78
- - [ ] Autocomplete
79
- - [ ] Tabs
80
- - [ ] Alerts
81
- - [ ] Badges
82
-
83
- ## Install
84
-
85
- ```bash
86
-
87
- npm install --save @sikka/hawa
88
-
89
- ```
90
-
91
- ## Usage
92
-
93
- ```jsx
94
- //example coming soon inshallah
95
- ```
96
-
97
- ## Contributing
98
-
99
- To contribute, clone this github repository and run the development server
100
-
101
- - clone repository
102
-
103
- ```bash
104
- git clone git@github.com:sikka-software/hawa.git
105
- cd hawa
106
- npm install
107
- ```
108
-
109
- ## TESTING
110
-
111
- - Run development server
112
-
113
- ```bash
114
- git clone git@github.com:sikka-software/hawa.git
115
- cd hawa
116
- npm install
117
- npm run storybook
118
- ```
119
-
120
- - Edit **Hawa/src/stories/Hawa.stories.js\_** file
121
-
122
- - Add your custom testing component in **Hawa.stories.js** file
123
-
124
- - Or you can preview without running development server. [See Preview](https://sikka-software.github.io/Hawa/storybook-static/)
125
-
126
- ```jsx
127
- //example coming soon inshallah
128
- ```
129
-
130
- ## Deployment
131
-
132
- ```bash
133
- npm run build-storybook
134
- ```
135
-
136
- ## Publishing (Admin)
137
-
138
- ```bash
139
- npm version [major | minor | patch]
140
- npm run build-lib
141
- npm publish --access public
142
- ```
143
-
144
- ## License
145
-
146
- <!-- https://github.com/react-component/drawer -->
147
-
148
- MIT © [SIKKA SOFTWARE](https://sikka.sa)
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
+ [![NPM](https://img.shields.io/npm/v/@sikka/hawa.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@sikka/hawa)
8
+ [![NPM](https://img.shields.io/npm/dt/@sikka/hawa.svg?style=flat&colorA=000000&colorB=000000)](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/package.json CHANGED
@@ -1,47 +1,49 @@
1
- {
2
- "name": "@sikka/hawa",
3
- "version": "0.0.2",
4
- "description": "UI Kit",
5
- "main": "dist/index.js",
6
- "module": "dist/index.es.js",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1",
9
- "start": "start-storybook -p 6006",
10
- "storybook": "start-storybook -p 6006",
11
- "build-storybook": "build-storybook",
12
- "build-lib": "rollup -c"
13
- },
14
- "author": "SIKKA SOFTWARE",
15
- "license": "MIT",
16
- "devDependencies": {
17
- "@babel/core": "^7.12.10",
18
- "@babel/preset-react": "^7.12.10",
19
- "@rollup/plugin-commonjs": "^21.0.1",
20
- "@rollup/plugin-node-resolve": "^11.1.1",
21
- "@storybook/addon-actions": "^6.4.7",
22
- "@storybook/addon-essentials": "^6.4.7",
23
- "@storybook/addon-links": "^6.4.7",
24
- "@storybook/react": "^6.4.7",
25
- "babel-loader": "^8.2.2",
26
- "framer-motion": "^4.1.7",
27
- "react": "^17.0.1",
28
- "react-dom": "^17.0.1",
29
- "rollup": "^2.38.4",
30
- "rollup-plugin-babel": "^4.4.0",
31
- "rollup-plugin-peer-deps-external": "^2.2.4",
32
- "rollup-plugin-postcss": "^4.0.0",
33
- "rollup-plugin-terser": "^7.0.2"
34
- },
35
- "peerDependencies": {
36
- "react": "^17.0.1",
37
- "react-dom": "^17.0.1"
38
- },
39
- "dependencies": {
40
- "@material-ui/core": "^4.12.3",
41
- "@material-ui/icons": "^4.11.2",
42
- "@material-ui/lab": "*",
43
- "prop-types": "^15.7.2",
44
- "react-hook-form": "^7.20.4",
45
- "tinycolor2": "^1.4.2"
46
- }
47
- }
1
+ {
2
+ "name": "@sikka/hawa",
3
+ "version": "0.0.3",
4
+ "description": "UI Kit",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.es.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "start": "start-storybook -p 6006",
10
+ "storybook": "start-storybook -p 6006",
11
+ "build-storybook": "build-storybook",
12
+ "build-lib": "rollup -c"
13
+ },
14
+ "author": "SIKKA SOFTWARE",
15
+ "license": "MIT",
16
+ "devDependencies": {
17
+ "@babel/core": "^7.12.10",
18
+ "@babel/preset-react": "^7.12.10",
19
+ "@rollup/plugin-commonjs": "^21.0.1",
20
+ "@rollup/plugin-node-resolve": "^11.1.1",
21
+ "@storybook/addon-actions": "^6.4.7",
22
+ "@storybook/addon-essentials": "^6.4.7",
23
+ "@storybook/addon-links": "^6.4.7",
24
+ "@storybook/react": "^6.4.7",
25
+ "@storybook/addons": "^6.4.19",
26
+ "@storybook/theming": "^6.4.19",
27
+ "babel-loader": "^8.2.2",
28
+ "framer-motion": "^4.1.7",
29
+ "react": "^17.0.1",
30
+ "react-dom": "^17.0.1",
31
+ "rollup": "^2.38.4",
32
+ "rollup-plugin-babel": "^4.4.0",
33
+ "rollup-plugin-peer-deps-external": "^2.2.4",
34
+ "rollup-plugin-postcss": "^4.0.0",
35
+ "rollup-plugin-terser": "^7.0.2"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^17.0.1",
39
+ "react-dom": "^17.0.1"
40
+ },
41
+ "dependencies": {
42
+ "@material-ui/core": "^4.12.3",
43
+ "@material-ui/icons": "^4.11.2",
44
+ "@material-ui/lab": "*",
45
+ "prop-types": "^15.7.2",
46
+ "react-hook-form": "^7.20.4",
47
+ "tinycolor2": "^1.4.2"
48
+ }
49
+ }
package/rollup.config.js CHANGED
@@ -1,30 +1,30 @@
1
- import babel from "rollup-plugin-babel";
2
- import resolve from "@rollup/plugin-node-resolve";
3
- import external from "rollup-plugin-peer-deps-external";
4
- import { terser } from "rollup-plugin-terser";
5
- import postcss from "rollup-plugin-postcss";
6
- import commonjs from "@rollup/plugin-commonjs";
7
-
8
- export default [
9
- {
10
- input: "src/index.js",
11
- output: [
12
- { file: "dist/index.js", format: "cjs" },
13
- { file: "dist/index.es.js", format: "es", exports: "named" }
14
- ],
15
- plugins: [
16
- postcss({ plugins: [], minimize: true }),
17
- babel({
18
- exclude: "node_modules/**",
19
- presets: [
20
- "@babel/preset-env",
21
- ["@babel/preset-react", { runtime: "automatic" }]
22
- ]
23
- }),
24
- external(),
25
- resolve(),
26
- terser(),
27
- commonjs()
28
- ]
29
- }
30
- ];
1
+ import babel from "rollup-plugin-babel";
2
+ import resolve from "@rollup/plugin-node-resolve";
3
+ import external from "rollup-plugin-peer-deps-external";
4
+ import { terser } from "rollup-plugin-terser";
5
+ import postcss from "rollup-plugin-postcss";
6
+ import commonjs from "@rollup/plugin-commonjs";
7
+
8
+ export default [
9
+ {
10
+ input: "src/index.js",
11
+ output: [
12
+ { file: "dist/index.js", format: "cjs" },
13
+ { file: "dist/index.es.js", format: "es", exports: "named" }
14
+ ],
15
+ plugins: [
16
+ postcss({ plugins: [], minimize: true }),
17
+ babel({
18
+ exclude: "node_modules/**",
19
+ presets: [
20
+ "@babel/preset-env",
21
+ ["@babel/preset-react", { runtime: "automatic" }]
22
+ ]
23
+ }),
24
+ external(),
25
+ resolve(),
26
+ terser(),
27
+ commonjs()
28
+ ]
29
+ }
30
+ ];
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { StyledTextField, ActionButton } from "../../ui";
3
+ import { Box } from '../../layout'
4
+
5
+ export const UserProfile = (props) => {
6
+ return (
7
+ <Box maxWidth={400}>
8
+ <StyledTextField type="text" inputLabel="First Name" />
9
+ <StyledTextField type="text" inputLabel="Last Name" />
10
+ <StyledTextField type="email" inputLabel="Email" />
11
+ <StyledTextField type="password" inputLabel="Password" />
12
+ <ActionButton last text="Update Account" />
13
+ </Box>
14
+ );
15
+ };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { StyledTextField, ActionButton } from "../../ui";
3
+ import { Box } from '../../layout'
4
+
5
+ export const UserSettings = (props) => {
6
+ return (
7
+ <Box maxWidth={400}>
8
+ <StyledTextField type="text" inputLabel="First Name" />
9
+ <StyledTextField type="text" inputLabel="Last Name" />
10
+ <StyledTextField type="email" inputLabel="Email" />
11
+ <StyledTextField type="password" inputLabel="Password" />
12
+ <ActionButton last text="Update Account" />
13
+ </Box>
14
+ );
15
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./UserProfile.js";
2
+ export * from "./UserSettings.js";
@@ -0,0 +1,17 @@
1
+ import React, { useContext } from "react";
2
+ import { Box } from "../../layout";
3
+ import { ThemeProvider } from "../../themes/HawaProvider";
4
+ import { StyledTextField, StyledInputLabel } from "../../ui";
5
+ export const NewPasswordForm = (props) => {
6
+ const theme = useContext(ThemeProvider);
7
+ return (
8
+ <Box maxWidth={400} >
9
+
10
+ <StyledInputLabel label="Password" />
11
+ <StyledTextField type="password" />
12
+ <StyledInputLabel label="Confirm Password" />
13
+ <StyledTextField type="password" />
14
+ {props.children}
15
+ </Box>
16
+ );
17
+ };
@@ -0,0 +1,14 @@
1
+ import React, { useContext } from "react";
2
+ import { Box } from "../../layout";
3
+ import { ThemeProvider } from "../../themes/HawaProvider";
4
+ import { StyledTextField, StyledInputLabel } from "../../ui";
5
+ export const ResetPasswordForm = (props) => {
6
+ const theme = useContext(ThemeProvider);
7
+ return (
8
+ <Box maxWidth={400} >
9
+ <StyledInputLabel label="Email" />
10
+ <StyledTextField type="text" />
11
+ {props.children}
12
+ </Box>
13
+ );
14
+ };
@@ -0,0 +1,19 @@
1
+ import React, { useContext } from "react";
2
+ import { ThemeProvider } from "../../themes/HawaProvider";
3
+ import { StyledTextField, StyledInputLabel } from "../../ui";
4
+ import { Box } from '../../layout'
5
+ export const SignInForm = (props) => {
6
+ const theme = useContext(ThemeProvider);
7
+ return (
8
+ <Box maxWidth={400}>
9
+
10
+ <StyledInputLabel label="Email" />
11
+ <StyledTextField type="text" />
12
+ <StyledInputLabel label="Password" />
13
+ <StyledTextField type="text" />
14
+
15
+ {props.children}
16
+
17
+ </Box>
18
+ );
19
+ };