@app-studio/web 0.9.39 → 0.9.43

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 (95) hide show
  1. package/dist/bot/Bot.d.ts +15 -0
  2. package/dist/bot/Cache.d.ts +13 -0
  3. package/dist/bot/Config.d.ts +13 -0
  4. package/dist/bot/ContentFetcher.d.ts +9 -0
  5. package/dist/bot/DocuCode.d.ts +19 -0
  6. package/dist/bot/FileHandler.d.ts +39 -0
  7. package/dist/bot/ai/AnthropicConnector.d.ts +6 -0
  8. package/dist/bot/ai/GeminiConnector.d.ts +7 -0
  9. package/dist/bot/ai/GroqConnector.d.ts +7 -0
  10. package/dist/bot/ai/HuggingFaceConnector.d.ts +6 -0
  11. package/dist/bot/ai/OpenAIConnector.d.ts +11 -0
  12. package/dist/bot/ai/ReplicateConnector.d.ts +7 -0
  13. package/dist/bot/ai/SambaNovaConnector.d.ts +6 -0
  14. package/dist/bot/ai/ai.config.d.ts +12 -0
  15. package/dist/bot/ai/ai.service.d.ts +36 -0
  16. package/dist/bot/data.d.ts +19 -0
  17. package/dist/bot/extractors.d.ts +8 -0
  18. package/dist/bot/index.d.ts +1 -0
  19. package/dist/bot/prompt/1-project.d.ts +1 -0
  20. package/dist/bot/prompt/2-response.d.ts +1 -0
  21. package/dist/bot/prompt/3-comment.d.ts +1 -0
  22. package/docs/components/Accordion.mdx +74 -121
  23. package/docs/components/Alert.mdx +18 -69
  24. package/docs/components/AspectRatio.mdx +11 -9
  25. package/docs/components/AudioInput.mdx +43 -0
  26. package/docs/components/Avatar.mdx +17 -42
  27. package/docs/components/Background.mdx +99 -491
  28. package/docs/components/Badge.mdx +37 -122
  29. package/docs/components/Button.mdx +71 -123
  30. package/docs/components/Calendar.mdx +7 -7
  31. package/docs/components/Card.mdx +238 -281
  32. package/docs/components/Carousel.mdx +88 -315
  33. package/docs/components/Center.mdx +22 -22
  34. package/docs/components/Chart.mdx +171 -26
  35. package/docs/components/ChatInput.mdx +327 -275
  36. package/docs/components/Checkbox.mdx +3 -5
  37. package/docs/components/ColorInput.mdx +10 -10
  38. package/docs/components/ColorPicker.mdx +452 -0
  39. package/docs/components/ComboBox.mdx +14 -14
  40. package/docs/components/Command.mdx +140 -188
  41. package/docs/components/ContextMenu.mdx +47 -171
  42. package/docs/components/CookieConsent.mdx +53 -0
  43. package/docs/components/CountryPicker.mdx +10 -10
  44. package/docs/components/DatePicker.mdx +4 -4
  45. package/docs/components/DragAndDrop.mdx +279 -463
  46. package/docs/components/Drawer.mdx +401 -100
  47. package/docs/components/DropdownMenu.mdx +37 -155
  48. package/docs/components/EmojiPicker.mdx +84 -0
  49. package/docs/components/File.mdx +130 -4
  50. package/docs/components/Flow.mdx +3 -3
  51. package/docs/components/Form.mdx +4 -4
  52. package/docs/components/Formik.mdx +41 -41
  53. package/docs/components/Gradient.mdx +355 -178
  54. package/docs/components/Horizontal.mdx +1 -2
  55. package/docs/components/HoverCard.mdx +57 -125
  56. package/docs/components/Icon.mdx +10 -10
  57. package/docs/components/KanbanBoard.mdx +12 -12
  58. package/docs/components/Label.mdx +8 -8
  59. package/docs/components/Link.mdx +19 -27
  60. package/docs/components/Loader.mdx +224 -407
  61. package/docs/components/Menubar.mdx +71 -67
  62. package/docs/components/Message.mdx +211 -526
  63. package/docs/components/Modal.mdx +351 -475
  64. package/docs/components/NavigationMenu.mdx +8 -8
  65. package/docs/components/OTPInput.mdx +194 -0
  66. package/docs/components/Pagination.mdx +451 -107
  67. package/docs/components/Password.mdx +8 -8
  68. package/docs/components/ProgressBar.mdx +460 -0
  69. package/docs/components/Resizable.mdx +103 -102
  70. package/docs/components/Select.mdx +5 -5
  71. package/docs/components/Separator.mdx +11 -98
  72. package/docs/components/ShareButton.mdx +29 -0
  73. package/docs/components/Sidebar.mdx +70 -131
  74. package/docs/components/Slider.mdx +99 -185
  75. package/docs/components/StatusIndicator.mdx +373 -0
  76. package/docs/components/Switch.mdx +3 -3
  77. package/docs/components/Table.mdx +25 -105
  78. package/docs/components/Tabs.mdx +40 -143
  79. package/docs/components/TagInput.mdx +32 -32
  80. package/docs/components/Text.mdx +3 -3
  81. package/docs/components/TextArea.mdx +9 -9
  82. package/docs/components/TextField.mdx +17 -17
  83. package/docs/components/Title.mdx +267 -525
  84. package/docs/components/Toast.mdx +65 -142
  85. package/docs/components/Toggle.mdx +34 -46
  86. package/docs/components/ToggleGroup.mdx +29 -50
  87. package/docs/components/Tooltip.mdx +500 -137
  88. package/docs/components/Tree.mdx +4 -4
  89. package/docs/components/Uploader.mdx +205 -351
  90. package/docs/components/Vertical.mdx +22 -22
  91. package/package.json +1 -1
  92. package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
  93. package/dist/components/AuthGuard/index.d.ts +0 -1
  94. package/docs/adk-components.md +0 -319
  95. package/docs/adk-quick-start.md +0 -268
@@ -1,6 +1,6 @@
1
1
  # Drawer
2
2
 
3
- A drawer is a panel that slides out from the edge of the screen. It can be useful when you need users to complete a task or view some details without leaving the current page.
3
+ A slide-out panel component that appears from the edge of the screen, with support for different placements, sizes, and content sections.
4
4
 
5
5
  ### **Import**
6
6
  ```tsx
@@ -10,155 +10,456 @@ import { Drawer } from '@app-studio/web';
10
10
  ### **Default**
11
11
  ```tsx
12
12
  import React, { useState } from 'react';
13
- import { Drawer } from '../Drawer';
14
- import { Button } from '../Button';
15
- import { Vertical } from 'app-studio';
13
+ import { Drawer } from '@app-studio/web';
14
+ import { Button, Text } from 'app-studio';
16
15
 
17
16
  export const DefaultDrawer = () => {
18
17
  const [isOpen, setIsOpen] = useState(false);
19
-
18
+
20
19
  return (
21
20
  <>
22
21
  <Button onClick={() => setIsOpen(true)}>Open Drawer</Button>
23
- <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)}>
24
- <Drawer.Header>Drawer Title</Drawer.Header>
25
- <Drawer.Body>
26
- <p>This is the content of the drawer.</p>
27
- </Drawer.Body>
28
- <Drawer.Footer>
29
- <Button onClick={() => setIsOpen(false)}>Close</Button>
30
- </Drawer.Footer>
22
+
23
+ <Drawer>
24
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
25
+ <Drawer.Container>
26
+ <Drawer.Header onClose={() => setIsOpen(false)}>
27
+ <Text>Drawer Title</Text>
28
+ </Drawer.Header>
29
+ <Drawer.Body>
30
+ <Text>Drawer content goes here</Text>
31
+ </Drawer.Body>
32
+ <Drawer.Footer>
33
+ <Button onClick={() => setIsOpen(false)}>Close</Button>
34
+ </Drawer.Footer>
35
+ </Drawer.Container>
36
+ </Drawer.Overlay>
31
37
  </Drawer>
32
38
  </>
33
39
  );
34
40
  };
35
41
  ```
36
42
 
37
- ### **Placement**
38
- The `placement` prop determines which side of the screen the drawer will appear from. It can be `top`, `right`, `bottom`, or `left`.
43
+ ### **isOpen**
44
+ Controls the visibility of the drawer.
45
+
46
+ - **Type:** `boolean`
47
+ - **Required:** `true`
39
48
 
40
49
  ```tsx
41
50
  import React, { useState } from 'react';
42
- import { Drawer } from '../Drawer';
43
- import { Button } from '../Button';
44
- import { Horizontal } from 'app-studio';
51
+ import { Drawer } from '@app-studio/web';
52
+ import { Button, Text } from 'app-studio';
45
53
 
46
- export const PlacementDrawer = () => {
47
- const [placement, setPlacement] = useState('right');
54
+ export const ControlledDrawer = () => {
48
55
  const [isOpen, setIsOpen] = useState(false);
56
+
57
+ return (
58
+ <>
59
+ <Button onClick={() => setIsOpen(true)}>Open</Button>
60
+ <Drawer>
61
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
62
+ <Drawer.Container>
63
+ <Drawer.Body>
64
+ <Text>Controlled Drawer</Text>
65
+ </Drawer.Body>
66
+ </Drawer.Container>
67
+ </Drawer.Overlay>
68
+ </Drawer>
69
+ </>
70
+ );
71
+ };
72
+ ```
49
73
 
50
- const openDrawer = (p) => {
51
- setPlacement(p);
52
- setIsOpen(true);
53
- };
74
+ ### **onClose**
75
+ Callback function executed when the drawer closes.
76
+
77
+ - **Type:** `() => void`
78
+ - **Required:** `true`
79
+
80
+ ```tsx
81
+ import React, { useState } from 'react';
82
+ import { Drawer } from '@app-studio/web';
83
+ import { Button, Text } from 'app-studio';
54
84
 
85
+ export const CloseCallbackDrawer = () => {
86
+ const [isOpen, setIsOpen] = useState(false);
87
+
55
88
  return (
56
- <Horizontal gap={10}>
57
- <Button onClick={() => openDrawer('top')}>Top</Button>
58
- <Button onClick={() => openDrawer('right')}>Right</Button>
59
- <Button onClick={() => openDrawer('bottom')}>Bottom</Button>
60
- <Button onClick={() => openDrawer('left')}>Left</Button>
61
- <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)} placement={placement}>
62
- <Drawer.Header>Drawer Title</Drawer.Header>
63
- <Drawer.Body>
64
- <p>This is the content of the drawer.</p>
65
- </Drawer.Body>
89
+ <>
90
+ <Button onClick={() => setIsOpen(true)}>Open</Button>
91
+ <Drawer>
92
+ <Drawer.Overlay
93
+ isOpen={isOpen}
94
+ onClose={() => {
95
+ console.log('Drawer closing');
96
+ setIsOpen(false);
97
+ }}
98
+ >
99
+ <Drawer.Container>
100
+ <Drawer.Body>
101
+ <Text>Click outside to close</Text>
102
+ </Drawer.Body>
103
+ </Drawer.Container>
104
+ </Drawer.Overlay>
66
105
  </Drawer>
67
- </Horizontal>
106
+ </>
68
107
  );
69
108
  };
70
109
  ```
71
110
 
72
- ### **Size**
73
- The `size` prop controls the width or height of the drawer, depending on the placement.
111
+ ### **placement**
112
+ The placement of the drawer.
113
+
114
+ - **Type:** `Placement`
115
+ - **Default:** `'right'`
116
+ - **Possible Values:** `'left' | 'right' | 'top' | 'bottom'`
74
117
 
75
118
  ```tsx
76
119
  import React, { useState } from 'react';
77
- import { Drawer } from '../Drawer';
78
- import { Button } from '../Button';
79
- import { Horizontal } from 'app-studio';
120
+ import { Drawer } from '@app-studio/web';
121
+ import { Button, Text, Horizontal } from 'app-studio';
80
122
 
81
- export const SizeDrawer = () => {
82
- const [size, setSize] = useState('md');
83
- const [isOpen, setIsOpen] = useState(false);
123
+ export const PlacementDrawers = () => {
124
+ const [placement, setPlacement] = useState<string | null>(null);
125
+
126
+ return (
127
+ <>
128
+ <Horizontal gap={10}>
129
+ {['left', 'right', 'top', 'bottom'].map((pos) => (
130
+ <Button key={pos} onClick={() => setPlacement(pos)}>
131
+ {pos}
132
+ </Button>
133
+ ))}
134
+ </Horizontal>
135
+
136
+ <Drawer>
137
+ <Drawer.Overlay
138
+ isOpen={!!placement}
139
+ onClose={() => setPlacement(null)}
140
+ >
141
+ <Drawer.Container placement={placement as any}>
142
+ <Drawer.Header onClose={() => setPlacement(null)}>
143
+ <Text>Drawer from {placement}</Text>
144
+ </Drawer.Header>
145
+ <Drawer.Body>
146
+ <Text>Content</Text>
147
+ </Drawer.Body>
148
+ </Drawer.Container>
149
+ </Drawer.Overlay>
150
+ </Drawer>
151
+ </>
152
+ );
153
+ };
154
+ ```
155
+
156
+ ### **size**
157
+ The size of the drawer.
84
158
 
85
- const openDrawer = (s) => {
86
- setSize(s);
87
- setIsOpen(true);
88
- };
159
+ - **Type:** `Size`
160
+ - **Default:** `'md'`
161
+ - **Possible Values:** `'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'`
89
162
 
163
+ ```tsx
164
+ import React, { useState } from 'react';
165
+ import { Drawer } from '@app-studio/web';
166
+ import { Button, Text, Horizontal } from 'app-studio';
167
+
168
+ export const SizedDrawers = () => {
169
+ const [size, setSize] = useState<string | null>(null);
170
+
90
171
  return (
91
- <Horizontal gap={10}>
92
- <Button onClick={() => openDrawer('xs')}>xs</Button>
93
- <Button onClick={() => openDrawer('sm')}>sm</Button>
94
- <Button onClick={() => openDrawer('md')}>md</Button>
95
- <Button onClick={() => openDrawer('lg')}>lg</Button>
96
- <Button onClick={() => openDrawer('xl')}>xl</Button>
97
- <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)} size={size}>
98
- <Drawer.Header>Drawer Title</Drawer.Header>
99
- <Drawer.Body>
100
- <p>This is the content of the drawer.</p>
101
- </Drawer.Body>
172
+ <>
173
+ <Horizontal gap={10}>
174
+ {['sm', 'md', 'lg', 'xl', 'full'].map((s) => (
175
+ <Button key={s} onClick={() => setSize(s)}>
176
+ {s}
177
+ </Button>
178
+ ))}
179
+ </Horizontal>
180
+
181
+ <Drawer>
182
+ <Drawer.Overlay isOpen={!!size} onClose={() => setSize(null)}>
183
+ <Drawer.Container size={size as any}>
184
+ <Drawer.Header onClose={() => setSize(null)}>
185
+ <Text>Size: {size}</Text>
186
+ </Drawer.Header>
187
+ <Drawer.Body>
188
+ <Text>Drawer content</Text>
189
+ </Drawer.Body>
190
+ </Drawer.Container>
191
+ </Drawer.Overlay>
102
192
  </Drawer>
103
- </Horizontal>
193
+ </>
104
194
  );
105
195
  };
106
196
  ```
107
197
 
108
- ### **Prevent Closing**
109
- The `isClosePrevented` prop prevents the drawer from closing when the overlay is clicked.
198
+ ### **isClosePrevented**
199
+ Prevents the drawer from closing when clicking the overlay.
200
+
201
+ - **Type:** `boolean`
202
+ - **Default:** `false`
110
203
 
111
204
  ```tsx
112
205
  import React, { useState } from 'react';
113
- import { Drawer } from '../Drawer';
114
- import { Button } from '../Button';
206
+ import { Drawer } from '@app-studio/web';
207
+ import { Button, Text } from 'app-studio';
115
208
 
116
209
  export const PreventCloseDrawer = () => {
117
210
  const [isOpen, setIsOpen] = useState(false);
211
+
212
+ return (
213
+ <>
214
+ <Button onClick={() => setIsOpen(true)}>Open</Button>
215
+ <Drawer>
216
+ <Drawer.Overlay
217
+ isOpen={isOpen}
218
+ onClose={() => setIsOpen(false)}
219
+ isClosePrevented
220
+ >
221
+ <Drawer.Container>
222
+ <Drawer.Header onClose={() => setIsOpen(false)}>
223
+ <Text>Must use close button</Text>
224
+ </Drawer.Header>
225
+ <Drawer.Body>
226
+ <Text>Click outside won't close this drawer</Text>
227
+ </Drawer.Body>
228
+ </Drawer.Container>
229
+ </Drawer.Overlay>
230
+ </Drawer>
231
+ </>
232
+ );
233
+ };
234
+ ```
235
+
236
+ ### **blur**
237
+ The degree of blurriness applied to the overlay.
118
238
 
239
+ - **Type:** `number`
240
+
241
+ ```tsx
242
+ import React, { useState } from 'react';
243
+ import { Drawer } from '@app-studio/web';
244
+ import { Button, Text } from 'app-studio';
245
+
246
+ export const BlurredDrawer = () => {
247
+ const [isOpen, setIsOpen] = useState(false);
248
+
119
249
  return (
120
250
  <>
121
- <Button onClick={() => setIsOpen(true)}>Open Drawer</Button>
122
- <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)} isClosePrevented>
123
- <Drawer.Header>Drawer Title</Drawer.Header>
124
- <Drawer.Body>
125
- <p>This drawer cannot be closed by clicking the overlay.</p>
126
- </Drawer.Body>
127
- <Drawer.Footer>
128
- <Button onClick={() => setIsOpen(false)}>Close</Button>
129
- </Drawer.Footer>
251
+ <Button onClick={() => setIsOpen(true)}>Open Blurred Drawer</Button>
252
+ <Drawer>
253
+ <Drawer.Overlay
254
+ isOpen={isOpen}
255
+ onClose={() => setIsOpen(false)}
256
+ blur={10}
257
+ >
258
+ <Drawer.Container>
259
+ <Drawer.Body>
260
+ <Text>Background is blurred</Text>
261
+ </Drawer.Body>
262
+ </Drawer.Container>
263
+ </Drawer.Overlay>
130
264
  </Drawer>
131
265
  </>
132
266
  );
133
267
  };
134
268
  ```
135
269
 
136
- ### **Props**
137
-
138
- #### **Drawer**
139
- | Prop | Type | Default | Description |
140
- | --- | --- | --- | --- |
141
- | `placement` | `top` \| `right` \| `bottom` \| `left` | `right` | The placement of the drawer. |
142
- | `size` | `xs` \| `sm` \| `md` \| `lg` \| `xl` | `md` | The size of the drawer. |
143
- | `isOpen` | `boolean` | - | If `true`, the drawer will be open. |
144
- | `onClose` | `() => void` | - | Callback fired when the drawer closes. |
145
- | `isClosePrevented` | `boolean` | `false` | If `true`, the drawer will not close when clicking the overlay. |
146
- | `children` | `React.ReactNode` | - | The children of the drawer. |
147
-
148
- #### **Drawer.Header**
149
- | Prop | Type | Default | Description |
150
- | --- | --- | --- | --- |
151
- | `onClose` | `() => void` | - | Callback fired when the close button is clicked. |
152
- | `buttonPosition` | `left` \| `right` | `right` | The position of the close button. |
153
- | `children` | `React.ReactNode` | - | The content of the drawer header. |
154
-
155
- #### **Drawer.Body**
156
- | Prop | Type | Default | Description |
157
- | --- | --- | --- | --- |
158
- | `children` | `React.ReactNode` | - | The content of the drawer body. |
159
-
160
- #### **Drawer.Footer**
161
- | Prop | Type | Default | Description |
162
- | --- | --- | --- | --- |
163
- | `children` | `React.ReactNode` | - | The content of the drawer footer. |
270
+ ### **buttonPosition**
271
+ Position of the close button in the header.
272
+
273
+ - **Type:** `CloseButtonPosition`
274
+ - **Possible Values:** `'left' | 'right' | 'none'`
275
+
276
+ ```tsx
277
+ import React, { useState } from 'react';
278
+ import { Drawer } from '@app-studio/web';
279
+ import { Button, Text } from 'app-studio';
280
+
281
+ export const ButtonPositionDrawer = () => {
282
+ const [isOpen, setIsOpen] = useState(false);
283
+
284
+ return (
285
+ <>
286
+ <Button onClick={() => setIsOpen(true)}>Open</Button>
287
+ <Drawer>
288
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
289
+ <Drawer.Container>
290
+ <Drawer.Header
291
+ onClose={() => setIsOpen(false)}
292
+ buttonPosition="left"
293
+ >
294
+ <Text>Close button on left</Text>
295
+ </Drawer.Header>
296
+ <Drawer.Body>
297
+ <Text>Drawer content</Text>
298
+ </Drawer.Body>
299
+ </Drawer.Container>
300
+ </Drawer.Overlay>
301
+ </Drawer>
302
+ </>
303
+ );
304
+ };
305
+ ```
306
+
307
+ ### **Navigation Drawer**
308
+ A common use case for navigation menus.
309
+
310
+ ```tsx
311
+ import React, { useState } from 'react';
312
+ import { Drawer } from '@app-studio/web';
313
+ import { Button, Text, Vertical } from 'app-studio';
314
+
315
+ export const NavigationDrawer = () => {
316
+ const [isOpen, setIsOpen] = useState(false);
317
+
318
+ const menuItems = [
319
+ 'Dashboard',
320
+ 'Profile',
321
+ 'Settings',
322
+ 'Analytics',
323
+ 'Help',
324
+ ];
325
+
326
+ return (
327
+ <>
328
+ <Button onClick={() => setIsOpen(true)}>☰ Menu</Button>
329
+ <Drawer>
330
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
331
+ <Drawer.Container placement="left" size="sm">
332
+ <Drawer.Header onClose={() => setIsOpen(false)}>
333
+ <Text fontSize={20} fontWeight="bold">Menu</Text>
334
+ </Drawer.Header>
335
+ <Drawer.Body>
336
+ <Vertical gap={0}>
337
+ {menuItems.map((item) => (
338
+ <Button
339
+ key={item}
340
+ variant="ghost"
341
+ onClick={() => {
342
+ console.log('Navigate to:', item);
343
+ setIsOpen(false);
344
+ }}
345
+ >
346
+ {item}
347
+ </Button>
348
+ ))}
349
+ </Vertical>
350
+ </Drawer.Body>
351
+ </Drawer.Container>
352
+ </Drawer.Overlay>
353
+ </Drawer>
354
+ </>
355
+ );
356
+ };
357
+ ```
358
+
359
+ ### **Form Drawer**
360
+ Using drawer for forms and data entry.
361
+
362
+ ```tsx
363
+ import React, { useState } from 'react';
364
+ import { Drawer } from '@app-studio/web';
365
+ import { Button, Text, Vertical } from 'app-studio';
366
+ import { TextField } from '@app-studio/web';
367
+
368
+ export const FormDrawer = () => {
369
+ const [isOpen, setIsOpen] = useState(false);
370
+
371
+ return (
372
+ <>
373
+ <Button onClick={() => setIsOpen(true)}>Add User</Button>
374
+ <Drawer>
375
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
376
+ <Drawer.Container placement="right" size="md">
377
+ <Drawer.Header onClose={() => setIsOpen(false)}>
378
+ <Text fontSize={18} fontWeight="bold">Add New User</Text>
379
+ </Drawer.Header>
380
+ <Drawer.Body>
381
+ <Vertical gap={15}>
382
+ <TextField label="Name" placeholder="Enter name" />
383
+ <TextField label="Email" placeholder="Enter email" />
384
+ <TextField label="Role" placeholder="Enter role" />
385
+ </Vertical>
386
+ </Drawer.Body>
387
+ <Drawer.Footer>
388
+ <Horizontal gap={10} justifyContent="flex-end">
389
+ <Button
390
+ variant="outline"
391
+ onClick={() => setIsOpen(false)}
392
+ >
393
+ Cancel
394
+ </Button>
395
+ <Button
396
+ variant="filled"
397
+ onClick={() => {
398
+ console.log('Save user');
399
+ setIsOpen(false);
400
+ }}
401
+ >
402
+ Save
403
+ </Button>
404
+ </Horizontal>
405
+ </Drawer.Footer>
406
+ </Drawer.Container>
407
+ </Drawer.Overlay>
408
+ </Drawer>
409
+ </>
410
+ );
411
+ };
412
+ ```
413
+
414
+ ### **Details Drawer**
415
+ Showing detailed information in a drawer.
416
+
417
+ ```tsx
418
+ import React, { useState } from 'react';
419
+ import { Drawer } from '@app-studio/web';
420
+ import { Button, Text, Vertical, Horizontal } from 'app-studio';
421
+
422
+ export const DetailsDrawer = () => {
423
+ const [isOpen, setIsOpen] = useState(false);
424
+
425
+ return (
426
+ <>
427
+ <Button onClick={() => setIsOpen(true)}>View Details</Button>
428
+ <Drawer>
429
+ <Drawer.Overlay isOpen={isOpen} onClose={() => setIsOpen(false)}>
430
+ <Drawer.Container placement="right" size="lg">
431
+ <Drawer.Header onClose={() => setIsOpen(false)}>
432
+ <Text fontSize={20} fontWeight="bold">Product Details</Text>
433
+ </Drawer.Header>
434
+ <Drawer.Body>
435
+ <Vertical gap={20}>
436
+ <div>
437
+ <Text fontSize={14} color="#6b7280">Name</Text>
438
+ <Text fontSize={16}>Premium Widget</Text>
439
+ </div>
440
+ <div>
441
+ <Text fontSize={14} color="#6b7280">Price</Text>
442
+ <Text fontSize={16}>$99.99</Text>
443
+ </div>
444
+ <div>
445
+ <Text fontSize={14} color="#6b7280">Description</Text>
446
+ <Text fontSize={16}>
447
+ A high-quality widget with advanced features
448
+ and premium materials.
449
+ </Text>
450
+ </div>
451
+ </Vertical>
452
+ </Drawer.Body>
453
+ <Drawer.Footer>
454
+ <Button onClick={() => setIsOpen(false)}>
455
+ Add to Cart
456
+ </Button>
457
+ </Drawer.Footer>
458
+ </Drawer.Container>
459
+ </Drawer.Overlay>
460
+ </Drawer>
461
+ </>
462
+ );
463
+ };
464
+ ```
164
465