@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.1.3 โ†’ 0.1.5

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 (164) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/index.d.ts +131 -131
  3. package/dist/index.esm.js +148 -148
  4. package/dist/index.js +148 -148
  5. package/dist/styles.css +1 -1
  6. package/package.json +1 -1
  7. package/src/components/ui/accessibility-demo.tsx +271 -0
  8. package/src/components/ui/advanced-component-architecture-demo.tsx +916 -0
  9. package/src/components/ui/advanced-transition-system-demo.tsx +670 -0
  10. package/src/components/ui/advanced-transition-system.tsx +395 -0
  11. package/src/components/ui/animation/animated-container.tsx +166 -0
  12. package/src/components/ui/animation/index.ts +19 -0
  13. package/src/components/ui/animation/staggered-container.tsx +68 -0
  14. package/src/components/ui/animation-demo.tsx +250 -0
  15. package/src/components/ui/badge.tsx +33 -0
  16. package/src/components/ui/battery-conscious-animation-demo.tsx +568 -0
  17. package/src/components/ui/border-radius-shadow-demo.tsx +187 -0
  18. package/src/components/ui/button.tsx +36 -0
  19. package/src/components/ui/card.tsx +207 -0
  20. package/src/components/ui/checkbox.tsx +30 -0
  21. package/src/components/ui/color-preview.tsx +411 -0
  22. package/src/components/ui/data-display/chart.tsx +653 -0
  23. package/src/components/ui/data-display/data-grid-simple.tsx +76 -0
  24. package/src/components/ui/data-display/data-grid.tsx +680 -0
  25. package/src/components/ui/data-display/list.tsx +456 -0
  26. package/src/components/ui/data-display/table.tsx +482 -0
  27. package/src/components/ui/data-display/timeline.tsx +441 -0
  28. package/src/components/ui/data-display/tree.tsx +602 -0
  29. package/src/components/ui/data-display/types.ts +536 -0
  30. package/src/components/ui/enterprise-mobile-experience-demo.tsx +749 -0
  31. package/src/components/ui/enterprise-mobile-experience.tsx +464 -0
  32. package/src/components/ui/feedback/alert.tsx +157 -0
  33. package/src/components/ui/feedback/progress.tsx +292 -0
  34. package/src/components/ui/feedback/skeleton.tsx +185 -0
  35. package/src/components/ui/feedback/toast.tsx +280 -0
  36. package/src/components/ui/feedback/types.ts +125 -0
  37. package/src/components/ui/font-preview.tsx +288 -0
  38. package/src/components/ui/form-demo.tsx +553 -0
  39. package/src/components/ui/hardware-acceleration-demo.tsx +547 -0
  40. package/src/components/ui/input.tsx +35 -0
  41. package/src/components/ui/label.tsx +16 -0
  42. package/src/components/ui/layout-demo.tsx +367 -0
  43. package/src/components/ui/layouts/adaptive-layout.tsx +139 -0
  44. package/src/components/ui/layouts/desktop-layout.tsx +224 -0
  45. package/src/components/ui/layouts/index.ts +10 -0
  46. package/src/components/ui/layouts/mobile-layout.tsx +162 -0
  47. package/src/components/ui/layouts/tablet-layout.tsx +197 -0
  48. package/src/components/ui/mobile-form-validation.tsx +451 -0
  49. package/src/components/ui/mobile-input-demo.tsx +201 -0
  50. package/src/components/ui/mobile-input.tsx +281 -0
  51. package/src/components/ui/mobile-skeleton-loading-demo.tsx +638 -0
  52. package/src/components/ui/navigation/breadcrumb.tsx +158 -0
  53. package/src/components/ui/navigation/index.ts +36 -0
  54. package/src/components/ui/navigation/menu.tsx +374 -0
  55. package/src/components/ui/navigation/navigation-demo.tsx +324 -0
  56. package/src/components/ui/navigation/pagination.tsx +272 -0
  57. package/src/components/ui/navigation/sidebar.tsx +383 -0
  58. package/src/components/ui/navigation/stepper.tsx +303 -0
  59. package/src/components/ui/navigation/tabs.tsx +205 -0
  60. package/src/components/ui/navigation/types.ts +299 -0
  61. package/src/components/ui/overlay/backdrop.tsx +81 -0
  62. package/src/components/ui/overlay/focus-manager.tsx +143 -0
  63. package/src/components/ui/overlay/index.ts +36 -0
  64. package/src/components/ui/overlay/modal.tsx +270 -0
  65. package/src/components/ui/overlay/overlay-manager.tsx +110 -0
  66. package/src/components/ui/overlay/popover.tsx +462 -0
  67. package/src/components/ui/overlay/portal.tsx +79 -0
  68. package/src/components/ui/overlay/tooltip.tsx +303 -0
  69. package/src/components/ui/overlay/types.ts +196 -0
  70. package/src/components/ui/performance-demo.tsx +596 -0
  71. package/src/components/ui/semantic-input-system-demo.tsx +502 -0
  72. package/src/components/ui/semantic-input-system-demo.tsx.disabled +873 -0
  73. package/src/components/ui/tablet-layout.tsx +192 -0
  74. package/src/components/ui/theme-customizer.tsx +386 -0
  75. package/src/components/ui/theme-preview.tsx +310 -0
  76. package/src/components/ui/theme-switcher.tsx +264 -0
  77. package/src/components/ui/theme-toggle.tsx +38 -0
  78. package/src/components/ui/token-demo.tsx +195 -0
  79. package/src/components/ui/touch-demo.tsx +462 -0
  80. package/src/components/ui/touch-friendly-interface-demo.tsx +519 -0
  81. package/src/components/ui/touch-friendly-interface.tsx +296 -0
  82. package/src/hooks/index.ts +190 -0
  83. package/src/hooks/use-accessibility-support.ts +518 -0
  84. package/src/hooks/use-adaptive-layout.ts +289 -0
  85. package/src/hooks/use-advanced-patterns.ts +294 -0
  86. package/src/hooks/use-advanced-transition-system.ts +393 -0
  87. package/src/hooks/use-animation-profile.ts +288 -0
  88. package/src/hooks/use-battery-animations.ts +384 -0
  89. package/src/hooks/use-battery-conscious-loading.ts +475 -0
  90. package/src/hooks/use-battery-optimization.ts +330 -0
  91. package/src/hooks/use-battery-status.ts +299 -0
  92. package/src/hooks/use-component-performance.ts +344 -0
  93. package/src/hooks/use-device-loading-states.ts +459 -0
  94. package/src/hooks/use-device.tsx +110 -0
  95. package/src/hooks/use-enterprise-mobile-experience.ts +488 -0
  96. package/src/hooks/use-form-feedback.ts +403 -0
  97. package/src/hooks/use-form-performance.ts +513 -0
  98. package/src/hooks/use-frame-rate.ts +251 -0
  99. package/src/hooks/use-gestures.ts +338 -0
  100. package/src/hooks/use-hardware-acceleration.ts +341 -0
  101. package/src/hooks/use-input-accessibility.ts +455 -0
  102. package/src/hooks/use-input-performance.ts +506 -0
  103. package/src/hooks/use-layout-performance.ts +319 -0
  104. package/src/hooks/use-loading-accessibility.ts +535 -0
  105. package/src/hooks/use-loading-performance.ts +473 -0
  106. package/src/hooks/use-memory-usage.ts +287 -0
  107. package/src/hooks/use-mobile-form-layout.ts +464 -0
  108. package/src/hooks/use-mobile-form-validation.ts +518 -0
  109. package/src/hooks/use-mobile-keyboard-optimization.ts +472 -0
  110. package/src/hooks/use-mobile-layout.ts +302 -0
  111. package/src/hooks/use-mobile-optimization.ts +406 -0
  112. package/src/hooks/use-mobile-skeleton.ts +402 -0
  113. package/src/hooks/use-mobile-touch.ts +414 -0
  114. package/src/hooks/use-performance-throttling.ts +348 -0
  115. package/src/hooks/use-performance.ts +316 -0
  116. package/src/hooks/use-reusable-architecture.ts +414 -0
  117. package/src/hooks/use-semantic-input-types.ts +357 -0
  118. package/src/hooks/use-semantic-input.ts +565 -0
  119. package/src/hooks/use-tablet-layout.ts +384 -0
  120. package/src/hooks/use-touch-friendly-input.ts +524 -0
  121. package/src/hooks/use-touch-friendly-interface.ts +331 -0
  122. package/src/hooks/use-touch-optimization.ts +375 -0
  123. package/src/index.ts +279 -279
  124. package/src/lib/utils.ts +6 -0
  125. package/src/themes/README.md +272 -0
  126. package/src/themes/ThemeContext.tsx +31 -0
  127. package/src/themes/ThemeProvider.tsx +232 -0
  128. package/src/themes/accessibility/index.ts +27 -0
  129. package/src/themes/accessibility.ts +259 -0
  130. package/src/themes/aria-patterns.ts +420 -0
  131. package/src/themes/base-themes.ts +55 -0
  132. package/src/themes/colorManager.ts +380 -0
  133. package/src/themes/examples/dark-theme.ts +154 -0
  134. package/src/themes/examples/minimal-theme.ts +108 -0
  135. package/src/themes/focus-management.ts +701 -0
  136. package/src/themes/fontLoader.ts +201 -0
  137. package/src/themes/high-contrast.ts +621 -0
  138. package/src/themes/index.ts +19 -0
  139. package/src/themes/inheritance.ts +227 -0
  140. package/src/themes/keyboard-navigation.ts +550 -0
  141. package/src/themes/motion-reduction.ts +662 -0
  142. package/src/themes/navigation.ts +238 -0
  143. package/src/themes/screen-reader.ts +645 -0
  144. package/src/themes/systemThemeDetector.ts +182 -0
  145. package/src/themes/themeCSSUpdater.ts +262 -0
  146. package/src/themes/themePersistence.ts +238 -0
  147. package/src/themes/themes/default.ts +586 -0
  148. package/src/themes/themes/harvey.ts +554 -0
  149. package/src/themes/themes/stan-design.ts +683 -0
  150. package/src/themes/types.ts +460 -0
  151. package/src/themes/useSystemTheme.ts +48 -0
  152. package/src/themes/useTheme.ts +87 -0
  153. package/src/themes/validation.ts +462 -0
  154. package/src/tokens/index.ts +34 -0
  155. package/src/tokens/tokenExporter.ts +397 -0
  156. package/src/tokens/tokenGenerator.ts +276 -0
  157. package/src/tokens/tokenManager.ts +248 -0
  158. package/src/tokens/tokenValidator.ts +543 -0
  159. package/src/tokens/types.ts +78 -0
  160. package/src/utils/bundle-analyzer.ts +260 -0
  161. package/src/utils/bundle-splitting.ts +483 -0
  162. package/src/utils/lazy-loading.ts +441 -0
  163. package/src/utils/performance-monitor.ts +513 -0
  164. package/src/utils/tree-shaking.ts +274 -0
@@ -0,0 +1,670 @@
1
+ import React, { useState } from 'react'
2
+ import { Badge } from './badge'
3
+ import { useAdvancedTransitionSystem } from '../../hooks/use-advanced-transition-system'
4
+ import {
5
+ AdvancedTransitionButton,
6
+ AdvancedTransitionCard,
7
+ AdvancedTransitionInput,
8
+ AdvancedTransitionList
9
+ } from './advanced-transition-system'
10
+
11
+ export const AdvancedTransitionSystemDemo: React.FC = () => {
12
+ const [activeDemo, setActiveDemo] = useState<'transitions' | 'performance' | 'device' | 'accessibility'>('transitions')
13
+ const [formData, setFormData] = useState({
14
+ name: '',
15
+ email: '',
16
+ message: ''
17
+ })
18
+
19
+ const { transitionState, performanceMetrics, isOptimizing, optimizations } = useAdvancedTransitionSystem({
20
+ duration: 300,
21
+ easing: 'ease-out',
22
+ performance: true,
23
+ deviceOptimization: true,
24
+ accessibility: true,
25
+ batteryAware: true
26
+ }, {
27
+ onTransitionStart: (config) => {
28
+ console.log('Transition started:', config)
29
+ },
30
+ onTransitionComplete: (duration) => {
31
+ console.log('Transition completed in:', duration, 'ms')
32
+ },
33
+ onPerformanceOptimized: (metrics) => {
34
+ console.log('Performance optimized:', metrics)
35
+ },
36
+ onDeviceOptimized: (deviceType) => {
37
+ console.log('Device optimized for:', deviceType)
38
+ },
39
+ onAccessibilityEnhanced: (feature) => {
40
+ console.log('Accessibility enhanced:', feature)
41
+ }
42
+ })
43
+
44
+ const handleInputChange = (field: string, value: string) => {
45
+ setFormData(prev => ({ ...prev, [field]: value }))
46
+ }
47
+
48
+ const renderTransitionsDemo = () => (
49
+ <div className="space-y-8">
50
+ {/* Cubic Bezier Curves Showcase */}
51
+ <div className="space-y-6">
52
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽจ Cubic Bezier Curves</h3>
53
+
54
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
55
+ <div className="space-y-4">
56
+ <h4 className="font-medium text-cs-text-primary">Standard Easing</h4>
57
+
58
+ <div className="space-y-3">
59
+ <AdvancedTransitionButton
60
+ duration={300}
61
+ easing="ease-out"
62
+ variant="default"
63
+ size="default"
64
+ >
65
+ Ease Out (Standard)
66
+ </AdvancedTransitionButton>
67
+
68
+ <AdvancedTransitionButton
69
+ duration={300}
70
+ easing="ease-in"
71
+ variant="secondary"
72
+ size="default"
73
+ >
74
+ Ease In
75
+ </AdvancedTransitionButton>
76
+
77
+ <AdvancedTransitionButton
78
+ duration={300}
79
+ easing="ease-in-out"
80
+ variant="outline"
81
+ size="default"
82
+ >
83
+ Ease In Out
84
+ </AdvancedTransitionButton>
85
+ </div>
86
+ </div>
87
+
88
+ <div className="space-y-4">
89
+ <h4 className="font-medium text-cs-text-primary">Advanced Easing</h4>
90
+
91
+ <div className="space-y-3">
92
+ <AdvancedTransitionButton
93
+ duration={300}
94
+ easing="ease-out-quint"
95
+ variant="default"
96
+ size="default"
97
+ >
98
+ Ease Out Quint
99
+ </AdvancedTransitionButton>
100
+
101
+ <AdvancedTransitionButton
102
+ duration={300}
103
+ easing="ease-out-expo"
104
+ variant="secondary"
105
+ size="default"
106
+ >
107
+ Ease Out Expo
108
+ </AdvancedTransitionButton>
109
+
110
+ <AdvancedTransitionButton
111
+ duration={300}
112
+ easing="ease-out-circ"
113
+ variant="outline"
114
+ size="default"
115
+ >
116
+ Ease Out Circ
117
+ </AdvancedTransitionButton>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+
123
+ {/* Transition Durations */}
124
+ <div className="space-y-6">
125
+ <h3 className="text-lg font-semibold text-cs-text-primary">โฑ๏ธ Transition Durations</h3>
126
+
127
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
128
+ <div className="space-y-4">
129
+ <h4 className="font-medium text-cs-text-primary">Fast Transitions</h4>
130
+
131
+ <div className="space-y-3">
132
+ <AdvancedTransitionButton
133
+ duration={75}
134
+ easing="ease-out"
135
+ variant="default"
136
+ size="sm"
137
+ >
138
+ 75ms (Ultra Fast)
139
+ </AdvancedTransitionButton>
140
+
141
+ <AdvancedTransitionButton
142
+ duration={150}
143
+ easing="ease-out"
144
+ variant="secondary"
145
+ size="sm"
146
+ >
147
+ 150ms (Fast)
148
+ </AdvancedTransitionButton>
149
+
150
+ <AdvancedTransitionButton
151
+ duration={200}
152
+ easing="ease-out"
153
+ variant="outline"
154
+ size="sm"
155
+ >
156
+ 200ms (Quick)
157
+ </AdvancedTransitionButton>
158
+ </div>
159
+ </div>
160
+
161
+ <div className="space-y-4">
162
+ <h4 className="font-medium text-cs-text-primary">Slow Transitions</h4>
163
+
164
+ <div className="space-y-3">
165
+ <AdvancedTransitionButton
166
+ duration={500}
167
+ easing="ease-out"
168
+ variant="default"
169
+ size="lg"
170
+ >
171
+ 500ms (Slow)
172
+ </AdvancedTransitionButton>
173
+
174
+ <AdvancedTransitionButton
175
+ duration={700}
176
+ easing="ease-out"
177
+ variant="secondary"
178
+ size="lg"
179
+ >
180
+ 700ms (Slower)
181
+ </AdvancedTransitionButton>
182
+
183
+ <AdvancedTransitionButton
184
+ duration={1000}
185
+ easing="ease-out"
186
+ variant="outline"
187
+ size="lg"
188
+ >
189
+ 1000ms (Very Slow)
190
+ </AdvancedTransitionButton>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+
196
+ {/* Interactive Components */}
197
+ <div className="space-y-6">
198
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽญ Interactive Components</h3>
199
+
200
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
201
+ <div className="space-y-4">
202
+ <h4 className="font-medium text-cs-text-primary">Interactive Cards</h4>
203
+
204
+ <div className="space-y-3">
205
+ <AdvancedTransitionCard
206
+ duration={300}
207
+ easing="ease-out"
208
+ interactive
209
+ >
210
+ <div className="text-center">
211
+ <div className="text-lg font-semibold">Interactive Card</div>
212
+ <div className="text-sm text-cs-text-secondary">Click to trigger transition</div>
213
+ </div>
214
+ </AdvancedTransitionCard>
215
+
216
+ <AdvancedTransitionCard
217
+ duration={500}
218
+ easing="ease-out-quint"
219
+ interactive
220
+ >
221
+ <div className="text-center">
222
+ <div className="text-lg font-semibold">Quint Easing</div>
223
+ <div className="text-sm text-cs-text-secondary">Smooth shadow transition</div>
224
+ </div>
225
+ </AdvancedTransitionCard>
226
+ </div>
227
+ </div>
228
+
229
+ <div className="space-y-4">
230
+ <h4 className="font-medium text-cs-text-primary">Form Inputs</h4>
231
+
232
+ <div className="space-y-3">
233
+ <AdvancedTransitionInput
234
+ duration={200}
235
+ easing="ease-out"
236
+ placeholder="Focus to trigger transition"
237
+ value={formData.name}
238
+ onChange={(e) => handleInputChange('name', e.target.value)}
239
+ />
240
+
241
+ <AdvancedTransitionInput
242
+ duration={300}
243
+ easing="ease-out-quint"
244
+ placeholder="Quint easing on focus"
245
+ value={formData.email}
246
+ onChange={(e) => handleInputChange('email', e.target.value)}
247
+ />
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ {/* Staggered Animations */}
254
+ <div className="space-y-6">
255
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽฌ Staggered Animations</h3>
256
+
257
+ <AdvancedTransitionList
258
+ duration={300}
259
+ easing="ease-out"
260
+ staggerDelay={100}
261
+ >
262
+ <li className="p-3 bg-cs-surface-bg border border-cs-border rounded-lg animate-fade-in animate-stagger-1">
263
+ Item 1 - Fades in first
264
+ </li>
265
+ <li className="p-3 bg-cs-surface-bg border border-cs-border rounded-lg animate-fade-in animate-stagger-2">
266
+ Item 2 - Fades in second
267
+ </li>
268
+ <li className="p-3 bg-cs-surface-bg border border-cs-border rounded-lg animate-fade-in animate-stagger-3">
269
+ Item 3 - Fades in third
270
+ </li>
271
+ <li className="p-3 bg-cs-surface-bg border border-cs-border rounded-lg animate-fade-in animate-stagger-4">
272
+ Item 4 - Fades in fourth
273
+ </li>
274
+ <li className="p-3 bg-cs-surface-bg border border-cs-border rounded-lg animate-fade-in animate-stagger-5">
275
+ Item 5 - Fades in last
276
+ </li>
277
+ </AdvancedTransitionList>
278
+ </div>
279
+ </div>
280
+ )
281
+
282
+ const renderPerformanceDemo = () => (
283
+ <div className="space-y-6">
284
+ {/* Performance Metrics */}
285
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
286
+ <div className="space-y-4">
287
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐Ÿ“Š Performance Metrics</h3>
288
+
289
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
290
+ <div className="space-y-3">
291
+ <div className="flex justify-between items-center">
292
+ <span className="text-sm font-medium">Frame Rate</span>
293
+ <span className={`text-lg font-bold ${
294
+ performanceMetrics.frameRate >= 55 ? 'text-cs-success' :
295
+ performanceMetrics.frameRate >= 45 ? 'text-cs-warning' : 'text-cs-error'
296
+ }`}>
297
+ {performanceMetrics.frameRate} FPS
298
+ </span>
299
+ </div>
300
+
301
+ <div className="w-full bg-cs-border rounded-full h-2">
302
+ <div
303
+ className={`h-2 rounded-full transition-all duration-300 ${
304
+ performanceMetrics.frameRate >= 55 ? 'bg-cs-success' :
305
+ performanceMetrics.frameRate >= 45 ? 'bg-cs-warning' : 'bg-cs-error'
306
+ }`}
307
+ style={{ width: `${(performanceMetrics.frameRate / 60) * 100}%` }}
308
+ />
309
+ </div>
310
+
311
+ <div className="flex justify-between items-center">
312
+ <span className="text-sm font-medium">Memory Usage</span>
313
+ <span className="font-medium">{performanceMetrics.memoryUsage}%</span>
314
+ </div>
315
+
316
+ <div className="flex justify-between items-center">
317
+ <span className="text-sm font-medium">Smoothness</span>
318
+ <span className={`font-medium ${
319
+ performanceMetrics.smoothness >= 80 ? 'text-cs-success' :
320
+ performanceMetrics.smoothness >= 60 ? 'text-cs-warning' : 'text-cs-error'
321
+ }`}>
322
+ {performanceMetrics.smoothness}%
323
+ </span>
324
+ </div>
325
+
326
+ <div className="flex justify-between items-center">
327
+ <span className="text-sm font-medium">Battery Impact</span>
328
+ <span className={`font-medium ${
329
+ performanceMetrics.batteryImpact >= 80 ? 'text-cs-success' :
330
+ performanceMetrics.batteryImpact >= 60 ? 'text-cs-warning' : 'text-cs-error'
331
+ }`}>
332
+ {performanceMetrics.batteryImpact}%
333
+ </span>
334
+ </div>
335
+ </div>
336
+ </div>
337
+ </div>
338
+
339
+ <div className="space-y-4">
340
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽฏ Performance Score</h3>
341
+
342
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
343
+ <div className="text-center space-y-3">
344
+ <div className={`text-4xl font-bold ${
345
+ transitionState.performanceScore >= 80 ? 'text-cs-success' :
346
+ transitionState.performanceScore >= 60 ? 'text-cs-warning' : 'text-cs-error'
347
+ }`}>
348
+ {transitionState.performanceScore}/100
349
+ </div>
350
+
351
+ <div className="w-full bg-cs-border rounded-full h-3">
352
+ <div
353
+ className={`h-3 rounded-full transition-all duration-300 ${
354
+ transitionState.performanceScore >= 80 ? 'bg-cs-success' :
355
+ transitionState.performanceScore >= 60 ? 'bg-cs-warning' : 'bg-cs-error'
356
+ }`}
357
+ style={{ width: `${transitionState.performanceScore}%` }}
358
+ />
359
+ </div>
360
+
361
+ <div className="text-sm text-cs-text-secondary">
362
+ {transitionState.performanceScore >= 80 ? 'Excellent Performance' :
363
+ transitionState.performanceScore >= 60 ? 'Good Performance' : 'Needs Optimization'}
364
+ </div>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ </div>
369
+
370
+ {/* Hardware Acceleration */}
371
+ <div className="space-y-4">
372
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐Ÿš€ Hardware Acceleration</h3>
373
+
374
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
375
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border text-center">
376
+ <div className="text-2xl mb-2">โšก</div>
377
+ <div className="font-medium">GPU Acceleration</div>
378
+ <div className="text-sm text-cs-text-secondary">Hardware-accelerated transforms</div>
379
+ </div>
380
+
381
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border text-center">
382
+ <div className="text-2xl mb-2">๐Ÿ’พ</div>
383
+ <div className="font-medium">Memory Optimization</div>
384
+ <div className="text-sm text-cs-text-secondary">Efficient memory usage</div>
385
+ </div>
386
+
387
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border text-center">
388
+ <div className="text-2xl mb-2">๐Ÿ”‹</div>
389
+ <div className="font-medium">Battery Aware</div>
390
+ <div className="text-sm text-cs-text-secondary">Optimized for battery life</div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ </div>
395
+ )
396
+
397
+ const renderDeviceDemo = () => (
398
+ <div className="space-y-6">
399
+ {/* Device Detection */}
400
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
401
+ <div className="space-y-4">
402
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐Ÿ“ฑ Device Detection</h3>
403
+
404
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
405
+ <div className="space-y-3">
406
+ <div className="flex justify-between items-center">
407
+ <span className="text-sm font-medium">Current Device</span>
408
+ <Badge variant="default" className="capitalize">
409
+ {transitionState.deviceType}
410
+ </Badge>
411
+ </div>
412
+
413
+ <div className="flex justify-between items-center">
414
+ <span className="text-sm font-medium">Battery Level</span>
415
+ <Badge
416
+ variant={
417
+ transitionState.batteryLevel === 'normal' ? 'default' :
418
+ transitionState.batteryLevel === 'low' ? 'secondary' : 'outline'
419
+ }
420
+ className="capitalize"
421
+ >
422
+ {transitionState.batteryLevel}
423
+ </Badge>
424
+ </div>
425
+
426
+ <div className="flex justify-between items-center">
427
+ <span className="text-sm font-medium">Reduced Motion</span>
428
+ <Badge variant={transitionState.reducedMotion ? 'outline' : 'default'}>
429
+ {transitionState.reducedMotion ? 'Enabled' : 'Disabled'}
430
+ </Badge>
431
+ </div>
432
+ </div>
433
+ </div>
434
+ </div>
435
+
436
+ <div className="space-y-4">
437
+ <h3 className="text-lg font-semibold text-cs-text-primary">โš™๏ธ Device Optimizations</h3>
438
+
439
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
440
+ {isOptimizing ? (
441
+ <div className="text-center py-4">
442
+ <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-cs-primary mx-auto mb-2"></div>
443
+ <div className="text-sm text-cs-text-secondary">Optimizing for device...</div>
444
+ </div>
445
+ ) : optimizations.length > 0 ? (
446
+ <div className="space-y-2">
447
+ {optimizations.map((optimization, index) => (
448
+ <div key={index} className="flex items-center space-x-2 text-sm">
449
+ <span className="text-cs-success">โœ…</span>
450
+ <span>{optimization}</span>
451
+ </div>
452
+ ))}
453
+ </div>
454
+ ) : (
455
+ <div className="text-center py-4 text-cs-text-secondary">
456
+ No optimizations applied yet
457
+ </div>
458
+ )}
459
+ </div>
460
+ </div>
461
+ </div>
462
+
463
+ {/* Device-Specific Transitions */}
464
+ <div className="space-y-4">
465
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽฏ Device-Specific Transitions</h3>
466
+
467
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
468
+ <AdvancedTransitionCard
469
+ duration={transitionState.deviceType === 'mobile' ? 200 : 300}
470
+ easing="ease-out"
471
+ className="text-center"
472
+ >
473
+ <div className="text-lg font-semibold">Mobile Optimized</div>
474
+ <div className="text-sm text-cs-text-secondary">
475
+ Duration: {transitionState.deviceType === 'mobile' ? '200ms' : '300ms'}
476
+ </div>
477
+ </AdvancedTransitionCard>
478
+
479
+ <AdvancedTransitionCard
480
+ duration={transitionState.deviceType === 'tablet' ? 250 : 300}
481
+ easing="ease-out"
482
+ className="text-center"
483
+ >
484
+ <div className="text-lg font-semibold">Tablet Optimized</div>
485
+ <div className="text-sm text-cs-text-secondary">
486
+ Duration: {transitionState.deviceType === 'tablet' ? '250ms' : '300ms'}
487
+ </div>
488
+ </AdvancedTransitionCard>
489
+
490
+ <AdvancedTransitionCard
491
+ duration={300}
492
+ easing="ease-out"
493
+ className="text-center"
494
+ >
495
+ <div className="text-lg font-semibold">Desktop Optimized</div>
496
+ <div className="text-sm text-cs-text-secondary">
497
+ Duration: 300ms
498
+ </div>
499
+ </AdvancedTransitionCard>
500
+ </div>
501
+ </div>
502
+ </div>
503
+ )
504
+
505
+ const renderAccessibilityDemo = () => (
506
+ <div className="space-y-6">
507
+ {/* Accessibility Features */}
508
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
509
+ <div className="space-y-4">
510
+ <h3 className="text-lg font-semibold text-cs-text-primary">โ™ฟ Accessibility Features</h3>
511
+
512
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
513
+ <div className="space-y-3">
514
+ <div className="flex justify-between items-center">
515
+ <span className="text-sm font-medium">Reduced Motion</span>
516
+ <Badge variant={transitionState.reducedMotion ? 'default' : 'secondary'}>
517
+ {transitionState.reducedMotion ? 'Supported' : 'Not Detected'}
518
+ </Badge>
519
+ </div>
520
+
521
+ <div className="flex justify-between items-center">
522
+ <span className="text-sm font-medium">Screen Reader</span>
523
+ <Badge variant="default">Supported</Badge>
524
+ </div>
525
+
526
+ <div className="flex justify-between items-center">
527
+ <span className="text-sm font-medium">Focus Management</span>
528
+ <Badge variant="default">Enabled</Badge>
529
+ </div>
530
+
531
+ <div className="flex justify-between items-center">
532
+ <span className="text-sm font-medium">ARIA Support</span>
533
+ <Badge variant="default">Full</Badge>
534
+ </div>
535
+ </div>
536
+ </div>
537
+ </div>
538
+
539
+ <div className="space-y-4">
540
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐ŸŽญ Motion Preferences</h3>
541
+
542
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
543
+ <div className="space-y-3">
544
+ <div className="text-center">
545
+ <div className="text-2xl mb-2">
546
+ {transitionState.reducedMotion ? '๐Ÿšซ' : 'โœจ'}
547
+ </div>
548
+ <div className="font-medium">
549
+ {transitionState.reducedMotion ? 'Reduced Motion' : 'Full Motion'}
550
+ </div>
551
+ <div className="text-sm text-cs-text-secondary">
552
+ {transitionState.reducedMotion
553
+ ? 'Transitions are disabled for accessibility'
554
+ : 'All transitions are enabled'}
555
+ </div>
556
+ </div>
557
+ </div>
558
+ </div>
559
+ </div>
560
+ </div>
561
+
562
+ {/* Accessibility Test */}
563
+ <div className="space-y-4">
564
+ <h3 className="text-lg font-semibold text-cs-text-primary">๐Ÿงช Accessibility Test</h3>
565
+
566
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
567
+ <AdvancedTransitionButton
568
+ duration={transitionState.reducedMotion ? 0 : 300}
569
+ easing="ease-out"
570
+ variant="default"
571
+ size="default"
572
+ aria-label="Test button with accessibility support"
573
+ >
574
+ Test Button
575
+ </AdvancedTransitionButton>
576
+
577
+ <AdvancedTransitionInput
578
+ duration={transitionState.reducedMotion ? 0 : 200}
579
+ easing="ease-out"
580
+ placeholder="Test input accessibility"
581
+ aria-label="Test input with accessibility support"
582
+ />
583
+ </div>
584
+
585
+ <div className="text-sm text-cs-text-secondary">
586
+ <strong>Note:</strong> If you have reduced motion enabled in your system preferences,
587
+ transitions will be automatically disabled for better accessibility.
588
+ </div>
589
+ </div>
590
+ </div>
591
+ )
592
+
593
+ return (
594
+ <div className="space-y-6">
595
+ {/* Header */}
596
+ <div className="text-center space-y-2">
597
+ <h2 className="text-2xl font-bold text-cs-text-primary">
598
+ Advanced Transition System with Cubic Bezier Curves
599
+ </h2>
600
+ <p className="text-cs-text-secondary">
601
+ Professional animation system with performance optimization, device-specific behavior, and accessibility support
602
+ </p>
603
+ </div>
604
+
605
+ {/* Navigation Tabs */}
606
+ <div className="flex flex-wrap gap-2 justify-center">
607
+ {(['transitions', 'performance', 'device', 'accessibility'] as const).map((demo) => (
608
+ <button
609
+ key={demo}
610
+ onClick={() => setActiveDemo(demo)}
611
+ className={`px-4 py-2 rounded-lg font-medium transition-colors ${
612
+ activeDemo === demo
613
+ ? 'bg-cs-primary text-white'
614
+ : 'bg-cs-surface-bg text-cs-text-primary hover:bg-cs-hover-bg'
615
+ }`}
616
+ >
617
+ {demo === 'transitions' && '๐ŸŽจ Transitions'}
618
+ {demo === 'performance' && '๐Ÿ“Š Performance'}
619
+ {demo === 'device' && '๐Ÿ“ฑ Device'}
620
+ {demo === 'accessibility' && 'โ™ฟ Accessibility'}
621
+ </button>
622
+ ))}
623
+ </div>
624
+
625
+ {/* Demo Content */}
626
+ <div className="min-h-[400px]">
627
+ {activeDemo === 'transitions' && renderTransitionsDemo()}
628
+ {activeDemo === 'performance' && renderPerformanceDemo()}
629
+ {activeDemo === 'device' && renderDeviceDemo()}
630
+ {activeDemo === 'accessibility' && renderAccessibilityDemo()}
631
+ </div>
632
+
633
+ {/* Status Bar */}
634
+ <div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
635
+ <div className="flex flex-wrap items-center justify-between gap-4 text-sm">
636
+ <div className="flex items-center space-x-4">
637
+ <span className="font-medium">Device:</span>
638
+ <Badge variant="outline" className="capitalize">
639
+ {transitionState.deviceType}
640
+ </Badge>
641
+ <span className="font-medium">Battery:</span>
642
+ <Badge
643
+ variant={
644
+ transitionState.batteryLevel === 'normal' ? 'default' :
645
+ transitionState.batteryLevel === 'low' ? 'secondary' : 'outline'
646
+ }
647
+ className="capitalize"
648
+ >
649
+ {transitionState.batteryLevel}
650
+ </Badge>
651
+ </div>
652
+
653
+ <div className="flex items-center space-x-4">
654
+ <span className="font-medium">Performance:</span>
655
+ <span className={`font-bold ${
656
+ transitionState.performanceScore >= 80 ? 'text-cs-success' :
657
+ transitionState.performanceScore >= 60 ? 'text-cs-warning' : 'text-cs-error'
658
+ }`}>
659
+ {transitionState.performanceScore}%
660
+ </span>
661
+ <span className="font-medium">Motion:</span>
662
+ <Badge variant={transitionState.reducedMotion ? 'outline' : 'default'}>
663
+ {transitionState.reducedMotion ? 'Reduced' : 'Full'}
664
+ </Badge>
665
+ </div>
666
+ </div>
667
+ </div>
668
+ </div>
669
+ )
670
+ }