app-studio 0.0.1
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/LICENSE +21 -0
- package/README.md +208 -0
- package/dist/app-studio.cjs.development.js +944 -0
- package/dist/app-studio.cjs.development.js.map +1 -0
- package/dist/app-studio.cjs.production.min.js +2 -0
- package/dist/app-studio.cjs.production.min.js.map +1 -0
- package/dist/app-studio.esm.js +907 -0
- package/dist/app-studio.esm.js.map +1 -0
- package/dist/components/Element.d.ts +30 -0
- package/dist/components/Image.d.ts +23 -0
- package/dist/components/Layout.d.ts +11 -0
- package/dist/components/Text.d.ts +23 -0
- package/dist/components/View.d.ts +32 -0
- package/dist/components/Wrapper.d.ts +4 -0
- package/dist/hooks/useMount.d.ts +1 -0
- package/dist/hooks/useResponsive.d.ts +9 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/providers/Responsive.d.ts +20 -0
- package/dist/providers/Theme.d.ts +19 -0
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/env.d.ts +15 -0
- package/dist/utils/shadow.d.ts +103 -0
- package/dist/utils/typography.d.ts +46 -0
- package/package.json +114 -0
- package/src/components/Element.tsx +430 -0
- package/src/components/Image.tsx +56 -0
- package/src/components/Layout.tsx +49 -0
- package/src/components/Text.tsx +118 -0
- package/src/components/View.md +6 -0
- package/src/components/View.tsx +87 -0
- package/src/components/Wrapper.tsx +11 -0
- package/src/hooks/useMount.ts +6 -0
- package/src/hooks/useResponsive.ts +102 -0
- package/src/index.tsx +8 -0
- package/src/providers/Responsive.tsx +61 -0
- package/src/providers/Theme.tsx +73 -0
- package/src/types/module.d.ts +1 -0
- package/src/types/style.d.ts +696 -0
- package/src/utils/colors.ts +321 -0
- package/src/utils/env.ts +43 -0
- package/src/utils/shadow.ts +102 -0
- package/src/utils/typography.ts +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Steed
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
|
|
2
|
+
# App Studio
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/app-studio)
|
|
5
|
+
[](https://www.npmjs.com/package/app-studio)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://github.com/prettier/prettier)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[npm-image]: http://img.shields.io/npm/v/app-studio.svg?style=flat-square
|
|
11
|
+
[npm-url]: http://npmjs.org/package/app-studio
|
|
12
|
+
[github-action-image]: https://github.com/rize-network/app-studio/workflows/%E2%9C%85%20test/badge.svg
|
|
13
|
+
[github-action-url]: https://github.com/rize-network/app-studio/actions?query=workflow%3A%22%E2%9C%85+test%22
|
|
14
|
+
|
|
15
|
+
[download-image]: https://img.shields.io/npm/dm/app-studio.svg?style=flat-square
|
|
16
|
+
[download-url]: https://npmjs.org/package/app-studio
|
|
17
|
+
|
|
18
|
+
[help-wanted-image]: https://flat.badgen.net/github/label-issues/rize-network/app-studio/help%20wanted/open
|
|
19
|
+
[help-wanted-url]: https://github.com/rize-network/app-studio/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
|
|
20
|
+
|
|
21
|
+
[discussions-image]: https://img.shields.io/badge/discussions-on%20github-blue?style=flat-square
|
|
22
|
+
[discussions-url]: https://github.com/rize-network/app-studio/discussions
|
|
23
|
+
|
|
24
|
+
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
|
25
|
+
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## ✨ Features
|
|
31
|
+
|
|
32
|
+
- 🌈 Add styled props to your application.
|
|
33
|
+
- 📦 A set of Simple and powerful React components.
|
|
34
|
+
- 🌍 Internationalization support for dozens of languages.
|
|
35
|
+
- 🎨 Powerful theme customization in every detail.
|
|
36
|
+
|
|
37
|
+
## 📦 Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install app-studio styled-components --save
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 🔨 Usage
|
|
44
|
+
|
|
45
|
+
The `<View>` component supports all of the default [CSSProperties](https://developer.mozilla.org/fr/docs/Web/CSS/CSS_Properties_Reference) as props. The styles transformed and handled by [Styled Components](https://styled-components.com/).
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
1. Add Responsive and Theme Provider to your application root :
|
|
49
|
+
|
|
50
|
+
```jsx
|
|
51
|
+
import React from 'react';
|
|
52
|
+
import { ResponsiveProvider, ThemeProvider } from 'app-studio';
|
|
53
|
+
|
|
54
|
+
const Root = () => {
|
|
55
|
+
return (<ResponsiveProvider>
|
|
56
|
+
<ThemeProvider>
|
|
57
|
+
<App />
|
|
58
|
+
</ThemeProvider>
|
|
59
|
+
</ResponsiveProvider>);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
```jsx
|
|
66
|
+
import React from 'react';
|
|
67
|
+
import { View, useResponsive } from 'app-studio';
|
|
68
|
+
|
|
69
|
+
function Example() {
|
|
70
|
+
const {screen} = useResponsive()
|
|
71
|
+
return (
|
|
72
|
+
<View backgroundColor="grey" padding={ screen == 'xs' ? 10 : 20}>
|
|
73
|
+
Hello
|
|
74
|
+
</View>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Responsive
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
import React from 'react';
|
|
85
|
+
import { ResponsiveProvider } from 'app-studio';
|
|
86
|
+
|
|
87
|
+
const Example = () => {
|
|
88
|
+
const { screen, on } = useResponsive();
|
|
89
|
+
const responsive = {
|
|
90
|
+
xs: {
|
|
91
|
+
backgroundColor: 'red',
|
|
92
|
+
},
|
|
93
|
+
sm: {
|
|
94
|
+
backgroundColor: 'green',
|
|
95
|
+
},
|
|
96
|
+
md: {
|
|
97
|
+
backgroundColor: 'blue',
|
|
98
|
+
},
|
|
99
|
+
lg: {
|
|
100
|
+
backgroundColor: 'yellow',
|
|
101
|
+
},
|
|
102
|
+
xl: {
|
|
103
|
+
backgroundColor: 'red',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<View size={100} {...responsive[screen]}>
|
|
109
|
+
{screen} - mobile : {on('mobile') ? 'yes' : 'no'}
|
|
110
|
+
</View>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const App = () => (<ResponsiveProvider
|
|
115
|
+
breakpoints={{
|
|
116
|
+
xs: 0,
|
|
117
|
+
sm: 340,
|
|
118
|
+
md: 560,
|
|
119
|
+
lg: 1080,
|
|
120
|
+
xl: 1300,
|
|
121
|
+
}}
|
|
122
|
+
|
|
123
|
+
devices={{
|
|
124
|
+
mobile: ['xs', 'sm'],
|
|
125
|
+
tablet: ['md', 'lg'],
|
|
126
|
+
desktop: ['lg', 'xl']
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
<Exemple />
|
|
130
|
+
<ResponsiveProvider>);
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Theming
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
import React from 'react';
|
|
142
|
+
import { ThemeProvider, View } from 'app-studio';
|
|
143
|
+
|
|
144
|
+
const theme = {
|
|
145
|
+
fontFamily: 'arial',
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
function Example() {
|
|
149
|
+
return (
|
|
150
|
+
<ThemeProvider theme={theme}>
|
|
151
|
+
<View>Hello</View>
|
|
152
|
+
</ThemeProvider>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### TypeScript
|
|
159
|
+
|
|
160
|
+
`app-studio` is written in TypeScript with complete definitions.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## 🔗 Links
|
|
164
|
+
- [Change Log](CHANGELOG.md)
|
|
165
|
+
- [Versioning Release Note](https://github.com/rize-network/app-studio/wiki/)
|
|
166
|
+
- [FAQ](https://ant.design/docs/react/faq)
|
|
167
|
+
- [CodeSandbox Template](https://u.ant.design/codesandbox-repro) for bug reports
|
|
168
|
+
- [Customize Theme](https://ant.design/docs/react/customize-theme)
|
|
169
|
+
- [How to Apply for Being A Collaborator](https://github.com/rize-network/app-studio/wiki/Collaborators#how-to-apply-for-being-a-collaborator)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## 🤝 Contributing [](http://makeapullrequest.com)
|
|
174
|
+
|
|
175
|
+
Read our [contributing guide](https://ant.design/docs/react/contributing) and let's build a better rize-network together.
|
|
176
|
+
|
|
177
|
+
We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/rize-network/app-studio/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/rize-network/app-studio/pulls) or as [GitHub issues](https://github.com/rize-network/app-studio/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/rize-network/app-studio/wiki/Development) and have a good time! :)
|
|
178
|
+
|
|
179
|
+
If you are a collaborator, please follow our [Pull Request principle](https://github.com/rize-network/app-studio/wiki/PR-principle) to create a Pull Request with [collaborator template](https://github.com/rize-network/app-studio/compare?expand=1&template=collaborator.md).
|
|
180
|
+
|
|
181
|
+
[](https://issuehunt.io/o/rize-network)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## ❤️ Sponsors and Backers [](https://opencollective.com/rize#support) [](https://opencollective.com/rize#support)
|
|
186
|
+
|
|
187
|
+
[](https://opencollective.com/rize#support)
|
|
188
|
+
|
|
189
|
+
[](https://opencollective.com/rize#support)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
<!--
|
|
193
|
+
## Fundamentals
|
|
194
|
+
|
|
195
|
+
| Property | Type | Default | Description |
|
|
196
|
+
| ----------- | :----: | :-------: | --------------------- |
|
|
197
|
+
| title | string | undefined | change the title |
|
|
198
|
+
| description | string | undefined | change the descrition | -->
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## Author
|
|
203
|
+
|
|
204
|
+
SteedMonteiro, steed@rize.network
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
App Studio is available under the MIT license. See the LICENSE file for more info.
|