app-studio 0.1.44 → 0.2.2
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/README.md +59 -62
- package/dist/appstudio.cjs.development.js +2130 -0
- package/dist/appstudio.cjs.development.js.map +1 -0
- package/dist/appstudio.cjs.production.min.js +2 -0
- package/dist/appstudio.cjs.production.min.js.map +1 -0
- package/dist/appstudio.esm.js +2092 -0
- package/dist/appstudio.esm.js.map +1 -0
- package/dist/appstudio.umd.development.js +2133 -0
- package/dist/appstudio.umd.development.js.map +1 -0
- package/dist/appstudio.umd.production.min.js +2 -0
- package/dist/appstudio.umd.production.min.js.map +1 -0
- package/dist/components/Animation.d.ts +633 -0
- package/dist/components/Element.d.ts +14 -10
- package/dist/components/Form.d.ts +3 -3
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/View.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/utils/animation.d.ts +4 -0
- package/dist/utils/constants.d.ts +17 -0
- package/dist/utils/style.d.ts +5 -2
- package/package.json +11 -7
- package/dist/app-studio.cjs.development.js +0 -954
- package/dist/app-studio.cjs.development.js.map +0 -1
- package/dist/app-studio.cjs.production.min.js +0 -5
- package/dist/app-studio.cjs.production.min.js.map +0 -1
- package/dist/app-studio.esm.js +0 -915
- package/dist/app-studio.esm.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# App Studio
|
|
3
2
|
|
|
4
3
|
[](https://www.npmjs.com/package/app-studio)
|
|
@@ -25,11 +24,11 @@
|
|
|
25
24
|
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
|
26
25
|
|
|
27
26
|
|
|
27
|
+
|
|
28
28
|
`App-studio` provides CSS design props for layout, spacing, sizing, shadows with the 'shadow' prop, event management through the `on` prop, and theming. Components include `Element` for fundamental design, `View` based on the `div`, `Text` for text styles, `Form` for form-related designs, and `Image` based on the `img` tag.
|
|
29
29
|
|
|
30
30
|
Supported events: `hover`, `active`, `focus`, and `disabled`.
|
|
31
31
|
|
|
32
|
-
|
|
33
32
|
## ✨ Features
|
|
34
33
|
|
|
35
34
|
- 🌈 Add styled props to your application.
|
|
@@ -40,55 +39,55 @@ Supported events: `hover`, `active`, `focus`, and `disabled`.
|
|
|
40
39
|
## 📦 Install
|
|
41
40
|
|
|
42
41
|
```bash
|
|
43
|
-
npm install app-studio
|
|
42
|
+
npm install app-studio --save
|
|
44
43
|
```
|
|
45
44
|
|
|
46
45
|
## 🔨 Usage
|
|
47
46
|
|
|
48
|
-
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
|
|
47
|
+
The `<View>` component supports all of the default [CSSProperties](https://developer.mozilla.org/fr/docs/Web/CSS/CSS_Properties_Reference) as props. The styles are transformed.
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
1. Add Responsive and Theme Provider to your application root :
|
|
49
|
+
1. Add Responsive and Theme Provider to your application root:
|
|
52
50
|
|
|
53
51
|
```jsx
|
|
54
52
|
import React from 'react';
|
|
55
53
|
import { ResponsiveProvider, ThemeProvider } from 'app-studio';
|
|
56
54
|
|
|
57
55
|
const Root = () => {
|
|
58
|
-
return (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</
|
|
56
|
+
return (
|
|
57
|
+
<ResponsiveProvider>
|
|
58
|
+
<ThemeProvider>
|
|
59
|
+
<App />
|
|
60
|
+
</ThemeProvider>
|
|
61
|
+
</ResponsiveProvider>
|
|
62
|
+
);
|
|
63
63
|
};
|
|
64
|
-
|
|
65
64
|
```
|
|
66
65
|
|
|
66
|
+
2. Use components in your application:
|
|
67
67
|
|
|
68
68
|
```jsx
|
|
69
69
|
import React from 'react';
|
|
70
70
|
import { View } from 'app-studio';
|
|
71
71
|
|
|
72
72
|
function Example() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
return (
|
|
74
|
+
<View
|
|
75
|
+
backgroundColor="color.grey"
|
|
76
|
+
padding={20}
|
|
77
|
+
on={{ hover: { backgroundColor: 'color.blue.100' } }}
|
|
78
|
+
>
|
|
79
|
+
Hello
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
82
|
}
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
You can use View for a `<div>` tag. You can also use Div, Span, Form, Input, and Image components if you need another tag.
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## Advanced Example
|
|
87
|
+
## Advanced Example
|
|
89
88
|
|
|
90
|
-
```
|
|
91
|
-
import { ThemeProvider, ResponsiveProvider, View, Span, Text } from 'app-studio';
|
|
89
|
+
```jsx
|
|
90
|
+
import { ThemeProvider, ResponsiveProvider, View, Span, Text, Button } from 'app-studio';
|
|
92
91
|
|
|
93
92
|
const theme = {
|
|
94
93
|
main: { primary: '#fff7ed' },
|
|
@@ -103,54 +102,57 @@ const colors = {
|
|
|
103
102
|
function Example() {
|
|
104
103
|
return (
|
|
105
104
|
<ResponsiveProvider>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
105
|
+
<ThemeProvider theme={theme} colors={colors}>
|
|
106
|
+
<Span
|
|
107
|
+
backgroundColor="color.blue"
|
|
108
|
+
padding={10}
|
|
109
|
+
media={{
|
|
110
|
+
mobile: {
|
|
111
|
+
padding: 20
|
|
112
|
+
}
|
|
113
|
+
}}
|
|
114
|
+
>
|
|
115
|
+
Base element
|
|
116
|
+
</Span>
|
|
117
|
+
<View
|
|
118
|
+
backgroundColor="theme.primary"
|
|
119
|
+
margin={10}
|
|
120
|
+
width={200}
|
|
121
|
+
on={{ hover: { backgroundColor: 'color.blueGray.500' } }}
|
|
122
|
+
>
|
|
123
|
+
Hover to change color
|
|
124
|
+
</View>
|
|
125
|
+
<Button backgroundColor="theme.button.background">Click here</Button>
|
|
126
|
+
<Text color="theme.primary">Hello</Text>
|
|
127
|
+
</ThemeProvider>
|
|
129
128
|
</ResponsiveProvider>
|
|
130
|
-
|
|
131
129
|
);
|
|
132
130
|
}
|
|
133
131
|
```
|
|
134
132
|
|
|
135
|
-
|
|
136
133
|
## Transform JavaScript/TypeScript JSX
|
|
137
134
|
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
To transform your existing JavaScript/TypeScript JSX code to use App-Studio:
|
|
136
|
+
|
|
137
|
+
1. Install the codemod tool:
|
|
140
138
|
|
|
141
139
|
```bash
|
|
142
|
-
|
|
140
|
+
npm install -g @app-studio/codemod
|
|
143
141
|
```
|
|
144
142
|
|
|
145
|
-
|
|
143
|
+
2. Run the transformation:
|
|
146
144
|
|
|
145
|
+
```bash
|
|
146
|
+
app-studio-codemod to-app-studio <path_to_your_js_or_tsx_files> --assetsDir=src/assets --assetsUrl=/assets
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Replace `<path_to_your_js_or_tsx_files>` with the actual path to your JavaScript/TypeScript files.
|
|
147
150
|
|
|
148
151
|
## 🔗 Links
|
|
149
152
|
- [Change Log](CHANGELOG.md)
|
|
150
153
|
- [Versioning Release Note](https://github.com/rize-network/app-studio/wiki/)
|
|
151
154
|
- [How to Apply for Being A Collaborator](https://github.com/rize-network/app-studio/wiki/Collaborators#how-to-apply-for-being-a-collaborator)
|
|
152
155
|
|
|
153
|
-
|
|
154
156
|
## 🤝 Contributing [](http://makeapullrequest.com)
|
|
155
157
|
|
|
156
158
|
Read our [contributing guide](https://ant.design/docs/react/contributing) and let's build a better rize-network together.
|
|
@@ -161,8 +163,6 @@ If you are a collaborator, please follow our [Pull Request principle](https://gi
|
|
|
161
163
|
|
|
162
164
|
[](https://issuehunt.io/o/rize-network)
|
|
163
165
|
|
|
164
|
-
|
|
165
|
-
|
|
166
166
|
## Roadmap
|
|
167
167
|
|
|
168
168
|
- Integrate React Native
|
|
@@ -171,14 +171,11 @@ If you are a collaborator, please follow our [Pull Request principle](https://gi
|
|
|
171
171
|
|
|
172
172
|
SteedMonteiro, steed@rize.network
|
|
173
173
|
|
|
174
|
-
|
|
175
174
|
## ❤️ Sponsors and Backers [](https://opencollective.com/rize#support) [](https://opencollective.com/rize#support)
|
|
176
175
|
|
|
177
176
|
[](https://opencollective.com/rize#support)
|
|
178
177
|
[](https://opencollective.com/rize#support)
|
|
179
178
|
|
|
180
|
-
|
|
181
|
-
|
|
182
179
|
## License
|
|
183
180
|
|
|
184
|
-
App Studio is available under the MIT license. See the LICENSE file for more info.
|
|
181
|
+
App Studio is available under the MIT license. See the LICENSE file for more info.
|