@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.11 → 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 -3
- package/dist/components/ui/navigation/index.js +0 -3
- 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 -5
- package/dist/components/ui/overlay/index.js +0 -5
- 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 -161
- package/dist/index.js +150 -161
- 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 -13
- package/dist/tokens/index.js +2 -13
- 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,645 +0,0 @@
|
|
|
1
|
-
// Screen reader optimization utilities
|
|
2
|
-
export class ScreenReaderOptimizer {
|
|
3
|
-
// Live region types for dynamic content
|
|
4
|
-
static readonly LIVE_REGIONS = {
|
|
5
|
-
POLITE: 'polite',
|
|
6
|
-
ASSERTIVE: 'assertive',
|
|
7
|
-
OFF: 'off'
|
|
8
|
-
} as const;
|
|
9
|
-
|
|
10
|
-
// Announcement priorities
|
|
11
|
-
static readonly PRIORITIES = {
|
|
12
|
-
LOW: 'low',
|
|
13
|
-
NORMAL: 'normal',
|
|
14
|
-
HIGH: 'high',
|
|
15
|
-
URGENT: 'urgent'
|
|
16
|
-
} as const;
|
|
17
|
-
|
|
18
|
-
private liveRegions: Map<string, HTMLElement>;
|
|
19
|
-
private announcementQueue: Array<{ message: string; priority: string; timestamp: number }>;
|
|
20
|
-
private isProcessingQueue: boolean;
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
this.liveRegions = new Map();
|
|
24
|
-
this.announcementQueue = [];
|
|
25
|
-
this.isProcessingQueue = false;
|
|
26
|
-
this.initializeLiveRegions();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Initialize live regions for different priorities
|
|
30
|
-
private initializeLiveRegions(): void {
|
|
31
|
-
const priorities = Object.values(ScreenReaderOptimizer.PRIORITIES);
|
|
32
|
-
|
|
33
|
-
priorities.forEach(priority => {
|
|
34
|
-
const region = document.createElement('div');
|
|
35
|
-
region.setAttribute('aria-live', this.getLiveRegionType(priority));
|
|
36
|
-
region.setAttribute('aria-atomic', 'true');
|
|
37
|
-
region.setAttribute('aria-relevant', 'additions text');
|
|
38
|
-
region.style.position = 'absolute';
|
|
39
|
-
region.style.left = '-10000px';
|
|
40
|
-
region.style.width = '1px';
|
|
41
|
-
region.style.height = '1px';
|
|
42
|
-
region.style.overflow = 'hidden';
|
|
43
|
-
region.setAttribute('data-screen-reader-priority', priority);
|
|
44
|
-
|
|
45
|
-
document.body.appendChild(region);
|
|
46
|
-
this.liveRegions.set(priority, region);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Get appropriate live region type for priority
|
|
51
|
-
private getLiveRegionType(priority: string): string {
|
|
52
|
-
switch (priority) {
|
|
53
|
-
case ScreenReaderOptimizer.PRIORITIES.URGENT:
|
|
54
|
-
return ScreenReaderOptimizer.LIVE_REGIONS.ASSERTIVE;
|
|
55
|
-
case ScreenReaderOptimizer.PRIORITIES.HIGH:
|
|
56
|
-
return ScreenReaderOptimizer.LIVE_REGIONS.ASSERTIVE;
|
|
57
|
-
case ScreenReaderOptimizer.PRIORITIES.NORMAL:
|
|
58
|
-
return ScreenReaderOptimizer.LIVE_REGIONS.POLITE;
|
|
59
|
-
case ScreenReaderOptimizer.PRIORITIES.LOW:
|
|
60
|
-
return ScreenReaderOptimizer.LIVE_REGIONS.POLITE;
|
|
61
|
-
default:
|
|
62
|
-
return ScreenReaderOptimizer.LIVE_REGIONS.POLITE;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Announce message to screen readers
|
|
67
|
-
announce(message: string, priority: string = ScreenReaderOptimizer.PRIORITIES.NORMAL): void {
|
|
68
|
-
if (!message || typeof message !== 'string') return;
|
|
69
|
-
|
|
70
|
-
const timestamp = Date.now();
|
|
71
|
-
this.announcementQueue.push({ message, priority, timestamp });
|
|
72
|
-
|
|
73
|
-
if (!this.isProcessingQueue) {
|
|
74
|
-
this.processAnnouncementQueue();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Process announcement queue
|
|
79
|
-
private async processAnnouncementQueue(): Promise<void> {
|
|
80
|
-
if (this.isProcessingQueue || this.announcementQueue.length === 0) return;
|
|
81
|
-
|
|
82
|
-
this.isProcessingQueue = true;
|
|
83
|
-
|
|
84
|
-
while (this.announcementQueue.length > 0) {
|
|
85
|
-
const announcement = this.announcementQueue.shift();
|
|
86
|
-
if (!announcement) continue;
|
|
87
|
-
|
|
88
|
-
await this.makeAnnouncement(announcement.message, announcement.priority);
|
|
89
|
-
|
|
90
|
-
// Small delay between announcements to prevent overlap
|
|
91
|
-
await this.delay(100);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
this.isProcessingQueue = false;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Make individual announcement
|
|
98
|
-
private async makeAnnouncement(message: string, priority: string): Promise<void> {
|
|
99
|
-
const region = this.liveRegions.get(priority);
|
|
100
|
-
if (!region) return;
|
|
101
|
-
|
|
102
|
-
// Clear previous content
|
|
103
|
-
region.textContent = '';
|
|
104
|
-
|
|
105
|
-
// Add new message
|
|
106
|
-
region.textContent = message;
|
|
107
|
-
|
|
108
|
-
// Force screen reader to announce
|
|
109
|
-
region.setAttribute('aria-hidden', 'true');
|
|
110
|
-
await this.delay(10);
|
|
111
|
-
region.setAttribute('aria-hidden', 'false');
|
|
112
|
-
|
|
113
|
-
// Clear content after announcement
|
|
114
|
-
setTimeout(() => {
|
|
115
|
-
region.textContent = '';
|
|
116
|
-
}, 1000);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Utility delay function
|
|
120
|
-
private delay(ms: number): Promise<void> {
|
|
121
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Announce page title change
|
|
125
|
-
announcePageTitle(title: string): void {
|
|
126
|
-
this.announce(`Page title changed to: ${title}`, ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Announce navigation change
|
|
130
|
-
announceNavigation(destination: string): void {
|
|
131
|
-
this.announce(`Navigated to: ${destination}`, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Announce form submission
|
|
135
|
-
announceFormSubmission(formName: string, success: boolean): void {
|
|
136
|
-
const message = success
|
|
137
|
-
? `Form ${formName} submitted successfully`
|
|
138
|
-
: `Form ${formName} submission failed`;
|
|
139
|
-
this.announce(message, success ? ScreenReaderOptimizer.PRIORITIES.NORMAL : ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// Announce loading state
|
|
143
|
-
announceLoading(component: string, isLoading: boolean): void {
|
|
144
|
-
const message = isLoading ? `${component} is loading` : `${component} finished loading`;
|
|
145
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Announce error
|
|
149
|
-
announceError(error: string): void {
|
|
150
|
-
this.announce(`Error: ${error}`, ScreenReaderOptimizer.PRIORITIES.URGENT);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Announce success
|
|
154
|
-
announceSuccess(message: string): void {
|
|
155
|
-
this.announce(`Success: ${message}`, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// Announce warning
|
|
159
|
-
announceWarning(message: string): void {
|
|
160
|
-
this.announce(`Warning: ${message}`, ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Announce information
|
|
164
|
-
announceInfo(message: string): void {
|
|
165
|
-
this.announce(`Information: ${message}`, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Announce count changes
|
|
169
|
-
announceCountChange(itemType: string, count: number, total?: number): void {
|
|
170
|
-
let message = `${itemType} count: ${count}`;
|
|
171
|
-
if (total !== undefined) {
|
|
172
|
-
message += ` of ${total}`;
|
|
173
|
-
}
|
|
174
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Announce selection changes
|
|
178
|
-
announceSelectionChange(itemType: string, selected: number, total: number): void {
|
|
179
|
-
const message = `${selected} of ${total} ${itemType} selected`;
|
|
180
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Announce progress updates
|
|
184
|
-
announceProgress(current: number, total: number, percentage: number): void {
|
|
185
|
-
const message = `Progress: ${current} of ${total} (${percentage}%)`;
|
|
186
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// Announce search results
|
|
190
|
-
announceSearchResults(query: string, count: number): void {
|
|
191
|
-
const message = `Found ${count} results for "${query}"`;
|
|
192
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Announce filter changes
|
|
196
|
-
announceFilterChange(filterName: string, value: string): void {
|
|
197
|
-
const message = `Filter ${filterName} changed to: ${value}`;
|
|
198
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Announce sort changes
|
|
202
|
-
announceSortChange(column: string, direction: 'ascending' | 'descending'): void {
|
|
203
|
-
const message = `Sorted by ${column} in ${direction} order`;
|
|
204
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Announce modal open/close
|
|
208
|
-
announceModalChange(modalName: string, isOpen: boolean): void {
|
|
209
|
-
const message = isOpen ? `${modalName} modal opened` : `${modalName} modal closed`;
|
|
210
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Announce tab changes
|
|
214
|
-
announceTabChange(tabName: string): void {
|
|
215
|
-
this.announce(`Switched to ${tabName} tab`, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Announce accordion changes
|
|
219
|
-
announceAccordionChange(sectionName: string, isExpanded: boolean): void {
|
|
220
|
-
const message = isExpanded ? `${sectionName} section expanded` : `${sectionName} section collapsed`;
|
|
221
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// Announce tree changes
|
|
225
|
-
announceTreeChange(nodeName: string, action: 'expanded' | 'collapsed' | 'selected'): void {
|
|
226
|
-
const message = `${nodeName} node ${action}`;
|
|
227
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Announce list changes
|
|
231
|
-
announceListChange(listName: string, action: 'added' | 'removed' | 'updated', itemName: string): void {
|
|
232
|
-
const message = `${itemName} ${action} from ${listName} list`;
|
|
233
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// Announce table changes
|
|
237
|
-
announceTableChange(tableName: string, action: 'row added' | 'row removed' | 'row updated' | 'sorted' | 'filtered'): void {
|
|
238
|
-
const message = `${tableName} table: ${action}`;
|
|
239
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// Announce form field changes
|
|
243
|
-
announceFormFieldChange(fieldName: string, value: string, isValid: boolean): void {
|
|
244
|
-
let message = `${fieldName} field changed to: ${value}`;
|
|
245
|
-
if (!isValid) {
|
|
246
|
-
message += '. Field has validation errors';
|
|
247
|
-
}
|
|
248
|
-
this.announce(message, isValid ? ScreenReaderOptimizer.PRIORITIES.LOW : ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// Announce validation errors
|
|
252
|
-
announceValidationErrors(fieldName: string, errors: string[]): void {
|
|
253
|
-
const errorList = errors.join(', ');
|
|
254
|
-
const message = `${fieldName} validation errors: ${errorList}`;
|
|
255
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// Announce focus changes
|
|
259
|
-
announceFocusChange(elementName: string, context?: string): void {
|
|
260
|
-
let message = `Focused on: ${elementName}`;
|
|
261
|
-
if (context) {
|
|
262
|
-
message += ` in ${context}`;
|
|
263
|
-
}
|
|
264
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// Announce keyboard shortcuts
|
|
268
|
-
announceKeyboardShortcut(action: string, shortcut: string): void {
|
|
269
|
-
const message = `${action}: ${shortcut}`;
|
|
270
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// Announce time-sensitive information
|
|
274
|
-
announceTimeSensitive(message: string, urgency: 'low' | 'medium' | 'high'): void {
|
|
275
|
-
const priority = urgency === 'high' ? ScreenReaderOptimizer.PRIORITIES.URGENT :
|
|
276
|
-
urgency === 'medium' ? ScreenReaderOptimizer.PRIORITIES.HIGH :
|
|
277
|
-
ScreenReaderOptimizer.PRIORITIES.NORMAL;
|
|
278
|
-
this.announce(message, priority);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// Announce status changes
|
|
282
|
-
announceStatusChange(component: string, oldStatus: string, newStatus: string): void {
|
|
283
|
-
const message = `${component} status changed from ${oldStatus} to ${newStatus}`;
|
|
284
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Announce data updates
|
|
288
|
-
announceDataUpdate(dataType: string, action: 'created' | 'updated' | 'deleted'): void {
|
|
289
|
-
const message = `${dataType} ${action}`;
|
|
290
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// Announce connection status
|
|
294
|
-
announceConnectionStatus(isConnected: boolean): void {
|
|
295
|
-
const message = isConnected ? 'Connection restored' : 'Connection lost';
|
|
296
|
-
this.announce(message, isConnected ? ScreenReaderOptimizer.PRIORITIES.NORMAL : ScreenReaderOptimizer.PRIORITIES.URGENT);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// Announce accessibility features
|
|
300
|
-
announceAccessibilityFeature(feature: string, enabled: boolean): void {
|
|
301
|
-
const message = `${feature} accessibility feature ${enabled ? 'enabled' : 'disabled'}`;
|
|
302
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// Announce theme changes
|
|
306
|
-
announceThemeChange(themeName: string): void {
|
|
307
|
-
this.announce(`Theme changed to: ${themeName}`, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Announce language changes
|
|
311
|
-
announceLanguageChange(language: string): void {
|
|
312
|
-
this.announce(`Language changed to: ${language}`, ScreenReaderOptimizer.PRIORITIES.HIGH);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// Announce font size changes
|
|
316
|
-
announceFontSizeChange(size: string): void {
|
|
317
|
-
this.announce(`Font size changed to: ${size}`, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// Announce contrast changes
|
|
321
|
-
announceContrastChange(isHighContrast: boolean): void {
|
|
322
|
-
const message = isHighContrast ? 'High contrast mode enabled' : 'High contrast mode disabled';
|
|
323
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.NORMAL);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// Announce motion changes
|
|
327
|
-
announceMotionChange(isReducedMotion: boolean): void {
|
|
328
|
-
const message = isReducedMotion ? 'Reduced motion enabled' : 'Reduced motion disabled';
|
|
329
|
-
this.announce(message, ScreenReaderOptimizer.PRIORITIES.LOW);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// Get announcement queue status
|
|
333
|
-
getQueueStatus(): { length: number; isProcessing: boolean } {
|
|
334
|
-
return {
|
|
335
|
-
length: this.announcementQueue.length,
|
|
336
|
-
isProcessing: this.isProcessingQueue
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// Clear announcement queue
|
|
341
|
-
clearQueue(): void {
|
|
342
|
-
this.announcementQueue = [];
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// Destroy live regions
|
|
346
|
-
destroy(): void {
|
|
347
|
-
this.liveRegions.forEach(region => {
|
|
348
|
-
if (region.parentNode) {
|
|
349
|
-
region.parentNode.removeChild(region);
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
this.liveRegions.clear();
|
|
353
|
-
this.clearQueue();
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Screen reader navigation utilities
|
|
358
|
-
export class ScreenReaderNavigation {
|
|
359
|
-
// Create skip link for main content
|
|
360
|
-
static createSkipLink(targetId: string, text: string = 'Skip to main content'): HTMLAnchorElement {
|
|
361
|
-
const skipLink = document.createElement('a');
|
|
362
|
-
skipLink.href = `#${targetId}`;
|
|
363
|
-
skipLink.textContent = text;
|
|
364
|
-
skipLink.className = 'sr-only sr-only-focusable';
|
|
365
|
-
skipLink.style.cssText = `
|
|
366
|
-
position: absolute;
|
|
367
|
-
top: -40px;
|
|
368
|
-
left: 6px;
|
|
369
|
-
z-index: 1000;
|
|
370
|
-
padding: 8px 16px;
|
|
371
|
-
background: #000;
|
|
372
|
-
color: #fff;
|
|
373
|
-
text-decoration: none;
|
|
374
|
-
border-radius: 4px;
|
|
375
|
-
font-size: 14px;
|
|
376
|
-
line-height: 1.2;
|
|
377
|
-
`;
|
|
378
|
-
|
|
379
|
-
skipLink.addEventListener('focus', () => {
|
|
380
|
-
skipLink.style.top = '6px';
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
skipLink.addEventListener('blur', () => {
|
|
384
|
-
skipLink.style.top = '-40px';
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
return skipLink;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
// Create landmark navigation
|
|
391
|
-
static createLandmarkNavigation(): HTMLDivElement {
|
|
392
|
-
const nav = document.createElement('div');
|
|
393
|
-
nav.setAttribute('role', 'navigation');
|
|
394
|
-
nav.setAttribute('aria-label', 'Landmark navigation');
|
|
395
|
-
nav.className = 'sr-only';
|
|
396
|
-
|
|
397
|
-
const landmarks = [
|
|
398
|
-
{ role: 'banner', label: 'Header' },
|
|
399
|
-
{ role: 'main', label: 'Main content' },
|
|
400
|
-
{ role: 'complementary', label: 'Sidebar' },
|
|
401
|
-
{ role: 'contentinfo', label: 'Footer' }
|
|
402
|
-
];
|
|
403
|
-
|
|
404
|
-
landmarks.forEach(landmark => {
|
|
405
|
-
const link = document.createElement('a');
|
|
406
|
-
link.href = `[role="${landmark.role}"]`;
|
|
407
|
-
link.textContent = `Skip to ${landmark.label}`;
|
|
408
|
-
link.className = 'sr-only-focusable';
|
|
409
|
-
nav.appendChild(link);
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
return nav;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// Create heading navigation
|
|
416
|
-
static createHeadingNavigation(): HTMLDivElement {
|
|
417
|
-
const nav = document.createElement('div');
|
|
418
|
-
nav.setAttribute('role', 'navigation');
|
|
419
|
-
nav.setAttribute('aria-label', 'Heading navigation');
|
|
420
|
-
nav.className = 'sr-only';
|
|
421
|
-
|
|
422
|
-
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
|
|
423
|
-
headings.forEach((heading, index) => {
|
|
424
|
-
const link = document.createElement('a');
|
|
425
|
-
link.href = `#${heading.id || `heading-${index}`}`;
|
|
426
|
-
link.textContent = `${heading.tagName.toLowerCase()} ${heading.textContent}`;
|
|
427
|
-
link.className = 'sr-only-focusable';
|
|
428
|
-
nav.appendChild(link);
|
|
429
|
-
});
|
|
430
|
-
|
|
431
|
-
return nav;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// Create form navigation
|
|
435
|
-
static createFormNavigation(): HTMLDivElement {
|
|
436
|
-
const nav = document.createElement('div');
|
|
437
|
-
nav.setAttribute('role', 'navigation');
|
|
438
|
-
nav.setAttribute('aria-label', 'Form navigation');
|
|
439
|
-
nav.className = 'sr-only';
|
|
440
|
-
|
|
441
|
-
const forms = document.querySelectorAll('form');
|
|
442
|
-
forms.forEach((form, index) => {
|
|
443
|
-
const link = document.createElement('a');
|
|
444
|
-
link.href = `#${form.id || `form-${index}`}`;
|
|
445
|
-
link.textContent = `Form ${index + 1}`;
|
|
446
|
-
link.className = 'sr-only-focusable';
|
|
447
|
-
nav.appendChild(link);
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
return nav;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// Create table navigation
|
|
454
|
-
static createTableNavigation(): HTMLDivElement {
|
|
455
|
-
const nav = document.createElement('div');
|
|
456
|
-
nav.setAttribute('role', 'navigation');
|
|
457
|
-
nav.setAttribute('aria-label', 'Table navigation');
|
|
458
|
-
nav.className = 'sr-only';
|
|
459
|
-
|
|
460
|
-
const tables = document.querySelectorAll('table');
|
|
461
|
-
tables.forEach((table, index) => {
|
|
462
|
-
const link = document.createElement('a');
|
|
463
|
-
link.href = `#${table.id || `table-${index}`}`;
|
|
464
|
-
link.textContent = `Table ${index + 1}`;
|
|
465
|
-
link.className = 'sr-only-focusable';
|
|
466
|
-
nav.appendChild(link);
|
|
467
|
-
});
|
|
468
|
-
|
|
469
|
-
return nav;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
// Create list navigation
|
|
473
|
-
static createListNavigation(): HTMLDivElement {
|
|
474
|
-
const nav = document.createElement('div');
|
|
475
|
-
nav.setAttribute('role', 'navigation');
|
|
476
|
-
nav.setAttribute('aria-label', 'List navigation');
|
|
477
|
-
nav.className = 'sr-only';
|
|
478
|
-
|
|
479
|
-
const lists = document.querySelectorAll('ul, ol');
|
|
480
|
-
lists.forEach((list, index) => {
|
|
481
|
-
const link = document.createElement('a');
|
|
482
|
-
link.href = `#${list.id || `list-${index}`}`;
|
|
483
|
-
link.textContent = `${list.tagName.toLowerCase()} with ${list.children.length} items`;
|
|
484
|
-
link.className = 'sr-only-focusable';
|
|
485
|
-
nav.appendChild(link);
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
return nav;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// Create link navigation
|
|
492
|
-
static createLinkNavigation(): HTMLDivElement {
|
|
493
|
-
const nav = document.createElement('div');
|
|
494
|
-
nav.setAttribute('role', 'navigation');
|
|
495
|
-
nav.setAttribute('aria-label', 'Link navigation');
|
|
496
|
-
nav.className = 'sr-only';
|
|
497
|
-
|
|
498
|
-
const links = document.querySelectorAll('a[href]:not([href="#"])');
|
|
499
|
-
links.forEach((link, index) => {
|
|
500
|
-
const navLink = document.createElement('a');
|
|
501
|
-
navLink.href = (link as HTMLAnchorElement).href;
|
|
502
|
-
navLink.textContent = (link as HTMLAnchorElement).textContent || `Link ${index + 1}`;
|
|
503
|
-
navLink.className = 'sr-only-focusable';
|
|
504
|
-
nav.appendChild(navLink);
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
return nav;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// Create button navigation
|
|
511
|
-
static createButtonNavigation(): HTMLDivElement {
|
|
512
|
-
const nav = document.createElement('div');
|
|
513
|
-
nav.setAttribute('role', 'navigation');
|
|
514
|
-
nav.setAttribute('aria-label', 'Button navigation');
|
|
515
|
-
nav.className = 'sr-only';
|
|
516
|
-
|
|
517
|
-
const buttons = document.querySelectorAll('button, [role="button"]');
|
|
518
|
-
buttons.forEach((button, index) => {
|
|
519
|
-
const link = document.createElement('a');
|
|
520
|
-
link.href = `#${button.id || `button-${index}`}`;
|
|
521
|
-
link.textContent = (button as HTMLElement).textContent || `Button ${index + 1}`;
|
|
522
|
-
link.className = 'sr-only-focusable';
|
|
523
|
-
nav.appendChild(link);
|
|
524
|
-
});
|
|
525
|
-
|
|
526
|
-
return nav;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
// Create input navigation
|
|
530
|
-
static createInputNavigation(): HTMLDivElement {
|
|
531
|
-
const nav = document.createElement('div');
|
|
532
|
-
nav.setAttribute('role', 'navigation');
|
|
533
|
-
nav.setAttribute('aria-label', 'Input navigation');
|
|
534
|
-
nav.className = 'sr-only';
|
|
535
|
-
|
|
536
|
-
const inputs = document.querySelectorAll('input, textarea, select');
|
|
537
|
-
inputs.forEach((input, index) => {
|
|
538
|
-
const link = document.createElement('a');
|
|
539
|
-
link.href = `#${input.id || `input-${index}`}`;
|
|
540
|
-
const label = (input as HTMLElement).getAttribute('aria-label') ||
|
|
541
|
-
(input as HTMLElement).getAttribute('placeholder') ||
|
|
542
|
-
(input as HTMLElement).getAttribute('name') ||
|
|
543
|
-
`Input ${index + 1}`;
|
|
544
|
-
link.textContent = label;
|
|
545
|
-
link.className = 'sr-only-focusable';
|
|
546
|
-
nav.appendChild(link);
|
|
547
|
-
});
|
|
548
|
-
|
|
549
|
-
return nav;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// Create image navigation
|
|
553
|
-
static createImageNavigation(): HTMLDivElement {
|
|
554
|
-
const nav = document.createElement('div');
|
|
555
|
-
nav.setAttribute('role', 'navigation');
|
|
556
|
-
nav.setAttribute('aria-label', 'Image navigation');
|
|
557
|
-
nav.className = 'sr-only';
|
|
558
|
-
|
|
559
|
-
const images = document.querySelectorAll('img');
|
|
560
|
-
images.forEach((img, index) => {
|
|
561
|
-
const link = document.createElement('a');
|
|
562
|
-
link.href = `#${img.id || `image-${index}`}`;
|
|
563
|
-
const alt = (img as HTMLImageElement).alt || `Image ${index + 1}`;
|
|
564
|
-
link.textContent = alt;
|
|
565
|
-
link.className = 'sr-only-focusable';
|
|
566
|
-
nav.appendChild(link);
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
return nav;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
// Create media navigation
|
|
573
|
-
static createMediaNavigation(): HTMLDivElement {
|
|
574
|
-
const nav = document.createElement('div');
|
|
575
|
-
nav.setAttribute('role', 'navigation');
|
|
576
|
-
nav.setAttribute('aria-label', 'Media navigation');
|
|
577
|
-
nav.className = 'sr-only';
|
|
578
|
-
|
|
579
|
-
const media = document.querySelectorAll('video, audio');
|
|
580
|
-
media.forEach((element, index) => {
|
|
581
|
-
const link = document.createElement('a');
|
|
582
|
-
link.href = `#${element.id || `${element.tagName.toLowerCase()}-${index}`}`;
|
|
583
|
-
link.textContent = `${element.tagName} ${index + 1}`;
|
|
584
|
-
link.className = 'sr-only-focusable';
|
|
585
|
-
nav.appendChild(link);
|
|
586
|
-
});
|
|
587
|
-
|
|
588
|
-
return nav;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
// Create section navigation
|
|
592
|
-
static createSectionNavigation(): HTMLDivElement {
|
|
593
|
-
const nav = document.createElement('div');
|
|
594
|
-
nav.setAttribute('role', 'navigation');
|
|
595
|
-
nav.setAttribute('aria-label', 'Section navigation');
|
|
596
|
-
nav.className = 'sr-only';
|
|
597
|
-
|
|
598
|
-
const sections = document.querySelectorAll('section, article, aside');
|
|
599
|
-
sections.forEach((section, index) => {
|
|
600
|
-
const link = document.createElement('a');
|
|
601
|
-
link.href = `#${section.id || `${section.tagName.toLowerCase()}-${index}`}`;
|
|
602
|
-
const title = (section as HTMLElement).getAttribute('aria-label') ||
|
|
603
|
-
(section as HTMLElement).querySelector('h1, h2, h3, h4, h5, h6')?.textContent ||
|
|
604
|
-
`${section.tagName} ${index + 1}`;
|
|
605
|
-
link.textContent = title;
|
|
606
|
-
link.className = 'sr-only-focusable';
|
|
607
|
-
nav.appendChild(link);
|
|
608
|
-
});
|
|
609
|
-
|
|
610
|
-
return nav;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
// Create comprehensive navigation
|
|
614
|
-
static createComprehensiveNavigation(): HTMLDivElement {
|
|
615
|
-
const nav = document.createElement('div');
|
|
616
|
-
nav.setAttribute('role', 'navigation');
|
|
617
|
-
nav.setAttribute('aria-label', 'Comprehensive navigation');
|
|
618
|
-
nav.className = 'sr-only';
|
|
619
|
-
|
|
620
|
-
// Add all navigation types
|
|
621
|
-
nav.appendChild(ScreenReaderNavigation.createLandmarkNavigation());
|
|
622
|
-
nav.appendChild(ScreenReaderNavigation.createHeadingNavigation());
|
|
623
|
-
nav.appendChild(ScreenReaderNavigation.createFormNavigation());
|
|
624
|
-
nav.appendChild(ScreenReaderNavigation.createTableNavigation());
|
|
625
|
-
nav.appendChild(ScreenReaderNavigation.createListNavigation());
|
|
626
|
-
nav.appendChild(ScreenReaderNavigation.createLinkNavigation());
|
|
627
|
-
nav.appendChild(ScreenReaderNavigation.createButtonNavigation());
|
|
628
|
-
nav.appendChild(ScreenReaderNavigation.createInputNavigation());
|
|
629
|
-
nav.appendChild(ScreenReaderNavigation.createImageNavigation());
|
|
630
|
-
nav.appendChild(ScreenReaderNavigation.createMediaNavigation());
|
|
631
|
-
nav.appendChild(ScreenReaderNavigation.createSectionNavigation());
|
|
632
|
-
|
|
633
|
-
return nav;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
// Export default instances
|
|
638
|
-
export declare const screenReaderOptimizer: new ScreenReaderOptimizer();
|
|
639
|
-
|
|
640
|
-
// Export default
|
|
641
|
-
export default {
|
|
642
|
-
ScreenReaderOptimizer,
|
|
643
|
-
ScreenReaderNavigation,
|
|
644
|
-
screenReaderOptimizer
|
|
645
|
-
};
|