@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.
Files changed (101) 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/dist/components/Title/Title/SlideEffect.d.ts +14 -0
  23. package/dist/components/Title/Title/Title.props.d.ts +20 -0
  24. package/dist/components/Title/Title/Title.state.d.ts +4 -0
  25. package/dist/web.cjs.development.js +265 -78
  26. package/dist/web.cjs.development.js.map +1 -1
  27. package/dist/web.cjs.production.min.js +1 -1
  28. package/dist/web.cjs.production.min.js.map +1 -1
  29. package/dist/web.esm.js +265 -78
  30. package/dist/web.esm.js.map +1 -1
  31. package/dist/web.umd.development.js +265 -78
  32. package/dist/web.umd.development.js.map +1 -1
  33. package/dist/web.umd.production.min.js +1 -1
  34. package/dist/web.umd.production.min.js.map +1 -1
  35. package/docs/components/Accordion.mdx +74 -121
  36. package/docs/components/Alert.mdx +19 -70
  37. package/docs/components/AspectRatio.mdx +13 -11
  38. package/docs/components/AudioInput.mdx +43 -0
  39. package/docs/components/Avatar.mdx +18 -43
  40. package/docs/components/Background.mdx +100 -492
  41. package/docs/components/Badge.mdx +45 -130
  42. package/docs/components/Button.mdx +76 -128
  43. package/docs/components/Calendar.mdx +7 -7
  44. package/docs/components/Card.mdx +247 -290
  45. package/docs/components/Carousel.mdx +94 -321
  46. package/docs/components/Chart.mdx +171 -26
  47. package/docs/components/ChatInput.mdx +327 -275
  48. package/docs/components/Checkbox.mdx +3 -5
  49. package/docs/components/ColorInput.mdx +6 -6
  50. package/docs/components/ColorPicker.mdx +452 -0
  51. package/docs/components/ComboBox.mdx +13 -13
  52. package/docs/components/Command.mdx +140 -188
  53. package/docs/components/ContextMenu.mdx +47 -171
  54. package/docs/components/CookieConsent.mdx +53 -0
  55. package/docs/components/CountryPicker.mdx +8 -8
  56. package/docs/components/DatePicker.mdx +3 -3
  57. package/docs/components/DragAndDrop.mdx +279 -463
  58. package/docs/components/Drawer.mdx +392 -231
  59. package/docs/components/DropdownMenu.mdx +37 -155
  60. package/docs/components/EmojiPicker.mdx +84 -0
  61. package/docs/components/File.mdx +130 -4
  62. package/docs/components/Formik.mdx +39 -39
  63. package/docs/components/Gradient.mdx +359 -182
  64. package/docs/components/Horizontal.mdx +1 -2
  65. package/docs/components/HoverCard.mdx +57 -125
  66. package/docs/components/KanbanBoard.mdx +9 -9
  67. package/docs/components/Link.mdx +22 -30
  68. package/docs/components/Loader.mdx +230 -413
  69. package/docs/components/Menubar.mdx +73 -69
  70. package/docs/components/Message.mdx +210 -525
  71. package/docs/components/Modal.mdx +351 -475
  72. package/docs/components/NavigationMenu.mdx +8 -8
  73. package/docs/components/OTPInput.mdx +194 -0
  74. package/docs/components/Pagination.mdx +451 -107
  75. package/docs/components/Password.mdx +8 -8
  76. package/docs/components/ProgressBar.mdx +460 -0
  77. package/docs/components/Resizable.mdx +103 -102
  78. package/docs/components/Select.mdx +5 -5
  79. package/docs/components/Separator.mdx +11 -98
  80. package/docs/components/ShareButton.mdx +29 -0
  81. package/docs/components/Sidebar.mdx +70 -131
  82. package/docs/components/Slider.mdx +99 -185
  83. package/docs/components/StatusIndicator.mdx +373 -0
  84. package/docs/components/Switch.mdx +3 -3
  85. package/docs/components/Table.mdx +25 -105
  86. package/docs/components/Tabs.mdx +40 -143
  87. package/docs/components/TagInput.mdx +17 -17
  88. package/docs/components/Text.mdx +3 -3
  89. package/docs/components/TextArea.mdx +6 -6
  90. package/docs/components/TextField.mdx +12 -12
  91. package/docs/components/Title.mdx +267 -525
  92. package/docs/components/Toast.mdx +65 -142
  93. package/docs/components/Toggle.mdx +37 -49
  94. package/docs/components/ToggleGroup.mdx +36 -57
  95. package/docs/components/Tooltip.mdx +501 -138
  96. package/docs/components/Uploader.mdx +205 -351
  97. package/package.json +1 -1
  98. package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
  99. package/dist/components/AuthGuard/index.d.ts +0 -1
  100. package/docs/adk-components.md +0 -319
  101. package/docs/adk-quick-start.md +0 -268
@@ -1,191 +1,554 @@
1
1
  # Tooltip
2
2
 
3
- A component that displays informative text when users hover over, focus on, or tap an element.
3
+ A tooltip component for displaying contextual information on hover or focus, with customizable positioning, styling, and behavior.
4
4
 
5
5
  ### **Import**
6
- ```tsx
7
- import { Tooltip } from '@app-studio/web';
8
- ```
6
+ ```tsx
7
+ import { Tooltip } from '@app-studio/web';
8
+ ```
9
9
 
10
10
  ### **Default**
11
11
  ```tsx
12
12
  import React from 'react';
13
- import { Tooltip } from '../Tooltip';
14
- import { Button } from '../../Button/Button';
13
+ import { Tooltip } from '@app-studio/web';
14
+ import { Button } from 'app-studio';
15
15
 
16
- export const DefaultTooltip = () => {
17
- return (
18
- <Tooltip content="This is a tooltip">
19
- <Button>Hover Me</Button>
16
+ export const DefaultTooltip = () => (
17
+ <Tooltip content="This is a tooltip">
18
+ <Button>Hover me</Button>
19
+ </Tooltip>
20
+ );
21
+ ```
22
+
23
+ ### **content**
24
+ The content to display in the tooltip.
25
+
26
+ - **Type:** `React.ReactNode`
27
+ - **Required:** `true`
28
+
29
+ ```tsx
30
+ import React from 'react';
31
+ import { Tooltip } from '@app-studio/web';
32
+ import { Button, Text, Vertical } from 'app-studio';
33
+
34
+ export const TooltipContent = () => (
35
+ <Tooltip
36
+ content={
37
+ <Vertical gap={5}>
38
+ <Text fontWeight="bold">Tooltip Title</Text>
39
+ <Text fontSize={12}>This is detailed tooltip content</Text>
40
+ </Vertical>
41
+ }
42
+ >
43
+ <Button>Hover for details</Button>
44
+ </Tooltip>
45
+ );
46
+ ```
47
+
48
+ ### **position**
49
+ The preferred position of the tooltip.
50
+
51
+ - **Type:** `Position`
52
+ - **Default:** `'top'`
53
+ - **Possible Values:** `'top' | 'bottom' | 'left' | 'right'`
54
+
55
+ ```tsx
56
+ import React from 'react';
57
+ import { Tooltip } from '@app-studio/web';
58
+ import { Button, Horizontal } from 'app-studio';
59
+
60
+ export const TooltipPositions = () => (
61
+ <Horizontal gap={15}>
62
+ <Tooltip content="Top tooltip" position="top">
63
+ <Button>Top</Button>
20
64
  </Tooltip>
21
- );
22
- };
65
+ <Tooltip content="Bottom tooltip" position="bottom">
66
+ <Button>Bottom</Button>
67
+ </Tooltip>
68
+ <Tooltip content="Left tooltip" position="left">
69
+ <Button>Left</Button>
70
+ </Tooltip>
71
+ <Tooltip content="Right tooltip" position="right">
72
+ <Button>Right</Button>
73
+ </Tooltip>
74
+ </Horizontal>
75
+ );
23
76
  ```
24
77
 
25
- ### **Positions**
26
- Tooltips can be positioned relative to the trigger element.
78
+ ### **align**
79
+ The alignment of the tooltip relative to the trigger.
80
+
81
+ - **Type:** `Alignment`
82
+ - **Default:** `'center'`
83
+ - **Possible Values:** `'start' | 'center' | 'end'`
27
84
 
28
85
  ```tsx
29
86
  import React from 'react';
30
- import { Tooltip } from '../Tooltip';
31
- import { Button } from '../../Button/Button';
32
- import { Horizontal } from '@app-studio/web';
87
+ import { Tooltip } from '@app-studio/web';
88
+ import { Button, Vertical } from 'app-studio';
33
89
 
34
- export const TooltipPositionsExample = () => {
35
- return (
36
- <Horizontal gap={20}>
37
- <Tooltip content="Tooltip on top" position="top">
38
- <Button>Top</Button>
39
- </Tooltip>
40
-
41
- <Tooltip content="Tooltip on right" position="right">
42
- <Button>Right</Button>
43
- </Tooltip>
44
-
45
- <Tooltip content="Tooltip on bottom" position="bottom">
46
- <Button>Bottom</Button>
47
- </Tooltip>
48
-
49
- <Tooltip content="Tooltip on left" position="left">
50
- <Button>Left</Button>
51
- </Tooltip>
52
- </Horizontal>
53
- );
54
- };
90
+ export const TooltipAlignments = () => (
91
+ <Vertical gap={15}>
92
+ <Tooltip content="Start aligned" position="top" align="start">
93
+ <Button>Start</Button>
94
+ </Tooltip>
95
+ <Tooltip content="Center aligned" position="top" align="center">
96
+ <Button>Center</Button>
97
+ </Tooltip>
98
+ <Tooltip content="End aligned" position="top" align="end">
99
+ <Button>End</Button>
100
+ </Tooltip>
101
+ </Vertical>
102
+ );
55
103
  ```
56
104
 
57
- ### **Variants**
58
- Different visual styles for tooltips.
105
+ ### **size**
106
+ The size of the tooltip.
107
+
108
+ - **Type:** `Size`
109
+ - **Default:** `'md'`
110
+ - **Possible Values:** `'xs' | 'sm' | 'md' | 'lg' | 'xl'`
59
111
 
60
112
  ```tsx
61
113
  import React from 'react';
62
- import { Tooltip } from '../Tooltip';
63
- import { Button } from '../../Button/Button';
64
- import { Horizontal } from '@app-studio/web';
114
+ import { Tooltip } from '@app-studio/web';
115
+ import { Button, Horizontal } from 'app-studio';
65
116
 
66
- export const TooltipVariantsExample = () => {
67
- return (
68
- <Horizontal gap={20}>
69
- <Tooltip content="Default tooltip style" variant="default">
70
- <Button>Default</Button>
71
- </Tooltip>
72
-
73
- <Tooltip content="Light tooltip style" variant="light">
74
- <Button>Light</Button>
75
- </Tooltip>
76
-
77
- <Tooltip content="Dark tooltip style" variant="dark">
78
- <Button>Dark</Button>
79
- </Tooltip>
80
- </Horizontal>
81
- );
82
- };
117
+ export const TooltipSizes = () => (
118
+ <Horizontal gap={15}>
119
+ <Tooltip content="Extra small" size="xs">
120
+ <Button>XS</Button>
121
+ </Tooltip>
122
+ <Tooltip content="Small tooltip" size="sm">
123
+ <Button>SM</Button>
124
+ </Tooltip>
125
+ <Tooltip content="Medium tooltip" size="md">
126
+ <Button>MD</Button>
127
+ </Tooltip>
128
+ <Tooltip content="Large tooltip" size="lg">
129
+ <Button>LG</Button>
130
+ </Tooltip>
131
+ </Horizontal>
132
+ );
83
133
  ```
84
134
 
85
- ### **Sizes**
86
- Tooltips come in different sizes.
135
+ ### **variant**
136
+ The visual style variant of the tooltip.
137
+
138
+ - **Type:** `Variant`
139
+ - **Default:** `'default'`
140
+ - **Possible Values:** `'default' | 'dark' | 'light' | 'primary' | 'success' | 'error' | 'warning'`
87
141
 
88
142
  ```tsx
89
143
  import React from 'react';
90
- import { Tooltip } from '../Tooltip';
91
- import { Button } from '../../Button/Button';
92
- import { Horizontal } from '@app-studio/web';
144
+ import { Tooltip } from '@app-studio/web';
145
+ import { Button, Horizontal } from 'app-studio';
93
146
 
94
- export const TooltipSizesExample = () => {
95
- return (
96
- <Horizontal gap={20}>
97
- <Tooltip content="Small tooltip" size="sm">
98
- <Button>Small</Button>
99
- </Tooltip>
100
-
101
- <Tooltip content="Medium tooltip" size="md">
102
- <Button>Medium</Button>
103
- </Tooltip>
104
-
105
- <Tooltip content="Large tooltip with more content" size="lg">
106
- <Button>Large</Button>
107
- </Tooltip>
108
- </Horizontal>
109
- );
110
- };
147
+ export const TooltipVariants = () => (
148
+ <Horizontal gap={15}>
149
+ <Tooltip content="Default variant" variant="default">
150
+ <Button>Default</Button>
151
+ </Tooltip>
152
+ <Tooltip content="Dark variant" variant="dark">
153
+ <Button>Dark</Button>
154
+ </Tooltip>
155
+ <Tooltip content="Primary variant" variant="primary">
156
+ <Button>Primary</Button>
157
+ </Tooltip>
158
+ <Tooltip content="Success variant" variant="success">
159
+ <Button>Success</Button>
160
+ </Tooltip>
161
+ <Tooltip content="Error variant" variant="error">
162
+ <Button>Error</Button>
163
+ </Tooltip>
164
+ </Horizontal>
165
+ );
111
166
  ```
112
167
 
113
- ### **Custom Content**
114
- Tooltips can contain rich content, not just text.
168
+ ### **openDelay**
169
+ Delay in milliseconds before the tooltip opens on hover.
170
+
171
+ - **Type:** `number`
172
+ - **Default:** `200`
115
173
 
116
174
  ```tsx
117
175
  import React from 'react';
118
- import { Tooltip } from '../Tooltip';
119
- import { Button } from '../../Button/Button';
120
- import { Text } from '@app-studio/web';
121
- import { Vertical } from '@app-studio/web';
176
+ import { Tooltip } from '@app-studio/web';
177
+ import { Button } from 'app-studio';
122
178
 
123
- export const CustomContentTooltip = () => {
124
- return (
125
- <Tooltip
126
- content={
127
- <Vertical padding={5}>
128
- <Text fontWeight="bold">Custom Tooltip</Text>
129
- <Text fontSize="12px">With rich content and styling</Text>
130
- </Vertical>
179
+ export const DelayedTooltip = () => (
180
+ <Tooltip content="Opens after 1 second" openDelay={1000}>
181
+ <Button>Hover and wait</Button>
182
+ </Tooltip>
183
+ );
184
+ ```
185
+
186
+ ### **closeDelay**
187
+ Delay in milliseconds before the tooltip closes after hover stops.
188
+
189
+ - **Type:** `number`
190
+ - **Default:** `200`
191
+
192
+ ```tsx
193
+ import React from 'react';
194
+ import { Tooltip } from '@app-studio/web';
195
+ import { Button } from 'app-studio';
196
+
197
+ export const CloseDelayTooltip = () => (
198
+ <Tooltip content="Stays open longer" closeDelay={1000}>
199
+ <Button>Hover me</Button>
200
+ </Tooltip>
201
+ );
202
+ ```
203
+
204
+ ### **showArrow**
205
+ Whether to show an arrow pointing to the trigger.
206
+
207
+ - **Type:** `boolean`
208
+ - **Default:** `true`
209
+
210
+ ```tsx
211
+ import React from 'react';
212
+ import { Tooltip } from '@app-studio/web';
213
+ import { Button, Horizontal } from 'app-studio';
214
+
215
+ export const TooltipArrows = () => (
216
+ <Horizontal gap={15}>
217
+ <Tooltip content="With arrow" showArrow>
218
+ <Button>With Arrow</Button>
219
+ </Tooltip>
220
+ <Tooltip content="Without arrow" showArrow={false}>
221
+ <Button>No Arrow</Button>
222
+ </Tooltip>
223
+ </Horizontal>
224
+ );
225
+ ```
226
+
227
+ ### **defaultOpen**
228
+ Whether the tooltip is initially open.
229
+
230
+ - **Type:** `boolean`
231
+ - **Default:** `false`
232
+
233
+ ```tsx
234
+ import React from 'react';
235
+ import { Tooltip } from '@app-studio/web';
236
+ import { Button } from 'app-studio';
237
+
238
+ export const DefaultOpenTooltip = () => (
239
+ <Tooltip content="Initially visible" defaultOpen>
240
+ <Button>Default Open</Button>
241
+ </Tooltip>
242
+ );
243
+ ```
244
+
245
+ ### **isDisabled**
246
+ Whether the tooltip is disabled.
247
+
248
+ - **Type:** `boolean`
249
+ - **Default:** `false`
250
+
251
+ ```tsx
252
+ import React from 'react';
253
+ import { Tooltip } from '@app-studio/web';
254
+ import { Button } from 'app-studio';
255
+
256
+ export const DisabledTooltip = () => (
257
+ <Tooltip content="This won't show" isDisabled>
258
+ <Button>Disabled Tooltip</Button>
259
+ </Tooltip>
260
+ );
261
+ ```
262
+
263
+ ### **views**
264
+ Custom styles for different parts of the tooltip.
265
+
266
+ - **Type:** `TooltipStyles`
267
+
268
+ ```tsx
269
+ import React from 'react';
270
+ import { Tooltip } from '@app-studio/web';
271
+ import { Button } from 'app-studio';
272
+
273
+ export const StyledTooltip = () => (
274
+ <Tooltip
275
+ content="Custom styled tooltip"
276
+ views={{
277
+ container: {
278
+ backgroundColor: '#3b82f6',
279
+ color: '#ffffff',
280
+ borderRadius: 8,
281
+ padding: 12,
282
+ boxShadow: '0 4px 12px rgba(0,0,0,0.15)',
283
+ },
284
+ arrow: {
285
+ fill: '#3b82f6',
131
286
  }
132
- views={{
133
- content: {
134
- backgroundColor: 'theme.primary',
135
- color: 'color.white',
136
- borderRadius: '8px',
137
- },
138
- arrow: {
139
- backgroundColor: 'theme.primary',
140
- },
141
- }}
142
- >
143
- <Button variant="outline">Hover for Custom Tooltip</Button>
287
+ }}
288
+ >
289
+ <Button>Custom Style</Button>
290
+ </Tooltip>
291
+ );
292
+ ```
293
+
294
+ ### **Icon Tooltips**
295
+ Tooltips on icons for additional information.
296
+
297
+ ```tsx
298
+ import React from 'react';
299
+ import { Tooltip } from '@app-studio/web';
300
+ import { InfoIcon } from '@app-studio/web';
301
+ import { Horizontal, Text } from 'app-studio';
302
+
303
+ export const IconTooltips = () => (
304
+ <Horizontal gap={10} alignItems="center">
305
+ <Text>Username</Text>
306
+ <Tooltip content="Your unique identifier">
307
+ <InfoIcon widthHeight={16} />
144
308
  </Tooltip>
145
- );
146
- };
309
+ </Horizontal>
310
+ );
147
311
  ```
148
312
 
149
- ### **Compound Component Pattern**
150
- For more control, you can use the compound component pattern.
313
+ ### **Form Field Tooltips**
314
+ Tooltips for form field help text.
151
315
 
152
316
  ```tsx
153
317
  import React from 'react';
154
- import { Tooltip } from '../Tooltip';
155
- import { Button } from '../../Button/Button';
156
- import { Text } from '@app-studio/web';
318
+ import { Tooltip } from '@app-studio/web';
319
+ import { TextField } from '@app-studio/web';
320
+ import { Vertical, Horizontal, Text } from 'app-studio';
321
+ import { InfoIcon } from '@app-studio/web';
157
322
 
158
- export const CompoundTooltip = () => {
159
- return (
160
- <Tooltip>
161
- <Tooltip.Trigger>
162
- <Button>Hover Me</Button>
163
- </Tooltip.Trigger>
164
- <Tooltip.Content>
165
- <Text>This is a tooltip using compound components</Text>
166
- </Tooltip.Content>
323
+ export const FormFieldTooltips = () => (
324
+ <Vertical gap={15}>
325
+ <Vertical gap={5}>
326
+ <Horizontal gap={5} alignItems="center">
327
+ <Text>Password</Text>
328
+ <Tooltip
329
+ content="Must be at least 8 characters with uppercase, lowercase, and numbers"
330
+ position="right"
331
+ >
332
+ <InfoIcon widthHeight={14} />
333
+ </Tooltip>
334
+ </Horizontal>
335
+ <TextField type="password" />
336
+ </Vertical>
337
+ </Vertical>
338
+ );
339
+ ```
340
+
341
+ ### **Action Tooltips**
342
+ Tooltips for action buttons.
343
+
344
+ ```tsx
345
+ import React from 'react';
346
+ import { Tooltip } from '@app-studio/web';
347
+ import { Button, Horizontal } from 'app-studio';
348
+ import { EditIcon, DeleteIcon, ShareIcon } from '@app-studio/web';
349
+
350
+ export const ActionTooltips = () => (
351
+ <Horizontal gap={10}>
352
+ <Tooltip content="Edit">
353
+ <Button isIconRounded icon={<EditIcon widthHeight={16} />} />
167
354
  </Tooltip>
168
- );
169
- };
355
+ <Tooltip content="Delete">
356
+ <Button isIconRounded icon={<DeleteIcon widthHeight={16} />} />
357
+ </Tooltip>
358
+ <Tooltip content="Share">
359
+ <Button isIconRounded icon={<ShareIcon widthHeight={16} />} />
360
+ </Tooltip>
361
+ </Horizontal>
362
+ );
363
+ ```
364
+
365
+ ### **Rich Content Tooltips**
366
+ Tooltips with rich formatted content.
367
+
368
+ ```tsx
369
+ import React from 'react';
370
+ import { Tooltip } from '@app-studio/web';
371
+ import { Button, Vertical, Text, Horizontal } from 'app-studio';
372
+
373
+ export const RichContentTooltip = () => (
374
+ <Tooltip
375
+ content={
376
+ <Vertical gap={10}>
377
+ <Text fontSize={14} fontWeight="bold">Keyboard Shortcuts</Text>
378
+ <Vertical gap={5}>
379
+ <Horizontal gap={10}>
380
+ <Text fontSize={12} fontWeight="bold">Ctrl+S</Text>
381
+ <Text fontSize={12}>Save</Text>
382
+ </Horizontal>
383
+ <Horizontal gap={10}>
384
+ <Text fontSize={12} fontWeight="bold">Ctrl+Z</Text>
385
+ <Text fontSize={12}>Undo</Text>
386
+ </Horizontal>
387
+ <Horizontal gap={10}>
388
+ <Text fontSize={12} fontWeight="bold">Ctrl+Y</Text>
389
+ <Text fontSize={12}>Redo</Text>
390
+ </Horizontal>
391
+ </Vertical>
392
+ </Vertical>
393
+ }
394
+ size="lg"
395
+ >
396
+ <Button>Shortcuts</Button>
397
+ </Tooltip>
398
+ );
399
+ ```
400
+
401
+ ### **Status Tooltips**
402
+ Tooltips showing status information.
403
+
404
+ ```tsx
405
+ import React from 'react';
406
+ import { Tooltip } from '@app-studio/web';
407
+ import { StatusIndicator } from '@app-studio/web';
408
+ import { Vertical, Text } from 'app-studio';
409
+
410
+ export const StatusTooltip = () => (
411
+ <Tooltip
412
+ content={
413
+ <Vertical gap={5}>
414
+ <Text fontSize={12} fontWeight="bold">Server Status</Text>
415
+ <Text fontSize={12}>Last checked: 2 minutes ago</Text>
416
+ <Text fontSize={12}>Uptime: 99.9%</Text>
417
+ </Vertical>
418
+ }
419
+ >
420
+ <StatusIndicator status="active" label="Online" />
421
+ </Tooltip>
422
+ );
170
423
  ```
171
424
 
172
- ### **Integration with Other Components**
173
- Tooltips can be easily integrated with other components.
425
+ ### **Truncated Text Tooltips**
426
+ Tooltips for truncated text.
174
427
 
175
428
  ```tsx
176
429
  import React from 'react';
177
- import { Tooltip } from '../Tooltip';
178
- import { Button } from '../../Button/Button';
179
- import { Icon } from '../../Icon/Icon';
430
+ import { Tooltip } from '@app-studio/web';
431
+ import { Text } from 'app-studio';
180
432
 
181
- export const IntegratedTooltip = () => {
433
+ export const TruncatedTextTooltip = () => {
434
+ const longText = "This is a very long text that will be truncated in the UI but shown in full in the tooltip";
435
+
182
436
  return (
183
- <Button>
184
- Save
185
- <Tooltip content="Save your changes">
186
- <Icon name="info-circle" marginLeft={5} />
187
- </Tooltip>
188
- </Button>
437
+ <Tooltip content={longText}>
438
+ <Text
439
+ maxWidth={200}
440
+ overflow="hidden"
441
+ textOverflow="ellipsis"
442
+ whiteSpace="nowrap"
443
+ >
444
+ {longText}
445
+ </Text>
446
+ </Tooltip>
189
447
  );
190
448
  };
191
449
  ```
450
+
451
+ ### **Disabled Element Tooltips**
452
+ Tooltips on disabled elements.
453
+
454
+ ```tsx
455
+ import React from 'react';
456
+ import { Tooltip } from '@app-studio/web';
457
+ import { Button } from 'app-studio';
458
+
459
+ export const DisabledElementTooltip = () => (
460
+ <Tooltip content="This action is not available">
461
+ <span>
462
+ <Button isDisabled>Disabled Action</Button>
463
+ </span>
464
+ </Tooltip>
465
+ );
466
+ ```
467
+
468
+ ### **Interactive Tooltips**
469
+ Tooltips with interactive content.
470
+
471
+ ```tsx
472
+ import React from 'react';
473
+ import { Tooltip } from '@app-studio/web';
474
+ import { Button, Vertical, Text } from 'app-studio';
475
+
476
+ export const InteractiveTooltip = () => (
477
+ <Tooltip
478
+ content={
479
+ <Vertical gap={10}>
480
+ <Text fontSize={14}>Are you sure?</Text>
481
+ <Button size="sm" onClick={() => console.log('Confirmed')}>
482
+ Confirm
483
+ </Button>
484
+ </Vertical>
485
+ }
486
+ closeDelay={0}
487
+ >
488
+ <Button>Delete</Button>
489
+ </Tooltip>
490
+ );
491
+ ```
492
+
493
+ ### **Complete Example**
494
+ A comprehensive tooltip showcase.
495
+
496
+ ```tsx
497
+ import React from 'react';
498
+ import { Tooltip } from '@app-studio/web';
499
+ import { Button, Vertical, Horizontal, Text, Card } from 'app-studio';
500
+
501
+ export const CompleteTooltipExample = () => (
502
+ <Card padding={30}>
503
+ <Vertical gap={30}>
504
+ <Vertical gap={10}>
505
+ <Text fontSize={18} fontWeight="bold">Tooltip Positions</Text>
506
+ <Horizontal gap={15}>
507
+ {['top', 'bottom', 'left', 'right'].map((position) => (
508
+ <Tooltip
509
+ key={position}
510
+ content={`${position} tooltip`}
511
+ position={position as any}
512
+ >
513
+ <Button>{position}</Button>
514
+ </Tooltip>
515
+ ))}
516
+ </Horizontal>
517
+ </Vertical>
518
+
519
+ <Vertical gap={10}>
520
+ <Text fontSize={18} fontWeight="bold">Tooltip Variants</Text>
521
+ <Horizontal gap={15}>
522
+ {['default', 'primary', 'success', 'error'].map((variant) => (
523
+ <Tooltip
524
+ key={variant}
525
+ content={`${variant} variant`}
526
+ variant={variant as any}
527
+ >
528
+ <Button>{variant}</Button>
529
+ </Tooltip>
530
+ ))}
531
+ </Horizontal>
532
+ </Vertical>
533
+
534
+ <Vertical gap={10}>
535
+ <Text fontSize={18} fontWeight="bold">Rich Content</Text>
536
+ <Tooltip
537
+ content={
538
+ <Vertical gap={8}>
539
+ <Text fontSize={14} fontWeight="bold">User Information</Text>
540
+ <Text fontSize={12}>Name: John Doe</Text>
541
+ <Text fontSize={12}>Email: john@example.com</Text>
542
+ <Text fontSize={12}>Role: Administrator</Text>
543
+ </Vertical>
544
+ }
545
+ size="lg"
546
+ >
547
+ <Button>View Details</Button>
548
+ </Tooltip>
549
+ </Vertical>
550
+ </Vertical>
551
+ </Card>
552
+ );
553
+ ```
554
+