@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.10 → 0.2.16
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 +80 -258
- package/dist/components/ui/accessibility-demo.js +80 -258
- package/dist/components/ui/advanced-component-architecture-demo.esm.js +256 -916
- package/dist/components/ui/advanced-component-architecture-demo.js +256 -916
- package/dist/components/ui/advanced-transition-system-demo.esm.js +59 -670
- package/dist/components/ui/advanced-transition-system-demo.js +59 -670
- package/dist/components/ui/advanced-transition-system.esm.js +194 -378
- package/dist/components/ui/advanced-transition-system.js +194 -378
- package/dist/components/ui/animation/animated-container.esm.js +98 -159
- package/dist/components/ui/animation/animated-container.js +98 -159
- package/dist/components/ui/animation/index.esm.js +3 -18
- package/dist/components/ui/animation/index.js +3 -18
- package/dist/components/ui/animation/staggered-container.esm.js +37 -68
- package/dist/components/ui/animation/staggered-container.js +37 -68
- package/dist/components/ui/animation-demo.esm.js +30 -250
- package/dist/components/ui/animation-demo.js +30 -250
- package/dist/components/ui/badge.esm.js +15 -28
- package/dist/components/ui/badge.js +15 -28
- package/dist/components/ui/battery-conscious-animation-demo.esm.js +136 -565
- package/dist/components/ui/battery-conscious-animation-demo.js +136 -565
- package/dist/components/ui/border-radius-shadow-demo.esm.js +3 -184
- package/dist/components/ui/border-radius-shadow-demo.js +3 -184
- package/dist/components/ui/button.esm.js +14 -33
- package/dist/components/ui/button.js +14 -33
- package/dist/components/ui/card.esm.js +74 -188
- package/dist/components/ui/card.js +74 -188
- package/dist/components/ui/checkbox.esm.js +11 -30
- package/dist/components/ui/checkbox.js +11 -30
- package/dist/components/ui/color-preview.esm.js +50 -405
- package/dist/components/ui/color-preview.js +50 -405
- package/dist/components/ui/data-display/chart.esm.js +210 -632
- package/dist/components/ui/data-display/chart.js +210 -632
- package/dist/components/ui/data-display/data-grid-simple.esm.js +16 -74
- package/dist/components/ui/data-display/data-grid-simple.js +16 -74
- package/dist/components/ui/data-display/data-grid.esm.js +173 -661
- package/dist/components/ui/data-display/data-grid.js +173 -661
- package/dist/components/ui/data-display/list.esm.js +88 -446
- package/dist/components/ui/data-display/list.js +88 -446
- package/dist/components/ui/data-display/table.esm.js +109 -468
- package/dist/components/ui/data-display/table.js +109 -468
- package/dist/components/ui/data-display/timeline.esm.js +92 -431
- package/dist/components/ui/data-display/timeline.js +92 -431
- package/dist/components/ui/data-display/tree.esm.js +211 -585
- package/dist/components/ui/data-display/tree.js +211 -585
- package/dist/components/ui/data-display/types.esm.js +1 -530
- package/dist/components/ui/data-display/types.js +1 -530
- package/dist/components/ui/enterprise-mobile-experience-demo.esm.js +76 -749
- package/dist/components/ui/enterprise-mobile-experience-demo.js +76 -749
- package/dist/components/ui/enterprise-mobile-experience.esm.js +152 -460
- package/dist/components/ui/enterprise-mobile-experience.js +152 -460
- package/dist/components/ui/feedback/alert.esm.js +40 -148
- package/dist/components/ui/feedback/alert.js +40 -148
- package/dist/components/ui/feedback/progress.esm.js +74 -278
- package/dist/components/ui/feedback/progress.js +74 -278
- package/dist/components/ui/feedback/skeleton.esm.js +64 -173
- package/dist/components/ui/feedback/skeleton.js +64 -173
- package/dist/components/ui/feedback/toast.esm.js +86 -225
- package/dist/components/ui/feedback/toast.js +86 -225
- package/dist/components/ui/feedback/types.esm.js +1 -125
- package/dist/components/ui/feedback/types.js +1 -125
- package/dist/components/ui/font-preview.esm.js +56 -283
- package/dist/components/ui/font-preview.js +56 -283
- package/dist/components/ui/form-demo.esm.js +191 -553
- package/dist/components/ui/form-demo.js +191 -553
- package/dist/components/ui/hardware-acceleration-demo.esm.js +103 -544
- package/dist/components/ui/hardware-acceleration-demo.js +103 -544
- package/dist/components/ui/input.esm.js +13 -32
- package/dist/components/ui/input.js +13 -32
- package/dist/components/ui/label.esm.js +6 -16
- package/dist/components/ui/label.js +6 -16
- package/dist/components/ui/layout-demo.esm.js +76 -367
- package/dist/components/ui/layout-demo.js +76 -367
- package/dist/components/ui/layouts/adaptive-layout.esm.js +60 -139
- package/dist/components/ui/layouts/adaptive-layout.js +60 -139
- package/dist/components/ui/layouts/desktop-layout.esm.js +39 -224
- package/dist/components/ui/layouts/desktop-layout.js +39 -224
- package/dist/components/ui/layouts/index.esm.js +4 -10
- package/dist/components/ui/layouts/index.js +4 -10
- package/dist/components/ui/layouts/mobile-layout.esm.js +49 -162
- package/dist/components/ui/layouts/mobile-layout.js +49 -162
- package/dist/components/ui/layouts/tablet-layout.esm.js +53 -197
- package/dist/components/ui/layouts/tablet-layout.js +53 -197
- package/dist/components/ui/mobile-form-validation.esm.js +185 -420
- package/dist/components/ui/mobile-form-validation.js +185 -420
- package/dist/components/ui/mobile-input-demo.esm.js +11 -198
- package/dist/components/ui/mobile-input-demo.js +11 -198
- package/dist/components/ui/mobile-input.esm.js +187 -270
- package/dist/components/ui/mobile-input.js +187 -270
- package/dist/components/ui/mobile-skeleton-loading-demo.esm.js +144 -638
- package/dist/components/ui/mobile-skeleton-loading-demo.js +144 -638
- package/dist/components/ui/navigation/breadcrumb.esm.js +51 -154
- package/dist/components/ui/navigation/breadcrumb.js +51 -154
- package/dist/components/ui/navigation/index.esm.js +0 -26
- package/dist/components/ui/navigation/index.js +0 -26
- package/dist/components/ui/navigation/menu.esm.js +178 -365
- package/dist/components/ui/navigation/menu.js +178 -365
- package/dist/components/ui/navigation/navigation-demo.esm.js +130 -315
- package/dist/components/ui/navigation/navigation-demo.js +130 -315
- package/dist/components/ui/navigation/pagination.esm.js +142 -264
- package/dist/components/ui/navigation/pagination.js +142 -264
- package/dist/components/ui/navigation/sidebar.esm.js +156 -368
- package/dist/components/ui/navigation/sidebar.js +156 -368
- package/dist/components/ui/navigation/stepper.esm.js +131 -295
- package/dist/components/ui/navigation/stepper.js +131 -295
- package/dist/components/ui/navigation/tabs.esm.js +89 -198
- package/dist/components/ui/navigation/tabs.js +89 -198
- package/dist/components/ui/navigation/types.esm.js +1 -295
- package/dist/components/ui/navigation/types.js +1 -295
- package/dist/components/ui/overlay/backdrop.esm.js +39 -78
- package/dist/components/ui/overlay/backdrop.js +39 -78
- package/dist/components/ui/overlay/focus-manager.esm.js +96 -140
- package/dist/components/ui/overlay/focus-manager.js +96 -140
- package/dist/components/ui/overlay/index.esm.js +0 -27
- package/dist/components/ui/overlay/index.js +0 -27
- package/dist/components/ui/overlay/modal.esm.js +94 -249
- package/dist/components/ui/overlay/modal.js +94 -249
- package/dist/components/ui/overlay/overlay-manager.esm.js +60 -100
- package/dist/components/ui/overlay/overlay-manager.js +60 -100
- package/dist/components/ui/overlay/popover.esm.js +258 -438
- package/dist/components/ui/overlay/popover.js +258 -438
- package/dist/components/ui/overlay/portal.esm.js +45 -74
- package/dist/components/ui/overlay/portal.js +45 -74
- package/dist/components/ui/overlay/tooltip.esm.js +202 -288
- package/dist/components/ui/overlay/tooltip.js +202 -288
- package/dist/components/ui/overlay/types.esm.js +1 -196
- package/dist/components/ui/overlay/types.js +1 -196
- package/dist/components/ui/performance-demo.esm.js +110 -596
- package/dist/components/ui/performance-demo.js +110 -596
- package/dist/components/ui/semantic-input-system-demo.esm.js +87 -501
- package/dist/components/ui/semantic-input-system-demo.js +87 -501
- package/dist/components/ui/theme-customizer.esm.js +123 -371
- package/dist/components/ui/theme-customizer.js +123 -371
- package/dist/components/ui/theme-preview.esm.js +44 -306
- package/dist/components/ui/theme-preview.js +44 -306
- package/dist/components/ui/theme-switcher.esm.js +79 -258
- package/dist/components/ui/theme-switcher.js +79 -258
- package/dist/components/ui/theme-toggle.esm.js +22 -35
- package/dist/components/ui/theme-toggle.js +22 -35
- package/dist/components/ui/token-demo.esm.js +42 -189
- package/dist/components/ui/token-demo.js +42 -189
- package/dist/components/ui/touch-demo.esm.js +96 -462
- package/dist/components/ui/touch-demo.js +96 -462
- package/dist/components/ui/touch-friendly-interface-demo.esm.js +63 -519
- package/dist/components/ui/touch-friendly-interface-demo.js +63 -519
- package/dist/components/ui/touch-friendly-interface.esm.js +103 -281
- package/dist/components/ui/touch-friendly-interface.js +103 -281
- package/dist/hooks/index.esm.js +23 -181
- package/dist/hooks/index.js +23 -181
- package/dist/hooks/use-accessibility-support.esm.js +377 -518
- package/dist/hooks/use-accessibility-support.js +377 -518
- package/dist/hooks/use-adaptive-layout.esm.js +212 -287
- package/dist/hooks/use-adaptive-layout.js +212 -287
- package/dist/hooks/use-advanced-patterns.esm.js +185 -293
- package/dist/hooks/use-advanced-patterns.js +185 -293
- package/dist/hooks/use-advanced-transition-system.esm.js +286 -392
- package/dist/hooks/use-advanced-transition-system.js +286 -392
- package/dist/hooks/use-animation-profile.esm.js +221 -283
- package/dist/hooks/use-animation-profile.js +221 -283
- package/dist/hooks/use-battery-animations.esm.js +310 -384
- package/dist/hooks/use-battery-animations.js +310 -384
- package/dist/hooks/use-battery-conscious-loading.esm.js +374 -468
- package/dist/hooks/use-battery-conscious-loading.js +374 -468
- package/dist/hooks/use-battery-optimization.esm.js +267 -329
- package/dist/hooks/use-battery-optimization.js +267 -329
- package/dist/hooks/use-battery-status.esm.js +213 -293
- package/dist/hooks/use-battery-status.js +213 -293
- package/dist/hooks/use-component-performance.esm.js +235 -341
- package/dist/hooks/use-component-performance.js +235 -341
- package/dist/hooks/use-device-loading-states.esm.js +356 -457
- package/dist/hooks/use-device-loading-states.js +356 -457
- package/dist/hooks/use-device.esm.js +77 -102
- package/dist/hooks/use-device.js +77 -102
- package/dist/hooks/use-enterprise-mobile-experience.esm.js +349 -487
- package/dist/hooks/use-enterprise-mobile-experience.js +349 -487
- package/dist/hooks/use-form-feedback.esm.js +313 -398
- package/dist/hooks/use-form-feedback.js +313 -398
- package/dist/hooks/use-form-performance.esm.js +407 -500
- package/dist/hooks/use-form-performance.js +407 -500
- package/dist/hooks/use-frame-rate.esm.js +178 -251
- package/dist/hooks/use-frame-rate.js +178 -251
- package/dist/hooks/use-gestures.esm.js +230 -332
- package/dist/hooks/use-gestures.js +230 -332
- package/dist/hooks/use-hardware-acceleration.esm.js +246 -339
- package/dist/hooks/use-hardware-acceleration.js +246 -339
- package/dist/hooks/use-input-accessibility.esm.js +350 -454
- package/dist/hooks/use-input-accessibility.js +350 -454
- package/dist/hooks/use-input-performance.esm.js +419 -502
- package/dist/hooks/use-input-performance.js +419 -502
- package/dist/hooks/use-layout-performance.esm.js +233 -319
- package/dist/hooks/use-layout-performance.js +233 -319
- package/dist/hooks/use-loading-accessibility.esm.js +421 -531
- package/dist/hooks/use-loading-accessibility.js +421 -531
- package/dist/hooks/use-loading-performance.esm.js +398 -469
- package/dist/hooks/use-loading-performance.js +398 -469
- package/dist/hooks/use-memory-usage.esm.js +211 -287
- package/dist/hooks/use-memory-usage.js +211 -287
- package/dist/hooks/use-mobile-form-layout.esm.js +365 -458
- package/dist/hooks/use-mobile-form-layout.js +365 -458
- package/dist/hooks/use-mobile-form-validation.esm.js +384 -497
- package/dist/hooks/use-mobile-form-validation.js +384 -497
- package/dist/hooks/use-mobile-keyboard-optimization.esm.js +354 -468
- package/dist/hooks/use-mobile-keyboard-optimization.js +354 -468
- package/dist/hooks/use-mobile-layout.esm.js +207 -294
- package/dist/hooks/use-mobile-layout.js +207 -294
- package/dist/hooks/use-mobile-optimization.esm.js +308 -404
- package/dist/hooks/use-mobile-optimization.js +308 -404
- package/dist/hooks/use-mobile-skeleton.esm.js +300 -402
- package/dist/hooks/use-mobile-skeleton.js +300 -402
- package/dist/hooks/use-mobile-touch.esm.js +314 -412
- package/dist/hooks/use-mobile-touch.js +314 -412
- package/dist/hooks/use-performance-throttling.esm.js +276 -344
- package/dist/hooks/use-performance-throttling.js +276 -344
- package/dist/hooks/use-performance.esm.js +216 -313
- package/dist/hooks/use-performance.js +216 -313
- package/dist/hooks/use-reusable-architecture.esm.js +255 -408
- package/dist/hooks/use-reusable-architecture.js +255 -408
- package/dist/hooks/use-semantic-input-types.esm.js +290 -356
- package/dist/hooks/use-semantic-input-types.js +290 -356
- package/dist/hooks/use-semantic-input.esm.js +446 -549
- package/dist/hooks/use-semantic-input.js +446 -549
- package/dist/hooks/use-tablet-layout.esm.js +279 -384
- package/dist/hooks/use-tablet-layout.js +279 -384
- package/dist/hooks/use-touch-friendly-input.esm.js +401 -519
- package/dist/hooks/use-touch-friendly-input.js +401 -519
- package/dist/hooks/use-touch-friendly-interface.esm.js +242 -331
- package/dist/hooks/use-touch-friendly-interface.js +242 -331
- package/dist/hooks/use-touch-optimization.esm.js +288 -370
- package/dist/hooks/use-touch-optimization.js +288 -370
- package/dist/index.esm.js +150 -294
- package/dist/index.js +150 -294
- package/dist/lib/utils.esm.js +4 -5
- package/dist/lib/utils.js +4 -5
- package/dist/plugins/theme-css-generator.esm.js +292 -346
- package/dist/plugins/theme-css-generator.js +292 -346
- package/dist/provider.esm.js +3 -19
- package/dist/provider.js +3 -19
- package/dist/styles/layers/validation.esm.js +275 -0
- package/dist/styles/layers/validation.js +275 -0
- package/dist/styles.css +1 -1
- package/dist/theme.esm.js +654 -658
- package/dist/theme.js +654 -658
- package/dist/themes/ThemeContext.esm.js +1 -27
- package/dist/themes/ThemeContext.js +1 -27
- package/dist/themes/ThemeProvider.esm.js +191 -223
- package/dist/themes/ThemeProvider.js +191 -223
- package/dist/themes/accessibility/index.esm.js +0 -4
- package/dist/themes/accessibility/index.js +0 -4
- package/dist/themes/accessibility.esm.js +175 -240
- package/dist/themes/accessibility.js +175 -240
- package/dist/themes/aria-patterns.esm.js +345 -401
- package/dist/themes/aria-patterns.js +345 -401
- package/dist/themes/base-themes.esm.js +15 -24
- package/dist/themes/base-themes.js +15 -24
- package/dist/themes/colorManager.esm.js +293 -357
- package/dist/themes/colorManager.js +293 -357
- package/dist/themes/examples/dark-theme.esm.js +129 -133
- package/dist/themes/examples/dark-theme.js +129 -133
- package/dist/themes/examples/minimal-theme.esm.js +80 -85
- package/dist/themes/examples/minimal-theme.js +80 -85
- package/dist/themes/focus-management.esm.js +541 -677
- package/dist/themes/focus-management.js +541 -677
- package/dist/themes/fontLoader.esm.js +151 -180
- package/dist/themes/fontLoader.js +151 -180
- package/dist/themes/high-contrast.esm.js +394 -558
- package/dist/themes/high-contrast.js +394 -558
- package/dist/themes/index.esm.js +1 -9
- package/dist/themes/index.js +1 -9
- package/dist/themes/inheritance.esm.js +145 -180
- package/dist/themes/inheritance.js +145 -180
- package/dist/themes/keyboard-navigation.esm.js +418 -510
- package/dist/themes/keyboard-navigation.js +418 -510
- package/dist/themes/motion-reduction.esm.js +434 -591
- package/dist/themes/motion-reduction.js +434 -591
- package/dist/themes/navigation.esm.js +1 -234
- package/dist/themes/navigation.js +1 -234
- package/dist/themes/screen-reader.esm.js +515 -616
- package/dist/themes/screen-reader.js +515 -616
- package/dist/themes/systemThemeDetector.esm.js +135 -164
- package/dist/themes/systemThemeDetector.js +135 -164
- package/dist/themes/themeCSSUpdater.esm.js +217 -252
- package/dist/themes/themeCSSUpdater.js +217 -252
- package/dist/themes/themePersistence.esm.js +181 -212
- package/dist/themes/themePersistence.js +181 -212
- package/dist/themes/themes/default.esm.js +584 -0
- package/dist/themes/themes/default.js +584 -0
- package/dist/themes/themes/harvey.esm.js +551 -0
- package/dist/themes/themes/harvey.js +551 -0
- package/dist/themes/themes/stan-design.esm.js +654 -658
- package/dist/themes/themes/stan-design.js +654 -658
- package/dist/themes/types.esm.js +1 -458
- package/dist/themes/types.js +1 -458
- package/dist/themes/useSystemTheme.esm.js +34 -42
- package/dist/themes/useSystemTheme.js +34 -42
- package/dist/themes/useTheme.esm.js +23 -28
- package/dist/themes/useTheme.js +23 -28
- package/dist/themes/validation.esm.js +380 -433
- package/dist/themes/validation.js +380 -433
- package/dist/tokens/index.esm.js +2 -25
- package/dist/tokens/index.js +2 -25
- package/dist/tokens/tokenExporter.esm.js +309 -373
- package/dist/tokens/tokenExporter.js +309 -373
- package/dist/tokens/tokenGenerator.esm.js +241 -273
- package/dist/tokens/tokenGenerator.js +241 -273
- package/dist/tokens/tokenManager.esm.js +187 -241
- package/dist/tokens/tokenManager.js +187 -241
- package/dist/tokens/tokenValidator.esm.js +402 -522
- package/dist/tokens/tokenValidator.js +402 -522
- package/dist/tokens/types.esm.js +1 -78
- package/dist/tokens/types.js +1 -78
- package/dist/types.esm.js +3 -0
- package/dist/types.js +3 -0
- package/dist/utils/bundle-analyzer.esm.js +188 -246
- package/dist/utils/bundle-analyzer.js +188 -246
- package/dist/utils/bundle-splitting.esm.js +330 -458
- package/dist/utils/bundle-splitting.js +330 -458
- package/dist/utils/lazy-loading.esm.js +311 -417
- package/dist/utils/lazy-loading.js +311 -417
- package/dist/utils/performance-monitor.esm.js +369 -490
- package/dist/utils/performance-monitor.js +369 -490
- package/dist/utils/tree-shaking.esm.js +194 -264
- package/dist/utils/tree-shaking.js +194 -264
- package/package.json +18 -2
- package/src/index.ts +150 -149
- package/src/provider.tsx +3 -3
- package/src/theme.ts +1 -1
- package/{dist/theme.d.ts → src/themes/themes/default.ts} +77 -169
- package/src/themes/themes/harvey.ts +554 -0
- package/{dist/themes/types.d.ts → src/types.ts} +7 -1
- package/dist/components/ui/accessibility-demo.d.ts +0 -259
- package/dist/components/ui/advanced-component-architecture-demo.d.ts +0 -718
- package/dist/components/ui/advanced-transition-system-demo.d.ts +0 -660
- package/dist/components/ui/advanced-transition-system.d.ts +0 -391
- package/dist/components/ui/animation/animated-container.d.ts +0 -162
- package/dist/components/ui/animation/index.d.ts +0 -9
- package/dist/components/ui/animation/staggered-container.d.ts +0 -64
- package/dist/components/ui/animation-demo.d.ts +0 -238
- package/dist/components/ui/badge.d.ts +0 -28
- package/dist/components/ui/battery-conscious-animation-demo.d.ts +0 -561
- package/dist/components/ui/border-radius-shadow-demo.d.ts +0 -183
- package/dist/components/ui/button.d.ts +0 -33
- package/dist/components/ui/card.d.ts +0 -205
- package/dist/components/ui/checkbox.d.ts +0 -26
- package/dist/components/ui/color-preview.d.ts +0 -402
- package/dist/components/ui/data-display/chart.d.ts +0 -646
- package/dist/components/ui/data-display/data-grid-simple.d.ts +0 -73
- package/dist/components/ui/data-display/data-grid.d.ts +0 -670
- package/dist/components/ui/data-display/list.d.ts +0 -448
- package/dist/components/ui/data-display/table.d.ts +0 -472
- package/dist/components/ui/data-display/timeline.d.ts +0 -433
- package/dist/components/ui/data-display/tree.d.ts +0 -594
- package/dist/components/ui/data-display/types.d.ts +0 -534
- package/dist/components/ui/enterprise-mobile-experience-demo.d.ts +0 -735
- package/dist/components/ui/enterprise-mobile-experience.d.ts +0 -461
- package/dist/components/ui/feedback/alert.d.ts +0 -154
- package/dist/components/ui/feedback/progress.d.ts +0 -288
- package/dist/components/ui/feedback/skeleton.d.ts +0 -182
- package/dist/components/ui/feedback/toast.d.ts +0 -277
- package/dist/components/ui/feedback/types.d.ts +0 -123
- package/dist/components/ui/font-preview.d.ts +0 -282
- package/dist/components/ui/form-demo.d.ts +0 -544
- package/dist/components/ui/hardware-acceleration-demo.d.ts +0 -540
- package/dist/components/ui/input.d.ts +0 -33
- package/dist/components/ui/label.d.ts +0 -13
- package/dist/components/ui/layout-demo.d.ts +0 -352
- package/dist/components/ui/layouts/adaptive-layout.d.ts +0 -132
- package/dist/components/ui/layouts/desktop-layout.d.ts +0 -219
- package/dist/components/ui/layouts/index.d.ts +0 -5
- package/dist/components/ui/layouts/mobile-layout.d.ts +0 -158
- package/dist/components/ui/layouts/tablet-layout.d.ts +0 -192
- package/dist/components/ui/mobile-form-validation.d.ts +0 -439
- package/dist/components/ui/mobile-input-demo.d.ts +0 -197
- package/dist/components/ui/mobile-input.d.ts +0 -273
- package/dist/components/ui/mobile-skeleton-loading-demo.d.ts +0 -628
- package/dist/components/ui/navigation/breadcrumb.d.ts +0 -149
- package/dist/components/ui/navigation/index.d.ts +0 -25
- package/dist/components/ui/navigation/menu.d.ts +0 -366
- package/dist/components/ui/navigation/navigation-demo.d.ts +0 -169
- package/dist/components/ui/navigation/pagination.d.ts +0 -261
- package/dist/components/ui/navigation/sidebar.d.ts +0 -375
- package/dist/components/ui/navigation/stepper.d.ts +0 -294
- package/dist/components/ui/navigation/tabs.d.ts +0 -196
- package/dist/components/ui/navigation/types.d.ts +0 -293
- package/dist/components/ui/overlay/backdrop.d.ts +0 -79
- package/dist/components/ui/overlay/focus-manager.d.ts +0 -141
- package/dist/components/ui/overlay/index.d.ts +0 -27
- package/dist/components/ui/overlay/modal.d.ts +0 -262
- package/dist/components/ui/overlay/overlay-manager.d.ts +0 -107
- package/dist/components/ui/overlay/popover.d.ts +0 -450
- package/dist/components/ui/overlay/portal.d.ts +0 -75
- package/dist/components/ui/overlay/tooltip.d.ts +0 -298
- package/dist/components/ui/overlay/types.d.ts +0 -194
- package/dist/components/ui/performance-demo.d.ts +0 -583
- package/dist/components/ui/semantic-input-system-demo.d.ts +0 -490
- package/dist/components/ui/theme-customizer.d.ts +0 -378
- package/dist/components/ui/theme-preview.d.ts +0 -305
- package/dist/components/ui/theme-switcher.d.ts +0 -259
- package/dist/components/ui/theme-toggle.d.ts +0 -34
- package/dist/components/ui/token-demo.d.ts +0 -188
- package/dist/components/ui/touch-demo.d.ts +0 -455
- package/dist/components/ui/touch-friendly-interface-demo.d.ts +0 -512
- package/dist/components/ui/touch-friendly-interface.d.ts +0 -292
- package/dist/hooks/index.d.ts +0 -161
- package/dist/hooks/use-accessibility-support.d.ts +0 -516
- package/dist/hooks/use-adaptive-layout.d.ts +0 -287
- package/dist/hooks/use-advanced-patterns.d.ts +0 -292
- package/dist/hooks/use-advanced-transition-system.d.ts +0 -390
- package/dist/hooks/use-animation-profile.d.ts +0 -285
- package/dist/hooks/use-battery-animations.d.ts +0 -382
- package/dist/hooks/use-battery-conscious-loading.d.ts +0 -473
- package/dist/hooks/use-battery-optimization.d.ts +0 -328
- package/dist/hooks/use-battery-status.d.ts +0 -297
- package/dist/hooks/use-component-performance.d.ts +0 -342
- package/dist/hooks/use-device-loading-states.d.ts +0 -456
- package/dist/hooks/use-device.d.ts +0 -104
- package/dist/hooks/use-enterprise-mobile-experience.d.ts +0 -486
- package/dist/hooks/use-form-feedback.d.ts +0 -401
- package/dist/hooks/use-form-performance.d.ts +0 -511
- package/dist/hooks/use-frame-rate.d.ts +0 -249
- package/dist/hooks/use-gestures.d.ts +0 -336
- package/dist/hooks/use-hardware-acceleration.d.ts +0 -339
- package/dist/hooks/use-input-accessibility.d.ts +0 -451
- package/dist/hooks/use-input-performance.d.ts +0 -503
- package/dist/hooks/use-layout-performance.d.ts +0 -317
- package/dist/hooks/use-loading-accessibility.d.ts +0 -532
- package/dist/hooks/use-loading-performance.d.ts +0 -471
- package/dist/hooks/use-memory-usage.d.ts +0 -285
- package/dist/hooks/use-mobile-form-layout.d.ts +0 -462
- package/dist/hooks/use-mobile-form-validation.d.ts +0 -516
- package/dist/hooks/use-mobile-keyboard-optimization.d.ts +0 -469
- package/dist/hooks/use-mobile-layout.d.ts +0 -300
- package/dist/hooks/use-mobile-optimization.d.ts +0 -404
- package/dist/hooks/use-mobile-skeleton.d.ts +0 -399
- package/dist/hooks/use-mobile-touch.d.ts +0 -412
- package/dist/hooks/use-performance-throttling.d.ts +0 -346
- package/dist/hooks/use-performance.d.ts +0 -314
- package/dist/hooks/use-reusable-architecture.d.ts +0 -412
- package/dist/hooks/use-semantic-input-types.d.ts +0 -354
- package/dist/hooks/use-semantic-input.d.ts +0 -563
- package/dist/hooks/use-tablet-layout.d.ts +0 -382
- package/dist/hooks/use-touch-friendly-input.d.ts +0 -520
- package/dist/hooks/use-touch-friendly-interface.d.ts +0 -329
- package/dist/hooks/use-touch-optimization.d.ts +0 -373
- package/dist/index.d.ts +0 -149
- package/dist/lib/utils.d.ts +0 -3
- package/dist/plugins/theme-css-generator.d.ts +0 -345
- package/dist/provider.d.ts +0 -17
- package/dist/themes/ThemeContext.d.ts +0 -27
- package/dist/themes/ThemeProvider.d.ts +0 -222
- package/dist/themes/accessibility/index.d.ts +0 -7
- package/dist/themes/accessibility.d.ts +0 -259
- package/dist/themes/aria-patterns.d.ts +0 -418
- package/dist/themes/base-themes.d.ts +0 -34
- package/dist/themes/colorManager.d.ts +0 -327
- package/dist/themes/examples/dark-theme.d.ts +0 -139
- package/dist/themes/examples/minimal-theme.d.ts +0 -93
- package/dist/themes/focus-management.d.ts +0 -699
- package/dist/themes/fontLoader.d.ts +0 -163
- package/dist/themes/high-contrast.d.ts +0 -619
- package/dist/themes/index.d.ts +0 -11
- package/dist/themes/inheritance.d.ts +0 -160
- package/dist/themes/keyboard-navigation.d.ts +0 -550
- package/dist/themes/motion-reduction.d.ts +0 -660
- package/dist/themes/navigation.d.ts +0 -232
- package/dist/themes/screen-reader.d.ts +0 -645
- package/dist/themes/systemThemeDetector.d.ts +0 -148
- package/dist/themes/themeCSSUpdater.d.ts +0 -229
- package/dist/themes/themePersistence.d.ts +0 -192
- package/dist/themes/themes/stan-design.d.ts +0 -678
- package/dist/themes/useSystemTheme.d.ts +0 -43
- package/dist/themes/useTheme.d.ts +0 -20
- package/dist/themes/validation.d.ts +0 -406
- package/dist/tokens/index.d.ts +0 -25
- package/dist/tokens/tokenExporter.d.ts +0 -336
- package/dist/tokens/tokenGenerator.d.ts +0 -250
- package/dist/tokens/tokenManager.d.ts +0 -194
- package/dist/tokens/tokenValidator.d.ts +0 -488
- package/dist/tokens/types.d.ts +0 -78
- package/dist/utils/bundle-analyzer.d.ts +0 -260
- package/dist/utils/bundle-splitting.d.ts +0 -483
- package/dist/utils/lazy-loading.d.ts +0 -437
- package/dist/utils/performance-monitor.d.ts +0 -513
- package/dist/utils/tree-shaking.d.ts +0 -274
|
@@ -1,638 +1,144 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export const MobileSkeletonLoadingDemo
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const batteryStatus = batteryConsciousLoading.batteryState.status
|
|
146
|
-
if (batteryStatus === 'critical') return 'battery-critical'
|
|
147
|
-
if (batteryStatus === 'low') return 'battery-low'
|
|
148
|
-
return ''
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// Get performance class
|
|
152
|
-
const getPerformanceClass = () => {
|
|
153
|
-
const performanceHealth = loadingPerformance.performanceHealth
|
|
154
|
-
if (performanceHealth === 'poor') return 'performance-low'
|
|
155
|
-
if (performanceHealth === 'fair') return 'performance-medium'
|
|
156
|
-
return 'performance-high'
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Get accessibility class
|
|
160
|
-
const getAccessibilityClass = () => {
|
|
161
|
-
if (loadingAccessibility.accessibilityScore >= 80) return 'accessibility-enhanced'
|
|
162
|
-
return ''
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return (
|
|
166
|
-
<div className="space-y-6">
|
|
167
|
-
{/* Header */}
|
|
168
|
-
<div className="text-center">
|
|
169
|
-
<h2 className="text-2xl font-bold text-gray-900 mb-2">
|
|
170
|
-
📱 Mobile Skeleton & Loading State Sophistication
|
|
171
|
-
</h2>
|
|
172
|
-
<p className="text-gray-600 mb-4">
|
|
173
|
-
Advanced mobile-optimized skeleton components with device-specific loading states,
|
|
174
|
-
performance optimization, battery consciousness, and accessibility support.
|
|
175
|
-
</p>
|
|
176
|
-
<Badge variant="secondary">Story 11 Implementation</Badge>
|
|
177
|
-
</div>
|
|
178
|
-
|
|
179
|
-
{/* Main Demo */}
|
|
180
|
-
<Card className="p-6">
|
|
181
|
-
{/* Navigation */}
|
|
182
|
-
<div className="flex flex-wrap gap-2 mb-6">
|
|
183
|
-
<Button
|
|
184
|
-
variant={activeTab === 'overview' ? 'default' : 'outline'}
|
|
185
|
-
onClick={() => setActiveTab('overview')}
|
|
186
|
-
size="sm"
|
|
187
|
-
>
|
|
188
|
-
Overview
|
|
189
|
-
</Button>
|
|
190
|
-
<Button
|
|
191
|
-
variant={activeTab === 'skeletons' ? 'default' : 'outline'}
|
|
192
|
-
onClick={() => setActiveTab('skeletons')}
|
|
193
|
-
size="sm"
|
|
194
|
-
>
|
|
195
|
-
Skeletons
|
|
196
|
-
</Button>
|
|
197
|
-
<Button
|
|
198
|
-
variant={activeTab === 'loading' ? 'default' : 'outline'}
|
|
199
|
-
onClick={() => setActiveTab('loading')}
|
|
200
|
-
size="sm"
|
|
201
|
-
>
|
|
202
|
-
Loading States
|
|
203
|
-
</Button>
|
|
204
|
-
<Button
|
|
205
|
-
variant={activeTab === 'performance' ? 'default' : 'outline'}
|
|
206
|
-
onClick={() => setActiveTab('performance')}
|
|
207
|
-
size="sm"
|
|
208
|
-
>
|
|
209
|
-
Performance
|
|
210
|
-
</Button>
|
|
211
|
-
<Button
|
|
212
|
-
variant={activeTab === 'accessibility' ? 'default' : 'outline'}
|
|
213
|
-
onClick={() => setActiveTab('accessibility')}
|
|
214
|
-
size="sm"
|
|
215
|
-
>
|
|
216
|
-
Accessibility
|
|
217
|
-
</Button>
|
|
218
|
-
</div>
|
|
219
|
-
|
|
220
|
-
{/* Overview Section */}
|
|
221
|
-
{activeTab === 'overview' && (
|
|
222
|
-
<div className="space-y-6">
|
|
223
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
224
|
-
{/* Device State */}
|
|
225
|
-
<div className="p-4 bg-blue-50 rounded-lg">
|
|
226
|
-
<h3 className="font-semibold text-blue-900 mb-2">Device State</h3>
|
|
227
|
-
<div className="space-y-1 text-sm">
|
|
228
|
-
<p><span className="font-medium">Type:</span> {deviceLoadingStates.deviceState.deviceType}</p>
|
|
229
|
-
<p><span className="font-medium">Orientation:</span> {deviceLoadingStates.deviceState.orientation}</p>
|
|
230
|
-
<p><span className="font-medium">Screen:</span> {deviceLoadingStates.deviceState.screenSize}</p>
|
|
231
|
-
<p><span className="font-medium">Strategy:</span> {deviceLoadingStates.deviceState.loadingStates[0]?.type || 'skeleton'}</p>
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
|
|
235
|
-
{/* Battery Status */}
|
|
236
|
-
<div className="p-4 bg-yellow-50 rounded-lg">
|
|
237
|
-
<h3 className="font-semibold text-yellow-900 mb-2">Battery Status</h3>
|
|
238
|
-
<div className="space-y-1 text-sm">
|
|
239
|
-
<p><span className="font-medium">Level:</span> {batteryConsciousLoading.getBatteryPercentage()}%</p>
|
|
240
|
-
<p><span className="font-medium">Status:</span> {batteryConsciousLoading.batteryState.status}</p>
|
|
241
|
-
<p><span className="font-medium">Mode:</span> {batteryConsciousLoading.performanceMode}</p>
|
|
242
|
-
<p><span className="font-medium">Savings:</span> {batteryConsciousLoading.batterySavings}%</p>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
|
|
246
|
-
{/* Performance Metrics */}
|
|
247
|
-
<div className="p-4 bg-green-50 rounded-lg">
|
|
248
|
-
<h3 className="font-semibold text-green-900 mb-2">Performance</h3>
|
|
249
|
-
<div className="space-y-1 text-sm">
|
|
250
|
-
<p><span className="font-medium">FPS:</span> {loadingPerformance.performanceMetrics.frameRate}</p>
|
|
251
|
-
<p><span className="font-medium">Render:</span> {Math.round(loadingPerformance.performanceMetrics.renderTime)}ms</p>
|
|
252
|
-
<p><span className="font-medium">Memory:</span> {loadingPerformance.performanceMetrics.memoryUsage}MB</p>
|
|
253
|
-
<p><span className="font-medium">Health:</span> {loadingPerformance.performanceHealth}</p>
|
|
254
|
-
</div>
|
|
255
|
-
</div>
|
|
256
|
-
|
|
257
|
-
{/* Accessibility Score */}
|
|
258
|
-
<div className="p-4 bg-purple-50 rounded-lg">
|
|
259
|
-
<h3 className="font-semibold text-purple-900 mb-2">Accessibility</h3>
|
|
260
|
-
<div className="space-y-1 text-sm">
|
|
261
|
-
<p><span className="font-medium">Score:</span> {loadingAccessibility.accessibilityScore}%</p>
|
|
262
|
-
<p><span className="font-medium">Features:</span> {loadingAccessibility.accessibilityFeatures.length}</p>
|
|
263
|
-
<p><span className="font-medium">Active:</span> {loadingAccessibility.activeFeatures.length}</p>
|
|
264
|
-
<p><span className="font-medium">Enhancing:</span> {loadingAccessibility.isEnhancing ? 'Yes' : 'No'}</p>
|
|
265
|
-
</div>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
{/* Controls */}
|
|
270
|
-
<div className="flex flex-wrap gap-4 justify-center">
|
|
271
|
-
<Button onClick={startLoading} disabled={isLoading}>
|
|
272
|
-
{isLoading ? 'Loading...' : 'Start Loading Simulation'}
|
|
273
|
-
</Button>
|
|
274
|
-
<Button onClick={toggleSkeletons} variant="outline">
|
|
275
|
-
{showSkeletons ? 'Hide' : 'Show'} Skeletons
|
|
276
|
-
</Button>
|
|
277
|
-
<Button onClick={loadingPerformance.autoOptimize} variant="outline">
|
|
278
|
-
Auto-Optimize Performance
|
|
279
|
-
</Button>
|
|
280
|
-
<Button onClick={batteryConsciousLoading.optimizeLoadingForBattery} variant="outline">
|
|
281
|
-
Optimize for Battery
|
|
282
|
-
</Button>
|
|
283
|
-
<Button onClick={loadingAccessibility.autoEnableAccessibility} variant="outline">
|
|
284
|
-
Enable All Accessibility
|
|
285
|
-
</Button>
|
|
286
|
-
</div>
|
|
287
|
-
</div>
|
|
288
|
-
)}
|
|
289
|
-
|
|
290
|
-
{/* Skeletons Section */}
|
|
291
|
-
{activeTab === 'skeletons' && (
|
|
292
|
-
<div className="space-y-6">
|
|
293
|
-
<div className="text-center mb-6">
|
|
294
|
-
<h3 className="text-xl font-semibold mb-2">Mobile-Optimized Skeleton Components</h3>
|
|
295
|
-
<p className="text-gray-600">
|
|
296
|
-
Device-specific skeleton variants with performance optimization and touch-friendly interactions
|
|
297
|
-
</p>
|
|
298
|
-
</div>
|
|
299
|
-
|
|
300
|
-
<div className={`${getLoadingStateClass()} ${getBatteryClass()} ${getPerformanceClass()} ${getAccessibilityClass()}`}>
|
|
301
|
-
{showSkeletons && (
|
|
302
|
-
<>
|
|
303
|
-
{/* Text Line Skeletons */}
|
|
304
|
-
<div className="loading-skeleton">
|
|
305
|
-
<div className="mobile-skeleton text-line animation-pulse touch-friendly"
|
|
306
|
-
aria-label="Loading text line 1"></div>
|
|
307
|
-
<div className="mobile-skeleton text-line animation-pulse touch-friendly"
|
|
308
|
-
aria-label="Loading text line 2"></div>
|
|
309
|
-
<div className="mobile-skeleton text-line animation-pulse touch-friendly"
|
|
310
|
-
aria-label="Loading text line 3"></div>
|
|
311
|
-
</div>
|
|
312
|
-
|
|
313
|
-
{/* Avatar and Button Skeletons */}
|
|
314
|
-
<div className="flex items-center gap-4">
|
|
315
|
-
<div className="mobile-skeleton avatar animation-shimmer touch-friendly"
|
|
316
|
-
aria-label="Loading avatar"></div>
|
|
317
|
-
<div className="mobile-skeleton button animation-pulse touch-friendly"
|
|
318
|
-
aria-label="Loading button"></div>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
{/* Card Skeleton */}
|
|
322
|
-
<div className="mobile-skeleton card animation-wave touch-friendly"
|
|
323
|
-
aria-label="Loading card content"></div>
|
|
324
|
-
</>
|
|
325
|
-
)}
|
|
326
|
-
</div>
|
|
327
|
-
|
|
328
|
-
{/* Skeleton Variants */}
|
|
329
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
330
|
-
<div className="p-4 bg-gray-50 rounded-lg">
|
|
331
|
-
<h4 className="font-semibold mb-2">Available Skeleton Variants</h4>
|
|
332
|
-
<div className="space-y-2 text-sm">
|
|
333
|
-
{mobileSkeleton.skeletonVariants.map(variant => (
|
|
334
|
-
<div key={variant.id} className="flex justify-between items-center">
|
|
335
|
-
<span>{variant.name}</span>
|
|
336
|
-
<Badge variant={variant.mobileOptimized ? "default" : "secondary"}>
|
|
337
|
-
{variant.animation}
|
|
338
|
-
</Badge>
|
|
339
|
-
</div>
|
|
340
|
-
))}
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
|
|
344
|
-
<div className="p-4 bg-gray-50 rounded-lg">
|
|
345
|
-
<h4 className="font-semibold mb-2">Device Optimizations</h4>
|
|
346
|
-
<div className="space-y-2 text-sm">
|
|
347
|
-
<p><span className="font-medium">Mobile Optimized:</span> {mobileSkeleton.isMobileOptimized() ? 'Yes' : 'No'}</p>
|
|
348
|
-
<p><span className="font-medium">Loading Strategy:</span> {mobileSkeleton.getLoadingStrategy()}</p>
|
|
349
|
-
<p><span className="font-medium">Animation Intensity:</span> {mobileSkeleton.getAnimationIntensity()}</p>
|
|
350
|
-
<p><span className="font-medium">Touch Friendly:</span> {mobileSkeleton.skeletonVariants.some(v => v.touchFriendly) ? 'Yes' : 'No'}</p>
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
)}
|
|
356
|
-
|
|
357
|
-
{/* Loading States Section */}
|
|
358
|
-
{activeTab === 'loading' && (
|
|
359
|
-
<div className="space-y-6">
|
|
360
|
-
<div className="text-center mb-6">
|
|
361
|
-
<h3 className="text-xl font-semibold mb-2">Device-Specific Loading States</h3>
|
|
362
|
-
<p className="text-gray-600">
|
|
363
|
-
Adaptive loading states that automatically adjust based on device capabilities and battery level
|
|
364
|
-
</p>
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
{/* Loading Progress */}
|
|
368
|
-
{isLoading && (
|
|
369
|
-
<div className="space-y-4">
|
|
370
|
-
<div className="loading-progress">
|
|
371
|
-
<div
|
|
372
|
-
className="loading-progress-bar"
|
|
373
|
-
style={{ width: `${loadingProgress}%` }}
|
|
374
|
-
aria-label={`Loading progress: ${loadingProgress}%`}
|
|
375
|
-
></div>
|
|
376
|
-
</div>
|
|
377
|
-
<p className="text-center text-sm text-gray-600">
|
|
378
|
-
Loading... {loadingProgress}%
|
|
379
|
-
</p>
|
|
380
|
-
</div>
|
|
381
|
-
)}
|
|
382
|
-
|
|
383
|
-
{/* Device Loading States */}
|
|
384
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
385
|
-
<div className="space-y-4">
|
|
386
|
-
<h4 className="font-semibold">Current Device State</h4>
|
|
387
|
-
<div className="p-4 bg-blue-50 rounded-lg space-y-2">
|
|
388
|
-
<p><span className="font-medium">Device:</span> {deviceLoadingStates.deviceState.deviceType}</p>
|
|
389
|
-
<p><span className="font-medium">Orientation:</span> {deviceLoadingStates.deviceState.orientation}</p>
|
|
390
|
-
<p><span className="font-medium">Performance:</span> {deviceLoadingStates.deviceState.performanceLevel}</p>
|
|
391
|
-
<p><span className="font-medium">Battery:</span> {deviceLoadingStates.deviceState.batteryLevel}</p>
|
|
392
|
-
<p><span className="font-medium">Adaptive:</span> {deviceLoadingStates.deviceState.adaptiveBehavior ? 'Yes' : 'No'}</p>
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
|
-
|
|
396
|
-
<div className="space-y-4">
|
|
397
|
-
<h4 className="font-semibold">Available Loading States</h4>
|
|
398
|
-
<div className="space-y-2">
|
|
399
|
-
{deviceLoadingStates.getLoadingStatesForDevice().map(state => (
|
|
400
|
-
<div key={state.id} className="p-3 bg-gray-50 rounded-lg">
|
|
401
|
-
<div className="flex justify-between items-center mb-1">
|
|
402
|
-
<span className="font-medium">{state.name}</span>
|
|
403
|
-
<Badge variant="outline">{state.type}</Badge>
|
|
404
|
-
</div>
|
|
405
|
-
<div className="text-sm text-gray-600">
|
|
406
|
-
<p>Duration: {state.duration}ms</p>
|
|
407
|
-
<p>Complexity: {state.complexity}</p>
|
|
408
|
-
<p>Performance: {state.performance}</p>
|
|
409
|
-
</div>
|
|
410
|
-
</div>
|
|
411
|
-
))}
|
|
412
|
-
</div>
|
|
413
|
-
</div>
|
|
414
|
-
</div>
|
|
415
|
-
|
|
416
|
-
{/* Loading State Controls */}
|
|
417
|
-
<div className="flex flex-wrap gap-4 justify-center">
|
|
418
|
-
<Button onClick={deviceLoadingStates.enableAdaptiveBehavior} variant="outline">
|
|
419
|
-
Enable Adaptive Behavior
|
|
420
|
-
</Button>
|
|
421
|
-
<Button onClick={deviceLoadingStates.adaptToPerformance} variant="outline">
|
|
422
|
-
Adapt to Performance
|
|
423
|
-
</Button>
|
|
424
|
-
<Button onClick={deviceLoadingStates.clearAdaptations} variant="outline">
|
|
425
|
-
Clear Adaptations
|
|
426
|
-
</Button>
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
)}
|
|
430
|
-
|
|
431
|
-
{/* Performance Section */}
|
|
432
|
-
{activeTab === 'performance' && (
|
|
433
|
-
<div className="space-y-6">
|
|
434
|
-
<div className="text-center mb-6">
|
|
435
|
-
<h3 className="text-xl font-semibold mb-2">Loading Performance Optimization</h3>
|
|
436
|
-
<p className="text-gray-600">
|
|
437
|
-
Real-time performance monitoring with automatic optimization and battery-conscious strategies
|
|
438
|
-
</p>
|
|
439
|
-
</div>
|
|
440
|
-
|
|
441
|
-
{/* Performance Metrics */}
|
|
442
|
-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
443
|
-
<div className="metric-item">
|
|
444
|
-
<div className="metric-value">{loadingPerformance.performanceMetrics.frameRate}</div>
|
|
445
|
-
<div className="metric-label">FPS</div>
|
|
446
|
-
</div>
|
|
447
|
-
<div className="metric-item">
|
|
448
|
-
<div className="metric-value">{Math.round(loadingPerformance.performanceMetrics.renderTime)}ms</div>
|
|
449
|
-
<div className="metric-label">Render Time</div>
|
|
450
|
-
</div>
|
|
451
|
-
<div className="metric-item">
|
|
452
|
-
<div className="metric-value">{loadingPerformance.performanceMetrics.memoryUsage}MB</div>
|
|
453
|
-
<div className="metric-label">Memory</div>
|
|
454
|
-
</div>
|
|
455
|
-
<div className="metric-item">
|
|
456
|
-
<div className="metric-value">{loadingPerformance.getPerformanceScore()}</div>
|
|
457
|
-
<div className="metric-label">Score</div>
|
|
458
|
-
</div>
|
|
459
|
-
</div>
|
|
460
|
-
|
|
461
|
-
{/* Performance Health */}
|
|
462
|
-
<div className="p-4 bg-gray-50 rounded-lg">
|
|
463
|
-
<h4 className="font-semibold mb-3">Performance Health: {loadingPerformance.performanceHealth}</h4>
|
|
464
|
-
<div className="space-y-2">
|
|
465
|
-
{loadingPerformance.getOptimizationRecommendations().map((recommendation, index) => (
|
|
466
|
-
<p key={index} className="text-sm text-gray-600">• {recommendation}</p>
|
|
467
|
-
))}
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
|
|
471
|
-
{/* Optimization Strategies */}
|
|
472
|
-
<div className="space-y-4">
|
|
473
|
-
<h4 className="font-semibold">Applied Optimizations</h4>
|
|
474
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
475
|
-
{loadingPerformance.optimizationStrategies.map(strategy => (
|
|
476
|
-
<div key={strategy.id} className="p-3 bg-green-50 rounded-lg">
|
|
477
|
-
<div className="flex justify-between items-center mb-1">
|
|
478
|
-
<span className="font-medium">{strategy.name}</span>
|
|
479
|
-
<Badge variant={strategy.impact === 'high' ? 'default' : 'secondary'}>
|
|
480
|
-
{strategy.impact}
|
|
481
|
-
</Badge>
|
|
482
|
-
</div>
|
|
483
|
-
<p className="text-sm text-gray-600">{strategy.description}</p>
|
|
484
|
-
</div>
|
|
485
|
-
))}
|
|
486
|
-
</div>
|
|
487
|
-
</div>
|
|
488
|
-
|
|
489
|
-
{/* Performance Controls */}
|
|
490
|
-
<div className="flex flex-wrap gap-4 justify-center">
|
|
491
|
-
<Button onClick={loadingPerformance.optimizeAnimations} variant="outline">
|
|
492
|
-
Optimize Animations
|
|
493
|
-
</Button>
|
|
494
|
-
<Button onClick={loadingPerformance.optimizeMemory} variant="outline">
|
|
495
|
-
Optimize Memory
|
|
496
|
-
</Button>
|
|
497
|
-
<Button onClick={loadingPerformance.optimizeBattery} variant="outline">
|
|
498
|
-
Optimize Battery
|
|
499
|
-
</Button>
|
|
500
|
-
<Button onClick={loadingPerformance.optimizePerformance} variant="outline">
|
|
501
|
-
Optimize Overall
|
|
502
|
-
</Button>
|
|
503
|
-
</div>
|
|
504
|
-
</div>
|
|
505
|
-
)}
|
|
506
|
-
|
|
507
|
-
{/* Accessibility Section */}
|
|
508
|
-
{activeTab === 'accessibility' && (
|
|
509
|
-
<div className="space-y-6">
|
|
510
|
-
<div className="text-center mb-6">
|
|
511
|
-
<h3 className="text-xl font-semibold mb-2">Loading Accessibility Support</h3>
|
|
512
|
-
<p className="text-gray-600">
|
|
513
|
-
Comprehensive accessibility features including screen reader support, reduced motion, focus management, and ARIA
|
|
514
|
-
</p>
|
|
515
|
-
</div>
|
|
516
|
-
|
|
517
|
-
{/* Accessibility Score */}
|
|
518
|
-
<div className="text-center p-6 bg-purple-50 rounded-lg">
|
|
519
|
-
<div className="text-4xl font-bold text-purple-600 mb-2">
|
|
520
|
-
{loadingAccessibility.accessibilityScore}%
|
|
521
|
-
</div>
|
|
522
|
-
<p className="text-purple-700 font-medium">Accessibility Score</p>
|
|
523
|
-
</div>
|
|
524
|
-
|
|
525
|
-
{/* Accessibility State */}
|
|
526
|
-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
527
|
-
<div className="metric-item">
|
|
528
|
-
<div className="metric-value">{loadingAccessibility.accessibilityState.screenReaderActive ? '✓' : '✗'}</div>
|
|
529
|
-
<div className="metric-label">Screen Reader</div>
|
|
530
|
-
</div>
|
|
531
|
-
<div className="metric-item">
|
|
532
|
-
<div className="metric-value">{loadingAccessibility.accessibilityState.reducedMotionEnabled ? '✓' : '✗'}</div>
|
|
533
|
-
<div className="metric-label">Reduced Motion</div>
|
|
534
|
-
</div>
|
|
535
|
-
<div className="metric-item">
|
|
536
|
-
<div className="metric-value">{loadingAccessibility.accessibilityState.ariaLabelsActive ? '✓' : '✗'}</div>
|
|
537
|
-
<div className="metric-label">ARIA Labels</div>
|
|
538
|
-
</div>
|
|
539
|
-
<div className="metric-item">
|
|
540
|
-
<div className="metric-value">{loadingAccessibility.accessibilityState.keyboardNavigationActive ? '✓' : '✗'}</div>
|
|
541
|
-
<div className="metric-label">Keyboard Nav</div>
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
|
|
545
|
-
{/* Accessibility Features */}
|
|
546
|
-
<div className="space-y-4">
|
|
547
|
-
<h4 className="font-semibold">Active Accessibility Features</h4>
|
|
548
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
549
|
-
{loadingAccessibility.accessibilityFeatures.map(feature => (
|
|
550
|
-
<div key={feature.id} className="p-3 bg-purple-50 rounded-lg">
|
|
551
|
-
<div className="flex justify-between items-center mb-1">
|
|
552
|
-
<span className="font-medium">{feature.name}</span>
|
|
553
|
-
<Badge variant={feature.impact === 'high' ? 'default' : 'secondary'}>
|
|
554
|
-
{feature.impact}
|
|
555
|
-
</Badge>
|
|
556
|
-
</div>
|
|
557
|
-
<p className="text-sm text-gray-600">{feature.description}</p>
|
|
558
|
-
</div>
|
|
559
|
-
))}
|
|
560
|
-
</div>
|
|
561
|
-
</div>
|
|
562
|
-
|
|
563
|
-
{/* Accessibility Recommendations */}
|
|
564
|
-
<div className="p-4 bg-blue-50 rounded-lg">
|
|
565
|
-
<h4 className="font-semibold mb-3">Accessibility Recommendations</h4>
|
|
566
|
-
<div className="space-y-2">
|
|
567
|
-
{loadingAccessibility.getAccessibilityRecommendations().map((recommendation, index) => (
|
|
568
|
-
<p key={index} className="text-sm text-gray-600">• {recommendation}</p>
|
|
569
|
-
))}
|
|
570
|
-
</div>
|
|
571
|
-
</div>
|
|
572
|
-
|
|
573
|
-
{/* Accessibility Controls */}
|
|
574
|
-
<div className="flex flex-wrap gap-4 justify-center">
|
|
575
|
-
<Button onClick={loadingAccessibility.enableScreenReaderSupport} variant="outline">
|
|
576
|
-
Enable Screen Reader
|
|
577
|
-
</Button>
|
|
578
|
-
<Button onClick={loadingAccessibility.enableReducedMotionSupport} variant="outline">
|
|
579
|
-
Enable Reduced Motion
|
|
580
|
-
</Button>
|
|
581
|
-
<Button onClick={loadingAccessibility.enableAriaSupport} variant="outline">
|
|
582
|
-
Enable ARIA Support
|
|
583
|
-
</Button>
|
|
584
|
-
<Button onClick={loadingAccessibility.enableKeyboardNavigation} variant="outline">
|
|
585
|
-
Enable Keyboard Nav
|
|
586
|
-
</Button>
|
|
587
|
-
</div>
|
|
588
|
-
</div>
|
|
589
|
-
)}
|
|
590
|
-
</Card>
|
|
591
|
-
|
|
592
|
-
{/* Status Indicators */}
|
|
593
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
594
|
-
<div className={`loading-status ${getBatteryClass()}`}>
|
|
595
|
-
<div className="w-3 h-3 bg-current rounded-full"></div>
|
|
596
|
-
<span className="text-sm font-medium">
|
|
597
|
-
Battery: {batteryConsciousLoading.getBatteryStatus()}
|
|
598
|
-
</span>
|
|
599
|
-
</div>
|
|
600
|
-
|
|
601
|
-
<div className={`loading-status ${getPerformanceClass()}`}>
|
|
602
|
-
<div className="w-3 h-3 bg-current rounded-full"></div>
|
|
603
|
-
<span className="text-sm font-medium">
|
|
604
|
-
Performance: {loadingPerformance.performanceHealth}
|
|
605
|
-
</span>
|
|
606
|
-
</div>
|
|
607
|
-
|
|
608
|
-
<div className={`loading-status ${getAccessibilityClass()}`}>
|
|
609
|
-
<div className="w-3 h-3 bg-current rounded-full"></div>
|
|
610
|
-
<span className="text-sm font-medium">
|
|
611
|
-
Accessibility: {loadingAccessibility.accessibilityScore}%
|
|
612
|
-
</span>
|
|
613
|
-
</div>
|
|
614
|
-
|
|
615
|
-
<div className="loading-status">
|
|
616
|
-
<div className="w-3 h-3 bg-current rounded-full"></div>
|
|
617
|
-
<span className="text-sm font-medium">
|
|
618
|
-
Device: {deviceLoadingStates.deviceState.deviceType}
|
|
619
|
-
</span>
|
|
620
|
-
</div>
|
|
621
|
-
</div>
|
|
622
|
-
|
|
623
|
-
{/* Notifications */}
|
|
624
|
-
{batteryConsciousLoading.notifications.length > 0 && (
|
|
625
|
-
<div className="space-y-2">
|
|
626
|
-
<h4 className="font-semibold">Recent Notifications</h4>
|
|
627
|
-
{batteryConsciousLoading.notifications.slice(-3).map((notification, index) => (
|
|
628
|
-
<div key={index} className="p-3 bg-blue-50 border border-blue-200 rounded-lg">
|
|
629
|
-
<p className="text-sm text-blue-800">{notification}</p>
|
|
630
|
-
</div>
|
|
631
|
-
))}
|
|
632
|
-
</div>
|
|
633
|
-
)}
|
|
634
|
-
</div>
|
|
635
|
-
)
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
export default MobileSkeletonLoadingDemo
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { Card } from './card';
|
|
4
|
+
import { Button } from './button';
|
|
5
|
+
import { Badge } from './badge';
|
|
6
|
+
import { useMobileSkeleton } from '../../hooks/use-mobile-skeleton';
|
|
7
|
+
import { useDeviceLoadingStates } from '../../hooks/use-device-loading-states';
|
|
8
|
+
import { useLoadingPerformance } from '../../hooks/use-loading-performance';
|
|
9
|
+
import { useBatteryConsciousLoading } from '../../hooks/use-battery-conscious-loading';
|
|
10
|
+
import { useLoadingAccessibility } from '../../hooks/use-loading-accessibility';
|
|
11
|
+
export const MobileSkeletonLoadingDemo = () => {
|
|
12
|
+
const [activeTab, setActiveTab] = useState('overview');
|
|
13
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
14
|
+
const [loadingProgress, setLoadingProgress] = useState(0);
|
|
15
|
+
const [showSkeletons, setShowSkeletons] = useState(true);
|
|
16
|
+
// Initialize all hooks
|
|
17
|
+
const mobileSkeleton = useMobileSkeleton({
|
|
18
|
+
enableMobileOptimization: true,
|
|
19
|
+
enablePerformanceOptimization: true,
|
|
20
|
+
enableBatteryOptimization: true,
|
|
21
|
+
enableAccessibilitySupport: true,
|
|
22
|
+
enableTouchOptimization: true
|
|
23
|
+
}, {
|
|
24
|
+
onSkeletonCreated: (variant) => console.log('Skeleton created:', variant),
|
|
25
|
+
onLoadingStateChanged: (state) => console.log('Loading state changed:', state),
|
|
26
|
+
onPerformanceOptimized: (optimization) => console.log('Performance optimized:', optimization),
|
|
27
|
+
onBatteryOptimized: (strategy) => console.log('Battery optimized:', strategy),
|
|
28
|
+
onAccessibilityEnhanced: (feature) => console.log('Accessibility enhanced:', feature)
|
|
29
|
+
});
|
|
30
|
+
const deviceLoadingStates = useDeviceLoadingStates({
|
|
31
|
+
enableMobileStates: true,
|
|
32
|
+
enableTabletStates: true,
|
|
33
|
+
enableDesktopStates: true,
|
|
34
|
+
enableAdaptiveBehavior: true,
|
|
35
|
+
enableOrientationSupport: true,
|
|
36
|
+
enablePerformanceAdaptation: true
|
|
37
|
+
}, {
|
|
38
|
+
onLoadingStateChanged: (state) => console.log('Device loading state changed:', state),
|
|
39
|
+
onDeviceStateChanged: (deviceState) => console.log('Device state changed:', deviceState),
|
|
40
|
+
onAdaptiveBehaviorEnabled: (behavior) => console.log('Adaptive behavior enabled:', behavior),
|
|
41
|
+
onPerformanceAdapted: (adaptation) => console.log('Performance adapted:', adaptation)
|
|
42
|
+
});
|
|
43
|
+
const loadingPerformance = useLoadingPerformance({
|
|
44
|
+
enableAnimationOptimization: true,
|
|
45
|
+
enableMemoryManagement: true,
|
|
46
|
+
enableBatteryOptimization: true,
|
|
47
|
+
enablePerformanceMonitoring: true,
|
|
48
|
+
enableAutoOptimization: true
|
|
49
|
+
}, {
|
|
50
|
+
onPerformanceOptimized: (strategy) => console.log('Loading performance optimized:', strategy),
|
|
51
|
+
onMemoryOptimized: (optimization) => console.log('Memory optimized:', optimization),
|
|
52
|
+
onBatteryOptimized: (strategy) => console.log('Battery optimized:', strategy),
|
|
53
|
+
onAnimationOptimized: (optimization) => console.log('Animation optimized:', optimization)
|
|
54
|
+
});
|
|
55
|
+
const batteryConsciousLoading = useBatteryConsciousLoading({
|
|
56
|
+
enableBatteryMonitoring: true,
|
|
57
|
+
enableLoadingOptimization: true,
|
|
58
|
+
enablePerformanceAdjustment: true,
|
|
59
|
+
enableUserNotification: true,
|
|
60
|
+
enableAutoOptimization: true
|
|
61
|
+
}, {
|
|
62
|
+
onBatteryLevelChanged: (batteryState) => console.log('Battery level changed:', batteryState),
|
|
63
|
+
onLoadingOptimized: (optimization) => console.log('Loading optimized for battery:', optimization),
|
|
64
|
+
onPerformanceAdjusted: (adjustment) => console.log('Performance adjusted:', adjustment),
|
|
65
|
+
onUserNotified: (notification) => console.log('User notified:', notification)
|
|
66
|
+
});
|
|
67
|
+
const loadingAccessibility = useLoadingAccessibility({
|
|
68
|
+
enableScreenReaderSupport: true,
|
|
69
|
+
enableReducedMotionSupport: true,
|
|
70
|
+
enableFocusManagement: true,
|
|
71
|
+
enableAriaSupport: true,
|
|
72
|
+
enableVoiceControl: true,
|
|
73
|
+
enableHighContrast: true,
|
|
74
|
+
enableKeyboardNavigation: true
|
|
75
|
+
}, {
|
|
76
|
+
onScreenReaderEnhanced: (feature) => console.log('Screen reader enhanced:', feature),
|
|
77
|
+
onReducedMotionApplied: (feature) => console.log('Reduced motion applied:', feature),
|
|
78
|
+
onFocusManaged: (feature) => console.log('Focus managed:', feature),
|
|
79
|
+
onAriaEnhanced: (feature) => console.log('ARIA enhanced:', feature),
|
|
80
|
+
onVoiceControlEnabled: (feature) => console.log('Voice control enabled:', feature),
|
|
81
|
+
onHighContrastApplied: (feature) => console.log('High contrast applied:', feature),
|
|
82
|
+
onKeyboardNavigationEnabled: (feature) => console.log('Keyboard navigation enabled:', feature)
|
|
83
|
+
});
|
|
84
|
+
// Simulate loading progress
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (isLoading) {
|
|
87
|
+
const interval = setInterval(() => {
|
|
88
|
+
setLoadingProgress(prev => {
|
|
89
|
+
if (prev >= 100) {
|
|
90
|
+
setIsLoading(false);
|
|
91
|
+
setLoadingProgress(0);
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
return prev + 10;
|
|
95
|
+
});
|
|
96
|
+
}, 200);
|
|
97
|
+
return () => clearInterval(interval);
|
|
98
|
+
}
|
|
99
|
+
}, [isLoading]);
|
|
100
|
+
// Start loading simulation
|
|
101
|
+
const startLoading = () => {
|
|
102
|
+
setIsLoading(true);
|
|
103
|
+
setLoadingProgress(0);
|
|
104
|
+
};
|
|
105
|
+
// Toggle skeleton visibility
|
|
106
|
+
const toggleSkeletons = () => {
|
|
107
|
+
setShowSkeletons(!showSkeletons);
|
|
108
|
+
};
|
|
109
|
+
// Get device-specific loading class
|
|
110
|
+
const getLoadingStateClass = () => {
|
|
111
|
+
switch (deviceLoadingStates.deviceState.deviceType) {
|
|
112
|
+
case 'mobile': return 'loading-state-mobile';
|
|
113
|
+
case 'tablet': return 'loading-state-tablet';
|
|
114
|
+
case 'desktop': return 'loading-state-desktop';
|
|
115
|
+
default: return 'loading-state-mobile';
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
// Get battery-conscious class
|
|
119
|
+
const getBatteryClass = () => {
|
|
120
|
+
const batteryStatus = batteryConsciousLoading.batteryState.status;
|
|
121
|
+
if (batteryStatus === 'critical')
|
|
122
|
+
return 'battery-critical';
|
|
123
|
+
if (batteryStatus === 'low')
|
|
124
|
+
return 'battery-low';
|
|
125
|
+
return '';
|
|
126
|
+
};
|
|
127
|
+
// Get performance class
|
|
128
|
+
const getPerformanceClass = () => {
|
|
129
|
+
const performanceHealth = loadingPerformance.performanceHealth;
|
|
130
|
+
if (performanceHealth === 'poor')
|
|
131
|
+
return 'performance-low';
|
|
132
|
+
if (performanceHealth === 'fair')
|
|
133
|
+
return 'performance-medium';
|
|
134
|
+
return 'performance-high';
|
|
135
|
+
};
|
|
136
|
+
// Get accessibility class
|
|
137
|
+
const getAccessibilityClass = () => {
|
|
138
|
+
if (loadingAccessibility.accessibilityScore >= 80)
|
|
139
|
+
return 'accessibility-enhanced';
|
|
140
|
+
return '';
|
|
141
|
+
};
|
|
142
|
+
return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "text-center", children: [_jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-2", children: "\uD83D\uDCF1 Mobile Skeleton & Loading State Sophistication" }), _jsx("p", { className: "text-gray-600 mb-4", children: "Advanced mobile-optimized skeleton components with device-specific loading states, performance optimization, battery consciousness, and accessibility support." }), _jsx(Badge, { variant: "secondary", children: "Story 11 Implementation" })] }), _jsxs(Card, { className: "p-6", children: [_jsxs("div", { className: "flex flex-wrap gap-2 mb-6", children: [_jsx(Button, { variant: activeTab === 'overview' ? 'default' : 'outline', onClick: () => setActiveTab('overview'), size: "sm", children: "Overview" }), _jsx(Button, { variant: activeTab === 'skeletons' ? 'default' : 'outline', onClick: () => setActiveTab('skeletons'), size: "sm", children: "Skeletons" }), _jsx(Button, { variant: activeTab === 'loading' ? 'default' : 'outline', onClick: () => setActiveTab('loading'), size: "sm", children: "Loading States" }), _jsx(Button, { variant: activeTab === 'performance' ? 'default' : 'outline', onClick: () => setActiveTab('performance'), size: "sm", children: "Performance" }), _jsx(Button, { variant: activeTab === 'accessibility' ? 'default' : 'outline', onClick: () => setActiveTab('accessibility'), size: "sm", children: "Accessibility" })] }), activeTab === 'overview' && (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [_jsxs("div", { className: "p-4 bg-blue-50 rounded-lg", children: [_jsx("h3", { className: "font-semibold text-blue-900 mb-2", children: "Device State" }), _jsxs("div", { className: "space-y-1 text-sm", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Type:" }), " ", deviceLoadingStates.deviceState.deviceType] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Orientation:" }), " ", deviceLoadingStates.deviceState.orientation] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Screen:" }), " ", deviceLoadingStates.deviceState.screenSize] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Strategy:" }), " ", deviceLoadingStates.deviceState.loadingStates[0]?.type || 'skeleton'] })] })] }), _jsxs("div", { className: "p-4 bg-yellow-50 rounded-lg", children: [_jsx("h3", { className: "font-semibold text-yellow-900 mb-2", children: "Battery Status" }), _jsxs("div", { className: "space-y-1 text-sm", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Level:" }), " ", batteryConsciousLoading.getBatteryPercentage(), "%"] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Status:" }), " ", batteryConsciousLoading.batteryState.status] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Mode:" }), " ", batteryConsciousLoading.performanceMode] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Savings:" }), " ", batteryConsciousLoading.batterySavings, "%"] })] })] }), _jsxs("div", { className: "p-4 bg-green-50 rounded-lg", children: [_jsx("h3", { className: "font-semibold text-green-900 mb-2", children: "Performance" }), _jsxs("div", { className: "space-y-1 text-sm", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "FPS:" }), " ", loadingPerformance.performanceMetrics.frameRate] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Render:" }), " ", Math.round(loadingPerformance.performanceMetrics.renderTime), "ms"] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Memory:" }), " ", loadingPerformance.performanceMetrics.memoryUsage, "MB"] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Health:" }), " ", loadingPerformance.performanceHealth] })] })] }), _jsxs("div", { className: "p-4 bg-purple-50 rounded-lg", children: [_jsx("h3", { className: "font-semibold text-purple-900 mb-2", children: "Accessibility" }), _jsxs("div", { className: "space-y-1 text-sm", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Score:" }), " ", loadingAccessibility.accessibilityScore, "%"] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Features:" }), " ", loadingAccessibility.accessibilityFeatures.length] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Active:" }), " ", loadingAccessibility.activeFeatures.length] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Enhancing:" }), " ", loadingAccessibility.isEnhancing ? 'Yes' : 'No'] })] })] })] }), _jsxs("div", { className: "flex flex-wrap gap-4 justify-center", children: [_jsx(Button, { onClick: startLoading, disabled: isLoading, children: isLoading ? 'Loading...' : 'Start Loading Simulation' }), _jsxs(Button, { onClick: toggleSkeletons, variant: "outline", children: [showSkeletons ? 'Hide' : 'Show', " Skeletons"] }), _jsx(Button, { onClick: loadingPerformance.autoOptimize, variant: "outline", children: "Auto-Optimize Performance" }), _jsx(Button, { onClick: batteryConsciousLoading.optimizeLoadingForBattery, variant: "outline", children: "Optimize for Battery" }), _jsx(Button, { onClick: loadingAccessibility.autoEnableAccessibility, variant: "outline", children: "Enable All Accessibility" })] })] })), activeTab === 'skeletons' && (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "text-center mb-6", children: [_jsx("h3", { className: "text-xl font-semibold mb-2", children: "Mobile-Optimized Skeleton Components" }), _jsx("p", { className: "text-gray-600", children: "Device-specific skeleton variants with performance optimization and touch-friendly interactions" })] }), _jsx("div", { className: `${getLoadingStateClass()} ${getBatteryClass()} ${getPerformanceClass()} ${getAccessibilityClass()}`, children: showSkeletons && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "loading-skeleton", children: [_jsx("div", { className: "mobile-skeleton text-line animation-pulse touch-friendly", "aria-label": "Loading text line 1" }), _jsx("div", { className: "mobile-skeleton text-line animation-pulse touch-friendly", "aria-label": "Loading text line 2" }), _jsx("div", { className: "mobile-skeleton text-line animation-pulse touch-friendly", "aria-label": "Loading text line 3" })] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: "mobile-skeleton avatar animation-shimmer touch-friendly", "aria-label": "Loading avatar" }), _jsx("div", { className: "mobile-skeleton button animation-pulse touch-friendly", "aria-label": "Loading button" })] }), _jsx("div", { className: "mobile-skeleton card animation-wave touch-friendly", "aria-label": "Loading card content" })] })) }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsxs("div", { className: "p-4 bg-gray-50 rounded-lg", children: [_jsx("h4", { className: "font-semibold mb-2", children: "Available Skeleton Variants" }), _jsx("div", { className: "space-y-2 text-sm", children: mobileSkeleton.skeletonVariants.map(variant => (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { children: variant.name }), _jsx(Badge, { variant: variant.mobileOptimized ? "default" : "secondary", children: variant.animation })] }, variant.id))) })] }), _jsxs("div", { className: "p-4 bg-gray-50 rounded-lg", children: [_jsx("h4", { className: "font-semibold mb-2", children: "Device Optimizations" }), _jsxs("div", { className: "space-y-2 text-sm", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Mobile Optimized:" }), " ", mobileSkeleton.isMobileOptimized() ? 'Yes' : 'No'] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Loading Strategy:" }), " ", mobileSkeleton.getLoadingStrategy()] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Animation Intensity:" }), " ", mobileSkeleton.getAnimationIntensity()] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Touch Friendly:" }), " ", mobileSkeleton.skeletonVariants.some(v => v.touchFriendly) ? 'Yes' : 'No'] })] })] })] })] })), activeTab === 'loading' && (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "text-center mb-6", children: [_jsx("h3", { className: "text-xl font-semibold mb-2", children: "Device-Specific Loading States" }), _jsx("p", { className: "text-gray-600", children: "Adaptive loading states that automatically adjust based on device capabilities and battery level" })] }), isLoading && (_jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "loading-progress", children: _jsx("div", { className: "loading-progress-bar", style: { width: `${loadingProgress}%` }, "aria-label": `Loading progress: ${loadingProgress}%` }) }), _jsxs("p", { className: "text-center text-sm text-gray-600", children: ["Loading... ", loadingProgress, "%"] })] })), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-4", children: [_jsx("h4", { className: "font-semibold", children: "Current Device State" }), _jsxs("div", { className: "p-4 bg-blue-50 rounded-lg space-y-2", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Device:" }), " ", deviceLoadingStates.deviceState.deviceType] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Orientation:" }), " ", deviceLoadingStates.deviceState.orientation] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Performance:" }), " ", deviceLoadingStates.deviceState.performanceLevel] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Battery:" }), " ", deviceLoadingStates.deviceState.batteryLevel] }), _jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Adaptive:" }), " ", deviceLoadingStates.deviceState.adaptiveBehavior ? 'Yes' : 'No'] })] })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h4", { className: "font-semibold", children: "Available Loading States" }), _jsx("div", { className: "space-y-2", children: deviceLoadingStates.getLoadingStatesForDevice().map(state => (_jsxs("div", { className: "p-3 bg-gray-50 rounded-lg", children: [_jsxs("div", { className: "flex justify-between items-center mb-1", children: [_jsx("span", { className: "font-medium", children: state.name }), _jsx(Badge, { variant: "outline", children: state.type })] }), _jsxs("div", { className: "text-sm text-gray-600", children: [_jsxs("p", { children: ["Duration: ", state.duration, "ms"] }), _jsxs("p", { children: ["Complexity: ", state.complexity] }), _jsxs("p", { children: ["Performance: ", state.performance] })] })] }, state.id))) })] })] }), _jsxs("div", { className: "flex flex-wrap gap-4 justify-center", children: [_jsx(Button, { onClick: deviceLoadingStates.enableAdaptiveBehavior, variant: "outline", children: "Enable Adaptive Behavior" }), _jsx(Button, { onClick: deviceLoadingStates.adaptToPerformance, variant: "outline", children: "Adapt to Performance" }), _jsx(Button, { onClick: deviceLoadingStates.clearAdaptations, variant: "outline", children: "Clear Adaptations" })] })] })), activeTab === 'performance' && (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "text-center mb-6", children: [_jsx("h3", { className: "text-xl font-semibold mb-2", children: "Loading Performance Optimization" }), _jsx("p", { className: "text-gray-600", children: "Real-time performance monitoring with automatic optimization and battery-conscious strategies" })] }), _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [_jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingPerformance.performanceMetrics.frameRate }), _jsx("div", { className: "metric-label", children: "FPS" })] }), _jsxs("div", { className: "metric-item", children: [_jsxs("div", { className: "metric-value", children: [Math.round(loadingPerformance.performanceMetrics.renderTime), "ms"] }), _jsx("div", { className: "metric-label", children: "Render Time" })] }), _jsxs("div", { className: "metric-item", children: [_jsxs("div", { className: "metric-value", children: [loadingPerformance.performanceMetrics.memoryUsage, "MB"] }), _jsx("div", { className: "metric-label", children: "Memory" })] }), _jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingPerformance.getPerformanceScore() }), _jsx("div", { className: "metric-label", children: "Score" })] })] }), _jsxs("div", { className: "p-4 bg-gray-50 rounded-lg", children: [_jsxs("h4", { className: "font-semibold mb-3", children: ["Performance Health: ", loadingPerformance.performanceHealth] }), _jsx("div", { className: "space-y-2", children: loadingPerformance.getOptimizationRecommendations().map((recommendation, index) => (_jsxs("p", { className: "text-sm text-gray-600", children: ["\u2022 ", recommendation] }, index))) })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h4", { className: "font-semibold", children: "Applied Optimizations" }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: loadingPerformance.optimizationStrategies.map(strategy => (_jsxs("div", { className: "p-3 bg-green-50 rounded-lg", children: [_jsxs("div", { className: "flex justify-between items-center mb-1", children: [_jsx("span", { className: "font-medium", children: strategy.name }), _jsx(Badge, { variant: strategy.impact === 'high' ? 'default' : 'secondary', children: strategy.impact })] }), _jsx("p", { className: "text-sm text-gray-600", children: strategy.description })] }, strategy.id))) })] }), _jsxs("div", { className: "flex flex-wrap gap-4 justify-center", children: [_jsx(Button, { onClick: loadingPerformance.optimizeAnimations, variant: "outline", children: "Optimize Animations" }), _jsx(Button, { onClick: loadingPerformance.optimizeMemory, variant: "outline", children: "Optimize Memory" }), _jsx(Button, { onClick: loadingPerformance.optimizeBattery, variant: "outline", children: "Optimize Battery" }), _jsx(Button, { onClick: loadingPerformance.optimizePerformance, variant: "outline", children: "Optimize Overall" })] })] })), activeTab === 'accessibility' && (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "text-center mb-6", children: [_jsx("h3", { className: "text-xl font-semibold mb-2", children: "Loading Accessibility Support" }), _jsx("p", { className: "text-gray-600", children: "Comprehensive accessibility features including screen reader support, reduced motion, focus management, and ARIA" })] }), _jsxs("div", { className: "text-center p-6 bg-purple-50 rounded-lg", children: [_jsxs("div", { className: "text-4xl font-bold text-purple-600 mb-2", children: [loadingAccessibility.accessibilityScore, "%"] }), _jsx("p", { className: "text-purple-700 font-medium", children: "Accessibility Score" })] }), _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [_jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingAccessibility.accessibilityState.screenReaderActive ? '✓' : '✗' }), _jsx("div", { className: "metric-label", children: "Screen Reader" })] }), _jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingAccessibility.accessibilityState.reducedMotionEnabled ? '✓' : '✗' }), _jsx("div", { className: "metric-label", children: "Reduced Motion" })] }), _jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingAccessibility.accessibilityState.ariaLabelsActive ? '✓' : '✗' }), _jsx("div", { className: "metric-label", children: "ARIA Labels" })] }), _jsxs("div", { className: "metric-item", children: [_jsx("div", { className: "metric-value", children: loadingAccessibility.accessibilityState.keyboardNavigationActive ? '✓' : '✗' }), _jsx("div", { className: "metric-label", children: "Keyboard Nav" })] })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h4", { className: "font-semibold", children: "Active Accessibility Features" }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: loadingAccessibility.accessibilityFeatures.map(feature => (_jsxs("div", { className: "p-3 bg-purple-50 rounded-lg", children: [_jsxs("div", { className: "flex justify-between items-center mb-1", children: [_jsx("span", { className: "font-medium", children: feature.name }), _jsx(Badge, { variant: feature.impact === 'high' ? 'default' : 'secondary', children: feature.impact })] }), _jsx("p", { className: "text-sm text-gray-600", children: feature.description })] }, feature.id))) })] }), _jsxs("div", { className: "p-4 bg-blue-50 rounded-lg", children: [_jsx("h4", { className: "font-semibold mb-3", children: "Accessibility Recommendations" }), _jsx("div", { className: "space-y-2", children: loadingAccessibility.getAccessibilityRecommendations().map((recommendation, index) => (_jsxs("p", { className: "text-sm text-gray-600", children: ["\u2022 ", recommendation] }, index))) })] }), _jsxs("div", { className: "flex flex-wrap gap-4 justify-center", children: [_jsx(Button, { onClick: loadingAccessibility.enableScreenReaderSupport, variant: "outline", children: "Enable Screen Reader" }), _jsx(Button, { onClick: loadingAccessibility.enableReducedMotionSupport, variant: "outline", children: "Enable Reduced Motion" }), _jsx(Button, { onClick: loadingAccessibility.enableAriaSupport, variant: "outline", children: "Enable ARIA Support" }), _jsx(Button, { onClick: loadingAccessibility.enableKeyboardNavigation, variant: "outline", children: "Enable Keyboard Nav" })] })] }))] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [_jsxs("div", { className: `loading-status ${getBatteryClass()}`, children: [_jsx("div", { className: "w-3 h-3 bg-current rounded-full" }), _jsxs("span", { className: "text-sm font-medium", children: ["Battery: ", batteryConsciousLoading.getBatteryStatus()] })] }), _jsxs("div", { className: `loading-status ${getPerformanceClass()}`, children: [_jsx("div", { className: "w-3 h-3 bg-current rounded-full" }), _jsxs("span", { className: "text-sm font-medium", children: ["Performance: ", loadingPerformance.performanceHealth] })] }), _jsxs("div", { className: `loading-status ${getAccessibilityClass()}`, children: [_jsx("div", { className: "w-3 h-3 bg-current rounded-full" }), _jsxs("span", { className: "text-sm font-medium", children: ["Accessibility: ", loadingAccessibility.accessibilityScore, "%"] })] }), _jsxs("div", { className: "loading-status", children: [_jsx("div", { className: "w-3 h-3 bg-current rounded-full" }), _jsxs("span", { className: "text-sm font-medium", children: ["Device: ", deviceLoadingStates.deviceState.deviceType] })] })] }), batteryConsciousLoading.notifications.length > 0 && (_jsxs("div", { className: "space-y-2", children: [_jsx("h4", { className: "font-semibold", children: "Recent Notifications" }), batteryConsciousLoading.notifications.slice(-3).map((notification, index) => (_jsx("div", { className: "p-3 bg-blue-50 border border-blue-200 rounded-lg", children: _jsx("p", { className: "text-sm text-blue-800", children: notification }) }, index)))] }))] }));
|
|
143
|
+
};
|
|
144
|
+
export default MobileSkeletonLoadingDemo;
|