@repobit/dex-system-design 3.1.2 → 4.0.0
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 +1067 -0
- package/README.md +31 -6
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Bold.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-BoldItalic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Italic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Medium.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-MediumItalic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Regular.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-SemiBold.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-SemiBoldItalic.woff2 +0 -0
- package/dist/src/components/abstract/abstract.css.d.ts +7 -0
- package/dist/src/components/abstract/abstract.css.js +2 -0
- package/dist/src/components/abstract/abstract.css.js.map +1 -0
- package/dist/src/components/abstract/abstract.d.ts +31 -0
- package/dist/src/components/abstract/abstract.js +2 -0
- package/dist/src/components/abstract/abstract.js.map +1 -0
- package/dist/src/components/accordion/accordion-item.d.ts +93 -0
- package/dist/src/components/accordion/accordion-item.js +25 -0
- package/dist/src/components/accordion/accordion-item.js.map +1 -0
- package/dist/src/components/accordion/accordion-keyboard.d.ts +5 -5
- package/dist/src/components/accordion/accordion-keyboard.js +1 -1
- package/dist/src/components/accordion/accordion-keyboard.js.map +1 -1
- package/dist/src/components/accordion/accordion.css.d.ts +2 -2
- package/dist/src/components/accordion/accordion.css.js +1 -1
- package/dist/src/components/accordion/accordion.css.js.map +1 -1
- package/dist/src/components/accordion/accordion.d.ts +66 -31
- package/dist/src/components/accordion/accordion.js +8 -66
- package/dist/src/components/accordion/accordion.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints-pills.css.js +2 -0
- package/dist/src/components/agent-endpoints/agent-endpoints-pills.css.js.map +1 -0
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +38 -21
- package/dist/src/components/agent-endpoints/agent-endpoints.js +22 -41
- package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
- package/dist/src/components/anchor-nav/anchor-nav-item.css.d.ts +1 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.css.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.css.js.map +1 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.d.ts +38 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.js.map +1 -0
- package/dist/src/components/anchor-nav/anchor-nav.css.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav.css.js.map +1 -0
- package/dist/src/components/{anchor → anchor-nav}/anchor-nav.d.ts +41 -23
- package/dist/src/components/anchor-nav/anchor-nav.js +43 -0
- package/dist/src/components/anchor-nav/anchor-nav.js.map +1 -0
- package/dist/src/components/annotation/annotation.css.js +1 -1
- package/dist/src/components/annotation/annotation.css.js.map +1 -1
- package/dist/src/components/annotation/annotation.js +2 -2
- package/dist/src/components/annotation/annotation.js.map +1 -1
- package/dist/src/components/article/article.css.d.ts +30 -0
- package/dist/src/components/article/article.css.js +2 -0
- package/dist/src/components/article/article.css.js.map +1 -0
- package/dist/src/components/article/article.d.ts +135 -0
- package/dist/src/components/article/article.js +39 -0
- package/dist/src/components/article/article.js.map +1 -0
- package/dist/src/components/audience-card/audience-card.css.js +1 -1
- package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.d.ts +30 -15
- package/dist/src/components/audience-card/audience-card.js +9 -11
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/authors/authors.css.d.ts +7 -0
- package/dist/src/components/authors/authors.css.js +2 -0
- package/dist/src/components/authors/authors.css.js.map +1 -0
- package/dist/src/components/authors/authors.d.ts +29 -0
- package/dist/src/components/authors/authors.js +7 -0
- package/dist/src/components/authors/authors.js.map +1 -0
- package/dist/src/components/avatar/avatar.js +6 -6
- package/dist/src/components/avatar/avatar.js.map +1 -1
- package/dist/src/components/awards/award-marks.css.js +2 -0
- package/dist/src/components/awards/award-marks.css.js.map +1 -0
- package/dist/src/components/awards/award.css.js +2 -0
- package/dist/src/components/awards/award.css.js.map +1 -0
- package/dist/src/components/awards/award.d.ts +65 -0
- package/dist/src/components/awards/award.js +11 -0
- package/dist/src/components/awards/award.js.map +1 -0
- package/dist/src/components/awards/awards.css.d.ts +2 -1
- package/dist/src/components/awards/awards.css.js +1 -1
- package/dist/src/components/awards/awards.css.js.map +1 -1
- package/dist/src/components/awards/awards.d.ts +123 -71
- package/dist/src/components/awards/awards.js +46 -57
- package/dist/src/components/awards/awards.js.map +1 -1
- package/dist/src/components/awards/scroll-slides.d.ts +9 -8
- package/dist/src/components/awards/scroll-slides.js.map +1 -1
- package/dist/src/components/back/back.d.ts +12 -7
- package/dist/src/components/back/back.js +6 -6
- package/dist/src/components/back/back.js.map +1 -1
- package/dist/src/components/badge/badge.css.js +1 -1
- package/dist/src/components/badge/badge.css.js.map +1 -1
- package/dist/src/components/badge/badge.d.ts +11 -11
- package/dist/src/components/badge/badge.js +2 -2
- package/dist/src/components/badge/badge.js.map +1 -1
- package/dist/src/components/bar-chart/bar-chart.css.js +2 -0
- package/dist/src/components/bar-chart/bar-chart.css.js.map +1 -0
- package/dist/src/components/bar-chart/bar-chart.d.ts +147 -0
- package/dist/src/components/bar-chart/bar-chart.js +42 -0
- package/dist/src/components/bar-chart/bar-chart.js.map +1 -0
- package/dist/src/components/bento-grid/bento-grid.css.js +2 -2
- package/dist/src/components/bento-grid/bento-grid.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.d.ts +21 -9
- package/dist/src/components/bento-grid/bento-grid.js +10 -26
- package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.d.ts +34 -13
- package/dist/src/components/bento-grid/bento-item.js +9 -26
- package/dist/src/components/bento-grid/bento-item.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.css.js +1 -1
- package/dist/src/components/blockquote/blockquote.css.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.d.ts +27 -2
- package/dist/src/components/blockquote/blockquote.js +1 -1
- package/dist/src/components/blockquote/blockquote.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts +5 -4
- package/dist/src/components/breadcrumb/breadcrumb.js +5 -5
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/button/button.css.js +1 -1
- package/dist/src/components/button/button.css.js.map +1 -1
- package/dist/src/components/button/button.d.ts +87 -96
- package/dist/src/components/button/button.js +20 -33
- package/dist/src/components/button/button.js.map +1 -1
- package/dist/src/components/{alert/alert.css.d.ts → callout/callout.css.d.ts} +9 -9
- package/dist/src/components/callout/callout.css.js +2 -0
- package/dist/src/components/callout/callout.css.js.map +1 -0
- package/dist/src/components/callout/callout.d.ts +56 -0
- package/dist/src/components/callout/callout.js +28 -0
- package/dist/src/components/callout/callout.js.map +1 -0
- package/dist/src/components/caption/caption.js +2 -2
- package/dist/src/components/caption/caption.js.map +1 -1
- package/dist/src/components/card/card-grid.css.js +2 -0
- package/dist/src/components/card/card-grid.css.js.map +1 -0
- package/dist/src/components/card/card-grid.d.ts +63 -0
- package/dist/src/components/card/card-grid.js +10 -0
- package/dist/src/components/card/card-grid.js.map +1 -0
- package/dist/src/components/card/card.css.js +2 -0
- package/dist/src/components/card/card.css.js.map +1 -0
- package/dist/src/components/card/card.d.ts +86 -0
- package/dist/src/components/card/card.js +15 -0
- package/dist/src/components/card/card.js.map +1 -0
- package/dist/src/components/carousel/carousel.css.js +1 -1
- package/dist/src/components/carousel/carousel.css.js.map +1 -1
- package/dist/src/components/carousel/carousel.d.ts +64 -37
- package/dist/src/components/carousel/carousel.js +24 -32
- package/dist/src/components/carousel/carousel.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +15 -1
- package/dist/src/components/checkbox/checkbox.js +6 -5
- package/dist/src/components/checkbox/checkbox.js.map +1 -1
- package/dist/src/components/code/code.css.d.ts +15 -0
- package/dist/src/components/code/code.css.js +1 -1
- package/dist/src/components/code/code.css.js.map +1 -1
- package/dist/src/components/code/code.d.ts +100 -4
- package/dist/src/components/code/code.js +17 -3
- package/dist/src/components/code/code.js.map +1 -1
- package/dist/src/components/code/prism-page.d.ts +2 -0
- package/dist/src/components/code/prism-page.js +2 -0
- package/dist/src/components/code/prism-page.js.map +1 -0
- package/dist/src/components/code/prism.d.ts +10 -0
- package/dist/src/components/code/prism.js +2 -0
- package/dist/src/components/code/prism.js.map +1 -0
- package/dist/src/components/comparison-panel/comparison-panel.css.js +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.css.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.d.ts +36 -15
- package/dist/src/components/comparison-panel/comparison-panel.js +25 -46
- package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.d.ts +25 -0
- package/dist/src/components/compatibility-table/compatibility-table.css.js +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.d.ts +66 -42
- package/dist/src/components/compatibility-table/compatibility-table.js +5 -64
- package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.d.ts +17 -8
- package/dist/src/components/cta-banner/cta-banner.js +8 -28
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/dialog/dialog.css.js +2 -0
- package/dist/src/components/dialog/dialog.css.js.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +76 -0
- package/dist/src/components/dialog/dialog.js +32 -0
- package/dist/src/components/dialog/dialog.js.map +1 -0
- package/dist/src/components/display/display.css.js +1 -1
- package/dist/src/components/display/display.css.js.map +1 -1
- package/dist/src/components/display/display.d.ts +30 -6
- package/dist/src/components/display/display.js +7 -5
- package/dist/src/components/display/display.js.map +1 -1
- package/dist/src/components/divider/divider.css.d.ts +2 -2
- package/dist/src/components/divider/divider.css.js +1 -1
- package/dist/src/components/divider/divider.css.js.map +1 -1
- package/dist/src/components/divider/divider.d.ts +36 -0
- package/dist/src/components/divider/divider.js +21 -0
- package/dist/src/components/divider/divider.js.map +1 -0
- package/dist/src/components/fact/fact.css.d.ts +1 -0
- package/dist/src/components/fact/fact.css.js +2 -0
- package/dist/src/components/fact/fact.css.js.map +1 -0
- package/dist/src/components/fact/fact.d.ts +37 -0
- package/dist/src/components/fact/fact.js +2 -0
- package/dist/src/components/fact/fact.js.map +1 -0
- package/dist/src/components/feature-columns/feature-columns.css.d.ts +2 -0
- package/dist/src/components/feature-columns/feature-columns.css.js +2 -0
- package/dist/src/components/feature-columns/feature-columns.css.js.map +1 -0
- package/dist/src/components/feature-columns/feature-columns.d.ts +61 -0
- package/dist/src/components/feature-columns/feature-columns.js +11 -0
- package/dist/src/components/feature-columns/feature-columns.js.map +1 -0
- package/dist/src/components/features-tab/features-tab.css.js +1 -1
- package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.d.ts +21 -6
- package/dist/src/components/features-tab/features-tab.js +9 -21
- package/dist/src/components/features-tab/features-tab.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.d.ts +16 -1
- package/dist/src/components/fieldset/fieldset.js +3 -3
- package/dist/src/components/fieldset/fieldset.js.map +1 -1
- package/dist/src/components/footer/footer-group.css.js +2 -0
- package/dist/src/components/footer/footer-group.css.js.map +1 -0
- package/dist/src/components/footer/footer-group.d.ts +28 -0
- package/dist/src/components/footer/footer-group.js +5 -0
- package/dist/src/components/footer/footer-group.js.map +1 -0
- package/dist/src/components/footer/footer-locale.js +1 -1
- package/dist/src/components/footer/footer-locale.js.map +1 -1
- package/dist/src/components/footer/footer-nav.css.js +2 -0
- package/dist/src/components/footer/footer-nav.css.js.map +1 -0
- package/dist/src/components/footer/{footer-nav-menu.d.ts → footer-nav.d.ts} +2 -1
- package/dist/src/components/footer/footer-nav.js +6 -0
- package/dist/src/components/footer/footer-nav.js.map +1 -0
- package/dist/src/components/footer/footer.css.js +1 -1
- package/dist/src/components/footer/footer.css.js.map +1 -1
- package/dist/src/components/footer/footer.d.ts +38 -10
- package/dist/src/components/footer/footer.js +71 -93
- package/dist/src/components/footer/footer.js.map +1 -1
- package/dist/src/components/grid/grid.js +7 -7
- package/dist/src/components/h/h.css.js +2 -0
- package/dist/src/components/h/h.css.js.map +1 -0
- package/dist/src/components/{heading/heading.d.ts → h/h.d.ts} +14 -0
- package/dist/src/components/h/h.js +7 -0
- package/dist/src/components/h/h.js.map +1 -0
- package/dist/src/components/hero/hero.css.js +1 -1
- package/dist/src/components/hero/hero.css.js.map +1 -1
- package/dist/src/components/hero/hero.d.ts +42 -24
- package/dist/src/components/hero/hero.js +15 -19
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/highlight/highlight.css.js +1 -1
- package/dist/src/components/highlight/highlight.css.js.map +1 -1
- package/dist/src/components/highlight/highlight.d.ts +21 -12
- package/dist/src/components/highlight/highlight.js +1 -4
- package/dist/src/components/highlight/highlight.js.map +1 -1
- package/dist/src/components/hint/hint.css.d.ts +3 -0
- package/dist/src/components/{help-text/help-text.css.js → hint/hint.css.js} +2 -2
- package/dist/src/components/hint/hint.css.js.map +1 -0
- package/dist/src/components/hint/hint.d.ts +33 -0
- package/dist/src/components/hint/hint.js +4 -0
- package/dist/src/components/hint/hint.js.map +1 -0
- package/dist/src/components/icons/analysis.d.ts +1 -0
- package/dist/src/components/icons/analysis.js +6 -0
- package/dist/src/components/icons/analysis.js.map +1 -0
- package/dist/src/components/icons/arrow-down.d.ts +1 -0
- package/dist/src/components/icons/arrow-down.js +6 -0
- package/dist/src/components/icons/arrow-down.js.map +1 -0
- package/dist/src/components/icons/arrow-right.d.ts +1 -0
- package/dist/src/components/icons/arrow-right.js +6 -0
- package/dist/src/components/icons/arrow-right.js.map +1 -0
- package/dist/src/components/icons/arrow-up.d.ts +1 -0
- package/dist/src/components/icons/arrow-up.js +6 -0
- package/dist/src/components/icons/arrow-up.js.map +1 -0
- package/dist/src/components/icons/arrow.d.ts +1 -0
- package/dist/src/components/icons/arrow.js +6 -0
- package/dist/src/components/icons/arrow.js.map +1 -0
- package/dist/src/components/icons/brand-signature.d.ts +1 -0
- package/dist/src/components/icons/brand-signature.js +6 -0
- package/dist/src/components/icons/brand-signature.js.map +1 -0
- package/dist/src/components/icons/check.d.ts +1 -0
- package/dist/src/components/icons/check.js +6 -0
- package/dist/src/components/icons/check.js.map +1 -0
- package/dist/src/components/icons/circle-info.d.ts +1 -0
- package/dist/src/components/icons/circle-info.js +8 -0
- package/dist/src/components/icons/circle-info.js.map +1 -0
- package/dist/src/components/icons/clipboard.d.ts +1 -0
- package/dist/src/components/icons/clipboard.js +7 -0
- package/dist/src/components/icons/clipboard.js.map +1 -0
- package/dist/src/components/icons/close.d.ts +1 -0
- package/dist/src/components/icons/close.js +6 -0
- package/dist/src/components/icons/close.js.map +1 -0
- package/dist/src/components/icons/enterprise.d.ts +1 -0
- package/dist/src/components/icons/enterprise.js +6 -0
- package/dist/src/components/icons/enterprise.js.map +1 -0
- package/dist/src/components/icons/envelope.d.ts +1 -0
- package/dist/src/components/icons/envelope.js +7 -0
- package/dist/src/components/icons/envelope.js.map +1 -0
- package/dist/src/components/icons/family.d.ts +1 -0
- package/dist/src/components/icons/family.js +8 -0
- package/dist/src/components/icons/family.js.map +1 -0
- package/dist/src/components/icons/globe.d.ts +1 -0
- package/dist/src/components/icons/globe.js +6 -0
- package/dist/src/components/icons/globe.js.map +1 -0
- package/dist/src/components/icons/guide.d.ts +1 -0
- package/dist/src/components/icons/guide.js +6 -0
- package/dist/src/components/icons/guide.js.map +1 -0
- package/dist/src/components/icons/home.d.ts +1 -0
- package/dist/src/components/icons/home.js +6 -0
- package/dist/src/components/icons/home.js.map +1 -0
- package/dist/src/components/icons/icon.d.ts +60 -0
- package/dist/src/components/icons/icon.js +2 -0
- package/dist/src/components/icons/icon.js.map +1 -0
- package/dist/src/components/icons/icons.d.ts +43 -36
- package/dist/src/components/icons/icons.js +1 -1
- package/dist/src/components/icons/individual.d.ts +1 -0
- package/dist/src/components/icons/individual.js +6 -0
- package/dist/src/components/icons/individual.js.map +1 -0
- package/dist/src/components/icons/laurel.d.ts +1 -0
- package/dist/src/components/icons/laurel.js +13 -0
- package/dist/src/components/icons/laurel.js.map +1 -0
- package/dist/src/components/icons/machine-learning.d.ts +1 -0
- package/dist/src/components/icons/machine-learning.js +6 -0
- package/dist/src/components/icons/machine-learning.js.map +1 -0
- package/dist/src/components/icons/mark.d.ts +66 -0
- package/dist/src/components/icons/mark.js +2 -0
- package/dist/src/components/icons/mark.js.map +1 -0
- package/dist/src/components/icons/marks/ai.d.ts +1 -0
- package/dist/src/components/icons/marks/ai.js +6 -0
- package/dist/src/components/icons/marks/ai.js.map +1 -0
- package/dist/src/components/icons/marks/av-comparatives.d.ts +1 -0
- package/dist/src/components/icons/marks/av-comparatives.js +12 -0
- package/dist/src/components/icons/marks/av-comparatives.js.map +1 -0
- package/dist/src/components/icons/marks/best-brands.d.ts +1 -0
- package/dist/src/components/icons/marks/best-brands.js +12 -0
- package/dist/src/components/icons/marks/best-brands.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-2024.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-2024.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-2024.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-business.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-business.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-business.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-readers.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-readers.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-readers.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag.js +11 -0
- package/dist/src/components/icons/marks/pc-mag.js.map +1 -0
- package/dist/src/components/icons/marks/top-product.d.ts +1 -0
- package/dist/src/components/icons/marks/top-product.js +11 -0
- package/dist/src/components/icons/marks/top-product.js.map +1 -0
- package/dist/src/components/icons/marks.d.ts +29 -28
- package/dist/src/components/icons/marks.js +1 -1
- package/dist/src/components/icons/minus.d.ts +1 -0
- package/dist/src/components/icons/minus.js +6 -0
- package/dist/src/components/icons/minus.js.map +1 -0
- package/dist/src/components/icons/pause.d.ts +1 -0
- package/dist/src/components/icons/pause.js +7 -0
- package/dist/src/components/icons/pause.js.map +1 -0
- package/dist/src/components/icons/play.d.ts +1 -0
- package/dist/src/components/icons/play.js +6 -0
- package/dist/src/components/icons/play.js.map +1 -0
- package/dist/src/components/icons/plus.d.ts +1 -0
- package/dist/src/components/icons/plus.js +6 -0
- package/dist/src/components/icons/plus.js.map +1 -0
- package/dist/src/components/icons/quote.d.ts +1 -0
- package/dist/src/components/icons/quote.js +6 -0
- package/dist/src/components/icons/quote.js.map +1 -0
- package/dist/src/components/icons/registry.d.ts +122 -0
- package/dist/src/components/icons/registry.js +4 -0
- package/dist/src/components/icons/registry.js.map +1 -0
- package/dist/src/components/icons/small-business.d.ts +1 -0
- package/dist/src/components/icons/small-business.js +6 -0
- package/dist/src/components/icons/small-business.js.map +1 -0
- package/dist/src/components/{image/image.css.js → img/img.css.js} +1 -1
- package/dist/src/components/img/img.css.js.map +1 -0
- package/dist/src/components/{image/image.d.ts → img/img.d.ts} +2 -2
- package/dist/src/components/img/img.js +17 -0
- package/dist/src/components/img/img.js.map +1 -0
- package/dist/src/components/input/input.css.d.ts +7 -5
- package/dist/src/components/input/input.css.js +1 -1
- package/dist/src/components/input/input.css.js.map +1 -1
- package/dist/src/components/input/input.d.ts +34 -12
- package/dist/src/components/input/input.js +30 -29
- package/dist/src/components/input/input.js.map +1 -1
- package/dist/src/components/install-options/install-option.css.js +2 -0
- package/dist/src/components/install-options/install-option.css.js.map +1 -0
- package/dist/src/components/install-options/install-option.d.ts +57 -0
- package/dist/src/components/install-options/install-option.js +29 -0
- package/dist/src/components/install-options/install-option.js.map +1 -0
- package/dist/src/components/install-options/install-options.css.js +1 -1
- package/dist/src/components/install-options/install-options.css.js.map +1 -1
- package/dist/src/components/install-options/install-options.d.ts +42 -31
- package/dist/src/components/install-options/install-options.js +42 -85
- package/dist/src/components/install-options/install-options.js.map +1 -1
- package/dist/src/components/key-takeaways/key-takeaways.css.d.ts +9 -0
- package/dist/src/components/key-takeaways/key-takeaways.css.js +2 -0
- package/dist/src/components/key-takeaways/key-takeaways.css.js.map +1 -0
- package/dist/src/components/key-takeaways/key-takeaways.d.ts +35 -0
- package/dist/src/components/key-takeaways/key-takeaways.js +10 -0
- package/dist/src/components/key-takeaways/key-takeaways.js.map +1 -0
- package/dist/src/components/label/label.js +3 -3
- package/dist/src/components/label/label.js.map +1 -1
- package/dist/src/components/link/link.css.js +1 -1
- package/dist/src/components/link/link.css.js.map +1 -1
- package/dist/src/components/link/link.d.ts +25 -16
- package/dist/src/components/link/link.js +3 -3
- package/dist/src/components/link/link.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.css.js +1 -1
- 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 +9 -7
- package/dist/src/components/list/list-item/list-item.js +3 -3
- package/dist/src/components/list/list-item/list-item.js.map +1 -1
- package/dist/src/components/list/list.d.ts +3 -2
- package/dist/src/components/list/list.js +2 -2
- package/dist/src/components/list/list.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.d.ts +2 -2
- package/dist/src/components/logo-marquee/logo-marquee.js +6 -8
- package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
- package/dist/src/components/meta/meta.css.d.ts +8 -0
- package/dist/src/components/meta/meta.css.js +2 -0
- package/dist/src/components/meta/meta.css.js.map +1 -0
- package/dist/src/components/meta/meta.d.ts +37 -0
- package/dist/src/components/meta/meta.js +2 -0
- package/dist/src/components/meta/meta.js.map +1 -0
- package/dist/src/components/motion-art/motion-art.d.ts +39 -2
- package/dist/src/components/motion-art/motion-art.js +1 -1
- package/dist/src/components/motion-art/motion-art.js.map +1 -1
- package/dist/src/components/newsletter-signup/newsletter-signup.css.js +2 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.css.js.map +1 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.d.ts +97 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.js +37 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.js.map +1 -0
- package/dist/src/components/overview/overview.css.js +1 -1
- package/dist/src/components/overview/overview.css.js.map +1 -1
- package/dist/src/components/overview/overview.d.ts +23 -12
- package/dist/src/components/overview/overview.js +9 -24
- package/dist/src/components/overview/overview.js.map +1 -1
- package/dist/src/components/p/p.css.js +2 -0
- package/dist/src/components/p/p.css.js.map +1 -0
- package/dist/src/components/{paragraph/paragraph.d.ts → p/p.d.ts} +3 -5
- package/dist/src/components/p/p.js +6 -0
- package/dist/src/components/p/p.js.map +1 -0
- package/dist/src/components/page-switcher/page-switcher.css.js +1 -1
- package/dist/src/components/page-switcher/page-switcher.css.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.d.ts +28 -28
- package/dist/src/components/page-switcher/page-switcher.js +5 -13
- package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.d.ts +4 -2
- package/dist/src/components/pagination-dots/pagination-dots.js +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.d.ts +44 -21
- package/dist/src/components/partner-banner/partner-banner.js +11 -11
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/paste-button/paste-button.css.d.ts +10 -0
- package/dist/src/components/paste-button/paste-button.css.js +2 -0
- package/dist/src/components/paste-button/paste-button.css.js.map +1 -0
- package/dist/src/components/paste-button/paste-button.d.ts +68 -0
- package/dist/src/components/paste-button/paste-button.js +17 -0
- package/dist/src/components/paste-button/paste-button.js.map +1 -0
- package/dist/src/components/picture/picture.js +3 -3
- package/dist/src/components/picture/picture.js.map +1 -1
- package/dist/src/components/post-card/post-card.css.js +1 -1
- package/dist/src/components/post-card/post-card.css.js.map +1 -1
- package/dist/src/components/post-card/post-card.d.ts +65 -24
- package/dist/src/components/post-card/post-card.js +13 -9
- package/dist/src/components/post-card/post-card.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-card.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-card.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-card.d.ts +80 -0
- package/dist/src/components/pricing-card/pricing-card.js +16 -0
- package/dist/src/components/pricing-card/pricing-card.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature-group.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-feature-group.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature-group.d.ts +50 -0
- package/dist/src/components/pricing-card/pricing-feature-group.js +7 -0
- package/dist/src/components/pricing-card/pricing-feature-group.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-feature.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature.d.ts +64 -0
- package/dist/src/components/pricing-card/pricing-feature.js +19 -0
- package/dist/src/components/pricing-card/pricing-feature.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-group.css.d.ts +3 -0
- package/dist/src/components/pricing-card/pricing-group.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-group.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-group.d.ts +48 -0
- package/dist/src/components/pricing-card/pricing-group.js +6 -0
- package/dist/src/components/pricing-card/pricing-group.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-price.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-price.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-price.d.ts +56 -0
- package/dist/src/components/pricing-card/pricing-price.js +11 -0
- package/dist/src/components/pricing-card/pricing-price.js.map +1 -0
- package/dist/src/components/process-steps/process-step.css.js +2 -0
- package/dist/src/components/process-steps/process-step.css.js.map +1 -0
- package/dist/src/components/process-steps/process-step.d.ts +31 -0
- package/dist/src/components/process-steps/process-step.js +6 -0
- package/dist/src/components/process-steps/process-step.js.map +1 -0
- package/dist/src/components/process-steps/process-steps.css.js +1 -1
- package/dist/src/components/process-steps/process-steps.css.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.d.ts +36 -19
- package/dist/src/components/process-steps/process-steps.js +5 -26
- package/dist/src/components/process-steps/process-steps.js.map +1 -1
- package/dist/src/components/product-hero/product-hero.css.js +2 -0
- package/dist/src/components/product-hero/product-hero.css.js.map +1 -0
- package/dist/src/components/product-hero/product-hero.d.ts +71 -0
- package/dist/src/components/product-hero/product-hero.js +123 -0
- package/dist/src/components/product-hero/product-hero.js.map +1 -0
- package/dist/src/components/product-upsell/product-upsell.css.js +2 -0
- package/dist/src/components/product-upsell/product-upsell.css.js.map +1 -0
- package/dist/src/components/product-upsell/product-upsell.d.ts +49 -0
- package/dist/src/components/product-upsell/product-upsell.js +14 -0
- package/dist/src/components/product-upsell/product-upsell.js.map +1 -0
- package/dist/src/components/progress-bar/progress-bar.css.d.ts +3 -0
- package/dist/src/components/progress-bar/progress-bar.css.js +2 -0
- package/dist/src/components/progress-bar/progress-bar.css.js.map +1 -0
- package/dist/src/components/progress-bar/progress-bar.d.ts +27 -0
- package/dist/src/components/progress-bar/progress-bar.js +15 -0
- package/dist/src/components/progress-bar/progress-bar.js.map +1 -0
- package/dist/src/components/quick-answer/quick-answer.css.js +1 -1
- package/dist/src/components/quick-answer/quick-answer.css.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.d.ts +25 -12
- package/dist/src/components/quick-answer/quick-answer.js +13 -29
- package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
- package/dist/src/components/radio/radio-group.css.js +1 -1
- package/dist/src/components/radio/radio-group.css.js.map +1 -1
- package/dist/src/components/radio/radio-group.d.ts +9 -5
- package/dist/src/components/radio/radio-group.js +5 -5
- package/dist/src/components/radio/radio-group.js.map +1 -1
- package/dist/src/components/radio/radio.css.d.ts +2 -1
- package/dist/src/components/radio/radio.css.js.map +1 -1
- package/dist/src/components/radio/radio.d.ts +8 -2
- package/dist/src/components/radio/radio.js +6 -5
- package/dist/src/components/radio/radio.js.map +1 -1
- package/dist/src/components/related-articles/related-articles.css.js +2 -0
- package/dist/src/components/related-articles/related-articles.css.js.map +1 -0
- package/dist/src/components/related-articles/related-articles.d.ts +52 -0
- package/dist/src/components/related-articles/related-articles.js +9 -0
- package/dist/src/components/related-articles/related-articles.js.map +1 -0
- package/dist/src/components/report-promo/report-promo.css.js +2 -0
- package/dist/src/components/report-promo/report-promo.css.js.map +1 -0
- package/dist/src/components/report-promo/report-promo.d.ts +70 -0
- package/dist/src/components/report-promo/report-promo.js +19 -0
- package/dist/src/components/report-promo/report-promo.js.map +1 -0
- package/dist/src/components/review/review-grid.css.js +1 -1
- package/dist/src/components/review/review-grid.css.js.map +1 -1
- package/dist/src/components/review/review-grid.d.ts +27 -6
- package/dist/src/components/review/review-grid.js +7 -7
- package/dist/src/components/review/review-grid.js.map +1 -1
- package/dist/src/components/review/review.css.js +1 -1
- package/dist/src/components/review/review.css.js.map +1 -1
- package/dist/src/components/review/review.d.ts +24 -17
- package/dist/src/components/review/review.js +7 -11
- package/dist/src/components/review/review.js.map +1 -1
- package/dist/src/components/section/section.css.js +1 -1
- package/dist/src/components/section/section.css.js.map +1 -1
- package/dist/src/components/section/section.d.ts +8 -6
- package/dist/src/components/section/section.js +1 -1
- package/dist/src/components/section/section.js.map +1 -1
- package/dist/src/components/section-header/section-header.css.js +1 -1
- package/dist/src/components/section-header/section-header.css.js.map +1 -1
- package/dist/src/components/section-header/section-header.d.ts +22 -23
- package/dist/src/components/section-header/section-header.js +6 -8
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/dist/src/components/select/select-option.d.ts +29 -0
- package/dist/src/components/select/select-option.js +2 -0
- package/dist/src/components/select/select-option.js.map +1 -0
- package/dist/src/components/{dropdown/dropdown.css.js → select/select.css.js} +1 -1
- package/dist/src/components/select/select.css.js.map +1 -0
- package/dist/src/components/select/select.d.ts +78 -0
- package/dist/src/components/select/select.js +35 -0
- package/dist/src/components/select/select.js.map +1 -0
- package/dist/src/components/shared/adopt-styles.d.ts +53 -0
- package/dist/src/components/shared/adopt-styles.js +2 -0
- package/dist/src/components/shared/adopt-styles.js.map +1 -0
- package/dist/src/components/shared/controller.slot.d.ts +65 -0
- package/dist/src/components/shared/controller.slot.js +2 -0
- package/dist/src/components/shared/controller.slot.js.map +1 -0
- package/dist/src/components/shared/events.d.ts +19 -23
- package/dist/src/components/shared/fill-width.css.js.map +1 -1
- package/dist/src/components/shared/flat-text.d.ts +15 -0
- package/dist/src/components/shared/flat-text.js +2 -0
- package/dist/src/components/shared/flat-text.js.map +1 -0
- package/dist/src/components/shared/form-control.d.ts +27 -3
- package/dist/src/components/shared/form-control.js +11 -1
- package/dist/src/components/shared/form-control.js.map +1 -1
- package/dist/src/components/shared/form-field.css.d.ts +5 -5
- package/dist/src/components/shared/form-field.css.js +1 -1
- package/dist/src/components/shared/form-field.css.js.map +1 -1
- package/dist/src/components/shared/hold.d.ts +14 -0
- package/dist/src/components/shared/hold.js +2 -0
- package/dist/src/components/shared/hold.js.map +1 -0
- package/dist/src/components/shared/prop-vocabulary.d.ts +81 -20
- package/dist/src/components/shared/prop-vocabulary.js +1 -1
- package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
- package/dist/src/components/shared/tablist.d.ts +31 -0
- package/dist/src/components/shared/tablist.js +2 -0
- package/dist/src/components/shared/tablist.js.map +1 -0
- package/dist/src/components/shared/token-scales.d.ts +30 -4
- package/dist/src/components/shared/token-scales.js +1 -1
- package/dist/src/components/shared/token-scales.js.map +1 -1
- package/dist/src/components/spinner/spinner.css.js.map +1 -1
- package/dist/src/components/spinner/spinner.js +2 -2
- package/dist/src/components/spinner/spinner.js.map +1 -1
- package/dist/src/components/spotlight/spotlight.css.js +2 -0
- package/dist/src/components/spotlight/spotlight.css.js.map +1 -0
- package/dist/src/components/spotlight/spotlight.d.ts +31 -0
- package/dist/src/components/spotlight/spotlight.js +18 -0
- package/dist/src/components/spotlight/spotlight.js.map +1 -0
- package/dist/src/components/stat/stat-highlight.d.ts +1 -1
- package/dist/src/components/stat/stat.css.d.ts +1 -1
- package/dist/src/components/stat/stat.css.js +1 -1
- package/dist/src/components/stat/stat.css.js.map +1 -1
- package/dist/src/components/stat/stat.d.ts +41 -1
- package/dist/src/components/stat/stat.js +12 -1
- package/dist/src/components/stat/stat.js.map +1 -0
- package/dist/src/components/switch/switch.css.js +1 -1
- package/dist/src/components/switch/switch.css.js.map +1 -1
- package/dist/src/components/switch/switch.d.ts +10 -2
- package/dist/src/components/switch/switch.js +5 -4
- package/dist/src/components/switch/switch.js.map +1 -1
- package/dist/src/components/tab-group/tab-group.css.js +2 -0
- package/dist/src/components/tab-group/tab-group.css.js.map +1 -0
- package/dist/src/components/tab-group/tab-group.d.ts +172 -0
- package/dist/src/components/tab-group/tab-group.js +16 -0
- package/dist/src/components/tab-group/tab-group.js.map +1 -0
- package/dist/src/components/tab-group/tab-panel.d.ts +30 -0
- package/dist/src/components/tab-group/tab-panel.js +2 -0
- package/dist/src/components/tab-group/tab-panel.js.map +1 -0
- package/dist/src/components/tab-group/tab.css.js +2 -0
- package/dist/src/components/tab-group/tab.css.js.map +1 -0
- package/dist/src/components/tab-group/tab.d.ts +53 -0
- package/dist/src/components/tab-group/tab.js +2 -0
- package/dist/src/components/tab-group/tab.js.map +1 -0
- package/dist/src/components/table-of-contents/reading-line.d.ts +24 -0
- package/dist/src/components/table-of-contents/reading-line.js +2 -0
- package/dist/src/components/table-of-contents/reading-line.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.d.ts +7 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.d.ts +40 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.d.ts +10 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +116 -0
- package/dist/src/components/table-of-contents/table-of-contents.js +24 -0
- package/dist/src/components/table-of-contents/table-of-contents.js.map +1 -0
- package/dist/src/components/tag/tag.css.js +1 -1
- package/dist/src/components/tag/tag.css.js.map +1 -1
- package/dist/src/components/tag/tag.d.ts +31 -4
- package/dist/src/components/tag/tag.js +1 -3
- package/dist/src/components/tag/tag.js.map +1 -1
- package/dist/src/components/terminal/terminal-cursor.d.ts +2 -3
- package/dist/src/components/terminal/terminal-cursor.js +1 -1
- package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
- package/dist/src/components/terminal/terminal-line.css.d.ts +2 -0
- package/dist/src/components/terminal/terminal-line.css.js +2 -0
- package/dist/src/components/terminal/terminal-line.css.js.map +1 -0
- package/dist/src/components/terminal/terminal-line.d.ts +42 -0
- package/dist/src/components/terminal/terminal-line.js +8 -0
- package/dist/src/components/terminal/terminal-line.js.map +1 -0
- package/dist/src/components/terminal/terminal.css.d.ts +2 -0
- package/dist/src/components/terminal/terminal.css.js +2 -0
- package/dist/src/components/terminal/terminal.css.js.map +1 -0
- package/dist/src/components/terminal/terminal.d.ts +52 -0
- package/dist/src/components/terminal/terminal.js +19 -0
- package/dist/src/components/terminal/terminal.js.map +1 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.d.ts +2 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.js +2 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.js.map +1 -0
- package/dist/src/components/terminal-hero/terminal-hero.d.ts +62 -0
- package/dist/src/components/terminal-hero/terminal-hero.js +48 -0
- package/dist/src/components/terminal-hero/terminal-hero.js.map +1 -0
- package/dist/src/components/terms/terms.css.d.ts +2 -0
- package/dist/src/components/terms/terms.css.js +2 -0
- package/dist/src/components/terms/terms.css.js.map +1 -0
- package/dist/src/components/terms/terms.d.ts +42 -0
- package/dist/src/components/terms/terms.js +9 -0
- package/dist/src/components/terms/terms.js.map +1 -0
- package/dist/src/components/textarea/textarea.css.d.ts +2 -2
- package/dist/src/components/textarea/textarea.css.js.map +1 -1
- package/dist/src/components/textarea/textarea.d.ts +15 -6
- package/dist/src/components/textarea/textarea.js +13 -17
- package/dist/src/components/textarea/textarea.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +25 -4
- package/dist/src/components/tooltip/tooltip.js +5 -8
- package/dist/src/components/tooltip/tooltip.js.map +1 -1
- package/dist/src/components/trust-panel/trust-card.css.d.ts +2 -0
- package/dist/src/components/trust-panel/trust-card.css.js +2 -0
- package/dist/src/components/trust-panel/trust-card.css.js.map +1 -0
- package/dist/src/components/trust-panel/trust-card.d.ts +31 -0
- package/dist/src/components/trust-panel/trust-card.js +10 -0
- package/dist/src/components/trust-panel/trust-card.js.map +1 -0
- package/dist/src/components/trust-panel/trust-panel.css.js +1 -1
- package/dist/src/components/trust-panel/trust-panel.css.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.d.ts +28 -25
- package/dist/src/components/trust-panel/trust-panel.js +10 -57
- package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
- package/dist/src/components/video/video.js +1 -1
- package/dist/src/components/video/video.js.map +1 -1
- package/dist/src/components/video-player/video-player.d.ts +25 -3
- package/dist/src/components/video-player/video-player.js +7 -7
- package/dist/src/components/video-player/video-player.js.map +1 -1
- package/dist/src/loader/create-loader.d.ts +13 -2
- package/dist/src/loader/create-loader.js +1 -1
- package/dist/src/loader/create-loader.js.map +1 -1
- package/dist/src/loader/loader.d.ts +7 -4
- package/dist/src/loader/loader.js.map +1 -1
- package/dist/src/loader/registry.js +1 -1
- package/dist/src/loader/registry.js.map +1 -1
- package/dist/src/tokens/fonts.css +1 -1
- package/dist/src/tokens/layout.css +1 -1
- package/dist/src/tokens/scheme-layer.d.ts +55 -0
- package/dist/src/tokens/scheme-layer.js +5 -0
- package/dist/src/tokens/scheme-layer.js.map +1 -0
- package/dist/src/tokens/themes/dark.d.ts +64 -0
- package/dist/src/tokens/themes/dark.js +2 -0
- package/dist/src/tokens/themes/dark.js.map +1 -0
- package/dist/src/tokens/tokens.css +1 -1
- package/dist/src/tokens/tokens.d.ts +4 -25
- package/dist/src/tokens/tokens.js +1 -1
- package/dist/src/tokens/tokens.js.map +1 -1
- package/dist/src/vendor/prism/LICENSE +21 -0
- package/dist/src/vendor/prism/README.md +65 -0
- package/dist/src/vendor/prism/prism.d.ts +7 -0
- package/dist/src/vendor/prism/prism.js +13 -0
- package/package.json +163 -105
- package/schemas/README.md +55 -1
- package/schemas/component-manifest.json +4546 -3215
- package/schemas/figma-component-map.json +3247 -0
- package/schemas/manifest-omissions.json +1 -26
- package/schemas/page-schema.json +28 -1
- package/dist/src/components/accordion/accordion-bg.css.js +0 -2
- package/dist/src/components/accordion/accordion-bg.css.js.map +0 -1
- package/dist/src/components/accordion/accordion-bg.d.ts +0 -52
- package/dist/src/components/accordion/accordion-bg.js +0 -76
- package/dist/src/components/accordion/accordion-bg.js.map +0 -1
- package/dist/src/components/alert/alert.css.js +0 -2
- package/dist/src/components/alert/alert.css.js.map +0 -1
- package/dist/src/components/alert/alert.d.ts +0 -55
- package/dist/src/components/alert/alert.js +0 -28
- package/dist/src/components/alert/alert.js.map +0 -1
- package/dist/src/components/anchor/anchor-nav.css.js +0 -2
- package/dist/src/components/anchor/anchor-nav.css.js.map +0 -1
- package/dist/src/components/anchor/anchor-nav.js +0 -67
- package/dist/src/components/anchor/anchor-nav.js.map +0 -1
- package/dist/src/components/awards/awards-flex.css.d.ts +0 -1
- package/dist/src/components/awards/awards-flex.css.js +0 -2
- package/dist/src/components/awards/awards-flex.css.js.map +0 -1
- package/dist/src/components/awards/awards-flex.d.ts +0 -65
- package/dist/src/components/awards/awards-flex.js +0 -68
- package/dist/src/components/awards/awards-flex.js.map +0 -1
- package/dist/src/components/awards/awards-spotlight.css.d.ts +0 -1
- package/dist/src/components/awards/awards-spotlight.css.js +0 -2
- package/dist/src/components/awards/awards-spotlight.css.js.map +0 -1
- package/dist/src/components/awards/awards-spotlight.d.ts +0 -60
- package/dist/src/components/awards/awards-spotlight.js +0 -51
- package/dist/src/components/awards/awards-spotlight.js.map +0 -1
- package/dist/src/components/card-features/card-features.css.js +0 -2
- package/dist/src/components/card-features/card-features.css.js.map +0 -1
- package/dist/src/components/card-features/card-features.d.ts +0 -43
- package/dist/src/components/card-features/card-features.js +0 -37
- package/dist/src/components/card-features/card-features.js.map +0 -1
- package/dist/src/components/cards/card.css.js +0 -2
- package/dist/src/components/cards/card.css.js.map +0 -1
- package/dist/src/components/cards/card.d.ts +0 -61
- package/dist/src/components/cards/card.js +0 -54
- package/dist/src/components/cards/card.js.map +0 -1
- package/dist/src/components/compare/compare.css.js +0 -2
- package/dist/src/components/compare/compare.css.js.map +0 -1
- package/dist/src/components/compare/compare.d.ts +0 -79
- package/dist/src/components/compare/compare.js +0 -122
- package/dist/src/components/compare/compare.js.map +0 -1
- package/dist/src/components/divider/divider-horizontal.d.ts +0 -15
- package/dist/src/components/divider/divider-horizontal.js +0 -11
- package/dist/src/components/divider/divider-horizontal.js.map +0 -1
- package/dist/src/components/divider/divider-vertical.d.ts +0 -16
- package/dist/src/components/divider/divider-vertical.js +0 -12
- package/dist/src/components/divider/divider-vertical.js.map +0 -1
- package/dist/src/components/dropdown/dropdown.css.js.map +0 -1
- package/dist/src/components/dropdown/dropdown.d.ts +0 -49
- package/dist/src/components/dropdown/dropdown.js +0 -36
- package/dist/src/components/dropdown/dropdown.js.map +0 -1
- package/dist/src/components/features/features.css.js +0 -2
- package/dist/src/components/features/features.css.js.map +0 -1
- package/dist/src/components/features/features.d.ts +0 -21
- package/dist/src/components/features/features.js +0 -28
- package/dist/src/components/features/features.js.map +0 -1
- package/dist/src/components/footer/footer-images.d.ts +0 -3
- package/dist/src/components/footer/footer-images.js +0 -9
- package/dist/src/components/footer/footer-images.js.map +0 -1
- package/dist/src/components/footer/footer-links-group.css.js +0 -2
- package/dist/src/components/footer/footer-links-group.css.js.map +0 -1
- package/dist/src/components/footer/footer-links-group.d.ts +0 -13
- package/dist/src/components/footer/footer-links-group.js +0 -5
- package/dist/src/components/footer/footer-links-group.js.map +0 -1
- package/dist/src/components/footer/footer-lp.d.ts +0 -26
- package/dist/src/components/footer/footer-lp.js +0 -45
- package/dist/src/components/footer/footer-lp.js.map +0 -1
- package/dist/src/components/footer/footer-nav-menu.css.js +0 -2
- package/dist/src/components/footer/footer-nav-menu.css.js.map +0 -1
- package/dist/src/components/footer/footer-nav-menu.js +0 -6
- package/dist/src/components/footer/footer-nav-menu.js.map +0 -1
- package/dist/src/components/header/header-code.css.js +0 -2
- package/dist/src/components/header/header-code.css.js.map +0 -1
- package/dist/src/components/header/header-code.d.ts +0 -50
- package/dist/src/components/header/header-code.js +0 -80
- package/dist/src/components/header/header-code.js.map +0 -1
- package/dist/src/components/header/header.css.js +0 -2
- package/dist/src/components/header/header.css.js.map +0 -1
- package/dist/src/components/header/header.d.ts +0 -32
- package/dist/src/components/header/header.js +0 -165
- package/dist/src/components/header/header.js.map +0 -1
- package/dist/src/components/heading/heading.css.js +0 -2
- package/dist/src/components/heading/heading.css.js.map +0 -1
- package/dist/src/components/heading/heading.js +0 -6
- package/dist/src/components/heading/heading.js.map +0 -1
- package/dist/src/components/help-text/help-text.css.d.ts +0 -3
- package/dist/src/components/help-text/help-text.css.js.map +0 -1
- package/dist/src/components/help-text/help-text.d.ts +0 -14
- package/dist/src/components/help-text/help-text.js +0 -4
- package/dist/src/components/help-text/help-text.js.map +0 -1
- package/dist/src/components/icons/analysis-icon.d.ts +0 -11
- package/dist/src/components/icons/analysis-icon.js +0 -6
- package/dist/src/components/icons/analysis-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-down-icon.d.ts +0 -11
- package/dist/src/components/icons/arrow-down-icon.js +0 -6
- package/dist/src/components/icons/arrow-down-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-icon.d.ts +0 -37
- package/dist/src/components/icons/arrow-icon.js +0 -6
- package/dist/src/components/icons/arrow-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-right-icon.d.ts +0 -34
- package/dist/src/components/icons/arrow-right-icon.js +0 -6
- package/dist/src/components/icons/arrow-right-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-up-icon.d.ts +0 -24
- package/dist/src/components/icons/arrow-up-icon.js +0 -6
- package/dist/src/components/icons/arrow-up-icon.js.map +0 -1
- package/dist/src/components/icons/av-comparatives-icon.d.ts +0 -13
- package/dist/src/components/icons/av-comparatives-icon.js +0 -13
- package/dist/src/components/icons/av-comparatives-icon.js.map +0 -1
- package/dist/src/components/icons/bd-ai-icon.d.ts +0 -13
- package/dist/src/components/icons/bd-ai-icon.js +0 -6
- package/dist/src/components/icons/bd-ai-icon.js.map +0 -1
- package/dist/src/components/icons/best-brands-icon.d.ts +0 -13
- package/dist/src/components/icons/best-brands-icon.js +0 -15
- package/dist/src/components/icons/best-brands-icon.js.map +0 -1
- package/dist/src/components/icons/brand-signature-icon.d.ts +0 -37
- package/dist/src/components/icons/brand-signature-icon.js +0 -6
- package/dist/src/components/icons/brand-signature-icon.js.map +0 -1
- package/dist/src/components/icons/check-icon.d.ts +0 -22
- package/dist/src/components/icons/check-icon.js +0 -6
- package/dist/src/components/icons/check-icon.js.map +0 -1
- package/dist/src/components/icons/circle-info-icon.d.ts +0 -26
- package/dist/src/components/icons/circle-info-icon.js +0 -8
- package/dist/src/components/icons/circle-info-icon.js.map +0 -1
- package/dist/src/components/icons/close-icon.d.ts +0 -11
- package/dist/src/components/icons/close-icon.js +0 -6
- package/dist/src/components/icons/close-icon.js.map +0 -1
- package/dist/src/components/icons/enterprise-icon.d.ts +0 -11
- package/dist/src/components/icons/enterprise-icon.js +0 -6
- package/dist/src/components/icons/enterprise-icon.js.map +0 -1
- package/dist/src/components/icons/family-icon.d.ts +0 -11
- package/dist/src/components/icons/family-icon.js +0 -8
- package/dist/src/components/icons/family-icon.js.map +0 -1
- package/dist/src/components/icons/globe-icon.d.ts +0 -11
- package/dist/src/components/icons/globe-icon.js +0 -6
- package/dist/src/components/icons/globe-icon.js.map +0 -1
- package/dist/src/components/icons/guide-icon.d.ts +0 -11
- package/dist/src/components/icons/guide-icon.js +0 -6
- package/dist/src/components/icons/guide-icon.js.map +0 -1
- package/dist/src/components/icons/home-icon.d.ts +0 -11
- package/dist/src/components/icons/home-icon.js +0 -6
- package/dist/src/components/icons/home-icon.js.map +0 -1
- package/dist/src/components/icons/icon-element.d.ts +0 -58
- package/dist/src/components/icons/icon-element.js +0 -2
- package/dist/src/components/icons/icon-element.js.map +0 -1
- package/dist/src/components/icons/individual-icon.d.ts +0 -11
- package/dist/src/components/icons/individual-icon.js +0 -6
- package/dist/src/components/icons/individual-icon.js.map +0 -1
- package/dist/src/components/icons/laurel-icon.d.ts +0 -11
- package/dist/src/components/icons/laurel-icon.js +0 -14
- package/dist/src/components/icons/laurel-icon.js.map +0 -1
- package/dist/src/components/icons/machine-learning-icon.d.ts +0 -11
- package/dist/src/components/icons/machine-learning-icon.js +0 -6
- package/dist/src/components/icons/machine-learning-icon.js.map +0 -1
- package/dist/src/components/icons/minus-icon.d.ts +0 -11
- package/dist/src/components/icons/minus-icon.js +0 -7
- package/dist/src/components/icons/minus-icon.js.map +0 -1
- package/dist/src/components/icons/missing-icon.d.ts +0 -41
- package/dist/src/components/icons/missing-icon.js +0 -8
- package/dist/src/components/icons/missing-icon.js.map +0 -1
- package/dist/src/components/icons/pause-icon.d.ts +0 -11
- package/dist/src/components/icons/pause-icon.js +0 -7
- package/dist/src/components/icons/pause-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-2024-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-2024-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-2024-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-business-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-business-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-business-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-readers-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-readers-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-readers-icon.js.map +0 -1
- package/dist/src/components/icons/play-icon.d.ts +0 -11
- package/dist/src/components/icons/play-icon.js +0 -6
- package/dist/src/components/icons/play-icon.js.map +0 -1
- package/dist/src/components/icons/plus-icon.d.ts +0 -11
- package/dist/src/components/icons/plus-icon.js +0 -6
- package/dist/src/components/icons/plus-icon.js.map +0 -1
- package/dist/src/components/icons/quote-icon.d.ts +0 -20
- package/dist/src/components/icons/quote-icon.js +0 -6
- package/dist/src/components/icons/quote-icon.js.map +0 -1
- package/dist/src/components/icons/small-business-icon.d.ts +0 -11
- package/dist/src/components/icons/small-business-icon.js +0 -6
- package/dist/src/components/icons/small-business-icon.js.map +0 -1
- package/dist/src/components/icons/top-product-icon.d.ts +0 -13
- package/dist/src/components/icons/top-product-icon.js +0 -14
- package/dist/src/components/icons/top-product-icon.js.map +0 -1
- package/dist/src/components/image/image.css.js.map +0 -1
- package/dist/src/components/image/image.js +0 -17
- package/dist/src/components/image/image.js.map +0 -1
- package/dist/src/components/input/input-clipboard.css.d.ts +0 -9
- package/dist/src/components/input/input-clipboard.css.js +0 -2
- package/dist/src/components/input/input-clipboard.css.js.map +0 -1
- package/dist/src/components/input/input-clipboard.d.ts +0 -52
- package/dist/src/components/input/input-clipboard.js +0 -62
- package/dist/src/components/input/input-clipboard.js.map +0 -1
- package/dist/src/components/light-carousel/light-carousel.css.js +0 -2
- package/dist/src/components/light-carousel/light-carousel.css.js.map +0 -1
- package/dist/src/components/light-carousel/light-carousel.d.ts +0 -74
- package/dist/src/components/light-carousel/light-carousel.js +0 -34
- package/dist/src/components/light-carousel/light-carousel.js.map +0 -1
- package/dist/src/components/modal/modal.css.js +0 -2
- package/dist/src/components/modal/modal.css.js.map +0 -1
- package/dist/src/components/modal/modal.d.ts +0 -52
- package/dist/src/components/modal/modal.js +0 -17
- package/dist/src/components/modal/modal.js.map +0 -1
- package/dist/src/components/paragraph/paragraph.css.js +0 -2
- package/dist/src/components/paragraph/paragraph.css.js.map +0 -1
- package/dist/src/components/paragraph/paragraph.js +0 -6
- package/dist/src/components/paragraph/paragraph.js.map +0 -1
- package/dist/src/components/pricing-cards/adopt-styles.d.ts +0 -10
- package/dist/src/components/pricing-cards/adopt-styles.js +0 -2
- package/dist/src/components/pricing-cards/adopt-styles.js.map +0 -1
- package/dist/src/components/pricing-cards/new-pricing-card.d.ts +0 -18
- package/dist/src/components/pricing-cards/new-pricing-card.js +0 -12
- package/dist/src/components/pricing-cards/new-pricing-card.js.map +0 -1
- package/dist/src/components/pricing-cards/new-pricing.css.js +0 -2
- package/dist/src/components/pricing-cards/new-pricing.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.d.ts +0 -19
- package/dist/src/components/pricing-cards/pricing-card-actions.js +0 -25
- package/dist/src/components/pricing-cards/pricing-card-actions.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-container.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-container.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-container.d.ts +0 -14
- package/dist/src/components/pricing-cards/pricing-card-container.js +0 -6
- package/dist/src/components/pricing-cards/pricing-card-container.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-header.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-header.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-header.d.ts +0 -22
- package/dist/src/components/pricing-cards/pricing-card-header.js +0 -18
- package/dist/src/components/pricing-cards/pricing-card-header.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.d.ts +0 -39
- package/dist/src/components/pricing-cards/pricing-card-pricing.js +0 -49
- package/dist/src/components/pricing-cards/pricing-card-pricing.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.d.ts +0 -16
- package/dist/src/components/pricing-cards/pricing-card-show-more.js +0 -12
- package/dist/src/components/pricing-cards/pricing-card-show-more.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card.d.ts +0 -155
- package/dist/src/components/pricing-cards/pricing-card.js +0 -258
- package/dist/src/components/pricing-cards/pricing-card.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.d.ts +0 -13
- package/dist/src/components/pricing-cards/pricing-feature-item.js +0 -5
- package/dist/src/components/pricing-cards/pricing-feature-item.js.map +0 -1
- package/dist/src/components/progress/progress.css.d.ts +0 -3
- package/dist/src/components/progress/progress.css.js +0 -2
- package/dist/src/components/progress/progress.css.js.map +0 -1
- package/dist/src/components/progress/progress.d.ts +0 -19
- package/dist/src/components/progress/progress.js +0 -11
- package/dist/src/components/progress/progress.js.map +0 -1
- package/dist/src/components/radio/toggle-radio.d.ts +0 -28
- package/dist/src/components/radio/toggle-radio.js +0 -15
- package/dist/src/components/radio/toggle-radio.js.map +0 -1
- package/dist/src/components/spotlight-section/spotlight-section.css.js +0 -2
- package/dist/src/components/spotlight-section/spotlight-section.css.js.map +0 -1
- package/dist/src/components/spotlight-section/spotlight-section.d.ts +0 -22
- package/dist/src/components/spotlight-section/spotlight-section.js +0 -46
- package/dist/src/components/spotlight-section/spotlight-section.js.map +0 -1
- package/dist/src/components/stat/stat-tile.d.ts +0 -24
- package/dist/src/components/stat/stat-tile.js +0 -7
- package/dist/src/components/stat/stat-tile.js.map +0 -1
- package/dist/src/components/tab-list/tab-list.css.d.ts +0 -16
- package/dist/src/components/tab-list/tab-list.css.js +0 -2
- package/dist/src/components/tab-list/tab-list.css.js.map +0 -1
- package/dist/src/components/tab-list/tab-list.d.ts +0 -99
- package/dist/src/components/tab-list/tab-list.js +0 -25
- package/dist/src/components/tab-list/tab-list.js.map +0 -1
- package/dist/src/components/tabs/tabs.css.js +0 -2
- package/dist/src/components/tabs/tabs.css.js.map +0 -1
- package/dist/src/components/tabs/tabs.d.ts +0 -69
- package/dist/src/components/tabs/tabs.js +0 -29
- package/dist/src/components/tabs/tabs.js.map +0 -1
- package/dist/src/components/terminal/terminal-message.css.js +0 -2
- package/dist/src/components/terminal/terminal-message.css.js.map +0 -1
- package/dist/src/components/terminal/terminal-message.d.ts +0 -44
- package/dist/src/components/terminal/terminal-message.js +0 -68
- package/dist/src/components/terminal/terminal-message.js.map +0 -1
- package/dist/src/components/termsOfUse/terms.css.js +0 -2
- package/dist/src/components/termsOfUse/terms.css.js.map +0 -1
- package/dist/src/components/termsOfUse/terms.d.ts +0 -22
- package/dist/src/components/termsOfUse/terms.js +0 -78
- package/dist/src/components/termsOfUse/terms.js.map +0 -1
- /package/dist/src/components/{accordion/accordion-bg.css.d.ts → agent-endpoints/agent-endpoints-pills.css.d.ts} +0 -0
- /package/dist/src/components/{anchor → anchor-nav}/anchor-nav.css.d.ts +0 -0
- /package/dist/src/components/{card-features/card-features.css.d.ts → awards/award-marks.css.d.ts} +0 -0
- /package/dist/src/components/{cards/card.css.d.ts → awards/award.css.d.ts} +0 -0
- /package/dist/src/components/{compare/compare.css.d.ts → bar-chart/bar-chart.css.d.ts} +0 -0
- /package/dist/src/components/{features/features.css.d.ts → card/card-grid.css.d.ts} +0 -0
- /package/dist/src/components/{footer/footer-links-group.css.d.ts → card/card.css.d.ts} +0 -0
- /package/dist/src/components/{footer/footer-nav-menu.css.d.ts → dialog/dialog.css.d.ts} +0 -0
- /package/dist/src/components/{header/header-code.css.d.ts → footer/footer-group.css.d.ts} +0 -0
- /package/dist/src/components/{header/header.css.d.ts → footer/footer-nav.css.d.ts} +0 -0
- /package/dist/src/components/{heading/heading.css.d.ts → h/h.css.d.ts} +0 -0
- /package/dist/src/components/{image/image.css.d.ts → img/img.css.d.ts} +0 -0
- /package/dist/src/components/{light-carousel/light-carousel.css.d.ts → install-options/install-option.css.d.ts} +0 -0
- /package/dist/src/components/{modal/modal.css.d.ts → newsletter-signup/newsletter-signup.css.d.ts} +0 -0
- /package/dist/src/components/{paragraph/paragraph.css.d.ts → p/p.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards → pricing-card}/pricing-card.css.d.ts +0 -0
- /package/dist/src/components/{pricing-cards/new-pricing.css.d.ts → pricing-card/pricing-feature-group.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-actions.css.d.ts → pricing-card/pricing-feature.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-container.css.d.ts → pricing-card/pricing-price.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-header.css.d.ts → process-steps/process-step.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-pricing.css.d.ts → product-hero/product-hero.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-show-more.css.d.ts → product-upsell/product-upsell.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-feature-item.css.d.ts → related-articles/related-articles.css.d.ts} +0 -0
- /package/dist/src/components/{spotlight-section/spotlight-section.css.d.ts → report-promo/report-promo.css.d.ts} +0 -0
- /package/dist/src/components/{dropdown/dropdown.css.d.ts → select/select.css.d.ts} +0 -0
- /package/dist/src/components/{tabs/tabs.css.d.ts → spotlight/spotlight.css.d.ts} +0 -0
- /package/dist/src/components/{terminal/terminal-message.css.d.ts → tab-group/tab-group.css.d.ts} +0 -0
- /package/dist/src/components/{termsOfUse/terms.css.d.ts → tab-group/tab.css.d.ts} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../../tokens/tokens.js";
|
|
3
|
+
import { Announcer } from "../shared/announcer.js";
|
|
4
|
+
import "../icons/clipboard.js";
|
|
5
|
+
/** The field a paste button fills: the bd-input whose end slot holds it. */
|
|
6
|
+
interface Field extends HTMLElement {
|
|
7
|
+
value: string;
|
|
8
|
+
updateComplete: Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A button that pastes the clipboard into the field it sits in.
|
|
12
|
+
*
|
|
13
|
+
* <bd-input name="key" spellcheck="false">
|
|
14
|
+
* <span slot="label">Licence key</span>
|
|
15
|
+
* <bd-paste-button slot="end" label="Paste from clipboard"></bd-paste-button>
|
|
16
|
+
* </bd-input>
|
|
17
|
+
*
|
|
18
|
+
* It is 3.x's bd-custom-input-clipboard's button, the field around it now a
|
|
19
|
+
* plain bd-input. Pressed, it reads navigator.clipboard.readText() into the
|
|
20
|
+
* field's value and sends the field's native `input` and `change`, once each,
|
|
21
|
+
* as typing and committing would: a form handler hears a paste as it hears
|
|
22
|
+
* any edit, and reads event.target.value. The value has reached the form
|
|
23
|
+
* before either is sent, so a handler asking the form gets the pasted value.
|
|
24
|
+
*
|
|
25
|
+
* It is disabled with the field -- by the field's own `disabled` or a
|
|
26
|
+
* <fieldset disabled> around it -- and is described by the field's label, so
|
|
27
|
+
* a reader moving through the buttons on a page hears which field each fills.
|
|
28
|
+
* Out of a bd-input it has no field to fill, and is disabled.
|
|
29
|
+
*
|
|
30
|
+
* The button is icon-only, so its name is `label`, and what happened is said
|
|
31
|
+
* through a live region rendered from the start (shared/announcer.ts):
|
|
32
|
+
* `success-label` once the field is filled, `error-label` when the browser
|
|
33
|
+
* refused -- the reader declined the permission, or the page is not allowed
|
|
34
|
+
* it. The three are only ever spoken, never shown, so they are attributes
|
|
35
|
+
* (contract rule 6). They have no defaults: there is no default copy in a
|
|
36
|
+
* component, so the page writes all three in its own language --
|
|
37
|
+
*
|
|
38
|
+
* <bd-paste-button slot="end" label="Paste from clipboard"
|
|
39
|
+
* success-label="Pasted from clipboard" error-label="Could not paste from clipboard">
|
|
40
|
+
*
|
|
41
|
+
* -- which is what the codemod writes for 3.x's clipboard field, whose
|
|
42
|
+
* English that was. One left empty says nothing.
|
|
43
|
+
*/
|
|
44
|
+
export declare class BdPasteButton extends LitElement {
|
|
45
|
+
static styles: import("lit").CSSResult[];
|
|
46
|
+
/** The button's accessible name, and its tooltip; it shows only an icon. */
|
|
47
|
+
label: string;
|
|
48
|
+
/** Announced once the field is filled. */
|
|
49
|
+
successLabel: string;
|
|
50
|
+
/** Announced when the browser refuses the clipboard. */
|
|
51
|
+
errorLabel: string;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
_announcer: Announcer;
|
|
54
|
+
constructor();
|
|
55
|
+
/** The bd-input whose end slot holds it, if that is where it is. */
|
|
56
|
+
get _field(): Field | null;
|
|
57
|
+
get _isDisabled(): boolean;
|
|
58
|
+
get _description(): string;
|
|
59
|
+
/** Reads the clipboard into the field, and says whether it worked. */
|
|
60
|
+
paste(): Promise<void>;
|
|
61
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface HTMLElementTagNameMap {
|
|
65
|
+
"bd-paste-button": BdPasteButton;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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{flatText as n}from"../shared/flat-text.js";import{Announcer as r}from"../shared/announcer.js";import"../icons/clipboard.js";import i from"./paste-button.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends a{static{this.styles=[i]}constructor(){super(),this.label=``,this.successLabel=``,this.errorLabel=``,this.disabled=!1,this._announcer=new r(this)}get _field(){let e=this.parentElement;return e?.localName===`bd-input`?e:null}get _isDisabled(){let e=this._field;return this.disabled||!e||e.matches(`:disabled`)}get _description(){let e=this._field;return e?n(...e.querySelectorAll(`:scope > [slot='label']`)):``}async paste(){let e=this._field;if(!this._isDisabled&&e)try{e.value=await navigator.clipboard.readText(),await e.updateComplete;for(let t of[`input`,`change`])e.dispatchEvent(new Event(t,{bubbles:!0,composed:!0}));this.successLabel&&this._announcer.say(this.successLabel)}catch(e){console.error(`Clipboard paste failed:`,e),this.errorLabel&&this._announcer.say(this.errorLabel)}}render(){let e=this._description;return o`
|
|
2
|
+
<button
|
|
3
|
+
type="button"
|
|
4
|
+
part="button"
|
|
5
|
+
class="paste-button"
|
|
6
|
+
title=${this.label||s}
|
|
7
|
+
aria-label=${this.label||s}
|
|
8
|
+
aria-describedby=${e?`description`:s}
|
|
9
|
+
?disabled=${this._isDisabled}
|
|
10
|
+
@click=${this.paste}
|
|
11
|
+
>
|
|
12
|
+
<bd-icon name="clipboard" size="md"></bd-icon>
|
|
13
|
+
</button>
|
|
14
|
+
<span id="description" hidden>${e}</span>
|
|
15
|
+
<span class="status" role="status">${this._announcer.status}</span>
|
|
16
|
+
`}};t([c({type:String})],l.prototype,`label`,void 0),t([c({type:String,attribute:`success-label`})],l.prototype,`successLabel`,void 0),t([c({type:String,attribute:`error-label`})],l.prototype,`errorLabel`,void 0),t([c({type:Boolean,reflect:!0})],l.prototype,`disabled`,void 0),l=t([e(`bd-paste-button`)],l);export{l as BdPasteButton};
|
|
17
|
+
//# sourceMappingURL=paste-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paste-button.js","names":["pasteButtonCSS","_decorate","__decorate","paste_button_css_default","BdPasteButton","LitElement","Announcer","parent","field","flatText","type","err","description","nothing","property","defineElement"],"sources":["../../../../src/components/paste-button/paste-button.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 pasteButtonCSS from \"./paste-button.css.ts\";\nimport { Announcer } from \"#shared/announcer.ts\";\nimport { flatText } from \"#shared/flat-text.ts\";\nimport \"#components/icons/clipboard.ts\";\n\n/** The field a paste button fills: the bd-input whose end slot holds it. */\ninterface Field extends HTMLElement {\n value : string;\n updateComplete: Promise<boolean>;\n}\n\n/**\n * A button that pastes the clipboard into the field it sits in.\n *\n * <bd-input name=\"key\" spellcheck=\"false\">\n * <span slot=\"label\">Licence key</span>\n * <bd-paste-button slot=\"end\" label=\"Paste from clipboard\"></bd-paste-button>\n * </bd-input>\n *\n * It is 3.x's bd-custom-input-clipboard's button, the field around it now a\n * plain bd-input. Pressed, it reads navigator.clipboard.readText() into the\n * field's value and sends the field's native `input` and `change`, once each,\n * as typing and committing would: a form handler hears a paste as it hears\n * any edit, and reads event.target.value. The value has reached the form\n * before either is sent, so a handler asking the form gets the pasted value.\n *\n * It is disabled with the field -- by the field's own `disabled` or a\n * <fieldset disabled> around it -- and is described by the field's label, so\n * a reader moving through the buttons on a page hears which field each fills.\n * Out of a bd-input it has no field to fill, and is disabled.\n *\n * The button is icon-only, so its name is `label`, and what happened is said\n * through a live region rendered from the start (shared/announcer.ts):\n * `success-label` once the field is filled, `error-label` when the browser\n * refused -- the reader declined the permission, or the page is not allowed\n * it. The three are only ever spoken, never shown, so they are attributes\n * (contract rule 6). They have no defaults: there is no default copy in a\n * component, so the page writes all three in its own language --\n *\n * <bd-paste-button slot=\"end\" label=\"Paste from clipboard\"\n * success-label=\"Pasted from clipboard\" error-label=\"Could not paste from clipboard\">\n *\n * -- which is what the codemod writes for 3.x's clipboard field, whose\n * English that was. One left empty says nothing.\n */\n@defineElement(\"bd-paste-button\")\nexport class BdPasteButton extends LitElement {\n static styles = [pasteButtonCSS];\n\n /** The button's accessible name, and its tooltip; it shows only an icon. */\n @property({ type: String })\n label = \"\";\n /** Announced once the field is filled. */\n @property({ type: String, attribute: \"success-label\" })\n successLabel = \"\";\n /** Announced when the browser refuses the clipboard. */\n @property({ type: String, attribute: \"error-label\" })\n errorLabel = \"\";\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n _announcer: Announcer;\n\n constructor() {\n super();\n this._announcer = new Announcer(this);\n }\n\n /** The bd-input whose end slot holds it, if that is where it is. */\n get _field(): Field | null {\n const parent = this.parentElement;\n return parent?.localName === \"bd-input\" ? parent as Field : null;\n }\n\n /* Disabled with its field. `:disabled` on a form-associated element is\n its own `disabled` or a <fieldset disabled> around it, which is exactly\n the field's state; the field asks this button to render again whenever\n it renders (input.ts). */\n get _isDisabled() {\n const field = this._field;\n return this.disabled || !field || field.matches(\":disabled\");\n }\n\n /* The field's label, as words: the description cannot be a reference,\n because the label is in the page and the button in this shadow root. */\n get _description() {\n const field = this._field;\n return field ? flatText(...field.querySelectorAll(\":scope > [slot='label']\")) : \"\";\n }\n\n /** Reads the clipboard into the field, and says whether it worked. */\n async paste() {\n const field = this._field;\n if (this._isDisabled || !field) return;\n try {\n const text = await navigator.clipboard.readText();\n field.value = text;\n /* The field tells its form what it holds when it renders, and a handler\n of the events below that asks the form has to get the pasted value:\n the field renders first, then hears of it. */\n await field.updateComplete;\n for (const type of [\"input\", \"change\"]) field.dispatchEvent(new Event(type, { bubbles: true, composed: true }));\n if (this.successLabel) this._announcer.say(this.successLabel);\n } catch (err) {\n console.error(\"Clipboard paste failed:\", err);\n if (this.errorLabel) this._announcer.say(this.errorLabel);\n }\n }\n\n render() {\n const description = this._description;\n return html`\n <button\n type=\"button\"\n part=\"button\"\n class=\"paste-button\"\n title=${this.label || nothing}\n aria-label=${this.label || nothing}\n aria-describedby=${description ? \"description\" : nothing}\n ?disabled=${this._isDisabled}\n @click=${this.paste}\n >\n <bd-icon name=\"clipboard\" size=\"md\"></bd-icon>\n </button>\n <span id=\"description\" hidden>${description}</span>\n <span class=\"status\" role=\"status\">${this._announcer.status}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-paste-button\": BdPasteButton;\n }\n}\n"],"mappings":"A,kbAmDO,IAAMI,EAAN,cAA4BC,CAAW,C,OAC5B,KAAA,OAAA,CAACL,CAAc,C,CAgB/B,aAAc,CACZ,MAAM,EAbA,KAAA,MAAA,GAGO,KAAA,aAAA,GAGF,KAAA,WAAA,GAEF,KAAA,SAAA,GAMT,KAAK,WAAa,IAAIM,EAAU,IAAI,CACtC,CAGA,IAAI,QAAuB,CACzB,IAAMC,EAAS,KAAK,cACpB,OAAOA,GAAQ,YAAc,WAAaA,EAAkB,IAC9D,CAMA,IAAI,aAAc,CAChB,IAAMC,EAAQ,KAAK,OACnB,OAAO,KAAK,UAAY,CAACA,GAASA,EAAM,QAAQ,WAAW,CAC7D,CAIA,IAAI,cAAe,CACjB,IAAMA,EAAQ,KAAK,OACnB,OAAOA,EAAQC,EAAS,GAAGD,EAAM,iBAAiB,yBAAyB,CAAC,EAAI,EAClF,CAGA,MAAM,OAAQ,CACZ,IAAMA,EAAQ,KAAK,OACnB,GAAI,MAAK,aAAgBA,EACzB,GAAI,CAEF,EAAM,MAAQ,MADK,UAAU,UAAU,SAAS,EAKhD,MAAMA,EAAM,eACZ,IAAK,IAAME,IAAQ,CAAC,QAAS,QAAQ,EAAGF,EAAM,cAAc,IAAI,MAAME,EAAM,CAAE,QAAS,GAAM,SAAU,EAAK,CAAC,CAAC,EAC1G,KAAK,cAAc,KAAK,WAAW,IAAI,KAAK,YAAY,CAC9D,OAASC,EAAK,CACZ,QAAQ,MAAM,0BAA2BA,CAAG,EACxC,KAAK,YAAY,KAAK,WAAW,IAAI,KAAK,UAAU,CAC1D,CACF,CAEA,QAAS,CACP,IAAMC,EAAc,KAAK,aACzB,MAAO,EAAI;;;;;gBAKC,KAAK,OAASC,EAAQ;qBACjB,KAAK,OAASA,EAAQ;2BAChBD,EAAc,cAAgBC,EAAQ;oBAC7C,KAAK,YAAY;iBACpB,KAAK,MAAM;;;;sCAIUD,EAAY;2CACP,KAAK,WAAW,OAAO;KAEhE,CACF,EA9EGX,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAV,EAAA,UAAA,eAAA,IAAA,EAAA,EAGrDH,EAAA,CAAAa,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,CAAA,EAAAV,EAAA,UAAA,aAAA,IAAA,EAAA,EAEnDH,EAAA,CAAAa,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EAb3C,EAAAH,EAAA,CAAAc,EAAc,iBAAiB,CAAA,EAAAX,CAAA,E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{isOneOf as t}from"../shared/prop-vocabulary.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./picture.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=[`none`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],l=[`cover`,`contain`,`fill`,`none`,`scale-down`],u=class extends i{constructor(...e){super(...e),this.sources=[],this.alt=``,this.fallbackSrc=``,this.width=null,this.height=null,this.loading=`lazy`,this.fetchPriority=``,this.decoding=``,this.fit=`cover`,this.radius=`none`,this.referrerPolicy=``}render(){let e=[`bd-picture`,`fit-${t(l,this.fit)?this.fit:`cover`}`,`radius-${t(c,this.radius)?this.radius:`none`}`].filter(Boolean).join(` `),n=this.fetchPriority===`high`;return a`
|
|
2
2
|
<picture class="${e}">
|
|
3
3
|
${this.sources.map(e=>a`
|
|
4
4
|
<source
|
|
@@ -9,7 +9,7 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
9
9
|
>
|
|
10
10
|
`)}
|
|
11
11
|
<img
|
|
12
|
-
loading="${
|
|
12
|
+
loading="${n?o:this.loading}"
|
|
13
13
|
fetchpriority="${this.fetchPriority||o}"
|
|
14
14
|
decoding="${this.decoding||o}"
|
|
15
15
|
alt="${this.alt}"
|
|
@@ -21,5 +21,5 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
21
21
|
@error="${this._onError}"
|
|
22
22
|
>
|
|
23
23
|
</picture>
|
|
24
|
-
`}firstUpdated(){let e=this.renderRoot?.querySelector(`img`);e?.complete&&e.naturalWidth>0&&this._markLoaded(e)}updated(e){if(!e.has(`fallbackSrc`)&&!e.has(`sources`))return;let t=this.renderRoot?.querySelector(`img`);if(t){if(t.complete&&t.naturalWidth>0)return this._markLoaded(t);t.removeAttribute(`loaded`),this.renderRoot?.querySelector(`picture`)?.removeAttribute(`loaded`)}}_onLoad(e){this._markLoaded(e.currentTarget)}_onError(){}_markLoaded(e){e.setAttribute(`loaded`,``),this.renderRoot?.querySelector(`picture`)?.setAttribute(`loaded`,``)}static{this.styles=[r]}};
|
|
24
|
+
`}firstUpdated(){let e=this.renderRoot?.querySelector(`img`);e?.complete&&e.naturalWidth>0&&this._markLoaded(e)}updated(e){if(!e.has(`fallbackSrc`)&&!e.has(`sources`))return;let t=this.renderRoot?.querySelector(`img`);if(t){if(t.complete&&t.naturalWidth>0)return this._markLoaded(t);t.removeAttribute(`loaded`),this.renderRoot?.querySelector(`picture`)?.removeAttribute(`loaded`)}}_onLoad(e){this._markLoaded(e.currentTarget)}_onError(){}_markLoaded(e){e.setAttribute(`loaded`,``),this.renderRoot?.querySelector(`picture`)?.setAttribute(`loaded`,``)}static{this.styles=[r]}};n([s({type:Array,attribute:`sources`})],u.prototype,`sources`,void 0),n([s({type:String,attribute:`alt`})],u.prototype,`alt`,void 0),n([s({type:String,attribute:`fallback-src`})],u.prototype,`fallbackSrc`,void 0),n([s({type:Number,attribute:`width`})],u.prototype,`width`,void 0),n([s({type:Number,attribute:`height`})],u.prototype,`height`,void 0),n([s({type:String,attribute:`loading`})],u.prototype,`loading`,void 0),n([s({type:String,attribute:`fetchpriority`})],u.prototype,`fetchPriority`,void 0),n([s({type:String,attribute:`decoding`})],u.prototype,`decoding`,void 0),n([s({type:String,attribute:`fit`})],u.prototype,`fit`,void 0),n([s({type:String,attribute:`radius`})],u.prototype,`radius`,void 0),n([s({type:String,attribute:`referrer-policy`})],u.prototype,`referrerPolicy`,void 0),u=n([e(`bd-picture`)],u);export{u as BdPicture};
|
|
25
25
|
//# sourceMappingURL=picture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture.js","names":["pictureCSS","_decorate","__decorate","picture_css_default","RADIUS_STEPS","FITS","BdPicture","LitElement","_args","classes","isOneOf","lcp","source","nothing","img","changed","property","defineElement"],"sources":["../../../../src/components/picture/picture.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\nimport type { RadiusStep } from \"#shared/token-scales.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport pictureCSS from \"./picture.css.ts\";\n\n// the radius steps picture.css.ts implements — the full --radius-* scale\nconst RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nconst FITS = ['cover', 'contain', 'fill', 'none', 'scale-down'] as const;\n\ntype Fit = typeof FITS[number];\n\ninterface PictureSource {\n srcset: string;\n type? : string;\n media?: string;\n sizes?: string;\n}\n\n@defineElement(\"bd-picture\")\nexport class BdPicture extends LitElement {\n @property({ type: Array })\n sources: PictureSource[] = [];\n @property({ type: String })\n alt = \"\";\n /* `fallback-src`, because that is the attribute this component documents\n and the only spelling anything writes. Lit lowercases a property name to\n get its observed attribute instead of dash-casing it, so `fallbackSrc`\n was listening for `fallbacksrc` while every story and the usage example\n in picture.stories.ts wrote `fallback-src`. The attribute was inert, the\n property stayed at its \"\" default, and the fallback <img> rendered with\n src=\"\".\n\n That is the whole image on this component: measured across the six\n Atoms/Picture stories, all 14 instances had naturalWidth 0, and the 12\n with an empty `sources` array had currentSrc=\"\" -- no candidate to\n request at all, so a story called \"No Sources (fallback only)\" showed\n nothing but an empty box. Isolated from the network with a data: URI:\n setAttribute('fallback-src') left it 0x0, while setAttribute\n ('fallbacksrc') and the property both loaded the image. (The two stories\n that do have a currentSrc get it from a <source>, and their 0x0 is this\n sandbox having no route to the placeholder host -- not this defect.) */\n @property({ type: String, attribute: \"fallback-src\" })\n fallbackSrc = \"\";\n @property({ type: Number })\n width: number | null = null;\n @property({ type: Number })\n height: number | null = null;\n @property({ type: String })\n loading = \"lazy\";\n @property({ type: String, attribute: \"fetchpriority\" })\n fetchPriority = \"\";\n @property({ type: String })\n decoding = \"\";\n @property({ type: String })\n fit: Fit = \"cover\";\n @property({ type: String })\n radius: RadiusStep = \"none\";\n @property({ type: String, attribute: \"referrer-policy\" })\n referrerPolicy = \"\";\n\n render() {\n // fit becomes a class, so only the values picture.css.ts implements get\n // through; an unknown one used to leave the image with no object-fit\n const classes = [\n 'bd-picture',\n `fit-${isOneOf(FITS, this.fit) ? this.fit : 'cover'}`,\n `radius-${isOneOf(RADIUS_STEPS, this.radius) ? this.radius : 'none'}`\n ].filter(Boolean).join(' ');\n /* Never lazy at fetchpriority=\"high\", as in bd-img. That also skips the\n fade in picture.css.ts, which is keyed on loading=\"lazy\": an LCP image\n held at opacity 0 until its load event is an LCP held back with it. */\n const lcp = this.fetchPriority === 'high';\n\n // Each source's optional attributes are left off when not given. type\n // used to be written as-is, so a source without one rendered\n // type=\"undefined\" -- a MIME type no browser supports, so it skipped the\n // source and fell through to the next one or the <img>.\n return html`\n <picture class=\"${classes}\">\n ${this.sources.map(source => html`\n <source\n type=\"${source.type || nothing}\"\n srcset=\"${source.srcset}\"\n media=\"${source.media || nothing}\"\n sizes=\"${source.sizes || nothing}\"\n >\n `)}\n <img\n loading=\"${lcp ? nothing : this.loading}\"\n fetchpriority=\"${this.fetchPriority || nothing}\"\n decoding=\"${this.decoding || nothing}\"\n alt=\"${this.alt}\"\n src=\"${this.fallbackSrc}\"\n width=\"${this.width ?? nothing}\"\n height=\"${this.height ?? nothing}\"\n referrerpolicy=\"${this.referrerPolicy || nothing}\"\n @load=\"${this._onLoad}\"\n @error=\"${this._onError}\"\n >\n </picture>\n `;\n }\n\n /* The stylesheet has always been written around a `loaded` attribute --\n `.bd-picture:not([loaded])` paints the grey placeholder and its \"Loading\n image\" label, and `img[loading=\"lazy\"][loaded]` is what returns a lazy\n image from opacity 0 to opacity 1 -- and nothing in this package ever set\n it. `loaded` appeared in exactly three places, all three of them those\n selectors. So the reveal had no trigger:\n\n loading=\"lazy\" (the default) -> opacity 0, scale(0.95), forever\n every instance -> placeholder background and label on\n top of the image, permanently\n\n Measured on a served 800x450 PNG: the img reached naturalWidth 800 --\n fully decoded -- with computed opacity 0 in 7 of the 8 instances across\n four stories. The eighth is the one story that passes loading=\"eager\",\n which has no opacity rule and so was the only visible image in the\n component; it still carried the placeholder behind it.\n\n That is also why fixing the `fallback-src` attribute above is not on its\n own enough to see anything: it gives the img a src and the src decodes,\n and a default-configured bd-picture then renders a fully loaded image at\n opacity 0. The two defects had to be fixed together or neither is visible.\n\n bd-img never hides its image at all, which is why it has no equivalent\n bug -- and no placeholder either, since an <img> cannot draw one. The\n minimal\n change here is to make this component tell the truth it already asks CSS\n about, rather than to restyle it: the fade on load is a deliberate\n nicety, and it is kept.\n\n `complete` is checked once on first update because a cached or\n already-decoded image can finish before the listener is attached, in\n which case no load event is coming -- the same \"the state may already be\n true before anything is watching for it\" case as the tooltip's first\n placement pass. naturalWidth guards it, because `complete` is also true\n for an image that failed. */\n firstUpdated() {\n const img = this.renderRoot?.querySelector('img');\n if (img?.complete && img.naturalWidth > 0) this._markLoaded(img);\n }\n\n /* A new source means the old image is no longer what is on screen, so the\n flag goes back down and the placeholder returns until the new one\n decodes. Without this a changed fallbackSrc would keep showing the\n previous image's revealed state while the new bytes were still in\n flight. */\n updated(changed: PropertyValues<this>) {\n if (!changed.has('fallbackSrc') && !changed.has('sources')) return;\n const img = this.renderRoot?.querySelector('img');\n if (!img) return;\n if (img.complete && img.naturalWidth > 0) return this._markLoaded(img);\n img.removeAttribute('loaded');\n this.renderRoot?.querySelector('picture')?.removeAttribute('loaded');\n }\n\n _onLoad(e: Event) {\n this._markLoaded(e.currentTarget as HTMLImageElement);\n }\n\n /* Deliberately does not set the flag: a broken image is exactly the case\n the placeholder is for, so it stays up and says so. */\n _onError() {}\n\n /* Both elements, because the two selectors ask different questions: the\n <picture> owns the placeholder and the <img> owns the reveal. */\n _markLoaded(img: HTMLImageElement) {\n img.setAttribute('loaded', '');\n this.renderRoot?.querySelector('picture')?.setAttribute('loaded', '');\n }\n\n static styles = [pictureCSS];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-picture\": BdPicture;\n }\n}\n"],"mappings":"A,iWAUA,IAAMI,EAAe,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EACpEC,EAAO,CAAC,QAAS,UAAW,OAAQ,OAAQ,YAAY,EAYjDC,EAAN,cAAwBC,CAAW,C,8BAEb,KAAA,QAAA,CAAC,EAEtB,KAAA,IAAA,GAmBQ,KAAA,YAAA,GAES,KAAA,MAAA,KAEC,KAAA,OAAA,KAEd,KAAA,QAAA,OAEM,KAAA,cAAA,GAEL,KAAA,SAAA,GAEA,KAAA,IAAA,QAEU,KAAA,OAAA,OAEJ,KAAA,eAAA,E,CAEjB,QAAS,CAGP,IAAME,EAAU,CACd,aACA,OAAOC,EAAQL,EAAM,KAAK,GAAG,EAAI,KAAK,IAAM,UAC5C,UAAUK,EAAQN,EAAc,KAAK,MAAM,EAAI,KAAK,OAAS,QAC/D,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAIpBO,EAAM,KAAK,gBAAkB,OAMnC,MAAO,EAAI;wBACSF,EAAQ;UACtB,KAAK,QAAQ,IAAI,GAAU,CAAI;;oBAErBG,EAAO,MAAQC,EAAQ;sBACrBD,EAAO,OAAO;qBACfA,EAAO,OAASC,EAAQ;qBACxBD,EAAO,OAASC,EAAQ;;SAEpC,EAAE;;qBAEUF,EAAME,EAAU,KAAK,QAAQ;2BACvB,KAAK,eAAiBA,EAAQ;sBACnC,KAAK,UAAYA,EAAQ;iBAC9B,KAAK,IAAI;iBACT,KAAK,YAAY;mBACf,KAAK,OAASA,EAAQ;oBACrB,KAAK,QAAUA,EAAQ;4BACf,KAAK,gBAAkBA,EAAQ;mBACxC,KAAK,QAAQ;oBACZ,KAAK,SAAS;;;KAIhC,CAqCA,cAAe,CACb,IAAMC,EAAM,KAAK,YAAY,cAAc,KAAK,EAC5CA,GAAK,UAAYA,EAAI,aAAe,GAAG,KAAK,YAAYA,CAAG,CACjE,CAOA,QAAQ,EAA+B,CACrC,GAAI,CAACC,EAAQ,IAAI,aAAa,GAAK,CAACA,EAAQ,IAAI,SAAS,EAAG,OAC5D,IAAMD,EAAM,KAAK,YAAY,cAAc,KAAK,EAChD,GAAKA,EACL,IAAIA,EAAI,UAAYA,EAAI,aAAe,EAAG,OAAO,KAAK,YAAYA,CAAG,EACrEA,EAAI,gBAAgB,QAAQ,EAC5B,KAAK,YAAY,cAAc,SAAS,CAAC,EAAE,gBAAgB,QAAQ,CAFE,CAGvE,CAEA,QAAQ,EAAU,CAChB,KAAK,YAAY,EAAE,aAAiC,CACtD,CAIA,UAAW,CAAC,CAIZ,YAAY,EAAuB,CACjCA,EAAI,aAAa,SAAU,EAAE,EAC7B,KAAK,YAAY,cAAc,SAAS,CAAC,EAAE,aAAa,SAAU,EAAE,CACtE,C,OAEgB,KAAA,OAAA,CAACd,CAAU,C,CAC7B,EAzJGC,EAAA,CAAAe,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAExBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,MAAA,IAAA,EAAA,EAmBzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,CAAA,EAAAV,EAAA,UAAA,cAAA,IAAA,EAAA,EAEpDL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAV,EAAA,UAAA,gBAAA,IAAA,EAAA,EAErDL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,iBAAkB,CAAC,CAAA,EAAAV,EAAA,UAAA,iBAAA,IAAA,EAAA,EAvCzD,EAAAL,EAAA,CAAAgB,EAAc,YAAY,CAAA,EAAAX,CAAA,E"}
|
|
1
|
+
{"version":3,"file":"picture.js","names":["pictureCSS","_decorate","__decorate","picture_css_default","RADIUS_STEPS","FITS","BdPicture","LitElement","_args","classes","isOneOf","lcp","source","nothing","img","changed","property","defineElement"],"sources":["../../../../src/components/picture/picture.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\nimport type { RadiusStep } from \"#shared/token-scales.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport pictureCSS from \"./picture.css.ts\";\n\n// the radius steps picture.css.ts implements — the full --radius-* scale\nconst RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nconst FITS = ['cover', 'contain', 'fill', 'none', 'scale-down'] as const;\n\ntype Fit = typeof FITS[number];\n\ninterface PictureSource {\n srcset: string;\n type? : string;\n media?: string;\n sizes?: string;\n}\n\n@defineElement(\"bd-picture\")\nexport class BdPicture extends LitElement {\n @property({ type: Array, attribute: \"sources\" })\n sources: PictureSource[] = [];\n @property({ type: String, attribute: \"alt\" })\n alt = \"\";\n /* `fallback-src`, because that is the attribute this component documents\n and the only spelling anything writes. Lit lowercases a property name to\n get its observed attribute instead of dash-casing it, so `fallbackSrc`\n was listening for `fallbacksrc` while every story and the usage example\n in picture.stories.ts wrote `fallback-src`. The attribute was inert, the\n property stayed at its \"\" default, and the fallback <img> rendered with\n src=\"\".\n\n That is the whole image on this component: measured across the six\n Atoms/Picture stories, all 14 instances had naturalWidth 0, and the 12\n with an empty `sources` array had currentSrc=\"\" -- no candidate to\n request at all, so a story called \"No Sources (fallback only)\" showed\n nothing but an empty box. Isolated from the network with a data: URI:\n setAttribute('fallback-src') left it 0x0, while setAttribute\n ('fallbacksrc') and the property both loaded the image. (The two stories\n that do have a currentSrc get it from a <source>, and their 0x0 is this\n sandbox having no route to the placeholder host -- not this defect.) */\n @property({ type: String, attribute: \"fallback-src\" })\n fallbackSrc = \"\";\n @property({ type: Number, attribute: \"width\" })\n width: number | null = null;\n @property({ type: Number, attribute: \"height\" })\n height: number | null = null;\n @property({ type: String, attribute: \"loading\" })\n loading = \"lazy\";\n /* The native attribute's spelling, as on bd-img. */\n @property({ type: String, attribute: \"fetchpriority\" })\n fetchPriority = \"\";\n @property({ type: String, attribute: \"decoding\" })\n decoding = \"\";\n @property({ type: String, attribute: \"fit\" })\n fit: Fit = \"cover\";\n @property({ type: String, attribute: \"radius\" })\n radius: RadiusStep = \"none\";\n @property({ type: String, attribute: \"referrer-policy\" })\n referrerPolicy = \"\";\n\n render() {\n // fit becomes a class, so only the values picture.css.ts implements get\n // through; an unknown one used to leave the image with no object-fit\n const classes = [\n 'bd-picture',\n `fit-${isOneOf(FITS, this.fit) ? this.fit : 'cover'}`,\n `radius-${isOneOf(RADIUS_STEPS, this.radius) ? this.radius : 'none'}`\n ].filter(Boolean).join(' ');\n /* Never lazy at fetchpriority=\"high\", as in bd-img. That also skips the\n fade in picture.css.ts, which is keyed on loading=\"lazy\": an LCP image\n held at opacity 0 until its load event is an LCP held back with it. */\n const lcp = this.fetchPriority === 'high';\n\n // Each source's optional attributes are left off when not given. type\n // used to be written as-is, so a source without one rendered\n // type=\"undefined\" -- a MIME type no browser supports, so it skipped the\n // source and fell through to the next one or the <img>.\n return html`\n <picture class=\"${classes}\">\n ${this.sources.map(source => html`\n <source\n type=\"${source.type || nothing}\"\n srcset=\"${source.srcset}\"\n media=\"${source.media || nothing}\"\n sizes=\"${source.sizes || nothing}\"\n >\n `)}\n <img\n loading=\"${lcp ? nothing : this.loading}\"\n fetchpriority=\"${this.fetchPriority || nothing}\"\n decoding=\"${this.decoding || nothing}\"\n alt=\"${this.alt}\"\n src=\"${this.fallbackSrc}\"\n width=\"${this.width ?? nothing}\"\n height=\"${this.height ?? nothing}\"\n referrerpolicy=\"${this.referrerPolicy || nothing}\"\n @load=\"${this._onLoad}\"\n @error=\"${this._onError}\"\n >\n </picture>\n `;\n }\n\n /* The stylesheet has always been written around a `loaded` attribute --\n `.bd-picture:not([loaded])` paints the grey placeholder and its \"Loading\n image\" label, and `img[loading=\"lazy\"][loaded]` is what returns a lazy\n image from opacity 0 to opacity 1 -- and nothing in this package ever set\n it. `loaded` appeared in exactly three places, all three of them those\n selectors. So the reveal had no trigger:\n\n loading=\"lazy\" (the default) -> opacity 0, scale(0.95), forever\n every instance -> placeholder background and label on\n top of the image, permanently\n\n Measured on a served 800x450 PNG: the img reached naturalWidth 800 --\n fully decoded -- with computed opacity 0 in 7 of the 8 instances across\n four stories. The eighth is the one story that passes loading=\"eager\",\n which has no opacity rule and so was the only visible image in the\n component; it still carried the placeholder behind it.\n\n That is also why fixing the `fallback-src` attribute above is not on its\n own enough to see anything: it gives the img a src and the src decodes,\n and a default-configured bd-picture then renders a fully loaded image at\n opacity 0. The two defects had to be fixed together or neither is visible.\n\n bd-img never hides its image at all, which is why it has no equivalent\n bug -- and no placeholder either, since an <img> cannot draw one. The\n minimal\n change here is to make this component tell the truth it already asks CSS\n about, rather than to restyle it: the fade on load is a deliberate\n nicety, and it is kept.\n\n `complete` is checked once on first update because a cached or\n already-decoded image can finish before the listener is attached, in\n which case no load event is coming -- the same \"the state may already be\n true before anything is watching for it\" case as the tooltip's first\n placement pass. naturalWidth guards it, because `complete` is also true\n for an image that failed. */\n firstUpdated() {\n const img = this.renderRoot?.querySelector('img');\n if (img?.complete && img.naturalWidth > 0) this._markLoaded(img);\n }\n\n /* A new source means the old image is no longer what is on screen, so the\n flag goes back down and the placeholder returns until the new one\n decodes. Without this a changed fallbackSrc would keep showing the\n previous image's revealed state while the new bytes were still in\n flight. */\n updated(changed: PropertyValues<this>) {\n if (!changed.has('fallbackSrc') && !changed.has('sources')) return;\n const img = this.renderRoot?.querySelector('img');\n if (!img) return;\n if (img.complete && img.naturalWidth > 0) return this._markLoaded(img);\n img.removeAttribute('loaded');\n this.renderRoot?.querySelector('picture')?.removeAttribute('loaded');\n }\n\n _onLoad(e: Event) {\n this._markLoaded(e.currentTarget as HTMLImageElement);\n }\n\n /* Deliberately does not set the flag: a broken image is exactly the case\n the placeholder is for, so it stays up and says so. */\n _onError() {}\n\n /* Both elements, because the two selectors ask different questions: the\n <picture> owns the placeholder and the <img> owns the reveal. */\n _markLoaded(img: HTMLImageElement) {\n img.setAttribute('loaded', '');\n this.renderRoot?.querySelector('picture')?.setAttribute('loaded', '');\n }\n\n static styles = [pictureCSS];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-picture\": BdPicture;\n }\n}\n"],"mappings":"A,iWAUA,IAAMI,EAAe,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EACpEC,EAAO,CAAC,QAAS,UAAW,OAAQ,OAAQ,YAAY,EAYjDC,EAAN,cAAwBC,CAAW,C,8BAEb,KAAA,QAAA,CAAC,EAEtB,KAAA,IAAA,GAmBQ,KAAA,YAAA,GAES,KAAA,MAAA,KAEC,KAAA,OAAA,KAEd,KAAA,QAAA,OAGM,KAAA,cAAA,GAEL,KAAA,SAAA,GAEA,KAAA,IAAA,QAEU,KAAA,OAAA,OAEJ,KAAA,eAAA,E,CAEjB,QAAS,CAGP,IAAME,EAAU,CACd,aACA,OAAOC,EAAQL,EAAM,KAAK,GAAG,EAAI,KAAK,IAAM,UAC5C,UAAUK,EAAQN,EAAc,KAAK,MAAM,EAAI,KAAK,OAAS,QAC/D,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAIpBO,EAAM,KAAK,gBAAkB,OAMnC,MAAO,EAAI;wBACSF,EAAQ;UACtB,KAAK,QAAQ,IAAI,GAAU,CAAI;;oBAErBG,EAAO,MAAQC,EAAQ;sBACrBD,EAAO,OAAO;qBACfA,EAAO,OAASC,EAAQ;qBACxBD,EAAO,OAASC,EAAQ;;SAEpC,EAAE;;qBAEUF,EAAME,EAAU,KAAK,QAAQ;2BACvB,KAAK,eAAiBA,EAAQ;sBACnC,KAAK,UAAYA,EAAQ;iBAC9B,KAAK,IAAI;iBACT,KAAK,YAAY;mBACf,KAAK,OAASA,EAAQ;oBACrB,KAAK,QAAUA,EAAQ;4BACf,KAAK,gBAAkBA,EAAQ;mBACxC,KAAK,QAAQ;oBACZ,KAAK,SAAS;;;KAIhC,CAqCA,cAAe,CACb,IAAMC,EAAM,KAAK,YAAY,cAAc,KAAK,EAC5CA,GAAK,UAAYA,EAAI,aAAe,GAAG,KAAK,YAAYA,CAAG,CACjE,CAOA,QAAQ,EAA+B,CACrC,GAAI,CAACC,EAAQ,IAAI,aAAa,GAAK,CAACA,EAAQ,IAAI,SAAS,EAAG,OAC5D,IAAMD,EAAM,KAAK,YAAY,cAAc,KAAK,EAChD,GAAKA,EACL,IAAIA,EAAI,UAAYA,EAAI,aAAe,EAAG,OAAO,KAAK,YAAYA,CAAG,EACrEA,EAAI,gBAAgB,QAAQ,EAC5B,KAAK,YAAY,cAAc,SAAS,CAAC,EAAE,gBAAgB,QAAQ,CAFE,CAGvE,CAEA,QAAQ,EAAU,CAChB,KAAK,YAAY,EAAE,aAAiC,CACtD,CAIA,UAAW,CAAC,CAIZ,YAAY,EAAuB,CACjCA,EAAI,aAAa,SAAU,EAAE,EAC7B,KAAK,YAAY,cAAc,SAAS,CAAC,EAAE,aAAa,SAAU,EAAE,CACtE,C,OAEgB,KAAA,OAAA,CAACd,CAAU,C,CAC7B,EA1JGC,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,UAAW,SAAU,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAE9CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,KAAM,CAAC,CAAA,EAAAV,EAAA,UAAA,MAAA,IAAA,EAAA,EAmB3CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,CAAA,EAAAV,EAAA,UAAA,cAAA,IAAA,EAAA,EAEpDL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,OAAQ,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAE7CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAE9CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAG/CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAV,EAAA,UAAA,gBAAA,IAAA,EAAA,EAErDL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,UAAW,CAAC,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EAEhDL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,KAAM,CAAC,CAAA,EAAAV,EAAA,UAAA,MAAA,IAAA,EAAA,EAE3CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAE9CL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,iBAAkB,CAAC,CAAA,EAAAV,EAAA,UAAA,iBAAA,IAAA,EAAA,EAxCzD,EAAAL,EAAA,CAAAgB,EAAc,YAAY,CAAA,EAAAX,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{width:100%;height:100%;display:block;container-type:inline-size}@supports (width:-moz-available){:host{width:-moz-available}}@supports (width:-webkit-fill-available){:host{width:-webkit-fill-available}}@supports (width:stretch){:host{width:-webkit-fill-available;width:-moz-available;width:stretch}}.card{box-sizing:border-box;background:var(--color-surface-default);border:var(--border-width-1) solid var(--color-border-container);border-radius:var(--card-radius);flex-direction:column;height:100%;display:flex;position:relative;overflow:hidden}.cover{background:var(--color-surface-muted);flex:none;height:196px;position:relative}.
|
|
1
|
+
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{width:100%;height:100%;display:block;container-type:inline-size}@supports (width:-moz-available){:host{width:-moz-available}}@supports (width:-webkit-fill-available){:host{width:-webkit-fill-available}}@supports (width:stretch){:host{width:-webkit-fill-available;width:-moz-available;width:stretch}}.card{box-sizing:border-box;background:var(--color-surface-default);border:var(--border-width-1) solid var(--color-border-container);border-radius:var(--card-radius);flex-direction:column;height:100%;display:flex;position:relative;overflow:hidden}.card [hidden]{display:none}.cover{background:var(--color-surface-muted);flex:none;height:196px;position:relative}.art{position:absolute;inset:0}::slotted([slot=media]){object-fit:cover;width:100%;height:100%;display:block}::slotted(bd-img[slot=media]){grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:stretch stretch;display:grid}.badge{max-width:calc(100% - 2 * var(--spacing-24));gap:var(--spacing-8);flex-wrap:wrap;display:flex;position:absolute;inset-block-start:var(--spacing-20);inset-inline-start:var(--spacing-24)}::slotted([slot=badge]){--bd-badge-white-space:normal;min-width:0;max-width:100%}.body{min-width:0;padding:var(--spacing-24);flex-direction:column;flex:auto;display:flex}.chips{gap:var(--spacing-8);flex-wrap:wrap;margin-block-end:var(--spacing-12);display:flex}.meta{align-items:center;gap:var(--spacing-8);font-family:var(--typography-body-small-fontFamily);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);color:var(--color-text-primary);flex-wrap:wrap;margin-block-end:var(--spacing-8);display:flex}.title{color:var(--color-text-primary)}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h5-fontSize);--bd-heading-font-weight:var(--typography-heading-h5-fontWeight);--bd-heading-line-height:var(--typography-heading-h5-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h5-letterSpacing);--bd-heading-font-family:var(--typography-heading-h5-fontFamily)}.link{color:inherit;text-decoration:none;display:block}.link:after{content:"";position:absolute;inset:0}.link:hover{text-decoration:underline}.link:focus-visible{outline:var(--border-width-2) solid transparent}.card:has(.link:focus-visible){outline:var(--focus-outline-traditional);outline-offset:var(--focus-outline-offset)}.more{align-items:center;gap:var(--spacing-4);font-family:var(--typography-link-standalone-fontFamily);font-size:var(--typography-link-standalone-fontSize);font-weight:var(--typography-link-standalone-fontWeight);line-height:var(--typography-link-standalone-lineHeight);color:var(--color-text-brand);margin-block-start:auto;padding-block-start:var(--spacing-24);display:inline-flex}@container (width>=576px){:host(:not([appearance=frameless]):not([layout=row])) .card{flex-direction:row}:host(:not([appearance=frameless]):not([layout=row])) .cover{width:40%;height:auto}}:host([appearance=frameless]) .card{gap:var(--spacing-16);background:0 0;border:none}:host([appearance=frameless]) .cover{aspect-ratio:1.91;height:auto}:host([appearance=frameless]) .cover,:host([layout=row]) .cover{border-radius:var(--shape-radius-2xl);overflow:hidden}:host([appearance=frameless]) .badge{max-width:calc(100% - 2 * var(--spacing-12));inset-block-start:var(--spacing-12);inset-inline-start:var(--spacing-12)}:host([appearance=frameless]) .body{padding:0}:host([appearance=frameless]) ::slotted(bd-h[slot=title]),:host([appearance=frameless]) ::slotted(bd-display[slot=title]){--bd-heading-font-weight:var(--typography-fontWeight-semibold)}:host([appearance=frameless]) .link:hover{color:var(--color-text-brand-hover)}:host([appearance=frameless]) .link:hover ::slotted(bd-h[slot=title]),:host([appearance=frameless]) .link:hover ::slotted(bd-display[slot=title]){--bd-heading-color:var(--color-text-brand-hover)}:host([layout=row]) .card{align-items:center;gap:var(--spacing-24);padding:var(--spacing-24);flex-direction:row}:host([appearance=frameless][layout=row]) .card{padding:0}:host([layout=row]) .cover{aspect-ratio:1;width:170px;height:auto}:host([layout=row]) .body{padding:0}:host([layout=row]) ::slotted(bd-h[slot=title]),:host([layout=row]) ::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h6-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-semibold);--bd-heading-line-height:var(--typography-heading-h6-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h6-letterSpacing);--bd-heading-font-family:var(--typography-heading-h6-fontFamily)}@container (width<400px){:host([layout=row]) .cover{display:none}}`;export{t as postCardCSS};
|
|
2
2
|
//# sourceMappingURL=post-card.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-card.css.js","names":["postCardCSS"],"sources":["../../../../src/components/post-card/post-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* A post card on the page ground beside two others, where the design draws\n an edge: surface/default with a border/container edge, at the card corner.\n The cover runs to the card's edges and the copy takes the compact inset. */\nexport const postCardCSS = css`\n /* The card is a size container, so its content gives it no width: it\n takes its cell's whole width, as it takes the row's height, and lays\n itself out for that. Left to fit its content -- bd-grid places its items\n at start -- a container measures 0 wide. The width is the column less\n the card's margins (shared/fill-width.css.ts). */\n :host {\n display: block;\n height: 100%;\n container-type: inline-size;\n }\n\n ${hostFillsWidth()}\n\n .card {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n }\n\n .cover {\n position: relative;\n flex: none;\n /* no token: the cover's height in the desktop and phone frames; the\n dimension scale stops at 64 */\n height: 196px;\n background: var(--color-surface-muted);\n }\n\n .cover img,\n ::slotted([slot=\"image\"]) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n /* The badge is the post's feed or category, and a feed's channel title can\n be longer than the cover is wide -- \"Business Insights Cybersecurity Blog\n by Bitdefender\" ran off the card between md and xl. It keeps the cover's\n inset on both sides and wraps inside it instead. */\n .badge {\n position: absolute;\n inset-block-start: var(--spacing-20);\n inset-inline-start: var(--spacing-24);\n max-width: calc(100% - 2 * var(--spacing-24));\n --bd-badge-white-space: normal;\n }\n\n .body {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: var(--spacing-24);\n padding: var(--spacing-24);\n }\n\n .heading {\n margin: 0;\n font-family: var(--typography-heading-h5-fontFamily);\n font-size: var(--typography-heading-h5-fontSize);\n font-weight: var(--typography-heading-h5-fontWeight);\n line-height: var(--typography-heading-h5-lineHeight);\n letter-spacing: var(--typography-heading-h5-letterSpacing);\n color: var(--color-text-primary);\n }\n\n .link {\n color: inherit;\n text-decoration: none;\n }\n\n /* the title's box stretched over the card: one target, the whole card */\n .link::after {\n content: \"\";\n position: absolute;\n inset: 0;\n /* the card's corner (--card-radius is --shape-radius-2xl), so the focus\n ring follows the card's outline */\n border-radius: var(--shape-radius-2xl);\n }\n\n .link:hover {\n text-decoration: underline;\n }\n\n /* The ring is drawn on the stretched box below; the title's own outline\n stays transparent rather than none, so forced-colors mode still marks\n the focus. */\n .link:focus-visible {\n outline: var(--border-width-2) solid transparent;\n }\n\n /* The focus ring belongs to the card, since the card is the target. */\n .link:focus-visible::after {\n outline: var(--focus-outline-traditional);\n outline-offset: var(--focus-outline-offset);\n }\n\n .more {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-4);\n font-family: var(--typography-link-standalone-fontFamily);\n font-size: var(--typography-link-standalone-fontSize);\n font-weight: var(--typography-link-standalone-fontWeight);\n line-height: var(--typography-link-standalone-lineHeight);\n color: var(--color-text-brand);\n }\n\n /* The tablet row, the cover on the left, wherever the card is wide enough\n for it -- not wherever the screen is. It used to follow the viewport\n from md to lg, which put a card in a two- or three-column grid at tablet\n width into a row it had no room for (a 384 card: a 154 cover beside\n 230 of copy), and a lone card on a desktop page under a full-width\n cover. A card in a three-up grid is at most 415 wide; one alone in the\n tablet column is 656. */\n @container ${unsafeCSS(above(\"sm\"))} {\n .card {\n flex-direction: row;\n }\n\n .cover {\n width: 40%;\n height: auto;\n }\n }\n\n /* A newline in the text is a line break, so a page can keep the breaks its\n copy was written with (a <br> in the authored eyebrow, heading or lead\n arrives as a newline in the property). Text only: nothing here renders\n HTML. */\n .heading {\n white-space: pre-line;\n }\n`;\n"],"mappings":"A,gGAOA,IAAaA,EAAc,CAAG,ukE"}
|
|
1
|
+
{"version":3,"file":"post-card.css.js","names":["postCardCSS"],"sources":["../../../../src/components/post-card/post-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above, headingRole } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* A post card on the page ground beside two others, where the design draws\n an edge: surface/default with a border/container edge, at the card corner.\n The cover runs to the card's edges and the copy takes the compact inset.\n The frameless card and the row, the blog's, follow the standard one. */\nexport const postCardCSS = css`\n /* The card is a size container, so its content gives it no width: it\n takes its cell's whole width, as it takes the row's height, and lays\n itself out for that. Left to fit its content -- bd-grid places its items\n at start -- a container measures 0 wide. The width is the column less\n the card's margins (shared/fill-width.css.ts). */\n :host {\n display: block;\n height: 100%;\n container-type: inline-size;\n }\n\n ${hostFillsWidth()}\n\n .card {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n }\n\n /* Each part's box is hidden while its slot is empty -- the cover while\n both the image and the badge are; the attribute's selector outweighs the\n display a box sets below. */\n .card [hidden] {\n display: none;\n }\n\n .cover {\n position: relative;\n flex: none;\n /* no token: the cover's height in the desktop and phone frames; the\n dimension scale stops at 64 */\n height: 196px;\n background: var(--color-surface-muted);\n }\n\n /* The picture's box, out of the accessibility tree: the link names the\n post, so the cover would only say it again, whatever alt it was given.\n It fills the cover, whatever gives the cover its size. */\n .art {\n position: absolute;\n inset: 0;\n }\n\n ::slotted([slot=\"media\"]) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n /* bd-img's own <img> is out of reach and sizes itself from its image, so\n a cover narrower or wider than the picture's proportions would show the\n ground beside it. As a grid item stretched both ways it fills the cover\n instead, and its fit (cover by default) keeps the picture's proportions. */\n ::slotted(bd-img[slot=\"media\"]) {\n display: grid;\n grid-template: minmax(0, 1fr) / minmax(0, 1fr);\n justify-items: stretch;\n align-items: stretch;\n }\n\n /* The badge is the post's feed or category, and a feed's channel title can\n be longer than the cover is wide -- \"Business Insights Cybersecurity Blog\n by Bitdefender\" ran off the card between md and xl. It keeps the cover's\n inset on both sides and wraps inside it instead. A post with several\n topics writes several chips, 8 apart. */\n .badge {\n position: absolute;\n inset-block-start: var(--spacing-20);\n inset-inline-start: var(--spacing-24);\n max-width: calc(100% - 2 * var(--spacing-24));\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-8);\n }\n\n ::slotted([slot=\"badge\"]) {\n min-width: 0;\n max-width: 100%;\n --bd-badge-white-space: normal;\n }\n\n /* Each part keeps the space after it, so a part whose slot is empty takes\n its space with it: the meta 8 above the title, the cue 24 under it at\n least, and at the card's foot wherever the row gives the card more. */\n .body {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n padding: var(--spacing-24);\n }\n\n /* The chips at the top of a row's words, 12 above the meta. */\n .chips {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-8);\n margin-block-end: var(--spacing-12);\n }\n\n /* The post's meta: its date and reading time, 8 apart, in the small body\n role and the primary ink, which a bd-meta the page writes draws for\n itself and plain words inherit. */\n .meta {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-8);\n margin-block-end: var(--spacing-8);\n font-family: var(--typography-body-small-fontFamily);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n color: var(--color-text-primary);\n }\n\n /* The ink the title's underline is drawn in: the heading's own. */\n .title {\n color: var(--color-text-primary);\n }\n\n /* The post's title: the h5 role 3.x drew it at, at whatever level the page\n picks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h5\"))}\n }\n\n /* A block, because the page's heading inside it is one: the underline\n reaches the heading's words, and the link's box is the title's. */\n .link {\n display: block;\n color: inherit;\n text-decoration: none;\n }\n\n /* the title's box stretched over the card: one target, the whole card */\n .link::after {\n content: \"\";\n position: absolute;\n inset: 0;\n }\n\n .link:hover {\n text-decoration: underline;\n }\n\n /* The ring is drawn on the card below; the title's own outline stays\n transparent rather than none, so forced-colors mode still marks the\n focus. */\n .link:focus-visible {\n outline: var(--border-width-2) solid transparent;\n }\n\n /* The focus ring belongs to the card, since the card is the target, and it\n is the card's own outline, found through :has() as the accordion item\n finds its ring. It used to be the stretched box's, offset outside it --\n and so outside .card's padding box, which overflow: hidden clips for the\n cover's corners: a keyboard focus drew no ring at all. An element's\n overflow never clips its own outline, and the outline follows the\n card's corner. */\n .card:has(.link:focus-visible) {\n outline: var(--focus-outline-traditional);\n outline-offset: var(--focus-outline-offset);\n }\n\n /* The cue at the foot of the words, 24 under the title at least. */\n .more {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-4);\n margin-block-start: auto;\n padding-block-start: var(--spacing-24);\n font-family: var(--typography-link-standalone-fontFamily);\n font-size: var(--typography-link-standalone-fontSize);\n font-weight: var(--typography-link-standalone-fontWeight);\n line-height: var(--typography-link-standalone-lineHeight);\n color: var(--color-text-brand);\n }\n\n /* The tablet row, the cover on the left, wherever the standard card is\n wide enough for it -- not wherever the screen is. It used to follow the\n viewport from md to lg, which put a card in a two- or three-column grid\n at tablet width into a row it had no room for (a 384 card: a 154 cover\n beside 230 of copy), and a lone card on a desktop page under a\n full-width cover. A card in a three-up grid is at most 415 wide; one\n alone in the tablet column is 656. The frameless card stays a column,\n and layout=\"row\" is a row of its own. */\n @container ${unsafeCSS(above(\"sm\"))} {\n :host(:not([appearance=\"frameless\"]):not([layout=\"row\"])) .card {\n flex-direction: row;\n }\n\n :host(:not([appearance=\"frameless\"]):not([layout=\"row\"])) .cover {\n width: 40%;\n height: auto;\n }\n }\n\n /* === frameless: the blog's card (csg_blog's Top Stories, 46:324) ===\n No ground and no edge: the card is its cover and its words. The cover\n at the card corner in the 1.91:1 of a shared post's image (Figma's 359\n by 188), the chips 12 in from its corner, 16 from the cover to the meta,\n the title semibold, and \"Read more\" with a 20px arrow, which the\n element draws at the icon scale's md. */\n :host([appearance=\"frameless\"]) .card {\n gap: var(--spacing-16);\n background: none;\n border: none;\n }\n\n :host([appearance=\"frameless\"]) .cover {\n /* no token: the Open Graph image's shape, 1200 by 628, which a post's\n cover is cut to */\n aspect-ratio: 1.91 / 1;\n height: auto;\n }\n\n /* The cover is an image, not a card (scripts/card-shapes.json), so it\n takes the 2xl step of the shape ramp: 16, the card's corner today, and\n a partner's when a theme restates the ramp. */\n :host([appearance=\"frameless\"]) .cover, :host([layout=\"row\"]) .cover {\n border-radius: var(--shape-radius-2xl);\n overflow: hidden;\n }\n\n :host([appearance=\"frameless\"]) .badge {\n inset-block-start: var(--spacing-12);\n inset-inline-start: var(--spacing-12);\n max-width: calc(100% - 2 * var(--spacing-12));\n }\n\n :host([appearance=\"frameless\"]) .body {\n padding: 0;\n }\n\n :host([appearance=\"frameless\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"frameless\"]) ::slotted(bd-display[slot=\"title\"]) {\n /* no role: the h5 role at 600, csg_blog's card title; no heading role\n carries the h5 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-semibold);\n }\n\n /* The blog's card under the pointer: the title, and its underline, in the\n brand's hover ink. */\n :host([appearance=\"frameless\"]) .link:hover {\n color: var(--color-text-brand-hover);\n }\n\n :host([appearance=\"frameless\"]) .link:hover ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"frameless\"]) .link:hover ::slotted(bd-display[slot=\"title\"]) {\n --bd-heading-color: var(--color-text-brand-hover);\n }\n\n /* === row: the blog's listing row (csg_blog 46:289, the phone's in 1:2) ===\n A 170px square cover beside the chips, the meta and the title, 24\n apart, the words centred on the cover; the title the h6 role, semibold.\n The standard card keeps its frame and insets the whole row; the\n frameless one has no inset to keep. */\n :host([layout=\"row\"]) .card {\n flex-direction: row;\n align-items: center;\n gap: var(--spacing-24);\n padding: var(--spacing-24);\n }\n\n :host([appearance=\"frameless\"][layout=\"row\"]) .card {\n padding: 0;\n }\n\n :host([layout=\"row\"]) .cover {\n /* no token: the row's square cover, 170 in the desktop frame; the\n dimension scale stops at 64 */\n width: 170px;\n height: auto;\n aspect-ratio: 1;\n }\n\n :host([layout=\"row\"]) .body {\n padding: 0;\n }\n\n :host([layout=\"row\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([layout=\"row\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h6\"))}\n /* no role: the h6 role at 600, csg_blog's row title; no heading role\n carries the h6 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-semibold);\n }\n\n /* The words alone where the row is narrower than 400, as the phone frame\n draws its 392 row: a 170 cover leaves too little beside it. The\n desktop frame draws the cover in a pair of rows, which in the package's\n column is narrowest at lg, 424 (half the 880 column less a 32 gap); sm,\n 576, would take it from every pair below xxl, and md from every pair.\n An exception on the scale, recorded in scripts/breakpoint-exceptions.json. */\n @container (width < 400px) {\n :host([layout=\"row\"]) .cover {\n display: none;\n }\n }\n`;\n"],"mappings":"A,gGAQA,IAAaA,EAAc,CAAG,4pJ"}
|
|
@@ -1,39 +1,80 @@
|
|
|
1
1
|
import { LitElement, type PropertyValues } from "lit";
|
|
2
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
2
3
|
import "../../tokens/tokens.js";
|
|
3
4
|
import "../badge/badge.js";
|
|
4
|
-
import "../
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import "../h/h.js";
|
|
6
|
+
import "../img/img.js";
|
|
7
|
+
import "../meta/meta.js";
|
|
8
|
+
import "../tag/tag.js";
|
|
9
|
+
import "../icons/arrow.js";
|
|
10
|
+
/** How it looks (N6): the framed card, or the blog's card with no ground and no edge. */
|
|
11
|
+
export declare const POST_CARD_APPEARANCES: readonly ["standard", "frameless"];
|
|
12
|
+
export type PostCardAppearance = typeof POST_CARD_APPEARANCES[number];
|
|
13
|
+
/** How it is laid out: the card's own, or a row with a square cover. */
|
|
14
|
+
export declare const POST_CARD_LAYOUTS: readonly ["auto", "row"];
|
|
15
|
+
export type PostCardLayout = typeof POST_CARD_LAYOUTS[number];
|
|
7
16
|
/**
|
|
8
|
-
* An article card for a feed of posts: a cover with
|
|
9
|
-
*
|
|
10
|
-
* insights
|
|
17
|
+
* An article card for a feed of posts: a cover with the post's category over
|
|
18
|
+
* it, the post's meta, its title and a "Read more" with an arrow. The
|
|
19
|
+
* homepage's Latest insights, drawn in the foundation Figma file as Post
|
|
20
|
+
* card; and the blog's cards, drawn in the csg_blog file, which were
|
|
21
|
+
* bd-blog-post-card until the blog folded into the package's components.
|
|
11
22
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
23
|
+
* <bd-post-card href="/blog/…">
|
|
24
|
+
* <bd-img slot="media" src="/cover.jpg" alt=""></bd-img>
|
|
25
|
+
* <bd-badge slot="badge" variant="info" appearance="shade" size="sm">Consumer Insights</bd-badge>
|
|
26
|
+
* <bd-h slot="title" as="h3">They Wear Our Faces: …</bd-h>
|
|
27
|
+
* <span slot="read-more">Read more</span>
|
|
28
|
+
* </bd-post-card>
|
|
16
29
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
30
|
+
* LOOKS AND LAYOUTS. `appearance` is the look: `standard` is the framed
|
|
31
|
+
* card, the page's ground with an edge; `frameless` is the blog's, with no
|
|
32
|
+
* ground and no edge, the cover at the card corner in the 1.91:1 of a
|
|
33
|
+
* shared post's image, the page's chips (bd-tag appearance="chip") over its
|
|
34
|
+
* corner and the title semibold. `layout` is the arrangement: `auto` is the
|
|
35
|
+
* card's own -- a column, which the standard card turns into a row, the
|
|
36
|
+
* cover on the left, wherever it is wide enough -- and `row` the blog's
|
|
37
|
+
* listing row, a 170px square cover beside the chips, the meta and the
|
|
38
|
+
* title, and the words alone where the card is narrower than 400px, as the
|
|
39
|
+
* phone frame draws it.
|
|
40
|
+
*
|
|
41
|
+
* ONE LINK PER CARD, NAMED BY ITS TITLE. The title is the link: with an
|
|
42
|
+
* `href` its slot sits inside the <a>, so the link is named by the title's
|
|
43
|
+
* words and the heading inside it keeps its level, and the link's box is
|
|
44
|
+
* stretched over the whole card, so a click anywhere follows it. "Read
|
|
45
|
+
* more" is the visual cue and is hidden from a screen reader, which would
|
|
46
|
+
* otherwise hear the same destination twice per card; with nothing in its
|
|
47
|
+
* slot, or no `href`, the cue and its arrow are not drawn. The focus ring
|
|
48
|
+
* is the card's, and focusing the card focuses the link (delegatesFocus),
|
|
49
|
+
* which is how a listing hands focus to a card.
|
|
50
|
+
*
|
|
51
|
+
* THE COVER IS DECORATIVE: the link already names the post, so the card
|
|
52
|
+
* takes its media out of the accessibility tree whatever alt it was given.
|
|
53
|
+
* The chips over it stay in the tree.
|
|
54
|
+
*
|
|
55
|
+
* Inside a bd-related-articles it is one item of the listing's list,
|
|
56
|
+
* through ElementInternals, so the role is the element's own and leaves the
|
|
57
|
+
* page's markup alone; anywhere else it is no list item.
|
|
58
|
+
*
|
|
59
|
+
* The card sets the title's size; the page picks its level.
|
|
20
60
|
*/
|
|
21
|
-
export declare class
|
|
61
|
+
export declare class BdPostCard extends LitElement {
|
|
62
|
+
static shadowRootOptions: ShadowRootInit;
|
|
22
63
|
static styles: import("lit").CSSResult[];
|
|
64
|
+
/** The post. Without it the card is not a link, and the cue is not drawn. */
|
|
23
65
|
href: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
66
|
+
/** How it looks: standard (framed) or frameless (the blog's). */
|
|
67
|
+
appearance: PostCardAppearance;
|
|
68
|
+
/** How it is laid out: auto (the card's own) or row (a square cover beside the words). */
|
|
69
|
+
layout: PostCardLayout;
|
|
70
|
+
private readonly _internals;
|
|
71
|
+
_slots: SlotController<"title" | "badge" | "media" | "meta" | "read-more">;
|
|
72
|
+
connectedCallback(): void;
|
|
30
73
|
willUpdate(changed: PropertyValues<this>): void;
|
|
31
|
-
|
|
32
|
-
render(): import("lit-html").TemplateResult;
|
|
74
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
33
75
|
}
|
|
34
76
|
declare global {
|
|
35
77
|
interface HTMLElementTagNameMap {
|
|
36
|
-
"bd-post-card":
|
|
78
|
+
"bd-post-card": BdPostCard;
|
|
37
79
|
}
|
|
38
80
|
}
|
|
39
|
-
export {};
|
|
@@ -1,15 +1,19 @@
|
|
|
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{
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{isOneOf as t}from"../shared/prop-vocabulary.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{SlotController as r}from"../shared/controller.slot.js";import"../h/h.js";import"../icons/arrow.js";import"../badge/badge.js";import"../img/img.js";import"../tag/tag.js";import"../meta/meta.js";import{postCardCSS as i}from"./post-card.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=[`media`,`badge`,`meta`,`title`,`read-more`],u=[`standard`,`frameless`],d=[`auto`,`row`],f=/* @__PURE__ */ new Set([`bd-related-articles`]),p=class extends a{constructor(...e){super(...e),this.href=``,this.appearance=`standard`,this.layout=`auto`,this._internals=this.attachInternals(),this._slots=new r(this,{slots:l})}static{this.shadowRootOptions={...a.shadowRootOptions,delegatesFocus:!0}}static{this.styles=[i]}connectedCallback(){super.connectedCallback(),this._internals.role=f.has(this.parentElement?.localName??``)?`listitem`:null}willUpdate(e){e.has(`appearance`)&&!t(u,this.appearance)&&(this.appearance=`standard`),e.has(`layout`)&&!t(d,this.layout)&&(this.layout=`auto`)}render(){let e=e=>!this._slots.has(e),t=this.layout===`row`,n=o`<slot name="title"></slot>`,r=t=>o`<div class=${t} ?hidden=${e(`badge`)}><slot name="badge"></slot></div>`;return o`
|
|
2
2
|
<article class="card">
|
|
3
|
-
<div class="cover">
|
|
4
|
-
<slot name="
|
|
5
|
-
|
|
6
|
-
</slot>
|
|
7
|
-
${this.badge?s`<bd-badge class="badge" tone="info" variant="shade" size="sm">${this.badge}</bd-badge>`:a}
|
|
3
|
+
<div class="cover" ?hidden=${e(`media`)&&(t||e(`badge`))}>
|
|
4
|
+
<div class="art" aria-hidden="true"><slot name="media"></slot></div>
|
|
5
|
+
${t?s:r(`badge`)}
|
|
8
6
|
</div>
|
|
9
7
|
<div class="body">
|
|
10
|
-
${
|
|
11
|
-
|
|
8
|
+
${t?r(`chips`):s}
|
|
9
|
+
<div class="meta" ?hidden=${e(`meta`)}><slot name="meta"></slot></div>
|
|
10
|
+
<div class="title" ?hidden=${e(`title`)}>
|
|
11
|
+
${this.href?o`<a class="link" href=${this.href}>${n}</a>`:n}
|
|
12
|
+
</div>
|
|
13
|
+
<span class="more" aria-hidden="true" ?hidden=${!this.href||e(`read-more`)}
|
|
14
|
+
><slot name="read-more"></slot><bd-icon name="arrow" size=${this.appearance===`frameless`?`md`:`sm`}></bd-icon
|
|
15
|
+
></span>
|
|
12
16
|
</div>
|
|
13
17
|
</article>
|
|
14
|
-
`}};
|
|
18
|
+
`}};n([c({type:String})],p.prototype,`href`,void 0),n([c({type:String,reflect:!0})],p.prototype,`appearance`,void 0),n([c({type:String,reflect:!0})],p.prototype,`layout`,void 0),p=n([e(`bd-post-card`)],p);export{p as BdPostCard,u as POST_CARD_APPEARANCES,d as POST_CARD_LAYOUTS};
|
|
15
19
|
//# sourceMappingURL=post-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-card.js","names":["_decorate","__decorate","
|
|
1
|
+
{"version":3,"file":"post-card.js","names":["_decorate","__decorate","SLOTS","POST_CARD_APPEARANCES","POST_CARD_LAYOUTS","LISTS","BdPostCard","LitElement","_args","SlotController","postCardCSS","changed","isOneOf","empty","name","row","title","badge","where","nothing","property","defineElement"],"sources":["../../../../src/components/post-card/post-card.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The atoms the page writes into the card's slots: 3.x drew its badge and\n cover itself, so a page importing only this module still gets them, and\n the bd-meta items of its meta, which bd-blog-post-card imported. */\nimport \"#components/badge/badge.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/img/img.ts\";\nimport \"#components/meta/meta.ts\";\nimport \"#components/tag/tag.ts\";\nimport \"#components/icons/arrow.ts\";\nimport { postCardCSS } from \"./post-card.css.ts\";\n\nconst SLOTS = [\"media\", \"badge\", \"meta\", \"title\", \"read-more\"] as const;\ntype Slot = typeof SLOTS[number];\n\n/** How it looks (N6): the framed card, or the blog's card with no ground and no edge. */\nexport const POST_CARD_APPEARANCES = [\"standard\", \"frameless\"] as const;\nexport type PostCardAppearance = typeof POST_CARD_APPEARANCES[number];\n\n/** How it is laid out: the card's own, or a row with a square cover. */\nexport const POST_CARD_LAYOUTS = [\"auto\", \"row\"] as const;\nexport type PostCardLayout = typeof POST_CARD_LAYOUTS[number];\n\n/* The listings a card is one item of. Anywhere else it is no list item. */\nconst LISTS = new Set([\"bd-related-articles\"]);\n\n/**\n * An article card for a feed of posts: a cover with the post's category over\n * it, the post's meta, its title and a \"Read more\" with an arrow. The\n * homepage's Latest insights, drawn in the foundation Figma file as Post\n * card; and the blog's cards, drawn in the csg_blog file, which were\n * bd-blog-post-card until the blog folded into the package's components.\n *\n * <bd-post-card href=\"/blog/…\">\n * <bd-img slot=\"media\" src=\"/cover.jpg\" alt=\"\"></bd-img>\n * <bd-badge slot=\"badge\" variant=\"info\" appearance=\"shade\" size=\"sm\">Consumer Insights</bd-badge>\n * <bd-h slot=\"title\" as=\"h3\">They Wear Our Faces: …</bd-h>\n * <span slot=\"read-more\">Read more</span>\n * </bd-post-card>\n *\n * LOOKS AND LAYOUTS. `appearance` is the look: `standard` is the framed\n * card, the page's ground with an edge; `frameless` is the blog's, with no\n * ground and no edge, the cover at the card corner in the 1.91:1 of a\n * shared post's image, the page's chips (bd-tag appearance=\"chip\") over its\n * corner and the title semibold. `layout` is the arrangement: `auto` is the\n * card's own -- a column, which the standard card turns into a row, the\n * cover on the left, wherever it is wide enough -- and `row` the blog's\n * listing row, a 170px square cover beside the chips, the meta and the\n * title, and the words alone where the card is narrower than 400px, as the\n * phone frame draws it.\n *\n * ONE LINK PER CARD, NAMED BY ITS TITLE. The title is the link: with an\n * `href` its slot sits inside the <a>, so the link is named by the title's\n * words and the heading inside it keeps its level, and the link's box is\n * stretched over the whole card, so a click anywhere follows it. \"Read\n * more\" is the visual cue and is hidden from a screen reader, which would\n * otherwise hear the same destination twice per card; with nothing in its\n * slot, or no `href`, the cue and its arrow are not drawn. The focus ring\n * is the card's, and focusing the card focuses the link (delegatesFocus),\n * which is how a listing hands focus to a card.\n *\n * THE COVER IS DECORATIVE: the link already names the post, so the card\n * takes its media out of the accessibility tree whatever alt it was given.\n * The chips over it stay in the tree.\n *\n * Inside a bd-related-articles it is one item of the listing's list,\n * through ElementInternals, so the role is the element's own and leaves the\n * page's markup alone; anywhere else it is no list item.\n *\n * The card sets the title's size; the page picks its level.\n */\n@defineElement(\"bd-post-card\")\nexport class BdPostCard extends LitElement {\n static shadowRootOptions: ShadowRootInit = { ...LitElement.shadowRootOptions, delegatesFocus: true };\n\n static styles = [postCardCSS];\n\n /** The post. Without it the card is not a link, and the cue is not drawn. */\n @property({ type: String })\n href = \"\";\n\n /** How it looks: standard (framed) or frameless (the blog's). */\n @property({ type: String, reflect: true })\n appearance: PostCardAppearance = \"standard\";\n\n /** How it is laid out: auto (the card's own) or row (a square cover beside the words). */\n @property({ type: String, reflect: true })\n layout: PostCardLayout = \"auto\";\n\n private readonly _internals = this.attachInternals();\n\n _slots = new SlotController(this, { slots: SLOTS });\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = LISTS.has(this.parentElement?.localName ?? \"\") ? \"listitem\" : null;\n }\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"appearance\") && !isOneOf(POST_CARD_APPEARANCES, this.appearance)) this.appearance = \"standard\";\n if (changed.has(\"layout\") && !isOneOf(POST_CARD_LAYOUTS, this.layout)) this.layout = \"auto\";\n }\n\n render() {\n const empty = (name: Slot) => !this._slots.has(name);\n const row = this.layout === \"row\";\n const title = html`<slot name=\"title\"></slot>`;\n /* The chips: over the cover's corner in a column, at the top of the\n words in a row, where the cover is drawn only from 400px wide. One\n slot, put where the layout reads it. */\n const badge = (where: \"badge\" | \"chips\") => html`<div class=${where} ?hidden=${empty(\"badge\")}><slot name=\"badge\"></slot></div>`;\n return html`\n <article class=\"card\">\n <div class=\"cover\" ?hidden=${empty(\"media\") && (row || empty(\"badge\"))}>\n <div class=\"art\" aria-hidden=\"true\"><slot name=\"media\"></slot></div>\n ${row ? nothing : badge(\"badge\")}\n </div>\n <div class=\"body\">\n ${row ? badge(\"chips\") : nothing}\n <div class=\"meta\" ?hidden=${empty(\"meta\")}><slot name=\"meta\"></slot></div>\n <div class=\"title\" ?hidden=${empty(\"title\")}>\n ${this.href ? html`<a class=\"link\" href=${this.href}>${title}</a>` : title}\n </div>\n <span class=\"more\" aria-hidden=\"true\" ?hidden=${!this.href || empty(\"read-more\")}\n ><slot name=\"read-more\"></slot><bd-icon name=\"arrow\" size=${this.appearance === \"frameless\" ? \"md\" : \"sm\"}></bd-icon\n ></span>\n </div>\n </article>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-post-card\": BdPostCard;\n }\n}\n"],"mappings":"A,0jBAkBA,IAAME,EAAQ,CAAC,QAAS,QAAS,OAAQ,QAAS,WAAW,EAIhDC,EAAwB,CAAC,WAAY,WAAW,EAIhDC,EAAoB,CAAC,OAAQ,KAAK,EAIzCC,kBAAQ,IAAI,IAAI,CAAC,qBAAqB,CAAC,EAgDhCC,EAAN,cAAyBC,CAAW,C,8BAOlC,KAAA,KAAA,GAI0B,KAAA,WAAA,WAIR,KAAA,OAAA,OAEK,KAAA,WAAA,KAAK,gBAAgB,EAE1C,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAOP,CAAM,CAAC,C,QAlBP,KAAA,kBAAA,CAAE,GAAGK,EAAW,kBAAmB,eAAgB,EAAK,C,QAEnF,KAAA,OAAA,CAACG,CAAW,C,CAkB5B,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,WAAW,KAAOL,EAAM,IAAI,KAAK,eAAe,WAAa,EAAE,EAAI,WAAa,IACvF,CAEA,WAAW,EAA+B,CACpCM,EAAQ,IAAI,YAAY,GAAK,CAACC,EAAQT,EAAuB,KAAK,UAAU,IAAG,KAAK,WAAa,YACjGQ,EAAQ,IAAI,QAAQ,GAAK,CAACC,EAAQR,EAAmB,KAAK,MAAM,IAAG,KAAK,OAAS,OACvF,CAEA,QAAS,CACP,IAAMS,EAAS,GAAe,CAAC,KAAK,OAAO,IAAIC,CAAI,EAC7CC,EAAM,KAAK,SAAW,MACtBC,EAAQ,CAAI,6BAIZC,EAAS,GAA6B,CAAI,cAAcC,EAAM,WAAWL,EAAM,OAAO,EAAE,mCAC9F,MAAO,EAAI;;qCAEsBA,EAAM,OAAO,IAAME,GAAOF,EAAM,OAAO,GAAG;;YAEnEE,EAAMI,EAAUF,EAAM,OAAO,EAAE;;;YAG/BF,EAAME,EAAM,OAAO,EAAIE,EAAQ;sCACLN,EAAM,MAAM,EAAE;uCACbA,EAAM,OAAO,EAAE;cACxC,KAAK,KAAO,CAAI,wBAAwB,KAAK,KAAK,GAAGG,EAAM,MAAQA,EAAM;;0DAE7B,CAAC,KAAK,MAAQH,EAAM,WAAW,EAAE;wEACnB,KAAK,aAAe,YAAc,KAAO,KAAK;;;;KAKpH,CACF,EApDGb,EAAA,CAAAoB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAd,EAAA,UAAA,OAAA,IAAA,EAAA,EAIzBN,EAAA,CAAAoB,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAd,EAAA,UAAA,aAAA,IAAA,EAAA,EAIxCN,EAAA,CAAAoB,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAd,EAAA,UAAA,SAAA,IAAA,EAAA,EAf1C,EAAAN,EAAA,CAAAqB,EAAc,cAAc,CAAA,EAAAf,CAAA,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;width:100%;max-width:426px;font-family:var(--typography-fontFamily-sans);flex-direction:column;display:flex}:host([hidden]){display:none}.card{box-sizing:border-box;background:var(--color-surface-default);border:var(--border-width-1) solid var(--color-border-container);border-radius:var(--card-radius);padding:var(--card-padding);text-align:start;--bd-ensemble-max-width:none;--bd-ensemble-inline-padding:0;flex-direction:column;flex:auto;display:flex;position:relative}:host([highlight]) .card{border:var(--border-width-2) solid var(--status-success-fill)}.card [hidden]{display:none}.banner{top:calc(-1 * var(--spacing-28));width:85%;padding:var(--spacing-16) var(--spacing-8);background:var(--status-success-fill);color:var(--status-success-on-fill);text-align:center;font-size:var(--typography-heading-h6-fontSize);font-weight:var(--typography-heading-h6-fontWeight);line-height:var(--typography-heading-h6-lineHeight);letter-spacing:var(--typography-heading-h6-letterSpacing);font-family:var(--typography-heading-h6-fontFamily);z-index:var(--z-base);border-start-start-radius:var(--shape-radius-2xl);border-start-end-radius:var(--shape-radius-2xl);position:absolute;left:50%;transform:translate(-50%)}.header{flex-direction:column;align-items:flex-start;display:flex}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h4-fontSize);--bd-heading-font-weight:var(--typography-heading-h4-fontWeight);--bd-heading-line-height:var(--typography-heading-h4-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h4-letterSpacing);--bd-heading-font-family:var(--typography-heading-h4-fontFamily);margin:0}.badges{gap:var(--spacing-8);flex-wrap:wrap;display:flex}.description{margin-top:var(--spacing-8);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily);color:var(--color-text-primary)}.header+.rule{margin-top:var(--spacing-16)}.price{margin-block:var(--spacing-16) var(--spacing-32)}.actions{gap:var(--spacing-12);margin-bottom:var(--spacing-20);flex-direction:column;display:flex}@media (width<768px){.banner{padding:var(--spacing-8)}.actions{gap:var(--spacing-8)}}`;export{t as default};
|
|
2
|
+
//# sourceMappingURL=pricing-card.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing-card.css.js","names":["pricing_card_css_default"],"sources":["../../../../src/components/pricing-card/pricing-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-pricing-card: 3.x v1's card (pricing-card.css.ts's .card,\n .highlight-banner, .card-header, .actions), the look that shipped. Its\n price zone is bd-pricing-price's, its features bd-pricing-feature-group's\n and bd-pricing-feature's, and the band under it bd-pricing-group's. */\nexport default css`\n /* As wide as its column, up to 3.x's card: .card's 360 measure, its 32\n inset either side and its edge. */\n :host {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n /* no token: 3.x's card measure, .card's max-width: 360px plus its\n --card-padding either side and its edge; no width on the scale is a\n card's */\n max-width: 426px;\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* White, with the border/container edge: the second clause of CLAUDE.md's\n ground-and-edge rule, for a card on the tint bd-pricing-group draws.\n As tall as its row. A page column met inside the card -- a billing\n bd-tab-group in the price slot -- draws none: the card is not a\n section. */\n .card {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n text-align: start;\n --bd-ensemble-max-width: none;\n --bd-ensemble-inline-padding: 0;\n }\n\n /* The highlighted plan's edge. */\n :host([highlight]) .card {\n /* The banner's green, so the edge is the banner's own fill role: no\n BORDER role carries it -- --status-success-border is a hairline four\n steps lighter, which a dark page turns dark. The fill is the same\n green-700 in both themes, as the banner is. */\n border: var(--border-width-2) solid var(--status-success-fill);\n }\n\n /* Each part's box is hidden while its slot is empty; the attribute's\n selector outweighs the display a box sets below. */\n .card [hidden] {\n display: none;\n }\n\n /* The highlighted card's ribbon, over its top edge: the success fill and\n its ink (bd-badge's fill pair), 85% of the card wide, centred, the top\n corners rounded. 3.x's -30px, on the scale. It is a label, not a\n heading, set in the heading-h6 role as bd-product-hero sets its kicker\n in heading-h4: 16 at 320 to 18 from 992. */\n .banner {\n position: absolute;\n top: calc(-1 * var(--spacing-28));\n left: 50%;\n transform: translateX(-50%);\n width: 85%;\n padding: var(--spacing-16) var(--spacing-8);\n background: var(--status-success-fill);\n color: var(--status-success-on-fill);\n border-start-start-radius: var(--shape-radius-2xl);\n border-start-end-radius: var(--shape-radius-2xl);\n text-align: center;\n font-size: var(--typography-heading-h6-fontSize);\n font-weight: var(--typography-heading-h6-fontWeight);\n line-height: var(--typography-heading-h6-lineHeight);\n letter-spacing: var(--typography-heading-h6-letterSpacing);\n font-family: var(--typography-heading-h6-fontFamily);\n z-index: var(--z-base);\n }\n\n .header {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n /* The plan's name: 3.x's h4, the heading-h4 role, at the level the page\n picks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h4\"))}\n margin: 0;\n }\n\n .badges {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-8);\n }\n\n /* What the plan covers (\"1 account & 5 devices\"): 3.x's bd-p small, 8\n under the badge, in primary ink. */\n .description {\n margin-top: var(--spacing-8);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* 16 under the header, where 3.x's line under the description stood after\n its paragraph's margin. */\n .header + .rule {\n margin-top: var(--spacing-16);\n }\n\n /* 3.x's .pricing: 16 above the price zone, and 32 below it -- its own 16\n and the 16 its small print's paragraph carried. */\n .price {\n margin-block: var(--spacing-16) var(--spacing-32);\n }\n\n /* The buttons, stacked and as wide as the card, 12 apart (8 below md), 20\n above the rule over the features. */\n .actions {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-12);\n margin-bottom: var(--spacing-20);\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n .banner {\n padding: var(--spacing-8);\n }\n\n .actions {\n gap: var(--spacing-8);\n }\n }\n`;\n"],"mappings":"A,4DAOA,IAAAA,EAAe,CAAG,w0E"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
4
|
+
import "./pricing-price.js";
|
|
5
|
+
import "./pricing-group.js";
|
|
6
|
+
import "./pricing-feature-group.js";
|
|
7
|
+
import "./pricing-feature.js";
|
|
8
|
+
import "../accordion/accordion-item.js";
|
|
9
|
+
import "../badge/badge.js";
|
|
10
|
+
import "../button/button.js";
|
|
11
|
+
import "../divider/divider.js";
|
|
12
|
+
import "../h/h.js";
|
|
13
|
+
import "../link/link.js";
|
|
14
|
+
import "../p/p.js";
|
|
15
|
+
type Part = "banner" | "title" | "badge" | "description" | "price" | "actions" | "";
|
|
16
|
+
/**
|
|
17
|
+
* A plan's pricing card: its name, the plan badge and a line on what it
|
|
18
|
+
* covers, the store's price, the Buy and Learn More buttons, and its features.
|
|
19
|
+
*
|
|
20
|
+
* <bd-product product-id="ps_i">
|
|
21
|
+
* <bd-option devices="5" subscription="1" data-layer-event="info">
|
|
22
|
+
* <bd-pricing-card highlight>
|
|
23
|
+
* <span slot="banner">Best value</span>
|
|
24
|
+
* <bd-h slot="title" as="h3">Bitdefender Premium Security</bd-h>
|
|
25
|
+
* <bd-badge slot="badge" variant="brand" appearance="fill">Individual</bd-badge>
|
|
26
|
+
* <span slot="description">1 account & 5 devices</span>
|
|
27
|
+
* <bd-pricing-price slot="price">…</bd-pricing-price>
|
|
28
|
+
* <bd-button slot="actions" buy-link appearance="accent" full-width label="Buy Now, Bitdefender Premium Security">Buy Now</bd-button>
|
|
29
|
+
* <bd-button slot="actions" href="/premium-security" appearance="ghost" full-width label="Learn more about Bitdefender Premium Security">Learn More</bd-button>
|
|
30
|
+
* <bd-pricing-feature-group>…</bd-pricing-feature-group>
|
|
31
|
+
* </bd-pricing-card>
|
|
32
|
+
* </bd-option>
|
|
33
|
+
* </bd-product>
|
|
34
|
+
*
|
|
35
|
+
* It replaces 3.x's three cards: pricing-card and pricing-card-family, two
|
|
36
|
+
* copies of one card that differed in the plan badge, the line under it and
|
|
37
|
+
* `planType`'s default, and v2's new-pricing-card, an experiment that never
|
|
38
|
+
* shipped. The look is v1's, the card that did: white with an edge on the
|
|
39
|
+
* band bd-pricing-group draws, a green edge and the green banner over it
|
|
40
|
+
* when highlighted.
|
|
41
|
+
*
|
|
42
|
+
* THE STORE'S NODES ARE THE PAGE'S. v1 rendered its price zone and buttons
|
|
43
|
+
* into the light DOM, so the store and anything reading the page found
|
|
44
|
+
* them. The card's frame is a shadow root now, and everything the store
|
|
45
|
+
* fills is the page's own markup, slotted: the bd-pricing-price nodes with
|
|
46
|
+
* their data-store-* attributes and the bd-button buy-link, inside the
|
|
47
|
+
* bd-product and bd-option the page wraps the card in. Each node's request
|
|
48
|
+
* for the store's scope bubbles through the card's slot to that bd-option.
|
|
49
|
+
* Nothing store-bound renders in this shadow root, so the card has no
|
|
50
|
+
* `shadow` opt-in; nor `product-id`, `devices` or `subscription`, which are
|
|
51
|
+
* the page's bd-product's and bd-option's.
|
|
52
|
+
*
|
|
53
|
+
* Every part is slotted and drawn by the card: the title at 3.x's h4 size
|
|
54
|
+
* (heading-h4) at the level the page picks, the description at body-small,
|
|
55
|
+
* both in primary ink; nothing has a fallback. 3.x's English -- "Best
|
|
56
|
+
* value", "Individual", "1 account & 5 devices", "Buy Now", "Learn More",
|
|
57
|
+
* the feature lists -- is the page's, in the stories. The title is the
|
|
58
|
+
* page's words as written: 3.x parsed "Bitdefender" onto a line of its own
|
|
59
|
+
* and coloured "Plus". The buttons are named by their `label`, as 3.x
|
|
60
|
+
* composed it ("Buy Now, {title}", "Learn more about {title}"), and Learn
|
|
61
|
+
* More is a link wherever the page gives it an href.
|
|
62
|
+
*
|
|
63
|
+
* Each part's box is hidden while its slot is empty; the banner is drawn
|
|
64
|
+
* only with `highlight`, and the rule above the features only with features.
|
|
65
|
+
* A billing choice is page markup too: a bd-tab-group in `price`, one
|
|
66
|
+
* bd-pricing-price in each of its panels.
|
|
67
|
+
*/
|
|
68
|
+
export declare class BdPricingCard extends LitElement {
|
|
69
|
+
static styles: import("lit").CSSResult[];
|
|
70
|
+
/** The highlighted plan: a green edge, and the `banner` drawn over the card's top edge. Reflected. */
|
|
71
|
+
highlight: boolean;
|
|
72
|
+
_slots: SlotController<Part>;
|
|
73
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
74
|
+
}
|
|
75
|
+
declare global {
|
|
76
|
+
interface HTMLElementTagNameMap {
|
|
77
|
+
"bd-pricing-card": BdPricingCard;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export {};
|