@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.8 โ 0.2.10
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.
- package/CHANGELOG.md +1 -1
- package/dist/components/ui/accessibility-demo.esm.js +30 -24
- package/dist/components/ui/accessibility-demo.js +30 -24
- package/dist/components/ui/advanced-component-architecture-demo.esm.js +235 -179
- package/dist/components/ui/advanced-component-architecture-demo.js +235 -179
- package/dist/components/ui/advanced-transition-system-demo.esm.js +110 -64
- package/dist/components/ui/advanced-transition-system-demo.js +110 -64
- package/dist/components/ui/advanced-transition-system.esm.js +166 -122
- package/dist/components/ui/advanced-transition-system.js +166 -122
- package/dist/components/ui/animation/animated-container.esm.js +52 -29
- package/dist/components/ui/animation/animated-container.js +52 -29
- package/dist/components/ui/animation/staggered-container.esm.js +18 -9
- package/dist/components/ui/animation/staggered-container.js +18 -9
- package/dist/components/ui/animation-demo.esm.js +67 -35
- package/dist/components/ui/animation-demo.js +67 -35
- package/dist/components/ui/badge.esm.js +9 -6
- package/dist/components/ui/badge.js +9 -6
- package/dist/components/ui/battery-conscious-animation-demo.esm.js +122 -87
- package/dist/components/ui/battery-conscious-animation-demo.js +122 -87
- package/dist/components/ui/border-radius-shadow-demo.esm.js +23 -12
- package/dist/components/ui/border-radius-shadow-demo.js +23 -12
- package/dist/components/ui/button.esm.js +8 -2
- package/dist/components/ui/button.js +8 -2
- package/dist/components/ui/card.esm.js +33 -8
- package/dist/components/ui/card.js +33 -8
- package/dist/components/ui/checkbox.esm.js +3 -3
- package/dist/components/ui/checkbox.js +3 -3
- package/dist/components/ui/color-preview.esm.js +68 -45
- package/dist/components/ui/color-preview.js +68 -45
- package/dist/components/ui/data-display/chart.esm.js +112 -84
- package/dist/components/ui/data-display/chart.js +112 -84
- package/dist/components/ui/data-display/data-grid-simple.esm.js +1 -1
- package/dist/components/ui/data-display/data-grid-simple.js +1 -1
- package/dist/components/ui/data-display/data-grid.esm.js +80 -67
- package/dist/components/ui/data-display/data-grid.js +80 -67
- package/dist/components/ui/data-display/list.esm.js +53 -45
- package/dist/components/ui/data-display/list.js +53 -45
- package/dist/components/ui/data-display/table.esm.js +62 -54
- package/dist/components/ui/data-display/table.js +62 -54
- package/dist/components/ui/data-display/timeline.esm.js +39 -34
- package/dist/components/ui/data-display/timeline.js +39 -34
- package/dist/components/ui/data-display/tree.esm.js +116 -84
- package/dist/components/ui/data-display/tree.js +116 -84
- package/dist/components/ui/data-display/types.esm.js +389 -364
- package/dist/components/ui/data-display/types.js +389 -364
- package/dist/components/ui/enterprise-mobile-experience-demo.esm.js +120 -70
- package/dist/components/ui/enterprise-mobile-experience-demo.js +120 -70
- package/dist/components/ui/enterprise-mobile-experience.esm.js +124 -73
- package/dist/components/ui/enterprise-mobile-experience.js +124 -73
- package/dist/components/ui/feedback/alert.esm.js +22 -15
- package/dist/components/ui/feedback/alert.js +22 -15
- package/dist/components/ui/feedback/progress.esm.js +47 -24
- package/dist/components/ui/feedback/progress.js +47 -24
- package/dist/components/ui/feedback/skeleton.esm.js +39 -29
- package/dist/components/ui/feedback/skeleton.js +39 -29
- package/dist/components/ui/feedback/toast.esm.js +62 -38
- package/dist/components/ui/feedback/toast.js +62 -38
- package/dist/components/ui/feedback/types.esm.js +83 -83
- package/dist/components/ui/feedback/types.js +83 -83
- package/dist/components/ui/font-preview.esm.js +41 -39
- package/dist/components/ui/font-preview.js +41 -39
- package/dist/components/ui/form-demo.esm.js +150 -113
- package/dist/components/ui/form-demo.js +150 -113
- package/dist/components/ui/hardware-acceleration-demo.esm.js +137 -87
- package/dist/components/ui/hardware-acceleration-demo.js +137 -87
- package/dist/components/ui/input.esm.js +4 -1
- package/dist/components/ui/input.js +4 -1
- package/dist/components/ui/layout-demo.esm.js +81 -56
- package/dist/components/ui/layout-demo.js +81 -56
- package/dist/components/ui/layouts/adaptive-layout.esm.js +27 -8
- package/dist/components/ui/layouts/adaptive-layout.js +27 -8
- package/dist/components/ui/layouts/desktop-layout.esm.js +39 -19
- package/dist/components/ui/layouts/desktop-layout.js +39 -19
- package/dist/components/ui/layouts/mobile-layout.esm.js +19 -9
- package/dist/components/ui/layouts/mobile-layout.js +19 -9
- package/dist/components/ui/layouts/tablet-layout.esm.js +28 -14
- package/dist/components/ui/layouts/tablet-layout.js +28 -14
- package/dist/components/ui/mobile-form-validation.esm.js +120 -87
- package/dist/components/ui/mobile-form-validation.js +120 -87
- package/dist/components/ui/mobile-input-demo.esm.js +19 -13
- package/dist/components/ui/mobile-input-demo.js +19 -13
- package/dist/components/ui/mobile-input.esm.js +185 -120
- package/dist/components/ui/mobile-input.js +185 -120
- package/dist/components/ui/mobile-skeleton-loading-demo.esm.js +128 -111
- package/dist/components/ui/mobile-skeleton-loading-demo.js +128 -111
- package/dist/components/ui/navigation/breadcrumb.esm.js +17 -14
- package/dist/components/ui/navigation/breadcrumb.js +17 -14
- package/dist/components/ui/navigation/index.esm.js +23 -1
- package/dist/components/ui/navigation/index.js +23 -1
- package/dist/components/ui/navigation/menu.esm.js +49 -35
- package/dist/components/ui/navigation/menu.js +49 -35
- package/dist/components/ui/navigation/navigation-demo.esm.js +81 -74
- package/dist/components/ui/navigation/navigation-demo.js +81 -74
- package/dist/components/ui/navigation/pagination.esm.js +62 -50
- package/dist/components/ui/navigation/pagination.js +62 -50
- package/dist/components/ui/navigation/sidebar.esm.js +56 -42
- package/dist/components/ui/navigation/sidebar.js +56 -42
- package/dist/components/ui/navigation/stepper.esm.js +34 -23
- package/dist/components/ui/navigation/stepper.js +34 -23
- package/dist/components/ui/navigation/tabs.esm.js +32 -21
- package/dist/components/ui/navigation/tabs.js +32 -21
- package/dist/components/ui/navigation/types.esm.js +196 -195
- package/dist/components/ui/navigation/types.js +196 -195
- package/dist/components/ui/overlay/backdrop.esm.js +17 -16
- package/dist/components/ui/overlay/backdrop.js +17 -16
- package/dist/components/ui/overlay/focus-manager.esm.js +21 -19
- package/dist/components/ui/overlay/focus-manager.js +21 -19
- package/dist/components/ui/overlay/index.esm.js +22 -2
- package/dist/components/ui/overlay/index.js +22 -2
- package/dist/components/ui/overlay/modal.esm.js +38 -34
- package/dist/components/ui/overlay/modal.js +38 -34
- package/dist/components/ui/overlay/overlay-manager.esm.js +25 -20
- package/dist/components/ui/overlay/overlay-manager.js +25 -20
- package/dist/components/ui/overlay/popover.esm.js +74 -58
- package/dist/components/ui/overlay/popover.js +74 -58
- package/dist/components/ui/overlay/portal.esm.js +7 -7
- package/dist/components/ui/overlay/portal.js +7 -7
- package/dist/components/ui/overlay/tooltip.esm.js +54 -39
- package/dist/components/ui/overlay/tooltip.js +54 -39
- package/dist/components/ui/overlay/types.esm.js +132 -131
- package/dist/components/ui/overlay/types.js +132 -131
- package/dist/components/ui/performance-demo.esm.js +135 -88
- package/dist/components/ui/performance-demo.js +135 -88
- package/dist/components/ui/semantic-input-system-demo.esm.js +117 -80
- package/dist/components/ui/semantic-input-system-demo.js +117 -80
- package/dist/components/ui/theme-customizer.esm.js +84 -52
- package/dist/components/ui/theme-customizer.js +84 -52
- package/dist/components/ui/theme-preview.esm.js +95 -43
- package/dist/components/ui/theme-preview.js +95 -43
- package/dist/components/ui/theme-switcher.esm.js +70 -44
- package/dist/components/ui/theme-switcher.js +70 -44
- package/dist/components/ui/theme-toggle.esm.js +3 -3
- package/dist/components/ui/theme-toggle.js +3 -3
- package/dist/components/ui/token-demo.esm.js +33 -21
- package/dist/components/ui/token-demo.js +33 -21
- package/dist/components/ui/touch-demo.esm.js +102 -73
- package/dist/components/ui/touch-demo.js +102 -73
- package/dist/components/ui/touch-friendly-interface-demo.esm.js +102 -64
- package/dist/components/ui/touch-friendly-interface-demo.js +102 -64
- package/dist/components/ui/touch-friendly-interface.esm.js +85 -61
- package/dist/components/ui/touch-friendly-interface.js +85 -61
- package/dist/hooks/use-accessibility-support.esm.js +115 -85
- package/dist/hooks/use-accessibility-support.js +115 -85
- package/dist/hooks/use-adaptive-layout.esm.js +56 -33
- package/dist/hooks/use-adaptive-layout.js +56 -33
- package/dist/hooks/use-advanced-patterns.esm.js +57 -42
- package/dist/hooks/use-advanced-patterns.js +57 -42
- package/dist/hooks/use-advanced-transition-system.esm.js +112 -71
- package/dist/hooks/use-advanced-transition-system.js +112 -71
- package/dist/hooks/use-animation-profile.esm.js +63 -34
- package/dist/hooks/use-animation-profile.js +63 -34
- package/dist/hooks/use-battery-animations.esm.js +80 -55
- package/dist/hooks/use-battery-animations.js +80 -55
- package/dist/hooks/use-battery-conscious-loading.esm.js +166 -123
- package/dist/hooks/use-battery-conscious-loading.js +166 -123
- package/dist/hooks/use-battery-optimization.esm.js +78 -55
- package/dist/hooks/use-battery-optimization.js +78 -55
- package/dist/hooks/use-battery-status.esm.js +73 -51
- package/dist/hooks/use-battery-status.js +73 -51
- package/dist/hooks/use-component-performance.esm.js +62 -47
- package/dist/hooks/use-component-performance.js +62 -47
- package/dist/hooks/use-device-loading-states.esm.js +152 -109
- package/dist/hooks/use-device-loading-states.js +152 -109
- package/dist/hooks/use-device.esm.js +25 -14
- package/dist/hooks/use-device.js +25 -14
- package/dist/hooks/use-enterprise-mobile-experience.esm.js +137 -88
- package/dist/hooks/use-enterprise-mobile-experience.js +137 -88
- package/dist/hooks/use-form-feedback.esm.js +124 -81
- package/dist/hooks/use-form-feedback.js +124 -81
- package/dist/hooks/use-form-performance.esm.js +127 -92
- package/dist/hooks/use-form-performance.js +127 -92
- package/dist/hooks/use-frame-rate.esm.js +56 -37
- package/dist/hooks/use-frame-rate.js +56 -37
- package/dist/hooks/use-gestures.esm.js +96 -72
- package/dist/hooks/use-gestures.js +96 -72
- package/dist/hooks/use-hardware-acceleration.esm.js +65 -37
- package/dist/hooks/use-hardware-acceleration.js +65 -37
- package/dist/hooks/use-input-accessibility.esm.js +157 -119
- package/dist/hooks/use-input-accessibility.js +157 -119
- package/dist/hooks/use-input-performance.esm.js +139 -104
- package/dist/hooks/use-input-performance.js +139 -104
- package/dist/hooks/use-layout-performance.esm.js +50 -29
- package/dist/hooks/use-layout-performance.js +50 -29
- package/dist/hooks/use-loading-accessibility.esm.js +209 -169
- package/dist/hooks/use-loading-accessibility.js +209 -169
- package/dist/hooks/use-loading-performance.esm.js +117 -93
- package/dist/hooks/use-loading-performance.js +117 -93
- package/dist/hooks/use-memory-usage.esm.js +57 -38
- package/dist/hooks/use-memory-usage.js +57 -38
- package/dist/hooks/use-mobile-form-layout.esm.js +111 -74
- package/dist/hooks/use-mobile-form-layout.js +111 -74
- package/dist/hooks/use-mobile-form-validation.esm.js +211 -144
- package/dist/hooks/use-mobile-form-validation.js +211 -144
- package/dist/hooks/use-mobile-keyboard-optimization.esm.js +154 -113
- package/dist/hooks/use-mobile-keyboard-optimization.js +154 -113
- package/dist/hooks/use-mobile-layout.esm.js +73 -51
- package/dist/hooks/use-mobile-layout.js +73 -51
- package/dist/hooks/use-mobile-optimization.esm.js +72 -44
- package/dist/hooks/use-mobile-optimization.js +72 -44
- package/dist/hooks/use-mobile-skeleton.esm.js +97 -64
- package/dist/hooks/use-mobile-skeleton.js +97 -64
- package/dist/hooks/use-mobile-touch.esm.js +128 -93
- package/dist/hooks/use-mobile-touch.js +128 -93
- package/dist/hooks/use-performance-throttling.esm.js +72 -48
- package/dist/hooks/use-performance-throttling.js +72 -48
- package/dist/hooks/use-performance.esm.js +90 -52
- package/dist/hooks/use-performance.js +90 -52
- package/dist/hooks/use-reusable-architecture.esm.js +94 -65
- package/dist/hooks/use-reusable-architecture.js +94 -65
- package/dist/hooks/use-semantic-input-types.esm.js +166 -124
- package/dist/hooks/use-semantic-input-types.js +166 -124
- package/dist/hooks/use-semantic-input.esm.js +178 -126
- package/dist/hooks/use-semantic-input.js +178 -126
- package/dist/hooks/use-tablet-layout.esm.js +67 -38
- package/dist/hooks/use-tablet-layout.js +67 -38
- package/dist/hooks/use-touch-friendly-input.esm.js +193 -149
- package/dist/hooks/use-touch-friendly-input.js +193 -149
- package/dist/hooks/use-touch-friendly-interface.esm.js +99 -67
- package/dist/hooks/use-touch-friendly-interface.js +99 -67
- package/dist/hooks/use-touch-optimization.esm.js +99 -72
- package/dist/hooks/use-touch-optimization.js +99 -72
- package/dist/index.esm.js +289 -280
- package/dist/index.js +289 -280
- package/dist/lib/utils.esm.js +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/plugins/theme-css-generator.esm.js +104 -55
- package/dist/plugins/theme-css-generator.js +104 -55
- package/dist/provider.esm.js +4 -4
- package/dist/provider.js +4 -4
- package/dist/styles.css +1 -1
- package/dist/theme.esm.js +633 -468
- package/dist/theme.js +633 -468
- package/dist/themes/ThemeContext.esm.js +15 -15
- package/dist/themes/ThemeContext.js +15 -15
- package/dist/themes/ThemeProvider.esm.js +25 -22
- package/dist/themes/ThemeProvider.js +25 -22
- package/dist/themes/accessibility.esm.js +147 -108
- package/dist/themes/accessibility.js +147 -108
- package/dist/themes/aria-patterns.esm.js +198 -162
- package/dist/themes/aria-patterns.js +198 -162
- package/dist/themes/base-themes.esm.js +14 -11
- package/dist/themes/base-themes.js +14 -11
- package/dist/themes/colorManager.esm.js +101 -83
- package/dist/themes/colorManager.js +101 -83
- package/dist/themes/examples/dark-theme.esm.js +133 -103
- package/dist/themes/examples/dark-theme.js +133 -103
- package/dist/themes/examples/minimal-theme.esm.js +83 -61
- package/dist/themes/examples/minimal-theme.js +83 -61
- package/dist/themes/focus-management.esm.js +202 -143
- package/dist/themes/focus-management.js +202 -143
- package/dist/themes/fontLoader.esm.js +28 -19
- package/dist/themes/fontLoader.js +28 -19
- package/dist/themes/high-contrast.esm.js +152 -104
- package/dist/themes/high-contrast.js +152 -104
- package/dist/themes/inheritance.esm.js +35 -27
- package/dist/themes/inheritance.js +35 -27
- package/dist/themes/keyboard-navigation.esm.js +152 -123
- package/dist/themes/keyboard-navigation.js +152 -123
- package/dist/themes/motion-reduction.esm.js +193 -133
- package/dist/themes/motion-reduction.js +193 -133
- package/dist/themes/navigation.esm.js +146 -146
- package/dist/themes/navigation.js +146 -146
- package/dist/themes/screen-reader.esm.js +159 -94
- package/dist/themes/screen-reader.js +159 -94
- package/dist/themes/systemThemeDetector.esm.js +42 -34
- package/dist/themes/systemThemeDetector.js +42 -34
- package/dist/themes/themeCSSUpdater.esm.js +21 -9
- package/dist/themes/themeCSSUpdater.js +21 -9
- package/dist/themes/themePersistence.esm.js +68 -47
- package/dist/themes/themePersistence.js +68 -47
- package/dist/themes/themes/stan-design.esm.js +633 -468
- package/dist/themes/themes/stan-design.js +633 -468
- package/dist/themes/types.esm.js +301 -287
- package/dist/themes/types.js +301 -287
- package/dist/themes/useSystemTheme.esm.js +4 -4
- package/dist/themes/useSystemTheme.js +4 -4
- package/dist/themes/useTheme.esm.js +4 -4
- package/dist/themes/useTheme.js +4 -4
- package/dist/themes/validation.esm.js +128 -77
- package/dist/themes/validation.js +128 -77
- package/dist/tokens/index.esm.js +15 -4
- package/dist/tokens/index.js +15 -4
- package/dist/tokens/tokenExporter.esm.js +87 -61
- package/dist/tokens/tokenExporter.js +87 -61
- package/dist/tokens/tokenGenerator.esm.js +86 -77
- package/dist/tokens/tokenGenerator.js +86 -77
- package/dist/tokens/tokenManager.esm.js +64 -51
- package/dist/tokens/tokenManager.js +64 -51
- package/dist/tokens/tokenValidator.esm.js +193 -147
- package/dist/tokens/tokenValidator.js +193 -147
- package/dist/tokens/types.esm.js +49 -35
- package/dist/tokens/types.js +49 -35
- package/dist/utils/bundle-analyzer.esm.js +83 -65
- package/dist/utils/bundle-analyzer.js +83 -65
- package/dist/utils/bundle-splitting.esm.js +142 -117
- package/dist/utils/bundle-splitting.js +142 -117
- package/dist/utils/lazy-loading.esm.js +132 -106
- package/dist/utils/lazy-loading.js +132 -106
- package/dist/utils/performance-monitor.esm.js +170 -129
- package/dist/utils/performance-monitor.js +170 -129
- package/dist/utils/tree-shaking.esm.js +69 -61
- package/dist/utils/tree-shaking.js +69 -61
- package/package.json +1 -1
- package/src/index.ts +146 -146
|
@@ -8,39 +8,41 @@ import {
|
|
|
8
8
|
AdvancedTransitionList
|
|
9
9
|
} from './advanced-transition-system'
|
|
10
10
|
|
|
11
|
-
export const AdvancedTransitionSystemDemo= () => {
|
|
11
|
+
export const AdvancedTransitionSystemDemo: React.FC = () => {
|
|
12
12
|
const [activeDemo, setActiveDemo] = useState<'transitions' | 'performance' | 'device' | 'accessibility'>('transitions')
|
|
13
13
|
const [formData, setFormData] = useState({
|
|
14
|
-
name,
|
|
15
|
-
email,
|
|
16
|
-
message
|
|
14
|
+
name: '',
|
|
15
|
+
email: '',
|
|
16
|
+
message: ''
|
|
17
|
+
})
|
|
17
18
|
|
|
18
19
|
const { transitionState, performanceMetrics, isOptimizing, optimizations } = useAdvancedTransitionSystem({
|
|
19
|
-
duration,
|
|
20
|
-
easing,
|
|
21
|
-
performance,
|
|
22
|
-
deviceOptimization,
|
|
23
|
-
accessibility,
|
|
24
|
-
batteryAware
|
|
25
|
-
|
|
26
|
-
|
|
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)
|
|
27
29
|
},
|
|
28
|
-
onTransitionComplete) => {
|
|
29
|
-
console.log('Transition completed in, duration, 'ms')
|
|
30
|
+
onTransitionComplete: (duration) => {
|
|
31
|
+
console.log('Transition completed in:', duration, 'ms')
|
|
30
32
|
},
|
|
31
|
-
onPerformanceOptimized) => {
|
|
32
|
-
console.log('Performance optimized, metrics)
|
|
33
|
+
onPerformanceOptimized: (metrics) => {
|
|
34
|
+
console.log('Performance optimized:', metrics)
|
|
33
35
|
},
|
|
34
|
-
onDeviceOptimized) => {
|
|
35
|
-
console.log('Device optimized for, deviceType)
|
|
36
|
+
onDeviceOptimized: (deviceType) => {
|
|
37
|
+
console.log('Device optimized for:', deviceType)
|
|
36
38
|
},
|
|
37
|
-
onAccessibilityEnhanced) => {
|
|
38
|
-
console.log('Accessibility enhanced, feature)
|
|
39
|
+
onAccessibilityEnhanced: (feature) => {
|
|
40
|
+
console.log('Accessibility enhanced:', feature)
|
|
39
41
|
}
|
|
40
42
|
})
|
|
41
43
|
|
|
42
|
-
const handleInputChange = (field, value) => {
|
|
43
|
-
setFormData(prev => ({ ...prev, [field]}))
|
|
44
|
+
const handleInputChange = (field: string, value: string) => {
|
|
45
|
+
setFormData(prev => ({ ...prev, [field]: value }))
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
const renderTransitionsDemo = () => (
|
|
@@ -49,7 +51,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
49
51
|
<div className="space-y-6">
|
|
50
52
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐จ Cubic Bezier Curves</h3>
|
|
51
53
|
|
|
52
|
-
<div className="grid grid-cols-1 md
|
|
54
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
55
|
+
<div className="space-y-4">
|
|
53
56
|
<h4 className="font-medium text-cs-text-primary">Standard Easing</h4>
|
|
54
57
|
|
|
55
58
|
<div className="space-y-3">
|
|
@@ -121,7 +124,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
121
124
|
<div className="space-y-6">
|
|
122
125
|
<h3 className="text-lg font-semibold text-cs-text-primary">โฑ๏ธ Transition Durations</h3>
|
|
123
126
|
|
|
124
|
-
<div className="grid grid-cols-1 md
|
|
127
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
128
|
+
<div className="space-y-4">
|
|
125
129
|
<h4 className="font-medium text-cs-text-primary">Fast Transitions</h4>
|
|
126
130
|
|
|
127
131
|
<div className="space-y-3">
|
|
@@ -193,7 +197,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
193
197
|
<div className="space-y-6">
|
|
194
198
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐ญ Interactive Components</h3>
|
|
195
199
|
|
|
196
|
-
<div className="grid grid-cols-1 md
|
|
200
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
201
|
+
<div className="space-y-4">
|
|
197
202
|
<h4 className="font-medium text-cs-text-primary">Interactive Cards</h4>
|
|
198
203
|
|
|
199
204
|
<div className="space-y-3">
|
|
@@ -277,7 +282,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
277
282
|
const renderPerformanceDemo = () => (
|
|
278
283
|
<div className="space-y-6">
|
|
279
284
|
{/* Performance Metrics */}
|
|
280
|
-
<div className="grid grid-cols-1 md
|
|
285
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
286
|
+
<div className="space-y-4">
|
|
281
287
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐ Performance Metrics</h3>
|
|
282
288
|
|
|
283
289
|
<div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
|
|
@@ -285,7 +291,9 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
285
291
|
<div className="flex justify-between items-center">
|
|
286
292
|
<span className="text-sm font-medium">Frame Rate</span>
|
|
287
293
|
<span className={`text-lg font-bold ${
|
|
288
|
-
performanceMetrics.frameRate >= 55 ? 'text-cs-success'
|
|
294
|
+
performanceMetrics.frameRate >= 55 ? 'text-cs-success' :
|
|
295
|
+
performanceMetrics.frameRate >= 45 ? 'text-cs-warning' : 'text-cs-error'
|
|
296
|
+
}`}>
|
|
289
297
|
{performanceMetrics.frameRate} FPS
|
|
290
298
|
</span>
|
|
291
299
|
</div>
|
|
@@ -293,8 +301,10 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
293
301
|
<div className="w-full bg-cs-border rounded-full h-2">
|
|
294
302
|
<div
|
|
295
303
|
className={`h-2 rounded-full transition-all duration-300 ${
|
|
296
|
-
performanceMetrics.frameRate >= 55 ? 'bg-cs-success'
|
|
297
|
-
|
|
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}%` }}
|
|
298
308
|
/>
|
|
299
309
|
</div>
|
|
300
310
|
|
|
@@ -306,7 +316,9 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
306
316
|
<div className="flex justify-between items-center">
|
|
307
317
|
<span className="text-sm font-medium">Smoothness</span>
|
|
308
318
|
<span className={`font-medium ${
|
|
309
|
-
performanceMetrics.smoothness >= 80 ? 'text-cs-success'
|
|
319
|
+
performanceMetrics.smoothness >= 80 ? 'text-cs-success' :
|
|
320
|
+
performanceMetrics.smoothness >= 60 ? 'text-cs-warning' : 'text-cs-error'
|
|
321
|
+
}`}>
|
|
310
322
|
{performanceMetrics.smoothness}%
|
|
311
323
|
</span>
|
|
312
324
|
</div>
|
|
@@ -314,7 +326,9 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
314
326
|
<div className="flex justify-between items-center">
|
|
315
327
|
<span className="text-sm font-medium">Battery Impact</span>
|
|
316
328
|
<span className={`font-medium ${
|
|
317
|
-
performanceMetrics.batteryImpact >= 80 ? 'text-cs-success'
|
|
329
|
+
performanceMetrics.batteryImpact >= 80 ? 'text-cs-success' :
|
|
330
|
+
performanceMetrics.batteryImpact >= 60 ? 'text-cs-warning' : 'text-cs-error'
|
|
331
|
+
}`}>
|
|
318
332
|
{performanceMetrics.batteryImpact}%
|
|
319
333
|
</span>
|
|
320
334
|
</div>
|
|
@@ -328,20 +342,25 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
328
342
|
<div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
|
|
329
343
|
<div className="text-center space-y-3">
|
|
330
344
|
<div className={`text-4xl font-bold ${
|
|
331
|
-
transitionState.performanceScore >= 80 ? 'text-cs-success'
|
|
345
|
+
transitionState.performanceScore >= 80 ? 'text-cs-success' :
|
|
346
|
+
transitionState.performanceScore >= 60 ? 'text-cs-warning' : 'text-cs-error'
|
|
347
|
+
}`}>
|
|
332
348
|
{transitionState.performanceScore}/100
|
|
333
349
|
</div>
|
|
334
350
|
|
|
335
351
|
<div className="w-full bg-cs-border rounded-full h-3">
|
|
336
352
|
<div
|
|
337
353
|
className={`h-3 rounded-full transition-all duration-300 ${
|
|
338
|
-
transitionState.performanceScore >= 80 ? 'bg-cs-success'
|
|
339
|
-
|
|
354
|
+
transitionState.performanceScore >= 80 ? 'bg-cs-success' :
|
|
355
|
+
transitionState.performanceScore >= 60 ? 'bg-cs-warning' : 'bg-cs-error'
|
|
356
|
+
}`}
|
|
357
|
+
style={{ width: `${transitionState.performanceScore}%` }}
|
|
340
358
|
/>
|
|
341
359
|
</div>
|
|
342
360
|
|
|
343
361
|
<div className="text-sm text-cs-text-secondary">
|
|
344
|
-
{transitionState.performanceScore >= 80 ? 'Excellent Performance'
|
|
362
|
+
{transitionState.performanceScore >= 80 ? 'Excellent Performance' :
|
|
363
|
+
transitionState.performanceScore >= 60 ? 'Good Performance' : 'Needs Optimization'}
|
|
345
364
|
</div>
|
|
346
365
|
</div>
|
|
347
366
|
</div>
|
|
@@ -352,7 +371,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
352
371
|
<div className="space-y-4">
|
|
353
372
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐ Hardware Acceleration</h3>
|
|
354
373
|
|
|
355
|
-
<div className="grid grid-cols-1 md
|
|
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">
|
|
356
376
|
<div className="text-2xl mb-2">โก</div>
|
|
357
377
|
<div className="font-medium">GPU Acceleration</div>
|
|
358
378
|
<div className="text-sm text-cs-text-secondary">Hardware-accelerated transforms</div>
|
|
@@ -377,7 +397,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
377
397
|
const renderDeviceDemo = () => (
|
|
378
398
|
<div className="space-y-6">
|
|
379
399
|
{/* Device Detection */}
|
|
380
|
-
<div className="grid grid-cols-1 md
|
|
400
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
401
|
+
<div className="space-y-4">
|
|
381
402
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐ฑ Device Detection</h3>
|
|
382
403
|
|
|
383
404
|
<div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
|
|
@@ -393,7 +414,9 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
393
414
|
<span className="text-sm font-medium">Battery Level</span>
|
|
394
415
|
<Badge
|
|
395
416
|
variant={
|
|
396
|
-
transitionState.batteryLevel === 'normal' ? 'default'
|
|
417
|
+
transitionState.batteryLevel === 'normal' ? 'default' :
|
|
418
|
+
transitionState.batteryLevel === 'low' ? 'secondary' : 'outline'
|
|
419
|
+
}
|
|
397
420
|
className="capitalize"
|
|
398
421
|
>
|
|
399
422
|
{transitionState.batteryLevel}
|
|
@@ -402,8 +425,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
402
425
|
|
|
403
426
|
<div className="flex justify-between items-center">
|
|
404
427
|
<span className="text-sm font-medium">Reduced Motion</span>
|
|
405
|
-
<Badge variant={transitionState.reducedMotion ? 'outline' }>
|
|
406
|
-
{transitionState.reducedMotion ? 'Enabled' }
|
|
428
|
+
<Badge variant={transitionState.reducedMotion ? 'outline' : 'default'}>
|
|
429
|
+
{transitionState.reducedMotion ? 'Enabled' : 'Disabled'}
|
|
407
430
|
</Badge>
|
|
408
431
|
</div>
|
|
409
432
|
</div>
|
|
@@ -419,7 +442,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
419
442
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-cs-primary mx-auto mb-2"></div>
|
|
420
443
|
<div className="text-sm text-cs-text-secondary">Optimizing for device...</div>
|
|
421
444
|
</div>
|
|
422
|
-
)
|
|
445
|
+
) : optimizations.length > 0 ? (
|
|
446
|
+
<div className="space-y-2">
|
|
423
447
|
{optimizations.map((optimization, index) => (
|
|
424
448
|
<div key={index} className="flex items-center space-x-2 text-sm">
|
|
425
449
|
<span className="text-cs-success">โ
</span>
|
|
@@ -427,7 +451,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
427
451
|
</div>
|
|
428
452
|
))}
|
|
429
453
|
</div>
|
|
430
|
-
)
|
|
454
|
+
) : (
|
|
455
|
+
<div className="text-center py-4 text-cs-text-secondary">
|
|
431
456
|
No optimizations applied yet
|
|
432
457
|
</div>
|
|
433
458
|
)}
|
|
@@ -439,24 +464,26 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
439
464
|
<div className="space-y-4">
|
|
440
465
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐ฏ Device-Specific Transitions</h3>
|
|
441
466
|
|
|
442
|
-
<div className="grid grid-cols-1 md
|
|
467
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
468
|
+
<AdvancedTransitionCard
|
|
469
|
+
duration={transitionState.deviceType === 'mobile' ? 200 : 300}
|
|
443
470
|
easing="ease-out"
|
|
444
471
|
className="text-center"
|
|
445
472
|
>
|
|
446
473
|
<div className="text-lg font-semibold">Mobile Optimized</div>
|
|
447
474
|
<div className="text-sm text-cs-text-secondary">
|
|
448
|
-
Duration=== 'mobile' ? '200ms' }
|
|
475
|
+
Duration: {transitionState.deviceType === 'mobile' ? '200ms' : '300ms'}
|
|
449
476
|
</div>
|
|
450
477
|
</AdvancedTransitionCard>
|
|
451
478
|
|
|
452
479
|
<AdvancedTransitionCard
|
|
453
|
-
duration={transitionState.deviceType === 'tablet' ? 250 }
|
|
480
|
+
duration={transitionState.deviceType === 'tablet' ? 250 : 300}
|
|
454
481
|
easing="ease-out"
|
|
455
482
|
className="text-center"
|
|
456
483
|
>
|
|
457
484
|
<div className="text-lg font-semibold">Tablet Optimized</div>
|
|
458
485
|
<div className="text-sm text-cs-text-secondary">
|
|
459
|
-
Duration=== 'tablet' ? '250ms' }
|
|
486
|
+
Duration: {transitionState.deviceType === 'tablet' ? '250ms' : '300ms'}
|
|
460
487
|
</div>
|
|
461
488
|
</AdvancedTransitionCard>
|
|
462
489
|
|
|
@@ -467,20 +494,27 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
467
494
|
>
|
|
468
495
|
<div className="text-lg font-semibold">Desktop Optimized</div>
|
|
469
496
|
<div className="text-sm text-cs-text-secondary">
|
|
470
|
-
Duration
|
|
497
|
+
Duration: 300ms
|
|
498
|
+
</div>
|
|
499
|
+
</AdvancedTransitionCard>
|
|
500
|
+
</div>
|
|
501
|
+
</div>
|
|
502
|
+
</div>
|
|
503
|
+
)
|
|
471
504
|
|
|
472
505
|
const renderAccessibilityDemo = () => (
|
|
473
506
|
<div className="space-y-6">
|
|
474
507
|
{/* Accessibility Features */}
|
|
475
|
-
<div className="grid grid-cols-1 md
|
|
508
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
509
|
+
<div className="space-y-4">
|
|
476
510
|
<h3 className="text-lg font-semibold text-cs-text-primary">โฟ Accessibility Features</h3>
|
|
477
511
|
|
|
478
512
|
<div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
|
|
479
513
|
<div className="space-y-3">
|
|
480
514
|
<div className="flex justify-between items-center">
|
|
481
515
|
<span className="text-sm font-medium">Reduced Motion</span>
|
|
482
|
-
<Badge variant={transitionState.reducedMotion ? 'default' }>
|
|
483
|
-
{transitionState.reducedMotion ? 'Supported' }
|
|
516
|
+
<Badge variant={transitionState.reducedMotion ? 'default' : 'secondary'}>
|
|
517
|
+
{transitionState.reducedMotion ? 'Supported' : 'Not Detected'}
|
|
484
518
|
</Badge>
|
|
485
519
|
</div>
|
|
486
520
|
|
|
@@ -509,15 +543,15 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
509
543
|
<div className="space-y-3">
|
|
510
544
|
<div className="text-center">
|
|
511
545
|
<div className="text-2xl mb-2">
|
|
512
|
-
{transitionState.reducedMotion ? '๐ซ' }
|
|
546
|
+
{transitionState.reducedMotion ? '๐ซ' : 'โจ'}
|
|
513
547
|
</div>
|
|
514
548
|
<div className="font-medium">
|
|
515
|
-
{transitionState.reducedMotion ? 'Reduced Motion' }
|
|
549
|
+
{transitionState.reducedMotion ? 'Reduced Motion' : 'Full Motion'}
|
|
516
550
|
</div>
|
|
517
551
|
<div className="text-sm text-cs-text-secondary">
|
|
518
552
|
{transitionState.reducedMotion
|
|
519
553
|
? 'Transitions are disabled for accessibility'
|
|
520
|
-
}
|
|
554
|
+
: 'All transitions are enabled'}
|
|
521
555
|
</div>
|
|
522
556
|
</div>
|
|
523
557
|
</div>
|
|
@@ -529,7 +563,9 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
529
563
|
<div className="space-y-4">
|
|
530
564
|
<h3 className="text-lg font-semibold text-cs-text-primary">๐งช Accessibility Test</h3>
|
|
531
565
|
|
|
532
|
-
<div className="grid grid-cols-1 md
|
|
566
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
567
|
+
<AdvancedTransitionButton
|
|
568
|
+
duration={transitionState.reducedMotion ? 0 : 300}
|
|
533
569
|
easing="ease-out"
|
|
534
570
|
variant="default"
|
|
535
571
|
size="default"
|
|
@@ -539,7 +575,7 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
539
575
|
</AdvancedTransitionButton>
|
|
540
576
|
|
|
541
577
|
<AdvancedTransitionInput
|
|
542
|
-
duration={transitionState.reducedMotion ? 0 }
|
|
578
|
+
duration={transitionState.reducedMotion ? 0 : 200}
|
|
543
579
|
easing="ease-out"
|
|
544
580
|
placeholder="Test input accessibility"
|
|
545
581
|
aria-label="Test input with accessibility support"
|
|
@@ -547,7 +583,7 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
547
583
|
</div>
|
|
548
584
|
|
|
549
585
|
<div className="text-sm text-cs-text-secondary">
|
|
550
|
-
<strong>Note,
|
|
586
|
+
<strong>Note:</strong> If you have reduced motion enabled in your system preferences,
|
|
551
587
|
transitions will be automatically disabled for better accessibility.
|
|
552
588
|
</div>
|
|
553
589
|
</div>
|
|
@@ -575,7 +611,8 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
575
611
|
className={`px-4 py-2 rounded-lg font-medium transition-colors ${
|
|
576
612
|
activeDemo === demo
|
|
577
613
|
? 'bg-cs-primary text-white'
|
|
578
|
-
|
|
614
|
+
: 'bg-cs-surface-bg text-cs-text-primary hover:bg-cs-hover-bg'
|
|
615
|
+
}`}
|
|
579
616
|
>
|
|
580
617
|
{demo === 'transitions' && '๐จ Transitions'}
|
|
581
618
|
{demo === 'performance' && '๐ Performance'}
|
|
@@ -597,11 +634,16 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
597
634
|
<div className="p-4 bg-cs-surface-bg rounded-lg border border-cs-border">
|
|
598
635
|
<div className="flex flex-wrap items-center justify-between gap-4 text-sm">
|
|
599
636
|
<div className="flex items-center space-x-4">
|
|
600
|
-
<span className="font-medium">Device
|
|
637
|
+
<span className="font-medium">Device:</span>
|
|
638
|
+
<Badge variant="outline" className="capitalize">
|
|
601
639
|
{transitionState.deviceType}
|
|
602
640
|
</Badge>
|
|
603
|
-
<span className="font-medium">Battery
|
|
604
|
-
|
|
641
|
+
<span className="font-medium">Battery:</span>
|
|
642
|
+
<Badge
|
|
643
|
+
variant={
|
|
644
|
+
transitionState.batteryLevel === 'normal' ? 'default' :
|
|
645
|
+
transitionState.batteryLevel === 'low' ? 'secondary' : 'outline'
|
|
646
|
+
}
|
|
605
647
|
className="capitalize"
|
|
606
648
|
>
|
|
607
649
|
{transitionState.batteryLevel}
|
|
@@ -609,12 +651,16 @@ export const AdvancedTransitionSystemDemo= () => {
|
|
|
609
651
|
</div>
|
|
610
652
|
|
|
611
653
|
<div className="flex items-center space-x-4">
|
|
612
|
-
<span className="font-medium">Performance
|
|
613
|
-
|
|
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
|
+
}`}>
|
|
614
659
|
{transitionState.performanceScore}%
|
|
615
660
|
</span>
|
|
616
|
-
<span className="font-medium">Motion
|
|
617
|
-
|
|
661
|
+
<span className="font-medium">Motion:</span>
|
|
662
|
+
<Badge variant={transitionState.reducedMotion ? 'outline' : 'default'}>
|
|
663
|
+
{transitionState.reducedMotion ? 'Reduced' : 'Full'}
|
|
618
664
|
</Badge>
|
|
619
665
|
</div>
|
|
620
666
|
</div>
|