@repobit/dex-system-design 3.0.0 → 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 +14 -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 +4 -3
- package/dist/src/components/logo-marquee/logo-marquee.js +6 -136
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.css.js","
|
|
1
|
+
{"version":3,"file":"blockquote.css.js","names":["blockquoteCSS"],"sources":["../../../../src/components/blockquote/blockquote.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const blockquoteCSS = css`\n :host { display: block; }\n\n /* .quote is the outer element: the <figure> when there is an attribution,\n the bare <blockquote> when there is not. The bar and the type live on it,\n so the caption inherits the quotation's family and leading the way the\n <footer> did when it sat inside the <blockquote> -- the rhythm the note\n below is about. */\n figure,\n blockquote {\n margin: 0;\n }\n\n .quote {\n padding-inline-start: var(--spacing-16);\n border-inline-start: var(--border-width-4) solid var(--color-border-brand);\n font-family: var(--typography-body-large-fontFamily);\n font-size: var(--typography-body-large-fontSize);\n font-weight: var(--typography-body-large-fontWeight);\n line-height: var(--typography-body-large-lineHeight);\n color: var(--color-text-primary);\n }\n\n figcaption {\n margin-top: var(--spacing-8);\n font-size: var(--typography-caption-default-fontSize);\n /* no role: two roles are each a near-miss, from opposite directions, and\n no declared role sits at the intersection of this size, this weight,\n this leading and this colour.\n .\n label-small matches this text's size and weight exactly -- but adopting\n it would add letterSpacing-wide, which has no job on mixed-case sentence\n text because nothing here crowds, and would replace the leading this\n inherits from the quote it attributes with 1.5. That inherited\n rhythm is the one thing in this rule that means something: the credit\n line sits on the same measure as the quotation it belongs to, where 1.5\n merely comes attached to the role.\n .\n caption-default matches this text's size and colour exactly -- the same\n --color-text-muted token, not just the same value, so this rule already\n half-resolves through it. But its weight is normal, and normal is what\n the quote itself renders. Adopting it would remove the attribution's\n only distinguishing signal and demote a credit line to what reads as a\n continuation of the quotation rather than a citation of it.\n .\n Neither disagreement is drift; both are the reason this rule exists as\n written. So the weight stays a primitive and says why. */\n font-weight: var(--typography-fontWeight-medium);\n color: var(--color-text-muted);\n }\n`;\n\nexport default blockquoteCSS;\n"],"mappings":"A,0BAGA,IAAaA,EAAgB,CAAG,gkB"}
|
|
@@ -1,45 +1,2 @@
|
|
|
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, nothing } 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 { blockquoteCSS } from "./blockquote.css.js";
|
|
13
|
-
let BdBlockquote = class BdBlockquote extends LitElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.cite = '';
|
|
17
|
-
this.attribution = '';
|
|
18
|
-
}
|
|
19
|
-
static { this.styles = [blockquoteCSS]; }
|
|
20
|
-
/* WHERE THE ATTRIBUTION GOES.
|
|
21
|
-
It used to be a <footer> inside the <blockquote>, and everything inside a
|
|
22
|
-
blockquote is the quotation, so the name of the person quoted was read as
|
|
23
|
-
part of what they said. The HTML spec's pattern puts the credit outside
|
|
24
|
-
the quote: a <figure> holding the <blockquote> and a <figcaption>. With
|
|
25
|
-
no attribution there is no caption, so the bare <blockquote> renders, as
|
|
26
|
-
before -- a figure with nothing to name it would only add an empty
|
|
27
|
-
"figure" for a screen reader to step through. */
|
|
28
|
-
render() {
|
|
29
|
-
const quote = html `<blockquote class=${this.attribution ? nothing : 'quote'} cite=${this.cite || nothing}><slot></slot></blockquote>`;
|
|
30
|
-
return this.attribution
|
|
31
|
-
? html `<figure class="quote">${quote}<figcaption>\u2014 ${this.attribution}</figcaption></figure>`
|
|
32
|
-
: quote;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
__decorate([
|
|
36
|
-
property({ type: String })
|
|
37
|
-
], BdBlockquote.prototype, "cite", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
property({ type: String })
|
|
40
|
-
], BdBlockquote.prototype, "attribution", void 0);
|
|
41
|
-
BdBlockquote = __decorate([
|
|
42
|
-
defineElement('bd-blockquote')
|
|
43
|
-
], BdBlockquote);
|
|
44
|
-
export { BdBlockquote };
|
|
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{blockquoteCSS as n}from"./blockquote.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends r{constructor(...e){super(...e),this.cite=``,this.attribution=``}static{this.styles=[n]}render(){let e=i`<blockquote class=${this.attribution?a:`quote`} cite=${this.cite||a}><slot></slot></blockquote>`;return this.attribution?i`<figure class="quote">${e}<figcaption>\u2014 ${this.attribution}</figcaption></figure>`:e}};t([o({type:String})],s.prototype,`cite`,void 0),t([o({type:String})],s.prototype,`attribution`,void 0),s=t([e(`bd-blockquote`)],s);export{s as BdBlockquote};
|
|
45
2
|
//# sourceMappingURL=blockquote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.js","
|
|
1
|
+
{"version":3,"file":"blockquote.js","names":["_decorate","__decorate","BdBlockquote","LitElement","_args","blockquoteCSS","quote","nothing","property","defineElement"],"sources":["../../../../src/components/blockquote/blockquote.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { defineElement } from '#shared/define-element.ts';\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport '#tokens/tokens.ts';\nimport { blockquoteCSS } from './blockquote.css.ts';\n\n@defineElement('bd-blockquote')\nexport class BdBlockquote extends LitElement {\n static styles = [blockquoteCSS];\n\n @property({ type: String })\n cite = '';\n @property({ type: String })\n attribution = '';\n\n /* WHERE THE ATTRIBUTION GOES.\n It used to be a <footer> inside the <blockquote>, and everything inside a\n blockquote is the quotation, so the name of the person quoted was read as\n part of what they said. The HTML spec's pattern puts the credit outside\n the quote: a <figure> holding the <blockquote> and a <figcaption>. With\n no attribution there is no caption, so the bare <blockquote> renders, as\n before -- a figure with nothing to name it would only add an empty\n \"figure\" for a screen reader to step through. */\n render() {\n const quote = html`<blockquote class=${this.attribution ? nothing : 'quote'} cite=${this.cite || nothing}><slot></slot></blockquote>`;\n return this.attribution\n ? html`<figure class=\"quote\">${quote}<figcaption>\\u2014 ${this.attribution}</figcaption></figure>`\n : quote;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-blockquote': BdBlockquote;\n }\n}\n"],"mappings":"A,8TAQO,IAAME,EAAN,cAA2BC,CAAW,C,8BAIpC,KAAA,KAAA,GAEO,KAAA,YAAA,E,QALE,KAAA,OAAA,CAACE,CAAa,C,CAe9B,QAAS,CACP,IAAMC,EAAQ,CAAI,qBAAqB,KAAK,YAAcC,EAAU,QAAQ,QAAQ,KAAK,MAAQA,EAAQ,6BACzG,OAAO,KAAK,YACR,CAAI,yBAAyBD,EAAM,qBAAqB,KAAK,YAAY,wBACzEA,CACN,CACF,EAnBGN,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,cAAA,IAAA,EAAA,EAN3B,EAAAF,EAAA,CAAAS,EAAc,eAAe,CAAA,EAAAP,CAAA,E"}
|
|
@@ -1,169 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default css `
|
|
3
|
-
@layer bd-components {
|
|
4
|
-
.bd-breadcrumb {
|
|
5
|
-
font-family: var(--typography-fontFamily-sans);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.bd-breadcrumb__items {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
flex-wrap: wrap;
|
|
12
|
-
gap: 0;
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
/* an <ol> for its semantics, not its numbers. Inside a <nav>, so Safari
|
|
16
|
-
keeps announcing it as a list without them. */
|
|
17
|
-
list-style: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/* Item container */
|
|
21
|
-
.bd-breadcrumb-item {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Horizontal layout */
|
|
27
|
-
.bd-breadcrumb--horizontal .bd-breadcrumb__items {
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Parent-owned layout, so it is spelled against the slotted hosts. The
|
|
32
|
-
rule this replaces targeted .bd-breadcrumb-item, which lives inside the
|
|
33
|
-
item's own shadow root: the descendant combinator could not reach it,
|
|
34
|
-
and :not(:last-child) could not have helped anyway, since that div is
|
|
35
|
-
the only child of its root and so is always the last one. */
|
|
36
|
-
.bd-breadcrumb--horizontal ::slotted(bd-breadcrumb-item:not(:last-child)) {
|
|
37
|
-
margin-inline-end: var(--spacing-8);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Divider styles */
|
|
41
|
-
.bd-breadcrumb__divider {
|
|
42
|
-
margin-inline: var(--spacing-8);
|
|
43
|
-
/* The "/" is aria-hidden -- the list says what it said, item by item --
|
|
44
|
-
but it is still text a sighted reader reads, so it keeps 4.5:1;
|
|
45
|
-
neutral-400 gave 3.23 */
|
|
46
|
-
color: var(--color-text-subtle);
|
|
47
|
-
/* no role: the "/" is real rendered text, but it is a single glyph in a
|
|
48
|
-
fixed-height divider, the same category as the icon-only line box rule 7
|
|
49
|
-
already covers for its leading. Sizing a separator is not a text role. */
|
|
50
|
-
font-size: var(--typography-fontSize-sm);
|
|
51
|
-
line-height: var(--typography-lineHeight-none);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Vertical layout.
|
|
55
|
-
|
|
56
|
-
The four rules below are spelled :host([orientation]) rather than as
|
|
57
|
-
descendants of .bd-breadcrumb--vertical. That class sits on the nav in
|
|
58
|
-
bd-breadcrumb's shadow root, while every element they style lives in
|
|
59
|
-
bd-breadcrumb-item's, so as descendant selectors they matched nothing:
|
|
60
|
-
measured at 375px, dividers stayed display block and items had no
|
|
61
|
-
padding and no background. bd-breadcrumb now reflects its orientation
|
|
62
|
-
onto each item, which is what these selectors read. */
|
|
63
|
-
/* Vertical layout */
|
|
64
|
-
.bd-breadcrumb--vertical .bd-breadcrumb__items {
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
align-items: stretch;
|
|
67
|
-
gap: var(--spacing-4);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host([orientation="vertical"]) .bd-breadcrumb__divider {
|
|
71
|
-
display: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* Item styles */
|
|
75
|
-
.bd-breadcrumb__item {
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
text-decoration: none;
|
|
79
|
-
color: inherit;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Link styles.
|
|
83
|
-
|
|
84
|
-
The ink is bd-link's, and the two colours declared here were not the ones
|
|
85
|
-
that rendered. Measured at 1440: resting text rgb(0, 89, 214) and hovered
|
|
86
|
-
text rgb(0, 69, 173), both from the atom's own .bd-link--primary rules --
|
|
87
|
-
--color-text-brand and --color-action-primary-hover's next step,
|
|
88
|
-
--color-action-primary-active. The --color-blue-400 that stood here never
|
|
89
|
-
reached any text, which is the only reason it never showed as a failure:
|
|
90
|
-
it is 3.02:1 on white. The --color-blue-700 hover was the same value the
|
|
91
|
-
role already resolves to, spelled a second time by hand.
|
|
92
|
-
|
|
93
|
-
That answers the question P5H.1 left open about this hover. It is neither
|
|
94
|
-
a navigation-specific state nor a responsibility the token system is
|
|
95
|
-
missing: the action ramp already renders it, and 8.56:1 is what
|
|
96
|
-
--color-action-primary-active measures, not what a local choice bought.
|
|
97
|
-
|
|
98
|
-
The underline is the state cue that was missing. It was declared on the
|
|
99
|
-
host, and a host's text-decoration does not propagate into an
|
|
100
|
-
inline-flex anchor, so hover was colour alone -- 7.0:1 to 8.6:1, a change
|
|
101
|
-
a reader is not required to be able to see. It is now on the part that
|
|
102
|
-
holds the text. */
|
|
103
|
-
bd-link.bd-breadcrumb__item {
|
|
104
|
-
text-decoration: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
bd-link.bd-breadcrumb__item:hover::part(link) {
|
|
108
|
-
text-decoration: underline;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* Vertical item styles.
|
|
112
|
-
|
|
113
|
-
The pill is the target here, so the padding goes on the part rather than
|
|
114
|
-
on the host. Measured before: a 343x40 row whose focusable anchor was
|
|
115
|
-
43x24, because the padding was on the bd-link host and the anchor inside
|
|
116
|
-
stayed the width of its own text -- 7.5% of the area a finger aims at,
|
|
117
|
-
and a focus ring that hugged the text inside a large grey box. The
|
|
118
|
-
background and the corner stay on the host, which is the box that draws
|
|
119
|
-
them; only the padding moves to where the target is. */
|
|
120
|
-
:host([orientation="vertical"]) .bd-breadcrumb__item {
|
|
121
|
-
background: var(--color-surface-subtle);
|
|
122
|
-
border-radius: var(--shape-radius-sm);
|
|
123
|
-
width: 100%;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
:host([orientation="vertical"]) span.bd-breadcrumb__item {
|
|
127
|
-
padding: var(--spacing-8) var(--spacing-12);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host([orientation="vertical"]) bd-link.bd-breadcrumb__item::part(link) {
|
|
131
|
-
padding: var(--spacing-8) var(--spacing-12);
|
|
132
|
-
width: 100%;
|
|
133
|
-
box-sizing: border-box;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host([orientation="vertical"]) bd-link.bd-breadcrumb__item:hover {
|
|
137
|
-
background: var(--color-surface-muted);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:host([orientation="vertical"]) bd-link.bd-breadcrumb__item:hover::part(link) {
|
|
141
|
-
text-decoration: none;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* Current item styles.
|
|
145
|
-
|
|
146
|
-
No colour and no weight here. Both were declared on this span and both
|
|
147
|
-
lost to bd-p's own paragraph rule one level down -- the colour by
|
|
148
|
-
coincidence, since --color-text-primary is what bd-p sets anyway, and the
|
|
149
|
-
weight not at all. The weight is asked for through bd-p's font-weight
|
|
150
|
-
prop in breadcrumb.ts, which is the only place it renders. */
|
|
151
|
-
.bd-breadcrumb__item--current {
|
|
152
|
-
cursor: default;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
:host([orientation="vertical"]) .bd-breadcrumb__item--current {
|
|
156
|
-
background: var(--color-surface-muted);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/* A reader who asked for less motion was still getting the item hover. Twenty-three
|
|
161
|
-
of the thirty animated directories in this package honour the query; this
|
|
162
|
-
one did not. */
|
|
163
|
-
@media (prefers-reduced-motion: reduce) {
|
|
164
|
-
bd-link.bd-breadcrumb__item {
|
|
165
|
-
transition: none;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
`;
|
|
1
|
+
import{css as e}from"lit";var t=e`@layer bd-components{.bd-breadcrumb{font-family:var(--typography-fontFamily-sans)}.bd-breadcrumb__items{flex-wrap:wrap;align-items:center;gap:0;margin:0;padding:0;list-style:none;display:flex}.bd-breadcrumb-item{align-items:center;display:flex}.bd-breadcrumb--horizontal .bd-breadcrumb__items{flex-direction:row}.bd-breadcrumb--horizontal ::slotted(bd-breadcrumb-item:not(:last-child)){margin-inline-end:var(--spacing-8)}.bd-breadcrumb__divider{margin-inline:var(--spacing-8);color:var(--color-text-subtle);font-size:var(--typography-fontSize-sm);line-height:var(--typography-lineHeight-none)}.bd-breadcrumb--vertical .bd-breadcrumb__items{align-items:stretch;gap:var(--spacing-4);flex-direction:column}:host([orientation=vertical]) .bd-breadcrumb__divider{display:none}.bd-breadcrumb__item{color:inherit;align-items:center;text-decoration:none;display:flex}bd-link.bd-breadcrumb__item{text-decoration:none}bd-link.bd-breadcrumb__item:hover::part(link){text-decoration:underline}:host([orientation=vertical]) .bd-breadcrumb__item{background:var(--color-surface-subtle);border-radius:var(--shape-radius-sm);width:100%}:host([orientation=vertical]) span.bd-breadcrumb__item{padding:var(--spacing-8) var(--spacing-12)}:host([orientation=vertical]) bd-link.bd-breadcrumb__item::part(link){padding:var(--spacing-8) var(--spacing-12);box-sizing:border-box;width:100%}:host([orientation=vertical]) bd-link.bd-breadcrumb__item:hover{background:var(--color-surface-muted)}:host([orientation=vertical]) bd-link.bd-breadcrumb__item:hover::part(link){text-decoration:none}.bd-breadcrumb__item--current{cursor:default}:host([orientation=vertical]) .bd-breadcrumb__item--current{background:var(--color-surface-muted)}}@media (prefers-reduced-motion:reduce){bd-link.bd-breadcrumb__item{transition:none}}`;export{t as default};
|
|
169
2
|
//# sourceMappingURL=breadcrumb.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.css.js","
|
|
1
|
+
{"version":3,"file":"breadcrumb.css.js","names":["breadcrumb_css_default"],"sources":["../../../../src/components/breadcrumb/breadcrumb.css.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport default css`\n @layer bd-components {\n .bd-breadcrumb {\n font-family: var(--typography-fontFamily-sans);\n }\n\n .bd-breadcrumb__items {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0;\n margin: 0;\n padding: 0;\n /* an <ol> for its semantics, not its numbers. Inside a <nav>, so Safari\n keeps announcing it as a list without them. */\n list-style: none;\n }\n\n /* Item container */\n .bd-breadcrumb-item {\n display: flex;\n align-items: center;\n }\n\n /* Horizontal layout */\n .bd-breadcrumb--horizontal .bd-breadcrumb__items {\n flex-direction: row;\n }\n\n /* Parent-owned layout, so it is spelled against the slotted hosts. The\n rule this replaces targeted .bd-breadcrumb-item, which lives inside the\n item's own shadow root: the descendant combinator could not reach it,\n and :not(:last-child) could not have helped anyway, since that div is\n the only child of its root and so is always the last one. */\n .bd-breadcrumb--horizontal ::slotted(bd-breadcrumb-item:not(:last-child)) {\n margin-inline-end: var(--spacing-8);\n }\n\n /* Divider styles */\n .bd-breadcrumb__divider {\n margin-inline: var(--spacing-8);\n /* The \"/\" is aria-hidden -- the list says what it said, item by item --\n but it is still text a sighted reader reads, so it keeps 4.5:1;\n neutral-400 gave 3.23 */\n color: var(--color-text-subtle);\n /* no role: the \"/\" is real rendered text, but it is a single glyph in a\n fixed-height divider, the same category as the icon-only line box rule 7\n already covers for its leading. Sizing a separator is not a text role. */\n font-size: var(--typography-fontSize-sm);\n line-height: var(--typography-lineHeight-none);\n }\n\n /* Vertical layout.\n\n The four rules below are spelled :host([orientation]) rather than as\n descendants of .bd-breadcrumb--vertical. That class sits on the nav in\n bd-breadcrumb's shadow root, while every element they style lives in\n bd-breadcrumb-item's, so as descendant selectors they matched nothing:\n measured at 375px, dividers stayed display block and items had no\n padding and no background. bd-breadcrumb now reflects its orientation\n onto each item, which is what these selectors read. */\n /* Vertical layout */\n .bd-breadcrumb--vertical .bd-breadcrumb__items {\n flex-direction: column;\n align-items: stretch;\n gap: var(--spacing-4);\n }\n\n :host([orientation=\"vertical\"]) .bd-breadcrumb__divider {\n display: none;\n }\n\n /* Item styles */\n .bd-breadcrumb__item {\n display: flex;\n align-items: center;\n text-decoration: none;\n color: inherit;\n }\n\n /* Link styles.\n\n The ink is bd-link's, and the two colours declared here were not the ones\n that rendered. Measured at 1440: resting text rgb(0, 89, 214) and hovered\n text rgb(0, 69, 173), both from the atom's own .bd-link--primary rules --\n --color-text-brand and --color-action-primary-hover's next step,\n --color-action-primary-active. The --color-blue-400 that stood here never\n reached any text, which is the only reason it never showed as a failure:\n it is 3.02:1 on white. The --color-blue-700 hover was the same value the\n role already resolves to, spelled a second time by hand.\n\n That answers the question P5H.1 left open about this hover. It is neither\n a navigation-specific state nor a responsibility the token system is\n missing: the action ramp already renders it, and 8.56:1 is what\n --color-action-primary-active measures, not what a local choice bought.\n\n The underline is the state cue that was missing. It was declared on the\n host, and a host's text-decoration does not propagate into an\n inline-flex anchor, so hover was colour alone -- 7.0:1 to 8.6:1, a change\n a reader is not required to be able to see. It is now on the part that\n holds the text. */\n bd-link.bd-breadcrumb__item {\n text-decoration: none;\n }\n\n bd-link.bd-breadcrumb__item:hover::part(link) {\n text-decoration: underline;\n }\n\n /* Vertical item styles.\n\n The pill is the target here, so the padding goes on the part rather than\n on the host. Measured before: a 343x40 row whose focusable anchor was\n 43x24, because the padding was on the bd-link host and the anchor inside\n stayed the width of its own text -- 7.5% of the area a finger aims at,\n and a focus ring that hugged the text inside a large grey box. The\n background and the corner stay on the host, which is the box that draws\n them; only the padding moves to where the target is. */\n :host([orientation=\"vertical\"]) .bd-breadcrumb__item {\n background: var(--color-surface-subtle);\n border-radius: var(--shape-radius-sm);\n width: 100%;\n }\n\n :host([orientation=\"vertical\"]) span.bd-breadcrumb__item {\n padding: var(--spacing-8) var(--spacing-12);\n }\n\n :host([orientation=\"vertical\"]) bd-link.bd-breadcrumb__item::part(link) {\n padding: var(--spacing-8) var(--spacing-12);\n width: 100%;\n box-sizing: border-box;\n }\n\n :host([orientation=\"vertical\"]) bd-link.bd-breadcrumb__item:hover {\n background: var(--color-surface-muted);\n }\n\n :host([orientation=\"vertical\"]) bd-link.bd-breadcrumb__item:hover::part(link) {\n text-decoration: none;\n }\n\n /* Current item styles.\n\n No colour and no weight here. Both were declared on this span and both\n lost to bd-p's own paragraph rule one level down -- the colour by\n coincidence, since --color-text-primary is what bd-p sets anyway, and the\n weight not at all. The weight is asked for through bd-p's font-weight\n prop in breadcrumb.ts, which is the only place it renders. */\n .bd-breadcrumb__item--current {\n cursor: default;\n }\n\n :host([orientation=\"vertical\"]) .bd-breadcrumb__item--current {\n background: var(--color-surface-muted);\n }\n }\n\n /* A reader who asked for less motion was still getting the item hover. Twenty-three\n of the thirty animated directories in this package honour the query; this\n one did not. */\n @media (prefers-reduced-motion: reduce) {\n bd-link.bd-breadcrumb__item {\n transition: none;\n }\n }\n`;\n"],"mappings":"A,0BAEA,IAAAA,EAAe,CAAG,+vD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LitElement, type PropertyValues } from
|
|
2
|
-
import { MediaQueryController } from
|
|
3
|
-
import "../../tokens/tokens.
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
2
|
+
import { MediaQueryController } from "../shared/controller.media-query.js";
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
4
|
+
import "../link/link.js";
|
|
5
|
+
import "../paragraph/paragraph.js";
|
|
6
6
|
type Orientation = 'horizontal' | 'vertical';
|
|
7
7
|
export declare class Breadcrumb extends LitElement {
|
|
8
8
|
noTrailingSlash: boolean;
|
|
@@ -1,177 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
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 { MediaQueryController } from "../shared/controller.media-query.js";
|
|
11
|
-
// Installs the design tokens into document scope; see src/tokens/tokens.ts
|
|
12
|
-
import "../../tokens/tokens.js";
|
|
13
|
-
import "../link/link.js";
|
|
14
|
-
import "../paragraph/paragraph.js";
|
|
15
|
-
import breadcrumbCSS from "./breadcrumb.css.js";
|
|
16
|
-
let Breadcrumb = class Breadcrumb extends LitElement {
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.noTrailingSlash = false;
|
|
20
|
-
this.mobileBreakpoint = 768;
|
|
21
|
-
this._isMobile = false;
|
|
22
|
-
this._viewport = new MediaQueryController(this, this._viewportQuery(), mobile => { this._isMobile = mobile; });
|
|
23
|
-
}
|
|
24
|
-
willUpdate(changedProperties) {
|
|
25
|
-
if (changedProperties.has('mobileBreakpoint'))
|
|
26
|
-
this._viewport.query = this._viewportQuery();
|
|
27
|
-
}
|
|
28
|
-
firstUpdated() {
|
|
29
|
-
this._updateChildItems();
|
|
30
|
-
/* Items slotted later still have to be told, or they render with the
|
|
31
|
-
constructor default. */
|
|
32
|
-
this.shadowRoot?.querySelector('slot')
|
|
33
|
-
?.addEventListener('slotchange', () => this._updateChildItems());
|
|
34
|
-
}
|
|
35
|
-
updated(changedProperties) {
|
|
36
|
-
/* _isMobile is the orientation, so a change to it has to reach the items
|
|
37
|
-
as well as the nav; without this the class on the nav flipped and the
|
|
38
|
-
items kept the styling of the layout they had left. */
|
|
39
|
-
if (changedProperties.has('noTrailingSlash') || changedProperties.has('_isMobile')) {
|
|
40
|
-
this._updateChildItems();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
get _orientation() {
|
|
44
|
-
return this._isMobile ? 'vertical' : 'horizontal';
|
|
45
|
-
}
|
|
46
|
-
_updateChildItems() {
|
|
47
|
-
const slot = this.shadowRoot?.querySelector('slot');
|
|
48
|
-
if (!slot)
|
|
49
|
-
return;
|
|
50
|
-
const items = slot.assignedElements({ flatten: true });
|
|
51
|
-
items.forEach(item => {
|
|
52
|
-
if (item.updateNoTrailingSlash) {
|
|
53
|
-
item.updateNoTrailingSlash(this.noTrailingSlash);
|
|
54
|
-
}
|
|
55
|
-
/* The state path across the boundary. Setting the property rather than
|
|
56
|
-
the attribute keeps Lit's reflection in charge of the DOM. */
|
|
57
|
-
if ('orientation' in item) {
|
|
58
|
-
item.orientation = this._orientation;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/* Vertical below mobileBreakpoint, as a media query the browser evaluates:
|
|
63
|
-
it says when the width crosses the breakpoint, so nothing reads the
|
|
64
|
-
window's width on every resize. It was window.innerWidth on a debounced
|
|
65
|
-
resize listener. The breakpoint is an attribute, so the query is built
|
|
66
|
-
from it, and rebuilt when it changes.
|
|
67
|
-
|
|
68
|
-
Strictly narrower, which is what the rest of the package means by a
|
|
69
|
-
breakpoint: shared/token-scales.ts derives below('md') as max-width
|
|
70
|
-
767.98px so that exactly 768px is the wider layout. With <= this element
|
|
71
|
-
was the one component that read 768 as mobile, so at that one width a
|
|
72
|
-
page could show a vertical breadcrumb above a desktop anchor nav. */
|
|
73
|
-
_viewportQuery() {
|
|
74
|
-
return `(width < ${this.mobileBreakpoint}px)`;
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
const orientation = this._orientation;
|
|
78
|
-
return html `
|
|
79
|
-
<nav class="bd-breadcrumb bd-breadcrumb--${orientation}"
|
|
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"../paragraph/paragraph.js";import"../link/link.js";import{MediaQueryController as n}from"../shared/controller.media-query.js";import r from"./breadcrumb.css.js";import{LitElement as i,html as a}from"lit";import{property as o,state as s}from"lit/decorators.js";var c=class extends i{constructor(){super(),this.noTrailingSlash=!1,this.mobileBreakpoint=768,this._isMobile=!1,this._viewport=new n(this,this._viewportQuery(),e=>{this._isMobile=e})}willUpdate(e){e.has(`mobileBreakpoint`)&&(this._viewport.query=this._viewportQuery())}firstUpdated(){this._updateChildItems(),this.shadowRoot?.querySelector(`slot`)?.addEventListener(`slotchange`,()=>this._updateChildItems())}updated(e){(e.has(`noTrailingSlash`)||e.has(`_isMobile`))&&this._updateChildItems()}get _orientation(){return this._isMobile?`vertical`:`horizontal`}_updateChildItems(){let e=this.shadowRoot?.querySelector(`slot`);e&&e.assignedElements({flatten:!0}).forEach(e=>{e.updateNoTrailingSlash&&e.updateNoTrailingSlash(this.noTrailingSlash),`orientation`in e&&(e.orientation=this._orientation)})}_viewportQuery(){return`(width < ${this.mobileBreakpoint}px)`}render(){let e=this._orientation;return a`
|
|
2
|
+
<nav class="bd-breadcrumb bd-breadcrumb--${e}"
|
|
80
3
|
aria-label="Breadcrumb">
|
|
81
4
|
<ol class="bd-breadcrumb__items">
|
|
82
5
|
<slot></slot>
|
|
83
6
|
</ol>
|
|
84
7
|
</nav>
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
static { this.styles = [breadcrumbCSS]; }
|
|
88
|
-
};
|
|
89
|
-
__decorate([
|
|
90
|
-
property({ type: Boolean, attribute: 'no-trailing-slash' })
|
|
91
|
-
], Breadcrumb.prototype, "noTrailingSlash", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: Number, attribute: 'mobile-breakpoint' })
|
|
94
|
-
], Breadcrumb.prototype, "mobileBreakpoint", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
state()
|
|
97
|
-
], Breadcrumb.prototype, "_isMobile", void 0);
|
|
98
|
-
Breadcrumb = __decorate([
|
|
99
|
-
defineElement('bd-breadcrumb')
|
|
100
|
-
], Breadcrumb);
|
|
101
|
-
export { Breadcrumb };
|
|
102
|
-
let BreadcrumbItem = class BreadcrumbItem extends LitElement {
|
|
103
|
-
constructor() {
|
|
104
|
-
super();
|
|
105
|
-
this.href = '';
|
|
106
|
-
this.current = false;
|
|
107
|
-
this.noTrailingSlash = false;
|
|
108
|
-
/**
|
|
109
|
-
* Set by the parent bd-breadcrumb, reflected so the item's own stylesheet
|
|
110
|
-
* can read it. The item does not work this out for itself: the breakpoint
|
|
111
|
-
* belongs to the breadcrumb, and two elements detecting the same viewport
|
|
112
|
-
* separately is how they drift apart.
|
|
113
|
-
*/
|
|
114
|
-
this.orientation = 'horizontal';
|
|
115
|
-
/* Each item is an <li> of the breadcrumb's <ol> in the flattened tree, so
|
|
116
|
-
a screen reader says "list, 3 items" and where the reader is in it. The
|
|
117
|
-
role is the element's own, through ElementInternals, so no attribute is
|
|
118
|
-
written on markup the page owns. */
|
|
119
|
-
this.attachInternals().role = 'listitem';
|
|
120
|
-
}
|
|
121
|
-
updateNoTrailingSlash(value) {
|
|
122
|
-
this.noTrailingSlash = value;
|
|
123
|
-
this.requestUpdate();
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
const showDivider = !this.current && !this.noTrailingSlash;
|
|
127
|
-
/* Three shapes, one type size.
|
|
128
|
-
|
|
129
|
-
The links used to be written `size="small"`. bd-link has no `size`
|
|
130
|
-
property -- its type step is `font-size`, resolved through the closed set
|
|
131
|
-
in shared/token-scales.ts -- so the attribute sat in the DOM doing
|
|
132
|
-
nothing and the links rendered at 16px beside a 14px current item.
|
|
133
|
-
Measured: 43x24 and 64x24 link boxes against an 86x37 current one, in a
|
|
134
|
-
row that is meant to read as one line of text.
|
|
135
|
-
|
|
136
|
-
The current item's weight is on bd-p rather than on the span around it,
|
|
137
|
-
for the same reason: --typography-fontWeight-medium was declared on the
|
|
138
|
-
host and the text is inside bd-p's own paragraph, which sets its own
|
|
139
|
-
weight and won. So the one cue that was not colour did not render, and
|
|
140
|
-
the current location was smaller and no heavier than its ancestors. */
|
|
141
|
-
const content = this.current
|
|
142
|
-
? html `<span class="bd-breadcrumb__item bd-breadcrumb__item--current" aria-current="page">
|
|
8
|
+
`}static{this.styles=[r]}};t([o({type:Boolean,attribute:`no-trailing-slash`})],c.prototype,`noTrailingSlash`,void 0),t([o({type:Number,attribute:`mobile-breakpoint`})],c.prototype,`mobileBreakpoint`,void 0),t([s()],c.prototype,`_isMobile`,void 0),c=t([e(`bd-breadcrumb`)],c);var l=class extends i{constructor(){super(),this.href=``,this.current=!1,this.noTrailingSlash=!1,this.orientation=`horizontal`,this.attachInternals().role=`listitem`}updateNoTrailingSlash(e){this.noTrailingSlash=e,this.requestUpdate()}render(){let e=!this.current&&!this.noTrailingSlash,t=this.current?a`<span class="bd-breadcrumb__item bd-breadcrumb__item--current" aria-current="page">
|
|
143
9
|
<bd-p variant="small" font-weight="medium"><slot></slot></bd-p>
|
|
144
|
-
</span
|
|
145
|
-
: this.href
|
|
146
|
-
? html `<bd-link href="${this.href}" font-size="sm" class="bd-breadcrumb__item">
|
|
10
|
+
</span>`:this.href?a`<bd-link href="${this.href}" font-size="sm" class="bd-breadcrumb__item">
|
|
147
11
|
<slot></slot>
|
|
148
|
-
</bd-link
|
|
149
|
-
: html `<span class="bd-breadcrumb__item">
|
|
12
|
+
</bd-link>`:a`<span class="bd-breadcrumb__item">
|
|
150
13
|
<bd-p variant="small"><slot></slot></bd-p>
|
|
151
|
-
</span>`;
|
|
152
|
-
return html `
|
|
14
|
+
</span>`;return a`
|
|
153
15
|
<div class="bd-breadcrumb-item">
|
|
154
|
-
${
|
|
155
|
-
${
|
|
16
|
+
${t}
|
|
17
|
+
${e?a`<span class="bd-breadcrumb__divider" aria-hidden="true">/</span>`:``}
|
|
156
18
|
</div>
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
static { this.styles = [breadcrumbCSS]; }
|
|
160
|
-
};
|
|
161
|
-
__decorate([
|
|
162
|
-
property({ type: String })
|
|
163
|
-
], BreadcrumbItem.prototype, "href", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
property({ type: Boolean, reflect: true })
|
|
166
|
-
], BreadcrumbItem.prototype, "current", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
property({ type: Boolean })
|
|
169
|
-
], BreadcrumbItem.prototype, "noTrailingSlash", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
property({ type: String, reflect: true })
|
|
172
|
-
], BreadcrumbItem.prototype, "orientation", void 0);
|
|
173
|
-
BreadcrumbItem = __decorate([
|
|
174
|
-
defineElement('bd-breadcrumb-item')
|
|
175
|
-
], BreadcrumbItem);
|
|
176
|
-
export { BreadcrumbItem };
|
|
19
|
+
`}static{this.styles=[r]}};t([o({type:String})],l.prototype,`href`,void 0),t([o({type:Boolean,reflect:!0})],l.prototype,`current`,void 0),t([o({type:Boolean})],l.prototype,`noTrailingSlash`,void 0),t([o({type:String,reflect:!0})],l.prototype,`orientation`,void 0),l=t([e(`bd-breadcrumb-item`)],l);export{c as Breadcrumb,l as BreadcrumbItem};
|
|
177
20
|
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../../src/components/breadcrumb/breadcrumb.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,2EAA2E;AAC3E,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,2BAA2B,CAAC;AACnC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAKzC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAUxC;QACE,KAAK,EAAE,CAAC;QATV,oBAAe,GAAG,KAAK,CAAC;QAExB,qBAAgB,GAAG,GAAG,CAAC;QAEvB,cAAS,GAAG,KAAK,CAAC;QAMhB,IAAI,CAAC,SAAS,GAAG,IAAI,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACjH,CAAC;IAED,UAAU,CAAC,iBAAuC;QAChD,IAAI,iBAAiB,CAAC,GAAG,CAAC,kBAAkB,CAAC;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9F,CAAC;IAED,YAAY;QACV,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB;kCAC0B;QAC1B,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC;YACpC,EAAE,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,CAAC,iBAAuC;QAC7C;;iEAEyD;QACzD,IAAI,iBAAiB,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACnF,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;IACpD,CAAC;IAED,iBAAiB;QACf,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,KAAK,GAAuE,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3H,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC/B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACnD,CAAC;YACD;4EACgE;YAChE,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;gBAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;2EAUuE;IACvE,cAAc;QACZ,OAAO,YAAY,IAAI,CAAC,gBAAgB,KAAK,CAAC;IAChD,CAAC;IAED,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QAEtC,OAAO,IAAI,CAAA;iDACkC,WAAW;;;;;;KAMvD,CAAC;IACJ,CAAC;aAEM,WAAM,GAAG,CAAC,aAAa,CAAC,AAAlB,CAAmB;;AAnFhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mDACpC;AAExB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;oDACpC;AAEvB;IADC,KAAK,EAAE;6CACU;AANP,UAAU;IADtB,aAAa,CAAC,eAAe,CAAC;GAClB,UAAU,CAsFtB;;AAGM,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAgB5C;QACE,KAAK,EAAE,CAAC;QAfV,SAAI,GAAG,EAAE,CAAC;QAEV,YAAO,GAAG,KAAK,CAAC;QAEhB,oBAAe,GAAG,KAAK,CAAC;QACxB;;;;;WAKG;QAEH,gBAAW,GAAgB,YAAY,CAAC;QAItC;;;8CAGsC;QACtC,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3C,CAAC;IAED,qBAAqB,CAAC,KAAc;QAClC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;QAE3D;;;;;;;;;;;;;iFAayE;QACzE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO;YAC1B,CAAC,CAAC,IAAI,CAAA;;gBAEI;YACV,CAAC,CAAC,IAAI,CAAC,IAAI;gBACT,CAAC,CAAC,IAAI,CAAA,kBAAkB,IAAI,CAAC,IAAI;;qBAEpB;gBACb,CAAC,CAAC,IAAI,CAAA;;kBAEI,CAAC;QAEf,OAAO,IAAI,CAAA;;UAEL,OAAO;UACP,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA,kEAAkE,CAAC,CAAC,CAAC,EAAE;;KAE9F,CAAC;IACJ,CAAC;aAEM,WAAM,GAAG,CAAC,aAAa,CAAC,AAAlB,CAAmB;;AAjEhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACjB;AAEV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAC3B;AAEhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACJ;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACF;AAd7B,cAAc;IAD1B,aAAa,CAAC,oBAAoB,CAAC;GACvB,cAAc,CAoE1B","sourcesContent":["import { LitElement, html, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { defineElement } from '../shared/define-element.ts';\nimport { MediaQueryController } from '../shared/controller.media-query.ts';\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"../../tokens/tokens.ts\";\nimport '../link/link.ts';\nimport '../paragraph/paragraph.ts';\nimport breadcrumbCSS from './breadcrumb.css.ts';\n\ntype Orientation = 'horizontal' | 'vertical';\n\n@defineElement('bd-breadcrumb')\nexport class Breadcrumb extends LitElement {\n @property({ type: Boolean, attribute: 'no-trailing-slash' })\n noTrailingSlash = false;\n @property({ type: Number, attribute: 'mobile-breakpoint' })\n mobileBreakpoint = 768;\n @state()\n _isMobile = false;\n\n _viewport: MediaQueryController;\n\n constructor() {\n super();\n this._viewport = new MediaQueryController(this, this._viewportQuery(), mobile => { this._isMobile = mobile; });\n }\n\n willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('mobileBreakpoint')) this._viewport.query = this._viewportQuery();\n }\n\n firstUpdated() {\n this._updateChildItems();\n /* Items slotted later still have to be told, or they render with the\n constructor default. */\n this.shadowRoot?.querySelector('slot')\n ?.addEventListener('slotchange', () => this._updateChildItems());\n }\n\n updated(changedProperties: PropertyValues<this>) {\n /* _isMobile is the orientation, so a change to it has to reach the items\n as well as the nav; without this the class on the nav flipped and the\n items kept the styling of the layout they had left. */\n if (changedProperties.has('noTrailingSlash') || changedProperties.has('_isMobile')) {\n this._updateChildItems();\n }\n }\n\n get _orientation(): Orientation {\n return this._isMobile ? 'vertical' : 'horizontal';\n }\n\n _updateChildItems() {\n const slot = this.shadowRoot?.querySelector('slot');\n if (!slot) return;\n\n const items: (Element & { updateNoTrailingSlash?: (value: boolean) => void })[] = slot.assignedElements({ flatten: true });\n items.forEach(item => {\n if (item.updateNoTrailingSlash) {\n item.updateNoTrailingSlash(this.noTrailingSlash);\n }\n /* The state path across the boundary. Setting the property rather than\n the attribute keeps Lit's reflection in charge of the DOM. */\n if ('orientation' in item) {\n item.orientation = this._orientation;\n }\n });\n }\n\n /* Vertical below mobileBreakpoint, as a media query the browser evaluates:\n it says when the width crosses the breakpoint, so nothing reads the\n window's width on every resize. It was window.innerWidth on a debounced\n resize listener. The breakpoint is an attribute, so the query is built\n from it, and rebuilt when it changes.\n\n Strictly narrower, which is what the rest of the package means by a\n breakpoint: shared/token-scales.ts derives below('md') as max-width\n 767.98px so that exactly 768px is the wider layout. With <= this element\n was the one component that read 768 as mobile, so at that one width a\n page could show a vertical breadcrumb above a desktop anchor nav. */\n _viewportQuery() {\n return `(width < ${this.mobileBreakpoint}px)`;\n }\n\n render() {\n const orientation = this._orientation;\n\n return html`\n <nav class=\"bd-breadcrumb bd-breadcrumb--${orientation}\"\n aria-label=\"Breadcrumb\">\n <ol class=\"bd-breadcrumb__items\">\n <slot></slot>\n </ol>\n </nav>\n `;\n }\n\n static styles = [breadcrumbCSS];\n}\n\n@defineElement('bd-breadcrumb-item')\nexport class BreadcrumbItem extends LitElement {\n @property({ type: String })\n href = '';\n @property({ type: Boolean, reflect: true })\n current = false;\n @property({ type: Boolean })\n noTrailingSlash = false;\n /**\n * Set by the parent bd-breadcrumb, reflected so the item's own stylesheet\n * can read it. The item does not work this out for itself: the breakpoint\n * belongs to the breadcrumb, and two elements detecting the same viewport\n * separately is how they drift apart.\n */\n @property({ type: String, reflect: true })\n orientation: Orientation = 'horizontal';\n\n constructor() {\n super();\n /* Each item is an <li> of the breadcrumb's <ol> in the flattened tree, so\n a screen reader says \"list, 3 items\" and where the reader is in it. The\n role is the element's own, through ElementInternals, so no attribute is\n written on markup the page owns. */\n this.attachInternals().role = 'listitem';\n }\n\n updateNoTrailingSlash(value: boolean) {\n this.noTrailingSlash = value;\n this.requestUpdate();\n }\n\n render() {\n const showDivider = !this.current && !this.noTrailingSlash;\n\n /* Three shapes, one type size.\n\n The links used to be written `size=\"small\"`. bd-link has no `size`\n property -- its type step is `font-size`, resolved through the closed set\n in shared/token-scales.ts -- so the attribute sat in the DOM doing\n nothing and the links rendered at 16px beside a 14px current item.\n Measured: 43x24 and 64x24 link boxes against an 86x37 current one, in a\n row that is meant to read as one line of text.\n\n The current item's weight is on bd-p rather than on the span around it,\n for the same reason: --typography-fontWeight-medium was declared on the\n host and the text is inside bd-p's own paragraph, which sets its own\n weight and won. So the one cue that was not colour did not render, and\n the current location was smaller and no heavier than its ancestors. */\n const content = this.current\n ? html`<span class=\"bd-breadcrumb__item bd-breadcrumb__item--current\" aria-current=\"page\">\n <bd-p variant=\"small\" font-weight=\"medium\"><slot></slot></bd-p>\n </span>`\n : this.href\n ? html`<bd-link href=\"${this.href}\" font-size=\"sm\" class=\"bd-breadcrumb__item\">\n <slot></slot>\n </bd-link>`\n : html`<span class=\"bd-breadcrumb__item\">\n <bd-p variant=\"small\"><slot></slot></bd-p>\n </span>`;\n\n return html`\n <div class=\"bd-breadcrumb-item\">\n ${content}\n ${showDivider ? html`<span class=\"bd-breadcrumb__divider\" aria-hidden=\"true\">/</span>` : ''}\n </div>\n `;\n }\n\n static styles = [breadcrumbCSS];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-breadcrumb' : Breadcrumb;\n 'bd-breadcrumb-item': BreadcrumbItem;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":["breadcrumbCSS","_decorate","__decorate","breadcrumb_css_default","Breadcrumb","LitElement","MediaQueryController","mobile","changedProperties","slot","item","orientation","property","state","defineElement","BreadcrumbItem","value","showDivider","content"],"sources":["../../../../src/components/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { defineElement } from '#shared/define-element.ts';\nimport { MediaQueryController } from '#shared/controller.media-query.ts';\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport '#components/link/link.ts';\nimport '#components/paragraph/paragraph.ts';\nimport breadcrumbCSS from './breadcrumb.css.ts';\n\ntype Orientation = 'horizontal' | 'vertical';\n\n@defineElement('bd-breadcrumb')\nexport class Breadcrumb extends LitElement {\n @property({ type: Boolean, attribute: 'no-trailing-slash' })\n noTrailingSlash = false;\n @property({ type: Number, attribute: 'mobile-breakpoint' })\n mobileBreakpoint = 768;\n @state()\n _isMobile = false;\n\n _viewport: MediaQueryController;\n\n constructor() {\n super();\n this._viewport = new MediaQueryController(this, this._viewportQuery(), mobile => { this._isMobile = mobile; });\n }\n\n willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('mobileBreakpoint')) this._viewport.query = this._viewportQuery();\n }\n\n firstUpdated() {\n this._updateChildItems();\n /* Items slotted later still have to be told, or they render with the\n constructor default. */\n this.shadowRoot?.querySelector('slot')\n ?.addEventListener('slotchange', () => this._updateChildItems());\n }\n\n updated(changedProperties: PropertyValues<this>) {\n /* _isMobile is the orientation, so a change to it has to reach the items\n as well as the nav; without this the class on the nav flipped and the\n items kept the styling of the layout they had left. */\n if (changedProperties.has('noTrailingSlash') || changedProperties.has('_isMobile')) {\n this._updateChildItems();\n }\n }\n\n get _orientation(): Orientation {\n return this._isMobile ? 'vertical' : 'horizontal';\n }\n\n _updateChildItems() {\n const slot = this.shadowRoot?.querySelector('slot');\n if (!slot) return;\n\n const items: (Element & { updateNoTrailingSlash?: (value: boolean) => void })[] = slot.assignedElements({ flatten: true });\n items.forEach(item => {\n if (item.updateNoTrailingSlash) {\n item.updateNoTrailingSlash(this.noTrailingSlash);\n }\n /* The state path across the boundary. Setting the property rather than\n the attribute keeps Lit's reflection in charge of the DOM. */\n if ('orientation' in item) {\n item.orientation = this._orientation;\n }\n });\n }\n\n /* Vertical below mobileBreakpoint, as a media query the browser evaluates:\n it says when the width crosses the breakpoint, so nothing reads the\n window's width on every resize. It was window.innerWidth on a debounced\n resize listener. The breakpoint is an attribute, so the query is built\n from it, and rebuilt when it changes.\n\n Strictly narrower, which is what the rest of the package means by a\n breakpoint: shared/token-scales.ts derives below('md') as max-width\n 767.98px so that exactly 768px is the wider layout. With <= this element\n was the one component that read 768 as mobile, so at that one width a\n page could show a vertical breadcrumb above a desktop anchor nav. */\n _viewportQuery() {\n return `(width < ${this.mobileBreakpoint}px)`;\n }\n\n render() {\n const orientation = this._orientation;\n\n return html`\n <nav class=\"bd-breadcrumb bd-breadcrumb--${orientation}\"\n aria-label=\"Breadcrumb\">\n <ol class=\"bd-breadcrumb__items\">\n <slot></slot>\n </ol>\n </nav>\n `;\n }\n\n static styles = [breadcrumbCSS];\n}\n\n@defineElement('bd-breadcrumb-item')\nexport class BreadcrumbItem extends LitElement {\n @property({ type: String })\n href = '';\n @property({ type: Boolean, reflect: true })\n current = false;\n @property({ type: Boolean })\n noTrailingSlash = false;\n /**\n * Set by the parent bd-breadcrumb, reflected so the item's own stylesheet\n * can read it. The item does not work this out for itself: the breakpoint\n * belongs to the breadcrumb, and two elements detecting the same viewport\n * separately is how they drift apart.\n */\n @property({ type: String, reflect: true })\n orientation: Orientation = 'horizontal';\n\n constructor() {\n super();\n /* Each item is an <li> of the breadcrumb's <ol> in the flattened tree, so\n a screen reader says \"list, 3 items\" and where the reader is in it. The\n role is the element's own, through ElementInternals, so no attribute is\n written on markup the page owns. */\n this.attachInternals().role = 'listitem';\n }\n\n updateNoTrailingSlash(value: boolean) {\n this.noTrailingSlash = value;\n this.requestUpdate();\n }\n\n render() {\n const showDivider = !this.current && !this.noTrailingSlash;\n\n /* Three shapes, one type size.\n\n The links used to be written `size=\"small\"`. bd-link has no `size`\n property -- its type step is `font-size`, resolved through the closed set\n in shared/token-scales.ts -- so the attribute sat in the DOM doing\n nothing and the links rendered at 16px beside a 14px current item.\n Measured: 43x24 and 64x24 link boxes against an 86x37 current one, in a\n row that is meant to read as one line of text.\n\n The current item's weight is on bd-p rather than on the span around it,\n for the same reason: --typography-fontWeight-medium was declared on the\n host and the text is inside bd-p's own paragraph, which sets its own\n weight and won. So the one cue that was not colour did not render, and\n the current location was smaller and no heavier than its ancestors. */\n const content = this.current\n ? html`<span class=\"bd-breadcrumb__item bd-breadcrumb__item--current\" aria-current=\"page\">\n <bd-p variant=\"small\" font-weight=\"medium\"><slot></slot></bd-p>\n </span>`\n : this.href\n ? html`<bd-link href=\"${this.href}\" font-size=\"sm\" class=\"bd-breadcrumb__item\">\n <slot></slot>\n </bd-link>`\n : html`<span class=\"bd-breadcrumb__item\">\n <bd-p variant=\"small\"><slot></slot></bd-p>\n </span>`;\n\n return html`\n <div class=\"bd-breadcrumb-item\">\n ${content}\n ${showDivider ? html`<span class=\"bd-breadcrumb__divider\" aria-hidden=\"true\">/</span>` : ''}\n </div>\n `;\n }\n\n static styles = [breadcrumbCSS];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-breadcrumb' : Breadcrumb;\n 'bd-breadcrumb-item': BreadcrumbItem;\n }\n}\n"],"mappings":"A,gbAaO,IAAMI,EAAN,cAAyBC,CAAW,CAUzC,aAAc,CACZ,MAAM,EATU,KAAA,gBAAA,GAEC,KAAA,iBAAA,IAEP,KAAA,UAAA,GAMV,KAAK,UAAY,IAAIC,EAAqB,KAAM,KAAK,eAAe,EAAG,GAAU,CAAE,KAAK,UAAYC,CAAQ,CAAC,CAC/G,CAEA,WAAW,EAAyC,CAC9CC,EAAkB,IAAI,kBAAkB,IAAG,KAAK,UAAU,MAAQ,KAAK,eAAe,EAC5F,CAEA,cAAe,CACb,KAAK,kBAAkB,EAGvB,KAAK,YAAY,cAAc,MAAM,CAAC,EAClC,iBAAiB,iBAAoB,KAAK,kBAAkB,CAAC,CACnE,CAEA,QAAQ,EAAyC,EAI3CA,EAAkB,IAAI,iBAAiB,GAAKA,EAAkB,IAAI,WAAW,IAC/E,KAAK,kBAAkB,CAE3B,CAEA,IAAI,cAA4B,CAC9B,OAAO,KAAK,UAAY,WAAa,YACvC,CAEA,mBAAoB,CAClB,IAAMC,EAAO,KAAK,YAAY,cAAc,MAAM,EAC7CA,GAGLA,EADuF,iBAAiB,CAAE,QAAS,EAAK,CACxH,CAAA,CAAM,QAAQ,GAAQ,CAChBC,EAAK,uBACPA,EAAK,sBAAsB,KAAK,eAAe,EAI7C,gBAAiBA,IACnB,EAAK,YAAc,KAAK,aAE5B,CAAC,CACH,CAaA,gBAAiB,CACf,MAAO,YAAY,KAAK,iBAAiB,IAC3C,CAEA,QAAS,CACP,IAAMC,EAAc,KAAK,aAEzB,MAAO,EAAI;iDACkCA,EAAY;;;;;;KAO3D,C,OAEgB,KAAA,OAAA,CAACX,CAAa,C,CAChC,EArFGC,EAAA,CAAAW,EAAS,CAAE,KAAM,QAAS,UAAW,mBAAoB,CAAC,CAAA,EAAAR,EAAA,UAAA,kBAAA,IAAA,EAAA,EAE1DH,EAAA,CAAAW,EAAS,CAAE,KAAM,OAAQ,UAAW,mBAAoB,CAAC,CAAA,EAAAR,EAAA,UAAA,mBAAA,IAAA,EAAA,EAEzDH,EAAA,CAAAY,EAAM,CAAA,EAAAT,EAAA,UAAA,YAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAa,EAAc,eAAe,CAAA,EAAAV,CAAA,EA0FvB,IAAMW,EAAN,cAA6BV,CAAW,CAgB7C,aAAc,CACZ,MAAM,EAfD,KAAA,KAAA,GAEG,KAAA,QAAA,GAEQ,KAAA,gBAAA,GAQS,KAAA,YAAA,aAQzB,KAAK,gBAAgB,CAAC,CAAC,KAAO,UAChC,CAEA,sBAAsB,EAAgB,CACpC,KAAK,gBAAkBW,EACvB,KAAK,cAAc,CACrB,CAEA,QAAS,CACP,IAAMC,EAAc,CAAC,KAAK,SAAW,CAAC,KAAK,gBAgBrCC,EAAU,KAAK,QACjB,CAAI;;iBAGJ,KAAK,KACH,CAAI,kBAAkB,KAAK,KAAK;;sBAGhC,CAAI;;mBAIV,MAAO,EAAI;;UAELA,EAAQ;UACRD,EAAc,CAAI,mEAAqE,GAAG;;KAGlG,C,OAEgB,KAAA,OAAA,CAACjB,CAAa,C,CAChC,EAnEGC,EAAA,CAAAW,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAG,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBd,EAAA,CAAAW,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAG,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzCd,EAAA,CAAAW,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,EAAAG,EAAA,UAAA,kBAAA,IAAA,EAAA,EAQ1Bd,EAAA,CAAAW,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAG,EAAA,UAAA,cAAA,IAAA,EAAA,EAd1C,EAAAd,EAAA,CAAAa,EAAc,oBAAoB,CAAA,EAAAC,CAAA,E"}
|