@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,873 @@
1
+ import React, { useState, useEffect } from 'react'
2
+ import { Card } from './card'
3
+ import { Button } from './button'
4
+ import { Badge } from './badge'
5
+ import { useSemanticInputTypes } from '../../hooks/use-semantic-input-types'
6
+ import { useMobileKeyboardOptimization } from '../../hooks/use-mobile-keyboard-optimization'
7
+ import { useTouchFriendlyInput } from '../../hooks/use-touch-friendly-input'
8
+ import { useInputPerformance } from '../../hooks/use-input-performance'
9
+ import { useInputAccessibility } from '../../hooks/use-input-accessibility'
10
+
11
+ export const SemanticInputSystemDemo: React.FC = () => {
12
+ const [activeTab, setActiveTab] = useState('overview')
13
+ const [inputValue, setInputValue] = useState('')
14
+ const [selectedInputType, setSelectedInputType] = useState('name')
15
+ const [showInputDemo, setShowInputDemo] = useState(false)
16
+
17
+ // Initialize all hooks
18
+ const semanticInputTypes = useSemanticInputTypes({
19
+ onInputTypeSelected: (inputType) => {
20
+ console.log('Input type selected:', inputType.name)
21
+ },
22
+ onConfigApplied: (config) => {
23
+ console.log('Input config applied:', config)
24
+ },
25
+ onMobileOptimizationApplied: (optimization) => {
26
+ console.log('Mobile optimization:', optimization)
27
+ },
28
+ onTouchOptimizationApplied: (optimization) => {
29
+ console.log('Touch optimization:', optimization)
30
+ },
31
+ onAccessibilityEnhanced: (feature) => {
32
+ console.log('Accessibility enhanced:', feature)
33
+ }
34
+ })
35
+
36
+ const mobileKeyboard = useMobileKeyboardOptimization({
37
+ onKeyboardStateChanged: (state) => {
38
+ console.log('Keyboard state changed:', state)
39
+ },
40
+ onOptimizationApplied: (optimization) => {
41
+ console.log('Keyboard optimization:', optimization)
42
+ },
43
+ onPerformanceOptimized: (optimization) => {
44
+ console.log('Keyboard performance:', optimization)
45
+ },
46
+ onBatteryOptimized: (strategy) => {
47
+ console.log('Keyboard battery:', strategy)
48
+ },
49
+ onAccessibilityEnhanced: (feature) => {
50
+ console.log('Keyboard accessibility:', feature)
51
+ }
52
+ })
53
+
54
+ const touchFriendly = useTouchFriendlyInput({
55
+ onTouchStateChanged: (state) => {
56
+ console.log('Touch state changed:', state)
57
+ },
58
+ onTouchOptimizationApplied: (optimization) => {
59
+ console.log('Touch optimization:', optimization)
60
+ },
61
+ onGestureDetected: (gesture) => {
62
+ console.log('Gesture detected:', gesture)
63
+ },
64
+ onTouchFeedbackTriggered: (feedback) => {
65
+ console.log('Touch feedback:', feedback)
66
+ },
67
+ onPerformanceOptimized: (optimization) => {
68
+ console.log('Touch performance:', optimization)
69
+ }
70
+ })
71
+
72
+ const inputPerformance = useInputPerformance({
73
+ onPerformanceOptimized: (optimization) => {
74
+ console.log('Input performance:', optimization)
75
+ },
76
+ onMemoryOptimized: (optimization) => {
77
+ console.log('Input memory:', optimization)
78
+ },
79
+ onBatteryOptimized: (strategy) => {
80
+ console.log('Input battery:', strategy)
81
+ },
82
+ onEventOptimized: (optimization) => {
83
+ console.log('Input event:', optimization)
84
+ },
85
+ onPerformanceThresholdExceeded: (metric, value, threshold) => {
86
+ console.log(`Performance threshold exceeded: ${metric} = ${value} (threshold: ${threshold})`)
87
+ }
88
+ })
89
+
90
+ const inputAccessibility = useInputAccessibility({
91
+ onAccessibilityFeatureEnabled: (feature) => {
92
+ console.log('Accessibility feature:', feature)
93
+ },
94
+ onKeyboardNavigationEnabled: (feature) => {
95
+ console.log('Keyboard navigation:', feature)
96
+ },
97
+ onScreenReaderOptimized: (optimization) => {
98
+ console.log('Screen reader:', optimization)
99
+ },
100
+ onFocusManagementEnhanced: (feature) => {
101
+ console.log('Focus management:', feature)
102
+ },
103
+ onAccessibilityScoreChanged: (score) => {
104
+ console.log('Accessibility score:', score)
105
+ }
106
+ })
107
+
108
+ // Handle input type selection
109
+ const handleInputTypeSelect = (typeId: string) => {
110
+ setSelectedInputType(typeId)
111
+ semanticInputTypes.selectInputType(typeId)
112
+ mobileKeyboard.autoOptimizeForInputType(typeId)
113
+ setShowInputDemo(true)
114
+ }
115
+
116
+ // Get current input configuration
117
+ const getCurrentInputConfig = () => {
118
+ return semanticInputTypes.getInputConfig(selectedInputType)
119
+ }
120
+
121
+ // Get optimization status
122
+ const getOptimizationStatus = () => {
123
+ return {
124
+ semantic: semanticInputTypes.getOptimizationStatus(),
125
+ keyboard: mobileKeyboard.getOptimizationStatus(),
126
+ touch: touchFriendly.getOptimizationStatus(),
127
+ performance: inputPerformance.getOptimizationStatus(),
128
+ accessibility: inputAccessibility.getOptimizationStatus()
129
+ }
130
+ }
131
+
132
+ return (
133
+ <div className="space-y-6">
134
+ {/* Header */}
135
+ <div className="text-center">
136
+ <h2 className="text-2xl font-bold text-cs-text-primary mb-2">
137
+ Semantic Input System & Mobile Keyboard Optimization
138
+ </h2>
139
+ <p className="text-cs-text-secondary">
140
+ Advanced input system with semantic types, mobile keyboard optimization, touch-friendly behavior, performance monitoring, and accessibility support
141
+ </p>
142
+ </div>
143
+
144
+ {/* Navigation */}
145
+ <div className="flex flex-wrap gap-2 justify-center">
146
+ <Button
147
+ variant={activeTab === 'overview' ? 'default' : 'outline'}
148
+ onClick={() => setActiveTab('overview')}
149
+ size="sm"
150
+ >
151
+ Overview
152
+ </Button>
153
+ <Button
154
+ variant={activeTab === 'semantic' ? 'default' : 'outline'}
155
+ onClick={() => setActiveTab('semantic')}
156
+ size="sm"
157
+ >
158
+ Semantic Types
159
+ </Button>
160
+ <Button
161
+ variant={activeTab === 'keyboard' ? 'default' : 'outline'}
162
+ onClick={() => setActiveTab('keyboard')}
163
+ size="sm"
164
+ >
165
+ Keyboard Optimization
166
+ </Button>
167
+ <Button
168
+ variant={activeTab === 'touch' ? 'default' : 'outline'}
169
+ onClick={() => setActiveTab('touch')}
170
+ size="sm"
171
+ >
172
+ Touch Behavior
173
+ </Button>
174
+ <Button
175
+ variant={activeTab === 'performance' ? 'default' : 'outline'}
176
+ onClick={() => setActiveTab('performance')}
177
+ size="sm"
178
+ >
179
+ Performance
180
+ </Button>
181
+ <Button
182
+ variant={activeTab === 'accessibility' ? 'default' : 'outline'}
183
+ onClick={() => setActiveTab('accessibility')}
184
+ size="sm"
185
+ >
186
+ Accessibility
187
+ </Button>
188
+ </div>
189
+
190
+ {/* Overview Section */}
191
+ {activeTab === 'overview' && (
192
+ <div className="space-y-6">
193
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
194
+ {/* Semantic Input Types */}
195
+ <Card className="p-4">
196
+ <div className="text-center">
197
+ <div className="text-2xl mb-2">🎯</div>
198
+ <h3 className="font-semibold text-cs-text-primary">Semantic Types</h3>
199
+ <p className="text-sm text-cs-text-secondary mt-1">
200
+ {semanticInputTypes.inputTypes.length} types available
201
+ </p>
202
+ <Badge variant="outline" className="mt-2">
203
+ {semanticInputTypes.selectedType?.name || 'None Selected'}
204
+ </Badge>
205
+ </div>
206
+ </Card>
207
+
208
+ {/* Mobile Keyboard */}
209
+ <Card className="p-4">
210
+ <div className="text-center">
211
+ <div className="text-2xl mb-2">⌨️</div>
212
+ <h3 className="font-semibold text-cs-text-primary">Mobile Keyboard</h3>
213
+ <p className="text-sm text-cs-text-secondary mt-1">
214
+ {mobileKeyboard.keyboardState.platform}
215
+ </p>
216
+ <Badge variant="outline" className="mt-2">
217
+ {mobileKeyboard.keyboardState.isVisible ? 'Visible' : 'Hidden'}
218
+ </Badge>
219
+ </div>
220
+ </Card>
221
+
222
+ {/* Touch Behavior */}
223
+ <Card className="p-4">
224
+ <div className="text-center">
225
+ <div className="text-2xl mb-2">👆</div>
226
+ <h3 className="font-semibold text-cs-text-primary">Touch Behavior</h3>
227
+ <p className="text-sm text-cs-text-secondary mt-1">
228
+ {touchFriendly.touchState.gestureType}
229
+ </p>
230
+ <Badge variant="outline" className="mt-2">
231
+ {touchFriendly.touchState.isTouching ? 'Touching' : 'Idle'}
232
+ </Badge>
233
+ </div>
234
+ </Card>
235
+
236
+ {/* Performance */}
237
+ <Card className="p-4">
238
+ <div className="text-center">
239
+ <div className="text-2xl mb-2">⚡</div>
240
+ <h3 className="font-semibold text-cs-text-primary">Performance</h3>
241
+ <p className="text-sm text-cs-text-secondary mt-1">
242
+ {inputPerformance.performanceMetrics.frameRate} FPS
243
+ </p>
244
+ <Badge variant="outline" className="mt-2">
245
+ {inputPerformance.performanceHealth}
246
+ </Badge>
247
+ </div>
248
+ </Card>
249
+ </div>
250
+
251
+ {/* Input Demo */}
252
+ {showInputDemo && (
253
+ <Card className="p-6">
254
+ <h3 className="text-lg font-semibold mb-4">Input Demo</h3>
255
+ <div className="space-y-4">
256
+ <div>
257
+ <label className="block text-sm font-medium text-cs-text-primary mb-2">
258
+ {selectedInputType.charAt(0).toUpperCase() + selectedInputType.slice(1)} Input
259
+ </label>
260
+ <input
261
+ type={getCurrentInputConfig()?.type || 'text'}
262
+ inputMode={getCurrentInputConfig()?.inputMode as any}
263
+ autoCapitalize={getCurrentInputConfig()?.autoCapitalize as any}
264
+ autoComplete={getCurrentInputConfig()?.autoComplete}
265
+ autoCorrect={getCurrentInputConfig()?.autoCorrect as any}
266
+ spellCheck={getCurrentInputConfig()?.spellCheck}
267
+ pattern={getCurrentInputConfig()?.pattern}
268
+ minLength={getCurrentInputConfig()?.minLength}
269
+ maxLength={getCurrentInputConfig()?.maxLength}
270
+ placeholder={getCurrentInputConfig()?.placeholder}
271
+ required={getCurrentInputConfig()?.required}
272
+ className="semantic-input semantic-input-mobile semantic-input-touch w-full"
273
+ value={inputValue}
274
+ onChange={(e) => setInputValue(e.target.value)}
275
+ />
276
+ <div className="mt-2 text-sm text-cs-text-secondary">
277
+ <p>Type: {getCurrentInputConfig()?.type}</p>
278
+ <p>Input Mode: {getCurrentInputConfig()?.inputMode}</p>
279
+ <p>Auto-capitalize: {getCurrentInputConfig()?.autoCapitalize}</p>
280
+ <p>Auto-complete: {getCurrentInputConfig()?.autoComplete}</p>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ </Card>
285
+ )}
286
+
287
+ {/* Optimization Status */}
288
+ <Card className="p-6">
289
+ <h3 className="text-lg font-semibold mb-4">Optimization Status</h3>
290
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4">
291
+ {Object.entries(getOptimizationStatus()).map(([category, status]) => (
292
+ <div key={category} className="text-center">
293
+ <h4 className="font-medium text-cs-text-primary capitalize">{category}</h4>
294
+ <div className="mt-2 space-y-1">
295
+ {Object.entries(status).map(([feature, enabled]) => (
296
+ <div key={feature} className="flex items-center justify-center gap-2">
297
+ <div className={`w-2 h-2 rounded-full ${enabled ? 'bg-cs-success' : 'bg-cs-border'}`} />
298
+ <span className="text-xs text-cs-text-secondary capitalize">{feature}</span>
299
+ </div>
300
+ ))}
301
+ </div>
302
+ </div>
303
+ ))}
304
+ </div>
305
+ </Card>
306
+ </div>
307
+ )}
308
+
309
+ {/* Semantic Types Section */}
310
+ {activeTab === 'semantic' && (
311
+ <div className="space-y-6">
312
+ <div className="text-center mb-6">
313
+ <h3 className="text-xl font-semibold mb-2">Semantic Input Types</h3>
314
+ <p className="text-cs-text-secondary">
315
+ Select an input type to see its configuration and test it
316
+ </p>
317
+ </div>
318
+
319
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
320
+ {semanticInputTypes.inputTypes.map((inputType) => (
321
+ <Card
322
+ key={inputType.id}
323
+ className={`p-4 cursor-pointer transition-all ${
324
+ semanticInputTypes.isTypeSelected(inputType.id)
325
+ ? 'ring-2 ring-cs-primary bg-cs-bg-secondary'
326
+ : 'hover:bg-cs-bg-secondary'
327
+ }`}
328
+ onClick={() => handleInputTypeSelect(inputType.id)}
329
+ >
330
+ <div className="text-center">
331
+ <div className="text-2xl mb-2">
332
+ {inputType.id === 'email' && '📧'}
333
+ {inputType.id === 'phone' && '📱'}
334
+ {inputType.id === 'creditCard' && '💳'}
335
+ {inputType.id === 'amount' && '💰'}
336
+ {inputType.id === 'password' && '🔒'}
337
+ {inputType.id === 'search' && '🔍'}
338
+ {inputType.id === 'url' && '🌐'}
339
+ {inputType.id === 'username' && '👤'}
340
+ {inputType.id === 'address' && '📍'}
341
+ {inputType.id === 'name' && '✏️'}
342
+ </div>
343
+ <h4 className="font-semibold text-cs-text-primary">{inputType.name}</h4>
344
+ <p className="text-sm text-cs-text-secondary mt-1">
345
+ {inputType.config.type} • {inputType.config.inputMode}
346
+ </p>
347
+ <div className="mt-3 space-y-1">
348
+ <div className="flex items-center justify-center gap-2">
349
+ <div className={`w-2 h-2 rounded-full ${inputType.mobileOptimized ? 'bg-cs-success' : 'bg-cs-border'}`} />
350
+ <span className="text-xs text-cs-text-secondary">Mobile</span>
351
+ </div>
352
+ <div className="flex items-center justify-center gap-2">
353
+ <div className={`w-2 h-2 rounded-full ${inputType.touchFriendly ? 'bg-cs-success' : 'bg-cs-border'}`} />
354
+ <span className="text-xs text-cs-text-secondary">Touch</span>
355
+ </div>
356
+ <div className="flex items-center justify-center gap-2">
357
+ <div className={`w-2 h-2 rounded-full ${inputType.accessibilityEnhanced ? 'bg-cs-success' : 'bg-cs-border'}`} />
358
+ <span className="text-xs text-cs-text-secondary">Accessible</span>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </Card>
363
+ ))}
364
+ </div>
365
+
366
+ {/* Selected Type Details */}
367
+ {semanticInputTypes.selectedType && (
368
+ <Card className="p-6">
369
+ <h4 className="text-lg font-semibold mb-4">
370
+ {semanticInputTypes.selectedType.name} Configuration
371
+ </h4>
372
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
373
+ <div>
374
+ <h5 className="font-medium text-cs-text-primary mb-2">Basic Properties</h5>
375
+ <div className="space-y-2 text-sm">
376
+ <div><span className="font-medium">Type:</span> {semanticInputTypes.selectedType.config.type}</div>
377
+ <div><span className="font-medium">Input Mode:</span> {semanticInputTypes.selectedType.config.inputMode}</div>
378
+ <div><span className="font-medium">Auto-capitalize:</span> {semanticInputTypes.selectedType.config.autoCapitalize}</div>
379
+ <div><span className="font-medium">Auto-complete:</span> {semanticInputTypes.selectedType.config.autoComplete}</div>
380
+ <div><span className="font-medium">Auto-correct:</span> {semanticInputTypes.selectedType.config.autoCorrect}</div>
381
+ <div><span className="font-medium">Spell Check:</span> {semanticInputTypes.selectedType.config.spellCheck ? 'Yes' : 'No'}</div>
382
+ </div>
383
+ </div>
384
+ <div>
385
+ <h5 className="font-medium text-cs-text-primary mb-2">Validation & Constraints</h5>
386
+ <div className="space-y-2 text-sm">
387
+ {semanticInputTypes.selectedType.config.pattern && (
388
+ <div><span className="font-medium">Pattern:</span> {semanticInputTypes.selectedType.config.pattern}</div>
389
+ )}
390
+ {semanticInputTypes.selectedType.config.minLength && (
391
+ <div><span className="font-medium">Min Length:</span> {semanticInputTypes.selectedType.config.minLength}</div>
392
+ )}
393
+ {semanticInputTypes.selectedType.config.maxLength && (
394
+ <div><span className="font-medium">Max Length:</span> {semanticInputTypes.selectedType.config.maxLength}</div>
395
+ )}
396
+ <div><span className="font-medium">Required:</span> {semanticInputTypes.selectedType.config.required ? 'Yes' : 'No'}</div>
397
+ <div><span className="font-medium">Placeholder:</span> {semanticInputTypes.selectedType.config.placeholder}</div>
398
+ </div>
399
+ </div>
400
+ </div>
401
+ </Card>
402
+ )}
403
+ </div>
404
+ )}
405
+
406
+ {/* Keyboard Optimization Section */}
407
+ {activeTab === 'keyboard' && (
408
+ <div className="space-y-6">
409
+ <div className="text-center mb-6">
410
+ <h3 className="text-xl font-semibold mb-2">Mobile Keyboard Optimization</h3>
411
+ <p className="text-cs-text-secondary">
412
+ Real-time keyboard state monitoring and optimization
413
+ </p>
414
+ </div>
415
+
416
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
417
+ {/* Keyboard State */}
418
+ <Card className="p-6">
419
+ <h4 className="text-lg font-semibold mb-4">Keyboard State</h4>
420
+ <div className="space-y-3">
421
+ <div className="flex justify-between">
422
+ <span className="text-cs-text-secondary">Visibility:</span>
423
+ <Badge variant={mobileKeyboard.keyboardState.isVisible ? 'default' : 'outline'}>
424
+ {mobileKeyboard.keyboardState.isVisible ? 'Visible' : 'Hidden'}
425
+ </Badge>
426
+ </div>
427
+ <div className="flex justify-between">
428
+ <span className="text-cs-text-secondary">Height:</span>
429
+ <span className="text-cs-text-primary">{mobileKeyboard.keyboardState.height}px</span>
430
+ </div>
431
+ <div className="flex justify-between">
432
+ <span className="text-cs-text-secondary">Platform:</span>
433
+ <span className="text-cs-text-primary capitalize">{mobileKeyboard.keyboardState.platform}</span>
434
+ </div>
435
+ <div className="flex justify-between">
436
+ <span className="text-cs-text-secondary">Orientation:</span>
437
+ <span className="text-cs-text-primary capitalize">{mobileKeyboard.keyboardState.orientation}</span>
438
+ </div>
439
+ <div className="flex justify-between">
440
+ <span className="text-cs-text-secondary">Language:</span>
441
+ <span className="text-cs-text-primary">{mobileKeyboard.keyboardState.language}</span>
442
+ </div>
443
+ </div>
444
+ </Card>
445
+
446
+ {/* Performance Metrics */}
447
+ <Card className="p-6">
448
+ <h4 className="text-lg font-semibold mb-4">Performance Metrics</h4>
449
+ <div className="space-y-3">
450
+ <div className="flex justify-between">
451
+ <span className="text-cs-text-secondary">Frame Rate:</span>
452
+ <span className="text-cs-text-primary">{mobileKeyboard.performanceMetrics.frameRate} FPS</span>
453
+ </div>
454
+ <div className="flex justify-between">
455
+ <span className="text-cs-text-secondary">Input Latency:</span>
456
+ <span className="text-cs-text-primary">{mobileKeyboard.performanceMetrics.inputLatency.toFixed(2)}ms</span>
457
+ </div>
458
+ <div className="flex justify-between">
459
+ <span className="text-cs-text-secondary">Response Time:</span>
460
+ <span className="text-cs-text-primary">{mobileKeyboard.performanceMetrics.keyboardResponseTime.toFixed(2)}ms</span>
461
+ </div>
462
+ <div className="flex justify-between">
463
+ <span className="text-cs-text-secondary">Memory Usage:</span>
464
+ <span className="text-cs-text-primary">{mobileKeyboard.performanceMetrics.memoryUsage.toFixed(2)}MB</span>
465
+ </div>
466
+ </div>
467
+ </Card>
468
+ </div>
469
+
470
+ {/* Optimizations */}
471
+ <Card className="p-6">
472
+ <h4 className="text-lg font-semibold mb-4">Applied Optimizations</h4>
473
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
474
+ {mobileKeyboard.optimizations.map((optimization) => (
475
+ <div key={optimization.id} className="p-3 border border-cs-border rounded-lg">
476
+ <div className="flex items-center gap-2 mb-2">
477
+ <Badge variant="outline" className="text-xs">
478
+ {optimization.type}
479
+ </Badge>
480
+ <Badge variant={optimization.impact === 'high' ? 'default' : optimization.impact === 'medium' ? 'secondary' : 'outline'}>
481
+ {optimization.impact}
482
+ </Badge>
483
+ </div>
484
+ <h5 className="font-medium text-cs-text-primary text-sm">{optimization.name}</h5>
485
+ <p className="text-xs text-cs-text-secondary mt-1">{optimization.description}</p>
486
+ </div>
487
+ ))}
488
+ </div>
489
+ </Card>
490
+
491
+ {/* Recommendations */}
492
+ <Card className="p-6">
493
+ <h4 className="text-lg font-semibold mb-4">Optimization Recommendations</h4>
494
+ <div className="space-y-2">
495
+ {mobileKeyboard.getOptimizationRecommendations().map((recommendation, index) => (
496
+ <div key={index} className="flex items-start gap-2 p-3 bg-cs-bg-secondary rounded-lg">
497
+ <div className="w-2 h-2 bg-cs-accent rounded-full mt-2 flex-shrink-0" />
498
+ <span className="text-sm text-cs-text-secondary">{recommendation}</span>
499
+ </div>
500
+ ))}
501
+ </div>
502
+ </Card>
503
+ </div>
504
+ )}
505
+
506
+ {/* Touch Behavior Section */}
507
+ {activeTab === 'touch' && (
508
+ <div className="space-y-6">
509
+ <div className="text-center mb-6">
510
+ <h3 className="text-xl font-semibold mb-2">Touch-Friendly Input Behavior</h3>
511
+ <p className="text-cs-text-secondary">
512
+ Touch interaction monitoring and optimization
513
+ </p>
514
+ </div>
515
+
516
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
517
+ {/* Touch State */}
518
+ <Card className="p-6">
519
+ <h4 className="text-lg font-semibold mb-4">Touch State</h4>
520
+ <div className="space-y-3">
521
+ <div className="flex justify-between">
522
+ <span className="text-cs-text-secondary">Status:</span>
523
+ <Badge variant={touchFriendly.touchState.isTouching ? 'default' : 'outline'}>
524
+ {touchFriendly.touchState.isTouching ? 'Touching' : 'Idle'}
525
+ </Badge>
526
+ </div>
527
+ <div className="flex justify-between">
528
+ <span className="text-cs-text-secondary">Touch Count:</span>
529
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchCount}</span>
530
+ </div>
531
+ <div className="flex justify-between">
532
+ <span className="text-cs-text-secondary">Duration:</span>
533
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchDuration.toFixed(0)}ms</span>
534
+ </div>
535
+ <div className="flex justify-between">
536
+ <span className="text-cs-text-secondary">Gesture:</span>
537
+ <span className="text-cs-text-primary capitalize">{touchFriendly.touchState.gestureType}</span>
538
+ </div>
539
+ <div className="flex justify-between">
540
+ <span className="text-cs-text-secondary">Velocity:</span>
541
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchVelocity.toFixed(2)}px/ms</span>
542
+ </div>
543
+ </div>
544
+ </Card>
545
+
546
+ {/* Touch Coordinates */}
547
+ <Card className="p-6">
548
+ <h4 className="text-lg font-semibold mb-4">Touch Coordinates</h4>
549
+ <div className="space-y-3">
550
+ <div className="flex justify-between">
551
+ <span className="text-cs-text-secondary">Start X:</span>
552
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchStartX}px</span>
553
+ </div>
554
+ <div className="flex justify-between">
555
+ <span className="text-cs-text-secondary">Start Y:</span>
556
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchStartY}px</span>
557
+ </div>
558
+ <div className="flex justify-between">
559
+ <span className="text-cs-text-secondary">Current X:</span>
560
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchCurrentX}px</span>
561
+ </div>
562
+ <div className="flex justify-between">
563
+ <span className="text-cs-text-secondary">Current Y:</span>
564
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchCurrentY}px</span>
565
+ </div>
566
+ <div className="flex justify-between">
567
+ <span className="text-cs-text-secondary">Delta X:</span>
568
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchDeltaX}px</span>
569
+ </div>
570
+ <div className="flex justify-between">
571
+ <span className="text-cs-text-secondary">Delta Y:</span>
572
+ <span className="text-cs-text-primary">{touchFriendly.touchState.touchDeltaY}px</span>
573
+ </div>
574
+ </div>
575
+ </Card>
576
+ </div>
577
+
578
+ {/* Touch Optimizations */}
579
+ <Card className="p-6">
580
+ <h4 className="text-lg font-semibold mb-4">Touch Optimizations</h4>
581
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
582
+ {touchFriendly.touchOptimizations.map((optimization) => (
583
+ <div key={optimization.id} className="p-3 border border-cs-border rounded-lg">
584
+ <div className="flex items-center gap-2 mb-2">
585
+ <Badge variant="outline" className="text-xs">
586
+ {optimization.type}
587
+ </Badge>
588
+ <Badge variant={optimization.impact === 'high' ? 'default' : optimization.impact === 'medium' ? 'secondary' : 'outline'}>
589
+ {optimization.impact}
590
+ </Badge>
591
+ </div>
592
+ <h5 className="font-medium text-cs-text-primary text-sm">{optimization.name}</h5>
593
+ <p className="text-xs text-cs-text-secondary mt-1">{optimization.description}</p>
594
+ {optimization.touchTargetSize && (
595
+ <p className="text-xs text-cs-accent mt-1">Target: {optimization.touchTargetSize}px</p>
596
+ )}
597
+ </div>
598
+ ))}
599
+ </div>
600
+ </Card>
601
+
602
+ {/* Touch Test Area */}
603
+ <Card className="p-6">
604
+ <h4 className="text-lg font-semibold mb-4">Touch Test Area</h4>
605
+ <p className="text-cs-text-secondary mb-4">
606
+ Touch this area to see touch events and gesture detection in action
607
+ </p>
608
+ <div
609
+ className="w-full h-32 bg-cs-bg-secondary border-2 border-dashed border-cs-border rounded-lg flex items-center justify-center cursor-pointer touch-manipulation"
610
+ onTouchStart={() => {}}
611
+ onTouchMove={() => {}}
612
+ onTouchEnd={() => {}}
613
+ >
614
+ <div className="text-center">
615
+ <div className="text-2xl mb-2">👆</div>
616
+ <p className="text-cs-text-secondary">Touch here to test</p>
617
+ <p className="text-xs text-cs-text-secondary mt-1">
618
+ Current gesture: {touchFriendly.touchState.gestureType}
619
+ </p>
620
+ </div>
621
+ </div>
622
+ </Card>
623
+ </div>
624
+ )}
625
+
626
+ {/* Performance Section */}
627
+ {activeTab === 'performance' && (
628
+ <div className="space-y-6">
629
+ <div className="text-center mb-6">
630
+ <h3 className="text-xl font-semibold mb-2">Input Performance Optimization</h3>
631
+ <p className="text-cs-text-secondary">
632
+ Real-time performance monitoring and optimization
633
+ </p>
634
+ </div>
635
+
636
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
637
+ {/* Performance Metrics */}
638
+ <Card className="p-6">
639
+ <h4 className="text-lg font-semibold mb-4">Performance Metrics</h4>
640
+ <div className="space-y-3">
641
+ <div className="flex justify-between">
642
+ <span className="text-cs-text-secondary">Frame Rate:</span>
643
+ <span className="text-cs-text-primary">{inputPerformance.performanceMetrics.frameRate} FPS</span>
644
+ </div>
645
+ <div className="flex justify-between">
646
+ <span className="text-cs-text-secondary">Input Latency:</span>
647
+ <span className="text-cs-text-primary">{inputPerformance.performanceMetrics.inputLatency.toFixed(2)}ms</span>
648
+ </div>
649
+ <div className="flex justify-between">
650
+ <span className="text-cs-text-secondary">Event Processing:</span>
651
+ <span className="text-cs-text-primary">{inputPerformance.performanceMetrics.eventProcessingTime.toFixed(2)}ms</span>
652
+ </div>
653
+ <div className="flex justify-between">
654
+ <span className="text-cs-text-secondary">Memory Usage:</span>
655
+ <span className="text-cs-text-primary">{inputPerformance.performanceMetrics.memoryUsage.toFixed(2)}MB</span>
656
+ </div>
657
+ <div className="flex justify-between">
658
+ <span className="text-cs-text-secondary">Battery Level:</span>
659
+ <span className="text-cs-text-primary">{(inputPerformance.performanceMetrics.batteryLevel * 100).toFixed(0)}%</span>
660
+ </div>
661
+ <div className="flex justify-between">
662
+ <span className="text-cs-text-secondary">Input Efficiency:</span>
663
+ <span className="text-cs-text-primary">{inputPerformance.performanceMetrics.inputEfficiency}%</span>
664
+ </div>
665
+ </div>
666
+ </Card>
667
+
668
+ {/* Performance Health */}
669
+ <Card className="p-6">
670
+ <h4 className="text-lg font-semibold mb-4">Performance Health</h4>
671
+ <div className="space-y-4">
672
+ <div className="text-center">
673
+ <div className="text-3xl font-bold text-cs-text-primary mb-2">
674
+ {inputPerformance.getPerformanceScore()}/100
675
+ </div>
676
+ <Badge
677
+ variant={
678
+ inputPerformance.performanceHealth === 'excellent' ? 'default' :
679
+ inputPerformance.performanceHealth === 'good' ? 'secondary' :
680
+ inputPerformance.performanceHealth === 'fair' ? 'outline' : 'destructive'
681
+ }
682
+ >
683
+ {inputPerformance.performanceHealth}
684
+ </Badge>
685
+ </div>
686
+ <div className="space-y-2">
687
+ <div className="flex items-center gap-2">
688
+ <div className={`w-3 h-3 rounded-full ${
689
+ inputPerformance.isPerformanceOptimal() ? 'bg-cs-success' : 'bg-cs-warning'
690
+ }`} />
691
+ <span className="text-sm text-cs-text-secondary">
692
+ Performance is {inputPerformance.isPerformanceOptimal() ? 'optimal' : 'suboptimal'}
693
+ </span>
694
+ </div>
695
+ </div>
696
+ </div>
697
+ </Card>
698
+ </div>
699
+
700
+ {/* Active Optimizations */}
701
+ <Card className="p-6">
702
+ <h4 className="text-lg font-semibold mb-4">Active Optimizations</h4>
703
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
704
+ {inputPerformance.activeOptimizations.map((optimization, index) => (
705
+ <div key={index} className="p-3 bg-cs-success/10 border border-cs-success/20 rounded-lg">
706
+ <div className="flex items-center gap-2">
707
+ <div className="w-2 h-2 bg-cs-success rounded-full" />
708
+ <span className="text-sm font-medium text-cs-success">{optimization}</span>
709
+ </div>
710
+ </div>
711
+ ))}
712
+ </div>
713
+ </Card>
714
+
715
+ {/* Recommendations */}
716
+ <Card className="p-6">
717
+ <h4 className="text-lg font-semibold mb-4">Performance Recommendations</h4>
718
+ <div className="space-y-2">
719
+ {inputPerformance.getOptimizationRecommendations().map((recommendation, index) => (
720
+ <div key={index} className="flex items-start gap-2 p-3 bg-cs-bg-secondary rounded-lg">
721
+ <div className="w-2 h-2 bg-cs-accent rounded-full mt-2 flex-shrink-0" />
722
+ <span className="text-sm text-cs-text-secondary">{recommendation}</span>
723
+ </div>
724
+ ))}
725
+ </div>
726
+ </Card>
727
+ </div>
728
+ )}
729
+
730
+ {/* Accessibility Section */}
731
+ {activeTab === 'accessibility' && (
732
+ <div className="space-y-6">
733
+ <div className="text-center mb-6">
734
+ <h3 className="text-xl font-semibold mb-2">Input Accessibility Support</h3>
735
+ <p className="text-cs-text-secondary">
736
+ Comprehensive accessibility features and monitoring
737
+ </p>
738
+ </div>
739
+
740
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
741
+ {/* Accessibility State */}
742
+ <Card className="p-6">
743
+ <h4 className="text-lg font-semibold mb-4">Accessibility State</h4>
744
+ <div className="space-y-3">
745
+ <div className="flex justify-between">
746
+ <span className="text-cs-text-secondary">High Contrast:</span>
747
+ <Badge variant={inputAccessibility.accessibilityState.isHighContrast ? 'default' : 'outline'}>
748
+ {inputAccessibility.accessibilityState.isHighContrast ? 'Active' : 'Inactive'}
749
+ </Badge>
750
+ </div>
751
+ <div className="flex justify-between">
752
+ <span className="text-cs-text-secondary">Reduced Motion:</span>
753
+ <Badge variant={inputAccessibility.accessibilityState.isReducedMotion ? 'default' : 'outline'}>
754
+ {inputAccessibility.accessibilityState.isReducedMotion ? 'Active' : 'Inactive'}
755
+ </Badge>
756
+ </div>
757
+ <div className="flex justify-between">
758
+ <span className="text-cs-text-secondary">Voice Control:</span>
759
+ <Badge variant={inputAccessibility.accessibilityState.isVoiceControl ? 'default' : 'outline'}>
760
+ {inputAccessibility.accessibilityState.isVoiceControl ? 'Active' : 'Inactive'}
761
+ </Badge>
762
+ </div>
763
+ <div className="flex justify-between">
764
+ <span className="text-cs-text-secondary">Keyboard Navigation:</span>
765
+ <Badge variant={inputAccessibility.accessibilityState.isKeyboardNavigating ? 'default' : 'outline'}>
766
+ {inputAccessibility.accessibilityState.isKeyboardNavigating ? 'Active' : 'Inactive'}
767
+ </Badge>
768
+ </div>
769
+ <div className="flex justify-between">
770
+ <span className="text-cs-text-secondary">Screen Reader:</span>
771
+ <Badge variant={inputAccessibility.accessibilityState.isScreenReaderActive ? 'default' : 'outline'}>
772
+ {inputAccessibility.accessibilityState.isScreenReaderActive ? 'Active' : 'Inactive'}
773
+ </Badge>
774
+ </div>
775
+ </div>
776
+ </Card>
777
+
778
+ {/* Accessibility Score */}
779
+ <Card className="p-6">
780
+ <h4 className="text-lg font-semibold mb-4">Accessibility Score</h4>
781
+ <div className="text-center">
782
+ <div className="text-3xl font-bold text-cs-text-primary mb-2">
783
+ {inputAccessibility.accessibilityState.accessibilityScore}/100
784
+ </div>
785
+ <Badge
786
+ variant={
787
+ inputAccessibility.accessibilityState.accessibilityScore >= 80 ? 'default' :
788
+ inputAccessibility.accessibilityState.accessibilityScore >= 60 ? 'secondary' :
789
+ inputAccessibility.accessibilityState.accessibilityScore >= 40 ? 'outline' : 'destructive'
790
+ }
791
+ >
792
+ {inputAccessibility.isAccessibilityOptimal() ? 'Optimal' : 'Needs Improvement'}
793
+ </Badge>
794
+ <div className="mt-4">
795
+ <div className="w-full bg-cs-border rounded-full h-2">
796
+ <div
797
+ className="bg-cs-primary h-2 rounded-full transition-all duration-300"
798
+ style={{ width: `${inputAccessibility.accessibilityState.accessibilityScore}%` }}
799
+ />
800
+ </div>
801
+ </div>
802
+ </div>
803
+ </Card>
804
+ </div>
805
+
806
+ {/* Accessibility Features */}
807
+ <Card className="p-6">
808
+ <h4 className="text-lg font-semibold mb-4">Accessibility Features</h4>
809
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
810
+ {inputAccessibility.accessibilityFeatures.map((feature) => (
811
+ <div key={feature.id} className="p-3 border border-cs-border rounded-lg">
812
+ <div className="flex items-center gap-2 mb-2">
813
+ <Badge variant="outline" className="text-xs">
814
+ {feature.type}
815
+ </Badge>
816
+ <Badge variant={feature.impact === 'high' ? 'default' : feature.impact === 'medium' ? 'secondary' : 'outline'}>
817
+ {feature.impact}
818
+ </Badge>
819
+ </div>
820
+ <h5 className="font-medium text-cs-text-primary text-sm">{feature.name}</h5>
821
+ <p className="text-xs text-cs-text-secondary mt-1">{feature.description}</p>
822
+ {feature.keyboardShortcut && (
823
+ <p className="text-xs text-cs-accent mt-1">{feature.keyboardShortcut}</p>
824
+ )}
825
+ <div className="mt-2">
826
+ <Badge variant={feature.enabled ? 'default' : 'outline'} className="text-xs">
827
+ {feature.enabled ? 'Enabled' : 'Disabled'}
828
+ </Badge>
829
+ </div>
830
+ </div>
831
+ ))}
832
+ </div>
833
+ </Card>
834
+
835
+ {/* Enhancements */}
836
+ <Card className="p-6">
837
+ <h4 className="text-lg font-semibold mb-4">Applied Enhancements</h4>
838
+ <div className="space-y-2">
839
+ {inputAccessibility.enhancements.map((enhancement, index) => (
840
+ <div key={index} className="flex items-start gap-2 p-3 bg-cs-success/10 border border-cs-success/20 rounded-lg">
841
+ <div className="w-2 h-2 bg-cs-success rounded-full mt-2 flex-shrink-0" />
842
+ <span className="text-sm text-cs-text-secondary">{enhancement}</span>
843
+ </div>
844
+ ))}
845
+ </div>
846
+ </Card>
847
+
848
+ {/* Recommendations */}
849
+ <Card className="p-6">
850
+ <h4 className="text-lg font-semibold mb-4">Accessibility Recommendations</h4>
851
+ <div className="space-y-2">
852
+ {inputAccessibility.getAccessibilityRecommendations().map((recommendation, index) => (
853
+ <div key={index} className="flex items-start gap-2 p-3 bg-cs-bg-secondary rounded-lg">
854
+ <div className="w-2 h-2 bg-cs-accent rounded-full mt-2 flex-shrink-0" />
855
+ <span className="text-sm text-cs-text-secondary">{recommendation}</span>
856
+ </div>
857
+ ))}
858
+ </div>
859
+ </Card>
860
+ </div>
861
+ )}
862
+
863
+ {/* Footer */}
864
+ <div className="text-center text-sm text-cs-text-secondary">
865
+ <p>Story 12: Semantic Input Type System & Mobile Keyboard Optimization</p>
866
+ <p className="mt-1">All features are automatically optimized and monitored in real-time</p>
867
+ </div>
868
+ </div>
869
+ )
870
+ }
871
+
872
+ export default SemanticInputSystemDemo
873
+