@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.
Files changed (483) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/components/ui/accessibility-demo.esm.js +80 -258
  3. package/dist/components/ui/accessibility-demo.js +80 -258
  4. package/dist/components/ui/advanced-component-architecture-demo.esm.js +256 -916
  5. package/dist/components/ui/advanced-component-architecture-demo.js +256 -916
  6. package/dist/components/ui/advanced-transition-system-demo.esm.js +59 -670
  7. package/dist/components/ui/advanced-transition-system-demo.js +59 -670
  8. package/dist/components/ui/advanced-transition-system.esm.js +194 -378
  9. package/dist/components/ui/advanced-transition-system.js +194 -378
  10. package/dist/components/ui/animation/animated-container.esm.js +98 -159
  11. package/dist/components/ui/animation/animated-container.js +98 -159
  12. package/dist/components/ui/animation/index.esm.js +3 -18
  13. package/dist/components/ui/animation/index.js +3 -18
  14. package/dist/components/ui/animation/staggered-container.esm.js +37 -68
  15. package/dist/components/ui/animation/staggered-container.js +37 -68
  16. package/dist/components/ui/animation-demo.esm.js +30 -250
  17. package/dist/components/ui/animation-demo.js +30 -250
  18. package/dist/components/ui/badge.esm.js +15 -28
  19. package/dist/components/ui/badge.js +15 -28
  20. package/dist/components/ui/battery-conscious-animation-demo.esm.js +136 -565
  21. package/dist/components/ui/battery-conscious-animation-demo.js +136 -565
  22. package/dist/components/ui/border-radius-shadow-demo.esm.js +3 -184
  23. package/dist/components/ui/border-radius-shadow-demo.js +3 -184
  24. package/dist/components/ui/button.esm.js +14 -33
  25. package/dist/components/ui/button.js +14 -33
  26. package/dist/components/ui/card.esm.js +74 -188
  27. package/dist/components/ui/card.js +74 -188
  28. package/dist/components/ui/checkbox.esm.js +11 -30
  29. package/dist/components/ui/checkbox.js +11 -30
  30. package/dist/components/ui/color-preview.esm.js +50 -405
  31. package/dist/components/ui/color-preview.js +50 -405
  32. package/dist/components/ui/data-display/chart.esm.js +210 -632
  33. package/dist/components/ui/data-display/chart.js +210 -632
  34. package/dist/components/ui/data-display/data-grid-simple.esm.js +16 -74
  35. package/dist/components/ui/data-display/data-grid-simple.js +16 -74
  36. package/dist/components/ui/data-display/data-grid.esm.js +173 -661
  37. package/dist/components/ui/data-display/data-grid.js +173 -661
  38. package/dist/components/ui/data-display/list.esm.js +88 -446
  39. package/dist/components/ui/data-display/list.js +88 -446
  40. package/dist/components/ui/data-display/table.esm.js +109 -468
  41. package/dist/components/ui/data-display/table.js +109 -468
  42. package/dist/components/ui/data-display/timeline.esm.js +92 -431
  43. package/dist/components/ui/data-display/timeline.js +92 -431
  44. package/dist/components/ui/data-display/tree.esm.js +211 -585
  45. package/dist/components/ui/data-display/tree.js +211 -585
  46. package/dist/components/ui/data-display/types.esm.js +1 -530
  47. package/dist/components/ui/data-display/types.js +1 -530
  48. package/dist/components/ui/enterprise-mobile-experience-demo.esm.js +76 -749
  49. package/dist/components/ui/enterprise-mobile-experience-demo.js +76 -749
  50. package/dist/components/ui/enterprise-mobile-experience.esm.js +152 -460
  51. package/dist/components/ui/enterprise-mobile-experience.js +152 -460
  52. package/dist/components/ui/feedback/alert.esm.js +40 -148
  53. package/dist/components/ui/feedback/alert.js +40 -148
  54. package/dist/components/ui/feedback/progress.esm.js +74 -278
  55. package/dist/components/ui/feedback/progress.js +74 -278
  56. package/dist/components/ui/feedback/skeleton.esm.js +64 -173
  57. package/dist/components/ui/feedback/skeleton.js +64 -173
  58. package/dist/components/ui/feedback/toast.esm.js +86 -225
  59. package/dist/components/ui/feedback/toast.js +86 -225
  60. package/dist/components/ui/feedback/types.esm.js +1 -125
  61. package/dist/components/ui/feedback/types.js +1 -125
  62. package/dist/components/ui/font-preview.esm.js +56 -283
  63. package/dist/components/ui/font-preview.js +56 -283
  64. package/dist/components/ui/form-demo.esm.js +191 -553
  65. package/dist/components/ui/form-demo.js +191 -553
  66. package/dist/components/ui/hardware-acceleration-demo.esm.js +103 -544
  67. package/dist/components/ui/hardware-acceleration-demo.js +103 -544
  68. package/dist/components/ui/input.esm.js +13 -32
  69. package/dist/components/ui/input.js +13 -32
  70. package/dist/components/ui/label.esm.js +6 -16
  71. package/dist/components/ui/label.js +6 -16
  72. package/dist/components/ui/layout-demo.esm.js +76 -367
  73. package/dist/components/ui/layout-demo.js +76 -367
  74. package/dist/components/ui/layouts/adaptive-layout.esm.js +60 -139
  75. package/dist/components/ui/layouts/adaptive-layout.js +60 -139
  76. package/dist/components/ui/layouts/desktop-layout.esm.js +39 -224
  77. package/dist/components/ui/layouts/desktop-layout.js +39 -224
  78. package/dist/components/ui/layouts/index.esm.js +4 -10
  79. package/dist/components/ui/layouts/index.js +4 -10
  80. package/dist/components/ui/layouts/mobile-layout.esm.js +49 -162
  81. package/dist/components/ui/layouts/mobile-layout.js +49 -162
  82. package/dist/components/ui/layouts/tablet-layout.esm.js +53 -197
  83. package/dist/components/ui/layouts/tablet-layout.js +53 -197
  84. package/dist/components/ui/mobile-form-validation.esm.js +185 -420
  85. package/dist/components/ui/mobile-form-validation.js +185 -420
  86. package/dist/components/ui/mobile-input-demo.esm.js +11 -198
  87. package/dist/components/ui/mobile-input-demo.js +11 -198
  88. package/dist/components/ui/mobile-input.esm.js +187 -270
  89. package/dist/components/ui/mobile-input.js +187 -270
  90. package/dist/components/ui/mobile-skeleton-loading-demo.esm.js +144 -638
  91. package/dist/components/ui/mobile-skeleton-loading-demo.js +144 -638
  92. package/dist/components/ui/navigation/breadcrumb.esm.js +51 -154
  93. package/dist/components/ui/navigation/breadcrumb.js +51 -154
  94. package/dist/components/ui/navigation/index.esm.js +0 -3
  95. package/dist/components/ui/navigation/index.js +0 -3
  96. package/dist/components/ui/navigation/menu.esm.js +178 -365
  97. package/dist/components/ui/navigation/menu.js +178 -365
  98. package/dist/components/ui/navigation/navigation-demo.esm.js +130 -315
  99. package/dist/components/ui/navigation/navigation-demo.js +130 -315
  100. package/dist/components/ui/navigation/pagination.esm.js +142 -264
  101. package/dist/components/ui/navigation/pagination.js +142 -264
  102. package/dist/components/ui/navigation/sidebar.esm.js +156 -368
  103. package/dist/components/ui/navigation/sidebar.js +156 -368
  104. package/dist/components/ui/navigation/stepper.esm.js +131 -295
  105. package/dist/components/ui/navigation/stepper.js +131 -295
  106. package/dist/components/ui/navigation/tabs.esm.js +89 -198
  107. package/dist/components/ui/navigation/tabs.js +89 -198
  108. package/dist/components/ui/navigation/types.esm.js +1 -295
  109. package/dist/components/ui/navigation/types.js +1 -295
  110. package/dist/components/ui/overlay/backdrop.esm.js +39 -78
  111. package/dist/components/ui/overlay/backdrop.js +39 -78
  112. package/dist/components/ui/overlay/focus-manager.esm.js +96 -140
  113. package/dist/components/ui/overlay/focus-manager.js +96 -140
  114. package/dist/components/ui/overlay/index.esm.js +0 -5
  115. package/dist/components/ui/overlay/index.js +0 -5
  116. package/dist/components/ui/overlay/modal.esm.js +94 -249
  117. package/dist/components/ui/overlay/modal.js +94 -249
  118. package/dist/components/ui/overlay/overlay-manager.esm.js +60 -100
  119. package/dist/components/ui/overlay/overlay-manager.js +60 -100
  120. package/dist/components/ui/overlay/popover.esm.js +258 -438
  121. package/dist/components/ui/overlay/popover.js +258 -438
  122. package/dist/components/ui/overlay/portal.esm.js +45 -74
  123. package/dist/components/ui/overlay/portal.js +45 -74
  124. package/dist/components/ui/overlay/tooltip.esm.js +202 -288
  125. package/dist/components/ui/overlay/tooltip.js +202 -288
  126. package/dist/components/ui/overlay/types.esm.js +1 -196
  127. package/dist/components/ui/overlay/types.js +1 -196
  128. package/dist/components/ui/performance-demo.esm.js +110 -596
  129. package/dist/components/ui/performance-demo.js +110 -596
  130. package/dist/components/ui/semantic-input-system-demo.esm.js +87 -501
  131. package/dist/components/ui/semantic-input-system-demo.js +87 -501
  132. package/dist/components/ui/theme-customizer.esm.js +123 -371
  133. package/dist/components/ui/theme-customizer.js +123 -371
  134. package/dist/components/ui/theme-preview.esm.js +44 -306
  135. package/dist/components/ui/theme-preview.js +44 -306
  136. package/dist/components/ui/theme-switcher.esm.js +79 -258
  137. package/dist/components/ui/theme-switcher.js +79 -258
  138. package/dist/components/ui/theme-toggle.esm.js +22 -35
  139. package/dist/components/ui/theme-toggle.js +22 -35
  140. package/dist/components/ui/token-demo.esm.js +42 -189
  141. package/dist/components/ui/token-demo.js +42 -189
  142. package/dist/components/ui/touch-demo.esm.js +96 -462
  143. package/dist/components/ui/touch-demo.js +96 -462
  144. package/dist/components/ui/touch-friendly-interface-demo.esm.js +63 -519
  145. package/dist/components/ui/touch-friendly-interface-demo.js +63 -519
  146. package/dist/components/ui/touch-friendly-interface.esm.js +103 -281
  147. package/dist/components/ui/touch-friendly-interface.js +103 -281
  148. package/dist/hooks/index.esm.js +23 -181
  149. package/dist/hooks/index.js +23 -181
  150. package/dist/hooks/use-accessibility-support.esm.js +377 -518
  151. package/dist/hooks/use-accessibility-support.js +377 -518
  152. package/dist/hooks/use-adaptive-layout.esm.js +212 -287
  153. package/dist/hooks/use-adaptive-layout.js +212 -287
  154. package/dist/hooks/use-advanced-patterns.esm.js +185 -293
  155. package/dist/hooks/use-advanced-patterns.js +185 -293
  156. package/dist/hooks/use-advanced-transition-system.esm.js +286 -392
  157. package/dist/hooks/use-advanced-transition-system.js +286 -392
  158. package/dist/hooks/use-animation-profile.esm.js +221 -283
  159. package/dist/hooks/use-animation-profile.js +221 -283
  160. package/dist/hooks/use-battery-animations.esm.js +310 -384
  161. package/dist/hooks/use-battery-animations.js +310 -384
  162. package/dist/hooks/use-battery-conscious-loading.esm.js +374 -468
  163. package/dist/hooks/use-battery-conscious-loading.js +374 -468
  164. package/dist/hooks/use-battery-optimization.esm.js +267 -329
  165. package/dist/hooks/use-battery-optimization.js +267 -329
  166. package/dist/hooks/use-battery-status.esm.js +213 -293
  167. package/dist/hooks/use-battery-status.js +213 -293
  168. package/dist/hooks/use-component-performance.esm.js +235 -341
  169. package/dist/hooks/use-component-performance.js +235 -341
  170. package/dist/hooks/use-device-loading-states.esm.js +356 -457
  171. package/dist/hooks/use-device-loading-states.js +356 -457
  172. package/dist/hooks/use-device.esm.js +77 -102
  173. package/dist/hooks/use-device.js +77 -102
  174. package/dist/hooks/use-enterprise-mobile-experience.esm.js +349 -487
  175. package/dist/hooks/use-enterprise-mobile-experience.js +349 -487
  176. package/dist/hooks/use-form-feedback.esm.js +313 -398
  177. package/dist/hooks/use-form-feedback.js +313 -398
  178. package/dist/hooks/use-form-performance.esm.js +407 -500
  179. package/dist/hooks/use-form-performance.js +407 -500
  180. package/dist/hooks/use-frame-rate.esm.js +178 -251
  181. package/dist/hooks/use-frame-rate.js +178 -251
  182. package/dist/hooks/use-gestures.esm.js +230 -332
  183. package/dist/hooks/use-gestures.js +230 -332
  184. package/dist/hooks/use-hardware-acceleration.esm.js +246 -339
  185. package/dist/hooks/use-hardware-acceleration.js +246 -339
  186. package/dist/hooks/use-input-accessibility.esm.js +350 -454
  187. package/dist/hooks/use-input-accessibility.js +350 -454
  188. package/dist/hooks/use-input-performance.esm.js +419 -502
  189. package/dist/hooks/use-input-performance.js +419 -502
  190. package/dist/hooks/use-layout-performance.esm.js +233 -319
  191. package/dist/hooks/use-layout-performance.js +233 -319
  192. package/dist/hooks/use-loading-accessibility.esm.js +421 -531
  193. package/dist/hooks/use-loading-accessibility.js +421 -531
  194. package/dist/hooks/use-loading-performance.esm.js +398 -469
  195. package/dist/hooks/use-loading-performance.js +398 -469
  196. package/dist/hooks/use-memory-usage.esm.js +211 -287
  197. package/dist/hooks/use-memory-usage.js +211 -287
  198. package/dist/hooks/use-mobile-form-layout.esm.js +365 -458
  199. package/dist/hooks/use-mobile-form-layout.js +365 -458
  200. package/dist/hooks/use-mobile-form-validation.esm.js +384 -497
  201. package/dist/hooks/use-mobile-form-validation.js +384 -497
  202. package/dist/hooks/use-mobile-keyboard-optimization.esm.js +354 -468
  203. package/dist/hooks/use-mobile-keyboard-optimization.js +354 -468
  204. package/dist/hooks/use-mobile-layout.esm.js +207 -294
  205. package/dist/hooks/use-mobile-layout.js +207 -294
  206. package/dist/hooks/use-mobile-optimization.esm.js +308 -404
  207. package/dist/hooks/use-mobile-optimization.js +308 -404
  208. package/dist/hooks/use-mobile-skeleton.esm.js +300 -402
  209. package/dist/hooks/use-mobile-skeleton.js +300 -402
  210. package/dist/hooks/use-mobile-touch.esm.js +314 -412
  211. package/dist/hooks/use-mobile-touch.js +314 -412
  212. package/dist/hooks/use-performance-throttling.esm.js +276 -344
  213. package/dist/hooks/use-performance-throttling.js +276 -344
  214. package/dist/hooks/use-performance.esm.js +216 -313
  215. package/dist/hooks/use-performance.js +216 -313
  216. package/dist/hooks/use-reusable-architecture.esm.js +255 -408
  217. package/dist/hooks/use-reusable-architecture.js +255 -408
  218. package/dist/hooks/use-semantic-input-types.esm.js +290 -356
  219. package/dist/hooks/use-semantic-input-types.js +290 -356
  220. package/dist/hooks/use-semantic-input.esm.js +446 -549
  221. package/dist/hooks/use-semantic-input.js +446 -549
  222. package/dist/hooks/use-tablet-layout.esm.js +279 -384
  223. package/dist/hooks/use-tablet-layout.js +279 -384
  224. package/dist/hooks/use-touch-friendly-input.esm.js +401 -519
  225. package/dist/hooks/use-touch-friendly-input.js +401 -519
  226. package/dist/hooks/use-touch-friendly-interface.esm.js +242 -331
  227. package/dist/hooks/use-touch-friendly-interface.js +242 -331
  228. package/dist/hooks/use-touch-optimization.esm.js +288 -370
  229. package/dist/hooks/use-touch-optimization.js +288 -370
  230. package/dist/index.esm.js +150 -161
  231. package/dist/index.js +150 -161
  232. package/dist/lib/utils.esm.js +4 -5
  233. package/dist/lib/utils.js +4 -5
  234. package/dist/plugins/theme-css-generator.esm.js +292 -346
  235. package/dist/plugins/theme-css-generator.js +292 -346
  236. package/dist/provider.esm.js +3 -19
  237. package/dist/provider.js +3 -19
  238. package/dist/styles/layers/validation.esm.js +275 -0
  239. package/dist/styles/layers/validation.js +275 -0
  240. package/dist/styles.css +1 -1
  241. package/dist/theme.esm.js +654 -658
  242. package/dist/theme.js +654 -658
  243. package/dist/themes/ThemeContext.esm.js +1 -27
  244. package/dist/themes/ThemeContext.js +1 -27
  245. package/dist/themes/ThemeProvider.esm.js +191 -223
  246. package/dist/themes/ThemeProvider.js +191 -223
  247. package/dist/themes/accessibility/index.esm.js +0 -4
  248. package/dist/themes/accessibility/index.js +0 -4
  249. package/dist/themes/accessibility.esm.js +175 -240
  250. package/dist/themes/accessibility.js +175 -240
  251. package/dist/themes/aria-patterns.esm.js +345 -401
  252. package/dist/themes/aria-patterns.js +345 -401
  253. package/dist/themes/base-themes.esm.js +15 -24
  254. package/dist/themes/base-themes.js +15 -24
  255. package/dist/themes/colorManager.esm.js +293 -357
  256. package/dist/themes/colorManager.js +293 -357
  257. package/dist/themes/examples/dark-theme.esm.js +129 -133
  258. package/dist/themes/examples/dark-theme.js +129 -133
  259. package/dist/themes/examples/minimal-theme.esm.js +80 -85
  260. package/dist/themes/examples/minimal-theme.js +80 -85
  261. package/dist/themes/focus-management.esm.js +541 -677
  262. package/dist/themes/focus-management.js +541 -677
  263. package/dist/themes/fontLoader.esm.js +151 -180
  264. package/dist/themes/fontLoader.js +151 -180
  265. package/dist/themes/high-contrast.esm.js +394 -558
  266. package/dist/themes/high-contrast.js +394 -558
  267. package/dist/themes/index.esm.js +1 -9
  268. package/dist/themes/index.js +1 -9
  269. package/dist/themes/inheritance.esm.js +145 -180
  270. package/dist/themes/inheritance.js +145 -180
  271. package/dist/themes/keyboard-navigation.esm.js +418 -510
  272. package/dist/themes/keyboard-navigation.js +418 -510
  273. package/dist/themes/motion-reduction.esm.js +434 -591
  274. package/dist/themes/motion-reduction.js +434 -591
  275. package/dist/themes/navigation.esm.js +1 -234
  276. package/dist/themes/navigation.js +1 -234
  277. package/dist/themes/screen-reader.esm.js +515 -616
  278. package/dist/themes/screen-reader.js +515 -616
  279. package/dist/themes/systemThemeDetector.esm.js +135 -164
  280. package/dist/themes/systemThemeDetector.js +135 -164
  281. package/dist/themes/themeCSSUpdater.esm.js +217 -252
  282. package/dist/themes/themeCSSUpdater.js +217 -252
  283. package/dist/themes/themePersistence.esm.js +181 -212
  284. package/dist/themes/themePersistence.js +181 -212
  285. package/dist/themes/themes/default.esm.js +584 -0
  286. package/dist/themes/themes/default.js +584 -0
  287. package/dist/themes/themes/harvey.esm.js +551 -0
  288. package/dist/themes/themes/harvey.js +551 -0
  289. package/dist/themes/themes/stan-design.esm.js +654 -658
  290. package/dist/themes/themes/stan-design.js +654 -658
  291. package/dist/themes/types.esm.js +1 -458
  292. package/dist/themes/types.js +1 -458
  293. package/dist/themes/useSystemTheme.esm.js +34 -42
  294. package/dist/themes/useSystemTheme.js +34 -42
  295. package/dist/themes/useTheme.esm.js +23 -28
  296. package/dist/themes/useTheme.js +23 -28
  297. package/dist/themes/validation.esm.js +380 -433
  298. package/dist/themes/validation.js +380 -433
  299. package/dist/tokens/index.esm.js +2 -13
  300. package/dist/tokens/index.js +2 -13
  301. package/dist/tokens/tokenExporter.esm.js +309 -373
  302. package/dist/tokens/tokenExporter.js +309 -373
  303. package/dist/tokens/tokenGenerator.esm.js +241 -273
  304. package/dist/tokens/tokenGenerator.js +241 -273
  305. package/dist/tokens/tokenManager.esm.js +187 -241
  306. package/dist/tokens/tokenManager.js +187 -241
  307. package/dist/tokens/tokenValidator.esm.js +402 -522
  308. package/dist/tokens/tokenValidator.js +402 -522
  309. package/dist/tokens/types.esm.js +1 -78
  310. package/dist/tokens/types.js +1 -78
  311. package/dist/types.esm.js +3 -0
  312. package/dist/types.js +3 -0
  313. package/dist/utils/bundle-analyzer.esm.js +188 -246
  314. package/dist/utils/bundle-analyzer.js +188 -246
  315. package/dist/utils/bundle-splitting.esm.js +330 -458
  316. package/dist/utils/bundle-splitting.js +330 -458
  317. package/dist/utils/lazy-loading.esm.js +311 -417
  318. package/dist/utils/lazy-loading.js +311 -417
  319. package/dist/utils/performance-monitor.esm.js +369 -490
  320. package/dist/utils/performance-monitor.js +369 -490
  321. package/dist/utils/tree-shaking.esm.js +194 -264
  322. package/dist/utils/tree-shaking.js +194 -264
  323. package/package.json +18 -2
  324. package/src/index.ts +150 -149
  325. package/src/provider.tsx +3 -3
  326. package/src/theme.ts +1 -1
  327. package/{dist/theme.d.ts → src/themes/themes/default.ts} +77 -169
  328. package/src/themes/themes/harvey.ts +554 -0
  329. package/{dist/themes/types.d.ts → src/types.ts} +7 -1
  330. package/dist/components/ui/accessibility-demo.d.ts +0 -259
  331. package/dist/components/ui/advanced-component-architecture-demo.d.ts +0 -718
  332. package/dist/components/ui/advanced-transition-system-demo.d.ts +0 -660
  333. package/dist/components/ui/advanced-transition-system.d.ts +0 -391
  334. package/dist/components/ui/animation/animated-container.d.ts +0 -162
  335. package/dist/components/ui/animation/index.d.ts +0 -9
  336. package/dist/components/ui/animation/staggered-container.d.ts +0 -64
  337. package/dist/components/ui/animation-demo.d.ts +0 -238
  338. package/dist/components/ui/badge.d.ts +0 -28
  339. package/dist/components/ui/battery-conscious-animation-demo.d.ts +0 -561
  340. package/dist/components/ui/border-radius-shadow-demo.d.ts +0 -183
  341. package/dist/components/ui/button.d.ts +0 -33
  342. package/dist/components/ui/card.d.ts +0 -205
  343. package/dist/components/ui/checkbox.d.ts +0 -26
  344. package/dist/components/ui/color-preview.d.ts +0 -402
  345. package/dist/components/ui/data-display/chart.d.ts +0 -646
  346. package/dist/components/ui/data-display/data-grid-simple.d.ts +0 -73
  347. package/dist/components/ui/data-display/data-grid.d.ts +0 -670
  348. package/dist/components/ui/data-display/list.d.ts +0 -448
  349. package/dist/components/ui/data-display/table.d.ts +0 -472
  350. package/dist/components/ui/data-display/timeline.d.ts +0 -433
  351. package/dist/components/ui/data-display/tree.d.ts +0 -594
  352. package/dist/components/ui/data-display/types.d.ts +0 -534
  353. package/dist/components/ui/enterprise-mobile-experience-demo.d.ts +0 -735
  354. package/dist/components/ui/enterprise-mobile-experience.d.ts +0 -461
  355. package/dist/components/ui/feedback/alert.d.ts +0 -154
  356. package/dist/components/ui/feedback/progress.d.ts +0 -288
  357. package/dist/components/ui/feedback/skeleton.d.ts +0 -182
  358. package/dist/components/ui/feedback/toast.d.ts +0 -277
  359. package/dist/components/ui/feedback/types.d.ts +0 -123
  360. package/dist/components/ui/font-preview.d.ts +0 -282
  361. package/dist/components/ui/form-demo.d.ts +0 -544
  362. package/dist/components/ui/hardware-acceleration-demo.d.ts +0 -540
  363. package/dist/components/ui/input.d.ts +0 -33
  364. package/dist/components/ui/label.d.ts +0 -13
  365. package/dist/components/ui/layout-demo.d.ts +0 -352
  366. package/dist/components/ui/layouts/adaptive-layout.d.ts +0 -132
  367. package/dist/components/ui/layouts/desktop-layout.d.ts +0 -219
  368. package/dist/components/ui/layouts/index.d.ts +0 -5
  369. package/dist/components/ui/layouts/mobile-layout.d.ts +0 -158
  370. package/dist/components/ui/layouts/tablet-layout.d.ts +0 -192
  371. package/dist/components/ui/mobile-form-validation.d.ts +0 -439
  372. package/dist/components/ui/mobile-input-demo.d.ts +0 -197
  373. package/dist/components/ui/mobile-input.d.ts +0 -273
  374. package/dist/components/ui/mobile-skeleton-loading-demo.d.ts +0 -628
  375. package/dist/components/ui/navigation/breadcrumb.d.ts +0 -149
  376. package/dist/components/ui/navigation/index.d.ts +0 -25
  377. package/dist/components/ui/navigation/menu.d.ts +0 -366
  378. package/dist/components/ui/navigation/navigation-demo.d.ts +0 -169
  379. package/dist/components/ui/navigation/pagination.d.ts +0 -261
  380. package/dist/components/ui/navigation/sidebar.d.ts +0 -375
  381. package/dist/components/ui/navigation/stepper.d.ts +0 -294
  382. package/dist/components/ui/navigation/tabs.d.ts +0 -196
  383. package/dist/components/ui/navigation/types.d.ts +0 -293
  384. package/dist/components/ui/overlay/backdrop.d.ts +0 -79
  385. package/dist/components/ui/overlay/focus-manager.d.ts +0 -141
  386. package/dist/components/ui/overlay/index.d.ts +0 -27
  387. package/dist/components/ui/overlay/modal.d.ts +0 -262
  388. package/dist/components/ui/overlay/overlay-manager.d.ts +0 -107
  389. package/dist/components/ui/overlay/popover.d.ts +0 -450
  390. package/dist/components/ui/overlay/portal.d.ts +0 -75
  391. package/dist/components/ui/overlay/tooltip.d.ts +0 -298
  392. package/dist/components/ui/overlay/types.d.ts +0 -194
  393. package/dist/components/ui/performance-demo.d.ts +0 -583
  394. package/dist/components/ui/semantic-input-system-demo.d.ts +0 -490
  395. package/dist/components/ui/theme-customizer.d.ts +0 -378
  396. package/dist/components/ui/theme-preview.d.ts +0 -305
  397. package/dist/components/ui/theme-switcher.d.ts +0 -259
  398. package/dist/components/ui/theme-toggle.d.ts +0 -34
  399. package/dist/components/ui/token-demo.d.ts +0 -188
  400. package/dist/components/ui/touch-demo.d.ts +0 -455
  401. package/dist/components/ui/touch-friendly-interface-demo.d.ts +0 -512
  402. package/dist/components/ui/touch-friendly-interface.d.ts +0 -292
  403. package/dist/hooks/index.d.ts +0 -161
  404. package/dist/hooks/use-accessibility-support.d.ts +0 -516
  405. package/dist/hooks/use-adaptive-layout.d.ts +0 -287
  406. package/dist/hooks/use-advanced-patterns.d.ts +0 -292
  407. package/dist/hooks/use-advanced-transition-system.d.ts +0 -390
  408. package/dist/hooks/use-animation-profile.d.ts +0 -285
  409. package/dist/hooks/use-battery-animations.d.ts +0 -382
  410. package/dist/hooks/use-battery-conscious-loading.d.ts +0 -473
  411. package/dist/hooks/use-battery-optimization.d.ts +0 -328
  412. package/dist/hooks/use-battery-status.d.ts +0 -297
  413. package/dist/hooks/use-component-performance.d.ts +0 -342
  414. package/dist/hooks/use-device-loading-states.d.ts +0 -456
  415. package/dist/hooks/use-device.d.ts +0 -104
  416. package/dist/hooks/use-enterprise-mobile-experience.d.ts +0 -486
  417. package/dist/hooks/use-form-feedback.d.ts +0 -401
  418. package/dist/hooks/use-form-performance.d.ts +0 -511
  419. package/dist/hooks/use-frame-rate.d.ts +0 -249
  420. package/dist/hooks/use-gestures.d.ts +0 -336
  421. package/dist/hooks/use-hardware-acceleration.d.ts +0 -339
  422. package/dist/hooks/use-input-accessibility.d.ts +0 -451
  423. package/dist/hooks/use-input-performance.d.ts +0 -503
  424. package/dist/hooks/use-layout-performance.d.ts +0 -317
  425. package/dist/hooks/use-loading-accessibility.d.ts +0 -532
  426. package/dist/hooks/use-loading-performance.d.ts +0 -471
  427. package/dist/hooks/use-memory-usage.d.ts +0 -285
  428. package/dist/hooks/use-mobile-form-layout.d.ts +0 -462
  429. package/dist/hooks/use-mobile-form-validation.d.ts +0 -516
  430. package/dist/hooks/use-mobile-keyboard-optimization.d.ts +0 -469
  431. package/dist/hooks/use-mobile-layout.d.ts +0 -300
  432. package/dist/hooks/use-mobile-optimization.d.ts +0 -404
  433. package/dist/hooks/use-mobile-skeleton.d.ts +0 -399
  434. package/dist/hooks/use-mobile-touch.d.ts +0 -412
  435. package/dist/hooks/use-performance-throttling.d.ts +0 -346
  436. package/dist/hooks/use-performance.d.ts +0 -314
  437. package/dist/hooks/use-reusable-architecture.d.ts +0 -412
  438. package/dist/hooks/use-semantic-input-types.d.ts +0 -354
  439. package/dist/hooks/use-semantic-input.d.ts +0 -563
  440. package/dist/hooks/use-tablet-layout.d.ts +0 -382
  441. package/dist/hooks/use-touch-friendly-input.d.ts +0 -520
  442. package/dist/hooks/use-touch-friendly-interface.d.ts +0 -329
  443. package/dist/hooks/use-touch-optimization.d.ts +0 -373
  444. package/dist/index.d.ts +0 -149
  445. package/dist/lib/utils.d.ts +0 -3
  446. package/dist/plugins/theme-css-generator.d.ts +0 -345
  447. package/dist/provider.d.ts +0 -17
  448. package/dist/themes/ThemeContext.d.ts +0 -27
  449. package/dist/themes/ThemeProvider.d.ts +0 -222
  450. package/dist/themes/accessibility/index.d.ts +0 -7
  451. package/dist/themes/accessibility.d.ts +0 -259
  452. package/dist/themes/aria-patterns.d.ts +0 -418
  453. package/dist/themes/base-themes.d.ts +0 -34
  454. package/dist/themes/colorManager.d.ts +0 -327
  455. package/dist/themes/examples/dark-theme.d.ts +0 -139
  456. package/dist/themes/examples/minimal-theme.d.ts +0 -93
  457. package/dist/themes/focus-management.d.ts +0 -699
  458. package/dist/themes/fontLoader.d.ts +0 -163
  459. package/dist/themes/high-contrast.d.ts +0 -619
  460. package/dist/themes/index.d.ts +0 -11
  461. package/dist/themes/inheritance.d.ts +0 -160
  462. package/dist/themes/keyboard-navigation.d.ts +0 -550
  463. package/dist/themes/motion-reduction.d.ts +0 -660
  464. package/dist/themes/navigation.d.ts +0 -232
  465. package/dist/themes/screen-reader.d.ts +0 -645
  466. package/dist/themes/systemThemeDetector.d.ts +0 -148
  467. package/dist/themes/themeCSSUpdater.d.ts +0 -229
  468. package/dist/themes/themePersistence.d.ts +0 -192
  469. package/dist/themes/themes/stan-design.d.ts +0 -678
  470. package/dist/themes/useSystemTheme.d.ts +0 -43
  471. package/dist/themes/useTheme.d.ts +0 -20
  472. package/dist/themes/validation.d.ts +0 -406
  473. package/dist/tokens/index.d.ts +0 -25
  474. package/dist/tokens/tokenExporter.d.ts +0 -336
  475. package/dist/tokens/tokenGenerator.d.ts +0 -250
  476. package/dist/tokens/tokenManager.d.ts +0 -194
  477. package/dist/tokens/tokenValidator.d.ts +0 -488
  478. package/dist/tokens/types.d.ts +0 -78
  479. package/dist/utils/bundle-analyzer.d.ts +0 -260
  480. package/dist/utils/bundle-splitting.d.ts +0 -483
  481. package/dist/utils/lazy-loading.d.ts +0 -437
  482. package/dist/utils/performance-monitor.d.ts +0 -513
  483. package/dist/utils/tree-shaking.d.ts +0 -274
@@ -1,176 +1,118 @@
1
1
  import { screenReaderOptimizer } from './screen-reader';
2
-
3
- // Motion reduction theme configuration
4
- export interface MotionReductionThemeConfig {
5
- motion: {
6
- reduced: boolean;
7
- duration: {
8
- fast: string;
9
- normal: string;
10
- slow: string;
11
- };
12
- easing: {
13
- ease: string;
14
- easeIn: string;
15
- easeOut: string;
16
- easeInOut: string;
17
- };
18
- animations: {
19
- enabled: boolean;
20
- type: 'none' | 'reduced' | 'full';
21
- preferences: {
22
- reduceMotion: boolean;
23
- reduceAnimation: boolean;
24
- reduceTransition: boolean;
25
- reduceTransform: boolean;
26
- };
27
- };
28
- };
29
- }
30
-
31
2
  // Motion reduction utilities
32
3
  export class MotionReductionManager {
33
- private isReducedMotion: boolean = false;
34
- private isReducedAnimation: boolean = false;
35
- private isReducedTransition: boolean = false;
36
- private isReducedTransform: boolean = false;
37
- // private motionPreferences: Set<string> = new Set(); // Unused for now
38
- private originalStyles: Map<HTMLElement, string> = new Map();
39
- private reducedMotionStyles: Map<HTMLElement, string> = new Map();
40
-
41
- constructor() {
42
- this.initializeSystemPreference();
43
- this.setupEventListeners();
44
- }
45
-
46
- // Initialize system preference detection
47
- private initializeSystemPreference(): void {
48
- if (typeof window !== 'undefined' && window.matchMedia) {
49
- const reducedMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
50
- this.isReducedMotion = reducedMotionQuery.matches;
51
-
52
- reducedMotionQuery.addEventListener('change', (e) => {
53
- this.isReducedMotion = e.matches;
4
+ constructor() {
5
+ this.isReducedMotion = false;
6
+ this.isReducedAnimation = false;
7
+ this.isReducedTransition = false;
8
+ this.isReducedTransform = false;
9
+ // private motionPreferences: Set<string> = new Set(); // Unused for now
10
+ this.originalStyles = new Map();
11
+ this.reducedMotionStyles = new Map();
12
+ this.initializeSystemPreference();
13
+ this.setupEventListeners();
14
+ }
15
+ // Initialize system preference detection
16
+ initializeSystemPreference() {
17
+ if (typeof window !== 'undefined' && window.matchMedia) {
18
+ const reducedMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
19
+ this.isReducedMotion = reducedMotionQuery.matches;
20
+ reducedMotionQuery.addEventListener('change', (e) => {
21
+ this.isReducedMotion = e.matches;
22
+ this.applyMotionReduction();
23
+ });
24
+ }
25
+ }
26
+ // Setup event listeners
27
+ setupEventListeners() {
28
+ // Listen for preference changes
29
+ if (typeof window !== 'undefined') {
30
+ window.addEventListener('storage', (e) => {
31
+ if (e.key === 'motion-reduction-preferences') {
32
+ this.loadPreferences();
33
+ }
34
+ });
35
+ }
36
+ }
37
+ // Enable motion reduction
38
+ enable() {
39
+ this.isReducedMotion = true;
40
+ this.applyMotionReduction();
41
+ }
42
+ // Disable motion reduction
43
+ disable() {
44
+ this.isReducedMotion = false;
45
+ this.removeMotionReduction();
46
+ }
47
+ // Toggle motion reduction
48
+ toggle() {
49
+ if (this.isReducedMotion) {
50
+ this.disable();
51
+ }
52
+ else {
53
+ this.enable();
54
+ }
55
+ }
56
+ // Check if motion reduction is enabled
57
+ isMotionReduced() {
58
+ return this.isReducedMotion;
59
+ }
60
+ // Set specific motion reduction preferences
61
+ setPreferences(preferences) {
62
+ if (preferences.reduceAnimation !== undefined) {
63
+ this.isReducedAnimation = preferences.reduceAnimation;
64
+ }
65
+ if (preferences.reduceTransition !== undefined) {
66
+ this.isReducedTransition = preferences.reduceTransition;
67
+ }
68
+ if (preferences.reduceTransform !== undefined) {
69
+ this.isReducedTransform = preferences.reduceTransform;
70
+ }
71
+ this.savePreferences();
54
72
  this.applyMotionReduction();
55
- });
56
- }
57
- }
58
-
59
- // Setup event listeners
60
- private setupEventListeners(): void {
61
- // Listen for preference changes
62
- if (typeof window !== 'undefined') {
63
- window.addEventListener('storage', (e) => {
64
- if (e.key === 'motion-reduction-preferences') {
65
- this.loadPreferences();
66
- }
67
- });
68
- }
69
- }
70
-
71
- // Enable motion reduction
72
- enable(): void {
73
- this.isReducedMotion = true;
74
- this.applyMotionReduction();
75
- }
76
-
77
- // Disable motion reduction
78
- disable(): void {
79
- this.isReducedMotion = false;
80
- this.removeMotionReduction();
81
- }
82
-
83
- // Toggle motion reduction
84
- toggle(): void {
85
- if (this.isReducedMotion) {
86
- this.disable();
87
- } else {
88
- this.enable();
89
- }
90
- }
91
-
92
- // Check if motion reduction is enabled
93
- isMotionReduced(): boolean {
94
- return this.isReducedMotion;
95
- }
96
-
97
- // Set specific motion reduction preferences
98
- setPreferences(preferences: {
99
- reduceAnimation?: boolean;
100
- reduceTransition?: boolean;
101
- reduceTransform?: boolean;
102
- }): void {
103
- if (preferences.reduceAnimation !== undefined) {
104
- this.isReducedAnimation = preferences.reduceAnimation;
105
- }
106
- if (preferences.reduceTransition !== undefined) {
107
- this.isReducedTransition = preferences.reduceTransition;
108
- }
109
- if (preferences.reduceTransform !== undefined) {
110
- this.isReducedTransform = preferences.reduceTransform;
111
- }
112
-
113
- this.savePreferences();
114
- this.applyMotionReduction();
115
- }
116
-
117
- // Get current motion reduction preferences
118
- getPreferences(): {
119
- reduceMotion: boolean;
120
- reduceAnimation: boolean;
121
- reduceTransition: boolean;
122
- reduceTransform: boolean;
123
- } {
124
- return {
125
- reduceMotion: this.isReducedMotion,
126
- reduceAnimation: this.isReducedAnimation,
127
- reduceTransition: this.isReducedTransition,
128
- reduceTransform: this.isReducedTransform
129
- };
130
- }
131
-
132
- // Apply motion reduction to the document
133
- applyMotionReduction(): void {
134
- if (!this.isReducedMotion) return;
135
-
136
- // Add reduced motion class to document
137
- document.documentElement.classList.add('reduced-motion');
138
-
73
+ }
74
+ // Get current motion reduction preferences
75
+ getPreferences() {
76
+ return {
77
+ reduceMotion: this.isReducedMotion,
78
+ reduceAnimation: this.isReducedAnimation,
79
+ reduceTransition: this.isReducedTransition,
80
+ reduceTransform: this.isReducedTransform
81
+ };
82
+ }
83
+ // Apply motion reduction to the document
84
+ applyMotionReduction() {
85
+ if (!this.isReducedMotion)
86
+ return;
87
+ // Add reduced motion class to document
88
+ document.documentElement.classList.add('reduced-motion');
89
+ // Apply reduced motion styles
90
+ this.applyReducedMotionStyles();
91
+ // Process existing elements
92
+ this.processExistingElements();
93
+ // Announce motion reduction change
94
+ if (screenReaderOptimizer) {
95
+ screenReaderOptimizer.announceMotionChange(true);
96
+ }
97
+ }
98
+ // Remove motion reduction from the document
99
+ removeMotionReduction() {
100
+ // Remove reduced motion class
101
+ document.documentElement.classList.remove('reduced-motion');
102
+ // Remove reduced motion styles
103
+ this.removeReducedMotionStyles();
104
+ // Restore original styles
105
+ this.restoreOriginalStyles();
106
+ // Announce motion reduction change
107
+ if (screenReaderOptimizer) {
108
+ screenReaderOptimizer.announceMotionChange(false);
109
+ }
110
+ }
139
111
  // Apply reduced motion styles
140
- this.applyReducedMotionStyles();
141
-
142
- // Process existing elements
143
- this.processExistingElements();
144
-
145
- // Announce motion reduction change
146
- if (screenReaderOptimizer) {
147
- screenReaderOptimizer.announceMotionChange(true);
148
- }
149
- }
150
-
151
- // Remove motion reduction from the document
152
- removeMotionReduction(): void {
153
- // Remove reduced motion class
154
- document.documentElement.classList.remove('reduced-motion');
155
-
156
- // Remove reduced motion styles
157
- this.removeReducedMotionStyles();
158
-
159
- // Restore original styles
160
- this.restoreOriginalStyles();
161
-
162
- // Announce motion reduction change
163
- if (screenReaderOptimizer) {
164
- screenReaderOptimizer.announceMotionChange(false);
165
- }
166
- }
167
-
168
- // Apply reduced motion styles
169
- private applyReducedMotionStyles(): void {
170
- const style = document.createElement('style');
171
- style.id = 'reduced-motion-styles';
172
-
173
- style.textContent = `
112
+ applyReducedMotionStyles() {
113
+ const style = document.createElement('style');
114
+ style.id = 'reduced-motion-styles';
115
+ style.textContent = `
174
116
  .reduced-motion,
175
117
  .reduced-motion * {
176
118
  /* Disable animations */
@@ -224,439 +166,340 @@ export class MotionReductionManager {
224
166
  scroll-behavior: auto !important;
225
167
  }
226
168
  `;
227
-
228
- document.head.appendChild(style);
229
- }
230
-
231
- // Remove reduced motion styles
232
- private removeReducedMotionStyles(): void {
233
- const style = document.getElementById('reduced-motion-styles');
234
- if (style) {
235
- style.remove();
236
- }
237
- }
238
-
239
- // Process existing elements
240
- private processExistingElements(): void {
241
- // Process elements with animations
242
- const animatedElements = document.querySelectorAll('[class*="animate"], [class*="transition"], [class*="transform"]');
243
- animatedElements.forEach(element => {
244
- this.processElement(element as HTMLElement);
245
- });
246
-
247
- // Process elements with data attributes
248
- const motionElements = document.querySelectorAll('[data-motion], [data-animation], [data-transition]');
249
- motionElements.forEach(element => {
250
- this.processElement(element as HTMLElement);
251
- });
252
- }
253
-
254
- // Process individual element
255
- private processElement(element: HTMLElement): void {
256
- // Store original styles if not already stored
257
- if (!this.originalStyles.has(element)) {
258
- this.originalStyles.set(element, element.style.cssText);
259
- }
260
-
261
- // Apply reduced motion styles
262
- const reducedStyles = this.getReducedMotionStyles(element);
263
- element.style.cssText = reducedStyles;
264
-
265
- // Store reduced styles
266
- this.reducedMotionStyles.set(element, reducedStyles);
267
- }
268
-
269
- // Get reduced motion styles for element
270
- private getReducedMotionStyles(element: HTMLElement): string {
271
- const originalStyles = element.style.cssText;
272
-
273
- let reducedStyles = originalStyles;
274
-
275
- // Remove animation properties
276
- if (this.isReducedAnimation) {
277
- reducedStyles = reducedStyles.replace(/animation[^;]*;?/g, '');
278
- reducedStyles += 'animation: none !important;';
279
- }
280
-
281
- // Remove transition properties
282
- if (this.isReducedTransition) {
283
- reducedStyles = reducedStyles.replace(/transition[^;]*;?/g, '');
284
- reducedStyles += 'transition: none !important;';
285
- }
286
-
287
- // Remove transform properties
288
- if (this.isReducedTransform) {
289
- reducedStyles = reducedStyles.replace(/transform[^;]*;?/g, '');
290
- reducedStyles += 'transform: none !important;';
291
- }
292
-
293
- return reducedStyles;
294
- }
295
-
296
- // Restore original styles
297
- private restoreOriginalStyles(): void {
298
- this.originalStyles.forEach((originalStyle, element) => {
299
- if (element && element.offsetParent !== null) {
300
- element.style.cssText = originalStyle;
301
- }
302
- });
303
-
304
- this.originalStyles.clear();
305
- this.reducedMotionStyles.clear();
306
- }
307
-
308
- // Save preferences to localStorage
309
- private savePreferences(): void {
310
- if (typeof window !== 'undefined' && window.localStorage) {
311
- const preferences = {
312
- reduceAnimation: this.isReducedAnimation,
313
- reduceTransition: this.isReducedTransition,
314
- reduceTransform: this.isReducedTransform,
315
- timestamp: Date.now()
316
- };
317
-
318
- window.localStorage.setItem('motion-reduction-preferences', JSON.stringify(preferences));
319
- }
320
- }
321
-
322
- // Load preferences from localStorage
323
- private loadPreferences(): void {
324
- if (typeof window !== 'undefined' && window.localStorage) {
325
- try {
326
- const stored = window.localStorage.getItem('motion-reduction-preferences');
327
- if (stored) {
328
- const preferences = JSON.parse(stored);
329
-
330
- this.isReducedAnimation = preferences.reduceAnimation || false;
331
- this.isReducedTransition = preferences.reduceTransition || false;
332
- this.isReducedTransform = preferences.reduceTransform || false;
333
- }
334
- } catch (error) {
335
- console.warn('Failed to load motion reduction preferences:', error);
336
- }
169
+ document.head.appendChild(style);
170
+ }
171
+ // Remove reduced motion styles
172
+ removeReducedMotionStyles() {
173
+ const style = document.getElementById('reduced-motion-styles');
174
+ if (style) {
175
+ style.remove();
176
+ }
177
+ }
178
+ // Process existing elements
179
+ processExistingElements() {
180
+ // Process elements with animations
181
+ const animatedElements = document.querySelectorAll('[class*="animate"], [class*="transition"], [class*="transform"]');
182
+ animatedElements.forEach(element => {
183
+ this.processElement(element);
184
+ });
185
+ // Process elements with data attributes
186
+ const motionElements = document.querySelectorAll('[data-motion], [data-animation], [data-transition]');
187
+ motionElements.forEach(element => {
188
+ this.processElement(element);
189
+ });
190
+ }
191
+ // Process individual element
192
+ processElement(element) {
193
+ // Store original styles if not already stored
194
+ if (!this.originalStyles.has(element)) {
195
+ this.originalStyles.set(element, element.style.cssText);
196
+ }
197
+ // Apply reduced motion styles
198
+ const reducedStyles = this.getReducedMotionStyles(element);
199
+ element.style.cssText = reducedStyles;
200
+ // Store reduced styles
201
+ this.reducedMotionStyles.set(element, reducedStyles);
202
+ }
203
+ // Get reduced motion styles for element
204
+ getReducedMotionStyles(element) {
205
+ const originalStyles = element.style.cssText;
206
+ let reducedStyles = originalStyles;
207
+ // Remove animation properties
208
+ if (this.isReducedAnimation) {
209
+ reducedStyles = reducedStyles.replace(/animation[^;]*;?/g, '');
210
+ reducedStyles += 'animation: none !important;';
211
+ }
212
+ // Remove transition properties
213
+ if (this.isReducedTransition) {
214
+ reducedStyles = reducedStyles.replace(/transition[^;]*;?/g, '');
215
+ reducedStyles += 'transition: none !important;';
216
+ }
217
+ // Remove transform properties
218
+ if (this.isReducedTransform) {
219
+ reducedStyles = reducedStyles.replace(/transform[^;]*;?/g, '');
220
+ reducedStyles += 'transform: none !important;';
221
+ }
222
+ return reducedStyles;
223
+ }
224
+ // Restore original styles
225
+ restoreOriginalStyles() {
226
+ this.originalStyles.forEach((originalStyle, element) => {
227
+ if (element && element.offsetParent !== null) {
228
+ element.style.cssText = originalStyle;
229
+ }
230
+ });
231
+ this.originalStyles.clear();
232
+ this.reducedMotionStyles.clear();
233
+ }
234
+ // Save preferences to localStorage
235
+ savePreferences() {
236
+ if (typeof window !== 'undefined' && window.localStorage) {
237
+ const preferences = {
238
+ reduceAnimation: this.isReducedAnimation,
239
+ reduceTransition: this.isReducedTransition,
240
+ reduceTransform: this.isReducedTransform,
241
+ timestamp: Date.now()
242
+ };
243
+ window.localStorage.setItem('motion-reduction-preferences', JSON.stringify(preferences));
244
+ }
245
+ }
246
+ // Load preferences from localStorage
247
+ loadPreferences() {
248
+ if (typeof window !== 'undefined' && window.localStorage) {
249
+ try {
250
+ const stored = window.localStorage.getItem('motion-reduction-preferences');
251
+ if (stored) {
252
+ const preferences = JSON.parse(stored);
253
+ this.isReducedAnimation = preferences.reduceAnimation || false;
254
+ this.isReducedTransition = preferences.reduceTransition || false;
255
+ this.isReducedTransform = preferences.reduceTransform || false;
256
+ }
257
+ }
258
+ catch (error) {
259
+ console.warn('Failed to load motion reduction preferences:', error);
260
+ }
261
+ }
262
+ }
263
+ // Check if element should have motion reduced
264
+ shouldReduceMotion(element) {
265
+ if (!this.isReducedMotion)
266
+ return false;
267
+ // Check for motion-safe override
268
+ if (element.classList.contains('motion-safe') || element.getAttribute('data-motion-safe') === 'true') {
269
+ return false;
270
+ }
271
+ // Check for motion-reduce override
272
+ if (element.classList.contains('motion-reduce') || element.getAttribute('data-motion-reduce') === 'true') {
273
+ return true;
274
+ }
275
+ return true;
276
+ }
277
+ // Get appropriate duration for element
278
+ getDuration(element, defaultDuration, type) {
279
+ if (!this.shouldReduceMotion(element)) {
280
+ return defaultDuration;
281
+ }
282
+ // Parse duration
283
+ const duration = parseFloat(defaultDuration);
284
+ const unit = defaultDuration.replace(/[\d.]/g, '');
285
+ if (type === 'animation') {
286
+ return this.isReducedAnimation ? '0.01ms' : `${Math.min(duration * 0.1, 50)}${unit}`;
287
+ }
288
+ else {
289
+ return this.isReducedTransition ? '0.01ms' : `${Math.min(duration * 0.1, 50)}${unit}`;
290
+ }
291
+ }
292
+ // Get appropriate easing for element
293
+ getEasing(element, defaultEasing) {
294
+ if (!this.shouldReduceMotion(element)) {
295
+ return defaultEasing;
296
+ }
297
+ // Use linear easing for reduced motion
298
+ return 'linear';
299
+ }
300
+ // Create motion-safe wrapper
301
+ createMotionSafeWrapper(element, callback) {
302
+ if (!this.shouldReduceMotion(element)) {
303
+ callback();
304
+ return;
305
+ }
306
+ // Execute callback without motion
307
+ const originalReducedMotion = this.isReducedMotion;
308
+ this.isReducedMotion = false;
309
+ try {
310
+ callback();
311
+ }
312
+ finally {
313
+ this.isReducedMotion = originalReducedMotion;
314
+ }
315
+ }
316
+ // Animate element with motion reduction awareness
317
+ animateElement(element, keyframes, options) {
318
+ if (this.shouldReduceMotion(element)) {
319
+ // Apply reduced motion options
320
+ const reducedOptions = {
321
+ ...options,
322
+ duration: Math.min(typeof options.duration === 'number' ? options.duration : 300, 50),
323
+ easing: 'linear'
324
+ };
325
+ return element.animate(keyframes, reducedOptions);
326
+ }
327
+ return element.animate(keyframes, options);
328
+ }
329
+ // Add motion reduction observer
330
+ addMotionReductionObserver(callback) {
331
+ const observer = new MutationObserver(() => {
332
+ callback(this.isReducedMotion);
333
+ });
334
+ observer.observe(document.documentElement, {
335
+ attributes: true,
336
+ attributeFilter: ['class']
337
+ });
338
+ // Return cleanup function
339
+ return () => observer.disconnect();
340
+ }
341
+ // Get motion reduction statistics
342
+ getStatistics() {
343
+ const totalElements = document.querySelectorAll('*').length;
344
+ const reducedElements = document.querySelectorAll('.reduced-motion *').length;
345
+ const safeElements = document.querySelectorAll('.motion-safe, [data-motion-safe="true"]').length;
346
+ return {
347
+ totalElements,
348
+ reducedElements,
349
+ safeElements,
350
+ preferences: this.getPreferences()
351
+ };
352
+ }
353
+ // Reset all motion reduction settings
354
+ reset() {
355
+ this.isReducedMotion = false;
356
+ this.isReducedAnimation = false;
357
+ this.isReducedTransition = false;
358
+ this.isReducedTransform = false;
359
+ this.removeMotionReduction();
360
+ this.clearPreferences();
361
+ }
362
+ // Clear stored preferences
363
+ clearPreferences() {
364
+ if (typeof window !== 'undefined' && window.localStorage) {
365
+ window.localStorage.removeItem('motion-reduction-preferences');
366
+ }
367
+ this.originalStyles.clear();
368
+ this.reducedMotionStyles.clear();
369
+ }
370
+ // Destroy motion reduction manager
371
+ destroy() {
372
+ this.removeMotionReduction();
373
+ this.clearPreferences();
374
+ // Remove event listeners
375
+ if (typeof window !== 'undefined') {
376
+ window.removeEventListener('storage', this.loadPreferences.bind(this));
377
+ }
337
378
  }
338
- }
339
-
340
- // Check if element should have motion reduced
341
- shouldReduceMotion(element: HTMLElement): boolean {
342
- if (!this.isReducedMotion) return false;
343
-
344
- // Check for motion-safe override
345
- if (element.classList.contains('motion-safe') || element.getAttribute('data-motion-safe') === 'true') {
346
- return false;
347
- }
348
-
349
- // Check for motion-reduce override
350
- if (element.classList.contains('motion-reduce') || element.getAttribute('data-motion-reduce') === 'true') {
351
- return true;
352
- }
353
-
354
- return true;
355
- }
356
-
357
- // Get appropriate duration for element
358
- getDuration(element: HTMLElement, defaultDuration: string, type: 'animation' | 'transition'): string {
359
- if (!this.shouldReduceMotion(element)) {
360
- return defaultDuration;
361
- }
362
-
363
- // Parse duration
364
- const duration = parseFloat(defaultDuration);
365
- const unit = defaultDuration.replace(/[\d.]/g, '');
366
-
367
- if (type === 'animation') {
368
- return this.isReducedAnimation ? '0.01ms' : `${Math.min(duration * 0.1, 50)}${unit}`;
369
- } else {
370
- return this.isReducedTransition ? '0.01ms' : `${Math.min(duration * 0.1, 50)}${unit}`;
371
- }
372
- }
373
-
374
- // Get appropriate easing for element
375
- getEasing(element: HTMLElement, defaultEasing: string): string {
376
- if (!this.shouldReduceMotion(element)) {
377
- return defaultEasing;
378
- }
379
-
380
- // Use linear easing for reduced motion
381
- return 'linear';
382
- }
383
-
384
- // Create motion-safe wrapper
385
- createMotionSafeWrapper(element: HTMLElement, callback: () => void): void {
386
- if (!this.shouldReduceMotion(element)) {
387
- callback();
388
- return;
389
- }
390
-
391
- // Execute callback without motion
392
- const originalReducedMotion = this.isReducedMotion;
393
- this.isReducedMotion = false;
394
-
395
- try {
396
- callback();
397
- } finally {
398
- this.isReducedMotion = originalReducedMotion;
399
- }
400
- }
401
-
402
- // Animate element with motion reduction awareness
403
- animateElement(
404
- element: HTMLElement,
405
- keyframes: Keyframe[],
406
- options: KeyframeAnimationOptions
407
- ): Animation {
408
- if (this.shouldReduceMotion(element)) {
409
- // Apply reduced motion options
410
- const reducedOptions = {
411
- ...options,
412
- duration: Math.min(typeof options.duration === 'number' ? options.duration : 300, 50),
413
- easing: 'linear'
414
- };
415
-
416
- return element.animate(keyframes, reducedOptions);
417
- }
418
-
419
- return element.animate(keyframes, options);
420
- }
421
-
422
- // Add motion reduction observer
423
- addMotionReductionObserver(callback: (isReduced: boolean) => void): () => void {
424
- const observer = new MutationObserver(() => {
425
- callback(this.isReducedMotion);
426
- });
427
-
428
- observer.observe(document.documentElement, {
429
- attributes: true,
430
- attributeFilter: ['class']
431
- });
432
-
433
- // Return cleanup function
434
- return () => observer.disconnect();
435
- }
436
-
437
- // Get motion reduction statistics
438
- getStatistics(): {
439
- totalElements: number;
440
- reducedElements: number;
441
- safeElements: number;
442
- preferences: {
443
- reduceMotion: boolean;
444
- reduceAnimation: boolean;
445
- reduceTransition: boolean;
446
- reduceTransform: boolean;
447
- };
448
- } {
449
- const totalElements = document.querySelectorAll('*').length;
450
- const reducedElements = document.querySelectorAll('.reduced-motion *').length;
451
- const safeElements = document.querySelectorAll('.motion-safe, [data-motion-safe="true"]').length;
452
-
453
- return {
454
- totalElements,
455
- reducedElements,
456
- safeElements,
457
- preferences: this.getPreferences()
458
- };
459
- }
460
-
461
- // Reset all motion reduction settings
462
- reset(): void {
463
- this.isReducedMotion = false;
464
- this.isReducedAnimation = false;
465
- this.isReducedTransition = false;
466
- this.isReducedTransform = false;
467
-
468
- this.removeMotionReduction();
469
- this.clearPreferences();
470
- }
471
-
472
- // Clear stored preferences
473
- private clearPreferences(): void {
474
- if (typeof window !== 'undefined' && window.localStorage) {
475
- window.localStorage.removeItem('motion-reduction-preferences');
476
- }
477
-
478
- this.originalStyles.clear();
479
- this.reducedMotionStyles.clear();
480
- }
481
-
482
- // Destroy motion reduction manager
483
- destroy(): void {
484
- this.removeMotionReduction();
485
- this.clearPreferences();
486
-
487
- // Remove event listeners
488
- if (typeof window !== 'undefined') {
489
- window.removeEventListener('storage', this.loadPreferences.bind(this));
490
- }
491
- }
492
379
  }
493
-
494
380
  // Motion reduction utilities
495
381
  export class MotionReductionUtils {
496
- // Check if motion should be reduced for element
497
- static shouldReduceMotion(element: HTMLElement): boolean {
498
- // Check system preference
499
- if (typeof window !== 'undefined' && window.matchMedia) {
500
- const reducedMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
501
- if (reducedMotionQuery.matches) return true;
502
- }
503
-
504
- // Check element attributes
505
- if (element.classList.contains('motion-reduce') || element.getAttribute('data-motion-reduce') === 'true') {
506
- return true;
507
- }
508
-
509
- // Check parent elements
510
- const parent = element.closest('.motion-reduce, [data-motion-reduce="true"]');
511
- if (parent) return true;
512
-
513
- return false;
514
- }
515
-
516
- // Get reduced duration
517
- static getReducedDuration(duration: string, reductionFactor: number = 0.1): string {
518
- const parsed = parseFloat(duration);
519
- const unit = duration.replace(/[\d.]/g, '');
520
-
521
- return `${Math.max(parsed * reductionFactor, 1)}${unit}`;
522
- }
523
-
524
- // Get reduced easing
525
- static getReducedEasing(_easing: string): string {
526
- return 'linear';
527
- }
528
-
529
- // Create motion-safe animation
530
- static createMotionSafeAnimation(
531
- element: HTMLElement,
532
- keyframes: Keyframe[],
533
- options: KeyframeAnimationOptions
534
- ): Animation | null {
535
- if (this.shouldReduceMotion(element)) {
536
- // Return null to indicate no animation should be performed
537
- return null;
538
- }
539
-
540
- return element.animate(keyframes, options);
541
- }
542
-
543
- // Apply motion reduction to CSS custom properties
544
- static applyMotionReductionToCSS(element: HTMLElement): void {
545
- if (!this.shouldReduceMotion(element)) return;
546
-
547
- const style = element.style;
548
-
549
- // Reduce animation duration
550
- if (style.getPropertyValue('--animation-duration')) {
551
- const duration = style.getPropertyValue('--animation-duration');
552
- style.setProperty('--animation-duration', this.getReducedDuration(duration));
553
- }
554
-
555
- // Reduce transition duration
556
- if (style.getPropertyValue('--transition-duration')) {
557
- const duration = style.getPropertyValue('--transition-duration');
558
- style.setProperty('--transition-duration', this.getReducedDuration(duration));
559
- }
560
-
561
- // Set easing to linear
562
- if (style.getPropertyValue('--animation-easing')) {
563
- style.setProperty('--animation-easing', 'linear');
564
- }
565
-
566
- if (style.getPropertyValue('--transition-easing')) {
567
- style.setProperty('--transition-easing', 'linear');
568
- }
569
- }
570
-
571
- // Remove motion reduction from CSS custom properties
572
- static removeMotionReductionFromCSS(element: HTMLElement): void {
573
- const style = element.style;
574
-
575
- // Remove custom properties
576
- style.removeProperty('--animation-duration');
577
- style.removeProperty('--transition-duration');
578
- style.removeProperty('--animation-easing');
579
- style.removeProperty('--transition-easing');
580
- }
581
-
582
- // Check if element has motion
583
- static hasMotion(element: HTMLElement): boolean {
584
- const computedStyle = window.getComputedStyle(element);
585
-
586
- return (
587
- computedStyle.animation !== 'none' ||
588
- computedStyle.transition !== 'all 0s ease 0s' ||
589
- computedStyle.transform !== 'none'
590
- );
591
- }
592
-
593
- // Get motion information for element
594
- static getMotionInfo(element: HTMLElement): {
595
- hasAnimation: boolean;
596
- hasTransition: boolean;
597
- hasTransform: boolean;
598
- animationDuration: string;
599
- transitionDuration: string;
600
- transform: string;
601
- } {
602
- const computedStyle = window.getComputedStyle(element);
603
-
604
- return {
605
- hasAnimation: computedStyle.animation !== 'none',
606
- hasTransition: computedStyle.transition !== 'all 0s ease 0s',
607
- hasTransform: computedStyle.transform !== 'none',
608
- animationDuration: computedStyle.animationDuration,
609
- transitionDuration: computedStyle.transitionDuration,
610
- transform: computedStyle.transform
611
- };
612
- }
382
+ // Check if motion should be reduced for element
383
+ static shouldReduceMotion(element) {
384
+ // Check system preference
385
+ if (typeof window !== 'undefined' && window.matchMedia) {
386
+ const reducedMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
387
+ if (reducedMotionQuery.matches)
388
+ return true;
389
+ }
390
+ // Check element attributes
391
+ if (element.classList.contains('motion-reduce') || element.getAttribute('data-motion-reduce') === 'true') {
392
+ return true;
393
+ }
394
+ // Check parent elements
395
+ const parent = element.closest('.motion-reduce, [data-motion-reduce="true"]');
396
+ if (parent)
397
+ return true;
398
+ return false;
399
+ }
400
+ // Get reduced duration
401
+ static getReducedDuration(duration, reductionFactor = 0.1) {
402
+ const parsed = parseFloat(duration);
403
+ const unit = duration.replace(/[\d.]/g, '');
404
+ return `${Math.max(parsed * reductionFactor, 1)}${unit}`;
405
+ }
406
+ // Get reduced easing
407
+ static getReducedEasing(_easing) {
408
+ return 'linear';
409
+ }
410
+ // Create motion-safe animation
411
+ static createMotionSafeAnimation(element, keyframes, options) {
412
+ if (this.shouldReduceMotion(element)) {
413
+ // Return null to indicate no animation should be performed
414
+ return null;
415
+ }
416
+ return element.animate(keyframes, options);
417
+ }
418
+ // Apply motion reduction to CSS custom properties
419
+ static applyMotionReductionToCSS(element) {
420
+ if (!this.shouldReduceMotion(element))
421
+ return;
422
+ const style = element.style;
423
+ // Reduce animation duration
424
+ if (style.getPropertyValue('--animation-duration')) {
425
+ const duration = style.getPropertyValue('--animation-duration');
426
+ style.setProperty('--animation-duration', this.getReducedDuration(duration));
427
+ }
428
+ // Reduce transition duration
429
+ if (style.getPropertyValue('--transition-duration')) {
430
+ const duration = style.getPropertyValue('--transition-duration');
431
+ style.setProperty('--transition-duration', this.getReducedDuration(duration));
432
+ }
433
+ // Set easing to linear
434
+ if (style.getPropertyValue('--animation-easing')) {
435
+ style.setProperty('--animation-easing', 'linear');
436
+ }
437
+ if (style.getPropertyValue('--transition-easing')) {
438
+ style.setProperty('--transition-easing', 'linear');
439
+ }
440
+ }
441
+ // Remove motion reduction from CSS custom properties
442
+ static removeMotionReductionFromCSS(element) {
443
+ const style = element.style;
444
+ // Remove custom properties
445
+ style.removeProperty('--animation-duration');
446
+ style.removeProperty('--transition-duration');
447
+ style.removeProperty('--animation-easing');
448
+ style.removeProperty('--transition-easing');
449
+ }
450
+ // Check if element has motion
451
+ static hasMotion(element) {
452
+ const computedStyle = window.getComputedStyle(element);
453
+ return (computedStyle.animation !== 'none' ||
454
+ computedStyle.transition !== 'all 0s ease 0s' ||
455
+ computedStyle.transform !== 'none');
456
+ }
457
+ // Get motion information for element
458
+ static getMotionInfo(element) {
459
+ const computedStyle = window.getComputedStyle(element);
460
+ return {
461
+ hasAnimation: computedStyle.animation !== 'none',
462
+ hasTransition: computedStyle.transition !== 'all 0s ease 0s',
463
+ hasTransform: computedStyle.transform !== 'none',
464
+ animationDuration: computedStyle.animationDuration,
465
+ transitionDuration: computedStyle.transitionDuration,
466
+ transform: computedStyle.transform
467
+ };
468
+ }
613
469
  }
614
-
615
470
  // Motion reduction hooks for React
616
471
  export class MotionReductionHooks {
617
- // Get motion reduction state
618
- static useMotionReduction(): {
619
- isReduced: boolean;
620
- preferences: {
621
- reduceAnimation: boolean;
622
- reduceTransition: boolean;
623
- reduceTransform: boolean;
624
- };
625
- shouldReduceMotion: (element: HTMLElement) => boolean;
626
- } {
627
- // This would be implemented in a React component
628
- // For now, return a mock implementation
629
- return {
630
- isReduced: false,
631
- preferences: {
632
- reduceAnimation: false,
633
- reduceTransition: false,
634
- reduceTransform: false
635
- },
636
- shouldReduceMotion: () => false
637
- };
638
- }
639
-
640
- // Get motion-safe duration
641
- static useMotionSafeDuration(defaultDuration: string, _type: 'animation' | 'transition'): string {
642
- // This would be implemented in a React component
643
- return defaultDuration;
644
- }
645
-
646
- // Get motion-safe easing
647
- static useMotionSafeEasing(defaultEasing: string): string {
648
- // This would be implemented in a React component
649
- return defaultEasing;
650
- }
472
+ // Get motion reduction state
473
+ static useMotionReduction() {
474
+ // This would be implemented in a React component
475
+ // For now, return a mock implementation
476
+ return {
477
+ isReduced: false,
478
+ preferences: {
479
+ reduceAnimation: false,
480
+ reduceTransition: false,
481
+ reduceTransform: false
482
+ },
483
+ shouldReduceMotion: () => false
484
+ };
485
+ }
486
+ // Get motion-safe duration
487
+ static useMotionSafeDuration(defaultDuration, _type) {
488
+ // This would be implemented in a React component
489
+ return defaultDuration;
490
+ }
491
+ // Get motion-safe easing
492
+ static useMotionSafeEasing(defaultEasing) {
493
+ // This would be implemented in a React component
494
+ return defaultEasing;
495
+ }
651
496
  }
652
-
653
497
  // Export default instances
654
498
  export const motionReductionManager = new MotionReductionManager();
655
-
656
499
  // Export default
657
500
  export default {
658
- MotionReductionManager,
659
- MotionReductionUtils,
660
- MotionReductionHooks,
661
- motionReductionManager
501
+ MotionReductionManager,
502
+ MotionReductionUtils,
503
+ MotionReductionHooks,
504
+ motionReductionManager
662
505
  };