@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.11 → 0.2.17
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.d.ts +5 -257
- package/dist/components/ui/accessibility-demo.d.ts.map +1 -0
- 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.d.ts +4 -718
- package/dist/components/ui/advanced-component-architecture-demo.d.ts.map +1 -0
- 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.d.ts +3 -660
- package/dist/components/ui/advanced-transition-system-demo.d.ts.map +1 -0
- 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.d.ts +35 -381
- package/dist/components/ui/advanced-transition-system.d.ts.map +1 -0
- 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.d.ts +11 -160
- package/dist/components/ui/animation/animated-container.d.ts.map +1 -0
- 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.d.ts +7 -9
- package/dist/components/ui/animation/index.d.ts.map +1 -0
- 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.d.ts +8 -62
- package/dist/components/ui/animation/staggered-container.d.ts.map +1 -0
- 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.d.ts +3 -238
- package/dist/components/ui/animation-demo.d.ts.map +1 -0
- package/dist/components/ui/animation-demo.esm.js +30 -250
- package/dist/components/ui/animation-demo.js +30 -250
- package/dist/components/ui/badge.d.ts +9 -27
- package/dist/components/ui/badge.d.ts.map +1 -0
- 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.d.ts +4 -561
- package/dist/components/ui/battery-conscious-animation-demo.d.ts.map +1 -0
- 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.d.ts +3 -183
- package/dist/components/ui/border-radius-shadow-demo.d.ts.map +1 -0
- 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.d.ts +8 -32
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.esm.js +14 -33
- package/dist/components/ui/button.js +14 -33
- package/dist/components/ui/card.d.ts +25 -193
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.esm.js +74 -188
- package/dist/components/ui/card.js +74 -188
- package/dist/components/ui/checkbox.d.ts +6 -24
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.esm.js +11 -30
- package/dist/components/ui/checkbox.js +11 -30
- package/dist/components/ui/color-preview.d.ts +12 -398
- package/dist/components/ui/color-preview.d.ts.map +1 -0
- 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.d.ts +4 -645
- package/dist/components/ui/data-display/chart.d.ts.map +1 -0
- 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.d.ts +5 -73
- package/dist/components/ui/data-display/data-grid-simple.d.ts.map +1 -0
- 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.d.ts +4 -669
- package/dist/components/ui/data-display/data-grid.d.ts.map +1 -0
- 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.d.ts +4 -447
- package/dist/components/ui/data-display/list.d.ts.map +1 -0
- 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.d.ts +4 -471
- package/dist/components/ui/data-display/table.d.ts.map +1 -0
- 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.d.ts +4 -432
- package/dist/components/ui/data-display/timeline.d.ts.map +1 -0
- 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.d.ts +4 -593
- package/dist/components/ui/data-display/tree.d.ts.map +1 -0
- 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.d.ts +418 -471
- package/dist/components/ui/data-display/types.d.ts.map +1 -0
- 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.d.ts +3 -735
- package/dist/components/ui/enterprise-mobile-experience-demo.d.ts.map +1 -0
- 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.d.ts +52 -441
- package/dist/components/ui/enterprise-mobile-experience.d.ts.map +1 -0
- 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.d.ts +4 -153
- package/dist/components/ui/feedback/alert.d.ts.map +1 -0
- 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.d.ts +4 -287
- package/dist/components/ui/feedback/progress.d.ts.map +1 -0
- 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.d.ts +7 -181
- package/dist/components/ui/feedback/skeleton.d.ts.map +1 -0
- 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.d.ts +7 -276
- package/dist/components/ui/feedback/toast.d.ts.map +1 -0
- 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.d.ts +85 -99
- package/dist/components/ui/feedback/types.d.ts.map +1 -0
- 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.d.ts +11 -278
- package/dist/components/ui/font-preview.d.ts.map +1 -0
- 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.d.ts +4 -544
- package/dist/components/ui/form-demo.d.ts.map +1 -0
- 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.d.ts +4 -540
- package/dist/components/ui/hardware-acceleration-demo.d.ts.map +1 -0
- 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.d.ts +8 -32
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.esm.js +13 -32
- package/dist/components/ui/input.js +13 -32
- package/dist/components/ui/label.d.ts +5 -13
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.esm.js +6 -16
- package/dist/components/ui/label.js +6 -16
- package/dist/components/ui/layout-demo.d.ts +4 -352
- package/dist/components/ui/layout-demo.d.ts.map +1 -0
- 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.d.ts +14 -130
- package/dist/components/ui/layouts/adaptive-layout.d.ts.map +1 -0
- 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.d.ts +13 -217
- package/dist/components/ui/layouts/desktop-layout.d.ts.map +1 -0
- 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.d.ts +9 -5
- package/dist/components/ui/layouts/index.d.ts.map +1 -0
- 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.d.ts +12 -156
- package/dist/components/ui/layouts/mobile-layout.d.ts.map +1 -0
- 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.d.ts +12 -190
- package/dist/components/ui/layouts/tablet-layout.d.ts.map +1 -0
- 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.d.ts +28 -435
- package/dist/components/ui/mobile-form-validation.d.ts.map +1 -0
- 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.d.ts +3 -197
- package/dist/components/ui/mobile-input-demo.d.ts.map +1 -0
- 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.d.ts +61 -268
- package/dist/components/ui/mobile-input.d.ts.map +1 -0
- 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.d.ts +4 -628
- package/dist/components/ui/mobile-skeleton-loading-demo.d.ts.map +1 -0
- 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.d.ts +8 -148
- package/dist/components/ui/navigation/breadcrumb.d.ts.map +1 -0
- 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.d.ts +12 -25
- package/dist/components/ui/navigation/index.d.ts.map +1 -0
- 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.d.ts +8 -365
- package/dist/components/ui/navigation/menu.d.ts.map +1 -0
- 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.d.ts +7 -168
- package/dist/components/ui/navigation/navigation-demo.d.ts.map +1 -0
- 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.d.ts +8 -260
- package/dist/components/ui/navigation/pagination.d.ts.map +1 -0
- 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.d.ts +8 -374
- package/dist/components/ui/navigation/sidebar.d.ts.map +1 -0
- 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.d.ts +8 -293
- package/dist/components/ui/navigation/stepper.d.ts.map +1 -0
- 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.d.ts +8 -195
- package/dist/components/ui/navigation/tabs.d.ts.map +1 -0
- 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.d.ts +216 -254
- package/dist/components/ui/navigation/types.d.ts.map +1 -0
- 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.d.ts +12 -76
- package/dist/components/ui/overlay/backdrop.d.ts.map +1 -0
- 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.d.ts +10 -138
- package/dist/components/ui/overlay/focus-manager.d.ts.map +1 -0
- 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.d.ts +10 -27
- package/dist/components/ui/overlay/index.d.ts.map +1 -0
- 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.d.ts +7 -261
- package/dist/components/ui/overlay/modal.d.ts.map +1 -0
- 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.d.ts +13 -104
- package/dist/components/ui/overlay/overlay-manager.d.ts.map +1 -0
- 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.d.ts +8 -449
- package/dist/components/ui/overlay/popover.d.ts.map +1 -0
- 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.d.ts +4 -74
- package/dist/components/ui/overlay/portal.d.ts.map +1 -0
- 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.d.ts +5 -297
- package/dist/components/ui/overlay/tooltip.d.ts.map +1 -0
- 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.d.ts +144 -167
- package/dist/components/ui/overlay/types.d.ts.map +1 -0
- 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.d.ts +3 -583
- package/dist/components/ui/performance-demo.d.ts.map +1 -0
- 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.d.ts +3 -490
- package/dist/components/ui/semantic-input-system-demo.d.ts.map +1 -0
- 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.d.ts +19 -370
- package/dist/components/ui/theme-customizer.d.ts.map +1 -0
- 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.d.ts +9 -303
- package/dist/components/ui/theme-preview.d.ts.map +1 -0
- 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.d.ts +9 -257
- package/dist/components/ui/theme-switcher.d.ts.map +1 -0
- 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.d.ts +3 -34
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- 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.d.ts +3 -188
- package/dist/components/ui/token-demo.d.ts.map +1 -0
- 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.d.ts +3 -455
- package/dist/components/ui/touch-demo.d.ts.map +1 -0
- 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.d.ts +3 -512
- package/dist/components/ui/touch-friendly-interface-demo.d.ts.map +1 -0
- 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.d.ts +21 -282
- package/dist/components/ui/touch-friendly-interface.d.ts.map +1 -0
- 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.d.ts +47 -161
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.esm.js +23 -181
- package/dist/hooks/index.js +23 -181
- package/dist/hooks/use-accessibility-support.d.ts +66 -508
- package/dist/hooks/use-accessibility-support.d.ts.map +1 -0
- 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.d.ts +51 -281
- package/dist/hooks/use-adaptive-layout.d.ts.map +1 -0
- 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.d.ts +78 -282
- package/dist/hooks/use-advanced-patterns.d.ts.map +1 -0
- 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.d.ts +51 -382
- package/dist/hooks/use-advanced-transition-system.d.ts.map +1 -0
- 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.d.ts +39 -279
- package/dist/hooks/use-animation-profile.d.ts.map +1 -0
- 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.d.ts +47 -376
- package/dist/hooks/use-battery-animations.d.ts.map +1 -0
- 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.d.ts +50 -465
- package/dist/hooks/use-battery-conscious-loading.d.ts.map +1 -0
- 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.d.ts +39 -322
- package/dist/hooks/use-battery-optimization.d.ts.map +1 -0
- 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.d.ts +49 -289
- package/dist/hooks/use-battery-status.d.ts.map +1 -0
- 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.d.ts +60 -336
- package/dist/hooks/use-component-performance.d.ts.map +1 -0
- 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.d.ts +53 -448
- package/dist/hooks/use-device-loading-states.d.ts.map +1 -0
- 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.d.ts +18 -102
- package/dist/hooks/use-device.d.ts.map +1 -0
- package/dist/hooks/use-device.esm.js +77 -102
- package/dist/hooks/use-device.js +77 -102
- package/dist/hooks/use-enterprise-mobile-experience.d.ts +72 -474
- package/dist/hooks/use-enterprise-mobile-experience.d.ts.map +1 -0
- 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.d.ts +81 -391
- package/dist/hooks/use-form-feedback.d.ts.map +1 -0
- 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.d.ts +78 -501
- package/dist/hooks/use-form-performance.d.ts.map +1 -0
- 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.d.ts +39 -241
- package/dist/hooks/use-frame-rate.d.ts.map +1 -0
- package/dist/hooks/use-frame-rate.esm.js +178 -251
- package/dist/hooks/use-frame-rate.js +178 -251
- package/dist/hooks/use-gestures.d.ts +84 -326
- package/dist/hooks/use-gestures.d.ts.map +1 -0
- package/dist/hooks/use-gestures.esm.js +230 -332
- package/dist/hooks/use-gestures.js +230 -332
- package/dist/hooks/use-hardware-acceleration.d.ts +45 -331
- package/dist/hooks/use-hardware-acceleration.d.ts.map +1 -0
- 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.d.ts +50 -443
- package/dist/hooks/use-input-accessibility.d.ts.map +1 -0
- 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.d.ts +47 -495
- package/dist/hooks/use-input-performance.d.ts.map +1 -0
- 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.d.ts +33 -311
- package/dist/hooks/use-layout-performance.d.ts.map +1 -0
- 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.d.ts +54 -524
- package/dist/hooks/use-loading-accessibility.d.ts.map +1 -0
- 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.d.ts +43 -463
- package/dist/hooks/use-loading-performance.d.ts.map +1 -0
- 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.d.ts +43 -277
- package/dist/hooks/use-memory-usage.d.ts.map +1 -0
- 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.d.ts +116 -451
- package/dist/hooks/use-mobile-form-layout.d.ts.map +1 -0
- 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.d.ts +87 -503
- package/dist/hooks/use-mobile-form-validation.d.ts.map +1 -0
- 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.d.ts +62 -461
- package/dist/hooks/use-mobile-keyboard-optimization.d.ts.map +1 -0
- 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.d.ts +48 -292
- package/dist/hooks/use-mobile-layout.d.ts.map +1 -0
- 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.d.ts +49 -398
- package/dist/hooks/use-mobile-optimization.d.ts.map +1 -0
- 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.d.ts +51 -391
- package/dist/hooks/use-mobile-skeleton.d.ts.map +1 -0
- 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.d.ts +73 -399
- package/dist/hooks/use-mobile-touch.d.ts.map +1 -0
- 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.d.ts +42 -340
- package/dist/hooks/use-performance-throttling.d.ts.map +1 -0
- package/dist/hooks/use-performance-throttling.esm.js +276 -344
- package/dist/hooks/use-performance-throttling.js +276 -344
- package/dist/hooks/use-performance.d.ts +65 -306
- package/dist/hooks/use-performance.d.ts.map +1 -0
- package/dist/hooks/use-performance.esm.js +216 -313
- package/dist/hooks/use-performance.js +216 -313
- package/dist/hooks/use-reusable-architecture.d.ts +82 -400
- package/dist/hooks/use-reusable-architecture.d.ts.map +1 -0
- 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.d.ts +51 -348
- package/dist/hooks/use-semantic-input-types.d.ts.map +1 -0
- 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.d.ts +62 -552
- package/dist/hooks/use-semantic-input.d.ts.map +1 -0
- 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.d.ts +67 -375
- package/dist/hooks/use-tablet-layout.d.ts.map +1 -0
- 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.d.ts +67 -512
- package/dist/hooks/use-touch-friendly-input.d.ts.map +1 -0
- 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.d.ts +48 -321
- package/dist/hooks/use-touch-friendly-interface.d.ts.map +1 -0
- 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.d.ts +56 -363
- package/dist/hooks/use-touch-optimization.d.ts.map +1 -0
- package/dist/hooks/use-touch-optimization.esm.js +288 -370
- package/dist/hooks/use-touch-optimization.js +288 -370
- package/dist/index.d.ts +168 -17
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +150 -161
- package/dist/index.js +150 -161
- package/dist/lib/utils.d.ts +3 -3
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.esm.js +4 -5
- package/dist/lib/utils.js +4 -5
- package/dist/plugins/theme-css-generator.d.ts +3 -345
- package/dist/plugins/theme-css-generator.d.ts.map +1 -0
- package/dist/plugins/theme-css-generator.esm.js +292 -346
- package/dist/plugins/theme-css-generator.js +292 -346
- package/dist/provider.d.ts +6 -14
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.esm.js +3 -19
- package/dist/provider.js +3 -19
- package/dist/styles/layers/validation.d.ts +20 -0
- package/dist/styles/layers/validation.d.ts.map +1 -0
- 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.d.ts +7 -678
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.esm.js +654 -658
- package/dist/theme.js +654 -658
- package/dist/themes/ThemeContext.d.ts +18 -22
- package/dist/themes/ThemeContext.d.ts.map +1 -0
- package/dist/themes/ThemeContext.esm.js +1 -27
- package/dist/themes/ThemeContext.js +1 -27
- package/dist/themes/ThemeProvider.d.ts +3 -222
- package/dist/themes/ThemeProvider.d.ts.map +1 -0
- package/dist/themes/ThemeProvider.esm.js +191 -223
- package/dist/themes/ThemeProvider.js +191 -223
- package/dist/themes/accessibility/index.d.ts +18 -6
- package/dist/themes/accessibility/index.d.ts.map +1 -0
- package/dist/themes/accessibility/index.esm.js +0 -4
- package/dist/themes/accessibility/index.js +0 -4
- package/dist/themes/accessibility.d.ts +53 -253
- package/dist/themes/accessibility.d.ts.map +1 -0
- package/dist/themes/accessibility.esm.js +175 -240
- package/dist/themes/accessibility.js +175 -240
- package/dist/themes/aria-patterns.d.ts +145 -410
- package/dist/themes/aria-patterns.d.ts.map +1 -0
- package/dist/themes/aria-patterns.esm.js +345 -401
- package/dist/themes/aria-patterns.js +345 -401
- package/dist/themes/base-themes.d.ts +29 -32
- package/dist/themes/base-themes.d.ts.map +1 -0
- package/dist/themes/base-themes.esm.js +15 -24
- package/dist/themes/base-themes.js +15 -24
- package/dist/themes/colorManager.d.ts +63 -326
- package/dist/themes/colorManager.d.ts.map +1 -0
- package/dist/themes/colorManager.esm.js +293 -357
- package/dist/themes/colorManager.js +293 -357
- package/dist/themes/examples/dark-theme.d.ts +13 -139
- package/dist/themes/examples/dark-theme.d.ts.map +1 -0
- 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.d.ts +6 -93
- package/dist/themes/examples/minimal-theme.d.ts.map +1 -0
- package/dist/themes/examples/minimal-theme.esm.js +80 -85
- package/dist/themes/examples/minimal-theme.js +80 -85
- package/dist/themes/focus-management.d.ts +100 -689
- package/dist/themes/focus-management.d.ts.map +1 -0
- package/dist/themes/focus-management.esm.js +541 -677
- package/dist/themes/focus-management.js +541 -677
- package/dist/themes/fontLoader.d.ts +48 -162
- package/dist/themes/fontLoader.d.ts.map +1 -0
- package/dist/themes/fontLoader.esm.js +151 -180
- package/dist/themes/fontLoader.js +151 -180
- package/dist/themes/high-contrast.d.ts +64 -613
- package/dist/themes/high-contrast.d.ts.map +1 -0
- package/dist/themes/high-contrast.esm.js +394 -558
- package/dist/themes/high-contrast.js +394 -558
- package/dist/themes/index.d.ts +3 -6
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.esm.js +1 -9
- package/dist/themes/index.js +1 -9
- package/dist/themes/inheritance.d.ts +86 -156
- package/dist/themes/inheritance.d.ts.map +1 -0
- package/dist/themes/inheritance.esm.js +145 -180
- package/dist/themes/inheritance.js +145 -180
- package/dist/themes/keyboard-navigation.d.ts +205 -542
- package/dist/themes/keyboard-navigation.d.ts.map +1 -0
- package/dist/themes/keyboard-navigation.esm.js +418 -510
- package/dist/themes/keyboard-navigation.js +418 -510
- package/dist/themes/motion-reduction.d.ts +107 -646
- package/dist/themes/motion-reduction.d.ts.map +1 -0
- package/dist/themes/motion-reduction.esm.js +434 -591
- package/dist/themes/motion-reduction.js +434 -591
- package/dist/themes/navigation.d.ts +163 -194
- package/dist/themes/navigation.d.ts.map +1 -0
- package/dist/themes/navigation.esm.js +1 -234
- package/dist/themes/navigation.js +1 -234
- package/dist/themes/screen-reader.d.ts +82 -641
- package/dist/themes/screen-reader.d.ts.map +1 -0
- package/dist/themes/screen-reader.esm.js +515 -616
- package/dist/themes/screen-reader.js +515 -616
- package/dist/themes/systemThemeDetector.d.ts +54 -144
- package/dist/themes/systemThemeDetector.d.ts.map +1 -0
- package/dist/themes/systemThemeDetector.esm.js +135 -164
- package/dist/themes/systemThemeDetector.js +135 -164
- package/dist/themes/themeCSSUpdater.d.ts +45 -228
- package/dist/themes/themeCSSUpdater.d.ts.map +1 -0
- package/dist/themes/themeCSSUpdater.esm.js +217 -252
- package/dist/themes/themeCSSUpdater.js +217 -252
- package/dist/themes/themePersistence.d.ts +80 -188
- package/dist/themes/themePersistence.d.ts.map +1 -0
- package/dist/themes/themePersistence.esm.js +181 -212
- package/dist/themes/themePersistence.js +181 -212
- package/dist/themes/themes/default.d.ts +9 -0
- package/dist/themes/themes/default.d.ts.map +1 -0
- package/dist/themes/themes/default.esm.js +584 -0
- package/dist/themes/themes/default.js +584 -0
- package/dist/themes/themes/harvey.d.ts +7 -0
- package/dist/themes/themes/harvey.d.ts.map +1 -0
- package/dist/themes/themes/harvey.esm.js +551 -0
- package/dist/themes/themes/harvey.js +551 -0
- package/dist/themes/themes/stan-design.d.ts +7 -678
- package/dist/themes/themes/stan-design.d.ts.map +1 -0
- package/dist/themes/themes/stan-design.esm.js +654 -658
- package/dist/themes/themes/stan-design.js +654 -658
- package/dist/themes/types.d.ts +330 -385
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.esm.js +1 -458
- package/dist/themes/types.js +1 -458
- package/dist/themes/useSystemTheme.d.ts +10 -42
- package/dist/themes/useSystemTheme.d.ts.map +1 -0
- package/dist/themes/useSystemTheme.esm.js +34 -42
- package/dist/themes/useSystemTheme.js +34 -42
- package/dist/themes/useTheme.d.ts +70 -20
- package/dist/themes/useTheme.d.ts.map +1 -0
- package/dist/themes/useTheme.esm.js +23 -28
- package/dist/themes/useTheme.js +23 -28
- package/dist/themes/validation.d.ts +70 -405
- package/dist/themes/validation.d.ts.map +1 -0
- package/dist/themes/validation.esm.js +380 -433
- package/dist/themes/validation.js +380 -433
- package/dist/tokens/index.d.ts +9 -23
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.esm.js +2 -13
- package/dist/tokens/index.js +2 -13
- package/dist/tokens/tokenExporter.d.ts +83 -335
- package/dist/tokens/tokenExporter.d.ts.map +1 -0
- package/dist/tokens/tokenExporter.esm.js +309 -373
- package/dist/tokens/tokenExporter.js +309 -373
- package/dist/tokens/tokenGenerator.d.ts +36 -249
- package/dist/tokens/tokenGenerator.d.ts.map +1 -0
- package/dist/tokens/tokenGenerator.esm.js +241 -273
- package/dist/tokens/tokenGenerator.js +241 -273
- package/dist/tokens/tokenManager.d.ts +87 -189
- package/dist/tokens/tokenManager.d.ts.map +1 -0
- package/dist/tokens/tokenManager.esm.js +187 -241
- package/dist/tokens/tokenManager.js +187 -241
- package/dist/tokens/tokenValidator.d.ts +84 -481
- package/dist/tokens/tokenValidator.d.ts.map +1 -0
- package/dist/tokens/tokenValidator.esm.js +402 -522
- package/dist/tokens/tokenValidator.js +402 -522
- package/dist/tokens/types.d.ts +40 -60
- package/dist/tokens/types.d.ts.map +1 -0
- package/dist/tokens/types.esm.js +1 -78
- package/dist/tokens/types.js +1 -78
- package/dist/types.d.ts +399 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.esm.js +3 -0
- package/dist/types.js +3 -0
- package/dist/utils/bundle-analyzer.d.ts +37 -254
- package/dist/utils/bundle-analyzer.d.ts.map +1 -0
- package/dist/utils/bundle-analyzer.esm.js +188 -246
- package/dist/utils/bundle-analyzer.js +188 -246
- package/dist/utils/bundle-splitting.d.ts +59 -471
- package/dist/utils/bundle-splitting.d.ts.map +1 -0
- package/dist/utils/bundle-splitting.esm.js +330 -458
- package/dist/utils/bundle-splitting.js +330 -458
- package/dist/utils/lazy-loading.d.ts +64 -429
- package/dist/utils/lazy-loading.d.ts.map +1 -0
- package/dist/utils/lazy-loading.esm.js +311 -417
- package/dist/utils/lazy-loading.js +311 -417
- package/dist/utils/performance-monitor.d.ts +72 -504
- package/dist/utils/performance-monitor.d.ts.map +1 -0
- package/dist/utils/performance-monitor.esm.js +369 -490
- package/dist/utils/performance-monitor.js +369 -490
- package/dist/utils/tree-shaking.d.ts +40 -267
- package/dist/utils/tree-shaking.d.ts.map +1 -0
- 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/src/themes/themes/default.ts +586 -0
- package/src/themes/themes/harvey.ts +554 -0
- package/src/types.ts +460 -0
|
@@ -1,154 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
|
|
5
|
-
</svg>
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
const ExclamationTriangleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
9
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
10
|
-
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
|
|
11
|
-
</svg>
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const XCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
15
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
16
|
-
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clipRule="evenodd" />
|
|
17
|
-
</svg>
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const InformationCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
21
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
22
|
-
<path fillRule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clipRule="evenodd" />
|
|
23
|
-
</svg>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const XMarkIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
27
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
28
|
-
<path fillRule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clipRule="evenodd" />
|
|
29
|
-
</svg>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
// Get icon for alert type
|
|
33
|
-
const getAlertIcon = (type: AlertProps['type'], className: string) => {
|
|
34
|
-
switch (type) {
|
|
35
|
-
case 'success':
|
|
36
|
-
return <CheckCircleIcon className={className} />;
|
|
37
|
-
case 'warning':
|
|
38
|
-
return <ExclamationTriangleIcon className={className} />;
|
|
39
|
-
case 'error':
|
|
40
|
-
return <XCircleIcon className={className} />;
|
|
41
|
-
case 'info':
|
|
42
|
-
return <InformationCircleIcon className={className} />;
|
|
43
|
-
default:
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// Alert Action Button Component
|
|
49
|
-
const AlertActionButton: React.FC<AlertAction & { theme: string }> = ({
|
|
50
|
-
label,
|
|
51
|
-
onClick,
|
|
52
|
-
variant = 'primary'
|
|
53
|
-
}) => {
|
|
54
|
-
return (
|
|
55
|
-
<button
|
|
56
|
-
type="button"
|
|
57
|
-
className={`alert__action-button alert__action-button--${variant}`}
|
|
58
|
-
onClick={onClick}
|
|
59
|
-
>
|
|
60
|
-
{label}
|
|
61
|
-
</button>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// Main Alert Component
|
|
66
|
-
export const Alert: React.FC<AlertProps> = ({
|
|
67
|
-
title,
|
|
68
|
-
message,
|
|
69
|
-
type = 'info',
|
|
70
|
-
dismissible = false,
|
|
71
|
-
onDismiss,
|
|
72
|
-
icon,
|
|
73
|
-
actions = [],
|
|
74
|
-
showIcon = true,
|
|
75
|
-
closable = false,
|
|
76
|
-
persistent = false,
|
|
77
|
-
className = '',
|
|
78
|
-
theme = 'stan-design',
|
|
79
|
-
size = 'md',
|
|
80
|
-
variant = 'default'
|
|
81
|
-
}) => {
|
|
82
|
-
// const { getTheme } = useTheme();
|
|
83
|
-
// const themeConfig = getTheme(theme);
|
|
84
|
-
// Note: colors not needed as we're using semantic CSS classes
|
|
85
|
-
|
|
86
|
-
const [isVisible, setIsVisible] = useState(true);
|
|
87
|
-
|
|
88
|
-
const handleDismiss = useCallback(() => {
|
|
89
|
-
if (onDismiss) {
|
|
90
|
-
onDismiss();
|
|
91
|
-
}
|
|
92
|
-
if (!persistent) {
|
|
93
|
-
setIsVisible(false);
|
|
94
|
-
}
|
|
95
|
-
}, [onDismiss, persistent]);
|
|
96
|
-
|
|
97
|
-
const shouldShowIcon = showIcon && (icon || type);
|
|
98
|
-
const shouldShowClose = (closable || dismissible) && !persistent;
|
|
99
|
-
|
|
100
|
-
if (!isVisible) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return (
|
|
105
|
-
<div
|
|
106
|
-
className={`alert__container alert__container--${size} alert__container--${type} alert__container--${variant} ${className}`}
|
|
107
|
-
role="alert"
|
|
108
|
-
aria-live="polite"
|
|
109
|
-
>
|
|
110
|
-
{shouldShowIcon && (
|
|
111
|
-
<div className={`alert__icon alert__icon--${type}`}>
|
|
112
|
-
{icon || getAlertIcon(type, 'alert__icon')}
|
|
113
|
-
</div>
|
|
114
|
-
)}
|
|
115
|
-
|
|
116
|
-
<div className="alert__content">
|
|
117
|
-
{title && (
|
|
118
|
-
<h3 className="alert__title">
|
|
119
|
-
{title}
|
|
120
|
-
</h3>
|
|
121
|
-
)}
|
|
122
|
-
|
|
123
|
-
<div className={`alert__message ${!title ? 'alert__message--only' : ''}`}>
|
|
124
|
-
{message}
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
{actions.length > 0 && (
|
|
128
|
-
<div className="alert__actions">
|
|
129
|
-
{actions.map((action, index) => (
|
|
130
|
-
<AlertActionButton
|
|
131
|
-
key={index}
|
|
132
|
-
{...action}
|
|
133
|
-
theme={theme}
|
|
134
|
-
/>
|
|
135
|
-
))}
|
|
136
|
-
</div>
|
|
137
|
-
)}
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
{shouldShowClose && (
|
|
141
|
-
<button
|
|
142
|
-
type="button"
|
|
143
|
-
className="alert__close-button"
|
|
144
|
-
onClick={handleDismiss}
|
|
145
|
-
aria-label="Close alert"
|
|
146
|
-
>
|
|
147
|
-
<XMarkIcon className="alert__close-icon" />
|
|
148
|
-
</button>
|
|
149
|
-
)}
|
|
150
|
-
</div>
|
|
151
|
-
);
|
|
152
|
-
};
|
|
153
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertProps } from './types';
|
|
3
|
+
export declare const Alert: React.FC<AlertProps>;
|
|
154
4
|
export default Alert;
|
|
5
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/feedback/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,UAAU,EAAe,MAAM,SAAS,CAAC;AAmElD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAsFtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,157 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
4
3
|
// Simple icon components
|
|
5
|
-
const CheckCircleIcon
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
const ExclamationTriangleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
12
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
13
|
-
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
const XCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
18
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
19
|
-
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clipRule="evenodd" />
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const InformationCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
24
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
25
|
-
<path fillRule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clipRule="evenodd" />
|
|
26
|
-
</svg>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const XMarkIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
30
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
31
|
-
<path fillRule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clipRule="evenodd" />
|
|
32
|
-
</svg>
|
|
33
|
-
);
|
|
34
|
-
|
|
4
|
+
const CheckCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }) }));
|
|
5
|
+
const ExclamationTriangleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }));
|
|
6
|
+
const XCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }));
|
|
7
|
+
const InformationCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }));
|
|
8
|
+
const XMarkIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) }));
|
|
35
9
|
// Get icon for alert type
|
|
36
|
-
const getAlertIcon = (type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
10
|
+
const getAlertIcon = (type, className) => {
|
|
11
|
+
switch (type) {
|
|
12
|
+
case 'success':
|
|
13
|
+
return _jsx(CheckCircleIcon, { className: className });
|
|
14
|
+
case 'warning':
|
|
15
|
+
return _jsx(ExclamationTriangleIcon, { className: className });
|
|
16
|
+
case 'error':
|
|
17
|
+
return _jsx(XCircleIcon, { className: className });
|
|
18
|
+
case 'info':
|
|
19
|
+
return _jsx(InformationCircleIcon, { className: className });
|
|
20
|
+
default:
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
49
23
|
};
|
|
50
|
-
|
|
51
24
|
// Alert Action Button Component
|
|
52
|
-
const AlertActionButton
|
|
53
|
-
|
|
54
|
-
onClick,
|
|
55
|
-
variant = 'primary'
|
|
56
|
-
}) => {
|
|
57
|
-
return (
|
|
58
|
-
<button
|
|
59
|
-
type="button"
|
|
60
|
-
className={`alert__action-button alert__action-button--${variant}`}
|
|
61
|
-
onClick={onClick}
|
|
62
|
-
>
|
|
63
|
-
{label}
|
|
64
|
-
</button>
|
|
65
|
-
);
|
|
25
|
+
const AlertActionButton = ({ label, onClick, variant = 'primary' }) => {
|
|
26
|
+
return (_jsx("button", { type: "button", className: `alert__action-button alert__action-button--${variant}`, onClick: onClick, children: label }));
|
|
66
27
|
};
|
|
67
|
-
|
|
68
28
|
// Main Alert Component
|
|
69
|
-
export const Alert
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// const themeConfig = getTheme(theme);
|
|
87
|
-
// Note: colors not needed as we're using semantic CSS classes
|
|
88
|
-
|
|
89
|
-
const [isVisible, setIsVisible] = useState(true);
|
|
90
|
-
|
|
91
|
-
const handleDismiss = useCallback(() => {
|
|
92
|
-
if (onDismiss) {
|
|
93
|
-
onDismiss();
|
|
94
|
-
}
|
|
95
|
-
if (!persistent) {
|
|
96
|
-
setIsVisible(false);
|
|
29
|
+
export const Alert = ({ title, message, type = 'info', dismissible = false, onDismiss, icon, actions = [], showIcon = true, closable = false, persistent = false, className = '', theme = 'stan-design', size = 'md', variant = 'default' }) => {
|
|
30
|
+
// const { getTheme } = useTheme();
|
|
31
|
+
// const themeConfig = getTheme(theme);
|
|
32
|
+
// Note: colors not needed as we're using semantic CSS classes
|
|
33
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
34
|
+
const handleDismiss = useCallback(() => {
|
|
35
|
+
if (onDismiss) {
|
|
36
|
+
onDismiss();
|
|
37
|
+
}
|
|
38
|
+
if (!persistent) {
|
|
39
|
+
setIsVisible(false);
|
|
40
|
+
}
|
|
41
|
+
}, [onDismiss, persistent]);
|
|
42
|
+
const shouldShowIcon = showIcon && (icon || type);
|
|
43
|
+
const shouldShowClose = (closable || dismissible) && !persistent;
|
|
44
|
+
if (!isVisible) {
|
|
45
|
+
return null;
|
|
97
46
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const shouldShowIcon = showIcon && (icon || type);
|
|
101
|
-
const shouldShowClose = (closable || dismissible) && !persistent;
|
|
102
|
-
|
|
103
|
-
if (!isVisible) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<div
|
|
109
|
-
className={`alert__container alert__container--${size} alert__container--${type} alert__container--${variant} ${className}`}
|
|
110
|
-
role="alert"
|
|
111
|
-
aria-live="polite"
|
|
112
|
-
>
|
|
113
|
-
{shouldShowIcon && (
|
|
114
|
-
<div className={`alert__icon alert__icon--${type}`}>
|
|
115
|
-
{icon || getAlertIcon(type, 'alert__icon')}
|
|
116
|
-
</div>
|
|
117
|
-
)}
|
|
118
|
-
|
|
119
|
-
<div className="alert__content">
|
|
120
|
-
{title && (
|
|
121
|
-
<h3 className="alert__title">
|
|
122
|
-
{title}
|
|
123
|
-
</h3>
|
|
124
|
-
)}
|
|
125
|
-
|
|
126
|
-
<div className={`alert__message ${!title ? 'alert__message--only' : ''}`}>
|
|
127
|
-
{message}
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
{actions.length > 0 && (
|
|
131
|
-
<div className="alert__actions">
|
|
132
|
-
{actions.map((action, index) => (
|
|
133
|
-
<AlertActionButton
|
|
134
|
-
key={index}
|
|
135
|
-
{...action}
|
|
136
|
-
theme={theme}
|
|
137
|
-
/>
|
|
138
|
-
))}
|
|
139
|
-
</div>
|
|
140
|
-
)}
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
{shouldShowClose && (
|
|
144
|
-
<button
|
|
145
|
-
type="button"
|
|
146
|
-
className="alert__close-button"
|
|
147
|
-
onClick={handleDismiss}
|
|
148
|
-
aria-label="Close alert"
|
|
149
|
-
>
|
|
150
|
-
<XMarkIcon className="alert__close-icon" />
|
|
151
|
-
</button>
|
|
152
|
-
)}
|
|
153
|
-
</div>
|
|
154
|
-
);
|
|
47
|
+
return (_jsxs("div", { className: `alert__container alert__container--${size} alert__container--${type} alert__container--${variant} ${className}`, role: "alert", "aria-live": "polite", children: [shouldShowIcon && (_jsx("div", { className: `alert__icon alert__icon--${type}`, children: icon || getAlertIcon(type, 'alert__icon') })), _jsxs("div", { className: "alert__content", children: [title && (_jsx("h3", { className: "alert__title", children: title })), _jsx("div", { className: `alert__message ${!title ? 'alert__message--only' : ''}`, children: message }), actions.length > 0 && (_jsx("div", { className: "alert__actions", children: actions.map((action, index) => (_jsx(AlertActionButton, { ...action, theme: theme }, index))) }))] }), shouldShowClose && (_jsx("button", { type: "button", className: "alert__close-button", onClick: handleDismiss, "aria-label": "Close alert", children: _jsx(XMarkIcon, { className: "alert__close-icon" }) }))] }));
|
|
155
48
|
};
|
|
156
|
-
|
|
157
49
|
export default Alert;
|
|
@@ -1,157 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
4
3
|
// Simple icon components
|
|
5
|
-
const CheckCircleIcon
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
const ExclamationTriangleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
12
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
13
|
-
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
const XCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
18
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
19
|
-
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clipRule="evenodd" />
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const InformationCircleIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
24
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
25
|
-
<path fillRule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clipRule="evenodd" />
|
|
26
|
-
</svg>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const XMarkIcon: React.FC<{ className?: string }> = ({ className = '' }) => (
|
|
30
|
-
<svg className={className} fill="currentColor" viewBox="0 0 20 20">
|
|
31
|
-
<path fillRule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clipRule="evenodd" />
|
|
32
|
-
</svg>
|
|
33
|
-
);
|
|
34
|
-
|
|
4
|
+
const CheckCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }) }));
|
|
5
|
+
const ExclamationTriangleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }));
|
|
6
|
+
const XCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }));
|
|
7
|
+
const InformationCircleIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }));
|
|
8
|
+
const XMarkIcon = ({ className = '' }) => (_jsx("svg", { className: className, fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) }));
|
|
35
9
|
// Get icon for alert type
|
|
36
|
-
const getAlertIcon = (type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
10
|
+
const getAlertIcon = (type, className) => {
|
|
11
|
+
switch (type) {
|
|
12
|
+
case 'success':
|
|
13
|
+
return _jsx(CheckCircleIcon, { className: className });
|
|
14
|
+
case 'warning':
|
|
15
|
+
return _jsx(ExclamationTriangleIcon, { className: className });
|
|
16
|
+
case 'error':
|
|
17
|
+
return _jsx(XCircleIcon, { className: className });
|
|
18
|
+
case 'info':
|
|
19
|
+
return _jsx(InformationCircleIcon, { className: className });
|
|
20
|
+
default:
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
49
23
|
};
|
|
50
|
-
|
|
51
24
|
// Alert Action Button Component
|
|
52
|
-
const AlertActionButton
|
|
53
|
-
|
|
54
|
-
onClick,
|
|
55
|
-
variant = 'primary'
|
|
56
|
-
}) => {
|
|
57
|
-
return (
|
|
58
|
-
<button
|
|
59
|
-
type="button"
|
|
60
|
-
className={`alert__action-button alert__action-button--${variant}`}
|
|
61
|
-
onClick={onClick}
|
|
62
|
-
>
|
|
63
|
-
{label}
|
|
64
|
-
</button>
|
|
65
|
-
);
|
|
25
|
+
const AlertActionButton = ({ label, onClick, variant = 'primary' }) => {
|
|
26
|
+
return (_jsx("button", { type: "button", className: `alert__action-button alert__action-button--${variant}`, onClick: onClick, children: label }));
|
|
66
27
|
};
|
|
67
|
-
|
|
68
28
|
// Main Alert Component
|
|
69
|
-
export const Alert
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// const themeConfig = getTheme(theme);
|
|
87
|
-
// Note: colors not needed as we're using semantic CSS classes
|
|
88
|
-
|
|
89
|
-
const [isVisible, setIsVisible] = useState(true);
|
|
90
|
-
|
|
91
|
-
const handleDismiss = useCallback(() => {
|
|
92
|
-
if (onDismiss) {
|
|
93
|
-
onDismiss();
|
|
94
|
-
}
|
|
95
|
-
if (!persistent) {
|
|
96
|
-
setIsVisible(false);
|
|
29
|
+
export const Alert = ({ title, message, type = 'info', dismissible = false, onDismiss, icon, actions = [], showIcon = true, closable = false, persistent = false, className = '', theme = 'stan-design', size = 'md', variant = 'default' }) => {
|
|
30
|
+
// const { getTheme } = useTheme();
|
|
31
|
+
// const themeConfig = getTheme(theme);
|
|
32
|
+
// Note: colors not needed as we're using semantic CSS classes
|
|
33
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
34
|
+
const handleDismiss = useCallback(() => {
|
|
35
|
+
if (onDismiss) {
|
|
36
|
+
onDismiss();
|
|
37
|
+
}
|
|
38
|
+
if (!persistent) {
|
|
39
|
+
setIsVisible(false);
|
|
40
|
+
}
|
|
41
|
+
}, [onDismiss, persistent]);
|
|
42
|
+
const shouldShowIcon = showIcon && (icon || type);
|
|
43
|
+
const shouldShowClose = (closable || dismissible) && !persistent;
|
|
44
|
+
if (!isVisible) {
|
|
45
|
+
return null;
|
|
97
46
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const shouldShowIcon = showIcon && (icon || type);
|
|
101
|
-
const shouldShowClose = (closable || dismissible) && !persistent;
|
|
102
|
-
|
|
103
|
-
if (!isVisible) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<div
|
|
109
|
-
className={`alert__container alert__container--${size} alert__container--${type} alert__container--${variant} ${className}`}
|
|
110
|
-
role="alert"
|
|
111
|
-
aria-live="polite"
|
|
112
|
-
>
|
|
113
|
-
{shouldShowIcon && (
|
|
114
|
-
<div className={`alert__icon alert__icon--${type}`}>
|
|
115
|
-
{icon || getAlertIcon(type, 'alert__icon')}
|
|
116
|
-
</div>
|
|
117
|
-
)}
|
|
118
|
-
|
|
119
|
-
<div className="alert__content">
|
|
120
|
-
{title && (
|
|
121
|
-
<h3 className="alert__title">
|
|
122
|
-
{title}
|
|
123
|
-
</h3>
|
|
124
|
-
)}
|
|
125
|
-
|
|
126
|
-
<div className={`alert__message ${!title ? 'alert__message--only' : ''}`}>
|
|
127
|
-
{message}
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
{actions.length > 0 && (
|
|
131
|
-
<div className="alert__actions">
|
|
132
|
-
{actions.map((action, index) => (
|
|
133
|
-
<AlertActionButton
|
|
134
|
-
key={index}
|
|
135
|
-
{...action}
|
|
136
|
-
theme={theme}
|
|
137
|
-
/>
|
|
138
|
-
))}
|
|
139
|
-
</div>
|
|
140
|
-
)}
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
{shouldShowClose && (
|
|
144
|
-
<button
|
|
145
|
-
type="button"
|
|
146
|
-
className="alert__close-button"
|
|
147
|
-
onClick={handleDismiss}
|
|
148
|
-
aria-label="Close alert"
|
|
149
|
-
>
|
|
150
|
-
<XMarkIcon className="alert__close-icon" />
|
|
151
|
-
</button>
|
|
152
|
-
)}
|
|
153
|
-
</div>
|
|
154
|
-
);
|
|
47
|
+
return (_jsxs("div", { className: `alert__container alert__container--${size} alert__container--${type} alert__container--${variant} ${className}`, role: "alert", "aria-live": "polite", children: [shouldShowIcon && (_jsx("div", { className: `alert__icon alert__icon--${type}`, children: icon || getAlertIcon(type, 'alert__icon') })), _jsxs("div", { className: "alert__content", children: [title && (_jsx("h3", { className: "alert__title", children: title })), _jsx("div", { className: `alert__message ${!title ? 'alert__message--only' : ''}`, children: message }), actions.length > 0 && (_jsx("div", { className: "alert__actions", children: actions.map((action, index) => (_jsx(AlertActionButton, { ...action, theme: theme }, index))) }))] }), shouldShowClose && (_jsx("button", { type: "button", className: "alert__close-button", onClick: handleDismiss, "aria-label": "Close alert", children: _jsx(XMarkIcon, { className: "alert__close-icon" }) }))] }));
|
|
155
48
|
};
|
|
156
|
-
|
|
157
49
|
export default Alert;
|