@app-studio/web 0.9.31 → 0.9.32

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 (60) hide show
  1. package/docs/components/Accordion.mdx +158 -0
  2. package/docs/components/Alert.mdx +123 -0
  3. package/docs/components/AspectRatio.mdx +55 -0
  4. package/docs/components/Avatar.mdx +85 -0
  5. package/docs/components/Background.mdx +522 -0
  6. package/docs/components/Badge.mdx +220 -0
  7. package/docs/components/Button.mdx +272 -0
  8. package/docs/components/Calendar.mdx +274 -0
  9. package/docs/components/Card.mdx +341 -0
  10. package/docs/components/Carousel.mdx +411 -0
  11. package/docs/components/Center.mdx +474 -0
  12. package/docs/components/Chart.mdx +232 -0
  13. package/docs/components/ChatInput.mdx +373 -0
  14. package/docs/components/Checkbox.mdx +66 -0
  15. package/docs/components/ColorInput.mdx +209 -0
  16. package/docs/components/ComboBox.mdx +364 -0
  17. package/docs/components/Command.mdx +252 -0
  18. package/docs/components/ContextMenu.mdx +219 -0
  19. package/docs/components/CountryPicker.mdx +123 -0
  20. package/docs/components/DatePicker.mdx +77 -0
  21. package/docs/components/DragAndDrop.mdx +539 -0
  22. package/docs/components/DropdownMenu.mdx +205 -0
  23. package/docs/components/File.mdx +8 -0
  24. package/docs/components/Flow.mdx +257 -0
  25. package/docs/components/Form.mdx +681 -0
  26. package/docs/components/Formik.mdx +621 -0
  27. package/docs/components/Gradient.mdx +271 -0
  28. package/docs/components/Horizontal.mdx +40 -0
  29. package/docs/components/HoverCard.mdx +140 -0
  30. package/docs/components/Icon.mdx +438 -0
  31. package/docs/components/Label.mdx +438 -0
  32. package/docs/components/Link.mdx +83 -0
  33. package/docs/components/Loader.mdx +527 -0
  34. package/docs/components/Menubar.mdx +124 -0
  35. package/docs/components/Message.mdx +571 -0
  36. package/docs/components/Modal.mdx +533 -0
  37. package/docs/components/NavigationMenu.mdx +165 -0
  38. package/docs/components/Pagination.mdx +150 -0
  39. package/docs/components/Password.mdx +121 -0
  40. package/docs/components/Resizable.mdx +148 -0
  41. package/docs/components/Select.mdx +126 -0
  42. package/docs/components/Separator.mdx +121 -0
  43. package/docs/components/Sidebar.mdx +147 -0
  44. package/docs/components/Slider.mdx +232 -0
  45. package/docs/components/Switch.mdx +62 -0
  46. package/docs/components/Table.mdx +409 -0
  47. package/docs/components/Tabs.mdx +215 -0
  48. package/docs/components/TagInput.mdx +528 -0
  49. package/docs/components/Text.mdx +163 -0
  50. package/docs/components/TextArea.mdx +136 -0
  51. package/docs/components/TextField.mdx +225 -0
  52. package/docs/components/Title.mdx +535 -0
  53. package/docs/components/Toast.mdx +165 -0
  54. package/docs/components/Toggle.mdx +141 -0
  55. package/docs/components/ToggleGroup.mdx +165 -0
  56. package/docs/components/Tooltip.mdx +191 -0
  57. package/docs/components/Tree.mdx +340 -0
  58. package/docs/components/Uploader.mdx +426 -0
  59. package/docs/components/Vertical.mdx +566 -0
  60. package/package.json +1 -1
@@ -0,0 +1,522 @@
1
+ # Background
2
+
3
+ A comprehensive collection of background effects including animated backgrounds (Aurora, Meteors, Particles), background images with overlays, and gradient backgrounds. Perfect for creating engaging visual experiences in your applications.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { Background } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Aurora Background**
11
+ Creates a beautiful animated aurora gradient background effect.
12
+
13
+ ```tsx
14
+ import React from 'react';
15
+ import { Background } from '../Background';
16
+ import { Text } from '../../Text/Text';
17
+
18
+ export const AuroraDemo = () => (
19
+ <Background.Aurora height="300px" showRadialGradient={true}>
20
+ <Text color="white" fontSize={20}>
21
+ Aurora Effect Background
22
+ </Text>
23
+ </Background.Aurora>
24
+ );
25
+ ```
26
+
27
+ ### **Meteors Effect**
28
+ Animated falling meteors effect with customizable count.
29
+
30
+ ```tsx
31
+ import React from 'react';
32
+ import { Background } from '../Background';
33
+ import { Text } from '../../Text/Text';
34
+
35
+ export const MeteorsDemo = () => (
36
+ <Background.Meteors number={20} height="300px">
37
+ <Text color="white" fontSize={20}>
38
+ Meteors Effect Background
39
+ </Text>
40
+ </Background.Meteors>
41
+ );
42
+ ```
43
+
44
+ ### **Wall Effect**
45
+ Interactive grid wall with hover color effects.
46
+
47
+ ```tsx
48
+ import React from 'react';
49
+ import { Background } from '../Background';
50
+
51
+ export const WallDemo = () => (
52
+ <Background.Wall rows={15} cols={10} squareSize={40} />
53
+ );
54
+ ```
55
+
56
+ ### **Particles Effect**
57
+ Floating animated particles with customizable shapes and colors.
58
+
59
+ ```tsx
60
+ import React from 'react';
61
+ import { Background } from '../Background';
62
+
63
+ export const ParticlesDemo = () => (
64
+ <Background.Particles
65
+ count={50}
66
+ speed="medium"
67
+ shapes={['circle', 'square', 'triangle']}
68
+ />
69
+ );
70
+ ```
71
+
72
+ ### **Grid Effect**
73
+ Animated geometric grid with pulsing cells.
74
+
75
+ ```tsx
76
+ import React from 'react';
77
+ import { Background } from '../Background';
78
+
79
+ export const GridDemo = () => (
80
+ <Background.Grid
81
+ gridSize={30}
82
+ animationSpeed="medium"
83
+ />
84
+ );
85
+ ```
86
+
87
+ ### **Ripples Effect**
88
+ Expanding circular ripples from random points.
89
+
90
+ ```tsx
91
+ import React from 'react';
92
+ import { Background } from '../Background';
93
+
94
+ export const RipplesDemo = () => (
95
+ <Background.Ripples
96
+ rippleCount={5}
97
+ maxSize={200}
98
+ frequency={3}
99
+ />
100
+ );
101
+ ```
102
+
103
+ ### **Background Image**
104
+ Display images as backgrounds with overlay support and blend modes.
105
+
106
+ ```tsx
107
+ import React from 'react';
108
+ import { Background } from '../Background';
109
+ import { Text } from '../../Text/Text';
110
+
111
+ export const BackgroundImageDemo = () => (
112
+ <Background.Image
113
+ src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=400&fit=crop"
114
+ height="300px"
115
+ backgroundSize="cover"
116
+ overlay="rgba(0,0,0,0.4)"
117
+ blendMode="multiply"
118
+ >
119
+ <Text color="white" fontSize={20} fontWeight="600">
120
+ Beautiful Image Background
121
+ </Text>
122
+ </Background.Image>
123
+ );
124
+ ```
125
+
126
+ ### **Background Gradient**
127
+ Create beautiful gradient backgrounds with animation support.
128
+
129
+ ```tsx
130
+ import React from 'react';
131
+ import { Background } from '../Background';
132
+ import { Text } from '../../Text/Text';
133
+
134
+ // Simple two-color gradient
135
+ export const SimpleGradientDemo = () => (
136
+ <Background.Gradient
137
+ from="color.blue.500"
138
+ to="color.purple.500"
139
+ height="300px"
140
+ animate={true}
141
+ animationDuration={4}
142
+ >
143
+ <Text color="white" fontSize={20} fontWeight="600">
144
+ Animated Gradient
145
+ </Text>
146
+ </Background.Gradient>
147
+ );
148
+
149
+ // Multi-color radial gradient
150
+ export const RadialGradientDemo = () => (
151
+ <Background.Gradient
152
+ type="radial"
153
+ colors={[
154
+ { color: 'color.red.500', position: '0%' },
155
+ { color: 'color.orange.500', position: '50%' },
156
+ { color: 'color.yellow.500', position: '100%' },
157
+ ]}
158
+ height="300px"
159
+ shape="ellipse"
160
+ position="center"
161
+ >
162
+ <Text color="white" fontSize={20} fontWeight="600">
163
+ Radial Multi-color Gradient
164
+ </Text>
165
+ </Background.Gradient>
166
+ );
167
+
168
+ // Conic gradient
169
+ export const ConicGradientDemo = () => (
170
+ <Background.Gradient
171
+ type="conic"
172
+ colors={[
173
+ { color: 'color.blue.500', position: '0deg' },
174
+ { color: 'color.green.500', position: '120deg' },
175
+ { color: 'color.red.500', position: '240deg' },
176
+ { color: 'color.blue.500', position: '360deg' },
177
+ ]}
178
+ height="300px"
179
+ animate={true}
180
+ >
181
+ <Text color="white" fontSize={20} fontWeight="600">
182
+ Animated Conic Gradient
183
+ </Text>
184
+ </Background.Gradient>
185
+ );
186
+ ```
187
+
188
+ ### **Border Moving Button**
189
+ Button with animated moving gradient border.
190
+
191
+ ```tsx
192
+ import React from 'react';
193
+ import { Background } from '../Background';
194
+
195
+ export const BorderButtonDemo = () => (
196
+ <Background.BorderMovingButton
197
+ duration={2}
198
+ borderRadius={25}
199
+ gradientColors={['#705CFF', '#FF5C97', '#FFC75C']}
200
+ >
201
+ Click Me
202
+ </Background.BorderMovingButton>
203
+ );
204
+ ```
205
+
206
+ ### **Animated Stroke Button**
207
+ Button with animated stroke effect on hover.
208
+
209
+ ```tsx
210
+ import React from 'react';
211
+ import { Background } from '../Background';
212
+
213
+ export const StrokeButtonDemo = () => (
214
+ <Background.AnimatedStrokeButton
215
+ text="Hover Me"
216
+ width={300}
217
+ height={60}
218
+ accentColor="color.blue.500"
219
+ textColor="color.gray.800"
220
+ onClick={() => console.log('Clicked!')}
221
+ />
222
+ );
223
+ ```
224
+
225
+ ### **Combined Effects**
226
+ Multiple background effects can be combined for rich visual experiences.
227
+
228
+ ```tsx
229
+ import React from 'react';
230
+ import { Background } from '../Background';
231
+ import { Text } from '../../Text/Text';
232
+ import { Vertical, Horizontal } from 'app-studio';
233
+
234
+ // Aurora with content
235
+ export const CombinedAuroraDemo = () => (
236
+ <Background.Aurora height="400px" showRadialGradient={true}>
237
+ <Vertical alignItems="center" gap={24}>
238
+ <Text color="white" fontSize={24} fontWeight="600">
239
+ Welcome to the Future
240
+ </Text>
241
+
242
+ <Horizontal gap={16}>
243
+ <Background.BorderMovingButton duration={2}>
244
+ Get Started
245
+ </Background.BorderMovingButton>
246
+
247
+ <Background.AnimatedStrokeButton
248
+ text="Learn More"
249
+ accentColor="white"
250
+ textColor="white"
251
+ />
252
+ </Horizontal>
253
+ </Vertical>
254
+ </Background.Aurora>
255
+ );
256
+
257
+ // Image with gradient overlay
258
+ export const ImageGradientOverlayDemo = () => (
259
+ <Background.Image
260
+ src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=400&fit=crop"
261
+ height="400px"
262
+ backgroundSize="cover"
263
+ overlay="linear-gradient(45deg, rgba(59, 130, 246, 0.8), rgba(147, 51, 234, 0.8))"
264
+ blendMode="overlay"
265
+ >
266
+ <Vertical alignItems="center" gap={24}>
267
+ <Text color="white" fontSize={28} fontWeight="700">
268
+ Stunning Visuals
269
+ </Text>
270
+ <Text color="white" fontSize={16} textAlign="center" maxWidth="400px">
271
+ Combine beautiful images with gradient overlays for captivating designs
272
+ </Text>
273
+ </Vertical>
274
+ </Background.Image>
275
+ );
276
+
277
+ // Layered backgrounds
278
+ export const LayeredBackgroundDemo = () => (
279
+ <Background.Gradient
280
+ from="color.indigo.900"
281
+ to="color.purple.900"
282
+ height="400px"
283
+ >
284
+ <Background.Particles
285
+ count={30}
286
+ speed="slow"
287
+ shapes={['circle']}
288
+ colors={['rgba(255,255,255,0.3)', 'rgba(147,51,234,0.5)']}
289
+ />
290
+ <Vertical alignItems="center" gap={24} style={{ position: 'relative', zIndex: 2 }}>
291
+ <Text color="white" fontSize={24} fontWeight="600">
292
+ Layered Effects
293
+ </Text>
294
+ <Text color="white" fontSize={16} textAlign="center">
295
+ Gradient background with floating particles
296
+ </Text>
297
+ </Vertical>
298
+ </Background.Gradient>
299
+ );
300
+ ```
301
+
302
+ ## Props
303
+
304
+ ### Aurora Background Props
305
+ - `showRadialGradient?: boolean` - Whether to apply radial gradient mask
306
+ - `children?: ReactNode` - Content to display over the aurora
307
+ - `height?: string | number` - Height of the aurora container
308
+
309
+ ### Meteors Props
310
+ - `number?: number` - Number of meteors to display (default: 20)
311
+ - `width?: number` - Container width
312
+ - `height?: number` - Container height
313
+
314
+ ### Wall Props
315
+ - `rows?: number` - Number of rows in the grid (default: 15)
316
+ - `cols?: number` - Number of columns in the grid (default: 10)
317
+ - `squareSize?: number` - Size of each grid square (default: 40)
318
+ - `width?: number` - Container width
319
+ - `height?: number` - Container height
320
+
321
+ ### Particles Props
322
+ - `count?: number` - Number of particles to display (default: 50)
323
+ - `colors?: string[]` - Array of particle colors (default: blue/purple/pink palette)
324
+ - `speed?: 'slow' | 'medium' | 'fast'` - Animation speed (default: 'medium')
325
+ - `shapes?: ('circle' | 'square' | 'triangle')[]` - Particle shapes (default: ['circle'])
326
+ - `width?: number` - Container width
327
+ - `height?: number` - Container height
328
+
329
+ ### Grid Props
330
+ - `gridSize?: number` - Size of each grid cell in pixels (default: 30)
331
+ - `lineColor?: string` - Color of grid lines (default: 'rgba(59, 130, 246, 0.3)')
332
+ - `pulseColor?: string` - Color of pulsing cells (default: 'rgba(59, 130, 246, 0.8)')
333
+ - `animationSpeed?: 'slow' | 'medium' | 'fast'` - Speed of pulse animation (default: 'medium')
334
+ - `width?: number` - Container width
335
+ - `height?: number` - Container height
336
+
337
+ ### Ripples Props
338
+ - `rippleCount?: number` - Number of ripple sources (default: 5)
339
+ - `colors?: string[]` - Array of ripple colors (default: blue/purple/pink/green palette)
340
+ - `maxSize?: number` - Maximum ripple size in pixels (default: 200)
341
+ - `frequency?: number` - Ripple generation frequency (default: 3)
342
+ - `width?: number` - Container width
343
+ - `height?: number` - Container height
344
+
345
+ ### Background Image Props
346
+ - `src: string` - **Required.** Image source URL
347
+ - `backgroundSize?: string` - How the image should be sized ('cover', 'contain', 'auto', or custom) (default: 'cover')
348
+ - `backgroundPosition?: string` - Image position ('center', 'top', 'bottom', 'left', 'right', or custom) (default: 'center')
349
+ - `backgroundRepeat?: string` - Image repeat behavior ('no-repeat', 'repeat', 'repeat-x', 'repeat-y', 'space', 'round') (default: 'no-repeat')
350
+ - `backgroundAttachment?: string` - Scroll behavior ('scroll', 'fixed', 'local') (default: 'scroll')
351
+ - `imageOpacity?: number` - Image opacity (0-1) (default: 1)
352
+ - `overlay?: string` - Overlay color or gradient to blend with image
353
+ - `blendMode?: string` - CSS blend mode for overlay ('normal', 'multiply', 'screen', 'overlay', etc.) (default: 'normal')
354
+ - `children?: ReactNode` - Content to display over the image
355
+ - `width?: number` - Container width
356
+ - `height?: number` - Container height
357
+
358
+ ### Background Gradient Props
359
+ *Inherits all props from the Gradient component:*
360
+
361
+ - `type?: 'linear' | 'radial' | 'conic'` - Type of gradient (default: 'linear')
362
+ - `direction?: string` - Direction for linear gradients ('to-right', 'to-left', 'to-bottom', 'to-top', or custom angle) (default: 'to-right')
363
+ - `shape?: 'circle' | 'ellipse'` - Shape for radial gradients (default: 'circle')
364
+ - `position?: string` - Position for radial/conic gradients ('center', 'top', 'bottom', etc.) (default: 'center')
365
+ - `from?: string` - Starting color for simple two-color gradients
366
+ - `to?: string` - Ending color for simple two-color gradients
367
+ - `colors?: ColorStop[]` - Array of color stops for multi-color gradients (takes precedence over from/to)
368
+ - `animate?: boolean` - Whether to animate the gradient (default: false)
369
+ - `animationDuration?: number` - Animation duration in seconds (default: 3)
370
+ - `children?: ReactNode` - Content to display over the gradient
371
+ - `width?: number` - Container width
372
+ - `height?: number` - Container height
373
+
374
+ #### ColorStop Interface
375
+ ```tsx
376
+ interface ColorStop {
377
+ color: string; // Color value (supports theme colors like 'color.blue.500')
378
+ position?: string; // Position as percentage ('0%', '50%', '100%') or angle for conic
379
+ }
380
+ ```
381
+
382
+ ### Border Moving Button Props
383
+ - `children: ReactNode` - Button content
384
+ - `duration?: number` - Animation duration in seconds (default: 2)
385
+ - `borderRadius?: number` - Border radius (default: 50)
386
+ - `gradientColors?: string[]` - Array of gradient colors
387
+ - `width?: number` - Button width (default: 300)
388
+ - `height?: number` - Button height (default: 64)
389
+
390
+ ### Animated Stroke Button Props
391
+ - `text?: string` - Button text (default: "Learn CSS")
392
+ - `width?: number` - Button width (default: 300)
393
+ - `height?: number` - Button height (default: 60)
394
+ - `accentColor?: string` - Stroke color (default: "#705CFF")
395
+ - `textColor?: string` - Text color (default: "#333333")
396
+ - `href?: string` - Link URL
397
+ - `onClick?: () => void` - Click handler
398
+
399
+ ## Usage Guide
400
+
401
+ ### **Theme Integration**
402
+ All Background components integrate seamlessly with the app-studio theme system:
403
+
404
+ ```tsx
405
+ // Use theme colors
406
+ <Background.Gradient
407
+ from="color.blue.500"
408
+ to="color.purple.500"
409
+ animate={true}
410
+ />
411
+
412
+ // Use theme colors in overlays
413
+ <Background.Image
414
+ src="/hero-image.jpg"
415
+ overlay="color.gray.900"
416
+ imageOpacity={0.8}
417
+ />
418
+ ```
419
+
420
+ ### **Responsive Design**
421
+ Background components work well with responsive layouts:
422
+
423
+ ```tsx
424
+ // Responsive sizing
425
+ <Background.Image
426
+ src="/hero-image.jpg"
427
+ height={{ base: "300px", md: "400px", lg: "500px" }}
428
+ backgroundPosition={{ base: "center", md: "top" }}
429
+ />
430
+
431
+ // Adaptive content
432
+ <Background.Gradient from="color.blue.500" to="color.purple.500">
433
+ <Vertical gap={{ base: 16, md: 24 }} alignItems="center">
434
+ <Text fontSize={{ base: 20, md: 24, lg: 28 }} color="white">
435
+ Responsive Content
436
+ </Text>
437
+ </Vertical>
438
+ </Background.Gradient>
439
+ ```
440
+
441
+ ### **Performance Considerations**
442
+ - Use appropriate image sizes and formats for Background.Image
443
+ - Consider using `loading="lazy"` for images below the fold
444
+ - Limit the number of animated particles for better performance
445
+ - Use CSS transforms for animations when possible
446
+
447
+ ### **Accessibility**
448
+ - Ensure sufficient color contrast for text over backgrounds
449
+ - Provide alternative text or descriptions for decorative backgrounds
450
+ - Consider reduced motion preferences for animations
451
+ - Test with screen readers
452
+
453
+ ```tsx
454
+ // Good contrast example
455
+ <Background.Image
456
+ src="/hero-image.jpg"
457
+ overlay="rgba(0,0,0,0.6)" // Dark overlay for better text contrast
458
+ >
459
+ <Text color="white" fontSize={24}>
460
+ High Contrast Text
461
+ </Text>
462
+ </Background.Image>
463
+ ```
464
+
465
+ ### **Common Patterns**
466
+
467
+ #### Hero Sections
468
+ ```tsx
469
+ <Background.Image
470
+ src="/hero-background.jpg"
471
+ height="100vh"
472
+ backgroundSize="cover"
473
+ backgroundPosition="center"
474
+ overlay="rgba(0,0,0,0.4)"
475
+ >
476
+ <Vertical alignItems="center" gap={24}>
477
+ <Text fontSize={48} fontWeight="bold" color="white" textAlign="center">
478
+ Welcome to Our Platform
479
+ </Text>
480
+ <Text fontSize={18} color="white" textAlign="center" maxWidth="600px">
481
+ Create amazing experiences with our background components
482
+ </Text>
483
+ <Button variant="filled" size="lg">
484
+ Get Started
485
+ </Button>
486
+ </Vertical>
487
+ </Background.Image>
488
+ ```
489
+
490
+ #### Card Backgrounds
491
+ ```tsx
492
+ <Background.Gradient
493
+ from="color.blue.50"
494
+ to="color.indigo.100"
495
+ borderRadius={12}
496
+ padding={24}
497
+ >
498
+ <Vertical gap={16}>
499
+ <Text fontSize={20} fontWeight="600">
500
+ Feature Card
501
+ </Text>
502
+ <Text color="color.gray.600">
503
+ Beautiful gradient background for cards and sections
504
+ </Text>
505
+ </Vertical>
506
+ </Background.Gradient>
507
+ ```
508
+
509
+ #### Loading States
510
+ ```tsx
511
+ <Background.Particles
512
+ count={20}
513
+ speed="medium"
514
+ shapes={['circle']}
515
+ colors={['color.blue.400', 'color.purple.400']}
516
+ >
517
+ <Vertical alignItems="center" gap={16}>
518
+ <Spinner size="lg" />
519
+ <Text>Loading...</Text>
520
+ </Vertical>
521
+ </Background.Particles>
522
+ ```