@app-studio/web 0.9.31 → 0.9.33

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 (61) 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/docs/components.md +285 -0
  61. package/package.json +1 -1
@@ -0,0 +1,271 @@
1
+ # Gradient
2
+
3
+ Creates beautiful gradient backgrounds with various styles and animations.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { Gradient } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Default**
11
+ ```tsx
12
+ import React from 'react';
13
+ import { Gradient } from '../Gradient';
14
+
15
+ export const DefaultDemo = () => (
16
+ <Gradient
17
+ from="color.blue.500"
18
+ to="color.purple.500"
19
+ height="100px"
20
+ width="100%"
21
+ />
22
+ );
23
+ ```
24
+
25
+ ### **type**
26
+ Specifies the type of gradient to render.
27
+
28
+ ```tsx
29
+ import React from 'react';
30
+ import { Gradient } from '../Gradient';
31
+ import { Vertical } from 'app-studio';
32
+ import { Text } from '../../Text/Text';
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>
46
+
47
+ <Vertical gap={8}>
48
+ <Text fontWeight="500">Radial Gradient</Text>
49
+ <Gradient
50
+ type="radial"
51
+ from="color.blue.500"
52
+ to="color.purple.500"
53
+ height="100px"
54
+ width="100%"
55
+ />
56
+ </Vertical>
57
+
58
+ <Vertical gap={8}>
59
+ <Text fontWeight="500">Conic Gradient</Text>
60
+ <Gradient
61
+ type="conic"
62
+ colors={[
63
+ { color: 'color.red.500', position: '0deg' },
64
+ { color: 'color.yellow.500', position: '90deg' },
65
+ { color: 'color.green.500', position: '180deg' },
66
+ { color: 'color.blue.500', position: '270deg' },
67
+ { color: 'color.red.500', position: '360deg' }
68
+ ]}
69
+ height="100px"
70
+ width="100%"
71
+ />
72
+ </Vertical>
73
+ </Vertical>
74
+ );
75
+ ```
76
+
77
+ ### **direction**
78
+ Specifies the direction for linear gradients.
79
+
80
+ ```tsx
81
+ import React from 'react';
82
+ import { Gradient } from '../Gradient';
83
+ import { Vertical } from 'app-studio';
84
+ import { Horizontal } from 'app-studio';
85
+ import { Text } from '../../Text/Text';
86
+
87
+ export const DirectionsDemo = () => (
88
+ <Vertical gap={16}>
89
+ <Text fontWeight="500">Linear Gradient Directions</Text>
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>
105
+ </Vertical>
106
+ );
107
+ ```
108
+
109
+ ### **from/to**
110
+ Specifies the start and end colors for simple two-color gradients.
111
+
112
+ ```tsx
113
+ import React from 'react';
114
+ import { Gradient } from '../Gradient';
115
+
116
+ export const FromToDemo = () => (
117
+ <Gradient
118
+ from="color.blue.500"
119
+ to="color.purple.500"
120
+ height="100px"
121
+ width="100%"
122
+ />
123
+ );
124
+ ```
125
+
126
+ ### **colors**
127
+ Specifies an array of color stops for multi-color gradients.
128
+
129
+ ```tsx
130
+ import React from 'react';
131
+ import { Gradient } from '../Gradient';
132
+ import { Vertical } from 'app-studio';
133
+ import { Text } from '../../Text/Text';
134
+
135
+ export const MulticolorDemo = () => (
136
+ <Vertical gap={16}>
137
+ <Text fontWeight="500">Multi-color Gradients</Text>
138
+
139
+ <Vertical gap={8}>
140
+ <Text fontSize="14px">Linear 3-color</Text>
141
+ <Gradient
142
+ type="linear"
143
+ colors={[
144
+ { color: 'color.blue.500', position: '0%' },
145
+ { color: 'color.purple.500', position: '50%' },
146
+ { color: 'color.pink.500', position: '100%' }
147
+ ]}
148
+ height="100px"
149
+ width="100%"
150
+ />
151
+ </Vertical>
152
+
153
+ <Vertical gap={8}>
154
+ <Text fontSize="14px">Rainbow</Text>
155
+ <Gradient
156
+ type="linear"
157
+ colors={[
158
+ { color: 'color.red.500', position: '0%' },
159
+ { color: 'color.orange.500', position: '16.67%' },
160
+ { color: 'color.yellow.500', position: '33.33%' },
161
+ { color: 'color.green.500', position: '50%' },
162
+ { color: 'color.blue.500', position: '66.67%' },
163
+ { color: 'color.indigo.500', position: '83.33%' },
164
+ { color: 'color.purple.500', position: '100%' }
165
+ ]}
166
+ height="100px"
167
+ width="100%"
168
+ />
169
+ </Vertical>
170
+ </Vertical>
171
+ );
172
+ ```
173
+
174
+ ### **animate**
175
+ Enables animation for the gradient.
176
+
177
+ ```tsx
178
+ import React from 'react';
179
+ import { Gradient } from '../Gradient';
180
+ import { Vertical } from 'app-studio';
181
+ import { Text } from '../../Text/Text';
182
+
183
+ export const AnimatedDemo = () => (
184
+ <Vertical gap={16}>
185
+ <Text fontWeight="500">Animated Gradients</Text>
186
+
187
+ <Vertical gap={8}>
188
+ <Text fontSize="14px">Animated Linear</Text>
189
+ <Gradient
190
+ type="linear"
191
+ from="color.blue.500"
192
+ to="color.purple.500"
193
+ animate={true}
194
+ animationDuration={5}
195
+ height="100px"
196
+ width="100%"
197
+ />
198
+ </Vertical>
199
+ </Vertical>
200
+ );
201
+ ```
202
+
203
+ ### **children**
204
+ Content to render inside the gradient.
205
+
206
+ ```tsx
207
+ import React from 'react';
208
+ import { Gradient } from '../Gradient';
209
+ import { Vertical } from 'app-studio';
210
+ import { Text } from '../../Text/Text';
211
+ import { Button } from '../../Button/Button';
212
+ import { Center } from 'app-studio';
213
+
214
+ export const WithContentDemo = () => (
215
+ <Gradient
216
+ type="linear"
217
+ from="color.blue.600"
218
+ to="color.purple.600"
219
+ height="150px"
220
+ width="100%"
221
+ borderRadius="12px"
222
+ >
223
+ <Center height="100%">
224
+ <Vertical alignItems="center" gap={16}>
225
+ <Text color="white" fontWeight="600" fontSize="24px">
226
+ Welcome to Gradients
227
+ </Text>
228
+ <Button backgroundColor="color.white" color="color.purple.600">
229
+ Get Started
230
+ </Button>
231
+ </Vertical>
232
+ </Center>
233
+ </Gradient>
234
+ );
235
+ ```
236
+
237
+ ### **views**
238
+ Custom styling that overrides default views.
239
+
240
+ ```tsx
241
+ import React from 'react';
242
+ import { Gradient } from '../Gradient';
243
+ import { Center } from 'app-studio';
244
+ import { Text } from '../../Text/Text';
245
+
246
+ export const StylesDemo = () => (
247
+ <Gradient
248
+ type="radial"
249
+ colors={[
250
+ { color: 'rgba(0, 0, 0, 0.1)', position: '0%' },
251
+ { color: 'rgba(0, 0, 0, 0.7)', position: '100%' }
252
+ ]}
253
+ height="150px"
254
+ width="100%"
255
+ borderRadius="12px"
256
+ views={{
257
+ container: {
258
+ backgroundImage: "url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1050&q=80')",
259
+ backgroundSize: 'cover',
260
+ backgroundPosition: 'center',
261
+ }
262
+ }}
263
+ >
264
+ <Center height="100%">
265
+ <Text color="white" fontWeight="600" fontSize="24px">
266
+ Overlay on Image
267
+ </Text>
268
+ </Center>
269
+ </Gradient>
270
+ );
271
+ ```
@@ -0,0 +1,40 @@
1
+ # Horizontal
2
+
3
+ Aligns child components horizontally, with optional reverse order.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { Horizontal } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Default**
11
+ ```tsx
12
+ import React from 'react';
13
+
14
+ import { View } from 'app-studio';
15
+ import { Horizontal } from '../../Horizontal/Horizontal';
16
+
17
+ export const DefaultHorizontal = () => (
18
+ <Horizontal>
19
+ <View width={50} height={50} backgroundColor="theme.primary" />
20
+ <View
21
+ width={50}
22
+ height={50}
23
+ backgroundColor="theme.secondary"
24
+ margin="0 10px "
25
+ />
26
+ <View width={50} height={50} backgroundColor="theme.warning" />
27
+ </Horizontal>
28
+ );
29
+
30
+ ```
31
+
32
+ ## Props
33
+
34
+ | Prop | Type | Description | Default |
35
+ | --------- | ------------- | ------------------------------------------------------ | ----------- |
36
+ | children | React.ReactNode | The content to be arranged horizontally. | |
37
+ | gap | number | The gap between horizontally aligned items. | 0 |
38
+ | styles | CSSProperties | Optional custom styles for the horizontal container. | |
39
+ | className | string | Optional className for the horizontal container. | |
40
+ | wrap | boolean | Whether the items should wrap to the next line. | true |
@@ -0,0 +1,140 @@
1
+ # HoverCard
2
+
3
+ A floating card that appears when hovering over a trigger element. Supports configurable open and close delays for a smoother user experience.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { HoverCard } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Default**
11
+ ```tsx
12
+ import React from 'react';
13
+ import { HoverCard } from '../HoverCard';
14
+ import { Button } from '../../Button/Button';
15
+ import { Text } from '../../Text/Text';
16
+
17
+ export const DefaultHoverCard = () => {
18
+ return (
19
+ <HoverCard>
20
+ <HoverCard.Trigger>
21
+ <Button>Hover Me</Button>
22
+ </HoverCard.Trigger>
23
+ <HoverCard.Content>
24
+ <Text>
25
+ The React Framework – created and maintained by @vercel.
26
+ </Text>
27
+ </HoverCard.Content>
28
+ </HoverCard>
29
+ );
30
+ };
31
+ ```
32
+
33
+ ### **Positioning**
34
+ You can control the position of the HoverCard content using the `side` and `align` props.
35
+
36
+ ```tsx
37
+ import React from 'react';
38
+ import { HoverCard } from '../HoverCard';
39
+ import { Button } from '../../Button/Button';
40
+ import { Text } from '../../Text/Text';
41
+
42
+ export const PositionedHoverCard = () => {
43
+ return (
44
+ <HoverCard>
45
+ <HoverCard.Trigger>
46
+ <Button>Hover Me</Button>
47
+ </HoverCard.Trigger>
48
+ <HoverCard.Content side="top" align="center">
49
+ <Text>
50
+ This content appears above the trigger.
51
+ </Text>
52
+ </HoverCard.Content>
53
+ </HoverCard>
54
+ );
55
+ };
56
+ ```
57
+
58
+ ### **Custom Styling**
59
+ You can customize the appearance of the HoverCard using the `views` prop.
60
+
61
+ ```tsx
62
+ import React from 'react';
63
+ import { HoverCard } from '../HoverCard';
64
+ import { Button } from '../../Button/Button';
65
+ import { Text } from '../../Text/Text';
66
+
67
+ export const StyledHoverCard = () => {
68
+ return (
69
+ <HoverCard>
70
+ <HoverCard.Trigger>
71
+ <Button variant="outline">Custom Styled HoverCard</Button>
72
+ </HoverCard.Trigger>
73
+ <HoverCard.Content
74
+ views={{
75
+ container: {
76
+ backgroundColor: 'color.blue',
77
+ color: 'color.white',
78
+ borderRadius: '8px',
79
+ padding: '16px',
80
+ },
81
+ }}
82
+ >
83
+ <Text color="white">
84
+ This HoverCard has custom styling with a primary background color.
85
+ </Text>
86
+ </HoverCard.Content>
87
+ </HoverCard>
88
+ );
89
+ };
90
+ ```
91
+
92
+ ### **Delay Options**
93
+ You can control the timing of when the HoverCard opens and closes using the `openDelay` and `closeDelay` props.
94
+
95
+ ```tsx
96
+ import React from 'react';
97
+ import { HoverCard } from '../HoverCard';
98
+ import { Button } from '../../Button/Button';
99
+ import { Text } from '../../Text/Text';
100
+
101
+ export const DelayedHoverCard = () => {
102
+ return (
103
+ <HoverCard openDelay={100} closeDelay={1000}>
104
+ <HoverCard.Trigger>
105
+ <Button>Hover Me</Button>
106
+ </HoverCard.Trigger>
107
+ <HoverCard.Content>
108
+ <Text>
109
+ This card opens quickly (100ms) but stays open longer (1000ms) after you move away.
110
+ </Text>
111
+ </HoverCard.Content>
112
+ </HoverCard>
113
+ );
114
+ };
115
+ ```
116
+
117
+ ### **Using with Other Components**
118
+ You can use the `asChild` prop on the Trigger to apply hover behavior directly to another component.
119
+
120
+ ```tsx
121
+ import React from 'react';
122
+ import { HoverCard } from '../HoverCard';
123
+ import { Link } from '../../Link/Link';
124
+ import { Text } from '../../Text/Text';
125
+
126
+ export const LinkHoverCard = () => {
127
+ return (
128
+ <HoverCard>
129
+ <HoverCard.Trigger asChild>
130
+ <Link to="https://example.com">example.com</Link>
131
+ </HoverCard.Trigger>
132
+ <HoverCard.Content>
133
+ <Text>
134
+ This card uses the asChild prop to apply hover behavior directly to the Link component.
135
+ </Text>
136
+ </HoverCard.Content>
137
+ </HoverCard>
138
+ );
139
+ };
140
+ ```