@delightui/components 0.1.104 → 0.1.106

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 (120) hide show
  1. package/README.md +104 -1
  2. package/dist/cjs/components/molecules/Modal/DemoModal.d.ts +8 -0
  3. package/dist/cjs/components/molecules/Modal/ModalContext/ModalContext.d.ts +41 -0
  4. package/dist/cjs/components/molecules/Modal/ModalContext/ModalContext.types.d.ts +87 -0
  5. package/dist/cjs/components/molecules/Modal/ModalContext/index.d.ts +3 -0
  6. package/dist/cjs/components/molecules/Modal/ModalContext/useModal.d.ts +34 -0
  7. package/dist/cjs/components/molecules/Modal/index.d.ts +2 -0
  8. package/dist/cjs/components/molecules/Popover/Popover.presenter.d.ts +26 -0
  9. package/dist/cjs/components/molecules/Select/Option/Option.types.d.ts +6 -0
  10. package/dist/cjs/components/molecules/Select/Select.Context.d.ts +1 -1
  11. package/dist/cjs/components/molecules/Select/Select.d.ts +5 -5
  12. package/dist/cjs/components/molecules/Select/Select.presenter.d.ts +1 -0
  13. package/dist/cjs/components/molecules/Select/Select.types.d.ts +5 -0
  14. package/dist/cjs/components/molecules/Select/index.d.ts +2 -9
  15. package/dist/cjs/components/molecules/index.d.ts +2 -0
  16. package/dist/cjs/components/utils/accessibilityUtils.d.ts +41 -0
  17. package/dist/cjs/components/utils/index.d.ts +2 -0
  18. package/dist/cjs/library.css +13 -0
  19. package/dist/cjs/library.js +2 -2
  20. package/dist/cjs/library.js.map +1 -1
  21. package/dist/esm/components/molecules/Modal/DemoModal.d.ts +8 -0
  22. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.d.ts +41 -0
  23. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.types.d.ts +87 -0
  24. package/dist/esm/components/molecules/Modal/ModalContext/index.d.ts +3 -0
  25. package/dist/esm/components/molecules/Modal/ModalContext/useModal.d.ts +34 -0
  26. package/dist/esm/components/molecules/Modal/index.d.ts +2 -0
  27. package/dist/esm/components/molecules/Popover/Popover.presenter.d.ts +26 -0
  28. package/dist/esm/components/molecules/Select/Option/Option.types.d.ts +6 -0
  29. package/dist/esm/components/molecules/Select/Select.Context.d.ts +1 -1
  30. package/dist/esm/components/molecules/Select/Select.d.ts +5 -5
  31. package/dist/esm/components/molecules/Select/Select.presenter.d.ts +1 -0
  32. package/dist/esm/components/molecules/Select/Select.types.d.ts +5 -0
  33. package/dist/esm/components/molecules/Select/index.d.ts +2 -9
  34. package/dist/esm/components/molecules/index.d.ts +2 -0
  35. package/dist/esm/components/utils/accessibilityUtils.d.ts +41 -0
  36. package/dist/esm/components/utils/index.d.ts +2 -0
  37. package/dist/esm/library.css +13 -0
  38. package/dist/esm/library.js +3 -3
  39. package/dist/esm/library.js.map +1 -1
  40. package/dist/index.d.ts +156 -12
  41. package/docs/README.md +264 -0
  42. package/docs/components/atoms/ActionImage.md +119 -0
  43. package/docs/components/atoms/Button.md +197 -0
  44. package/docs/components/atoms/Checkbox.md +299 -0
  45. package/docs/components/atoms/CheckboxItem.md +314 -0
  46. package/docs/components/atoms/Chip.md +380 -0
  47. package/docs/components/atoms/CustomToggle.md +270 -0
  48. package/docs/components/atoms/Icon.md +365 -0
  49. package/docs/components/atoms/IconButton.md +407 -0
  50. package/docs/components/atoms/Image.md +448 -0
  51. package/docs/components/atoms/Input.md +430 -0
  52. package/docs/components/atoms/ListItem.md +502 -0
  53. package/docs/components/atoms/Password.md +472 -0
  54. package/docs/components/atoms/RadioButton.md +614 -0
  55. package/docs/components/atoms/RadioButtonItem.md +588 -0
  56. package/docs/components/atoms/ResponsiveComponent.md +612 -0
  57. package/docs/components/atoms/SelectListItem.md +609 -0
  58. package/docs/components/atoms/Slider.md +605 -0
  59. package/docs/components/atoms/Spinner.md +605 -0
  60. package/docs/components/atoms/Text.md +463 -0
  61. package/docs/components/atoms/TextArea.md +670 -0
  62. package/docs/components/atoms/ToastNotification.md +668 -0
  63. package/docs/components/atoms/Toggle.md +737 -0
  64. package/docs/components/atoms/ToggleButton.md +751 -0
  65. package/docs/components/atoms/Tooltip.md +391 -0
  66. package/docs/components/molecules/Accordion.md +440 -0
  67. package/docs/components/molecules/AccordionGroup.md +547 -0
  68. package/docs/components/molecules/ActionCard.md +546 -0
  69. package/docs/components/molecules/Breadcrumb.md +403 -0
  70. package/docs/components/molecules/Breadcrumbs.md +485 -0
  71. package/docs/components/molecules/ButtonGroup.md +383 -0
  72. package/docs/components/molecules/Card.md +298 -0
  73. package/docs/components/molecules/ChipInput.md +646 -0
  74. package/docs/components/molecules/ContextMenu.md +768 -0
  75. package/docs/components/molecules/CustomTimeSelector.md +116 -0
  76. package/docs/components/molecules/DatePicker.md +516 -0
  77. package/docs/components/molecules/DateTimeSelector.md +166 -0
  78. package/docs/components/molecules/FormField.md +312 -0
  79. package/docs/components/molecules/Grid.md +577 -0
  80. package/docs/components/molecules/GridItem.md +834 -0
  81. package/docs/components/molecules/GridList.md +244 -0
  82. package/docs/components/molecules/List.md +485 -0
  83. package/docs/components/molecules/Modal.md +470 -0
  84. package/docs/components/molecules/ModalFooter.md +702 -0
  85. package/docs/components/molecules/ModalHeader.md +756 -0
  86. package/docs/components/molecules/ModalProvider.md +205 -0
  87. package/docs/components/molecules/Nav.md +530 -0
  88. package/docs/components/molecules/NavItem.md +572 -0
  89. package/docs/components/molecules/NavLink.md +499 -0
  90. package/docs/components/molecules/Option.md +521 -0
  91. package/docs/components/molecules/Pagination.md +592 -0
  92. package/docs/components/molecules/PaginationNumberField.md +722 -0
  93. package/docs/components/molecules/Popover.md +516 -0
  94. package/docs/components/molecules/ProgressBar.md +624 -0
  95. package/docs/components/molecules/RadioGroup.md +831 -0
  96. package/docs/components/molecules/RepeaterList.md +185 -0
  97. package/docs/components/molecules/Select.md +402 -0
  98. package/docs/components/molecules/SortableTrigger.md +82 -0
  99. package/docs/components/molecules/useModal.md +379 -0
  100. package/docs/components/organisms/Dropzone.md +346 -0
  101. package/docs/components/organisms/DropzoneClear.md +135 -0
  102. package/docs/components/organisms/DropzoneContent.md +216 -0
  103. package/docs/components/organisms/DropzoneFilename.md +191 -0
  104. package/docs/components/organisms/DropzoneSupportedFormats.md +184 -0
  105. package/docs/components/organisms/DropzoneTrigger.md +209 -0
  106. package/docs/components/organisms/Form.md +533 -0
  107. package/docs/components/organisms/SlideOutPanel.md +662 -0
  108. package/docs/components/organisms/TabContent.md +902 -0
  109. package/docs/components/organisms/TabItem.md +1091 -0
  110. package/docs/components/organisms/Table.md +611 -0
  111. package/docs/components/organisms/TableBody.md +679 -0
  112. package/docs/components/organisms/TableCell.md +482 -0
  113. package/docs/components/organisms/TableHeader.md +513 -0
  114. package/docs/components/organisms/TableHeaderCell.md +661 -0
  115. package/docs/components/organisms/TableRow.md +715 -0
  116. package/docs/components/organisms/Tabs.md +1330 -0
  117. package/docs/components/utils/ConditionalView.md +568 -0
  118. package/docs/components/utils/RenderStateView.md +726 -0
  119. package/docs/components/utils/WrapTextNodes.md +614 -0
  120. package/package.json +3 -2
@@ -0,0 +1,902 @@
1
+ # TabContent
2
+
3
+ ## Description
4
+
5
+ A content container component for tab panels that displays specific content associated with tab items. TabContent works in conjunction with the Tabs system to show and hide content based on the selected tab. It provides a structured way to organize and present different sections of information within a tabbed interface.
6
+
7
+ ## Aliases
8
+
9
+ - TabContent
10
+ - Tab Panel
11
+ - Tab Container
12
+ - Content Panel
13
+ - Tab Section
14
+
15
+ ## Props Breakdown
16
+
17
+ **Standalone Interface**
18
+
19
+ | Prop | Type | Default | Required | Description |
20
+ |------|------|---------|----------|-------------|
21
+ | `value` | `number \| string` | - | Yes | The tab contents value used to determine which tab is selected |
22
+ | `children` | `ReactNode` | - | Yes | The contents of the tab |
23
+ | `className` | `string` | - | No | Additional CSS class names for styling |
24
+
25
+ ## Examples
26
+
27
+ ### Basic Tab Content
28
+
29
+ ```tsx
30
+ import { Tabs, TabItem, TabContent } from '@delightui/components';
31
+
32
+ function BasicTabContentExample() {
33
+ return (
34
+ <Tabs>
35
+ <div>
36
+ <TabItem value="home" defaultTab>Home</TabItem>
37
+ <TabItem value="about">About</TabItem>
38
+ <TabItem value="contact">Contact</TabItem>
39
+ </div>
40
+
41
+ <TabContent value="home">
42
+ <div style={{ padding: '20px' }}>
43
+ <h2>Welcome Home</h2>
44
+ <p>This is the home tab content. Here you can find general information about our services and latest updates.</p>
45
+ <ul>
46
+ <li>Latest news and announcements</li>
47
+ <li>Featured products</li>
48
+ <li>Quick access to popular sections</li>
49
+ </ul>
50
+ </div>
51
+ </TabContent>
52
+
53
+ <TabContent value="about">
54
+ <div style={{ padding: '20px' }}>
55
+ <h2>About Us</h2>
56
+ <p>Learn more about our company, mission, and values.</p>
57
+ <p>We are dedicated to providing excellent service and innovative solutions to our customers.</p>
58
+ </div>
59
+ </TabContent>
60
+
61
+ <TabContent value="contact">
62
+ <div style={{ padding: '20px' }}>
63
+ <h2>Contact Information</h2>
64
+ <p>Get in touch with us through the following channels:</p>
65
+ <ul>
66
+ <li>Email: contact@example.com</li>
67
+ <li>Phone: +1-555-0123</li>
68
+ <li>Address: 123 Main St, City, State 12345</li>
69
+ </ul>
70
+ </div>
71
+ </TabContent>
72
+ </Tabs>
73
+ );
74
+ }
75
+ ```
76
+
77
+ ### Tab Content with Forms
78
+
79
+ ```tsx
80
+ import { Tabs, TabItem, TabContent, Input, TextArea, Button, FormField } from '@delightui/components';
81
+
82
+ function FormTabContentExample() {
83
+ const [personalInfo, setPersonalInfo] = useState({
84
+ firstName: '',
85
+ lastName: '',
86
+ email: '',
87
+ phone: ''
88
+ });
89
+
90
+ const [preferences, setPreferences] = useState({
91
+ notifications: true,
92
+ newsletter: false,
93
+ theme: 'light'
94
+ });
95
+
96
+ return (
97
+ <Tabs style="Underlined">
98
+ <div style={{ borderBottom: '1px solid #e0e0e0' }}>
99
+ <TabItem value="personal" defaultTab>Personal Info</TabItem>
100
+ <TabItem value="preferences">Preferences</TabItem>
101
+ <TabItem value="security">Security</TabItem>
102
+ </div>
103
+
104
+ <TabContent value="personal">
105
+ <div style={{ padding: '24px', maxWidth: '500px' }}>
106
+ <h3 style={{ marginBottom: '20px' }}>Personal Information</h3>
107
+ <div style={{ display: 'grid', gap: '16px' }}>
108
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>
109
+ <FormField label="First Name" required>
110
+ <Input
111
+ value={personalInfo.firstName}
112
+ onValueChange={(value) => setPersonalInfo(prev => ({ ...prev, firstName: value }))}
113
+ placeholder="Enter first name"
114
+ />
115
+ </FormField>
116
+ <FormField label="Last Name" required>
117
+ <Input
118
+ value={personalInfo.lastName}
119
+ onValueChange={(value) => setPersonalInfo(prev => ({ ...prev, lastName: value }))}
120
+ placeholder="Enter last name"
121
+ />
122
+ </FormField>
123
+ </div>
124
+ <FormField label="Email Address" required>
125
+ <Input
126
+ inputType="Email"
127
+ value={personalInfo.email}
128
+ onValueChange={(value) => setPersonalInfo(prev => ({ ...prev, email: value }))}
129
+ placeholder="Enter email address"
130
+ />
131
+ </FormField>
132
+ <FormField label="Phone Number">
133
+ <Input
134
+ inputType="Tel"
135
+ value={personalInfo.phone}
136
+ onValueChange={(value) => setPersonalInfo(prev => ({ ...prev, phone: value }))}
137
+ placeholder="Enter phone number"
138
+ />
139
+ </FormField>
140
+ <Button style="Primary">Save Personal Info</Button>
141
+ </div>
142
+ </div>
143
+ </TabContent>
144
+
145
+ <TabContent value="preferences">
146
+ <div style={{ padding: '24px', maxWidth: '500px' }}>
147
+ <h3 style={{ marginBottom: '20px' }}>Preferences</h3>
148
+ <div style={{ display: 'grid', gap: '20px' }}>
149
+ <FormField label="Notification Settings">
150
+ <div style={{ display: 'grid', gap: '12px' }}>
151
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
152
+ <input
153
+ type="checkbox"
154
+ checked={preferences.notifications}
155
+ onChange={(e) => setPreferences(prev => ({ ...prev, notifications: e.target.checked }))}
156
+ />
157
+ Enable push notifications
158
+ </label>
159
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
160
+ <input
161
+ type="checkbox"
162
+ checked={preferences.newsletter}
163
+ onChange={(e) => setPreferences(prev => ({ ...prev, newsletter: e.target.checked }))}
164
+ />
165
+ Subscribe to newsletter
166
+ </label>
167
+ </div>
168
+ </FormField>
169
+ <FormField label="Theme Preference">
170
+ <select
171
+ value={preferences.theme}
172
+ onChange={(e) => setPreferences(prev => ({ ...prev, theme: e.target.value }))}
173
+ style={{ padding: '8px', borderRadius: '4px', border: '1px solid #ccc' }}
174
+ >
175
+ <option value="light">Light</option>
176
+ <option value="dark">Dark</option>
177
+ <option value="auto">Auto</option>
178
+ </select>
179
+ </FormField>
180
+ <Button style="Primary">Save Preferences</Button>
181
+ </div>
182
+ </div>
183
+ </TabContent>
184
+
185
+ <TabContent value="security">
186
+ <div style={{ padding: '24px', maxWidth: '500px' }}>
187
+ <h3 style={{ marginBottom: '20px' }}>Security Settings</h3>
188
+ <div style={{ display: 'grid', gap: '16px' }}>
189
+ <FormField label="Current Password" required>
190
+ <Input
191
+ inputType="Password"
192
+ placeholder="Enter current password"
193
+ />
194
+ </FormField>
195
+ <FormField label="New Password" required>
196
+ <Input
197
+ inputType="Password"
198
+ placeholder="Enter new password"
199
+ />
200
+ </FormField>
201
+ <FormField label="Confirm New Password" required>
202
+ <Input
203
+ inputType="Password"
204
+ placeholder="Confirm new password"
205
+ />
206
+ </FormField>
207
+ <Button style="Primary">Update Password</Button>
208
+ </div>
209
+ </div>
210
+ </TabContent>
211
+ </Tabs>
212
+ );
213
+ }
214
+ ```
215
+
216
+ ### Tab Content with Data Tables
217
+
218
+ ```tsx
219
+ import { Tabs, TabItem, TabContent, Table, TableBody, TableHeader, TableRow, TableHeaderCell, TableCell, Button, Chip } from '@delightui/components';
220
+
221
+ function DataTableTabContentExample() {
222
+ const activeUsers = [
223
+ { name: 'John Doe', email: 'john@example.com', lastActive: '2 hours ago', status: 'Online' },
224
+ { name: 'Jane Smith', email: 'jane@example.com', lastActive: '30 minutes ago', status: 'Online' },
225
+ { name: 'Bob Wilson', email: 'bob@example.com', lastActive: '1 hour ago', status: 'Away' }
226
+ ];
227
+
228
+ const inactiveUsers = [
229
+ { name: 'Alice Brown', email: 'alice@example.com', lastActive: '2 days ago', status: 'Offline' },
230
+ { name: 'Charlie Davis', email: 'charlie@example.com', lastActive: '1 week ago', status: 'Offline' }
231
+ ];
232
+
233
+ const pendingUsers = [
234
+ { name: 'Diana Evans', email: 'diana@example.com', invited: '1 day ago', status: 'Pending' },
235
+ { name: 'Frank Miller', email: 'frank@example.com', invited: '3 days ago', status: 'Pending' }
236
+ ];
237
+
238
+ const getStatusColor = (status: string) => {
239
+ switch (status) {
240
+ case 'Online': return 'success';
241
+ case 'Away': return 'warning';
242
+ case 'Offline': return 'neutral';
243
+ case 'Pending': return 'primary';
244
+ default: return 'neutral';
245
+ }
246
+ };
247
+
248
+ return (
249
+ <Tabs>
250
+ <div style={{ borderBottom: '1px solid #e0e0e0', padding: '0 20px' }}>
251
+ <TabItem value="active" defaultTab>
252
+ Active Users ({activeUsers.length})
253
+ </TabItem>
254
+ <TabItem value="inactive">
255
+ Inactive Users ({inactiveUsers.length})
256
+ </TabItem>
257
+ <TabItem value="pending">
258
+ Pending Users ({pendingUsers.length})
259
+ </TabItem>
260
+ </div>
261
+
262
+ <TabContent value="active">
263
+ <div style={{ padding: '20px' }}>
264
+ <Table>
265
+ <TableHeader>
266
+ <TableRow>
267
+ <TableHeaderCell>Name</TableHeaderCell>
268
+ <TableHeaderCell>Email</TableHeaderCell>
269
+ <TableHeaderCell>Last Active</TableHeaderCell>
270
+ <TableHeaderCell>Status</TableHeaderCell>
271
+ <TableHeaderCell>Actions</TableHeaderCell>
272
+ </TableRow>
273
+ </TableHeader>
274
+ <TableBody>
275
+ {activeUsers.map((user, index) => (
276
+ <TableRow key={index}>
277
+ <TableCell>{user.name}</TableCell>
278
+ <TableCell>{user.email}</TableCell>
279
+ <TableCell>{user.lastActive}</TableCell>
280
+ <TableCell>
281
+ <Chip color={getStatusColor(user.status)}>
282
+ {user.status}
283
+ </Chip>
284
+ </TableCell>
285
+ <TableCell>
286
+ <Button size="Small" type="Outlined">Message</Button>
287
+ </TableCell>
288
+ </TableRow>
289
+ ))}
290
+ </TableBody>
291
+ </Table>
292
+ </div>
293
+ </TabContent>
294
+
295
+ <TabContent value="inactive">
296
+ <div style={{ padding: '20px' }}>
297
+ <Table>
298
+ <TableHeader>
299
+ <TableRow>
300
+ <TableHeaderCell>Name</TableHeaderCell>
301
+ <TableHeaderCell>Email</TableHeaderCell>
302
+ <TableHeaderCell>Last Active</TableHeaderCell>
303
+ <TableHeaderCell>Status</TableHeaderCell>
304
+ <TableHeaderCell>Actions</TableHeaderCell>
305
+ </TableRow>
306
+ </TableHeader>
307
+ <TableBody>
308
+ {inactiveUsers.map((user, index) => (
309
+ <TableRow key={index}>
310
+ <TableCell>{user.name}</TableCell>
311
+ <TableCell>{user.email}</TableCell>
312
+ <TableCell>{user.lastActive}</TableCell>
313
+ <TableCell>
314
+ <Chip color={getStatusColor(user.status)}>
315
+ {user.status}
316
+ </Chip>
317
+ </TableCell>
318
+ <TableCell>
319
+ <Button size="Small" type="Outlined">Reactivate</Button>
320
+ </TableCell>
321
+ </TableRow>
322
+ ))}
323
+ </TableBody>
324
+ </Table>
325
+ </div>
326
+ </TabContent>
327
+
328
+ <TabContent value="pending">
329
+ <div style={{ padding: '20px' }}>
330
+ <Table>
331
+ <TableHeader>
332
+ <TableRow>
333
+ <TableHeaderCell>Name</TableHeaderCell>
334
+ <TableHeaderCell>Email</TableHeaderCell>
335
+ <TableHeaderCell>Invited</TableHeaderCell>
336
+ <TableHeaderCell>Status</TableHeaderCell>
337
+ <TableHeaderCell>Actions</TableHeaderCell>
338
+ </TableRow>
339
+ </TableHeader>
340
+ <TableBody>
341
+ {pendingUsers.map((user, index) => (
342
+ <TableRow key={index}>
343
+ <TableCell>{user.name}</TableCell>
344
+ <TableCell>{user.email}</TableCell>
345
+ <TableCell>{user.invited}</TableCell>
346
+ <TableCell>
347
+ <Chip color={getStatusColor(user.status)}>
348
+ {user.status}
349
+ </Chip>
350
+ </TableCell>
351
+ <TableCell>
352
+ <div style={{ display: 'flex', gap: '8px' }}>
353
+ <Button size="Small" style="Primary">Resend</Button>
354
+ <Button size="Small" style="Destructive">Cancel</Button>
355
+ </div>
356
+ </TableCell>
357
+ </TableRow>
358
+ ))}
359
+ </TableBody>
360
+ </Table>
361
+ </div>
362
+ </TabContent>
363
+ </Tabs>
364
+ );
365
+ }
366
+ ```
367
+
368
+ ### Tab Content with Loading States
369
+
370
+ ```tsx
371
+ import { Tabs, TabItem, TabContent, Spinner, Button, Text } from '@delightui/components';
372
+
373
+ function LoadingTabContentExample() {
374
+ const [loadingStates, setLoadingStates] = useState({
375
+ dashboard: false,
376
+ analytics: false,
377
+ reports: false
378
+ });
379
+
380
+ const [data, setData] = useState({
381
+ dashboard: null,
382
+ analytics: null,
383
+ reports: null
384
+ });
385
+
386
+ const loadData = async (tab: string) => {
387
+ setLoadingStates(prev => ({ ...prev, [tab]: true }));
388
+
389
+ // Simulate API call
390
+ await new Promise(resolve => setTimeout(resolve, 2000));
391
+
392
+ setData(prev => ({ ...prev, [tab]: `Loaded data for ${tab}` }));
393
+ setLoadingStates(prev => ({ ...prev, [tab]: false }));
394
+ };
395
+
396
+ return (
397
+ <Tabs>
398
+ <div>
399
+ <TabItem value="dashboard" defaultTab>Dashboard</TabItem>
400
+ <TabItem value="analytics">Analytics</TabItem>
401
+ <TabItem value="reports">Reports</TabItem>
402
+ </div>
403
+
404
+ <TabContent value="dashboard">
405
+ <div style={{ padding: '40px', textAlign: 'center' }}>
406
+ {loadingStates.dashboard ? (
407
+ <div>
408
+ <Spinner />
409
+ <Text style={{ marginTop: '16px' }}>Loading dashboard data...</Text>
410
+ </div>
411
+ ) : (
412
+ <div>
413
+ <h3>Dashboard</h3>
414
+ {data.dashboard ? (
415
+ <div>
416
+ <Text>{data.dashboard}</Text>
417
+ <div style={{ marginTop: '20px' }}>
418
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '16px' }}>
419
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
420
+ <Text size="Large" weight="Bold">1,234</Text>
421
+ <Text color="secondary">Total Users</Text>
422
+ </div>
423
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
424
+ <Text size="Large" weight="Bold">567</Text>
425
+ <Text color="secondary">Active Sessions</Text>
426
+ </div>
427
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
428
+ <Text size="Large" weight="Bold">89%</Text>
429
+ <Text color="secondary">Uptime</Text>
430
+ </div>
431
+ </div>
432
+ </div>
433
+ </div>
434
+ ) : (
435
+ <div>
436
+ <Text>No data loaded yet.</Text>
437
+ <Button
438
+ style="Primary"
439
+ onClick={() => loadData('dashboard')}
440
+ style={{ marginTop: '16px' }}
441
+ >
442
+ Load Dashboard Data
443
+ </Button>
444
+ </div>
445
+ )}
446
+ </div>
447
+ )}
448
+ </div>
449
+ </TabContent>
450
+
451
+ <TabContent value="analytics">
452
+ <div style={{ padding: '40px', textAlign: 'center' }}>
453
+ {loadingStates.analytics ? (
454
+ <div>
455
+ <Spinner />
456
+ <Text style={{ marginTop: '16px' }}>Analyzing data...</Text>
457
+ </div>
458
+ ) : (
459
+ <div>
460
+ <h3>Analytics</h3>
461
+ {data.analytics ? (
462
+ <div>
463
+ <Text>{data.analytics}</Text>
464
+ <div style={{ marginTop: '20px' }}>
465
+ <div style={{ height: '200px', border: '1px solid #e0e0e0', borderRadius: '8px', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
466
+ <Text color="secondary">[Chart Placeholder]</Text>
467
+ </div>
468
+ </div>
469
+ </div>
470
+ ) : (
471
+ <div>
472
+ <Text>Analytics data not loaded.</Text>
473
+ <Button
474
+ style="Primary"
475
+ onClick={() => loadData('analytics')}
476
+ style={{ marginTop: '16px' }}
477
+ >
478
+ Load Analytics
479
+ </Button>
480
+ </div>
481
+ )}
482
+ </div>
483
+ )}
484
+ </div>
485
+ </TabContent>
486
+
487
+ <TabContent value="reports">
488
+ <div style={{ padding: '40px', textAlign: 'center' }}>
489
+ {loadingStates.reports ? (
490
+ <div>
491
+ <Spinner />
492
+ <Text style={{ marginTop: '16px' }}>Generating reports...</Text>
493
+ </div>
494
+ ) : (
495
+ <div>
496
+ <h3>Reports</h3>
497
+ {data.reports ? (
498
+ <div>
499
+ <Text>{data.reports}</Text>
500
+ <div style={{ marginTop: '20px' }}>
501
+ <div style={{ display: 'grid', gap: '12px' }}>
502
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px', textAlign: 'left' }}>
503
+ <Text weight="Bold">Monthly Sales Report</Text>
504
+ <Text size="Small" color="secondary">Generated on {new Date().toLocaleDateString()}</Text>
505
+ </div>
506
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px', textAlign: 'left' }}>
507
+ <Text weight="Bold">User Activity Report</Text>
508
+ <Text size="Small" color="secondary">Generated on {new Date().toLocaleDateString()}</Text>
509
+ </div>
510
+ </div>
511
+ </div>
512
+ </div>
513
+ ) : (
514
+ <div>
515
+ <Text>No reports generated yet.</Text>
516
+ <Button
517
+ style="Primary"
518
+ onClick={() => loadData('reports')}
519
+ style={{ marginTop: '16px' }}
520
+ >
521
+ Generate Reports
522
+ </Button>
523
+ </div>
524
+ )}
525
+ </div>
526
+ )}
527
+ </div>
528
+ </TabContent>
529
+ </Tabs>
530
+ );
531
+ }
532
+ ```
533
+
534
+ ### Tab Content with Rich Media
535
+
536
+ ```tsx
537
+ import { Tabs, TabItem, TabContent, Image, Button, Text } from '@delightui/components';
538
+
539
+ function RichMediaTabContentExample() {
540
+ const [selectedImage, setSelectedImage] = useState(0);
541
+
542
+ const galleryImages = [
543
+ { src: '/images/gallery-1.jpg', title: 'Mountain Landscape', description: 'Beautiful mountain scenery at sunset' },
544
+ { src: '/images/gallery-2.jpg', title: 'Ocean View', description: 'Peaceful ocean waves on a sunny day' },
545
+ { src: '/images/gallery-3.jpg', title: 'Forest Trail', description: 'Winding path through green forest' }
546
+ ];
547
+
548
+ const videos = [
549
+ { id: 'video-1', title: 'Product Demo', duration: '3:45', thumbnail: '/images/video-thumb-1.jpg' },
550
+ { id: 'video-2', title: 'Tutorial Basics', duration: '8:20', thumbnail: '/images/video-thumb-2.jpg' },
551
+ { id: 'video-3', title: 'Advanced Features', duration: '12:15', thumbnail: '/images/video-thumb-3.jpg' }
552
+ ];
553
+
554
+ return (
555
+ <Tabs type="Vertical" style={{ height: '500px' }}>
556
+ <div style={{ width: '200px', borderRight: '1px solid #e0e0e0' }}>
557
+ <TabItem value="overview" defaultTab>Overview</TabItem>
558
+ <TabItem value="gallery">Gallery</TabItem>
559
+ <TabItem value="videos">Videos</TabItem>
560
+ <TabItem value="downloads">Downloads</TabItem>
561
+ </div>
562
+
563
+ <TabContent value="overview">
564
+ <div style={{ padding: '24px', flex: 1 }}>
565
+ <h2>Project Overview</h2>
566
+ <div style={{ display: 'grid', gap: '20px' }}>
567
+ <div>
568
+ <Text size="Large">
569
+ Welcome to our multimedia showcase. Here you can explore various types of content
570
+ including images, videos, and downloadable resources.
571
+ </Text>
572
+ </div>
573
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '20px' }}>
574
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
575
+ <h4>Image Gallery</h4>
576
+ <Text>Explore our collection of high-quality images and visual content.</Text>
577
+ </div>
578
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
579
+ <h4>Video Library</h4>
580
+ <Text>Watch tutorials, demos, and educational content.</Text>
581
+ </div>
582
+ </div>
583
+ </div>
584
+ </div>
585
+ </TabContent>
586
+
587
+ <TabContent value="gallery">
588
+ <div style={{ padding: '24px', flex: 1 }}>
589
+ <h2>Image Gallery</h2>
590
+ <div style={{ display: 'grid', gap: '20px' }}>
591
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', minHeight: '300px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
592
+ <Image
593
+ src={galleryImages[selectedImage].src}
594
+ alt={galleryImages[selectedImage].title}
595
+ fit="Cover"
596
+ style={{ maxWidth: '100%', maxHeight: '300px', borderRadius: '8px' }}
597
+ />
598
+ </div>
599
+ <div>
600
+ <h4>{galleryImages[selectedImage].title}</h4>
601
+ <Text color="secondary">{galleryImages[selectedImage].description}</Text>
602
+ </div>
603
+ <div style={{ display: 'flex', gap: '12px', justifyContent: 'center' }}>
604
+ {galleryImages.map((image, index) => (
605
+ <button
606
+ key={index}
607
+ onClick={() => setSelectedImage(index)}
608
+ style={{
609
+ padding: '4px',
610
+ border: selectedImage === index ? '2px solid #2196f3' : '2px solid transparent',
611
+ borderRadius: '4px',
612
+ background: 'none',
613
+ cursor: 'pointer'
614
+ }}
615
+ >
616
+ <Image
617
+ src={image.src}
618
+ alt={image.title}
619
+ width={60}
620
+ height={40}
621
+ fit="Cover"
622
+ />
623
+ </button>
624
+ ))}
625
+ </div>
626
+ </div>
627
+ </div>
628
+ </TabContent>
629
+
630
+ <TabContent value="videos">
631
+ <div style={{ padding: '24px', flex: 1 }}>
632
+ <h2>Video Library</h2>
633
+ <div style={{ display: 'grid', gap: '16px' }}>
634
+ {videos.map(video => (
635
+ <div key={video.id} style={{
636
+ display: 'flex',
637
+ gap: '16px',
638
+ padding: '16px',
639
+ border: '1px solid #e0e0e0',
640
+ borderRadius: '8px'
641
+ }}>
642
+ <Image
643
+ src={video.thumbnail}
644
+ alt={video.title}
645
+ width={120}
646
+ height={80}
647
+ fit="Cover"
648
+ style={{ borderRadius: '4px' }}
649
+ />
650
+ <div style={{ flex: 1 }}>
651
+ <h4>{video.title}</h4>
652
+ <Text color="secondary">Duration: {video.duration}</Text>
653
+ <Button size="Small" style="Primary" style={{ marginTop: '8px' }}>
654
+ Play Video
655
+ </Button>
656
+ </div>
657
+ </div>
658
+ ))}
659
+ </div>
660
+ </div>
661
+ </TabContent>
662
+
663
+ <TabContent value="downloads">
664
+ <div style={{ padding: '24px', flex: 1 }}>
665
+ <h2>Downloads</h2>
666
+ <div style={{ display: 'grid', gap: '16px' }}>
667
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
668
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
669
+ <div>
670
+ <Text weight="Bold">User Manual (PDF)</Text>
671
+ <Text size="Small" color="secondary">Complete guide - 2.5 MB</Text>
672
+ </div>
673
+ <Button size="Small" type="Outlined">Download</Button>
674
+ </div>
675
+ </div>
676
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
677
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
678
+ <div>
679
+ <Text weight="Bold">Sample Data (CSV)</Text>
680
+ <Text size="Small" color="secondary">Example dataset - 1.2 MB</Text>
681
+ </div>
682
+ <Button size="Small" type="Outlined">Download</Button>
683
+ </div>
684
+ </div>
685
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
686
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
687
+ <div>
688
+ <Text weight="Bold">Template Pack (ZIP)</Text>
689
+ <Text size="Small" color="secondary">Design templates - 5.8 MB</Text>
690
+ </div>
691
+ <Button size="Small" type="Outlined">Download</Button>
692
+ </div>
693
+ </div>
694
+ </div>
695
+ </div>
696
+ </TabContent>
697
+ </Tabs>
698
+ );
699
+ }
700
+ ```
701
+
702
+ ### Tab Content with Custom Styling
703
+
704
+ ```tsx
705
+ import { Tabs, TabItem, TabContent, Text, Button } from '@delightui/components';
706
+
707
+ function CustomStyledTabContentExample() {
708
+ return (
709
+ <Tabs style="Filled">
710
+ <div style={{
711
+ backgroundColor: '#1976d2',
712
+ padding: '0 20px',
713
+ borderRadius: '8px 8px 0 0'
714
+ }}>
715
+ <TabItem value="theme1" defaultTab style={{ color: 'white' }}>
716
+ Ocean Theme
717
+ </TabItem>
718
+ <TabItem value="theme2" style={{ color: 'white' }}>
719
+ Forest Theme
720
+ </TabItem>
721
+ <TabItem value="theme3" style={{ color: 'white' }}>
722
+ Sunset Theme
723
+ </TabItem>
724
+ </div>
725
+
726
+ <TabContent
727
+ value="theme1"
728
+ className="ocean-theme"
729
+ style={{
730
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
731
+ color: 'white',
732
+ minHeight: '300px'
733
+ }}
734
+ >
735
+ <div style={{ padding: '40px' }}>
736
+ <h2 style={{ color: 'white', marginBottom: '20px' }}>Ocean Theme</h2>
737
+ <Text style={{ color: 'rgba(255,255,255,0.9)', fontSize: '16px', lineHeight: '1.6' }}>
738
+ Dive into the depths of tranquility with our ocean-inspired theme.
739
+ Feel the calm waves and peaceful blue tones wash over your interface.
740
+ </Text>
741
+ <div style={{ marginTop: '24px' }}>
742
+ <Button
743
+ style="Secondary"
744
+ style={{
745
+ backgroundColor: 'rgba(255,255,255,0.2)',
746
+ border: '1px solid rgba(255,255,255,0.3)',
747
+ color: 'white'
748
+ }}
749
+ >
750
+ Explore Ocean
751
+ </Button>
752
+ </div>
753
+ </div>
754
+ </TabContent>
755
+
756
+ <TabContent
757
+ value="theme2"
758
+ className="forest-theme"
759
+ style={{
760
+ background: 'linear-gradient(135deg, #4b6cb7 0%, #182848 100%)',
761
+ color: 'white',
762
+ minHeight: '300px'
763
+ }}
764
+ >
765
+ <div style={{ padding: '40px' }}>
766
+ <h2 style={{ color: 'white', marginBottom: '20px' }}>Forest Theme</h2>
767
+ <Text style={{ color: 'rgba(255,255,255,0.9)', fontSize: '16px', lineHeight: '1.6' }}>
768
+ Embrace the serenity of nature with our forest theme.
769
+ Experience the deep greens and earthy tones that bring peace and grounding.
770
+ </Text>
771
+ <div style={{ marginTop: '24px' }}>
772
+ <Button
773
+ style="Secondary"
774
+ style={{
775
+ backgroundColor: 'rgba(255,255,255,0.2)',
776
+ border: '1px solid rgba(255,255,255,0.3)',
777
+ color: 'white'
778
+ }}
779
+ >
780
+ Explore Forest
781
+ </Button>
782
+ </div>
783
+ </div>
784
+ </TabContent>
785
+
786
+ <TabContent
787
+ value="theme3"
788
+ className="sunset-theme"
789
+ style={{
790
+ background: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
791
+ color: 'white',
792
+ minHeight: '300px'
793
+ }}
794
+ >
795
+ <div style={{ padding: '40px' }}>
796
+ <h2 style={{ color: 'white', marginBottom: '20px' }}>Sunset Theme</h2>
797
+ <Text style={{ color: 'rgba(255,255,255,0.9)', fontSize: '16px', lineHeight: '1.6' }}>
798
+ Bask in the warm glow of our sunset theme.
799
+ Feel the energy and warmth of vibrant oranges and passionate pinks.
800
+ </Text>
801
+ <div style={{ marginTop: '24px' }}>
802
+ <Button
803
+ style="Secondary"
804
+ style={{
805
+ backgroundColor: 'rgba(255,255,255,0.2)',
806
+ border: '1px solid rgba(255,255,255,0.3)',
807
+ color: 'white'
808
+ }}
809
+ >
810
+ Explore Sunset
811
+ </Button>
812
+ </div>
813
+ </div>
814
+ </TabContent>
815
+ </Tabs>
816
+ );
817
+ }
818
+ ```
819
+
820
+ ### Nested Tab Content
821
+
822
+ ```tsx
823
+ import { Tabs, TabItem, TabContent, Text } from '@delightui/components';
824
+
825
+ function NestedTabContentExample() {
826
+ return (
827
+ <Tabs>
828
+ <div>
829
+ <TabItem value="products" defaultTab>Products</TabItem>
830
+ <TabItem value="services">Services</TabItem>
831
+ <TabItem value="support">Support</TabItem>
832
+ </div>
833
+
834
+ <TabContent value="products">
835
+ <div style={{ padding: '20px' }}>
836
+ <h2>Our Products</h2>
837
+ <Tabs style="Underlined">
838
+ <div>
839
+ <TabItem value="software" defaultTab>Software</TabItem>
840
+ <TabItem value="hardware">Hardware</TabItem>
841
+ <TabItem value="accessories">Accessories</TabItem>
842
+ </div>
843
+
844
+ <TabContent value="software">
845
+ <div style={{ padding: '20px' }}>
846
+ <h3>Software Solutions</h3>
847
+ <Text>Explore our comprehensive range of software products designed to streamline your workflow.</Text>
848
+ <ul style={{ marginTop: '16px' }}>
849
+ <li>Project Management Suite</li>
850
+ <li>Analytics Dashboard</li>
851
+ <li>Customer Relations Manager</li>
852
+ <li>Inventory Tracking System</li>
853
+ </ul>
854
+ </div>
855
+ </TabContent>
856
+
857
+ <TabContent value="hardware">
858
+ <div style={{ padding: '20px' }}>
859
+ <h3>Hardware Products</h3>
860
+ <Text>Discover our high-quality hardware solutions built for performance and reliability.</Text>
861
+ <ul style={{ marginTop: '16px' }}>
862
+ <li>Industrial Computers</li>
863
+ <li>Network Equipment</li>
864
+ <li>Storage Solutions</li>
865
+ <li>Monitoring Devices</li>
866
+ </ul>
867
+ </div>
868
+ </TabContent>
869
+
870
+ <TabContent value="accessories">
871
+ <div style={{ padding: '20px' }}>
872
+ <h3>Accessories</h3>
873
+ <Text>Complete your setup with our range of professional accessories and add-ons.</Text>
874
+ <ul style={{ marginTop: '16px' }}>
875
+ <li>Cables and Adapters</li>
876
+ <li>Mounting Hardware</li>
877
+ <li>Protective Cases</li>
878
+ <li>Replacement Parts</li>
879
+ </ul>
880
+ </div>
881
+ </TabContent>
882
+ </Tabs>
883
+ </div>
884
+ </TabContent>
885
+
886
+ <TabContent value="services">
887
+ <div style={{ padding: '20px' }}>
888
+ <h2>Our Services</h2>
889
+ <Text>We provide comprehensive services to support your business needs.</Text>
890
+ </div>
891
+ </TabContent>
892
+
893
+ <TabContent value="support">
894
+ <div style={{ padding: '20px' }}>
895
+ <h2>Customer Support</h2>
896
+ <Text>Get help when you need it with our dedicated support team.</Text>
897
+ </div>
898
+ </TabContent>
899
+ </Tabs>
900
+ );
901
+ }
902
+ ```