@app-studio/web 0.9.41 → 0.9.44
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/dist/bot/Bot.d.ts +15 -0
- package/dist/bot/Cache.d.ts +13 -0
- package/dist/bot/Config.d.ts +13 -0
- package/dist/bot/ContentFetcher.d.ts +9 -0
- package/dist/bot/DocuCode.d.ts +19 -0
- package/dist/bot/FileHandler.d.ts +39 -0
- package/dist/bot/ai/AnthropicConnector.d.ts +6 -0
- package/dist/bot/ai/GeminiConnector.d.ts +7 -0
- package/dist/bot/ai/GroqConnector.d.ts +7 -0
- package/dist/bot/ai/HuggingFaceConnector.d.ts +6 -0
- package/dist/bot/ai/OpenAIConnector.d.ts +11 -0
- package/dist/bot/ai/ReplicateConnector.d.ts +7 -0
- package/dist/bot/ai/SambaNovaConnector.d.ts +6 -0
- package/dist/bot/ai/ai.config.d.ts +12 -0
- package/dist/bot/ai/ai.service.d.ts +36 -0
- package/dist/bot/data.d.ts +19 -0
- package/dist/bot/extractors.d.ts +8 -0
- package/dist/bot/index.d.ts +1 -0
- package/dist/bot/prompt/1-project.d.ts +1 -0
- package/dist/bot/prompt/2-response.d.ts +1 -0
- package/dist/bot/prompt/3-comment.d.ts +1 -0
- package/dist/components/Title/Title/SlideEffect.d.ts +14 -0
- package/dist/components/Title/Title/Title.props.d.ts +20 -0
- package/dist/components/Title/Title/Title.state.d.ts +4 -0
- package/dist/web.cjs.development.js +265 -78
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +265 -78
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +265 -78
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Accordion.mdx +74 -121
- package/docs/components/Alert.mdx +19 -70
- package/docs/components/AspectRatio.mdx +13 -11
- package/docs/components/AudioInput.mdx +43 -0
- package/docs/components/Avatar.mdx +18 -43
- package/docs/components/Background.mdx +100 -492
- package/docs/components/Badge.mdx +45 -130
- package/docs/components/Button.mdx +76 -128
- package/docs/components/Calendar.mdx +7 -7
- package/docs/components/Card.mdx +247 -290
- package/docs/components/Carousel.mdx +94 -321
- package/docs/components/Chart.mdx +171 -26
- package/docs/components/ChatInput.mdx +327 -275
- package/docs/components/Checkbox.mdx +3 -5
- package/docs/components/ColorInput.mdx +6 -6
- package/docs/components/ColorPicker.mdx +452 -0
- package/docs/components/ComboBox.mdx +13 -13
- package/docs/components/Command.mdx +140 -188
- package/docs/components/ContextMenu.mdx +47 -171
- package/docs/components/CookieConsent.mdx +53 -0
- package/docs/components/CountryPicker.mdx +8 -8
- package/docs/components/DatePicker.mdx +3 -3
- package/docs/components/DragAndDrop.mdx +279 -463
- package/docs/components/Drawer.mdx +392 -231
- package/docs/components/DropdownMenu.mdx +37 -155
- package/docs/components/EmojiPicker.mdx +84 -0
- package/docs/components/File.mdx +130 -4
- package/docs/components/Formik.mdx +39 -39
- package/docs/components/Gradient.mdx +359 -182
- package/docs/components/Horizontal.mdx +1 -2
- package/docs/components/HoverCard.mdx +57 -125
- package/docs/components/KanbanBoard.mdx +9 -9
- package/docs/components/Link.mdx +22 -30
- package/docs/components/Loader.mdx +230 -413
- package/docs/components/Menubar.mdx +73 -69
- package/docs/components/Message.mdx +210 -525
- package/docs/components/Modal.mdx +351 -475
- package/docs/components/NavigationMenu.mdx +8 -8
- package/docs/components/OTPInput.mdx +194 -0
- package/docs/components/Pagination.mdx +451 -107
- package/docs/components/Password.mdx +8 -8
- package/docs/components/ProgressBar.mdx +460 -0
- package/docs/components/Resizable.mdx +103 -102
- package/docs/components/Select.mdx +5 -5
- package/docs/components/Separator.mdx +11 -98
- package/docs/components/ShareButton.mdx +29 -0
- package/docs/components/Sidebar.mdx +70 -131
- package/docs/components/Slider.mdx +99 -185
- package/docs/components/StatusIndicator.mdx +373 -0
- package/docs/components/Switch.mdx +3 -3
- package/docs/components/Table.mdx +25 -105
- package/docs/components/Tabs.mdx +40 -143
- package/docs/components/TagInput.mdx +17 -17
- package/docs/components/Text.mdx +3 -3
- package/docs/components/TextArea.mdx +6 -6
- package/docs/components/TextField.mdx +12 -12
- package/docs/components/Title.mdx +267 -525
- package/docs/components/Toast.mdx +65 -142
- package/docs/components/Toggle.mdx +37 -49
- package/docs/components/ToggleGroup.mdx +36 -57
- package/docs/components/Tooltip.mdx +501 -138
- package/docs/components/Uploader.mdx +205 -351
- package/package.json +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
- package/dist/components/AuthGuard/index.d.ts +0 -1
- package/docs/adk-components.md +0 -319
- package/docs/adk-quick-start.md +0 -268
|
@@ -1,201 +1,260 @@
|
|
|
1
1
|
# Gradient
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A versatile gradient component supporting linear, radial, and conic gradients with animation capabilities.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Gradient } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Gradient } from '
|
|
13
|
+
import { Gradient } from '@app-studio/web';
|
|
14
14
|
|
|
15
|
-
export const
|
|
15
|
+
export const DefaultGradient = () => (
|
|
16
16
|
<Gradient
|
|
17
|
-
from="
|
|
18
|
-
to="
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
from="#3b82f6"
|
|
18
|
+
to="#8b5cf6"
|
|
19
|
+
width={300}
|
|
20
|
+
height={200}
|
|
21
21
|
/>
|
|
22
22
|
);
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### **type**
|
|
26
|
-
|
|
26
|
+
Type of gradient.
|
|
27
|
+
|
|
28
|
+
- **Type:** `GradientType`
|
|
29
|
+
- **Default:** `'linear'`
|
|
30
|
+
- **Possible Values:** `'linear' | 'radial' | 'conic'`
|
|
27
31
|
|
|
28
32
|
```tsx
|
|
29
33
|
import React from 'react';
|
|
30
|
-
import { Gradient } from '
|
|
31
|
-
import { Vertical } from '
|
|
32
|
-
import { Text } from '@app-studio/web';
|
|
33
|
-
|
|
34
|
-
export const TypesDemo = () => (
|
|
35
|
-
<Vertical gap={16}>
|
|
36
|
-
<Vertical gap={8}>
|
|
37
|
-
<Text fontWeight="500">Linear Gradient</Text>
|
|
38
|
-
<Gradient
|
|
39
|
-
type="linear"
|
|
40
|
-
from="color.blue.500"
|
|
41
|
-
to="color.purple.500"
|
|
42
|
-
height="100px"
|
|
43
|
-
width="100%"
|
|
44
|
-
/>
|
|
45
|
-
</Vertical>
|
|
34
|
+
import { Gradient } from '@app-studio/web';
|
|
35
|
+
import { Vertical } from 'app-studio';
|
|
46
36
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
width="100%"
|
|
71
|
-
/>
|
|
72
|
-
</Vertical>
|
|
37
|
+
export const GradientTypes = () => (
|
|
38
|
+
<Vertical gap={15}>
|
|
39
|
+
<Gradient
|
|
40
|
+
type="linear"
|
|
41
|
+
from="#3b82f6"
|
|
42
|
+
to="#8b5cf6"
|
|
43
|
+
width={300}
|
|
44
|
+
height={100}
|
|
45
|
+
/>
|
|
46
|
+
<Gradient
|
|
47
|
+
type="radial"
|
|
48
|
+
from="#3b82f6"
|
|
49
|
+
to="#8b5cf6"
|
|
50
|
+
width={300}
|
|
51
|
+
height={100}
|
|
52
|
+
/>
|
|
53
|
+
<Gradient
|
|
54
|
+
type="conic"
|
|
55
|
+
from="#3b82f6"
|
|
56
|
+
to="#8b5cf6"
|
|
57
|
+
width={300}
|
|
58
|
+
height={100}
|
|
59
|
+
/>
|
|
73
60
|
</Vertical>
|
|
74
61
|
);
|
|
75
62
|
```
|
|
76
63
|
|
|
77
|
-
### **
|
|
78
|
-
|
|
64
|
+
### **from & to**
|
|
65
|
+
Starting and ending colors for simple two-color gradients.
|
|
66
|
+
|
|
67
|
+
- **Type:** `string`
|
|
79
68
|
|
|
80
69
|
```tsx
|
|
81
70
|
import React from 'react';
|
|
82
|
-
import { Gradient } from '
|
|
83
|
-
import { Vertical } from '
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
<Horizontal gap={16} flexWrap="wrap">
|
|
91
|
-
{['to-right', 'to-left', 'to-bottom', 'to-top', '45deg'].map((direction) => (
|
|
92
|
-
<Vertical key={direction} gap={8} width="150px">
|
|
93
|
-
<Text fontSize="14px">{direction}</Text>
|
|
94
|
-
<Gradient
|
|
95
|
-
type="linear"
|
|
96
|
-
direction={direction}
|
|
97
|
-
from="color.blue.500"
|
|
98
|
-
to="color.purple.500"
|
|
99
|
-
height="100px"
|
|
100
|
-
width="100%"
|
|
101
|
-
/>
|
|
102
|
-
</Vertical>
|
|
103
|
-
))}
|
|
104
|
-
</Horizontal>
|
|
71
|
+
import { Gradient } from '@app-studio/web';
|
|
72
|
+
import { Vertical } from 'app-studio';
|
|
73
|
+
|
|
74
|
+
export const SimpleGradients = () => (
|
|
75
|
+
<Vertical gap={15}>
|
|
76
|
+
<Gradient from="#ef4444" to="#f59e0b" width={300} height={100} />
|
|
77
|
+
<Gradient from="#10b981" to="#3b82f6" width={300} height={100} />
|
|
78
|
+
<Gradient from="#8b5cf6" to="#ec4899" width={300} height={100} />
|
|
105
79
|
</Vertical>
|
|
106
80
|
);
|
|
107
81
|
```
|
|
108
82
|
|
|
109
|
-
### **
|
|
110
|
-
|
|
83
|
+
### **colors**
|
|
84
|
+
Array of color stops for multi-color gradients.
|
|
85
|
+
|
|
86
|
+
- **Type:** `ColorStop[]`
|
|
111
87
|
|
|
112
88
|
```tsx
|
|
113
89
|
import React from 'react';
|
|
114
|
-
import { Gradient } from '
|
|
90
|
+
import { Gradient } from '@app-studio/web';
|
|
115
91
|
|
|
116
|
-
export const
|
|
92
|
+
export const MultiColorGradient = () => (
|
|
117
93
|
<Gradient
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
94
|
+
colors={[
|
|
95
|
+
{ color: '#ef4444', position: 0 },
|
|
96
|
+
{ color: '#f59e0b', position: 25 },
|
|
97
|
+
{ color: '#10b981', position: 50 },
|
|
98
|
+
{ color: '#3b82f6', position: 75 },
|
|
99
|
+
{ color: '#8b5cf6', position: 100 },
|
|
100
|
+
]}
|
|
101
|
+
width={300}
|
|
102
|
+
height={100}
|
|
122
103
|
/>
|
|
123
104
|
);
|
|
124
105
|
```
|
|
125
106
|
|
|
126
|
-
### **
|
|
127
|
-
|
|
107
|
+
### **direction**
|
|
108
|
+
Direction for linear gradients.
|
|
109
|
+
|
|
110
|
+
- **Type:** `LinearDirection`
|
|
111
|
+
- **Default:** `'to-right'`
|
|
112
|
+
- **Possible Values:** `'to-top' | 'to-bottom' | 'to-left' | 'to-right' | 'to-top-right' | 'to-top-left' | 'to-bottom-right' | 'to-bottom-left'`
|
|
128
113
|
|
|
129
114
|
```tsx
|
|
130
115
|
import React from 'react';
|
|
131
|
-
import { Gradient } from '
|
|
132
|
-
import { Vertical } from '
|
|
133
|
-
import { Text } from '@app-studio/web';
|
|
116
|
+
import { Gradient } from '@app-studio/web';
|
|
117
|
+
import { Vertical } from 'app-studio';
|
|
134
118
|
|
|
135
|
-
export const
|
|
136
|
-
<Vertical gap={
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
119
|
+
export const DirectionalGradients = () => (
|
|
120
|
+
<Vertical gap={15}>
|
|
121
|
+
{[
|
|
122
|
+
'to-right',
|
|
123
|
+
'to-bottom',
|
|
124
|
+
'to-top-right',
|
|
125
|
+
'to-bottom-left',
|
|
126
|
+
].map((direction) => (
|
|
141
127
|
<Gradient
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
height="100px"
|
|
149
|
-
width="100%"
|
|
128
|
+
key={direction}
|
|
129
|
+
direction={direction as any}
|
|
130
|
+
from="#3b82f6"
|
|
131
|
+
to="#8b5cf6"
|
|
132
|
+
width={300}
|
|
133
|
+
height={100}
|
|
150
134
|
/>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
135
|
+
))}
|
|
136
|
+
</Vertical>
|
|
137
|
+
);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### **shape**
|
|
141
|
+
Shape for radial gradients.
|
|
142
|
+
|
|
143
|
+
- **Type:** `RadialShape`
|
|
144
|
+
- **Default:** `'circle'`
|
|
145
|
+
- **Possible Values:** `'circle' | 'ellipse'`
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import React from 'react';
|
|
149
|
+
import { Gradient } from '@app-studio/web';
|
|
150
|
+
import { Horizontal } from 'app-studio';
|
|
151
|
+
|
|
152
|
+
export const RadialShapes = () => (
|
|
153
|
+
<Horizontal gap={15}>
|
|
154
|
+
<Gradient
|
|
155
|
+
type="radial"
|
|
156
|
+
shape="circle"
|
|
157
|
+
from="#3b82f6"
|
|
158
|
+
to="#8b5cf6"
|
|
159
|
+
width={200}
|
|
160
|
+
height={200}
|
|
161
|
+
/>
|
|
162
|
+
<Gradient
|
|
163
|
+
type="radial"
|
|
164
|
+
shape="ellipse"
|
|
165
|
+
from="#3b82f6"
|
|
166
|
+
to="#8b5cf6"
|
|
167
|
+
width={300}
|
|
168
|
+
height={200}
|
|
169
|
+
/>
|
|
170
|
+
</Horizontal>
|
|
171
|
+
);
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### **position**
|
|
175
|
+
Position for radial gradients.
|
|
176
|
+
|
|
177
|
+
- **Type:** `RadialPosition`
|
|
178
|
+
- **Default:** `'center'`
|
|
179
|
+
- **Possible Values:** `'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'`
|
|
180
|
+
|
|
181
|
+
```tsx
|
|
182
|
+
import React from 'react';
|
|
183
|
+
import { Gradient } from '@app-studio/web';
|
|
184
|
+
import { Vertical } from 'app-studio';
|
|
185
|
+
|
|
186
|
+
export const RadialPositions = () => (
|
|
187
|
+
<Vertical gap={15}>
|
|
188
|
+
{[
|
|
189
|
+
'center',
|
|
190
|
+
'top-left',
|
|
191
|
+
'top-right',
|
|
192
|
+
'bottom-left',
|
|
193
|
+
].map((position) => (
|
|
155
194
|
<Gradient
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
{ color: 'color.indigo.500', position: '83.33%' },
|
|
164
|
-
{ color: 'color.purple.500', position: '100%' }
|
|
165
|
-
]}
|
|
166
|
-
height="100px"
|
|
167
|
-
width="100%"
|
|
195
|
+
key={position}
|
|
196
|
+
type="radial"
|
|
197
|
+
position={position as any}
|
|
198
|
+
from="#3b82f6"
|
|
199
|
+
to="#8b5cf6"
|
|
200
|
+
width={300}
|
|
201
|
+
height={100}
|
|
168
202
|
/>
|
|
169
|
-
|
|
203
|
+
))}
|
|
170
204
|
</Vertical>
|
|
171
205
|
);
|
|
172
206
|
```
|
|
173
207
|
|
|
174
208
|
### **animate**
|
|
175
|
-
|
|
209
|
+
Whether to animate the gradient.
|
|
210
|
+
|
|
211
|
+
- **Type:** `boolean`
|
|
212
|
+
- **Default:** `false`
|
|
176
213
|
|
|
177
214
|
```tsx
|
|
178
215
|
import React from 'react';
|
|
179
|
-
import { Gradient } from '
|
|
180
|
-
import { Vertical } from '@app-studio/web';
|
|
181
|
-
import { Text } from '@app-studio/web';
|
|
216
|
+
import { Gradient } from '@app-studio/web';
|
|
182
217
|
|
|
183
|
-
export const
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
218
|
+
export const AnimatedGradient = () => (
|
|
219
|
+
<Gradient
|
|
220
|
+
from="#3b82f6"
|
|
221
|
+
to="#8b5cf6"
|
|
222
|
+
animate
|
|
223
|
+
width={300}
|
|
224
|
+
height={200}
|
|
225
|
+
/>
|
|
226
|
+
);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### **animationDuration**
|
|
230
|
+
Animation duration in seconds.
|
|
231
|
+
|
|
232
|
+
- **Type:** `number`
|
|
233
|
+
- **Default:** `3`
|
|
234
|
+
|
|
235
|
+
```tsx
|
|
236
|
+
import React from 'react';
|
|
237
|
+
import { Gradient } from '@app-studio/web';
|
|
238
|
+
import { Vertical } from 'app-studio';
|
|
239
|
+
|
|
240
|
+
export const AnimationDurations = () => (
|
|
241
|
+
<Vertical gap={15}>
|
|
242
|
+
<Gradient
|
|
243
|
+
from="#3b82f6"
|
|
244
|
+
to="#8b5cf6"
|
|
245
|
+
animate
|
|
246
|
+
animationDuration={1}
|
|
247
|
+
width={300}
|
|
248
|
+
height={80}
|
|
249
|
+
/>
|
|
250
|
+
<Gradient
|
|
251
|
+
from="#3b82f6"
|
|
252
|
+
to="#8b5cf6"
|
|
253
|
+
animate
|
|
254
|
+
animationDuration={5}
|
|
255
|
+
width={300}
|
|
256
|
+
height={80}
|
|
257
|
+
/>
|
|
199
258
|
</Vertical>
|
|
200
259
|
);
|
|
201
260
|
```
|
|
@@ -203,69 +262,187 @@ export const AnimatedDemo = () => (
|
|
|
203
262
|
### **children**
|
|
204
263
|
Content to render inside the gradient.
|
|
205
264
|
|
|
265
|
+
- **Type:** `React.ReactNode`
|
|
266
|
+
|
|
206
267
|
```tsx
|
|
207
268
|
import React from 'react';
|
|
208
|
-
import { Gradient } from '
|
|
209
|
-
import {
|
|
210
|
-
import { Text } from '@app-studio/web';
|
|
211
|
-
import { Button } from '../../Button/Button';
|
|
212
|
-
import { Center } from '@app-studio/web';
|
|
269
|
+
import { Gradient } from '@app-studio/web';
|
|
270
|
+
import { Text, Center } from 'app-studio';
|
|
213
271
|
|
|
214
|
-
export const
|
|
272
|
+
export const GradientWithContent = () => (
|
|
215
273
|
<Gradient
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
height=
|
|
220
|
-
|
|
221
|
-
borderRadius="12px"
|
|
274
|
+
from="#3b82f6"
|
|
275
|
+
to="#8b5cf6"
|
|
276
|
+
width={300}
|
|
277
|
+
height={200}
|
|
278
|
+
borderRadius={16}
|
|
222
279
|
>
|
|
223
|
-
<Center height="100%">
|
|
224
|
-
<
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
</Text>
|
|
228
|
-
<Button backgroundColor="color.white" color="color.purple.600">
|
|
229
|
-
Get Started
|
|
230
|
-
</Button>
|
|
231
|
-
</Vertical>
|
|
280
|
+
<Center width="100%" height="100%">
|
|
281
|
+
<Text color="#ffffff" fontSize={24} fontWeight="bold">
|
|
282
|
+
Gradient Background
|
|
283
|
+
</Text>
|
|
232
284
|
</Center>
|
|
233
285
|
</Gradient>
|
|
234
286
|
);
|
|
235
287
|
```
|
|
236
288
|
|
|
237
289
|
### **views**
|
|
238
|
-
Custom
|
|
290
|
+
Custom styles for the gradient.
|
|
291
|
+
|
|
292
|
+
- **Type:** `GradientStyles`
|
|
239
293
|
|
|
240
294
|
```tsx
|
|
241
295
|
import React from 'react';
|
|
242
|
-
import { Gradient } from '
|
|
243
|
-
import { Center } from '@app-studio/web';
|
|
244
|
-
import { Text } from '@app-studio/web';
|
|
296
|
+
import { Gradient } from '@app-studio/web';
|
|
245
297
|
|
|
246
|
-
export const
|
|
298
|
+
export const StyledGradient = () => (
|
|
247
299
|
<Gradient
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
]}
|
|
253
|
-
height="150px"
|
|
254
|
-
width="100%"
|
|
255
|
-
borderRadius="12px"
|
|
300
|
+
from="#3b82f6"
|
|
301
|
+
to="#8b5cf6"
|
|
302
|
+
width={300}
|
|
303
|
+
height={200}
|
|
256
304
|
views={{
|
|
257
305
|
container: {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
306
|
+
borderRadius: 20,
|
|
307
|
+
boxShadow: '0 10px 30px rgba(0,0,0,0.2)',
|
|
308
|
+
border: '2px solid #ffffff',
|
|
261
309
|
}
|
|
262
310
|
}}
|
|
311
|
+
/>
|
|
312
|
+
);
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### **Complex Gradients**
|
|
316
|
+
Creating sophisticated gradient effects.
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
import React from 'react';
|
|
320
|
+
import { Gradient } from '@app-studio/web';
|
|
321
|
+
import { Vertical } from 'app-studio';
|
|
322
|
+
|
|
323
|
+
export const ComplexGradients = () => (
|
|
324
|
+
<Vertical gap={20}>
|
|
325
|
+
{/* Sunset gradient */}
|
|
326
|
+
<Gradient
|
|
327
|
+
colors={[
|
|
328
|
+
{ color: '#ff6b6b', position: 0 },
|
|
329
|
+
{ color: '#feca57', position: 50 },
|
|
330
|
+
{ color: '#ee5a6f', position: 100 },
|
|
331
|
+
]}
|
|
332
|
+
direction="to-bottom"
|
|
333
|
+
width={300}
|
|
334
|
+
height={150}
|
|
335
|
+
borderRadius={12}
|
|
336
|
+
/>
|
|
337
|
+
|
|
338
|
+
{/* Ocean gradient */}
|
|
339
|
+
<Gradient
|
|
340
|
+
type="radial"
|
|
341
|
+
colors={[
|
|
342
|
+
{ color: '#667eea', position: 0 },
|
|
343
|
+
{ color: '#764ba2', position: 50 },
|
|
344
|
+
{ color: '#f093fb', position: 100 },
|
|
345
|
+
]}
|
|
346
|
+
width={300}
|
|
347
|
+
height={150}
|
|
348
|
+
borderRadius={12}
|
|
349
|
+
/>
|
|
350
|
+
|
|
351
|
+
{/* Rainbow conic */}
|
|
352
|
+
<Gradient
|
|
353
|
+
type="conic"
|
|
354
|
+
colors={[
|
|
355
|
+
{ color: '#ff0000', position: 0 },
|
|
356
|
+
{ color: '#ff7f00', position: 14 },
|
|
357
|
+
{ color: '#ffff00', position: 28 },
|
|
358
|
+
{ color: '#00ff00', position: 42 },
|
|
359
|
+
{ color: '#0000ff', position: 57 },
|
|
360
|
+
{ color: '#4b0082', position: 71 },
|
|
361
|
+
{ color: '#9400d3', position: 85 },
|
|
362
|
+
{ color: '#ff0000', position: 100 },
|
|
363
|
+
]}
|
|
364
|
+
width={200}
|
|
365
|
+
height={200}
|
|
366
|
+
borderRadius="50%"
|
|
367
|
+
/>
|
|
368
|
+
</Vertical>
|
|
369
|
+
);
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### **Card with Gradient Background**
|
|
373
|
+
Using gradient as a card background.
|
|
374
|
+
|
|
375
|
+
```tsx
|
|
376
|
+
import React from 'react';
|
|
377
|
+
import { Gradient } from '@app-studio/web';
|
|
378
|
+
import { Text, Vertical, Button } from 'app-studio';
|
|
379
|
+
|
|
380
|
+
export const GradientCard = () => (
|
|
381
|
+
<Gradient
|
|
382
|
+
from="#667eea"
|
|
383
|
+
to="#764ba2"
|
|
384
|
+
width={350}
|
|
385
|
+
borderRadius={16}
|
|
386
|
+
boxShadow="0 10px 40px rgba(0,0,0,0.2)"
|
|
263
387
|
>
|
|
264
|
-
<
|
|
265
|
-
<Text color="
|
|
266
|
-
|
|
388
|
+
<Vertical gap={20} padding={30}>
|
|
389
|
+
<Text color="#ffffff" fontSize={28} fontWeight="bold">
|
|
390
|
+
Premium Plan
|
|
391
|
+
</Text>
|
|
392
|
+
<Text color="#ffffff" fontSize={48} fontWeight="bold">
|
|
393
|
+
$99
|
|
394
|
+
<Text as="span" fontSize={20}>/month</Text>
|
|
395
|
+
</Text>
|
|
396
|
+
<Vertical gap={10}>
|
|
397
|
+
<Text color="#ffffff">✓ Unlimited projects</Text>
|
|
398
|
+
<Text color="#ffffff">✓ Priority support</Text>
|
|
399
|
+
<Text color="#ffffff">✓ Advanced analytics</Text>
|
|
400
|
+
</Vertical>
|
|
401
|
+
<Button
|
|
402
|
+
backgroundColor="#ffffff"
|
|
403
|
+
color="#667eea"
|
|
404
|
+
isFullWidth
|
|
405
|
+
>
|
|
406
|
+
Get Started
|
|
407
|
+
</Button>
|
|
408
|
+
</Vertical>
|
|
409
|
+
</Gradient>
|
|
410
|
+
);
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### **Animated Background**
|
|
414
|
+
Creating an animated gradient background.
|
|
415
|
+
|
|
416
|
+
```tsx
|
|
417
|
+
import React from 'react';
|
|
418
|
+
import { Gradient } from '@app-studio/web';
|
|
419
|
+
import { Text, Center } from 'app-studio';
|
|
420
|
+
|
|
421
|
+
export const AnimatedBackground = () => (
|
|
422
|
+
<Gradient
|
|
423
|
+
colors={[
|
|
424
|
+
{ color: '#ee7752', position: 0 },
|
|
425
|
+
{ color: '#e73c7e', position: 33 },
|
|
426
|
+
{ color: '#23a6d5', position: 66 },
|
|
427
|
+
{ color: '#23d5ab', position: 100 },
|
|
428
|
+
]}
|
|
429
|
+
direction="to-right"
|
|
430
|
+
animate
|
|
431
|
+
animationDuration={4}
|
|
432
|
+
width="100%"
|
|
433
|
+
height={400}
|
|
434
|
+
>
|
|
435
|
+
<Center width="100%" height="100%">
|
|
436
|
+
<Text
|
|
437
|
+
color="#ffffff"
|
|
438
|
+
fontSize={40}
|
|
439
|
+
fontWeight="bold"
|
|
440
|
+
textAlign="center"
|
|
441
|
+
>
|
|
442
|
+
Animated Gradient
|
|
267
443
|
</Text>
|
|
268
444
|
</Center>
|
|
269
445
|
</Gradient>
|
|
270
446
|
);
|
|
271
447
|
```
|
|
448
|
+
|
|
@@ -11,8 +11,7 @@ Aligns child components horizontally, with optional reverse order.
|
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
|
-
import { View } from '@app-studio/web';
|
|
15
|
-
import { Horizontal } from '../../Horizontal/Horizontal';
|
|
14
|
+
import { View, Horizontal } from '@app-studio/web';
|
|
16
15
|
|
|
17
16
|
export const DefaultHorizontal = () => (
|
|
18
17
|
<Horizontal>
|