app-studio 0.5.56 → 0.5.61
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 +97 -40
- package/dist/app-studio.cjs.development.js +435 -101
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +434 -101
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +435 -101
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/hooks/useScroll.d.ts +4 -16
- package/dist/providers/Theme.d.ts +7 -2
- package/dist/utils/colors.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
# App-Studio
|
|
1
|
+
# App-Studio
|
|
2
2
|
|
|
3
3
|
App-Studio is a powerful React-based library designed to simplify the process of building responsive, interactive, and visually consistent web applications. It provides CSS design props for layout, spacing, sizing, shadows, event management, and theming.
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
- 🌈 Add styled props to your application
|
|
8
|
+
- 📦 A set of simple and powerful React components
|
|
9
|
+
- 🌍 Internationalization support for dozens of languages
|
|
10
|
+
- 🎨 Powerful theme customization in every detail
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
|
|
14
|
+
- [Installation](#2-installation)
|
|
15
|
+
- [Core Components](#3-core-components)
|
|
16
|
+
- [Element](#element)
|
|
17
|
+
- [View](#view)
|
|
18
|
+
- [Text](#text)
|
|
19
|
+
- [Form](#form)
|
|
20
|
+
- [Image](#image)
|
|
21
|
+
- [Responsive Design](#4-responsive-design)
|
|
22
|
+
- [Media Prop](#media-prop)
|
|
23
|
+
- [useResponsive Hook](#useresponsive-hook)
|
|
24
|
+
- [Event Management](#5-event-management)
|
|
25
|
+
- [Theming](#6-theming)
|
|
26
|
+
- [Custom Hooks](#7-custom-hooks)
|
|
27
|
+
- [useMount](#usemount)
|
|
28
|
+
- [Design Props](#8-design-props)
|
|
29
|
+
- [Shadow Prop](#shadow-prop)
|
|
30
|
+
- [Animation](#9-animation)
|
|
31
|
+
- [Basic Usage](#basic-usage)
|
|
32
|
+
- [Available Animations](#available-animations)
|
|
33
|
+
- [Animation Properties](#animation-properties)
|
|
34
|
+
- [Advanced Usage](#10-advanced-usage)
|
|
35
|
+
- [Contributing](#11-contributing)
|
|
36
|
+
- [License](#12-license)
|
|
11
37
|
|
|
12
38
|
## 2. Installation
|
|
13
39
|
|
|
@@ -21,7 +47,14 @@ npm install app-studio --save
|
|
|
21
47
|
|
|
22
48
|
### Element
|
|
23
49
|
|
|
24
|
-
The `Element` component is the
|
|
50
|
+
The `Element` component is the base for all other components. It handles responsiveness, shadows, margins, padding, and more.
|
|
51
|
+
|
|
52
|
+
#### Key Features
|
|
53
|
+
|
|
54
|
+
- Sets both `width` and `height` with the `size` prop.
|
|
55
|
+
- Defines styles for different CSS events with the `on` prop.
|
|
56
|
+
- Defines responsive styles for different media queries with the `media` prop.
|
|
57
|
+
- Applies shadow effects with the `shadow` prop.
|
|
25
58
|
|
|
26
59
|
#### Usage
|
|
27
60
|
|
|
@@ -31,16 +64,14 @@ The `Element` component is the foundation of App-Studio. It handles a large part
|
|
|
31
64
|
</Element>
|
|
32
65
|
```
|
|
33
66
|
|
|
34
|
-
|
|
67
|
+
### View
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
- `on`: Defines styles for different CSS events
|
|
38
|
-
- `media`: Defines styles for different media queries
|
|
39
|
-
- `shadow`: Adds shadow to an element (boolean, number, or `Shadow` object)
|
|
69
|
+
The `View` component extends the basic `div` HTML element. It's a generic container used to create various layouts.
|
|
40
70
|
|
|
41
|
-
|
|
71
|
+
#### Key Features
|
|
42
72
|
|
|
43
|
-
|
|
73
|
+
- Provides a flexible way to structure content.
|
|
74
|
+
- Supports all `Element` props.
|
|
44
75
|
|
|
45
76
|
#### Usage
|
|
46
77
|
|
|
@@ -52,7 +83,12 @@ The `View` component is a versatile layout component that extends the basic HTML
|
|
|
52
83
|
|
|
53
84
|
### Text
|
|
54
85
|
|
|
55
|
-
The `Text` component extends the
|
|
86
|
+
The `Text` component extends the basic `div` HTML element for rendering text content.
|
|
87
|
+
|
|
88
|
+
#### Key Features
|
|
89
|
+
|
|
90
|
+
- Provides text-specific styling options.
|
|
91
|
+
- Supports all `Element` props.
|
|
56
92
|
|
|
57
93
|
#### Usage
|
|
58
94
|
|
|
@@ -62,20 +98,31 @@ The `Text` component extends the HTML `div` tag with additional text styling pro
|
|
|
62
98
|
|
|
63
99
|
### Form
|
|
64
100
|
|
|
65
|
-
The `Form` component extends the
|
|
101
|
+
The `Form` component extends the basic `form` HTML element and provides nested `Form.Button` and `Form.Input` components.
|
|
102
|
+
|
|
103
|
+
#### Key Features
|
|
104
|
+
|
|
105
|
+
- Simplifies form creation and management.
|
|
106
|
+
- Supports all `Element` props.
|
|
66
107
|
|
|
67
108
|
#### Usage
|
|
68
109
|
|
|
69
110
|
```jsx
|
|
70
111
|
<Form>
|
|
71
|
-
<Input placeholder="Enter your name" />
|
|
72
|
-
<Button>Submit</Button>
|
|
112
|
+
<Form.Input placeholder="Enter your name" />
|
|
113
|
+
<Form.Button>Submit</Form.Button>
|
|
73
114
|
</Form>
|
|
74
115
|
```
|
|
75
116
|
|
|
76
117
|
### Image
|
|
77
118
|
|
|
78
|
-
The `Image` component extends the
|
|
119
|
+
The `Image` component extends the basic `img` HTML element for displaying images.
|
|
120
|
+
|
|
121
|
+
#### Key Features
|
|
122
|
+
|
|
123
|
+
- Supports responsive image loading with `media`.
|
|
124
|
+
- Applies shadow effects with `shadow`.
|
|
125
|
+
- Handles events with `on`.
|
|
79
126
|
|
|
80
127
|
#### Usage
|
|
81
128
|
|
|
@@ -305,7 +352,6 @@ All animations are available through the `Animation` object:
|
|
|
305
352
|
- `Animation.pulse()`
|
|
306
353
|
- And many more...
|
|
307
354
|
|
|
308
|
-
|
|
309
355
|
### Basic Usage
|
|
310
356
|
|
|
311
357
|
To apply an animation to a component, use the `animate` prop with an animation object:
|
|
@@ -316,7 +362,7 @@ import { View, Animation } from 'app-studio';
|
|
|
316
362
|
function Example() {
|
|
317
363
|
return (
|
|
318
364
|
<View
|
|
319
|
-
animate={Animation.fadeIn()}
|
|
365
|
+
animate={Animation.fadeIn()} // Fades in the view
|
|
320
366
|
backgroundColor="theme.primary"
|
|
321
367
|
padding={20}
|
|
322
368
|
>
|
|
@@ -330,32 +376,43 @@ function Example() {
|
|
|
330
376
|
|
|
331
377
|
App-Studio comes with a set of pre-defined animations that you can use out of the box:
|
|
332
378
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
-
|
|
336
|
-
- `
|
|
337
|
-
- `
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
379
|
+
#### Transition Animations
|
|
380
|
+
|
|
381
|
+
- `fadeIn` / `fadeOut`
|
|
382
|
+
- `slideInLeft` / `slideInRight` / `slideInUp` / `slideInDown`
|
|
383
|
+
- `zoomIn` / `zoomOut`
|
|
384
|
+
|
|
385
|
+
#### Transform Animations
|
|
386
|
+
|
|
387
|
+
- `rotate`
|
|
388
|
+
- `scale`
|
|
389
|
+
- `translate`
|
|
390
|
+
|
|
391
|
+
#### Effect Animations
|
|
392
|
+
|
|
393
|
+
- `bounce`
|
|
394
|
+
- `pulse`
|
|
395
|
+
- `flash`
|
|
396
|
+
- `shake`
|
|
397
|
+
- `swing`
|
|
398
|
+
- `rubberBand`
|
|
399
|
+
- `wobble`
|
|
400
|
+
- `flip`
|
|
401
|
+
- `heartBeat`
|
|
402
|
+
- `rollIn` / `rollOut`
|
|
403
|
+
- `lightSpeedIn` / `lightSpeedOut`
|
|
404
|
+
- `hinge`
|
|
405
|
+
- `jackInTheBox`
|
|
350
406
|
|
|
351
407
|
Each animation function accepts parameters to customize the duration, timing function, and other properties.
|
|
352
408
|
|
|
353
409
|
#### Animation Properties
|
|
354
410
|
|
|
355
411
|
Each animation function accepts an object with the following properties:
|
|
356
|
-
|
|
357
|
-
-
|
|
358
|
-
-
|
|
412
|
+
|
|
413
|
+
- `duration`: Length of the animation (e.g., '1s', '500ms')
|
|
414
|
+
- `timingFunction`: CSS timing function (e.g., 'ease', 'linear', 'ease-in-out')
|
|
415
|
+
- `iterationCount`: Number of times to play the animation (number or 'infinite') // e.g., '1', 'infinite'
|
|
359
416
|
|
|
360
417
|
## 10. Advanced Usage
|
|
361
418
|
|