@repobit/dex-system-design 3.0.1 → 3.0.2
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 +7 -0
- package/dist/src/_bundled/oxc-project_runtime/helpers/esm/decorate.js +1 -0
- package/dist/src/components/accordion/accordion-bg.css.js +1 -288
- package/dist/src/components/accordion/accordion-bg.css.js.map +1 -1
- package/dist/src/components/accordion/accordion-bg.d.ts +5 -5
- package/dist/src/components/accordion/accordion-bg.js +15 -210
- package/dist/src/components/accordion/accordion-bg.js.map +1 -1
- package/dist/src/components/accordion/accordion-keyboard.js +1 -89
- package/dist/src/components/accordion/accordion-keyboard.js.map +1 -1
- package/dist/src/components/accordion/accordion-panel.js +1 -22
- package/dist/src/components/accordion/accordion-panel.js.map +1 -1
- package/dist/src/components/accordion/accordion.css.js +1 -380
- package/dist/src/components/accordion/accordion.css.js.map +1 -1
- package/dist/src/components/accordion/accordion.d.ts +7 -7
- package/dist/src/components/accordion/accordion.js +16 -138
- package/dist/src/components/accordion/accordion.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js +1 -88
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +4 -4
- package/dist/src/components/agent-endpoints/agent-endpoints.js +17 -76
- package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
- package/dist/src/components/alert/alert.css.js +1 -217
- package/dist/src/components/alert/alert.css.js.map +1 -1
- package/dist/src/components/alert/alert.d.ts +4 -4
- package/dist/src/components/alert/alert.js +6 -110
- package/dist/src/components/alert/alert.js.map +1 -1
- package/dist/src/components/anchor/anchor-nav.css.js +1 -546
- package/dist/src/components/anchor/anchor-nav.css.js.map +1 -1
- package/dist/src/components/anchor/anchor-nav.d.ts +4 -4
- package/dist/src/components/anchor/anchor-nav.js +23 -567
- package/dist/src/components/anchor/anchor-nav.js.map +1 -1
- package/dist/src/components/annotation/annotation.css.js +1 -64
- package/dist/src/components/annotation/annotation.css.js.map +1 -1
- package/dist/src/components/annotation/annotation.d.ts +2 -2
- package/dist/src/components/annotation/annotation.js +7 -72
- package/dist/src/components/annotation/annotation.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.css.js +1 -122
- package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.d.ts +2 -2
- package/dist/src/components/audience-card/audience-card.js +8 -83
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/avatar/avatar.css.js +1 -65
- package/dist/src/components/avatar/avatar.css.js.map +1 -1
- package/dist/src/components/avatar/avatar.d.ts +3 -3
- package/dist/src/components/avatar/avatar.js +6 -76
- package/dist/src/components/avatar/avatar.js.map +1 -1
- package/dist/src/components/awards/awards-flex.css.js +1 -273
- package/dist/src/components/awards/awards-flex.css.js.map +1 -1
- package/dist/src/components/awards/awards-flex.d.ts +12 -12
- package/dist/src/components/awards/awards-flex.js +33 -264
- package/dist/src/components/awards/awards-flex.js.map +1 -1
- package/dist/src/components/awards/awards-spotlight.css.js +1 -161
- package/dist/src/components/awards/awards-spotlight.css.js.map +1 -1
- package/dist/src/components/awards/awards-spotlight.d.ts +4 -4
- package/dist/src/components/awards/awards-spotlight.js +24 -140
- package/dist/src/components/awards/awards-spotlight.js.map +1 -1
- package/dist/src/components/awards/awards.css.js +1 -401
- package/dist/src/components/awards/awards.css.js.map +1 -1
- package/dist/src/components/awards/awards.d.ts +13 -13
- package/dist/src/components/awards/awards.js +26 -179
- package/dist/src/components/awards/awards.js.map +1 -1
- package/dist/src/components/awards/scroll-slides.js +1 -131
- package/dist/src/components/awards/scroll-slides.js.map +1 -1
- package/dist/src/components/back/back.css.js +1 -91
- package/dist/src/components/back/back.css.js.map +1 -1
- package/dist/src/components/back/back.d.ts +1 -1
- package/dist/src/components/back/back.js +8 -71
- package/dist/src/components/back/back.js.map +1 -1
- package/dist/src/components/badge/badge.css.js +1 -204
- package/dist/src/components/badge/badge.css.js.map +1 -1
- package/dist/src/components/badge/badge.d.ts +4 -4
- package/dist/src/components/badge/badge.js +2 -117
- package/dist/src/components/badge/badge.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.css.js +16 -150
- package/dist/src/components/bento-grid/bento-grid.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.d.ts +3 -3
- package/dist/src/components/bento-grid/bento-grid.js +10 -189
- package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js +1 -338
- package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.d.ts +3 -3
- package/dist/src/components/bento-grid/bento-item.js +10 -94
- package/dist/src/components/bento-grid/bento-item.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.css.js +1 -54
- package/dist/src/components/blockquote/blockquote.css.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.d.ts +2 -2
- package/dist/src/components/blockquote/blockquote.js +1 -44
- package/dist/src/components/blockquote/blockquote.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.css.js +1 -168
- package/dist/src/components/breadcrumb/breadcrumb.css.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts +5 -5
- package/dist/src/components/breadcrumb/breadcrumb.js +9 -166
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/button/button.css.js +1 -843
- package/dist/src/components/button/button.css.js.map +1 -1
- package/dist/src/components/button/button.d.ts +5 -5
- package/dist/src/components/button/button.js +18 -420
- package/dist/src/components/button/button.js.map +1 -1
- package/dist/src/components/caption/caption.css.js +1 -29
- package/dist/src/components/caption/caption.css.js.map +1 -1
- package/dist/src/components/caption/caption.d.ts +3 -3
- package/dist/src/components/caption/caption.js +2 -36
- package/dist/src/components/caption/caption.js.map +1 -1
- package/dist/src/components/card-features/card-features.css.js +1 -120
- package/dist/src/components/card-features/card-features.css.js.map +1 -1
- package/dist/src/components/card-features/card-features.d.ts +3 -3
- package/dist/src/components/card-features/card-features.js +12 -145
- package/dist/src/components/card-features/card-features.js.map +1 -1
- package/dist/src/components/cards/card.css.js +1 -369
- package/dist/src/components/cards/card.css.js.map +1 -1
- package/dist/src/components/cards/card.d.ts +3 -3
- package/dist/src/components/cards/card.js +21 -312
- package/dist/src/components/cards/card.js.map +1 -1
- package/dist/src/components/carousel/carousel.css.js +1 -261
- package/dist/src/components/carousel/carousel.css.js.map +1 -1
- package/dist/src/components/carousel/carousel.d.ts +5 -5
- package/dist/src/components/carousel/carousel.js +13 -297
- package/dist/src/components/carousel/carousel.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.css.js +1 -173
- package/dist/src/components/checkbox/checkbox.css.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +2 -2
- package/dist/src/components/checkbox/checkbox.js +5 -138
- package/dist/src/components/checkbox/checkbox.js.map +1 -1
- package/dist/src/components/code/code.css.js +1 -73
- package/dist/src/components/code/code.css.js.map +1 -1
- package/dist/src/components/code/code.d.ts +2 -2
- package/dist/src/components/code/code.js +4 -87
- package/dist/src/components/code/code.js.map +1 -1
- package/dist/src/components/compare/compare.css.js +1 -478
- package/dist/src/components/compare/compare.css.js.map +1 -1
- package/dist/src/components/compare/compare.d.ts +5 -5
- package/dist/src/components/compare/compare.js +23 -476
- package/dist/src/components/compare/compare.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.css.js +1 -141
- package/dist/src/components/comparison-panel/comparison-panel.css.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.d.ts +2 -2
- package/dist/src/components/comparison-panel/comparison-panel.js +18 -86
- package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.js +1 -391
- package/dist/src/components/compatibility-table/compatibility-table.css.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.d.ts +2 -2
- package/dist/src/components/compatibility-table/compatibility-table.js +26 -136
- package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js +1 -97
- package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.d.ts +2 -2
- package/dist/src/components/cta-banner/cta-banner.js +8 -51
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/display/display.css.js +1 -95
- package/dist/src/components/display/display.css.js.map +1 -1
- package/dist/src/components/display/display.d.ts +2 -2
- package/dist/src/components/display/display.js +3 -84
- package/dist/src/components/display/display.js.map +1 -1
- package/dist/src/components/divider/divider-horizontal.d.ts +2 -2
- package/dist/src/components/divider/divider-horizontal.js +4 -63
- package/dist/src/components/divider/divider-horizontal.js.map +1 -1
- package/dist/src/components/divider/divider-vertical.d.ts +2 -2
- package/dist/src/components/divider/divider-vertical.js +6 -61
- package/dist/src/components/divider/divider-vertical.js.map +1 -1
- package/dist/src/components/divider/divider.css.js +1 -20
- package/dist/src/components/divider/divider.css.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.css.js +1 -121
- package/dist/src/components/dropdown/dropdown.css.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts +5 -5
- package/dist/src/components/dropdown/dropdown.js +17 -283
- package/dist/src/components/dropdown/dropdown.js.map +1 -1
- package/dist/src/components/features/features.css.js +1 -123
- package/dist/src/components/features/features.css.js.map +1 -1
- package/dist/src/components/features/features.d.ts +5 -5
- package/dist/src/components/features/features.js +11 -71
- package/dist/src/components/features/features.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.css.js +1 -100
- package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.d.ts +5 -5
- package/dist/src/components/features-tab/features-tab.js +9 -70
- package/dist/src/components/features-tab/features-tab.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.css.js +1 -28
- package/dist/src/components/fieldset/fieldset.css.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.d.ts +2 -2
- package/dist/src/components/fieldset/fieldset.js +3 -31
- package/dist/src/components/fieldset/fieldset.js.map +1 -1
- package/dist/src/components/footer/footer-images.js +5 -27
- package/dist/src/components/footer/footer-images.js.map +1 -1
- package/dist/src/components/footer/footer-links-group.css.js +1 -33
- package/dist/src/components/footer/footer-links-group.css.js.map +1 -1
- package/dist/src/components/footer/footer-links-group.d.ts +3 -3
- package/dist/src/components/footer/footer-links-group.js +3 -32
- package/dist/src/components/footer/footer-links-group.js.map +1 -1
- package/dist/src/components/footer/footer-locale.js +1 -45
- package/dist/src/components/footer/footer-locale.js.map +1 -1
- package/dist/src/components/footer/footer-lp.d.ts +7 -7
- package/dist/src/components/footer/footer-lp.js +8 -121
- package/dist/src/components/footer/footer-lp.js.map +1 -1
- package/dist/src/components/footer/footer-nav-menu.css.js +1 -61
- package/dist/src/components/footer/footer-nav-menu.css.js.map +1 -1
- package/dist/src/components/footer/footer-nav-menu.d.ts +3 -3
- package/dist/src/components/footer/footer-nav-menu.js +3 -47
- package/dist/src/components/footer/footer-nav-menu.js.map +1 -1
- package/dist/src/components/footer/footer.css.js +1 -664
- package/dist/src/components/footer/footer.css.js.map +1 -1
- package/dist/src/components/footer/footer.d.ts +13 -13
- package/dist/src/components/footer/footer.js +20 -305
- package/dist/src/components/footer/footer.js.map +1 -1
- package/dist/src/components/footer/localeMap.js +1 -1
- package/dist/src/components/footer/localeMap.js.map +1 -1
- package/dist/src/components/grid/grid.css.js +1 -78
- package/dist/src/components/grid/grid.css.js.map +1 -1
- package/dist/src/components/grid/grid.d.ts +2 -2
- package/dist/src/components/grid/grid.js +9 -126
- package/dist/src/components/grid/grid.js.map +1 -1
- package/dist/src/components/header/header-code.css.js +1 -369
- package/dist/src/components/header/header-code.css.js.map +1 -1
- package/dist/src/components/header/header-code.d.ts +4 -4
- package/dist/src/components/header/header-code.js +15 -163
- package/dist/src/components/header/header-code.js.map +1 -1
- package/dist/src/components/header/header.css.js +1 -757
- package/dist/src/components/header/header.css.js.map +1 -1
- package/dist/src/components/header/header.d.ts +7 -7
- package/dist/src/components/header/header.js +4 -212
- package/dist/src/components/header/header.js.map +1 -1
- package/dist/src/components/heading/heading.css.js +1 -89
- package/dist/src/components/heading/heading.css.js.map +1 -1
- package/dist/src/components/heading/heading.d.ts +2 -2
- package/dist/src/components/heading/heading.js +1 -108
- package/dist/src/components/heading/heading.js.map +1 -1
- package/dist/src/components/help-text/help-text.css.js +1 -19
- package/dist/src/components/help-text/help-text.css.js.map +1 -1
- package/dist/src/components/help-text/help-text.d.ts +2 -2
- package/dist/src/components/help-text/help-text.js +3 -31
- package/dist/src/components/help-text/help-text.js.map +1 -1
- package/dist/src/components/hero/hero.css.js +1 -362
- package/dist/src/components/hero/hero.css.js.map +1 -1
- package/dist/src/components/hero/hero.d.ts +3 -3
- package/dist/src/components/hero/hero.js +12 -164
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/highlight/highlight.css.js +1 -175
- package/dist/src/components/highlight/highlight.css.js.map +1 -1
- package/dist/src/components/highlight/highlight.d.ts +3 -3
- package/dist/src/components/highlight/highlight.js +4 -115
- package/dist/src/components/highlight/highlight.js.map +1 -1
- package/dist/src/components/icons/analysis-icon.d.ts +1 -1
- package/dist/src/components/icons/analysis-icon.js +2 -20
- package/dist/src/components/icons/analysis-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-down-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-down-icon.js +2 -20
- package/dist/src/components/icons/arrow-down-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-icon.js +2 -48
- package/dist/src/components/icons/arrow-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-right-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-right-icon.js +2 -45
- package/dist/src/components/icons/arrow-right-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-up-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-up-icon.js +2 -33
- package/dist/src/components/icons/arrow-up-icon.js.map +1 -1
- package/dist/src/components/icons/av-comparatives-icon.js +2 -31
- package/dist/src/components/icons/av-comparatives-icon.js.map +1 -1
- package/dist/src/components/icons/bd-ai-icon.js +2 -31
- package/dist/src/components/icons/bd-ai-icon.js.map +1 -1
- package/dist/src/components/icons/best-brands-icon.js +2 -31
- package/dist/src/components/icons/best-brands-icon.js.map +1 -1
- package/dist/src/components/icons/brand-signature-icon.d.ts +1 -1
- package/dist/src/components/icons/brand-signature-icon.js +2 -46
- package/dist/src/components/icons/brand-signature-icon.js.map +1 -1
- package/dist/src/components/icons/check-icon.d.ts +1 -1
- package/dist/src/components/icons/check-icon.js +2 -31
- package/dist/src/components/icons/check-icon.js.map +1 -1
- package/dist/src/components/icons/circle-info-icon.d.ts +1 -1
- package/dist/src/components/icons/circle-info-icon.js +2 -35
- package/dist/src/components/icons/circle-info-icon.js.map +1 -1
- package/dist/src/components/icons/close-icon.d.ts +1 -1
- package/dist/src/components/icons/close-icon.js +2 -20
- package/dist/src/components/icons/close-icon.js.map +1 -1
- package/dist/src/components/icons/enterprise-icon.d.ts +1 -1
- package/dist/src/components/icons/enterprise-icon.js +2 -22
- package/dist/src/components/icons/enterprise-icon.js.map +1 -1
- package/dist/src/components/icons/family-icon.d.ts +1 -1
- package/dist/src/components/icons/family-icon.js +2 -20
- package/dist/src/components/icons/family-icon.js.map +1 -1
- package/dist/src/components/icons/globe-icon.d.ts +1 -1
- package/dist/src/components/icons/globe-icon.js +2 -20
- package/dist/src/components/icons/globe-icon.js.map +1 -1
- package/dist/src/components/icons/guide-icon.d.ts +1 -1
- package/dist/src/components/icons/guide-icon.js +2 -20
- package/dist/src/components/icons/guide-icon.js.map +1 -1
- package/dist/src/components/icons/home-icon.d.ts +1 -1
- package/dist/src/components/icons/home-icon.js +2 -22
- package/dist/src/components/icons/home-icon.js.map +1 -1
- package/dist/src/components/icons/icon-element.js +1 -162
- package/dist/src/components/icons/icon-element.js.map +1 -1
- package/dist/src/components/icons/icons.d.ts +23 -23
- package/dist/src/components/icons/icons.js +1 -42
- package/dist/src/components/icons/individual-icon.d.ts +1 -1
- package/dist/src/components/icons/individual-icon.js +2 -20
- package/dist/src/components/icons/individual-icon.js.map +1 -1
- package/dist/src/components/icons/laurel-icon.d.ts +1 -1
- package/dist/src/components/icons/laurel-icon.js +2 -24
- package/dist/src/components/icons/laurel-icon.js.map +1 -1
- package/dist/src/components/icons/machine-learning-icon.d.ts +1 -1
- package/dist/src/components/icons/machine-learning-icon.js +2 -20
- package/dist/src/components/icons/machine-learning-icon.js.map +1 -1
- package/dist/src/components/icons/marks.d.ts +9 -9
- package/dist/src/components/icons/marks.js +1 -41
- package/dist/src/components/icons/minus-icon.d.ts +1 -1
- package/dist/src/components/icons/minus-icon.js +2 -19
- package/dist/src/components/icons/minus-icon.js.map +1 -1
- package/dist/src/components/icons/missing-icon.d.ts +1 -1
- package/dist/src/components/icons/missing-icon.js +3 -53
- package/dist/src/components/icons/missing-icon.js.map +1 -1
- package/dist/src/components/icons/pause-icon.d.ts +1 -1
- package/dist/src/components/icons/pause-icon.js +2 -22
- package/dist/src/components/icons/pause-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-2024-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-2024-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-business-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-business-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-readers-icon.js +2 -30
- package/dist/src/components/icons/pc-mag-readers-icon.js.map +1 -1
- package/dist/src/components/icons/play-icon.d.ts +1 -1
- package/dist/src/components/icons/play-icon.js +2 -22
- package/dist/src/components/icons/play-icon.js.map +1 -1
- package/dist/src/components/icons/plus-icon.d.ts +1 -1
- package/dist/src/components/icons/plus-icon.js +2 -19
- package/dist/src/components/icons/plus-icon.js.map +1 -1
- package/dist/src/components/icons/quote-icon.d.ts +1 -1
- package/dist/src/components/icons/quote-icon.js +2 -30
- package/dist/src/components/icons/quote-icon.js.map +1 -1
- package/dist/src/components/icons/small-business-icon.d.ts +1 -1
- package/dist/src/components/icons/small-business-icon.js +2 -22
- package/dist/src/components/icons/small-business-icon.js.map +1 -1
- package/dist/src/components/icons/top-product-icon.js +2 -31
- package/dist/src/components/icons/top-product-icon.js.map +1 -1
- package/dist/src/components/image/image.css.js +1 -106
- package/dist/src/components/image/image.css.js.map +1 -1
- package/dist/src/components/image/image.d.ts +2 -2
- package/dist/src/components/image/image.js +10 -115
- package/dist/src/components/image/image.js.map +1 -1
- package/dist/src/components/input/input-clipboard.css.js +1 -93
- package/dist/src/components/input/input-clipboard.css.js.map +1 -1
- package/dist/src/components/input/input-clipboard.d.ts +5 -5
- package/dist/src/components/input/input-clipboard.js +20 -257
- package/dist/src/components/input/input-clipboard.js.map +1 -1
- package/dist/src/components/input/input.css.js +1 -9
- package/dist/src/components/input/input.css.js.map +1 -1
- package/dist/src/components/input/input.d.ts +4 -4
- package/dist/src/components/input/input.js +19 -202
- package/dist/src/components/input/input.js.map +1 -1
- package/dist/src/components/install-options/install-options.css.js +1 -308
- package/dist/src/components/install-options/install-options.css.js.map +1 -1
- package/dist/src/components/install-options/install-options.d.ts +4 -4
- package/dist/src/components/install-options/install-options.js +28 -159
- package/dist/src/components/install-options/install-options.js.map +1 -1
- package/dist/src/components/label/label.css.js +1 -33
- package/dist/src/components/label/label.css.js.map +1 -1
- package/dist/src/components/label/label.d.ts +3 -3
- package/dist/src/components/label/label.js +3 -135
- package/dist/src/components/label/label.js.map +1 -1
- package/dist/src/components/light-carousel/light-carousel.css.js +1 -270
- package/dist/src/components/light-carousel/light-carousel.css.js.map +1 -1
- package/dist/src/components/light-carousel/light-carousel.d.ts +3 -3
- package/dist/src/components/light-carousel/light-carousel.js +16 -181
- package/dist/src/components/light-carousel/light-carousel.js.map +1 -1
- package/dist/src/components/link/link.css.js +1 -288
- package/dist/src/components/link/link.css.js.map +1 -1
- package/dist/src/components/link/link.d.ts +3 -3
- package/dist/src/components/link/link.js +6 -233
- package/dist/src/components/link/link.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.css.js +1 -167
- package/dist/src/components/list/list-item/list-item.css.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.d.ts +3 -3
- package/dist/src/components/list/list-item/list-item.js +3 -122
- package/dist/src/components/list/list-item/list-item.js.map +1 -1
- package/dist/src/components/list/list.css.js +1 -180
- package/dist/src/components/list/list.css.js.map +1 -1
- package/dist/src/components/list/list.d.ts +1 -1
- package/dist/src/components/list/list.js +5 -82
- package/dist/src/components/list/list.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js +1 -93
- package/dist/src/components/logo-marquee/logo-marquee.css.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.d.ts +3 -3
- package/dist/src/components/logo-marquee/logo-marquee.js +6 -147
- package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
- package/dist/src/components/modal/modal.css.js +1 -203
- package/dist/src/components/modal/modal.css.js.map +1 -1
- package/dist/src/components/modal/modal.d.ts +3 -3
- package/dist/src/components/modal/modal.js +3 -131
- package/dist/src/components/modal/modal.js.map +1 -1
- package/dist/src/components/motion-art/motion-art.d.ts +1 -1
- package/dist/src/components/motion-art/motion-art.js +1 -114
- package/dist/src/components/motion-art/motion-art.js.map +1 -1
- package/dist/src/components/overview/overview.css.js +1 -125
- package/dist/src/components/overview/overview.css.js.map +1 -1
- package/dist/src/components/overview/overview.d.ts +2 -2
- package/dist/src/components/overview/overview.js +9 -50
- package/dist/src/components/overview/overview.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.css.js +1 -174
- package/dist/src/components/page-switcher/page-switcher.css.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.d.ts +2 -2
- package/dist/src/components/page-switcher/page-switcher.js +6 -62
- package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js +1 -160
- package/dist/src/components/pagination-dots/pagination-dots.css.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.d.ts +2 -2
- package/dist/src/components/pagination-dots/pagination-dots.js +10 -210
- package/dist/src/components/pagination-dots/pagination-dots.js.map +1 -1
- package/dist/src/components/paragraph/paragraph.css.js +1 -101
- package/dist/src/components/paragraph/paragraph.css.js.map +1 -1
- package/dist/src/components/paragraph/paragraph.d.ts +2 -2
- package/dist/src/components/paragraph/paragraph.js +3 -119
- package/dist/src/components/paragraph/paragraph.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js +1 -245
- package/dist/src/components/partner-banner/partner-banner.css.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.d.ts +1 -1
- package/dist/src/components/partner-banner/partner-banner.js +6 -81
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/picture/picture.css.js +1 -208
- package/dist/src/components/picture/picture.css.js.map +1 -1
- package/dist/src/components/picture/picture.d.ts +2 -2
- package/dist/src/components/picture/picture.js +14 -186
- package/dist/src/components/picture/picture.js.map +1 -1
- package/dist/src/components/post-card/post-card.css.js +1 -149
- package/dist/src/components/post-card/post-card.css.js.map +1 -1
- package/dist/src/components/post-card/post-card.d.ts +2 -2
- package/dist/src/components/post-card/post-card.js +5 -97
- package/dist/src/components/post-card/post-card.js.map +1 -1
- package/dist/src/components/pricing-cards/adopt-styles.js +1 -18
- package/dist/src/components/pricing-cards/adopt-styles.js.map +1 -1
- package/dist/src/components/pricing-cards/new-pricing-card.d.ts +2 -2
- package/dist/src/components/pricing-cards/new-pricing-card.js +4 -49
- package/dist/src/components/pricing-cards/new-pricing-card.js.map +1 -1
- package/dist/src/components/pricing-cards/new-pricing.css.js +1 -74
- package/dist/src/components/pricing-cards/new-pricing.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js +1 -11
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.d.ts +2 -2
- package/dist/src/components/pricing-cards/pricing-card-actions.js +2 -59
- package/dist/src/components/pricing-cards/pricing-card-actions.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.css.js +1 -41
- package/dist/src/components/pricing-cards/pricing-card-container.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.d.ts +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.js +2 -40
- package/dist/src/components/pricing-cards/pricing-card-container.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-header.css.js +1 -82
- package/dist/src/components/pricing-cards/pricing-card-header.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-header.d.ts +5 -5
- package/dist/src/components/pricing-cards/pricing-card-header.js +7 -70
- package/dist/src/components/pricing-cards/pricing-card-header.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js +1 -92
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.d.ts +6 -6
- package/dist/src/components/pricing-cards/pricing-card-pricing.js +7 -87
- package/dist/src/components/pricing-cards/pricing-card-pricing.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js +1 -29
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.d.ts +4 -4
- package/dist/src/components/pricing-cards/pricing-card-show-more.js +5 -41
- package/dist/src/components/pricing-cards/pricing-card-show-more.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card.css.js +1 -660
- package/dist/src/components/pricing-cards/pricing-card.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card.d.ts +7 -7
- package/dist/src/components/pricing-cards/pricing-card.js +53 -639
- package/dist/src/components/pricing-cards/pricing-card.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js +1 -34
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.d.ts +2 -2
- package/dist/src/components/pricing-cards/pricing-feature-item.js +2 -22
- package/dist/src/components/pricing-cards/pricing-feature-item.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.css.js +1 -106
- package/dist/src/components/process-steps/process-steps.css.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.d.ts +5 -5
- package/dist/src/components/process-steps/process-steps.js +10 -78
- package/dist/src/components/process-steps/process-steps.js.map +1 -1
- package/dist/src/components/progress/progress.css.js +1 -123
- package/dist/src/components/progress/progress.css.js.map +1 -1
- package/dist/src/components/progress/progress.d.ts +2 -2
- package/dist/src/components/progress/progress.js +6 -72
- package/dist/src/components/progress/progress.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.css.js +1 -130
- package/dist/src/components/quick-answer/quick-answer.css.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.d.ts +2 -2
- package/dist/src/components/quick-answer/quick-answer.js +9 -49
- package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
- package/dist/src/components/radio/radio-group.css.js +1 -41
- package/dist/src/components/radio/radio-group.css.js.map +1 -1
- package/dist/src/components/radio/radio-group.d.ts +1 -1
- package/dist/src/components/radio/radio-group.js +5 -92
- package/dist/src/components/radio/radio-group.js.map +1 -1
- package/dist/src/components/radio/radio.css.js +1 -193
- package/dist/src/components/radio/radio.css.js.map +1 -1
- package/dist/src/components/radio/radio.d.ts +4 -4
- package/dist/src/components/radio/radio.js +6 -263
- package/dist/src/components/radio/radio.js.map +1 -1
- package/dist/src/components/radio/toggle-radio.d.ts +2 -2
- package/dist/src/components/radio/toggle-radio.js +3 -39
- package/dist/src/components/radio/toggle-radio.js.map +1 -1
- package/dist/src/components/review/review-grid.css.js +1 -46
- package/dist/src/components/review/review-grid.css.js.map +1 -1
- package/dist/src/components/review/review-grid.d.ts +2 -2
- package/dist/src/components/review/review-grid.js +4 -49
- package/dist/src/components/review/review-grid.js.map +1 -1
- package/dist/src/components/review/review.css.js +1 -54
- package/dist/src/components/review/review.css.js.map +1 -1
- package/dist/src/components/review/review.d.ts +2 -2
- package/dist/src/components/review/review.js +2 -59
- package/dist/src/components/review/review.js.map +1 -1
- package/dist/src/components/section/section.css.js +1 -37
- package/dist/src/components/section/section.css.js.map +1 -1
- package/dist/src/components/section/section.d.ts +1 -1
- package/dist/src/components/section/section.js +1 -50
- package/dist/src/components/section/section.js.map +1 -1
- package/dist/src/components/section-header/section-header.css.js +1 -99
- package/dist/src/components/section-header/section-header.css.js.map +1 -1
- package/dist/src/components/section-header/section-header.d.ts +2 -2
- package/dist/src/components/section-header/section-header.js +4 -85
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/dist/src/components/shared/announcer.d.ts +1 -1
- package/dist/src/components/shared/announcer.js +1 -34
- package/dist/src/components/shared/announcer.js.map +1 -1
- package/dist/src/components/shared/controller.media-query.d.ts +1 -1
- package/dist/src/components/shared/controller.media-query.js +1 -57
- package/dist/src/components/shared/controller.media-query.js.map +1 -1
- package/dist/src/components/shared/define-element.js +1 -16
- package/dist/src/components/shared/define-element.js.map +1 -1
- package/dist/src/components/shared/ensemble.css.js +1 -101
- package/dist/src/components/shared/ensemble.css.js.map +1 -1
- package/dist/src/components/shared/events.js +0 -13
- package/dist/src/components/shared/fill-width.css.js +2 -27
- package/dist/src/components/shared/fill-width.css.js.map +1 -1
- package/dist/src/components/shared/form-control.d.ts +1 -1
- package/dist/src/components/shared/form-control.js +1 -198
- package/dist/src/components/shared/form-control.js.map +1 -1
- package/dist/src/components/shared/form-field.css.js +1 -258
- package/dist/src/components/shared/form-field.css.js.map +1 -1
- package/dist/src/components/shared/prop-vocabulary.js +1 -49
- package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
- package/dist/src/components/shared/token-scales.js +1 -351
- package/dist/src/components/shared/token-scales.js.map +1 -1
- package/dist/src/components/skeleton/skeleton.css.js +1 -32
- package/dist/src/components/skeleton/skeleton.css.js.map +1 -1
- package/dist/src/components/skeleton/skeleton.d.ts +2 -2
- package/dist/src/components/skeleton/skeleton.js +4 -36
- package/dist/src/components/skeleton/skeleton.js.map +1 -1
- package/dist/src/components/spinner/spinner.css.js +1 -87
- package/dist/src/components/spinner/spinner.css.js.map +1 -1
- package/dist/src/components/spinner/spinner.d.ts +3 -3
- package/dist/src/components/spinner/spinner.js +3 -69
- package/dist/src/components/spinner/spinner.js.map +1 -1
- package/dist/src/components/spotlight-section/spotlight-section.css.js +1 -105
- package/dist/src/components/spotlight-section/spotlight-section.css.js.map +1 -1
- package/dist/src/components/spotlight-section/spotlight-section.d.ts +2 -2
- package/dist/src/components/spotlight-section/spotlight-section.js +11 -72
- package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
- package/dist/src/components/stat/stat-highlight.js +6 -82
- package/dist/src/components/stat/stat-highlight.js.map +1 -1
- package/dist/src/components/stat/stat-tile.js +5 -52
- package/dist/src/components/stat/stat-tile.js.map +1 -1
- package/dist/src/components/stat/stat.css.js +1 -145
- package/dist/src/components/stat/stat.css.js.map +1 -1
- package/dist/src/components/stat/stat.d.ts +2 -2
- package/dist/src/components/stat/stat.js +1 -3
- package/dist/src/components/switch/switch.css.js +1 -175
- package/dist/src/components/switch/switch.css.js.map +1 -1
- package/dist/src/components/switch/switch.d.ts +4 -4
- package/dist/src/components/switch/switch.js +4 -99
- package/dist/src/components/switch/switch.js.map +1 -1
- package/dist/src/components/tab-list/tab-list.css.js +1 -289
- package/dist/src/components/tab-list/tab-list.css.js.map +1 -1
- package/dist/src/components/tab-list/tab-list.d.ts +1 -1
- package/dist/src/components/tab-list/tab-list.js +13 -191
- package/dist/src/components/tab-list/tab-list.js.map +1 -1
- package/dist/src/components/tabs/tabs.css.js +1 -77
- package/dist/src/components/tabs/tabs.css.js.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +6 -6
- package/dist/src/components/tabs/tabs.js +8 -220
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/src/components/tag/tag.css.js +1 -52
- package/dist/src/components/tag/tag.css.js.map +1 -1
- package/dist/src/components/tag/tag.d.ts +2 -2
- package/dist/src/components/tag/tag.js +2 -37
- package/dist/src/components/tag/tag.js.map +1 -1
- package/dist/src/components/terminal/terminal-cursor.js +1 -65
- package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
- package/dist/src/components/terminal/terminal-message.css.js +1 -409
- package/dist/src/components/terminal/terminal-message.css.js.map +1 -1
- package/dist/src/components/terminal/terminal-message.d.ts +5 -5
- package/dist/src/components/terminal/terminal-message.js +28 -183
- package/dist/src/components/terminal/terminal-message.js.map +1 -1
- package/dist/src/components/termsOfUse/terms.css.js +1 -55
- package/dist/src/components/termsOfUse/terms.css.js.map +1 -1
- package/dist/src/components/termsOfUse/terms.d.ts +5 -5
- package/dist/src/components/termsOfUse/terms.js +9 -82
- package/dist/src/components/termsOfUse/terms.js.map +1 -1
- package/dist/src/components/textarea/textarea.css.js +1 -49
- package/dist/src/components/textarea/textarea.css.js.map +1 -1
- package/dist/src/components/textarea/textarea.d.ts +5 -5
- package/dist/src/components/textarea/textarea.js +15 -160
- package/dist/src/components/textarea/textarea.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.css.js +1 -96
- package/dist/src/components/tooltip/tooltip.css.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +2 -2
- package/dist/src/components/tooltip/tooltip.js +5 -285
- package/dist/src/components/tooltip/tooltip.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.css.js +1 -228
- package/dist/src/components/trust-panel/trust-panel.css.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.d.ts +4 -4
- package/dist/src/components/trust-panel/trust-panel.js +25 -104
- package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
- package/dist/src/components/video/video.css.js +1 -20
- package/dist/src/components/video/video.css.js.map +1 -1
- package/dist/src/components/video/video.d.ts +2 -2
- package/dist/src/components/video/video.js +5 -88
- package/dist/src/components/video/video.js.map +1 -1
- package/dist/src/components/video-player/video-player.css.js +1 -167
- package/dist/src/components/video-player/video-player.css.js.map +1 -1
- package/dist/src/components/video-player/video-player.d.ts +2 -2
- package/dist/src/components/video-player/video-player.js +15 -150
- package/dist/src/components/video-player/video-player.js.map +1 -1
- package/dist/src/components/visually-hidden/visually-hidden.css.js +1 -22
- package/dist/src/components/visually-hidden/visually-hidden.css.js.map +1 -1
- package/dist/src/components/visually-hidden/visually-hidden.d.ts +2 -2
- package/dist/src/components/visually-hidden/visually-hidden.js +2 -22
- package/dist/src/components/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/src/tokens/brand-layer.js +8 -162
- package/dist/src/tokens/brand-layer.js.map +1 -1
- package/dist/src/tokens/dark-derivation.js +1 -325
- package/dist/src/tokens/dark-derivation.js.map +1 -1
- package/dist/src/tokens/dark-findings.d.ts +1 -1
- package/dist/src/tokens/dark-findings.js +1 -204
- package/dist/src/tokens/dark-findings.js.map +1 -1
- package/dist/src/tokens/fonts.css +1 -166
- package/dist/src/tokens/layout.css +1 -61
- package/dist/src/tokens/story-chrome.js +27 -221
- package/dist/src/tokens/story-chrome.js.map +1 -1
- package/dist/src/tokens/themes/bitdefender.js +1 -30
- package/dist/src/tokens/themes/bitdefender.js.map +1 -1
- package/dist/src/tokens/themes/contract.js +1 -7
- package/dist/src/tokens/themes/contract.js.map +1 -1
- package/dist/src/tokens/themes/index.js +1 -39
- package/dist/src/tokens/themes/index.js.map +1 -1
- package/dist/src/tokens/token-map.js +1 -236
- package/dist/src/tokens/token-map.js.map +1 -1
- package/dist/src/tokens/token-purposes.js +1 -259
- package/dist/src/tokens/token-purposes.js.map +1 -1
- package/dist/src/tokens/tokens.css +1 -1809
- package/dist/src/tokens/tokens.js +1 -1865
- package/dist/src/tokens/tokens.js.map +1 -1
- package/dist/src/tokens/type-ceiling-words.js +1 -293
- package/dist/src/tokens/type-ceiling-words.js.map +1 -1
- package/package.json +14 -3
- package/schemas/component-manifest.json +1 -1
- package/dist/src/components/icons/icons.js.map +0 -1
- package/dist/src/components/icons/marks.js.map +0 -1
- package/dist/src/components/shared/events.js.map +0 -1
- package/dist/src/components/stat/stat.js.map +0 -1
|
@@ -1,125 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
8
|
-
import { property, state } from "lit/decorators.js";
|
|
9
|
-
import { defineElement } from "../shared/define-element.js";
|
|
10
|
-
import { tokens } from "../../tokens/tokens.js";
|
|
11
|
-
import "../button/button.js";
|
|
12
|
-
import "../icons/pause-icon.js";
|
|
13
|
-
import "../icons/play-icon.js";
|
|
14
|
-
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
15
|
-
import { spacing } from "../shared/token-scales.js";
|
|
16
|
-
import { logoMarqueeCSS } from "./logo-marquee.css.js";
|
|
17
|
-
/**
|
|
18
|
-
* A row of logos sliding sideways behind an edge fade: the homepage's trusted
|
|
19
|
-
* line ("#1 most awarded" and the partner marks) and the award strip under
|
|
20
|
-
* Proven. Drawn in the foundation Figma file as Logo marquee.
|
|
21
|
-
*
|
|
22
|
-
* The logos are the page's: slot them as they are (an <img> with its width
|
|
23
|
-
* and height, an icon, a label). To loop without a seam the row has to be
|
|
24
|
-
* longer than the window, so this element clones the slotted set into its
|
|
25
|
-
* own shadow root as many times as the width needs and moves the whole track
|
|
26
|
-
* by one copy -- the jump back is then exactly one repeat, and invisible. The
|
|
27
|
-
* copies are aria-hidden and inert: a screen reader reads the set once.
|
|
28
|
-
*
|
|
29
|
-
* It moves on its own for longer than five seconds, so it has a pause button
|
|
30
|
-
* (WCAG 2.2.2): holding it on hover or focus was not enough, because the
|
|
31
|
-
* logos are usually images and nothing in the row takes focus. The button
|
|
32
|
-
* sets `paused`, which a page can also set. The pointer or focus on the row
|
|
33
|
-
* still holds it. Under prefers-reduced-motion it never moves -- the set
|
|
34
|
-
* wraps in place instead, so nothing is hidden behind the fade -- and the
|
|
35
|
-
* button goes with the motion.
|
|
36
|
-
*/
|
|
37
|
-
let LogoMarquee = class LogoMarquee extends LitElement {
|
|
38
|
-
static { this.styles = [tokens, ensembleCSS, logoMarqueeCSS]; }
|
|
39
|
-
/* A resize is measured on the next frame, not inside the observer's
|
|
40
|
-
delivery. A new copy count re-renders the track, and in WebKit that
|
|
41
|
-
resizes a box this observer watches while the delivery is still running:
|
|
42
|
-
Safari reported "ResizeObserver loop completed with undelivered
|
|
43
|
-
notifications" on every homepage load. Measured a frame later, the new
|
|
44
|
-
size is an ordinary delivery of its own. */
|
|
45
|
-
constructor() {
|
|
46
|
-
super();
|
|
47
|
-
this.label = "";
|
|
48
|
-
// seconds for one copy to pass: 35 for the partners and the awards alike
|
|
49
|
-
this.duration = 35;
|
|
50
|
-
// a step on the spacing scale, between two logos
|
|
51
|
-
this.gap = "48";
|
|
52
|
-
this.paused = false;
|
|
53
|
-
this.pauseLabel = "Pause the moving logos";
|
|
54
|
-
this.playLabel = "Play the moving logos";
|
|
55
|
-
// copies of the set after the original; at least one, or there is no loop
|
|
56
|
-
this._copies = 1;
|
|
57
|
-
this._frame = 0;
|
|
58
|
-
this._resize = new ResizeObserver(() => {
|
|
59
|
-
cancelAnimationFrame(this._frame);
|
|
60
|
-
this._frame = requestAnimationFrame(() => this._measure());
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
connectedCallback() {
|
|
64
|
-
super.connectedCallback();
|
|
65
|
-
if (this.hasUpdated)
|
|
66
|
-
this._observe();
|
|
67
|
-
}
|
|
68
|
-
disconnectedCallback() {
|
|
69
|
-
super.disconnectedCallback();
|
|
70
|
-
this._resize.disconnect();
|
|
71
|
-
cancelAnimationFrame(this._frame);
|
|
72
|
-
}
|
|
73
|
-
firstUpdated() {
|
|
74
|
-
this._observe();
|
|
75
|
-
}
|
|
76
|
-
_observe() {
|
|
77
|
-
this._resize.observe(this.renderRoot.querySelector(".viewport"));
|
|
78
|
-
this._resize.observe(this.renderRoot.querySelector(".group"));
|
|
79
|
-
}
|
|
80
|
-
/* One copy must cover the window on its own while the original slides out,
|
|
81
|
-
so a set narrower than the window takes more than one. */
|
|
82
|
-
_measure() {
|
|
83
|
-
const viewport = this.renderRoot.querySelector(".viewport");
|
|
84
|
-
const group = this.renderRoot.querySelector(".group");
|
|
85
|
-
if (!viewport || !group || !group.offsetWidth)
|
|
86
|
-
return;
|
|
87
|
-
const copies = Math.max(1, Math.ceil(viewport.offsetWidth / group.offsetWidth));
|
|
88
|
-
if (copies !== this._copies)
|
|
89
|
-
this._copies = copies;
|
|
90
|
-
}
|
|
91
|
-
_onSlotChange() {
|
|
92
|
-
this._fillCopies();
|
|
93
|
-
this._measure();
|
|
94
|
-
}
|
|
95
|
-
_fillCopies() {
|
|
96
|
-
const slot = this.renderRoot.querySelector("slot");
|
|
97
|
-
if (!slot)
|
|
98
|
-
return;
|
|
99
|
-
const items = slot.assignedElements({ flatten: true });
|
|
100
|
-
for (const copy of this.renderRoot.querySelectorAll(".copy")) {
|
|
101
|
-
copy.replaceChildren(...items.map(item => item.cloneNode(true)));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
updated(changed) {
|
|
105
|
-
if (changed.has("_copies"))
|
|
106
|
-
this._fillCopies();
|
|
107
|
-
}
|
|
108
|
-
_toggle() {
|
|
109
|
-
this.paused = !this.paused;
|
|
110
|
-
}
|
|
111
|
-
render() {
|
|
112
|
-
const copies = Array.from({ length: this._copies });
|
|
113
|
-
return html `
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import{spacing as n}from"../shared/token-scales.js";import r from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as i}from"../shared/ensemble.css.js";import"../button/button.js";import"../icons/pause-icon.js";import"../icons/play-icon.js";import{logoMarqueeCSS as a}from"./logo-marquee.css.js";import{LitElement as o,html as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=class extends o{static{this.styles=[t,i,a]}constructor(){super(),this.label=``,this.duration=35,this.gap=`48`,this.paused=!1,this.pauseLabel=`Pause the moving logos`,this.playLabel=`Play the moving logos`,this._copies=1,this._frame=0,this._resize=new ResizeObserver(()=>{cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._measure())})}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._observe()}disconnectedCallback(){super.disconnectedCallback(),this._resize.disconnect(),cancelAnimationFrame(this._frame)}firstUpdated(){this._observe()}_observe(){this._resize.observe(this.renderRoot.querySelector(`.viewport`)),this._resize.observe(this.renderRoot.querySelector(`.group`))}_measure(){let e=this.renderRoot.querySelector(`.viewport`),t=this.renderRoot.querySelector(`.group`);if(!e||!t||!t.offsetWidth)return;let n=Math.max(1,Math.ceil(e.offsetWidth/t.offsetWidth));n!==this._copies&&(this._copies=n)}_onSlotChange(){this._fillCopies(),this._measure()}_fillCopies(){let e=this.renderRoot.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0});for(let e of this.renderRoot.querySelectorAll(`.copy`))e.replaceChildren(...t.map(e=>e.cloneNode(!0)))}updated(e){e.has(`_copies`)&&this._fillCopies()}_toggle(){this.paused=!this.paused}render(){let e=Array.from({length:this._copies});return s`
|
|
114
2
|
<section
|
|
115
3
|
class="bd-ensemble root"
|
|
116
4
|
aria-label="${this.label}"
|
|
117
|
-
style="--bd-logo-marquee-gap: ${
|
|
5
|
+
style="--bd-logo-marquee-gap: ${n(this.gap)||`var(--spacing-48)`}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies+1};"
|
|
118
6
|
>
|
|
119
7
|
<div class="viewport">
|
|
120
8
|
<div class="track">
|
|
121
9
|
<div class="group"><slot @slotchange=${this._onSlotChange}></slot></div>
|
|
122
|
-
${
|
|
10
|
+
${e.map(()=>s`<div class="group copy" aria-hidden="true" inert></div>`)}
|
|
123
11
|
</div>
|
|
124
12
|
</div>
|
|
125
13
|
<bd-button
|
|
@@ -127,38 +15,9 @@ let LogoMarquee = class LogoMarquee extends LitElement {
|
|
|
127
15
|
variant="ghost"
|
|
128
16
|
size="sm"
|
|
129
17
|
icon-only
|
|
130
|
-
label="${this.paused
|
|
18
|
+
label="${this.paused?this.playLabel:this.pauseLabel}"
|
|
131
19
|
@click=${this._toggle}
|
|
132
|
-
>${this.paused
|
|
133
|
-
? html `<bd-play-icon size="sm"></bd-play-icon>`
|
|
134
|
-
: html `<bd-pause-icon size="sm"></bd-pause-icon>`}</bd-button>
|
|
20
|
+
>${this.paused?s`<bd-play-icon size="sm"></bd-play-icon>`:s`<bd-pause-icon size="sm"></bd-pause-icon>`}</bd-button>
|
|
135
21
|
</section>
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ type: String })
|
|
141
|
-
], LogoMarquee.prototype, "label", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
property({ type: Number })
|
|
144
|
-
], LogoMarquee.prototype, "duration", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
property({ type: String })
|
|
147
|
-
], LogoMarquee.prototype, "gap", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
property({ type: Boolean, reflect: true })
|
|
150
|
-
], LogoMarquee.prototype, "paused", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ type: String, attribute: "pause-label" })
|
|
153
|
-
], LogoMarquee.prototype, "pauseLabel", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
property({ type: String, attribute: "play-label" })
|
|
156
|
-
], LogoMarquee.prototype, "playLabel", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
state()
|
|
159
|
-
], LogoMarquee.prototype, "_copies", void 0);
|
|
160
|
-
LogoMarquee = __decorate([
|
|
161
|
-
defineElement("bd-logo-marquee")
|
|
162
|
-
], LogoMarquee);
|
|
163
|
-
export { LogoMarquee };
|
|
22
|
+
`}};r([c({type:String})],u.prototype,`label`,void 0),r([c({type:Number})],u.prototype,`duration`,void 0),r([c({type:String})],u.prototype,`gap`,void 0),r([c({type:Boolean,reflect:!0})],u.prototype,`paused`,void 0),r([c({type:String,attribute:`pause-label`})],u.prototype,`pauseLabel`,void 0),r([c({type:String,attribute:`play-label`})],u.prototype,`playLabel`,void 0),r([l()],u.prototype,`_copies`,void 0),u=r([e(`bd-logo-marquee`)],u);export{u as LogoMarquee};
|
|
164
23
|
//# sourceMappingURL=logo-marquee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-marquee.js","
|
|
1
|
+
{"version":3,"file":"logo-marquee.js","names":["_decorate","__decorate","LogoMarquee","LitElement","tokens","ensembleCSS","logoMarqueeCSS","viewport","group","copies","slot","items","copy","item","changed","spacing","property","state","defineElement"],"sources":["../../../../src/components/logo-marquee/logo-marquee.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/icons/pause-icon.ts\";\nimport \"#components/icons/play-icon.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { spacing } from \"#shared/token-scales.ts\";\nimport { logoMarqueeCSS } from \"./logo-marquee.css.ts\";\n\n/**\n * A row of logos sliding sideways behind an edge fade: the homepage's trusted\n * line (\"#1 most awarded\" and the partner marks) and the award strip under\n * Proven. Drawn in the foundation Figma file as Logo marquee.\n *\n * The logos are the page's: slot them as they are (an <img> with its width\n * and height, an icon, a label). To loop without a seam the row has to be\n * longer than the window, so this element clones the slotted set into its\n * own shadow root as many times as the width needs and moves the whole track\n * by one copy -- the jump back is then exactly one repeat, and invisible. The\n * copies are aria-hidden and inert: a screen reader reads the set once.\n *\n * It moves on its own for longer than five seconds, so it has a pause button\n * (WCAG 2.2.2): holding it on hover or focus was not enough, because the\n * logos are usually images and nothing in the row takes focus. The button\n * sets `paused`, which a page can also set. The pointer or focus on the row\n * still holds it. Under prefers-reduced-motion it never moves -- the set\n * wraps in place instead, so nothing is hidden behind the fade -- and the\n * button goes with the motion.\n */\n@defineElement(\"bd-logo-marquee\")\nexport class LogoMarquee extends LitElement {\n @property({ type: String })\n label = \"\";\n // seconds for one copy to pass: 35 for the partners and the awards alike\n @property({ type: Number })\n duration = 35;\n // a step on the spacing scale, between two logos\n @property({ type: String })\n gap = \"48\";\n @property({ type: Boolean, reflect: true })\n paused = false;\n @property({ type: String, attribute: \"pause-label\" })\n pauseLabel = \"Pause the moving logos\";\n @property({ type: String, attribute: \"play-label\" })\n playLabel = \"Play the moving logos\";\n // copies of the set after the original; at least one, or there is no loop\n @state()\n _copies = 1;\n\n _resize: ResizeObserver;\n _frame = 0;\n\n static styles = [tokens, ensembleCSS, logoMarqueeCSS];\n\n /* A resize is measured on the next frame, not inside the observer's\n delivery. A new copy count re-renders the track, and in WebKit that\n resizes a box this observer watches while the delivery is still running:\n Safari reported \"ResizeObserver loop completed with undelivered\n notifications\" on every homepage load. Measured a frame later, the new\n size is an ordinary delivery of its own. */\n constructor() {\n super();\n this._resize = new ResizeObserver(() => {\n cancelAnimationFrame(this._frame);\n this._frame = requestAnimationFrame(() => this._measure());\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.hasUpdated) this._observe();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._resize.disconnect();\n cancelAnimationFrame(this._frame);\n }\n\n firstUpdated() {\n this._observe();\n }\n\n _observe() {\n this._resize.observe(this.renderRoot.querySelector(\".viewport\")!);\n this._resize.observe(this.renderRoot.querySelector(\".group\")!);\n }\n\n /* One copy must cover the window on its own while the original slides out,\n so a set narrower than the window takes more than one. */\n _measure() {\n const viewport = this.renderRoot.querySelector<HTMLElement>(\".viewport\");\n const group = this.renderRoot.querySelector<HTMLElement>(\".group\");\n if (!viewport || !group || !group.offsetWidth) return;\n const copies = Math.max(1, Math.ceil(viewport.offsetWidth / group.offsetWidth));\n if (copies !== this._copies) this._copies = copies;\n }\n\n _onSlotChange() {\n this._fillCopies();\n this._measure();\n }\n\n _fillCopies() {\n const slot = this.renderRoot.querySelector(\"slot\");\n if (!slot) return;\n const items = slot.assignedElements({ flatten: true });\n for (const copy of this.renderRoot.querySelectorAll(\".copy\")) {\n copy.replaceChildren(...items.map(item => item.cloneNode(true)));\n }\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has(\"_copies\")) this._fillCopies();\n }\n\n _toggle() {\n this.paused = !this.paused;\n }\n\n render() {\n const copies = Array.from({ length: this._copies });\n return html`\n <section\n class=\"bd-ensemble root\"\n aria-label=\"${this.label}\"\n style=\"--bd-logo-marquee-gap: ${spacing(this.gap) || \"var(--spacing-48)\"}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies + 1};\"\n >\n <div class=\"viewport\">\n <div class=\"track\">\n <div class=\"group\"><slot @slotchange=${this._onSlotChange}></slot></div>\n ${copies.map(() => html`<div class=\"group copy\" aria-hidden=\"true\" inert></div>`)}\n </div>\n </div>\n <bd-button\n class=\"toggle\"\n variant=\"ghost\"\n size=\"sm\"\n icon-only\n label=\"${this.paused ? this.playLabel : this.pauseLabel}\"\n @click=${this._toggle}\n >${this.paused\n ? html`<bd-play-icon size=\"sm\"></bd-play-icon>`\n : html`<bd-pause-icon size=\"sm\"></bd-pause-icon>`}</bd-button>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-logo-marquee\": LogoMarquee;\n }\n}\n"],"mappings":"A,qhBAgCO,IAAME,EAAN,cAA0BC,CAAW,C,OAsB1B,KAAA,OAAA,CAACC,EAAQC,EAAaC,CAAc,C,CAQpD,aAAc,CACZ,MAAM,EA7BA,KAAA,MAAA,GAGG,KAAA,SAAA,GAGL,KAAA,IAAA,KAEG,KAAA,OAAA,GAEI,KAAA,WAAA,yBAED,KAAA,UAAA,wBAGF,KAAA,QAAA,EAGD,KAAA,OAAA,EAYP,KAAK,QAAU,IAAI,mBAAqB,CACtC,qBAAqB,KAAK,MAAM,EAChC,KAAK,OAAS,0BAA4B,KAAK,SAAS,CAAC,CAC3D,CAAC,CACH,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACpB,KAAK,YAAY,KAAK,SAAS,CACrC,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,KAAK,QAAQ,WAAW,EACxB,qBAAqB,KAAK,MAAM,CAClC,CAEA,cAAe,CACb,KAAK,SAAS,CAChB,CAEA,UAAW,CACT,KAAK,QAAQ,QAAQ,KAAK,WAAW,cAAc,WAAW,CAAE,EAChE,KAAK,QAAQ,QAAQ,KAAK,WAAW,cAAc,QAAQ,CAAE,CAC/D,CAIA,UAAW,CACT,IAAMC,EAAW,KAAK,WAAW,cAA2B,WAAW,EACjEC,EAAQ,KAAK,WAAW,cAA2B,QAAQ,EACjE,GAAI,CAACD,GAAY,CAACC,GAAS,CAACA,EAAM,YAAa,OAC/C,IAAMC,EAAS,KAAK,IAAI,EAAG,KAAK,KAAKF,EAAS,YAAcC,EAAM,WAAW,CAAC,EAC1EC,IAAW,KAAK,UAAS,KAAK,QAAUA,EAC9C,CAEA,eAAgB,CACd,KAAK,YAAY,EACjB,KAAK,SAAS,CAChB,CAEA,aAAc,CACZ,IAAMC,EAAO,KAAK,WAAW,cAAc,MAAM,EACjD,GAAI,CAACA,EAAM,OACX,IAAMC,EAAQD,EAAK,iBAAiB,CAAE,QAAS,EAAK,CAAC,EACrD,IAAK,IAAME,KAAQ,KAAK,WAAW,iBAAiB,OAAO,EACzDA,EAAK,gBAAgB,GAAGD,EAAM,IAAI,GAAQE,EAAK,UAAU,EAAI,CAAC,CAAC,CAEnE,CAEA,QAAQ,EAA+B,CACjCC,EAAQ,IAAI,SAAS,GAAG,KAAK,YAAY,CAC/C,CAEA,SAAU,CACR,KAAK,OAAS,CAAC,KAAK,MACtB,CAEA,QAAS,CACP,IAAML,EAAS,MAAM,KAAK,CAAE,OAAQ,KAAK,OAAQ,CAAC,EAClD,MAAO,EAAI;;;sBAGO,KAAK,MAAM;wCACOM,EAAQ,KAAK,GAAG,GAAK,oBAAoB,gCAAgC,KAAK,SAAS,+BAA+B,KAAK,QAAU,EAAE;;;;mDAI5H,KAAK,cAAc;cACxDN,EAAO,QAAU,CAAI,yDAAyD,EAAE;;;;;;;;mBAQ3E,KAAK,OAAS,KAAK,UAAY,KAAK,WAAW;mBAC/C,KAAK,QAAQ;WACrB,KAAK,OACJ,CAAI,0CACJ,CAAI,4CAA4C;;KAG1D,CACF,EApHGT,EAAA,CAAAgB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAd,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBF,EAAA,CAAAgB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAd,EAAA,UAAA,WAAA,IAAA,EAAA,EAGzBF,EAAA,CAAAgB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAd,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAgB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAd,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzCF,EAAA,CAAAgB,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,CAAA,EAAAd,EAAA,UAAA,aAAA,IAAA,EAAA,EAEnDF,EAAA,CAAAgB,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,CAAC,CAAA,EAAAd,EAAA,UAAA,YAAA,IAAA,EAAA,EAGlDF,EAAA,CAAAiB,EAAM,CAAA,EAAAf,EAAA,UAAA,UAAA,IAAA,EAAA,EAjBR,EAAAF,EAAA,CAAAkB,EAAc,iBAAiB,CAAA,EAAAhB,CAAA,E"}
|
|
@@ -1,204 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { below } from "../shared/token-scales.js";
|
|
3
|
-
export default css `
|
|
4
|
-
/* The panel is the <dialog> itself. Its user-agent border and colour are
|
|
5
|
-
reset so the tokens below are all there is; the browser still centres it
|
|
6
|
-
and puts it in the top layer, which is why there is no z-index here. */
|
|
7
|
-
.bd-modal {
|
|
8
|
-
border: none;
|
|
9
|
-
color: inherit;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* The scrim. ::backdrop reads the tokens because it inherits from its
|
|
13
|
-
dialog. */
|
|
14
|
-
.bd-modal::backdrop {
|
|
15
|
-
/* Expressed as a mix over the palette rather than a raw rgba, which is the
|
|
16
|
-
house pattern -- --color-border-container-inverse and spinner's two
|
|
17
|
-
private aliases are written the same way. A raw rgba(0,0,0,0.5) is a
|
|
18
|
-
black no theme can reach; this one follows --color-neutral-1000.
|
|
19
|
-
Verified pixel-identical to the rgba it replaces.
|
|
20
|
-
.
|
|
21
|
-
no role: a page scrim has no role, and with one consumer it should not
|
|
22
|
-
have one yet. If a second component ever needs to darken the page behind
|
|
23
|
-
itself, that is the point to name it. */
|
|
24
|
-
background: color-mix(in srgb, var(--color-neutral-1000) 50%, transparent);
|
|
25
|
-
/* Safari before 18 knows the blur only by its prefixed name */
|
|
26
|
-
-webkit-backdrop-filter: blur(var(--spacing-12));
|
|
27
|
-
backdrop-filter: blur(var(--spacing-12));
|
|
28
|
-
/* Scrolling over the scrim, or past the end of a tall panel, no longer
|
|
29
|
-
scrolls the page behind it. overscroll-behavior is Widely available;
|
|
30
|
-
holding back a scroll that is not a scroll container's is newer, and
|
|
31
|
-
where it is missing the page scrolls behind, as it always has. */
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
overscroll-behavior: contain;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.bd-modal:modal {
|
|
37
|
-
overscroll-behavior: contain;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* The panel scales and fades in and the scrim fades. Animating into and out
|
|
41
|
-
of the top layer -- @starting-style, and display and overlay transitioned
|
|
42
|
-
with allow-discrete -- is newer than the Widely available target, so it
|
|
43
|
-
is an enhancement: without it the dialog simply appears and goes. */
|
|
44
|
-
@supports (transition-behavior: allow-discrete) {
|
|
45
|
-
.bd-modal,
|
|
46
|
-
.bd-modal::backdrop {
|
|
47
|
-
opacity: 0;
|
|
48
|
-
transition-property: opacity, transform, display, overlay;
|
|
49
|
-
transition-duration: var(--transition-duration-slow);
|
|
50
|
-
transition-timing-function: var(--transition-easing-ease);
|
|
51
|
-
transition-behavior: allow-discrete;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.bd-modal {
|
|
55
|
-
transform: scale(0.9);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.bd-modal[open],
|
|
59
|
-
.bd-modal[open]::backdrop {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.bd-modal[open] {
|
|
64
|
-
transform: scale(1);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@starting-style {
|
|
68
|
-
.bd-modal[open],
|
|
69
|
-
.bd-modal[open]::backdrop {
|
|
70
|
-
opacity: 0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.bd-modal[open] {
|
|
74
|
-
transform: scale(0.9);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* max-height and overflow, because without them the bottom of a tall dialog
|
|
80
|
-
is simply gone. Measured on Components/Modal "Long Modal Text": the panel
|
|
81
|
-
is 506px tall at every viewport height, so at 500px and at 360px its
|
|
82
|
-
bottom edge -- and the Close button on it -- sat past the viewport with
|
|
83
|
-
nothing scrollable anywhere. The panel could not scroll (overflow
|
|
84
|
-
visible, no max-height) and neither could the page (the scrim is
|
|
85
|
-
position: fixed at 100% height, so the document never grows), which left
|
|
86
|
-
the only control in the dialog unreachable by any means.
|
|
87
|
-
|
|
88
|
-
--spacing-128 rather than --spacing-64, and the arithmetic is the reason.
|
|
89
|
-
This box is content-box, so the cap applies to the content and the 2em
|
|
90
|
-
padding is added outside it: subtracting 64 produced a panel of exactly
|
|
91
|
-
the viewport height at every constrained height -- 436 + 64 = 500 at a
|
|
92
|
-
500px viewport, 296 + 64 = 360 at 360 -- with no scrim band at all.
|
|
93
|
-
128 is that 64 of padding plus the 64 of scrim the band wants, which
|
|
94
|
-
lands the panel 32px from the top and bottom edges.
|
|
95
|
-
|
|
96
|
-
box-sizing: border-box would express the same thing more directly and is
|
|
97
|
-
deliberately not used here: it also makes max-width mean the border box,
|
|
98
|
-
which took the panel from 564px wide to 500 and rewrapped its text a line
|
|
99
|
-
taller. That is a visible change to an axis this fix has no business
|
|
100
|
-
touching, so the arithmetic goes in the calc instead. */
|
|
101
|
-
.bd-modal {
|
|
102
|
-
/* --color-surface-default, the role, not --color-neutral-0, the primitive
|
|
103
|
-
it resolves to. Same value; the category is the point, and CLAUDE.md's
|
|
104
|
-
"same primitive value is not same semantic meaning" section exists for
|
|
105
|
-
exactly this. Found by check:color-coverage once the background shorthand came into
|
|
106
|
-
its scope -- it had been invisible because the check counted
|
|
107
|
-
background-color: and this package almost never writes that. */
|
|
108
|
-
background: var(--color-surface-default);
|
|
109
|
-
padding: 2em;
|
|
110
|
-
border-radius: var(--shape-radius-xl);
|
|
111
|
-
max-width: 500px;
|
|
112
|
-
max-height: calc(100dvh - var(--spacing-128));
|
|
113
|
-
overflow-y: auto;
|
|
114
|
-
text-align: start;
|
|
115
|
-
/* --shadow-md, the role this package already uses for a floating overlay
|
|
116
|
-
surface: bd-tooltip's bubble and bd-anchor-nav's dropdown panel both name
|
|
117
|
-
it, and this panel is the third of the same kind.
|
|
118
|
-
|
|
119
|
-
The shadow was built out of --spacing-0/2/8, which is a spacing scale
|
|
120
|
-
doing a depth role's job -- and spacing is rem, so it grew with the
|
|
121
|
-
reader. Measured at a 24px root: this panel's shadow went from
|
|
122
|
-
0 2px 8px to 0 3px 12px while the tooltip's --shadow-md held exactly
|
|
123
|
-
still. A drop shadow is a fixed optical depth, not a distance that
|
|
124
|
-
should scale with text.
|
|
125
|
-
|
|
126
|
-
Visible, and intended: the shadow becomes the two-layer --shadow-md
|
|
127
|
-
rather than a single 8px blur at 0.2 alpha. The panel's separation from
|
|
128
|
-
the page is carried by the scrim above it -- 0.5 alpha and a 12px
|
|
129
|
-
backdrop blur -- so the shadow is doing detail work here, not the
|
|
130
|
-
heavy lifting. */
|
|
131
|
-
box-shadow: var(--shadow-md);
|
|
132
|
-
font-family: var(--typography-fontFamily-sans);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/* The title's spacing is set through bd-h's own paddingBottom prop, in
|
|
136
|
-
modal.ts. A ".bd-modal-content h2" rule stood here and could never match:
|
|
137
|
-
the h2 is inside bd-h's shadow root, so a descendant selector from this
|
|
138
|
-
stylesheet does not reach it. The declared 1em resolved to 0 in all 80
|
|
139
|
-
measured story x viewport combinations, which is why the title sat flush
|
|
140
|
-
on its description. */
|
|
141
|
-
/* This is a <button> the component renders itself rather than a slotted
|
|
142
|
-
bd-button, and that is not going to change here: the element owns the
|
|
143
|
-
close behaviour and there is nothing for a page to pass in. What it can
|
|
144
|
-
stop doing is disagreeing with the atom about the shape of a button.
|
|
145
|
-
|
|
146
|
-
Measured against Atoms/Button, variant=primary size=md: the fill is the
|
|
147
|
-
same step, and every other axis was different. The padding was em
|
|
148
|
-
literals -- 0.5em/1em -- which is the spacing scale spelled in a unit that
|
|
149
|
-
is not on it, and the radius was --radius-lg against the atom's
|
|
150
|
-
--radius-sm, so the same fill came out with 8px corners here and 4px two
|
|
151
|
-
components over. The margin-top was a third em literal.
|
|
152
|
-
|
|
153
|
-
The values now match the atom's md size (8/16 at --radius-sm) and are
|
|
154
|
-
spelled with the tokens it uses. Visible: corners tighten from 8px to
|
|
155
|
-
4px. */
|
|
156
|
-
.bd-modal button {
|
|
157
|
-
margin-top: var(--spacing-16);
|
|
158
|
-
padding: var(--spacing-8) var(--spacing-16);
|
|
159
|
-
background: var(--color-surface-brand);
|
|
160
|
-
color: var(--color-brand-on-fill); /* ink on the brand fill beside it */
|
|
161
|
-
border: none;
|
|
162
|
-
border-radius: var(--shape-radius-sm);
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
font-family: var(--typography-fontFamily-sans);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.bd-modal button:focus-visible {
|
|
168
|
-
/* the one focus ring — see Foundations/Focus */
|
|
169
|
-
/* forced-colors mode does not paint box-shadow, so the ring
|
|
170
|
-
vanishes there; it does paint an outline, in a system colour. This one
|
|
171
|
-
is transparent everywhere else, and the offset lands it on the ring's
|
|
172
|
-
outer band. */
|
|
173
|
-
outline: var(--border-width-2) solid transparent;
|
|
174
|
-
outline-offset: var(--focus-outline-offset);
|
|
175
|
-
box-shadow: var(--focus-outline-primary);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* The panel scales and fades in. Measured before this: with
|
|
179
|
-
prefers-reduced-motion: reduce the transition still reported
|
|
180
|
-
0.3s on opacity and transform, so a reader who asked for less motion got
|
|
181
|
-
the panel zooming in anyway. Every other animated component in this
|
|
182
|
-
package honours the query -- see the tooltip two files over. */
|
|
183
|
-
@media (prefers-reduced-motion: reduce) {
|
|
184
|
-
.bd-modal,
|
|
185
|
-
.bd-modal::backdrop {
|
|
186
|
-
transition: none;
|
|
187
|
-
transform: none;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@media ${unsafeCSS(below('md'))} {
|
|
192
|
-
.bd-modal {
|
|
193
|
-
max-width: 90%;
|
|
194
|
-
padding: 1.5em;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@media (max-width: 480px) {
|
|
199
|
-
.bd-modal {
|
|
200
|
-
padding: 2em;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
`;
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`.bd-modal{color:inherit;border:none}.bd-modal::backdrop{background:color-mix(in srgb, var(--color-neutral-1000) 50%, transparent);-webkit-backdrop-filter:blur(var(--spacing-12));backdrop-filter:blur(var(--spacing-12));overscroll-behavior:contain;overflow:hidden}.bd-modal:modal{overscroll-behavior:contain}@supports (transition-behavior:allow-discrete){.bd-modal,.bd-modal::backdrop{opacity:0;transition-property:opacity,transform,display,overlay;transition-duration:var(--transition-duration-slow);transition-timing-function:var(--transition-easing-ease);transition-behavior:allow-discrete}.bd-modal{transform:scale(.9)}.bd-modal[open],.bd-modal[open]::backdrop{opacity:1}.bd-modal[open]{transform:scale(1)}@starting-style{.bd-modal[open],.bd-modal[open]::backdrop{opacity:0}.bd-modal[open]{transform:scale(.9)}}}.bd-modal{background:var(--color-surface-default);border-radius:var(--shape-radius-xl);max-width:500px;max-height:calc(100dvh - var(--spacing-128));text-align:start;box-shadow:var(--shadow-md);font-family:var(--typography-fontFamily-sans);padding:2em;overflow-y:auto}.bd-modal button{margin-top:var(--spacing-16);padding:var(--spacing-8) var(--spacing-16);background:var(--color-surface-brand);color:var(--color-brand-on-fill);border-radius:var(--shape-radius-sm);cursor:pointer;font-family:var(--typography-fontFamily-sans);border:none}.bd-modal button:focus-visible{outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);box-shadow:var(--focus-outline-primary)}@media (prefers-reduced-motion:reduce){.bd-modal,.bd-modal::backdrop{transition:none;transform:none}}@media (width<768px){.bd-modal{max-width:90%;padding:1.5em}}@media (width<=480px){.bd-modal{padding:2em}}`;export{t as default};
|
|
204
2
|
//# sourceMappingURL=modal.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.css.js","
|
|
1
|
+
{"version":3,"file":"modal.css.js","names":["modal_css_default"],"sources":["../../../../src/components/modal/modal.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below } from \"#shared/token-scales.ts\";\n\nexport default css`\n /* The panel is the <dialog> itself. Its user-agent border and colour are\n reset so the tokens below are all there is; the browser still centres it\n and puts it in the top layer, which is why there is no z-index here. */\n .bd-modal {\n border: none;\n color: inherit;\n }\n\n /* The scrim. ::backdrop reads the tokens because it inherits from its\n dialog. */\n .bd-modal::backdrop {\n /* Expressed as a mix over the palette rather than a raw rgba, which is the\n house pattern -- --color-border-container-inverse and spinner's two\n private aliases are written the same way. A raw rgba(0,0,0,0.5) is a\n black no theme can reach; this one follows --color-neutral-1000.\n Verified pixel-identical to the rgba it replaces.\n .\n no role: a page scrim has no role, and with one consumer it should not\n have one yet. If a second component ever needs to darken the page behind\n itself, that is the point to name it. */\n background: color-mix(in srgb, var(--color-neutral-1000) 50%, transparent);\n /* Safari before 18 knows the blur only by its prefixed name */\n -webkit-backdrop-filter: blur(var(--spacing-12));\n backdrop-filter: blur(var(--spacing-12));\n /* Scrolling over the scrim, or past the end of a tall panel, no longer\n scrolls the page behind it. overscroll-behavior is Widely available;\n holding back a scroll that is not a scroll container's is newer, and\n where it is missing the page scrolls behind, as it always has. */\n overflow: hidden;\n overscroll-behavior: contain;\n }\n\n .bd-modal:modal {\n overscroll-behavior: contain;\n }\n\n /* The panel scales and fades in and the scrim fades. Animating into and out\n of the top layer -- @starting-style, and display and overlay transitioned\n with allow-discrete -- is newer than the Widely available target, so it\n is an enhancement: without it the dialog simply appears and goes. */\n @supports (transition-behavior: allow-discrete) {\n .bd-modal,\n .bd-modal::backdrop {\n opacity: 0;\n transition-property: opacity, transform, display, overlay;\n transition-duration: var(--transition-duration-slow);\n transition-timing-function: var(--transition-easing-ease);\n transition-behavior: allow-discrete;\n }\n\n .bd-modal {\n transform: scale(0.9);\n }\n\n .bd-modal[open],\n .bd-modal[open]::backdrop {\n opacity: 1;\n }\n\n .bd-modal[open] {\n transform: scale(1);\n }\n\n @starting-style {\n .bd-modal[open],\n .bd-modal[open]::backdrop {\n opacity: 0;\n }\n\n .bd-modal[open] {\n transform: scale(0.9);\n }\n }\n }\n\n /* max-height and overflow, because without them the bottom of a tall dialog\n is simply gone. Measured on Components/Modal \"Long Modal Text\": the panel\n is 506px tall at every viewport height, so at 500px and at 360px its\n bottom edge -- and the Close button on it -- sat past the viewport with\n nothing scrollable anywhere. The panel could not scroll (overflow\n visible, no max-height) and neither could the page (the scrim is\n position: fixed at 100% height, so the document never grows), which left\n the only control in the dialog unreachable by any means.\n\n --spacing-128 rather than --spacing-64, and the arithmetic is the reason.\n This box is content-box, so the cap applies to the content and the 2em\n padding is added outside it: subtracting 64 produced a panel of exactly\n the viewport height at every constrained height -- 436 + 64 = 500 at a\n 500px viewport, 296 + 64 = 360 at 360 -- with no scrim band at all.\n 128 is that 64 of padding plus the 64 of scrim the band wants, which\n lands the panel 32px from the top and bottom edges.\n\n box-sizing: border-box would express the same thing more directly and is\n deliberately not used here: it also makes max-width mean the border box,\n which took the panel from 564px wide to 500 and rewrapped its text a line\n taller. That is a visible change to an axis this fix has no business\n touching, so the arithmetic goes in the calc instead. */\n .bd-modal {\n /* --color-surface-default, the role, not --color-neutral-0, the primitive\n it resolves to. Same value; the category is the point, and CLAUDE.md's\n \"same primitive value is not same semantic meaning\" section exists for\n exactly this. Found by check:color-coverage once the background shorthand came into\n its scope -- it had been invisible because the check counted\n background-color: and this package almost never writes that. */\n background: var(--color-surface-default);\n padding: 2em;\n border-radius: var(--shape-radius-xl);\n max-width: 500px;\n max-height: calc(100dvh - var(--spacing-128));\n overflow-y: auto;\n text-align: start;\n /* --shadow-md, the role this package already uses for a floating overlay\n surface: bd-tooltip's bubble and bd-anchor-nav's dropdown panel both name\n it, and this panel is the third of the same kind.\n\n The shadow was built out of --spacing-0/2/8, which is a spacing scale\n doing a depth role's job -- and spacing is rem, so it grew with the\n reader. Measured at a 24px root: this panel's shadow went from\n 0 2px 8px to 0 3px 12px while the tooltip's --shadow-md held exactly\n still. A drop shadow is a fixed optical depth, not a distance that\n should scale with text.\n\n Visible, and intended: the shadow becomes the two-layer --shadow-md\n rather than a single 8px blur at 0.2 alpha. The panel's separation from\n the page is carried by the scrim above it -- 0.5 alpha and a 12px\n backdrop blur -- so the shadow is doing detail work here, not the\n heavy lifting. */\n box-shadow: var(--shadow-md);\n font-family: var(--typography-fontFamily-sans);\n }\n\n /* The title's spacing is set through bd-h's own paddingBottom prop, in\n modal.ts. A \".bd-modal-content h2\" rule stood here and could never match:\n the h2 is inside bd-h's shadow root, so a descendant selector from this\n stylesheet does not reach it. The declared 1em resolved to 0 in all 80\n measured story x viewport combinations, which is why the title sat flush\n on its description. */\n /* This is a <button> the component renders itself rather than a slotted\n bd-button, and that is not going to change here: the element owns the\n close behaviour and there is nothing for a page to pass in. What it can\n stop doing is disagreeing with the atom about the shape of a button.\n\n Measured against Atoms/Button, variant=primary size=md: the fill is the\n same step, and every other axis was different. The padding was em\n literals -- 0.5em/1em -- which is the spacing scale spelled in a unit that\n is not on it, and the radius was --radius-lg against the atom's\n --radius-sm, so the same fill came out with 8px corners here and 4px two\n components over. The margin-top was a third em literal.\n\n The values now match the atom's md size (8/16 at --radius-sm) and are\n spelled with the tokens it uses. Visible: corners tighten from 8px to\n 4px. */\n .bd-modal button {\n margin-top: var(--spacing-16);\n padding: var(--spacing-8) var(--spacing-16);\n background: var(--color-surface-brand);\n color: var(--color-brand-on-fill); /* ink on the brand fill beside it */\n border: none;\n border-radius: var(--shape-radius-sm);\n cursor: pointer;\n font-family: var(--typography-fontFamily-sans);\n }\n\n .bd-modal button:focus-visible {\n /* the one focus ring — see Foundations/Focus */\n /* forced-colors mode does not paint box-shadow, so the ring\n vanishes there; it does paint an outline, in a system colour. This one\n is transparent everywhere else, and the offset lands it on the ring's\n outer band. */\n outline: var(--border-width-2) solid transparent;\n outline-offset: var(--focus-outline-offset);\n box-shadow: var(--focus-outline-primary);\n }\n\n /* The panel scales and fades in. Measured before this: with\n prefers-reduced-motion: reduce the transition still reported\n 0.3s on opacity and transform, so a reader who asked for less motion got\n the panel zooming in anyway. Every other animated component in this\n package honours the query -- see the tooltip two files over. */\n @media (prefers-reduced-motion: reduce) {\n .bd-modal,\n .bd-modal::backdrop {\n transition: none;\n transform: none;\n }\n }\n\n @media ${unsafeCSS(below('md'))} {\n .bd-modal {\n max-width: 90%;\n padding: 1.5em;\n }\n }\n\n @media (max-width: 480px) {\n .bd-modal {\n padding: 2em;\n }\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,0rD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import "../../tokens/tokens.
|
|
3
|
-
import "../heading/heading.
|
|
4
|
-
import "../paragraph/paragraph.
|
|
2
|
+
import "../../tokens/tokens.js";
|
|
3
|
+
import "../heading/heading.js";
|
|
4
|
+
import "../paragraph/paragraph.js";
|
|
5
5
|
/**
|
|
6
6
|
* A dialog: a scrim, a centred panel, a title, a description and a close
|
|
7
7
|
* control. The consuming page owns `open` and reacts to close-modal.
|
|
@@ -1,112 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { defineElement } from "../shared/define-element.js";
|
|
10
|
-
// Installs the design tokens into document scope; see src/tokens/tokens.ts
|
|
11
|
-
import "../../tokens/tokens.js";
|
|
12
|
-
import "../heading/heading.js";
|
|
13
|
-
import modalCSS from "../modal/modal.css.js";
|
|
14
|
-
import "../paragraph/paragraph.js";
|
|
15
|
-
/* <dialog closedby> is newer than the policy's Widely available target: where
|
|
16
|
-
the browser has it, a click on the backdrop is a close request like Esc;
|
|
17
|
-
where it does not, the click is recognised here. */
|
|
18
|
-
const CLOSEDBY = "closedBy" in HTMLDialogElement.prototype;
|
|
19
|
-
/**
|
|
20
|
-
* A dialog: a scrim, a centred panel, a title, a description and a close
|
|
21
|
-
* control. The consuming page owns `open` and reacts to close-modal.
|
|
22
|
-
*
|
|
23
|
-
* It is a native <dialog> opened with showModal(), and that is what makes it
|
|
24
|
-
* modal rather than a panel drawn over the page. The browser supplies what
|
|
25
|
-
* this element used to approximate or leave out: the dialog role and modal
|
|
26
|
-
* state, a page made inert behind it, focus moved in on open and returned to
|
|
27
|
-
* whatever opened it on close, Esc, and the top layer, so no z-index decides
|
|
28
|
-
* whether it is on top. Until it was a <dialog> it was a <div role="dialog">
|
|
29
|
-
* without aria-modal -- measured, one Tab reached the close button and the
|
|
30
|
-
* next left the dialog entirely with seven controls still reachable behind
|
|
31
|
-
* it -- and closing it had to blur the focus it left behind by hand.
|
|
32
|
-
*
|
|
33
|
-
* Every way out asks the page instead of closing: Esc and a backdrop click
|
|
34
|
-
* arrive as `cancel`, which is prevented and turned into close-modal, and the
|
|
35
|
-
* Close button dispatches close-modal directly. The dialog closes when the
|
|
36
|
-
* page sets open back to false. A browser may refuse to let a second Esc be
|
|
37
|
-
* cancelled; it then closes the dialog itself, and `close` still tells the
|
|
38
|
-
* page.
|
|
39
|
-
*
|
|
40
|
-
* The icon is `alt=""`. It was `alt="icon"`, which a screen reader announced
|
|
41
|
-
* as the word "icon" beside a title that already says what the dialog is.
|
|
42
|
-
*/
|
|
43
|
-
let BdModal = class BdModal extends LitElement {
|
|
44
|
-
constructor() {
|
|
45
|
-
super(...arguments);
|
|
46
|
-
this.title = "";
|
|
47
|
-
}
|
|
48
|
-
static { this.styles = [modalCSS]; }
|
|
49
|
-
get _dialog() {
|
|
50
|
-
return this.renderRoot?.querySelector("dialog");
|
|
51
|
-
}
|
|
52
|
-
_onClose() {
|
|
53
|
-
this.dispatchEvent(new CustomEvent("close-modal", { bubbles: true, composed: true }));
|
|
54
|
-
}
|
|
55
|
-
_onCancel(e) {
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
this._onClose();
|
|
58
|
-
}
|
|
59
|
-
/* Only a dialog that is actually closed counts. A `close` event can arrive
|
|
60
|
-
after the page has already reopened the dialog -- measured in Chromium:
|
|
61
|
-
closed from a backdrop click, the event was delivered on the next
|
|
62
|
-
showModal(), and read as a close it asked the page to shut the dialog it
|
|
63
|
-
had just opened. */
|
|
64
|
-
_onDialogClose() {
|
|
65
|
-
if (this.open && !this._dialog?.open)
|
|
66
|
-
this._onClose();
|
|
67
|
-
}
|
|
68
|
-
/* The backdrop belongs to the dialog, so a click on it targets the dialog
|
|
69
|
-
itself; a click on the panel's own padding does too, and is told apart by
|
|
70
|
-
landing inside the dialog's box. */
|
|
71
|
-
_onClick(e) {
|
|
72
|
-
if (CLOSEDBY || e.target !== this._dialog)
|
|
73
|
-
return;
|
|
74
|
-
const box = this._dialog.getBoundingClientRect();
|
|
75
|
-
const inside = e.clientX >= box.left && e.clientX <= box.right
|
|
76
|
-
&& e.clientY >= box.top && e.clientY <= box.bottom;
|
|
77
|
-
if (!inside)
|
|
78
|
-
this._onClose();
|
|
79
|
-
}
|
|
80
|
-
/* Reconnecting keeps the rendered dialog, but not as a modal: removing a
|
|
81
|
-
dialog from the document takes it out of the top layer and drops its
|
|
82
|
-
modal state while leaving its open attribute, so a modal moved while open
|
|
83
|
-
comes back an ordinary open dialog -- in the flow, no backdrop, the page
|
|
84
|
-
behind it live and no Esc. _sync() asks whether it is :modal, not only
|
|
85
|
-
open, and shows it as one again. */
|
|
86
|
-
connectedCallback() {
|
|
87
|
-
super.connectedCallback();
|
|
88
|
-
if (this.hasUpdated)
|
|
89
|
-
this._sync();
|
|
90
|
-
}
|
|
91
|
-
updated() {
|
|
92
|
-
this._sync();
|
|
93
|
-
}
|
|
94
|
-
_sync() {
|
|
95
|
-
const dialog = this._dialog;
|
|
96
|
-
if (!dialog?.isConnected)
|
|
97
|
-
return;
|
|
98
|
-
if (this.open && !dialog.matches(":modal")) {
|
|
99
|
-
// showModal() throws on a dialog that is already open, modal or not
|
|
100
|
-
if (dialog.open)
|
|
101
|
-
dialog.close();
|
|
102
|
-
dialog.showModal();
|
|
103
|
-
}
|
|
104
|
-
else if (!this.open && dialog.open) {
|
|
105
|
-
dialog.close();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
render() {
|
|
109
|
-
return html `
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import n from"./modal.css.js";import{LitElement as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=`closedBy`in HTMLDialogElement.prototype,s=class extends r{constructor(...e){super(...e),this.title=``}static{this.styles=[n]}get _dialog(){return this.renderRoot?.querySelector(`dialog`)}_onClose(){this.dispatchEvent(new CustomEvent(`close-modal`,{bubbles:!0,composed:!0}))}_onCancel(e){e.preventDefault(),this._onClose()}_onDialogClose(){this.open&&!this._dialog?.open&&this._onClose()}_onClick(e){if(o||e.target!==this._dialog)return;let t=this._dialog.getBoundingClientRect();e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom||this._onClose()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._sync()}updated(){this._sync()}_sync(){let e=this._dialog;e?.isConnected&&(this.open&&!e.matches(`:modal`)?(e.open&&e.close(),e.showModal()):!this.open&&e.open&&e.close())}render(){return i`
|
|
110
2
|
<dialog
|
|
111
3
|
class="bd-modal"
|
|
112
4
|
closedby="any"
|
|
@@ -116,30 +8,10 @@ let BdModal = class BdModal extends LitElement {
|
|
|
116
8
|
@close="${this._onDialogClose}"
|
|
117
9
|
@click="${this._onClick}"
|
|
118
10
|
>
|
|
119
|
-
${this.icon
|
|
120
|
-
? html `<img src="${this.icon}" alt="" class="bd-carousel-modal-icon" />`
|
|
121
|
-
: ""}
|
|
11
|
+
${this.icon?i`<img src="${this.icon}" alt="" class="bd-carousel-modal-icon" />`:``}
|
|
122
12
|
<bd-h as="h2" id="modal-title" paddingBottom="16">${this.title}</bd-h>
|
|
123
13
|
<bd-p variant="regular" id="modal-description">${this.modalText}</bd-p>
|
|
124
14
|
<button @click="${this._onClose}" aria-label="Close modal" autofocus>Close</button>
|
|
125
15
|
</dialog>
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
__decorate([
|
|
130
|
-
property({ type: Boolean, reflect: true })
|
|
131
|
-
], BdModal.prototype, "open", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
property({ type: String })
|
|
134
|
-
], BdModal.prototype, "title", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
property({ type: String })
|
|
137
|
-
], BdModal.prototype, "icon", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property({ type: String })
|
|
140
|
-
], BdModal.prototype, "modalText", void 0);
|
|
141
|
-
BdModal = __decorate([
|
|
142
|
-
defineElement("bd-modal")
|
|
143
|
-
], BdModal);
|
|
144
|
-
export { BdModal };
|
|
16
|
+
`}};t([a({type:Boolean,reflect:!0})],s.prototype,`open`,void 0),t([a({type:String})],s.prototype,`title`,void 0),t([a({type:String})],s.prototype,`icon`,void 0),t([a({type:String})],s.prototype,`modalText`,void 0),s=t([e(`bd-modal`)],s);export{s as BdModal};
|
|
145
17
|
//# sourceMappingURL=modal.js.map
|