@delightui/components 0.1.105 → 0.1.107

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 (102) 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/index.d.ts +2 -0
  9. package/dist/cjs/library.css +19 -6
  10. package/dist/cjs/library.js +3 -3
  11. package/dist/cjs/library.js.map +1 -1
  12. package/dist/esm/components/molecules/Modal/DemoModal.d.ts +8 -0
  13. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.d.ts +41 -0
  14. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.types.d.ts +87 -0
  15. package/dist/esm/components/molecules/Modal/ModalContext/index.d.ts +3 -0
  16. package/dist/esm/components/molecules/Modal/ModalContext/useModal.d.ts +34 -0
  17. package/dist/esm/components/molecules/Modal/index.d.ts +2 -0
  18. package/dist/esm/components/molecules/index.d.ts +2 -0
  19. package/dist/esm/library.css +19 -6
  20. package/dist/esm/library.js +3 -3
  21. package/dist/esm/library.js.map +1 -1
  22. package/dist/index.d.ts +108 -2
  23. package/docs/README.md +264 -0
  24. package/docs/components/atoms/ActionImage.md +119 -0
  25. package/docs/components/atoms/Button.md +197 -0
  26. package/docs/components/atoms/Checkbox.md +299 -0
  27. package/docs/components/atoms/CheckboxItem.md +314 -0
  28. package/docs/components/atoms/Chip.md +380 -0
  29. package/docs/components/atoms/CustomToggle.md +270 -0
  30. package/docs/components/atoms/Icon.md +365 -0
  31. package/docs/components/atoms/IconButton.md +407 -0
  32. package/docs/components/atoms/Image.md +448 -0
  33. package/docs/components/atoms/Input.md +430 -0
  34. package/docs/components/atoms/ListItem.md +502 -0
  35. package/docs/components/atoms/Password.md +472 -0
  36. package/docs/components/atoms/RadioButton.md +614 -0
  37. package/docs/components/atoms/RadioButtonItem.md +588 -0
  38. package/docs/components/atoms/ResponsiveComponent.md +612 -0
  39. package/docs/components/atoms/SelectListItem.md +609 -0
  40. package/docs/components/atoms/Slider.md +605 -0
  41. package/docs/components/atoms/Spinner.md +605 -0
  42. package/docs/components/atoms/Text.md +463 -0
  43. package/docs/components/atoms/TextArea.md +670 -0
  44. package/docs/components/atoms/ToastNotification.md +668 -0
  45. package/docs/components/atoms/Toggle.md +737 -0
  46. package/docs/components/atoms/ToggleButton.md +751 -0
  47. package/docs/components/atoms/Tooltip.md +391 -0
  48. package/docs/components/molecules/Accordion.md +440 -0
  49. package/docs/components/molecules/AccordionGroup.md +547 -0
  50. package/docs/components/molecules/ActionCard.md +546 -0
  51. package/docs/components/molecules/Breadcrumb.md +403 -0
  52. package/docs/components/molecules/Breadcrumbs.md +485 -0
  53. package/docs/components/molecules/ButtonGroup.md +383 -0
  54. package/docs/components/molecules/Card.md +298 -0
  55. package/docs/components/molecules/ChipInput.md +646 -0
  56. package/docs/components/molecules/ContextMenu.md +768 -0
  57. package/docs/components/molecules/CustomTimeSelector.md +116 -0
  58. package/docs/components/molecules/DatePicker.md +516 -0
  59. package/docs/components/molecules/DateTimeSelector.md +166 -0
  60. package/docs/components/molecules/FormField.md +312 -0
  61. package/docs/components/molecules/Grid.md +577 -0
  62. package/docs/components/molecules/GridItem.md +834 -0
  63. package/docs/components/molecules/GridList.md +244 -0
  64. package/docs/components/molecules/List.md +485 -0
  65. package/docs/components/molecules/Modal.md +470 -0
  66. package/docs/components/molecules/ModalFooter.md +702 -0
  67. package/docs/components/molecules/ModalHeader.md +756 -0
  68. package/docs/components/molecules/ModalProvider.md +205 -0
  69. package/docs/components/molecules/Nav.md +530 -0
  70. package/docs/components/molecules/NavItem.md +572 -0
  71. package/docs/components/molecules/NavLink.md +499 -0
  72. package/docs/components/molecules/Option.md +521 -0
  73. package/docs/components/molecules/Pagination.md +592 -0
  74. package/docs/components/molecules/PaginationNumberField.md +722 -0
  75. package/docs/components/molecules/Popover.md +516 -0
  76. package/docs/components/molecules/ProgressBar.md +624 -0
  77. package/docs/components/molecules/RadioGroup.md +831 -0
  78. package/docs/components/molecules/RepeaterList.md +185 -0
  79. package/docs/components/molecules/Select.md +402 -0
  80. package/docs/components/molecules/SortableTrigger.md +82 -0
  81. package/docs/components/molecules/useModal.md +379 -0
  82. package/docs/components/organisms/Dropzone.md +346 -0
  83. package/docs/components/organisms/DropzoneClear.md +135 -0
  84. package/docs/components/organisms/DropzoneContent.md +216 -0
  85. package/docs/components/organisms/DropzoneFilename.md +191 -0
  86. package/docs/components/organisms/DropzoneSupportedFormats.md +184 -0
  87. package/docs/components/organisms/DropzoneTrigger.md +209 -0
  88. package/docs/components/organisms/Form.md +533 -0
  89. package/docs/components/organisms/SlideOutPanel.md +662 -0
  90. package/docs/components/organisms/TabContent.md +902 -0
  91. package/docs/components/organisms/TabItem.md +1091 -0
  92. package/docs/components/organisms/Table.md +611 -0
  93. package/docs/components/organisms/TableBody.md +679 -0
  94. package/docs/components/organisms/TableCell.md +482 -0
  95. package/docs/components/organisms/TableHeader.md +513 -0
  96. package/docs/components/organisms/TableHeaderCell.md +661 -0
  97. package/docs/components/organisms/TableRow.md +715 -0
  98. package/docs/components/organisms/Tabs.md +1330 -0
  99. package/docs/components/utils/ConditionalView.md +568 -0
  100. package/docs/components/utils/RenderStateView.md +726 -0
  101. package/docs/components/utils/WrapTextNodes.md +614 -0
  102. package/package.json +3 -2
@@ -0,0 +1,1330 @@
1
+ # Tabs
2
+
3
+ ## Description
4
+
5
+ A comprehensive tabs component that combines tab provider functionality with tab view presentation. Tabs provides a complete tabbed interface system with context management, state handling, and flexible styling options. It serves as the root container for TabItem and TabContent components, enabling seamless tab navigation with both horizontal and vertical orientations.
6
+
7
+ ## Aliases
8
+
9
+ - Tabs
10
+ - Tab Container
11
+ - Tab System
12
+ - Tabbed Interface
13
+ - Tab Navigation
14
+
15
+ ## Props Breakdown
16
+
17
+ **Combines:** `TabProviderProps` & `TabsViewProps`
18
+
19
+ ### TabProviderProps
20
+
21
+ | Prop | Type | Default | Required | Description |
22
+ |------|------|---------|----------|-------------|
23
+ | `children` | `ReactNode` | - | Yes | The content to be displayed within the tab provider |
24
+ | `value` | `number \| string` | - | No | The value of the tab |
25
+ | `style` | `TabsStyleEnum` | `'Filled'` | No | The tab item style to apply ('Filled' \| 'Underlined') |
26
+ | `onClick` | `(value: string \| number) => void` | - | No | Callback function when a tab is clicked |
27
+
28
+ ### TabsViewProps
29
+
30
+ | Prop | Type | Default | Required | Description |
31
+ |------|------|---------|----------|-------------|
32
+ | `children` | `ReactNode` | - | Yes | The content to be displayed within the tabs |
33
+ | `className` | `string` | - | No | Additional CSS class names for styling |
34
+ | `style` | `TabsStyleEnum` | `'Filled'` | No | The tab item style to apply ('Filled' \| 'Underlined') |
35
+ | `type` | `TabsTypeEnum` | `'Horizontal'` | No | The tab item type to apply ('Horizontal' \| 'Vertical') |
36
+
37
+ ## Examples
38
+
39
+ ### Basic Horizontal Tabs
40
+
41
+ ```tsx
42
+ import { Tabs, TabItem, TabContent } from '@delightui/components';
43
+
44
+ function BasicHorizontalTabsExample() {
45
+ return (
46
+ <Tabs style="Underlined" type="Horizontal">
47
+ <div style={{ display: 'flex', borderBottom: '1px solid #e0e0e0' }}>
48
+ <TabItem value="overview" defaultTab>Overview</TabItem>
49
+ <TabItem value="details">Details</TabItem>
50
+ <TabItem value="reviews">Reviews</TabItem>
51
+ <TabItem value="specifications">Specifications</TabItem>
52
+ </div>
53
+
54
+ <TabContent value="overview">
55
+ <div style={{ padding: '24px' }}>
56
+ <h2>Product Overview</h2>
57
+ <p>
58
+ Get a comprehensive look at this amazing product. Our overview section provides
59
+ key highlights, main features, and benefits that make this product stand out.
60
+ </p>
61
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '16px', marginTop: '20px' }}>
62
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
63
+ <h4>🚀 Performance</h4>
64
+ <p>Exceptional speed and reliability for all your needs.</p>
65
+ </div>
66
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
67
+ <h4>💡 Innovation</h4>
68
+ <p>Cutting-edge technology with user-friendly design.</p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </TabContent>
73
+
74
+ <TabContent value="details">
75
+ <div style={{ padding: '24px' }}>
76
+ <h2>Detailed Information</h2>
77
+ <p>Dive deeper into the technical aspects and detailed features of this product.</p>
78
+ <ul style={{ marginTop: '16px', lineHeight: '1.6' }}>
79
+ <li>Advanced processing capabilities</li>
80
+ <li>Energy-efficient design</li>
81
+ <li>Multiple connectivity options</li>
82
+ <li>User-friendly interface</li>
83
+ <li>Comprehensive warranty coverage</li>
84
+ </ul>
85
+ </div>
86
+ </TabContent>
87
+
88
+ <TabContent value="reviews">
89
+ <div style={{ padding: '24px' }}>
90
+ <h2>Customer Reviews</h2>
91
+ <p>See what our customers are saying about this product.</p>
92
+ <div style={{ marginTop: '20px' }}>
93
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px', marginBottom: '12px' }}>
94
+ <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}>
95
+ <strong>John D.</strong>
96
+ <span>⭐⭐⭐⭐⭐</span>
97
+ </div>
98
+ <p>"Excellent product! Exceeded my expectations in every way."</p>
99
+ </div>
100
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
101
+ <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}>
102
+ <strong>Sarah M.</strong>
103
+ <span>⭐⭐⭐⭐⭐</span>
104
+ </div>
105
+ <p>"Great value for money. Highly recommend!"</p>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </TabContent>
110
+
111
+ <TabContent value="specifications">
112
+ <div style={{ padding: '24px' }}>
113
+ <h2>Technical Specifications</h2>
114
+ <div style={{ display: 'grid', gap: '12px', marginTop: '20px' }}>
115
+ <div style={{ display: 'grid', gridTemplateColumns: '200px 1fr', padding: '12px', backgroundColor: '#f5f5f5' }}>
116
+ <strong>Dimensions:</strong>
117
+ <span>10.5" × 7.2" × 2.1"</span>
118
+ </div>
119
+ <div style={{ display: 'grid', gridTemplateColumns: '200px 1fr', padding: '12px' }}>
120
+ <strong>Weight:</strong>
121
+ <span>2.3 lbs</span>
122
+ </div>
123
+ <div style={{ display: 'grid', gridTemplateColumns: '200px 1fr', padding: '12px', backgroundColor: '#f5f5f5' }}>
124
+ <strong>Material:</strong>
125
+ <span>Premium aluminum alloy</span>
126
+ </div>
127
+ <div style={{ display: 'grid', gridTemplateColumns: '200px 1fr', padding: '12px' }}>
128
+ <strong>Color Options:</strong>
129
+ <span>Silver, Space Gray, Gold</span>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </TabContent>
134
+ </Tabs>
135
+ );
136
+ }
137
+ ```
138
+
139
+ ### Vertical Tabs Layout
140
+
141
+ ```tsx
142
+ import { Tabs, TabItem, TabContent, Text } from '@delightui/components';
143
+
144
+ function VerticalTabsExample() {
145
+ return (
146
+ <Tabs style="Filled" type="Vertical">
147
+ <div style={{ display: 'flex', minHeight: '400px' }}>
148
+ <div style={{
149
+ width: '200px',
150
+ borderRight: '1px solid #e0e0e0',
151
+ padding: '8px',
152
+ display: 'flex',
153
+ flexDirection: 'column',
154
+ gap: '4px'
155
+ }}>
156
+ <TabItem value="account" defaultTab style={{ justifyContent: 'flex-start', width: '100%' }}>
157
+ 👤 Account
158
+ </TabItem>
159
+ <TabItem value="security" style={{ justifyContent: 'flex-start', width: '100%' }}>
160
+ 🔒 Security
161
+ </TabItem>
162
+ <TabItem value="notifications" style={{ justifyContent: 'flex-start', width: '100%' }}>
163
+ 🔔 Notifications
164
+ </TabItem>
165
+ <TabItem value="privacy" style={{ justifyContent: 'flex-start', width: '100%' }}>
166
+ 🛡️ Privacy
167
+ </TabItem>
168
+ <TabItem value="billing" style={{ justifyContent: 'flex-start', width: '100%' }}>
169
+ 💳 Billing
170
+ </TabItem>
171
+ <TabItem value="advanced" style={{ justifyContent: 'flex-start', width: '100%' }}>
172
+ ⚙️ Advanced
173
+ </TabItem>
174
+ </div>
175
+
176
+ <div style={{ flex: 1 }}>
177
+ <TabContent value="account">
178
+ <div style={{ padding: '24px' }}>
179
+ <h2>Account Settings</h2>
180
+ <Text>Manage your personal account information and preferences.</Text>
181
+ <div style={{ marginTop: '24px', display: 'grid', gap: '16px' }}>
182
+ <div>
183
+ <label style={{ display: 'block', marginBottom: '8px', fontWeight: 'bold' }}>
184
+ Display Name
185
+ </label>
186
+ <input
187
+ type="text"
188
+ defaultValue="John Doe"
189
+ style={{
190
+ width: '100%',
191
+ padding: '8px 12px',
192
+ border: '1px solid #ccc',
193
+ borderRadius: '4px'
194
+ }}
195
+ />
196
+ </div>
197
+ <div>
198
+ <label style={{ display: 'block', marginBottom: '8px', fontWeight: 'bold' }}>
199
+ Email Address
200
+ </label>
201
+ <input
202
+ type="email"
203
+ defaultValue="john.doe@example.com"
204
+ style={{
205
+ width: '100%',
206
+ padding: '8px 12px',
207
+ border: '1px solid #ccc',
208
+ borderRadius: '4px'
209
+ }}
210
+ />
211
+ </div>
212
+ <div>
213
+ <label style={{ display: 'block', marginBottom: '8px', fontWeight: 'bold' }}>
214
+ Time Zone
215
+ </label>
216
+ <select style={{
217
+ width: '100%',
218
+ padding: '8px 12px',
219
+ border: '1px solid #ccc',
220
+ borderRadius: '4px'
221
+ }}>
222
+ <option>UTC-8 (Pacific Time)</option>
223
+ <option>UTC-5 (Eastern Time)</option>
224
+ <option>UTC+0 (Greenwich Mean Time)</option>
225
+ </select>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ </TabContent>
230
+
231
+ <TabContent value="security">
232
+ <div style={{ padding: '24px' }}>
233
+ <h2>Security Settings</h2>
234
+ <Text>Configure security options to protect your account.</Text>
235
+ <div style={{ marginTop: '24px', display: 'grid', gap: '20px' }}>
236
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
237
+ <h4>Two-Factor Authentication</h4>
238
+ <Text size="Small" color="secondary">
239
+ Add an extra layer of security to your account
240
+ </Text>
241
+ <button style={{
242
+ marginTop: '8px',
243
+ padding: '8px 16px',
244
+ backgroundColor: '#4caf50',
245
+ color: 'white',
246
+ border: 'none',
247
+ borderRadius: '4px'
248
+ }}>
249
+ Enable 2FA
250
+ </button>
251
+ </div>
252
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
253
+ <h4>Login Sessions</h4>
254
+ <Text size="Small" color="secondary">
255
+ Manage your active login sessions
256
+ </Text>
257
+ <button style={{
258
+ marginTop: '8px',
259
+ padding: '8px 16px',
260
+ backgroundColor: '#f44336',
261
+ color: 'white',
262
+ border: 'none',
263
+ borderRadius: '4px'
264
+ }}>
265
+ View Sessions
266
+ </button>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ </TabContent>
271
+
272
+ <TabContent value="notifications">
273
+ <div style={{ padding: '24px' }}>
274
+ <h2>Notification Preferences</h2>
275
+ <Text>Choose how you want to be notified about updates and activities.</Text>
276
+ <div style={{ marginTop: '24px', display: 'grid', gap: '16px' }}>
277
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
278
+ <input type="checkbox" defaultChecked />
279
+ Email notifications for new messages
280
+ </label>
281
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
282
+ <input type="checkbox" defaultChecked />
283
+ Push notifications on mobile devices
284
+ </label>
285
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
286
+ <input type="checkbox" />
287
+ Weekly summary emails
288
+ </label>
289
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
290
+ <input type="checkbox" />
291
+ Marketing and promotional emails
292
+ </label>
293
+ </div>
294
+ </div>
295
+ </TabContent>
296
+
297
+ <TabContent value="privacy">
298
+ <div style={{ padding: '24px' }}>
299
+ <h2>Privacy Controls</h2>
300
+ <Text>Manage your privacy settings and data sharing preferences.</Text>
301
+ <div style={{ marginTop: '24px', display: 'grid', gap: '20px' }}>
302
+ <div>
303
+ <h4>Profile Visibility</h4>
304
+ <select style={{
305
+ width: '100%',
306
+ padding: '8px 12px',
307
+ border: '1px solid #ccc',
308
+ borderRadius: '4px',
309
+ marginTop: '8px'
310
+ }}>
311
+ <option>Public</option>
312
+ <option>Friends Only</option>
313
+ <option>Private</option>
314
+ </select>
315
+ </div>
316
+ <div>
317
+ <h4>Data Collection</h4>
318
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px', marginTop: '8px' }}>
319
+ <input type="checkbox" />
320
+ Allow analytics data collection
321
+ </label>
322
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px', marginTop: '8px' }}>
323
+ <input type="checkbox" />
324
+ Share usage data for product improvement
325
+ </label>
326
+ </div>
327
+ </div>
328
+ </div>
329
+ </TabContent>
330
+
331
+ <TabContent value="billing">
332
+ <div style={{ padding: '24px' }}>
333
+ <h2>Billing Information</h2>
334
+ <Text>Manage your subscription and payment methods.</Text>
335
+ <div style={{ marginTop: '24px', display: 'grid', gap: '20px' }}>
336
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
337
+ <h4>Current Plan</h4>
338
+ <Text>Professional Plan - $29/month</Text>
339
+ <button style={{
340
+ marginTop: '8px',
341
+ padding: '8px 16px',
342
+ backgroundColor: '#2196f3',
343
+ color: 'white',
344
+ border: 'none',
345
+ borderRadius: '4px'
346
+ }}>
347
+ Change Plan
348
+ </button>
349
+ </div>
350
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
351
+ <h4>Payment Method</h4>
352
+ <Text>•••• •••• •••• 1234 (Expires 12/25)</Text>
353
+ <button style={{
354
+ marginTop: '8px',
355
+ padding: '8px 16px',
356
+ backgroundColor: '#ff9800',
357
+ color: 'white',
358
+ border: 'none',
359
+ borderRadius: '4px'
360
+ }}>
361
+ Update Payment
362
+ </button>
363
+ </div>
364
+ </div>
365
+ </div>
366
+ </TabContent>
367
+
368
+ <TabContent value="advanced">
369
+ <div style={{ padding: '24px' }}>
370
+ <h2>Advanced Settings</h2>
371
+ <Text>Configure advanced options and developer settings.</Text>
372
+ <div style={{ marginTop: '24px', display: 'grid', gap: '20px' }}>
373
+ <div style={{ padding: '16px', border: '1px solid #ffebee', borderRadius: '8px' }}>
374
+ <h4 style={{ color: '#d32f2f' }}>Danger Zone</h4>
375
+ <Text size="Small" color="secondary">
376
+ These actions cannot be undone
377
+ </Text>
378
+ <div style={{ marginTop: '12px', display: 'flex', gap: '8px' }}>
379
+ <button style={{
380
+ padding: '8px 16px',
381
+ backgroundColor: '#f44336',
382
+ color: 'white',
383
+ border: 'none',
384
+ borderRadius: '4px'
385
+ }}>
386
+ Delete Account
387
+ </button>
388
+ <button style={{
389
+ padding: '8px 16px',
390
+ backgroundColor: '#ff9800',
391
+ color: 'white',
392
+ border: 'none',
393
+ borderRadius: '4px'
394
+ }}>
395
+ Export Data
396
+ </button>
397
+ </div>
398
+ </div>
399
+ </div>
400
+ </div>
401
+ </TabContent>
402
+ </div>
403
+ </div>
404
+ </Tabs>
405
+ );
406
+ }
407
+ ```
408
+
409
+ ### Tabs with Custom Click Handlers
410
+
411
+ ```tsx
412
+ import { Tabs, TabItem, TabContent, Text, Button } from '@delightui/components';
413
+
414
+ function CustomClickHandlerTabsExample() {
415
+ const [analytics, setAnalytics] = useState({
416
+ totalClicks: 0,
417
+ tabClicks: {} as Record<string, number>,
418
+ lastClickedTab: '',
419
+ clickHistory: [] as string[]
420
+ });
421
+
422
+ const handleTabClick = (value: string | number) => {
423
+ const tabValue = value.toString();
424
+
425
+ setAnalytics(prev => ({
426
+ totalClicks: prev.totalClicks + 1,
427
+ tabClicks: {
428
+ ...prev.tabClicks,
429
+ [tabValue]: (prev.tabClicks[tabValue] || 0) + 1
430
+ },
431
+ lastClickedTab: tabValue,
432
+ clickHistory: [...prev.clickHistory.slice(-9), tabValue] // Keep last 10 clicks
433
+ }));
434
+
435
+ // Custom analytics or tracking
436
+ console.log(`Tab clicked: ${tabValue}`);
437
+ };
438
+
439
+ const resetAnalytics = () => {
440
+ setAnalytics({
441
+ totalClicks: 0,
442
+ tabClicks: {},
443
+ lastClickedTab: '',
444
+ clickHistory: []
445
+ });
446
+ };
447
+
448
+ const getPopularityPercentage = (tabValue: string) => {
449
+ if (analytics.totalClicks === 0) return 0;
450
+ return Math.round(((analytics.tabClicks[tabValue] || 0) / analytics.totalClicks) * 100);
451
+ };
452
+
453
+ return (
454
+ <div>
455
+ {/* Analytics Dashboard */}
456
+ <div style={{
457
+ marginBottom: '24px',
458
+ padding: '16px',
459
+ backgroundColor: '#f5f5f5',
460
+ borderRadius: '8px'
461
+ }}>
462
+ <h3>Tab Analytics Dashboard</h3>
463
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '16px', marginTop: '12px' }}>
464
+ <div>
465
+ <Text size="Small" color="secondary">Total Clicks</Text>
466
+ <Text size="Large" weight="Bold">{analytics.totalClicks}</Text>
467
+ </div>
468
+ <div>
469
+ <Text size="Small" color="secondary">Last Clicked</Text>
470
+ <Text weight="Bold">{analytics.lastClickedTab || 'None'}</Text>
471
+ </div>
472
+ <div>
473
+ <Text size="Small" color="secondary">Most Popular</Text>
474
+ <Text weight="Bold">
475
+ {Object.entries(analytics.tabClicks).length > 0
476
+ ? Object.entries(analytics.tabClicks).reduce((a, b) => a[1] > b[1] ? a : b)[0]
477
+ : 'None'
478
+ }
479
+ </Text>
480
+ </div>
481
+ </div>
482
+
483
+ {analytics.clickHistory.length > 0 && (
484
+ <div style={{ marginTop: '12px' }}>
485
+ <Text size="Small" color="secondary">Recent Click History:</Text>
486
+ <div style={{ display: 'flex', gap: '4px', marginTop: '4px', flexWrap: 'wrap' }}>
487
+ {analytics.clickHistory.map((tab, index) => (
488
+ <span
489
+ key={index}
490
+ style={{
491
+ padding: '2px 6px',
492
+ backgroundColor: '#e0e0e0',
493
+ borderRadius: '12px',
494
+ fontSize: '12px'
495
+ }}
496
+ >
497
+ {tab}
498
+ </span>
499
+ ))}
500
+ </div>
501
+ </div>
502
+ )}
503
+
504
+ <Button size="Small" type="Outlined" onClick={resetAnalytics} style={{ marginTop: '12px' }}>
505
+ Reset Analytics
506
+ </Button>
507
+ </div>
508
+
509
+ <Tabs style="Underlined" onClick={handleTabClick}>
510
+ <div style={{ display: 'flex' }}>
511
+ <TabItem value="home" defaultTab>
512
+ Home ({analytics.tabClicks.home || 0})
513
+ </TabItem>
514
+ <TabItem value="products">
515
+ Products ({analytics.tabClicks.products || 0})
516
+ </TabItem>
517
+ <TabItem value="services">
518
+ Services ({analytics.tabClicks.services || 0})
519
+ </TabItem>
520
+ <TabItem value="about">
521
+ About ({analytics.tabClicks.about || 0})
522
+ </TabItem>
523
+ <TabItem value="contact">
524
+ Contact ({analytics.tabClicks.contact || 0})
525
+ </TabItem>
526
+ </div>
527
+
528
+ <TabContent value="home">
529
+ <div style={{ padding: '24px' }}>
530
+ <h2>🏠 Home</h2>
531
+ <Text>Welcome to our home page!</Text>
532
+ <div style={{ marginTop: '16px', padding: '12px', backgroundColor: '#e3f2fd', borderRadius: '8px' }}>
533
+ <Text size="Small">
534
+ This tab has been clicked {analytics.tabClicks.home || 0} times
535
+ ({getPopularityPercentage('home')}% of total clicks)
536
+ </Text>
537
+ </div>
538
+ </div>
539
+ </TabContent>
540
+
541
+ <TabContent value="products">
542
+ <div style={{ padding: '24px' }}>
543
+ <h2>🛍️ Products</h2>
544
+ <Text>Explore our amazing product catalog!</Text>
545
+ <div style={{ marginTop: '16px', padding: '12px', backgroundColor: '#e8f5e8', borderRadius: '8px' }}>
546
+ <Text size="Small">
547
+ This tab has been clicked {analytics.tabClicks.products || 0} times
548
+ ({getPopularityPercentage('products')}% of total clicks)
549
+ </Text>
550
+ </div>
551
+ </div>
552
+ </TabContent>
553
+
554
+ <TabContent value="services">
555
+ <div style={{ padding: '24px' }}>
556
+ <h2>🛠️ Services</h2>
557
+ <Text>Discover our comprehensive service offerings!</Text>
558
+ <div style={{ marginTop: '16px', padding: '12px', backgroundColor: '#fff3e0', borderRadius: '8px' }}>
559
+ <Text size="Small">
560
+ This tab has been clicked {analytics.tabClicks.services || 0} times
561
+ ({getPopularityPercentage('services')}% of total clicks)
562
+ </Text>
563
+ </div>
564
+ </div>
565
+ </TabContent>
566
+
567
+ <TabContent value="about">
568
+ <div style={{ padding: '24px' }}>
569
+ <h2>ℹ️ About Us</h2>
570
+ <Text>Learn more about our company and mission!</Text>
571
+ <div style={{ marginTop: '16px', padding: '12px', backgroundColor: '#f3e5f5', borderRadius: '8px' }}>
572
+ <Text size="Small">
573
+ This tab has been clicked {analytics.tabClicks.about || 0} times
574
+ ({getPopularityPercentage('about')}% of total clicks)
575
+ </Text>
576
+ </div>
577
+ </div>
578
+ </TabContent>
579
+
580
+ <TabContent value="contact">
581
+ <div style={{ padding: '24px' }}>
582
+ <h2>📞 Contact Us</h2>
583
+ <Text>Get in touch with our team!</Text>
584
+ <div style={{ marginTop: '16px', padding: '12px', backgroundColor: '#ffebee', borderRadius: '8px' }}>
585
+ <Text size="Small">
586
+ This tab has been clicked {analytics.tabClicks.contact || 0} times
587
+ ({getPopularityPercentage('contact')}% of total clicks)
588
+ </Text>
589
+ </div>
590
+ </div>
591
+ </TabContent>
592
+ </Tabs>
593
+ </div>
594
+ );
595
+ }
596
+ ```
597
+
598
+ ### Tabs with Dynamic Content
599
+
600
+ ```tsx
601
+ import { Tabs, TabItem, TabContent, Text, Button, Spinner } from '@delightui/components';
602
+
603
+ function DynamicContentTabsExample() {
604
+ const [activeTab, setActiveTab] = useState('dashboard');
605
+ const [data, setData] = useState({
606
+ dashboard: { loaded: true, content: 'Dashboard data ready!' },
607
+ analytics: { loaded: false, content: null },
608
+ reports: { loaded: false, content: null },
609
+ settings: { loaded: true, content: 'Settings loaded!' }
610
+ });
611
+
612
+ const [loading, setLoading] = useState(false);
613
+
614
+ const loadTabData = async (tabValue: string) => {
615
+ if (data[tabValue as keyof typeof data].loaded) return;
616
+
617
+ setLoading(true);
618
+
619
+ // Simulate API call
620
+ await new Promise(resolve => setTimeout(resolve, 2000));
621
+
622
+ setData(prev => ({
623
+ ...prev,
624
+ [tabValue]: {
625
+ loaded: true,
626
+ content: `${tabValue.charAt(0).toUpperCase() + tabValue.slice(1)} data loaded successfully!`
627
+ }
628
+ }));
629
+
630
+ setLoading(false);
631
+ };
632
+
633
+ const handleTabClick = (value: string | number) => {
634
+ const tabValue = value.toString();
635
+ setActiveTab(tabValue);
636
+ loadTabData(tabValue);
637
+ };
638
+
639
+ const refreshData = (tabValue: string) => {
640
+ setData(prev => ({
641
+ ...prev,
642
+ [tabValue]: { loaded: false, content: null }
643
+ }));
644
+ loadTabData(tabValue);
645
+ };
646
+
647
+ return (
648
+ <Tabs style="Filled" onClick={handleTabClick}>
649
+ <div style={{ display: 'flex', backgroundColor: '#f5f5f5', borderRadius: '8px', padding: '4px' }}>
650
+ <TabItem value="dashboard" defaultTab>
651
+ 📊 Dashboard
652
+ {data.dashboard.loaded && <span style={{ marginLeft: '4px' }}>✓</span>}
653
+ </TabItem>
654
+ <TabItem value="analytics">
655
+ 📈 Analytics
656
+ {loading && activeTab === 'analytics' && <Spinner size="Small" style={{ marginLeft: '8px' }} />}
657
+ {data.analytics.loaded && <span style={{ marginLeft: '4px' }}>✓</span>}
658
+ </TabItem>
659
+ <TabItem value="reports">
660
+ 📋 Reports
661
+ {loading && activeTab === 'reports' && <Spinner size="Small" style={{ marginLeft: '8px' }} />}
662
+ {data.reports.loaded && <span style={{ marginLeft: '4px' }}>✓</span>}
663
+ </TabItem>
664
+ <TabItem value="settings">
665
+ ⚙️ Settings
666
+ {data.settings.loaded && <span style={{ marginLeft: '4px' }}>✓</span>}
667
+ </TabItem>
668
+ </div>
669
+
670
+ <TabContent value="dashboard">
671
+ <div style={{ padding: '24px' }}>
672
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '20px' }}>
673
+ <h2>Dashboard</h2>
674
+ <Button size="Small" type="Outlined" onClick={() => refreshData('dashboard')}>
675
+ Refresh
676
+ </Button>
677
+ </div>
678
+ <Text>{data.dashboard.content}</Text>
679
+
680
+ {data.dashboard.loaded && (
681
+ <div style={{
682
+ display: 'grid',
683
+ gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))',
684
+ gap: '16px',
685
+ marginTop: '20px'
686
+ }}>
687
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
688
+ <Text size="Large" weight="Bold">2,543</Text>
689
+ <Text color="secondary">Total Users</Text>
690
+ </div>
691
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
692
+ <Text size="Large" weight="Bold">$45,678</Text>
693
+ <Text color="secondary">Revenue</Text>
694
+ </div>
695
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
696
+ <Text size="Large" weight="Bold">89%</Text>
697
+ <Text color="secondary">Satisfaction</Text>
698
+ </div>
699
+ </div>
700
+ )}
701
+ </div>
702
+ </TabContent>
703
+
704
+ <TabContent value="analytics">
705
+ <div style={{ padding: '24px' }}>
706
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '20px' }}>
707
+ <h2>Analytics</h2>
708
+ {data.analytics.loaded && (
709
+ <Button size="Small" type="Outlined" onClick={() => refreshData('analytics')}>
710
+ Refresh
711
+ </Button>
712
+ )}
713
+ </div>
714
+
715
+ {loading && activeTab === 'analytics' ? (
716
+ <div style={{ textAlign: 'center', padding: '40px' }}>
717
+ <Spinner />
718
+ <Text style={{ marginTop: '16px' }}>Loading analytics data...</Text>
719
+ </div>
720
+ ) : data.analytics.loaded ? (
721
+ <div>
722
+ <Text>{data.analytics.content}</Text>
723
+ <div style={{
724
+ marginTop: '20px',
725
+ height: '200px',
726
+ border: '1px solid #e0e0e0',
727
+ borderRadius: '8px',
728
+ display: 'flex',
729
+ alignItems: 'center',
730
+ justifyContent: 'center',
731
+ backgroundColor: '#f9f9f9'
732
+ }}>
733
+ <Text color="secondary">[Analytics Chart Placeholder]</Text>
734
+ </div>
735
+ </div>
736
+ ) : (
737
+ <div style={{ textAlign: 'center', padding: '40px' }}>
738
+ <Text>Click this tab to load analytics data.</Text>
739
+ </div>
740
+ )}
741
+ </div>
742
+ </TabContent>
743
+
744
+ <TabContent value="reports">
745
+ <div style={{ padding: '24px' }}>
746
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '20px' }}>
747
+ <h2>Reports</h2>
748
+ {data.reports.loaded && (
749
+ <Button size="Small" type="Outlined" onClick={() => refreshData('reports')}>
750
+ Refresh
751
+ </Button>
752
+ )}
753
+ </div>
754
+
755
+ {loading && activeTab === 'reports' ? (
756
+ <div style={{ textAlign: 'center', padding: '40px' }}>
757
+ <Spinner />
758
+ <Text style={{ marginTop: '16px' }}>Generating reports...</Text>
759
+ </div>
760
+ ) : data.reports.loaded ? (
761
+ <div>
762
+ <Text>{data.reports.content}</Text>
763
+ <div style={{ marginTop: '20px', display: 'grid', gap: '12px' }}>
764
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
765
+ <Text weight="Bold">Monthly Sales Report</Text>
766
+ <Text size="Small" color="secondary">Generated just now</Text>
767
+ </div>
768
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
769
+ <Text weight="Bold">User Activity Report</Text>
770
+ <Text size="Small" color="secondary">Generated just now</Text>
771
+ </div>
772
+ </div>
773
+ </div>
774
+ ) : (
775
+ <div style={{ textAlign: 'center', padding: '40px' }}>
776
+ <Text>Click this tab to generate reports.</Text>
777
+ </div>
778
+ )}
779
+ </div>
780
+ </TabContent>
781
+
782
+ <TabContent value="settings">
783
+ <div style={{ padding: '24px' }}>
784
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '20px' }}>
785
+ <h2>Settings</h2>
786
+ <Button size="Small" type="Outlined" onClick={() => refreshData('settings')}>
787
+ Refresh
788
+ </Button>
789
+ </div>
790
+ <Text>{data.settings.content}</Text>
791
+
792
+ {data.settings.loaded && (
793
+ <div style={{ marginTop: '20px', display: 'grid', gap: '16px' }}>
794
+ <div>
795
+ <label style={{ display: 'block', marginBottom: '8px', fontWeight: 'bold' }}>
796
+ Application Theme
797
+ </label>
798
+ <select style={{
799
+ width: '200px',
800
+ padding: '8px 12px',
801
+ border: '1px solid #ccc',
802
+ borderRadius: '4px'
803
+ }}>
804
+ <option>Light</option>
805
+ <option>Dark</option>
806
+ <option>Auto</option>
807
+ </select>
808
+ </div>
809
+ <div>
810
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
811
+ <input type="checkbox" defaultChecked />
812
+ Enable notifications
813
+ </label>
814
+ </div>
815
+ <div>
816
+ <label style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
817
+ <input type="checkbox" />
818
+ Auto-save changes
819
+ </label>
820
+ </div>
821
+ </div>
822
+ )}
823
+ </div>
824
+ </TabContent>
825
+ </Tabs>
826
+ );
827
+ }
828
+ ```
829
+
830
+ ### Responsive Tabs with Mobile Adaptation
831
+
832
+ ```tsx
833
+ import { Tabs, TabItem, TabContent, Text } from '@delightui/components';
834
+
835
+ function ResponsiveTabsExample() {
836
+ const [isMobile, setIsMobile] = useState(window.innerWidth < 768);
837
+ const [isTablet, setIsTablet] = useState(window.innerWidth >= 768 && window.innerWidth < 1024);
838
+
839
+ useEffect(() => {
840
+ const handleResize = () => {
841
+ setIsMobile(window.innerWidth < 768);
842
+ setIsTablet(window.innerWidth >= 768 && window.innerWidth < 1024);
843
+ };
844
+
845
+ window.addEventListener('resize', handleResize);
846
+ return () => window.removeEventListener('resize', handleResize);
847
+ }, []);
848
+
849
+ const getTabStyle = () => {
850
+ if (isMobile) return 'Filled';
851
+ return 'Underlined';
852
+ };
853
+
854
+ const getTabType = () => {
855
+ if (isMobile) return 'Vertical';
856
+ return 'Horizontal';
857
+ };
858
+
859
+ return (
860
+ <div>
861
+ <div style={{ marginBottom: '16px', padding: '12px', backgroundColor: '#f0f0f0', borderRadius: '4px' }}>
862
+ <Text size="Small">
863
+ Current breakpoint: {isMobile ? 'Mobile' : isTablet ? 'Tablet' : 'Desktop'}
864
+ (Resize window to see adaptive behavior)
865
+ </Text>
866
+ </div>
867
+
868
+ <Tabs style={getTabStyle()} type={getTabType()}>
869
+ {isMobile ? (
870
+ // Mobile: Vertical layout with accordion-style tabs
871
+ <div style={{ display: 'flex', flexDirection: 'column' }}>
872
+ <div style={{
873
+ display: 'flex',
874
+ flexDirection: 'column',
875
+ gap: '8px',
876
+ padding: '8px',
877
+ backgroundColor: '#f5f5f5',
878
+ borderRadius: '8px'
879
+ }}>
880
+ <TabItem
881
+ value="overview"
882
+ defaultTab
883
+ style={{
884
+ width: '100%',
885
+ justifyContent: 'flex-start',
886
+ padding: '12px 16px'
887
+ }}
888
+ >
889
+ 📱 Overview
890
+ </TabItem>
891
+ <TabItem
892
+ value="features"
893
+ style={{
894
+ width: '100%',
895
+ justifyContent: 'flex-start',
896
+ padding: '12px 16px'
897
+ }}
898
+ >
899
+ ⚡ Features
900
+ </TabItem>
901
+ <TabItem
902
+ value="pricing"
903
+ style={{
904
+ width: '100%',
905
+ justifyContent: 'flex-start',
906
+ padding: '12px 16px'
907
+ }}
908
+ >
909
+ 💰 Pricing
910
+ </TabItem>
911
+ <TabItem
912
+ value="support"
913
+ style={{
914
+ width: '100%',
915
+ justifyContent: 'flex-start',
916
+ padding: '12px 16px'
917
+ }}
918
+ >
919
+ 🎧 Support
920
+ </TabItem>
921
+ </div>
922
+ </div>
923
+ ) : (
924
+ // Desktop/Tablet: Horizontal layout
925
+ <div style={{
926
+ display: 'flex',
927
+ borderBottom: '1px solid #e0e0e0',
928
+ overflowX: isTablet ? 'auto' : 'visible'
929
+ }}>
930
+ <TabItem value="overview" defaultTab>
931
+ 📱 Overview
932
+ </TabItem>
933
+ <TabItem value="features">
934
+ ⚡ Features
935
+ </TabItem>
936
+ <TabItem value="pricing">
937
+ 💰 Pricing
938
+ </TabItem>
939
+ <TabItem value="support">
940
+ 🎧 Support
941
+ </TabItem>
942
+ </div>
943
+ )}
944
+
945
+ <TabContent value="overview">
946
+ <div style={{ padding: isMobile ? '16px' : '24px' }}>
947
+ <h2>Product Overview</h2>
948
+ <Text>
949
+ {isMobile
950
+ ? 'Mobile-optimized overview with essential information.'
951
+ : 'Comprehensive product overview with detailed information and features.'
952
+ }
953
+ </Text>
954
+
955
+ <div style={{
956
+ display: 'grid',
957
+ gridTemplateColumns: isMobile ? '1fr' : isTablet ? '1fr 1fr' : 'repeat(3, 1fr)',
958
+ gap: '16px',
959
+ marginTop: '20px'
960
+ }}>
961
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
962
+ <Text weight="Bold">Fast Performance</Text>
963
+ <Text size="Small">Lightning-fast loading and response times</Text>
964
+ </div>
965
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
966
+ <Text weight="Bold">Easy to Use</Text>
967
+ <Text size="Small">Intuitive interface designed for all users</Text>
968
+ </div>
969
+ {!isMobile && (
970
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
971
+ <Text weight="Bold">Secure</Text>
972
+ <Text size="Small">Enterprise-grade security and privacy</Text>
973
+ </div>
974
+ )}
975
+ </div>
976
+ </div>
977
+ </TabContent>
978
+
979
+ <TabContent value="features">
980
+ <div style={{ padding: isMobile ? '16px' : '24px' }}>
981
+ <h2>Key Features</h2>
982
+ <Text>
983
+ Discover the powerful features that make our product exceptional.
984
+ </Text>
985
+
986
+ <div style={{ marginTop: '20px' }}>
987
+ {isMobile ? (
988
+ // Mobile: Simplified feature list
989
+ <div style={{ display: 'grid', gap: '12px' }}>
990
+ <div style={{ padding: '12px', backgroundColor: '#f5f5f5', borderRadius: '6px' }}>
991
+ <Text weight="Bold">✨ Smart Automation</Text>
992
+ </div>
993
+ <div style={{ padding: '12px', backgroundColor: '#f5f5f5', borderRadius: '6px' }}>
994
+ <Text weight="Bold">📊 Advanced Analytics</Text>
995
+ </div>
996
+ <div style={{ padding: '12px', backgroundColor: '#f5f5f5', borderRadius: '6px' }}>
997
+ <Text weight="Bold">🔒 Security First</Text>
998
+ </div>
999
+ </div>
1000
+ ) : (
1001
+ // Desktop: Detailed feature cards
1002
+ <div style={{ display: 'grid', gridTemplateColumns: isTablet ? '1fr' : '1fr 1fr', gap: '20px' }}>
1003
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1004
+ <h4>✨ Smart Automation</h4>
1005
+ <Text>Automate repetitive tasks and workflows with intelligent algorithms.</Text>
1006
+ </div>
1007
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1008
+ <h4>📊 Advanced Analytics</h4>
1009
+ <Text>Get deep insights with comprehensive analytics and reporting tools.</Text>
1010
+ </div>
1011
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1012
+ <h4>🔒 Security First</h4>
1013
+ <Text>Bank-level security with end-to-end encryption and privacy controls.</Text>
1014
+ </div>
1015
+ <div style={{ padding: '20px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1016
+ <h4>🌐 Global Scale</h4>
1017
+ <Text>Built to scale globally with high availability and performance.</Text>
1018
+ </div>
1019
+ </div>
1020
+ )}
1021
+ </div>
1022
+ </div>
1023
+ </TabContent>
1024
+
1025
+ <TabContent value="pricing">
1026
+ <div style={{ padding: isMobile ? '16px' : '24px' }}>
1027
+ <h2>Pricing Plans</h2>
1028
+ <Text>Choose the plan that best fits your needs.</Text>
1029
+
1030
+ <div style={{
1031
+ display: 'grid',
1032
+ gridTemplateColumns: isMobile ? '1fr' : isTablet ? '1fr 1fr' : 'repeat(3, 1fr)',
1033
+ gap: '16px',
1034
+ marginTop: '20px'
1035
+ }}>
1036
+ <div style={{
1037
+ padding: '20px',
1038
+ border: '1px solid #e0e0e0',
1039
+ borderRadius: '8px',
1040
+ textAlign: 'center'
1041
+ }}>
1042
+ <h4>Starter</h4>
1043
+ <Text size="Large" weight="Bold">$9/month</Text>
1044
+ <Text size="Small">Perfect for individuals</Text>
1045
+ </div>
1046
+ <div style={{
1047
+ padding: '20px',
1048
+ border: '2px solid #2196f3',
1049
+ borderRadius: '8px',
1050
+ textAlign: 'center',
1051
+ backgroundColor: '#f8f9ff'
1052
+ }}>
1053
+ <h4>Professional</h4>
1054
+ <Text size="Large" weight="Bold">$29/month</Text>
1055
+ <Text size="Small">Best for teams</Text>
1056
+ </div>
1057
+ {!isMobile && (
1058
+ <div style={{
1059
+ padding: '20px',
1060
+ border: '1px solid #e0e0e0',
1061
+ borderRadius: '8px',
1062
+ textAlign: 'center'
1063
+ }}>
1064
+ <h4>Enterprise</h4>
1065
+ <Text size="Large" weight="Bold">$99/month</Text>
1066
+ <Text size="Small">For large organizations</Text>
1067
+ </div>
1068
+ )}
1069
+ </div>
1070
+ </div>
1071
+ </TabContent>
1072
+
1073
+ <TabContent value="support">
1074
+ <div style={{ padding: isMobile ? '16px' : '24px' }}>
1075
+ <h2>Customer Support</h2>
1076
+ <Text>We're here to help you succeed with our product.</Text>
1077
+
1078
+ <div style={{
1079
+ display: 'grid',
1080
+ gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr',
1081
+ gap: '16px',
1082
+ marginTop: '20px'
1083
+ }}>
1084
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1085
+ <h4>📧 Email Support</h4>
1086
+ <Text size="Small">Get help via email within 24 hours</Text>
1087
+ </div>
1088
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1089
+ <h4>💬 Live Chat</h4>
1090
+ <Text size="Small">Real-time support during business hours</Text>
1091
+ </div>
1092
+ {!isMobile && (
1093
+ <>
1094
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1095
+ <h4>📞 Phone Support</h4>
1096
+ <Text size="Small">Direct phone support for urgent issues</Text>
1097
+ </div>
1098
+ <div style={{ padding: '16px', border: '1px solid #e0e0e0', borderRadius: '8px' }}>
1099
+ <h4>📚 Knowledge Base</h4>
1100
+ <Text size="Small">Self-service documentation and guides</Text>
1101
+ </div>
1102
+ </>
1103
+ )}
1104
+ </div>
1105
+ </div>
1106
+ </TabContent>
1107
+ </Tabs>
1108
+ </div>
1109
+ );
1110
+ }
1111
+ ```
1112
+
1113
+ ### Tabs with Nested Navigation
1114
+
1115
+ ```tsx
1116
+ import { Tabs, TabItem, TabContent, Text } from '@delightui/components';
1117
+
1118
+ function NestedTabsExample() {
1119
+ return (
1120
+ <Tabs style="Underlined">
1121
+ <div style={{ borderBottom: '1px solid #e0e0e0' }}>
1122
+ <TabItem value="development" defaultTab>Development</TabItem>
1123
+ <TabItem value="design">Design</TabItem>
1124
+ <TabItem value="marketing">Marketing</TabItem>
1125
+ <TabItem value="operations">Operations</TabItem>
1126
+ </div>
1127
+
1128
+ <TabContent value="development">
1129
+ <div style={{ padding: '20px' }}>
1130
+ <h2>Development Team</h2>
1131
+
1132
+ {/* Nested Tabs for Development */}
1133
+ <Tabs style="Filled">
1134
+ <div style={{ display: 'flex', gap: '4px', marginTop: '16px' }}>
1135
+ <TabItem value="frontend" defaultTab>Frontend</TabItem>
1136
+ <TabItem value="backend">Backend</TabItem>
1137
+ <TabItem value="mobile">Mobile</TabItem>
1138
+ <TabItem value="devops">DevOps</TabItem>
1139
+ </div>
1140
+
1141
+ <TabContent value="frontend">
1142
+ <div style={{ padding: '20px' }}>
1143
+ <h3>Frontend Development</h3>
1144
+ <Text>Building beautiful and responsive user interfaces.</Text>
1145
+ <div style={{ marginTop: '16px' }}>
1146
+ <h4>Current Projects:</h4>
1147
+ <ul style={{ marginTop: '8px' }}>
1148
+ <li>React Dashboard Redesign</li>
1149
+ <li>Mobile App UI Components</li>
1150
+ <li>Accessibility Improvements</li>
1151
+ </ul>
1152
+ </div>
1153
+ <div style={{ marginTop: '16px' }}>
1154
+ <h4>Technologies:</h4>
1155
+ <div style={{ display: 'flex', gap: '8px', marginTop: '8px' }}>
1156
+ <span style={{ padding: '4px 8px', backgroundColor: '#e3f2fd', borderRadius: '4px' }}>React</span>
1157
+ <span style={{ padding: '4px 8px', backgroundColor: '#e3f2fd', borderRadius: '4px' }}>TypeScript</span>
1158
+ <span style={{ padding: '4px 8px', backgroundColor: '#e3f2fd', borderRadius: '4px' }}>CSS</span>
1159
+ </div>
1160
+ </div>
1161
+ </div>
1162
+ </TabContent>
1163
+
1164
+ <TabContent value="backend">
1165
+ <div style={{ padding: '20px' }}>
1166
+ <h3>Backend Development</h3>
1167
+ <Text>Robust server-side solutions and APIs.</Text>
1168
+ <div style={{ marginTop: '16px' }}>
1169
+ <h4>Current Projects:</h4>
1170
+ <ul style={{ marginTop: '8px' }}>
1171
+ <li>API Gateway Implementation</li>
1172
+ <li>Database Optimization</li>
1173
+ <li>Microservices Migration</li>
1174
+ </ul>
1175
+ </div>
1176
+ <div style={{ marginTop: '16px' }}>
1177
+ <h4>Technologies:</h4>
1178
+ <div style={{ display: 'flex', gap: '8px', marginTop: '8px' }}>
1179
+ <span style={{ padding: '4px 8px', backgroundColor: '#e8f5e8', borderRadius: '4px' }}>Node.js</span>
1180
+ <span style={{ padding: '4px 8px', backgroundColor: '#e8f5e8', borderRadius: '4px' }}>Python</span>
1181
+ <span style={{ padding: '4px 8px', backgroundColor: '#e8f5e8', borderRadius: '4px' }}>PostgreSQL</span>
1182
+ </div>
1183
+ </div>
1184
+ </div>
1185
+ </TabContent>
1186
+
1187
+ <TabContent value="mobile">
1188
+ <div style={{ padding: '20px' }}>
1189
+ <h3>Mobile Development</h3>
1190
+ <Text>Native and cross-platform mobile applications.</Text>
1191
+ <div style={{ marginTop: '16px' }}>
1192
+ <h4>Current Projects:</h4>
1193
+ <ul style={{ marginTop: '8px' }}>
1194
+ <li>iOS App Store Update</li>
1195
+ <li>Android Performance Optimization</li>
1196
+ <li>React Native Integration</li>
1197
+ </ul>
1198
+ </div>
1199
+ </div>
1200
+ </TabContent>
1201
+
1202
+ <TabContent value="devops">
1203
+ <div style={{ padding: '20px' }}>
1204
+ <h3>DevOps & Infrastructure</h3>
1205
+ <Text>Deployment, monitoring, and infrastructure management.</Text>
1206
+ <div style={{ marginTop: '16px' }}>
1207
+ <h4>Current Projects:</h4>
1208
+ <ul style={{ marginTop: '8px' }}>
1209
+ <li>CI/CD Pipeline Enhancement</li>
1210
+ <li>Kubernetes Migration</li>
1211
+ <li>Monitoring Dashboard</li>
1212
+ </ul>
1213
+ </div>
1214
+ </div>
1215
+ </TabContent>
1216
+ </Tabs>
1217
+ </div>
1218
+ </TabContent>
1219
+
1220
+ <TabContent value="design">
1221
+ <div style={{ padding: '20px' }}>
1222
+ <h2>Design Team</h2>
1223
+
1224
+ {/* Nested Tabs for Design */}
1225
+ <Tabs style="Filled">
1226
+ <div style={{ display: 'flex', gap: '4px', marginTop: '16px' }}>
1227
+ <TabItem value="ux" defaultTab>UX Design</TabItem>
1228
+ <TabItem value="ui">UI Design</TabItem>
1229
+ <TabItem value="research">Research</TabItem>
1230
+ <TabItem value="branding">Branding</TabItem>
1231
+ </div>
1232
+
1233
+ <TabContent value="ux">
1234
+ <div style={{ padding: '20px' }}>
1235
+ <h3>User Experience Design</h3>
1236
+ <Text>Creating intuitive and user-friendly experiences.</Text>
1237
+ <div style={{ marginTop: '16px' }}>
1238
+ <h4>Current Projects:</h4>
1239
+ <ul style={{ marginTop: '8px' }}>
1240
+ <li>User Journey Mapping</li>
1241
+ <li>Usability Testing</li>
1242
+ <li>Information Architecture</li>
1243
+ </ul>
1244
+ </div>
1245
+ </div>
1246
+ </TabContent>
1247
+
1248
+ <TabContent value="ui">
1249
+ <div style={{ padding: '20px' }}>
1250
+ <h3>User Interface Design</h3>
1251
+ <Text>Beautiful and functional visual designs.</Text>
1252
+ <div style={{ marginTop: '16px' }}>
1253
+ <h4>Current Projects:</h4>
1254
+ <ul style={{ marginTop: '8px' }}>
1255
+ <li>Design System Updates</li>
1256
+ <li>Component Library</li>
1257
+ <li>Visual Style Guide</li>
1258
+ </ul>
1259
+ </div>
1260
+ </div>
1261
+ </TabContent>
1262
+
1263
+ <TabContent value="research">
1264
+ <div style={{ padding: '20px' }}>
1265
+ <h3>User Research</h3>
1266
+ <Text>Data-driven insights to guide design decisions.</Text>
1267
+ <div style={{ marginTop: '16px' }}>
1268
+ <h4>Current Projects:</h4>
1269
+ <ul style={{ marginTop: '8px' }}>
1270
+ <li>User Interview Sessions</li>
1271
+ <li>A/B Testing Analysis</li>
1272
+ <li>Market Research Study</li>
1273
+ </ul>
1274
+ </div>
1275
+ </div>
1276
+ </TabContent>
1277
+
1278
+ <TabContent value="branding">
1279
+ <div style={{ padding: '20px' }}>
1280
+ <h3>Brand Design</h3>
1281
+ <Text>Maintaining consistent brand identity across all touchpoints.</Text>
1282
+ <div style={{ marginTop: '16px' }}>
1283
+ <h4>Current Projects:</h4>
1284
+ <ul style={{ marginTop: '8px' }}>
1285
+ <li>Brand Guidelines Update</li>
1286
+ <li>Marketing Collateral</li>
1287
+ <li>Logo Refresh</li>
1288
+ </ul>
1289
+ </div>
1290
+ </div>
1291
+ </TabContent>
1292
+ </Tabs>
1293
+ </div>
1294
+ </TabContent>
1295
+
1296
+ <TabContent value="marketing">
1297
+ <div style={{ padding: '20px' }}>
1298
+ <h2>Marketing Team</h2>
1299
+ <Text>Driving growth through strategic marketing initiatives.</Text>
1300
+ <div style={{ marginTop: '20px' }}>
1301
+ <h4>Key Focus Areas:</h4>
1302
+ <ul style={{ marginTop: '8px' }}>
1303
+ <li>Digital Marketing Campaigns</li>
1304
+ <li>Content Strategy</li>
1305
+ <li>Social Media Management</li>
1306
+ <li>Analytics and Performance</li>
1307
+ </ul>
1308
+ </div>
1309
+ </div>
1310
+ </TabContent>
1311
+
1312
+ <TabContent value="operations">
1313
+ <div style={{ padding: '20px' }}>
1314
+ <h2>Operations Team</h2>
1315
+ <Text>Ensuring smooth day-to-day operations and business processes.</Text>
1316
+ <div style={{ marginTop: '20px' }}>
1317
+ <h4>Key Responsibilities:</h4>
1318
+ <ul style={{ marginTop: '8px' }}>
1319
+ <li>Process Optimization</li>
1320
+ <li>Quality Assurance</li>
1321
+ <li>Resource Management</li>
1322
+ <li>Performance Monitoring</li>
1323
+ </ul>
1324
+ </div>
1325
+ </div>
1326
+ </TabContent>
1327
+ </Tabs>
1328
+ );
1329
+ }
1330
+ ```