@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,18 +1,19 @@
1
1
  # Slider
2
2
 
3
- A component that allows users to select a value from a range by moving a handle.
3
+ The Slider component allows users to select a single value from a predefined range by dragging a thumb.
4
4
 
5
5
  ### **Import**
6
- ```tsx
7
- import { Slider } from '@app-studio/web';
8
- ```
6
+ ```tsx
7
+ import { Slider } from '@app-studio/web';
8
+ ```
9
9
 
10
10
  ### **Default**
11
11
  ```tsx
12
12
  import React, { useState } from 'react';
13
- import { Slider } from '../Slider';
13
+ import { Vertical } from 'app-studio';
14
+ import { Slider } from '@app-studio/web';
14
15
 
15
- export const DefaultSlider = () => {
16
+ export const DefaultDemo = () => {
16
17
  const [value, setValue] = useState(50);
17
18
 
18
19
  const handleChange = (newValue: number) => {
@@ -20,213 +21,126 @@ export const DefaultSlider = () => {
20
21
  };
21
22
 
22
23
  return (
23
- <Slider
24
- label="Default Slider"
25
- value={value}
26
- onChange={handleChange}
27
- showValue
28
- helperText="Drag the slider to change the value"
29
- />
24
+ <Vertical gap={20} width="100%" maxWidth={400}>
25
+ <Slider
26
+ label="Default Slider"
27
+ value={value}
28
+ onChange={handleChange}
29
+ showValue
30
+ helperText="Drag the slider to change the value"
31
+ />
32
+ </Vertical>
30
33
  );
31
34
  };
32
35
  ```
33
36
 
34
- ### **Range**
35
- Customize the min, max, and step values.
36
-
37
- ```tsx
38
- import React, { useState } from 'react';
39
- import { Slider } from '../Slider';
40
-
41
- export const RangeSlider = () => {
42
- const [value, setValue] = useState(25);
43
-
44
- return (
45
- <Slider
46
- label="Custom Range"
47
- value={value}
48
- onChange={setValue}
49
- min={0}
50
- max={200}
51
- step={5}
52
- showValue
53
- helperText="Range from 0 to 200 with steps of 5"
54
- />
55
- );
56
- };
57
- ```
37
+ ### **stepValues**
38
+ An optional array of specific values the slider thumb should snap to.
58
39
 
59
- ### **Step Values**
60
- Use specific step values instead of a continuous range.
40
+ - **Type:** `number[]`
41
+ - **Possible Values:** ``
61
42
 
62
43
  ```tsx
63
44
  import React, { useState } from 'react';
64
- import { Slider } from '../Slider';
45
+ import { Vertical } from 'app-studio';
46
+ import { Horizontal } from 'app-studio';
47
+ import { Text } from 'app-studio';
48
+ import { Slider } from '@app-studio/web';
65
49
 
66
- export const StepValuesSlider = () => {
67
- const [value, setValue] = useState(40);
68
- const stepValues = [0, 20, 40, 60, 80, 100];
69
-
70
- return (
71
- <Slider
72
- label="Step Values Slider"
73
- value={value}
74
- onChange={setValue}
75
- min={0}
76
- max={100}
77
- stepValues={stepValues}
78
- showValue
79
- helperText="This slider only allows specific values"
80
- />
81
- );
82
- };
83
- ```
84
-
85
- ### **Orientation**
86
- Change the orientation of the slider.
87
-
88
- ```tsx
89
- import React, { useState } from 'react';
90
- import { Slider } from '../Slider';
91
- import { View } from 'app-studio';
50
+ export const StepValuesDemo = () => {
51
+ const [value, setValue] = useState(25);
92
52
 
93
- export const VerticalSlider = () => {
94
- const [value, setValue] = useState(50);
53
+ // Define specific values that the slider can take
54
+ const stepValues = [0, 25, 50, 75, 100];
95
55
 
96
56
  return (
97
- <View height={250}>
57
+ <Vertical gap={20} width="100%" maxWidth={400}>
98
58
  <Slider
99
- orientation="vertical"
59
+ label="Slider with Specific Steps"
100
60
  value={value}
101
61
  onChange={setValue}
102
62
  min={0}
103
63
  max={100}
104
- step={1}
105
- showTooltip
106
- ariaLabel="Vertical slider"
64
+ stepValues={stepValues}
65
+ showValue
66
+ helperText="This slider only allows values: 0, 25, 50, 75, 100"
107
67
  />
108
- </View>
109
- );
110
- };
111
- ```
112
-
113
- ### **Tooltip**
114
- Show a tooltip when dragging the slider.
115
68
 
116
- ```tsx
117
- import React, { useState } from 'react';
118
- import { Slider } from '../Slider';
119
-
120
- export const TooltipSlider = () => {
121
- const [value, setValue] = useState(50);
122
-
123
- return (
124
- <Slider
125
- label="Slider with Tooltip"
126
- value={value}
127
- onChange={setValue}
128
- showTooltip
129
- helperText="Drag to see the tooltip"
130
- />
69
+ <Horizontal justifyContent="space-between" width="100%">
70
+ {stepValues.map((step) => (
71
+ <Text key={step} fontSize={12} color="color.blueGray.500">
72
+ {step}
73
+ </Text>
74
+ ))}
75
+ </Horizontal>
76
+ </Vertical>
131
77
  );
132
78
  };
133
- ```
134
79
 
135
- ### **Disabled**
136
- Disable the slider to prevent interaction.
80
+ export const PricingTiersDemo = () => {
81
+ const [value, setValue] = useState(19.99);
137
82
 
138
- ```tsx
139
- import React from 'react';
140
- import { Slider } from '../Slider';
83
+ // Define pricing tiers
84
+ const pricingTiers = [9.99, 19.99, 29.99, 49.99, 99.99];
141
85
 
142
- export const DisabledSlider = () => {
143
86
  return (
144
- <Slider
145
- label="Disabled Slider"
146
- value={30}
147
- isDisabled
148
- helperText="This slider cannot be interacted with"
149
- />
150
- );
151
- };
152
- ```
153
-
154
- ### **Custom Styling**
155
- Customize the appearance of the slider.
156
-
157
- ```tsx
158
- import React, { useState } from 'react';
159
- import { Slider } from '../Slider';
87
+ <Vertical gap={20} width="100%" maxWidth={400}>
88
+ <Text fontSize={16} fontWeight={500}>
89
+ Select Your Pricing Plan
90
+ </Text>
160
91
 
161
- export const CustomStyledSlider = () => {
162
- const [value, setValue] = useState(60);
92
+ <Slider
93
+ value={value}
94
+ onChange={setValue}
95
+ min={0}
96
+ max={100}
97
+ stepValues={pricingTiers}
98
+ showValue
99
+ views={{
100
+ track: {
101
+ backgroundColor: 'color.green.100',
102
+ height: 8,
103
+ },
104
+ progress: {
105
+ backgroundColor: 'color.green.500',
106
+ },
107
+ thumb: {
108
+ backgroundColor: 'color.white',
109
+ border: '2px solid color.green.500',
110
+ },
111
+ valueLabel: {
112
+ backgroundColor: 'color.green.500',
113
+ color: 'color.white',
114
+ padding: '2px 8px',
115
+ borderRadius: 4,
116
+ fontWeight: 600,
117
+ },
118
+ stepMarks: {
119
+ width: 6,
120
+ height: 6,
121
+ backgroundColor: 'color.green.700',
122
+ },
123
+ }}
124
+ />
163
125
 
164
- return (
165
- <Slider
166
- label="Custom Styled Slider"
167
- value={value}
168
- onChange={setValue}
169
- showValue
170
- colorScheme="theme.secondary"
171
- views={{
172
- track: {
173
- backgroundColor: 'color.gray.200',
174
- height: 8,
175
- borderRadius: 4,
176
- },
177
- progress: {
178
- backgroundColor: 'color.blue.500',
179
- },
180
- thumb: {
181
- backgroundColor: 'color.white',
182
- border: '2px solid color.blue.500',
183
- width: 20,
184
- height: 20,
185
- },
186
- valueLabel: {
187
- color: 'color.blue.500',
188
- fontWeight: 'bold',
189
- },
190
- }}
191
- />
126
+ <Horizontal justifyContent="space-between" width="100%">
127
+ {pricingTiers.map((price) => (
128
+ <Text
129
+ key={price}
130
+ fontSize={12}
131
+ color="color.green.700"
132
+ fontWeight={500}
133
+ >
134
+ ${price}
135
+ </Text>
136
+ ))}
137
+ </Horizontal>
138
+
139
+ <Text fontSize={14} color="color.blueGray.600" textAlign="center">
140
+ Selected Plan: ${value}/month
141
+ </Text>
142
+ </Vertical>
192
143
  );
193
144
  };
194
145
  ```
195
146
 
196
- ### **Formik Integration**
197
- Use the slider with Formik for form state management.
198
-
199
- ```tsx
200
- import React from 'react';
201
- import { Formik, Form } from 'formik';
202
- import { FormikSlider } from '../../Formik/Formik.Slider';
203
- import { Button } from '../../Button/Button';
204
-
205
- export const FormikSliderExample = () => {
206
- return (
207
- <Formik
208
- initialValues={{ slider: 50 }}
209
- onSubmit={(values) => {
210
- alert(JSON.stringify(values, null, 2));
211
- }}
212
- >
213
- {({ handleSubmit }) => (
214
- <Form>
215
- <FormikSlider
216
- name="slider"
217
- label="Formik Slider"
218
- min={0}
219
- max={100}
220
- step={1}
221
- showValue
222
- helperText="This slider is connected to Formik"
223
- />
224
- <Button type="submit" onClick={handleSubmit} marginTop={16}>
225
- Submit
226
- </Button>
227
- </Form>
228
- )}
229
- </Formik>
230
- );
231
- };
232
- ```
@@ -0,0 +1,373 @@
1
+ # StatusIndicator
2
+
3
+ A status indicator component for displaying status states with labels and customizable styling.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { StatusIndicator } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Default**
11
+ ```tsx
12
+ import React from 'react';
13
+ import { StatusIndicator } from '@app-studio/web';
14
+
15
+ export const DefaultStatusIndicator = () => (
16
+ <StatusIndicator status="success" />
17
+ );
18
+ ```
19
+
20
+ ### **status**
21
+ The status state to display.
22
+
23
+ - **Type:** `Status`
24
+ - **Possible Values:** `'success' | 'error' | 'warning' | 'info' | 'pending' | 'active' | 'inactive'`
25
+
26
+ ```tsx
27
+ import React from 'react';
28
+ import { StatusIndicator } from '@app-studio/web';
29
+ import { Vertical } from 'app-studio';
30
+
31
+ export const StatusStates = () => (
32
+ <Vertical gap={15}>
33
+ <StatusIndicator status="success" />
34
+ <StatusIndicator status="error" />
35
+ <StatusIndicator status="warning" />
36
+ <StatusIndicator status="info" />
37
+ <StatusIndicator status="pending" />
38
+ <StatusIndicator status="active" />
39
+ <StatusIndicator status="inactive" />
40
+ </Vertical>
41
+ );
42
+ ```
43
+
44
+ ### **label**
45
+ Label text to display next to the indicator.
46
+
47
+ - **Type:** `string`
48
+
49
+ ```tsx
50
+ import React from 'react';
51
+ import { StatusIndicator } from '@app-studio/web';
52
+ import { Vertical } from 'app-studio';
53
+
54
+ export const LabeledStatusIndicators = () => (
55
+ <Vertical gap={15}>
56
+ <StatusIndicator status="success" label="Completed" />
57
+ <StatusIndicator status="error" label="Failed" />
58
+ <StatusIndicator status="warning" label="Warning" />
59
+ <StatusIndicator status="info" label="Information" />
60
+ <StatusIndicator status="pending" label="Pending" />
61
+ <StatusIndicator status="active" label="Active" />
62
+ <StatusIndicator status="inactive" label="Inactive" />
63
+ </Vertical>
64
+ );
65
+ ```
66
+
67
+ ### **themeMode**
68
+ Optional theme mode override.
69
+
70
+ - **Type:** `'light' | 'dark'`
71
+
72
+ ```tsx
73
+ import React from 'react';
74
+ import { StatusIndicator } from '@app-studio/web';
75
+ import { Horizontal } from 'app-studio';
76
+
77
+ export const ThemedStatusIndicators = () => (
78
+ <Horizontal gap={20}>
79
+ <StatusIndicator
80
+ status="success"
81
+ label="Light Mode"
82
+ themeMode="light"
83
+ />
84
+ <StatusIndicator
85
+ status="success"
86
+ label="Dark Mode"
87
+ themeMode="dark"
88
+ />
89
+ </Horizontal>
90
+ );
91
+ ```
92
+
93
+ ### **views**
94
+ Custom styles for the status indicator.
95
+
96
+ - **Type:** `StatusIndicatorStyles`
97
+
98
+ ```tsx
99
+ import React from 'react';
100
+ import { StatusIndicator } from '@app-studio/web';
101
+
102
+ export const StyledStatusIndicator = () => (
103
+ <StatusIndicator
104
+ status="success"
105
+ label="Custom Styled"
106
+ views={{
107
+ container: {
108
+ padding: 10,
109
+ backgroundColor: '#f0fdf4',
110
+ borderRadius: 8,
111
+ },
112
+ indicator: {
113
+ width: 12,
114
+ height: 12,
115
+ },
116
+ label: {
117
+ fontSize: 16,
118
+ fontWeight: 'bold',
119
+ }
120
+ }}
121
+ />
122
+ );
123
+ ```
124
+
125
+ ### **User Status**
126
+ Showing online/offline status.
127
+
128
+ ```tsx
129
+ import React from 'react';
130
+ import { StatusIndicator } from '@app-studio/web';
131
+ import { Horizontal, Avatar, Vertical, Text } from 'app-studio';
132
+
133
+ export const UserStatus = () => (
134
+ <Horizontal gap={15} alignItems="center">
135
+ <Avatar src="/user.jpg" size={48} />
136
+ <Vertical gap={5}>
137
+ <Text fontWeight="bold">John Doe</Text>
138
+ <StatusIndicator status="active" label="Online" />
139
+ </Vertical>
140
+ </Horizontal>
141
+ );
142
+ ```
143
+
144
+ ### **Order Status**
145
+ Displaying order or shipment status.
146
+
147
+ ```tsx
148
+ import React from 'react';
149
+ import { StatusIndicator } from '@app-studio/web';
150
+ import { Vertical, Text, Card } from 'app-studio';
151
+
152
+ export const OrderStatus = () => (
153
+ <Card padding={20}>
154
+ <Vertical gap={15}>
155
+ <Text fontSize={18} fontWeight="bold">Order #12345</Text>
156
+ <StatusIndicator status="success" label="Delivered" />
157
+ <Text fontSize={14} color="#6b7280">
158
+ Your order was delivered on March 15, 2024
159
+ </Text>
160
+ </Vertical>
161
+ </Card>
162
+ );
163
+ ```
164
+
165
+ ### **System Status**
166
+ Showing system or service status.
167
+
168
+ ```tsx
169
+ import React from 'react';
170
+ import { StatusIndicator } from '@app-studio/web';
171
+ import { Vertical, Horizontal, Text } from 'app-studio';
172
+
173
+ export const SystemStatus = () => (
174
+ <Vertical gap={15}>
175
+ <Text fontSize={20} fontWeight="bold">System Status</Text>
176
+
177
+ <Vertical gap={10}>
178
+ <Horizontal justifyContent="space-between" alignItems="center">
179
+ <Text>API Server</Text>
180
+ <StatusIndicator status="active" label="Operational" />
181
+ </Horizontal>
182
+
183
+ <Horizontal justifyContent="space-between" alignItems="center">
184
+ <Text>Database</Text>
185
+ <StatusIndicator status="active" label="Operational" />
186
+ </Horizontal>
187
+
188
+ <Horizontal justifyContent="space-between" alignItems="center">
189
+ <Text>CDN</Text>
190
+ <StatusIndicator status="warning" label="Degraded" />
191
+ </Horizontal>
192
+
193
+ <Horizontal justifyContent="space-between" alignItems="center">
194
+ <Text>Email Service</Text>
195
+ <StatusIndicator status="error" label="Down" />
196
+ </Horizontal>
197
+ </Vertical>
198
+ </Vertical>
199
+ );
200
+ ```
201
+
202
+ ### **Task Status**
203
+ Displaying task or project status.
204
+
205
+ ```tsx
206
+ import React from 'react';
207
+ import { StatusIndicator } from '@app-studio/web';
208
+ import { Vertical, Horizontal, Text } from 'app-studio';
209
+
210
+ export const TaskStatus = () => {
211
+ const tasks = [
212
+ { id: 1, name: 'Design mockups', status: 'success' as const, label: 'Complete' },
213
+ { id: 2, name: 'Develop frontend', status: 'active' as const, label: 'In Progress' },
214
+ { id: 3, name: 'Write tests', status: 'pending' as const, label: 'Pending' },
215
+ { id: 4, name: 'Deploy to production', status: 'inactive' as const, label: 'Not Started' },
216
+ ];
217
+
218
+ return (
219
+ <Vertical gap={15}>
220
+ {tasks.map((task) => (
221
+ <Horizontal key={task.id} justifyContent="space-between" alignItems="center">
222
+ <Text>{task.name}</Text>
223
+ <StatusIndicator status={task.status} label={task.label} />
224
+ </Horizontal>
225
+ ))}
226
+ </Vertical>
227
+ );
228
+ };
229
+ ```
230
+
231
+ ### **Payment Status**
232
+ Showing payment or transaction status.
233
+
234
+ ```tsx
235
+ import React from 'react';
236
+ import { StatusIndicator } from '@app-studio/web';
237
+ import { Vertical, Horizontal, Text, Card } from 'app-studio';
238
+
239
+ export const PaymentStatus = () => (
240
+ <Card padding={20}>
241
+ <Vertical gap={15}>
242
+ <Horizontal justifyContent="space-between" alignItems="center">
243
+ <Vertical gap={5}>
244
+ <Text fontSize={16} fontWeight="bold">Payment to Acme Corp</Text>
245
+ <Text fontSize={14} color="#6b7280">$1,234.56</Text>
246
+ </Vertical>
247
+ <StatusIndicator status="success" label="Paid" />
248
+ </Horizontal>
249
+
250
+ <Text fontSize={14} color="#6b7280">
251
+ Transaction ID: TXN-2024-03-15-001
252
+ </Text>
253
+ </Vertical>
254
+ </Card>
255
+ );
256
+ ```
257
+
258
+ ### **Server Status Dashboard**
259
+ A complete server status dashboard.
260
+
261
+ ```tsx
262
+ import React from 'react';
263
+ import { StatusIndicator } from '@app-studio/web';
264
+ import { Vertical, Horizontal, Text, Card } from 'app-studio';
265
+
266
+ export const ServerStatusDashboard = () => {
267
+ const servers = [
268
+ { name: 'Web Server 1', status: 'active' as const, uptime: '99.9%' },
269
+ { name: 'Web Server 2', status: 'active' as const, uptime: '99.8%' },
270
+ { name: 'Database Primary', status: 'active' as const, uptime: '100%' },
271
+ { name: 'Database Replica', status: 'warning' as const, uptime: '95.2%' },
272
+ { name: 'Cache Server', status: 'error' as const, uptime: '0%' },
273
+ ];
274
+
275
+ return (
276
+ <Card padding={20}>
277
+ <Vertical gap={20}>
278
+ <Text fontSize={20} fontWeight="bold">Server Status</Text>
279
+
280
+ <Vertical gap={15}>
281
+ {servers.map((server) => (
282
+ <Card key={server.name} padding={15} variant="outlined">
283
+ <Horizontal justifyContent="space-between" alignItems="center">
284
+ <Vertical gap={5}>
285
+ <Text fontWeight="bold">{server.name}</Text>
286
+ <Text fontSize={14} color="#6b7280">
287
+ Uptime: {server.uptime}
288
+ </Text>
289
+ </Vertical>
290
+ <StatusIndicator
291
+ status={server.status}
292
+ label={
293
+ server.status === 'active' ? 'Online' :
294
+ server.status === 'warning' ? 'Degraded' :
295
+ 'Offline'
296
+ }
297
+ />
298
+ </Horizontal>
299
+ </Card>
300
+ ))}
301
+ </Vertical>
302
+ </Vertical>
303
+ </Card>
304
+ );
305
+ };
306
+ ```
307
+
308
+ ### **Notification Status**
309
+ Using status indicators in notifications.
310
+
311
+ ```tsx
312
+ import React from 'react';
313
+ import { StatusIndicator } from '@app-studio/web';
314
+ import { Vertical, Horizontal, Text } from 'app-studio';
315
+
316
+ export const NotificationStatus = () => {
317
+ const notifications = [
318
+ {
319
+ id: 1,
320
+ message: 'Deployment successful',
321
+ status: 'success' as const,
322
+ time: '2 minutes ago'
323
+ },
324
+ {
325
+ id: 2,
326
+ message: 'High memory usage detected',
327
+ status: 'warning' as const,
328
+ time: '5 minutes ago'
329
+ },
330
+ {
331
+ id: 3,
332
+ message: 'Build failed',
333
+ status: 'error' as const,
334
+ time: '10 minutes ago'
335
+ },
336
+ ];
337
+
338
+ return (
339
+ <Vertical gap={10}>
340
+ {notifications.map((notification) => (
341
+ <Horizontal key={notification.id} gap={10} alignItems="flex-start">
342
+ <StatusIndicator status={notification.status} />
343
+ <Vertical gap={2}>
344
+ <Text>{notification.message}</Text>
345
+ <Text fontSize={12} color="#6b7280">{notification.time}</Text>
346
+ </Vertical>
347
+ </Horizontal>
348
+ ))}
349
+ </Vertical>
350
+ );
351
+ };
352
+ ```
353
+
354
+ ### **Animated Status**
355
+ Status indicator with pulse animation.
356
+
357
+ ```tsx
358
+ import React from 'react';
359
+ import { StatusIndicator } from '@app-studio/web';
360
+
361
+ export const AnimatedStatusIndicator = () => (
362
+ <StatusIndicator
363
+ status="active"
364
+ label="Live"
365
+ views={{
366
+ indicator: {
367
+ animation: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
368
+ }
369
+ }}
370
+ />
371
+ );
372
+ ```
373
+