@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
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import"./stat
|
|
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{SlotController as n}from"../shared/controller.slot.js";import{statCSS as r}from"./stat.css.js";import"./stat-highlight.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends i{constructor(...e){super(...e),this.label=``,this._slots=new n(this,{slots:[`value`,`caption`],text:[`value`,`caption`]})}static{this.styles=[r]}render(){let e=e=>this._slots.has(e),t=!!this.label,n=[`value`,`caption`].filter(e);return a`
|
|
2
|
+
<div
|
|
3
|
+
class="tile"
|
|
4
|
+
role="group"
|
|
5
|
+
aria-label=${t?`${this.label} ${this._slots.text(`caption`)}`.trim():o}
|
|
6
|
+
aria-labelledby=${!t&&n.length?n.join(` `):o}
|
|
7
|
+
>
|
|
8
|
+
<p class="value" id="value" aria-hidden=${t?`true`:o} ?hidden=${!e(`value`)}><slot name="value"></slot></p>
|
|
9
|
+
<p class="caption" id="caption" aria-hidden=${t?`true`:o} ?hidden=${!e(`caption`)}><slot name="caption"></slot></p>
|
|
10
|
+
</div>
|
|
11
|
+
`}};t([s({type:String,attribute:`label`})],c.prototype,`label`,void 0),c=t([e(`bd-stat`)],c);export{c as BdStat};
|
|
12
|
+
//# sourceMappingURL=stat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat.js","names":["_decorate","__decorate","BdStat","LitElement","_args","SlotController","statCSS","has","part","spelled","parts","nothing","property","defineElement"],"sources":["../../../../src/components/stat/stat.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The ./stat export registers both figures: this one, and the oversized\n figure a section leads with. */\nimport \"./stat-highlight.ts\";\nimport { statCSS } from \"./stat.css.ts\";\n\ntype Part = \"value\" | \"caption\";\n\n/**\n * One figure from the Why-trust stat grid: a display value over a short\n * caption, on surface/info. The caption is pinned to the tile's foot so a row\n * of tiles lines its captions up, whatever each value's length. Drawn in the\n * foundation Figma file as Stat tile.\n *\n * <bd-stat>\n * <span slot=\"value\">580+</span>\n * <span slot=\"caption\">Patents filed, including breakthroughs in machine learning.</span>\n * </bd-stat>\n *\n * It was bd-stat-tile, whose `value` and `caption` were attributes. Both are\n * text slots now, and the stat sets their type and ink; each one's box is\n * hidden while its slot is empty.\n *\n * The value and caption are read as one statement -- \"580+ patents filed\" --\n * so the stat is a group named by both. Its name is the slotted words\n * themselves (aria-labelledby at the two boxes), unless `label` spells the\n * value out where its short form reads badly aloud (\"50 billion plus\"): then\n * the name is the label and the caption's text, as 3.x composed it, and the\n * visible parts are hidden from the tree so the figure is not read twice. A\n * name set as a string cannot follow the caption by reference, so the caption\n * is copied, and an edit to it renders the name again.\n */\n@defineElement(\"bd-stat\")\nexport class BdStat extends LitElement {\n static styles = [statCSS];\n\n /** The value spelled out for a screen reader; never shown. */\n @property({ type: String, attribute: \"label\" })\n label = \"\";\n\n _slots = new SlotController<Part>(this, { slots: [\"value\", \"caption\"], text: [\"value\", \"caption\"] });\n\n render() {\n const has = (part: Part) => this._slots.has(part);\n const spelled = !!this.label;\n const parts = ([\"value\", \"caption\"] as const).filter(has);\n return html`\n <div\n class=\"tile\"\n role=\"group\"\n aria-label=${spelled ? `${this.label} ${this._slots.text(\"caption\")}`.trim() : nothing}\n aria-labelledby=${!spelled && parts.length ? parts.join(\" \") : nothing}\n >\n <p class=\"value\" id=\"value\" aria-hidden=${spelled ? \"true\" : nothing} ?hidden=${!has(\"value\")}><slot name=\"value\"></slot></p>\n <p class=\"caption\" id=\"caption\" aria-hidden=${spelled ? \"true\" : nothing} ?hidden=${!has(\"caption\")}><slot name=\"caption\"></slot></p>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-stat\": BdStat;\n }\n}\n"],"mappings":"A,4YAsCO,IAAME,EAAN,cAAqBC,CAAW,C,8BAK7B,KAAA,MAAA,GAEC,KAAA,OAAA,IAAIE,EAAqB,KAAM,CAAE,MAAO,CAAC,QAAS,SAAS,EAAG,KAAM,CAAC,QAAS,SAAS,CAAE,CAAC,C,QANnF,KAAA,OAAA,CAACC,CAAO,C,CAQxB,QAAS,CACP,IAAMC,EAAO,GAAe,KAAK,OAAO,IAAIC,CAAI,EAC1CC,EAAU,CAAC,CAAC,KAAK,MACjBC,EAAS,CAAC,QAAS,SAAS,CAAC,CAAW,OAAOH,CAAG,EACxD,MAAO,EAAI;;;;qBAIME,EAAU,GAAG,KAAK,MAAM,GAAG,KAAK,OAAO,KAAK,SAAS,IAAI,KAAK,EAAIE,EAAQ;0BACrE,CAACF,GAAWC,EAAM,OAASA,EAAM,KAAK,GAAG,EAAIC,EAAQ;;kDAE7BF,EAAU,OAASE,EAAQ,WAAW,CAACJ,EAAI,OAAO,EAAE;sDAChDE,EAAU,OAASE,EAAQ,WAAW,CAACJ,EAAI,SAAS,EAAE;;KAG1G,CACF,EArBGP,EAAA,CAAAY,EAAS,CAAE,KAAM,OAAQ,UAAW,OAAQ,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAL/C,EAAAF,EAAA,CAAAa,EAAc,SAAS,CAAA,EAAAX,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as e}from"lit";var t=e`:host{display:inline-flex}label{align-items:center;gap:var(--spacing-8);padding:var(--spacing-2);font-family:var(--typography-fontFamily-sans);font-size:var(--typography-body-small-fontSize);line-height:var(--typography-body-small-lineHeight);color:var(--color-text-primary);cursor:pointer;outline:none;display:inline-flex}input{clip-path:inset(50%);width:1px;height:1px;margin:-1px;position:absolute;overflow:hidden}.track{width:var(--dimension-40);height:var(--dimension-24);background:var(--color-border-default);border-radius:var(--radius-full);transition:background-color var(--transition-duration-normal) var(--transition-easing-smooth);--bd-switch-inset:calc((var(--dimension-24) - var(--dimension-20)) / 2);--bd-switch-travel:calc(var(--dimension-40) - var(--dimension-20) - 2 * var(--bd-switch-inset));flex:none;position:relative}.thumb{--_dir:1;top:var(--bd-switch-inset);width:var(--dimension-20);height:var(--dimension-20);background:var(--color-action-on-fill);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-duration-normal) var(--transition-easing-smooth);position:absolute;inset-inline-start:var(--bd-switch-inset)}:host([checked]) .track{background:var(--color-action-primary)}label:hover .track{background:var(--color-
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{display:inline-flex}label{align-items:center;gap:var(--spacing-8);padding:var(--spacing-2);font-family:var(--typography-fontFamily-sans);font-size:var(--typography-body-small-fontSize);line-height:var(--typography-body-small-lineHeight);color:var(--color-text-primary);cursor:pointer;outline:none;display:inline-flex}input{clip-path:inset(50%);width:1px;height:1px;margin:-1px;position:absolute;overflow:hidden}.track{width:var(--dimension-40);height:var(--dimension-24);background:var(--color-border-default);border-radius:var(--radius-full);transition:background-color var(--transition-duration-normal) var(--transition-easing-smooth);--bd-switch-inset:calc((var(--dimension-24) - var(--dimension-20)) / 2);--bd-switch-travel:calc(var(--dimension-40) - var(--dimension-20) - 2 * var(--bd-switch-inset));flex:none;position:relative}.thumb{--_dir:1;top:var(--bd-switch-inset);width:var(--dimension-20);height:var(--dimension-20);background:var(--color-action-on-fill);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-duration-normal) var(--transition-easing-smooth);position:absolute;inset-inline-start:var(--bd-switch-inset)}:host([checked]) .track{background:var(--color-action-primary)}label:hover .track{background:color-mix(in srgb, var(--color-border-default), var(--color-text-primary) 25%)}:host([checked]) label:hover .track{background:var(--color-action-primary-hover)}:host(:dir(rtl)) .thumb{--_dir:-1}:host([checked]) .thumb{transform:translateX(calc(var(--_dir) * var(--bd-switch-travel)));background:var(--color-brand-on-fill)}label:has(input:focus-visible){box-shadow:var(--focus-outline-primary);outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);border-radius:var(--focus-outline-radius)}:host(:disabled) label{cursor:not-allowed;color:var(--color-text-subtle)}:host(:disabled) label:hover .track,:host(:disabled) .track{background:var(--color-border-subtle)}@media (prefers-reduced-motion:reduce){.track,.thumb{transition:none}}@media (forced-colors:active){.track,.thumb{forced-color-adjust:none}.track,label:hover .track{outline:var(--border-width-1) solid CanvasText;outline-offset:calc(-1 * var(--border-width-1));background:canvas}.thumb{box-shadow:none;background:canvastext}:host([checked]) .track,:host([checked]) label:hover .track{background:highlight;outline-color:highlight}:host([checked]) .thumb{background:highlighttext}:host(:disabled) .track,:host(:disabled) label:hover .track{background:canvas;outline-color:graytext}:host(:disabled) .thumb{background:graytext}}`;export{t as default,t as switchCSS};
|
|
2
2
|
//# sourceMappingURL=switch.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.css.js","names":["switchCSS"],"sources":["../../../../src/components/switch/switch.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const switchCSS = css`\n :host { display: inline-flex; }\n\n /* The row is the control, matching bd-checkbox and bd-radio: same gap, same\n padding, same type, same inherited weight. This was the label-default\n weight (medium) where those two inherit normal, so a switch label sat\n bolder than a checkbox label on the same line of the same form.\n\n Padding rather than a min-height, so the focus ring below insets evenly on\n all four sides. */\n label {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-8);\n padding: var(--spacing-2);\n font-family: var(--typography-fontFamily-sans);\n /* body-small: sm / normal / 1.5, which is what this already rendered on all\n three axes. Only the axes this rule declares are adopted -- the role also\n carries a family and a tracking, and importing those would change text\n the rule never spoke for. */\n font-size: var(--typography-body-small-fontSize);\n line-height: var(--typography-body-small-lineHeight);\n color: var(--color-text-primary);\n cursor: pointer;\n outline: none;\n }\n\n /* the real control stays in the accessibility tree */\n input {\n position: absolute;\n /* no token: 1px is the clip idiom's own measure, not a border. It was\n spelled --border-width-1, which resolves to the same pixel and reads as\n a category error — the lint already sanctions the literal here, as it\n does the -1px below. */\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n }\n\n /* neutral-400, not neutral-300: off is a state the user has to be able to\n perceive, so 1.4.11 wants 3:1 against the page. neutral-300 measured 2.27\n and neutral-400 measures 3.23 — the same step bd-
|
|
1
|
+
{"version":3,"file":"switch.css.js","names":["switchCSS"],"sources":["../../../../src/components/switch/switch.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const switchCSS = css`\n :host { display: inline-flex; }\n\n /* The row is the control, matching bd-checkbox and bd-radio: same gap, same\n padding, same type, same inherited weight. This was the label-default\n weight (medium) where those two inherit normal, so a switch label sat\n bolder than a checkbox label on the same line of the same form.\n\n Padding rather than a min-height, so the focus ring below insets evenly on\n all four sides. */\n label {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-8);\n padding: var(--spacing-2);\n font-family: var(--typography-fontFamily-sans);\n /* body-small: sm / normal / 1.5, which is what this already rendered on all\n three axes. Only the axes this rule declares are adopted -- the role also\n carries a family and a tracking, and importing those would change text\n the rule never spoke for. */\n font-size: var(--typography-body-small-fontSize);\n line-height: var(--typography-body-small-lineHeight);\n color: var(--color-text-primary);\n cursor: pointer;\n outline: none;\n }\n\n /* the real control stays in the accessibility tree */\n input {\n position: absolute;\n /* no token: 1px is the clip idiom's own measure, not a border. It was\n spelled --border-width-1, which resolves to the same pixel and reads as\n a category error — the lint already sanctions the literal here, as it\n does the -1px below. */\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n }\n\n /* neutral-400, not neutral-300: off is a state the user has to be able to\n perceive, so 1.4.11 wants 3:1 against the page. neutral-300 measured 2.27\n and neutral-400 measures 3.23 — the same step bd-input already uses\n for the edge of a control. It is also the boundary the white thumb is read\n against, which was failing for the same reason.\n The disabled track below stays lighter; disabled is exempt under 1.4.3. */\n .track {\n position: relative;\n width: var(--dimension-40);\n height: var(--dimension-24);\n background: var(--color-border-default);\n border-radius: var(--radius-full);\n transition: background-color var(--transition-duration-normal) var(--transition-easing-smooth);\n flex: none;\n }\n\n /* The thumb's inset and travel are derived from the two boxes they sit\n between, in px like those boxes. They were --spacing-2 and --spacing-16,\n which are rem, inside a track that is --dimension-* and so is not: at a\n 24px root the thumb rode 3px in and travelled 24px, and finished at 47px\n in a 40px track. A knob has to stay on the track it belongs to at any text\n size, so all four lengths are now one unit. Inset is half the height left\n over; travel is the width left over after both insets: 2px and 16px. */\n .track {\n --bd-switch-inset: calc((var(--dimension-24) - var(--dimension-20)) / 2);\n --bd-switch-travel: calc(var(--dimension-40) - var(--dimension-20) - 2 * var(--bd-switch-inset));\n }\n\n /* The thumb starts at the inline start and travels toward the end, so on a\n right-to-left page off is on the right, as a native switch draws it.\n --_dir turns the travel round, the multiplier bd-pagination-dots uses for\n its fill. */\n .thumb {\n --_dir: 1;\n position: absolute;\n top: var(--bd-switch-inset);\n inset-inline-start: var(--bd-switch-inset);\n width: var(--dimension-20);\n height: var(--dimension-20);\n /* the knob on the track, white on both tracks: --color-action-on-fill,\n like the checkbox mark, not the page colour it happens to equal here */\n background: var(--color-action-on-fill);\n border-radius: var(--radius-full);\n box-shadow: var(--shadow-sm);\n transition: transform var(--transition-duration-normal) var(--transition-easing-smooth);\n }\n\n :host([checked]) .track { background: var(--color-action-primary); }\n\n /* The off track is --color-border-default, and its hover moves a quarter of\n the way toward the primary ink: neutral-500 in light (#6b727a, where the\n step it replaced is #6a737e), and one step lighter than the track on a\n dark page, where neutral-500 was the track itself and the hover showed\n nothing. The border roles name no hover step -- this is the only track\n that hovers -- so it is written from the two roles, not a new one. */\n label:hover .track { background: color-mix(in srgb, var(--color-border-default), var(--color-text-primary) 25%); }\n :host([checked]) label:hover .track { background: var(--color-action-primary-hover); }\n :host(:dir(rtl)) .thumb { --_dir: -1; }\n :host([checked]) .thumb { transform: translateX(calc(var(--_dir) * var(--bd-switch-travel))); }\n /* On the checked track the thumb sits on the brand fill, so it takes the\n brand's ink; on the off track it stays white, the foundation's own pair. */\n :host([checked]) .thumb { background: var(--color-brand-on-fill); }\n\n /* the one focus ring — see Foundations/Focus. On the row rather than the\n track, so the target and the indicator are the same shape here as on\n bd-checkbox and bd-radio. */\n label:has(input:focus-visible) {\n box-shadow: var(--focus-outline-primary);\n /* forced-colors mode does not paint box-shadow, so the ring\n vanishes there; it does paint an outline, in a system colour. This one\n is transparent everywhere else, and the offset lands it on the ring's\n outer band. */\n outline: var(--border-width-2) solid transparent;\n outline-offset: var(--focus-outline-offset);\n border-radius: var(--focus-outline-radius);\n }\n\n /* :disabled rather than [disabled], so a <fieldset disabled> around the\n switch greys it too: a form-associated element matches :disabled for\n both. */\n :host(:disabled) label { cursor: not-allowed; color: var(--color-text-subtle); }\n :host(:disabled) label:hover .track,\n :host(:disabled) .track { background: var(--color-border-subtle); }\n\n @media (prefers-reduced-motion: reduce) {\n .track, .thumb { transition: none; }\n }\n\n /* Forced colours repaint every background as Canvas, so the track and the\n thumb both vanished there, on and off alike, and only the label was left.\n The two opt out and state system colours, as bd-progress does: off is a\n CanvasText ring round a CanvasText knob, on is a Highlight track with a\n HighlightText knob -- the pair a forced palette keeps apart for a\n selected thing -- and disabled is GrayText. The ring is an outline drawn\n inward, not a border, so the thumb's inset and travel are untouched. The\n hover selectors are repeated because they outrank these, and the knob's\n shadow goes because opting out would otherwise paint it. */\n @media (forced-colors: active) {\n .track,\n .thumb {\n forced-color-adjust: none;\n }\n\n .track,\n label:hover .track {\n background: Canvas;\n outline: var(--border-width-1) solid CanvasText;\n outline-offset: calc(-1 * var(--border-width-1));\n }\n\n .thumb {\n background: CanvasText;\n box-shadow: none;\n }\n\n :host([checked]) .track,\n :host([checked]) label:hover .track {\n background: Highlight;\n outline-color: Highlight;\n }\n\n :host([checked]) .thumb { background: HighlightText; }\n\n :host(:disabled) .track,\n :host(:disabled) label:hover .track {\n background: Canvas;\n outline-color: GrayText;\n }\n\n :host(:disabled) .thumb { background: GrayText; }\n }\n`;\n\nexport default switchCSS;\n"],"mappings":"A,0BAGA,IAAaA,EAAY,CAAG,siF"}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import "../shared/events.js";
|
|
3
2
|
import "../../tokens/tokens.js";
|
|
3
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
4
4
|
declare const BdSwitch_base: (new (...args: any[]) => import("../shared/form-control.js").FormControlInterface) & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* Turns something on or off, taking effect at once.
|
|
7
|
+
*
|
|
8
|
+
* <bd-switch name="alerts" checked><span slot="label">Scam alerts</span></bd-switch>
|
|
9
|
+
*
|
|
10
|
+
* A native checkbox with role="switch", inside a <label> that holds the page's
|
|
11
|
+
* `label` slot, so the slotted words are the switch's name.
|
|
12
|
+
*/
|
|
5
13
|
export declare class BdSwitch extends BdSwitch_base {
|
|
6
14
|
static styles: import("lit").CSSResult[];
|
|
7
15
|
checked: boolean;
|
|
8
16
|
disabled: boolean;
|
|
9
|
-
label: string;
|
|
10
17
|
name?: string;
|
|
11
18
|
value: string;
|
|
12
19
|
required: boolean;
|
|
13
20
|
_defaults?: {
|
|
14
21
|
checked: boolean;
|
|
15
22
|
};
|
|
23
|
+
protected _slots: SlotController<"label">;
|
|
16
24
|
connectedCallback(): void;
|
|
17
25
|
protected get _control(): HTMLInputElement | null;
|
|
18
26
|
protected _activate(): void;
|
|
@@ -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{FormControl as
|
|
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{SlotController as n}from"../shared/controller.slot.js";import{FormControl as r,omitEmpty as i}from"../shared/form-control.js";import a from"./switch.css.js";import{LitElement as o,html as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends r(o){constructor(...e){super(...e),this.checked=!1,this.disabled=!1,this.value=``,this.required=!1,this._slots=new n(this,{slots:[`label`]})}static{this.styles=[a]}connectedCallback(){super.connectedCallback(),this._defaults??={checked:this.checked}}get _control(){return this.renderRoot?.querySelector?.(`input`)}_activate(){this._control?.click()}updated(){this._internals.setFormValue(this.checked?this.value||`on`:null,String(this.checked)),this._mirrorValidity(this._control)}formResetCallback(){super.formResetCallback(),this._defaults&&(this.checked=this._defaults.checked)}formStateRestoreCallback(e){this.checked=e===`true`}_onKeydown(e){e.key===`Enter`&&(e.preventDefault(),this._submitImplicitly())}render(){return s`
|
|
2
2
|
<label>
|
|
3
3
|
<input
|
|
4
4
|
type="checkbox"
|
|
@@ -7,10 +7,11 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
7
7
|
?disabled=${this.disabled||this._formDisabled}
|
|
8
8
|
?required=${this.required}
|
|
9
9
|
@keydown=${this._onKeydown}
|
|
10
|
-
@
|
|
10
|
+
@input=${e=>{this.checked=e.target.checked}}
|
|
11
|
+
@change=${e=>{this.checked=e.target.checked,this._relayChange()}}
|
|
11
12
|
/>
|
|
12
13
|
<span class="track"><span class="thumb"></span></span>
|
|
13
|
-
<span
|
|
14
|
+
<span class="label" part="label" ?hidden=${!this._slots.has(`label`)}><slot name="label"></slot></span>
|
|
14
15
|
</label>
|
|
15
|
-
`}};t([
|
|
16
|
+
`}};t([c({type:Boolean,reflect:!0})],l.prototype,`checked`,void 0),t([c({type:Boolean,reflect:!0})],l.prototype,`disabled`,void 0),t([c({type:String,reflect:!0,converter:i})],l.prototype,`name`,void 0),t([c({type:String})],l.prototype,`value`,void 0),t([c({type:Boolean})],l.prototype,`required`,void 0),l=t([e(`bd-switch`)],l);export{l as BdSwitch};
|
|
16
17
|
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","names":["_decorate","__decorate","switchCSS","BdSwitch","FormControl","LitElement","_args","state","property","omitEmpty","defineElement"],"sources":["../../../../src/components/switch/switch.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { defineElement } from '#shared/define-element.ts';\
|
|
1
|
+
{"version":3,"file":"switch.js","names":["_decorate","__decorate","switchCSS","BdSwitch","FormControl","LitElement","_args","SlotController","state","property","omitEmpty","defineElement"],"sources":["../../../../src/components/switch/switch.ts"],"sourcesContent":["import { LitElement, html } 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 { switchCSS } from './switch.css.ts';\nimport { FormControl, omitEmpty } from '#shared/form-control.ts';\nimport { SlotController } from '#shared/controller.slot.ts';\n\n/**\n * Turns something on or off, taking effect at once.\n *\n * <bd-switch name=\"alerts\" checked><span slot=\"label\">Scam alerts</span></bd-switch>\n *\n * A native checkbox with role=\"switch\", inside a <label> that holds the page's\n * `label` slot, so the slotted words are the switch's name.\n */\n@defineElement('bd-switch')\nexport class BdSwitch extends FormControl(LitElement) {\n static styles = [switchCSS];\n\n @property({ type: Boolean, reflect: true })\n checked = false;\n @property({ type: Boolean, reflect: true })\n disabled = false;\n /* It always had a name and rendered it on the native input, where it did\n nothing: that input is in a shadow root and has no form. The host is\n what a form reads now, so the name reflects onto it -- see\n shared/form-control.ts. */\n @property({ type: String, reflect: true, converter: omitEmpty })\n name?: string;\n @property({ type: String })\n value = '';\n @property({ type: Boolean })\n required = false;\n\n _defaults?: { checked: boolean };\n protected _slots = new SlotController(this, { slots: ['label'] });\n\n connectedCallback() {\n super.connectedCallback();\n // what reset returns to, as in bd-checkbox: checked reflects, so the\n // attribute cannot hold the default\n this._defaults ??= { checked: this.checked };\n }\n\n protected get _control(): HTMLInputElement | null {\n return this.renderRoot?.querySelector?.('input');\n }\n\n // a native switch toggles when its label is clicked, or on el.click()\n protected _activate() {\n this._control?.click();\n }\n\n updated() {\n // with no value it submits \"on\", as the native checkbox under it would\n this._internals.setFormValue(this.checked ? this.value || 'on' : null, String(this.checked));\n this._mirrorValidity(this._control);\n }\n\n formResetCallback() {\n super.formResetCallback();\n // never connected, it has no default yet and keeps what it holds, as in\n // bd-checkbox\n if (!this._defaults) return;\n this.checked = this._defaults.checked;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.checked = state === 'true';\n }\n\n // Enter submits the form, as from the native checkbox under it; Space toggles\n _onKeydown(e: KeyboardEvent) {\n if (e.key !== 'Enter') return;\n e.preventDefault();\n this._submitImplicitly();\n }\n\n render() {\n return html`\n <label>\n <input\n type=\"checkbox\"\n role=\"switch\"\n .checked=${this.checked}\n ?disabled=${this.disabled || this._formDisabled}\n ?required=${this.required}\n @keydown=${this._onKeydown}\n @input=${(e: Event & { target: HTMLInputElement }) => {\n /* the native input leaves the shadow root by itself, and this\n runs on the native control before the page hears it, so\n event.target.checked is already the new state */\n this.checked = e.target.checked;\n }}\n @change=${(e: Event & { target: HTMLInputElement }) => {\n this.checked = e.target.checked;\n /* the native change, sent again from the host: it does not leave\n the shadow root on its own, and input does (shared/form-control.ts).\n 3.x sent bd-change with the boolean as detail; a listener reads\n event.target.checked now. */\n this._relayChange();\n }}\n />\n <span class=\"track\"><span class=\"thumb\"></span></span>\n <span class=\"label\" part=\"label\" ?hidden=${!this._slots.has('label')}><slot name=\"label\"></slot></span>\n </label>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-switch': BdSwitch;\n }\n}\n"],"mappings":"A,iaAkBO,IAAMG,EAAN,cAAuBC,EAAYC,CAAU,CAAC,AAAC,C,8BAI1C,KAAA,QAAA,GAEC,KAAA,SAAA,GAQH,KAAA,MAAA,GAEG,KAAA,SAAA,GAGQ,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,OAAO,CAAE,CAAC,C,QAlBhD,KAAA,OAAA,CAACL,CAAS,C,CAoB1B,mBAAoB,CAClB,MAAM,kBAAkB,EAGxB,KAAK,YAAc,CAAE,QAAS,KAAK,OAAQ,CAC7C,CAEA,IAAc,UAAoC,CAChD,OAAO,KAAK,YAAY,gBAAgB,OAAO,CACjD,CAGA,WAAsB,CACpB,KAAK,UAAU,MAAM,CACvB,CAEA,SAAU,CAER,KAAK,WAAW,aAAa,KAAK,QAAU,KAAK,OAAS,KAAO,KAAM,OAAO,KAAK,OAAO,CAAC,EAC3F,KAAK,gBAAgB,KAAK,QAAQ,CACpC,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EAGnB,KAAK,YACV,KAAK,QAAU,KAAK,UAAU,QAChC,CAEA,yBAAyB,EAAwC,CAC/D,KAAK,QAAUM,IAAU,MAC3B,CAGA,WAAW,EAAkB,CACvB,EAAE,MAAQ,UACd,EAAE,eAAe,EACjB,KAAK,kBAAkB,EACzB,CAEA,QAAS,CACP,MAAO,EAAI;;;;;qBAKM,KAAK,QAAQ;sBACZ,KAAK,UAAY,KAAK,cAAc;sBACpC,KAAK,SAAS;qBACf,KAAK,WAAW;mBACjB,GAA4C,CAIpD,KAAK,QAAU,EAAE,OAAO,OAC1B,EAAE;oBACS,GAA4C,CACrD,KAAK,QAAU,EAAE,OAAO,QAKxB,KAAK,aAAa,CACpB,EAAE;;;mDAGuC,CAAC,KAAK,OAAO,IAAI,OAAO,EAAE;;KAG3E,CACF,EAzFGR,EAAA,CAAAS,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAN,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzCH,EAAA,CAAAS,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAN,EAAA,UAAA,WAAA,IAAA,EAAA,EAMzCH,EAAA,CAAAS,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAWC,CAAU,CAAC,CAAA,EAAAP,EAAA,UAAA,OAAA,IAAA,EAAA,EAE9DH,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAS,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,EAAAN,EAAA,UAAA,WAAA,IAAA,EAAA,EAhB5B,EAAAH,EAAA,CAAAW,EAAc,WAAW,CAAA,EAAAR,CAAA,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);--bd-features-padding-bottom:0;display:block}:host([hidden]){display:none}:host([background=tint]){background:var(--status-brand-surface);--bd-features-padding-bottom:var(--spacing-32)}.root{box-sizing:border-box;flex-direction:column;align-items:center;display:flex}.title[hidden],.description[hidden]{display:none}.title{margin:var(--spacing-24);box-sizing:border-box;text-align:center;max-width:820px}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h3-fontSize);--bd-heading-font-weight:var(--typography-heading-h3-fontWeight);--bd-heading-line-height:var(--typography-heading-h3-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h3-letterSpacing);--bd-heading-font-family:var(--typography-heading-h3-fontFamily);margin:0}.description{box-sizing:border-box;margin:var(--spacing-32) var(--spacing-24);text-align:center;max-width:780px}::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing)}.tablist{margin:var(--spacing-24);border-bottom:var(--border-width-1) solid var(--bd-tab-border-color,var(--color-border-container));flex-wrap:wrap;justify-content:center;display:inline-flex}:host([appearance=switcher]) .tablist{gap:var(--spacing-4);padding:var(--spacing-4);border-radius:var(--radius-full);background:var(--color-action-primary);border-bottom:none;grid-auto-columns:1fr;grid-auto-flow:column;margin-inline:0;display:inline-grid}.panels{box-sizing:border-box;grid-template-columns:minmax(0,1fr);width:100%;display:grid}::slotted(bd-tab-panel){grid-area:1/1}.held::slotted(*){visibility:hidden;opacity:0}@media (width<576px){.tablist{gap:var(--spacing-4)}}`;export{t as default};
|
|
2
|
+
//# sourceMappingURL=tab-group.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-group.css.js","names":["tab_group_css_default"],"sources":["../../../../src/components/tab-group/tab-group.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, bodyRole, headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-tab-group: the header, the tablist and the panel area. The tabs' own\n look is tab.css.ts. The numbers are 3.x bd-tabs', whose title was a\n bd-highlight and whose strip was bd-tab-list's. */\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n /* bd-feature-columns in a panel closes with no pad of its own; the name\n is 3.x's, which feature-columns.css.ts still reads. */\n --bd-features-padding-bottom: 0;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* tint: the brand wash, full bleed behind the column, and the columns in\n it close with a pad again so their content does not meet the band's\n edge. */\n :host([background=\"tint\"]) {\n background: var(--status-brand-surface);\n --bd-features-padding-bottom: var(--spacing-32);\n }\n\n .root {\n display: flex;\n flex-direction: column;\n align-items: center;\n box-sizing: border-box;\n }\n\n .title[hidden],\n .description[hidden] {\n display: none;\n }\n\n /* 3.x's bd-highlight: centred, 24 clear of everything, in a measure of its\n own. */\n .title {\n margin: var(--spacing-24);\n box-sizing: border-box;\n /* no token: a centred title measure, deliberately narrower than the page\n column (--layout-ensemble-max-width); nothing on the scale sits between\n --content-width-readable and that column. bd-highlight's, which drew it */\n max-width: 820px;\n text-align: center;\n }\n\n /* The title: the heading-h3 role, the size 3.x's bd-highlight drew its\n h3 at, whatever level the page picks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h3\"))}\n margin: 0;\n }\n\n /* 3.x's subtitle: body-large, centred, 32 above and below. */\n .description {\n box-sizing: border-box;\n margin: var(--spacing-32) var(--spacing-24);\n /* no token: the subtitle's centred measure, narrower than the title's\n 820 and the page column; nothing on the scale sits there */\n max-width: 780px;\n text-align: center;\n }\n\n ::slotted([slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n }\n\n /* The strip: bd-tab-list's .bd-tabs-container. The slot is display:\n contents, so the tabs are its flex items.\n\n --bd-tab-border-color is the one 3.x --bd-tab-* knob kept, as a\n component token: the rule under the strip is drawn here, in the group's\n shadow root, which no rule of the page's reaches, and on a muted band\n border/container is the band's own colour (1.000:1). Every other knob\n was the tab's, which the page now styles directly (tab.css.ts). */\n .tablist {\n display: inline-flex;\n justify-content: center;\n flex-wrap: wrap;\n margin: var(--spacing-24);\n border-bottom: var(--border-width-1) solid var(--bd-tab-border-color, var(--color-border-container));\n }\n\n /* appearance=\"switcher\": the content switcher's track, 3.x bd-tab-list's\n .bd-tabs-container--switcher. A pill on the action fill, 4 inside it and\n 4 between options; each option draws itself (tab.css.ts).\n\n Every option is as wide as the widest, so a translation cannot make one\n bigger than another. 3.x measured the widest in script after\n fonts.ready and published it as --bd-switcher-option-width, having\n measured 1fr wrap and fall unequal; that was before the option was\n nowrap. Here it is CSS: an inline grid is sized to its content, and\n under that sizing every 1fr column is the widest column's max-content\n (CSS Grid, \"find the size of an fr\"), so the track hugs its options, the\n columns are equal, and the width follows a label or a late font with no\n script. Measured against 3.x's Content Switcher stories at 375 and 1280:\n the same widths to the hundredth of a pixel wherever the equal track\n fits its column (122.19 twice, 107.81 three times, 246.38 twice).\n Narrower than that, the track takes the column and the shorter options\n give up the difference, none below its own label: \"One\" beside \"A\n considerably longer label\" at 375 is 84.63 and 246.38 in a 343 track,\n where 3.x's measured 504.75 ran the page 146px wide.\n __tests__/tab-group.test.ts holds both. */\n :host([appearance=\"switcher\"]) .tablist {\n display: inline-grid;\n grid-auto-flow: column;\n grid-auto-columns: 1fr;\n gap: var(--spacing-4);\n padding: var(--spacing-4);\n /* The 24 above and below stay, apart from the title and the panel; the\n 24 either side go. The track is centred, so they only ever took room\n from a track as wide as the column, which cannot wrap as the strip\n does, and at 375 they would have cost three options their equal\n widths (295 of a 343 column, under the 339 the three need). */\n margin-inline: 0;\n border-bottom: none;\n border-radius: var(--radius-full);\n background: var(--color-action-primary);\n }\n\n /* Every panel in one cell: the shown one and, under it, the held ones,\n which are laid out and never drawn, so the row is the tallest panel's\n height and a tab switch moves nothing below the group. minmax(0, 1fr)\n keeps the track at the column's width: an auto track would grow to the\n widest panel's min-content and lay the shown panel out wider than the\n column. */\n .panels {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n width: 100%;\n box-sizing: border-box;\n }\n\n ::slotted(bd-tab-panel) {\n grid-area: 1 / 1;\n }\n\n /* Out of sight, still in layout: display: none would take the held panels\n out of the height they are here to hold. They are inert as well, which\n keeps them out of the tab order and the accessibility tree.\n\n visibility alone is not out of sight: it is inherited, so anything in a\n held panel that sets visibility: visible again -- a page's reveal class,\n bd-anchor-nav's opened actions -- would draw over the shown panel in\n this shared cell. Opacity is the panel's whole subtree as one group, and\n no descendant can take it back. */\n .held::slotted(*) {\n visibility: hidden;\n opacity: 0;\n }\n\n @media ${unsafeCSS(below(\"sm\"))} {\n .tablist {\n gap: var(--spacing-4);\n }\n }\n`;\n"],"mappings":"A,4DAMA,IAAAA,EAAe,CAAG,q5D"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
2
|
+
import { ObserverController } from "../shared/controller.observer.js";
|
|
3
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
4
|
+
import "../../tokens/tokens.js";
|
|
5
|
+
import { type TabAppearance } from "./tab.js";
|
|
6
|
+
import "./tab-panel.js";
|
|
7
|
+
import "../feature-columns/feature-columns.js";
|
|
8
|
+
import "../h/h.js";
|
|
9
|
+
import "../p/p.js";
|
|
10
|
+
declare const BACKGROUNDS: readonly ["none", "tint"];
|
|
11
|
+
type Background = typeof BACKGROUNDS[number];
|
|
12
|
+
/**
|
|
13
|
+
* A row of tabs over the panels they show, one at a time.
|
|
14
|
+
*
|
|
15
|
+
* <bd-tab-group>
|
|
16
|
+
* <bd-h slot="title" as="h2">The Ultimate Protection for all platforms</bd-h>
|
|
17
|
+
* <bd-p slot="description">Your digital safety is our top priority.</bd-p>
|
|
18
|
+
* <bd-tab panel="windows">Windows</bd-tab>
|
|
19
|
+
* <bd-tab panel="macos">macOS</bd-tab>
|
|
20
|
+
* <bd-tab-panel name="windows">…</bd-tab-panel>
|
|
21
|
+
* <bd-tab-panel name="macos">…</bd-tab-panel>
|
|
22
|
+
* </bd-tab-group>
|
|
23
|
+
*
|
|
24
|
+
* It was bd-tabs, and Web Awesome's wa-tab-group is the model. The page
|
|
25
|
+
* writes the tabs and panels as plain children, with no `slot`: the group's
|
|
26
|
+
* shadow root assigns its slots by hand (slotAssignment: "manual"), the tabs
|
|
27
|
+
* into its tablist and the shown panel into its panel area. Imperative slot
|
|
28
|
+
* assignment is Baseline Widely available since 2025-09-27 (Chrome 92,
|
|
29
|
+
* Firefox 92, Safari 16.4; webstatus.dev slot-assign, looked up 2026-11-04
|
|
30
|
+
* -- modern-web-guidance's shadow-dom guide covers slots but gives this no
|
|
31
|
+
* status). The title and the description are routed by their `slot`, as a
|
|
32
|
+
* named slot would. A child added, removed or renamed later, or a tab's
|
|
33
|
+
* `panel` or a panel's `name` changed, is routed again (_apply), and the
|
|
34
|
+
* routing reads attributes, so a tab or panel that upgrades after the group
|
|
35
|
+
* is routed the same.
|
|
36
|
+
*
|
|
37
|
+
* ## Every panel stays the page's
|
|
38
|
+
*
|
|
39
|
+
* Nothing is copied. 3.x rendered a copy of each panel, kept copies of the
|
|
40
|
+
* hidden ones as sizers in shadow roots of their own, and took the copies
|
|
41
|
+
* again whenever a panel changed; all of that is gone. The hidden panels are
|
|
42
|
+
* assigned too, to a second slot in the same grid cell as the shown one
|
|
43
|
+
* (tab-group.css.ts), where they take part in layout and are never drawn, so
|
|
44
|
+
* the panel area is as tall as the tallest panel and a tab switch moves
|
|
45
|
+
* nothing below it. A hidden panel is `inert` and held still (shared/hold.ts):
|
|
46
|
+
* its media paused and kept from autoplaying, its `paused` components
|
|
47
|
+
* paused, its embeds unloaded. Shown, it is released: its frames load again,
|
|
48
|
+
* and what the page wrote with autoplay plays. Content the page adds to a
|
|
49
|
+
* held panel later -- a block it decorates once the group is on it -- is held
|
|
50
|
+
* as it arrives.
|
|
51
|
+
*
|
|
52
|
+
* Two things follow from the panels being one tree with the page, and both
|
|
53
|
+
* are behaviour 3.x did not have. Leaving a tab no longer puts what it holds
|
|
54
|
+
* back as the page wrote it: an accordion opened there is still open when
|
|
55
|
+
* the reader comes back. And same-name radios in two panels are one group,
|
|
56
|
+
* as they would be anywhere in a page -- a choice in one clears the other's
|
|
57
|
+
* -- so each panel that asks its own question wraps its radios in a
|
|
58
|
+
* bd-radio-group.
|
|
59
|
+
*
|
|
60
|
+
* ## Names, roles and the keys
|
|
61
|
+
*
|
|
62
|
+
* bd-tab is role="tab" and bd-tab-panel role="tabpanel", each through
|
|
63
|
+
* ElementInternals. The tablist is named by the title, through the wrapper
|
|
64
|
+
* around its slot, or by `label` without one. Tab and panel are paired
|
|
65
|
+
* through ElementInternals' element references: the tab's
|
|
66
|
+
* ariaControlsElements and the panel's ariaLabelledByElements, so the group
|
|
67
|
+
* writes no id, aria-controls or aria-labelledby on the page's elements.
|
|
68
|
+
* They are Baseline Newly available, since 2025-04-04 (Chrome 135, Firefox
|
|
69
|
+
* 136, Safari 16.4; modern-web-guidance, accessible-web-components, looked up
|
|
70
|
+
* 2026-11-09), inside the target. The group hands each child its partner
|
|
71
|
+
* through the child's _pair() on every _apply. A child that has not upgraded
|
|
72
|
+
* when the group connects is paired on the apply after the group's first
|
|
73
|
+
* update: the family's definitions are imported before the group's, so by
|
|
74
|
+
* then it has. A tab or panel taken out of the group is unpaired. It also
|
|
75
|
+
* writes the roving tabindex -- the one way to put a host with an
|
|
76
|
+
* ElementInternals role in the tab order -- and `inert` on the held panels.
|
|
77
|
+
* CLAUDE.md (Brands) records these writes.
|
|
78
|
+
*
|
|
79
|
+
* The keys are the WAI-ARIA tabs pattern's, onTablistKeydown(): ArrowRight
|
|
80
|
+
* and ArrowLeft (mirrored on a right-to-left page), Home and End, a disabled
|
|
81
|
+
* tab skipped, and automatic activation, since showing a panel costs
|
|
82
|
+
* nothing.
|
|
83
|
+
*
|
|
84
|
+
* `active` is the name of the shown panel. Without one the first tab that is
|
|
85
|
+
* not disabled is shown, and its name written to `active`. A name no tab has
|
|
86
|
+
* yet is kept -- the page may be about to add the tab -- and the first is
|
|
87
|
+
* shown meanwhile; the shown tab taken away, the first is shown and written.
|
|
88
|
+
* The group sends bd-tab-show, `detail: { name }`, whenever the shown panel
|
|
89
|
+
* changes after the first, by the reader or by the page. It bubbles, so a
|
|
90
|
+
* group nested in another's panel reaches the outer group's listeners too:
|
|
91
|
+
* `event.target` says which group it was.
|
|
92
|
+
*
|
|
93
|
+
* ## Two appearances
|
|
94
|
+
*
|
|
95
|
+
* `appearance="switcher"` draws 3.x bd-tab-list's content switcher (Figma
|
|
96
|
+
* node 311:931): a pill track on the action fill, the shown tab on a white
|
|
97
|
+
* pill, every tab as wide as the widest and on one line. It is a look, not a
|
|
98
|
+
* second element (N2): the roles, the references, the keys and the hold are the
|
|
99
|
+
* same. The group hands `appearance` to its bd-tabs as an attribute, as it
|
|
100
|
+
* hands them `active`, and each tab draws its own pill (tab.css.ts); the
|
|
101
|
+
* track is this group's (tab-group.css.ts).
|
|
102
|
+
*
|
|
103
|
+
* The equal widths are CSS, where 3.x measured them in script after
|
|
104
|
+
* fonts.ready and published --bd-switcher-option-width: the track is an
|
|
105
|
+
* inline grid whose columns are each 1fr, and an inline grid sized to its
|
|
106
|
+
* content makes every flexible column as wide as the widest column's content
|
|
107
|
+
* (CSS Grid, "find the size of an fr"). So a translated label or a font that
|
|
108
|
+
* arrives late resizes the track with no script. tab-group.css.ts records
|
|
109
|
+
* where the two differ: only where the column is narrower than the equal
|
|
110
|
+
* track, and the measured numbers.
|
|
111
|
+
*
|
|
112
|
+
* ## Nested groups
|
|
113
|
+
*
|
|
114
|
+
* A group routes its own children only, so a group in another's panel -- the
|
|
115
|
+
* pricing card's billing tabs, in a panel of the plan tabs -- keeps its tabs,
|
|
116
|
+
* its panels and its keys: the outer group's lists, clicks and keys stop at
|
|
117
|
+
* its own children, and its hold reaches no further than the inner group's
|
|
118
|
+
* held panels (shared/hold.ts, "held roots nest"). The inner group's own
|
|
119
|
+
* `slot`, as in `<bd-tab-group slot="price">` inside a card, is its parent's
|
|
120
|
+
* business, not its children's.
|
|
121
|
+
*/
|
|
122
|
+
export declare class BdTabGroup extends LitElement {
|
|
123
|
+
static shadowRootOptions: ShadowRootInit;
|
|
124
|
+
static styles: import("lit").CSSResult[];
|
|
125
|
+
/** The `name` of the shown bd-tab-panel. Reflected; the first tab's panel when unset. */
|
|
126
|
+
active: string;
|
|
127
|
+
/** The strip's look: standard, the underlined strip, or switcher, the pill track. Handed to every bd-tab. */
|
|
128
|
+
appearance: TabAppearance;
|
|
129
|
+
/** The group's ground: none, or tint, the brand wash behind it. */
|
|
130
|
+
background: Background;
|
|
131
|
+
/** The tablist's accessible name while no title is slotted. No default. */
|
|
132
|
+
label: string;
|
|
133
|
+
_slots: SlotController<"title" | "description">;
|
|
134
|
+
_children: ObserverController<MutationObserver>;
|
|
135
|
+
private _shown;
|
|
136
|
+
private readonly _held;
|
|
137
|
+
private _panels;
|
|
138
|
+
private _pairedTabs;
|
|
139
|
+
connectedCallback(): void;
|
|
140
|
+
willUpdate(changed: PropertyValues<this>): void;
|
|
141
|
+
updated(): void;
|
|
142
|
+
_tabs(): Element[];
|
|
143
|
+
_tabPanels(): Element[];
|
|
144
|
+
private _resolve;
|
|
145
|
+
/**
|
|
146
|
+
* Everything the group hands its children, from what they are now: which
|
|
147
|
+
* tab and panel are active, the tabs' appearance, the references that
|
|
148
|
+
* pair them, the roving tabindex, which panels are inert and held,
|
|
149
|
+
* and the slot each child is assigned to. Idempotent; it runs on connect,
|
|
150
|
+
* after every update and on every routing change.
|
|
151
|
+
*/
|
|
152
|
+
_apply(): void;
|
|
153
|
+
private _route;
|
|
154
|
+
private _childAround;
|
|
155
|
+
private _onMutations;
|
|
156
|
+
private _tabFrom;
|
|
157
|
+
private _choose;
|
|
158
|
+
private _onClick;
|
|
159
|
+
private _onKeydown;
|
|
160
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
161
|
+
}
|
|
162
|
+
declare global {
|
|
163
|
+
interface HTMLElementTagNameMap {
|
|
164
|
+
"bd-tab-group": BdTabGroup;
|
|
165
|
+
}
|
|
166
|
+
interface HTMLElementEventMap {
|
|
167
|
+
"bd-tab-show": CustomEvent<{
|
|
168
|
+
name: string;
|
|
169
|
+
}>;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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"../p/p.js";import{ObserverController as r}from"../shared/controller.observer.js";import{SlotController as i}from"../shared/controller.slot.js";import"../h/h.js";import{ensembleCSS as a}from"../shared/ensemble.css.js";import"../feature-columns/feature-columns.js";import{hold as o,release as s}from"../shared/hold.js";import{onTablistKeydown as c}from"../shared/tablist.js";import l from"./tab-group.css.js";import{TAB_APPEARANCES as u}from"./tab.js";import"./tab-panel.js";import{LitElement as d,html as f,nothing as p}from"lit";import{property as m}from"lit/decorators.js";var h=[`none`,`tint`],g=[`title`,`description`],_=e=>e.localName===`bd-tab`&&!g.includes(e.slot),v=e=>e.localName===`bd-tab-panel`&&!g.includes(e.slot),y=e=>e.getAttribute(`panel`)??``,b=e=>e.getAttribute(`name`)??``,x=[`slot`,`panel`,`name`,`disabled`],S=[`src`,`srcdoc`,`autoplay`],C=class extends d{constructor(...e){super(...e),this.active=``,this.appearance=`standard`,this.background=`none`,this.label=``,this._slots=new i(this,{slots:[`title`,`description`]}),this._children=new r(this,()=>new MutationObserver(e=>this._onMutations(e)),e=>e.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[...x,...S]})),this._shown=``,this._held=/* @__PURE__ */ new WeakSet,this._panels=/* @__PURE__ */ new Set,this._pairedTabs=/* @__PURE__ */ new Set,this._onClick=e=>{let{tab:t}=this._tabFrom(e);t&&this._choose(t)},this._onKeydown=e=>{let{tabs:t,tab:n}=this._tabFrom(e);if(!n)return;let r=c(e,{count:t.length,current:t.indexOf(n),rtl:this.matches(`:dir(rtl)`),disabled:e=>t[e].hasAttribute(`disabled`)});r!==null&&this._choose(t[r],{focus:!0})}}static{this.shadowRootOptions={...d.shadowRootOptions,slotAssignment:`manual`}}static{this.styles=[a,l]}connectedCallback(){super.connectedCallback(),this._apply()}willUpdate(e){e.has(`appearance`)&&!t(u,this.appearance)&&(this.appearance=`standard`),e.has(`background`)&&!t(h,this.background)&&(this.background=`none`),this._resolve(this._tabs(),this._tabPanels())}updated(){this._apply()}_tabs(){return[...this.children].filter(_)}_tabPanels(){return[...this.children].filter(v)}_resolve(e,t){if((n=>n!==``&&(e.length?e.some(e=>y(e)===n):t.some(e=>b(e)===n)))(this.active))return this.active;let n=e.find(e=>y(e)&&!e.hasAttribute(`disabled`))??e.find(y),r=n?y(n):t.map(b).find(Boolean)??``;return r&&(!this.active||this.active===this._shown)&&(this.active=r),r}_apply(){let e=this._tabs(),t=this._tabPanels(),n=this._resolve(e,t),r=t=>e.find(e=>y(e)===t),i=e=>t.find(t=>b(t)===e),a=this.appearance===`switcher`,c=!1;for(let t of e){let e=y(t)===n;t.toggleAttribute(`active`,e),a?t.setAttribute(`appearance`,`switcher`):t.removeAttribute(`appearance`),t.setAttribute(`tabindex`,e&&!c?`0`:`-1`),c||=e,t._pair?.(i(y(t))??null)}for(let t of this._pairedTabs)e.includes(t)||t._pair?.(null);this._pairedTabs=new Set(e);for(let e of t){let t=b(e)===n;e.toggleAttribute(`active`,t),e.toggleAttribute(`inert`,!t),e._pair?.(r(b(e))??null),t&&this._held.has(e)?(this._held.delete(e),s(e)):!t&&!this._held.has(e)&&(this._held.add(e),o(e))}for(let e of this._panels)t.includes(e)||(e.removeAttribute(`inert`),e.removeAttribute(`active`),e._pair?.(null),this._held.has(e)&&(this._held.delete(e),s(e)));if(this._panels=new Set(t),this._route(e,t,n),!n)return;let l=this._shown;this._shown=n,l&&n!==l&&this.dispatchEvent(new CustomEvent(`bd-tab-show`,{detail:{name:n},bubbles:!0,composed:!0}))}_route(e,t,n){let r=e=>this.renderRoot.querySelector(e),i=r(`slot[name="title"]`);if(!i)return;let a=[...this.children];i.assign(...a.filter(e=>e.slot===`title`)),r(`slot[name="description"]`).assign(...a.filter(e=>e.slot===`description`)),r(`slot.tabs`).assign(...e),r(`slot.shown`).assign(...t.filter(e=>b(e)===n)),r(`slot.held`).assign(...t.filter(e=>b(e)!==n))}_childAround(e){for(;e&&e.parentNode!==this;)e=e.parentNode;return e}_onMutations(e){let t=!1,n=/* @__PURE__ */ new Set;for(let r of e){let e=r.target;if(e===this)t=!0;else if(e.parentNode===this&&r.type===`attributes`&&x.includes(r.attributeName))t=!0;else{let t=this._childAround(e);t&&this._held.has(t)&&n.add(t)}}t&&this._apply();for(let e of n)this._held.has(e)&&o(e)}_tabFrom(e){let t=this._tabs();return{tabs:t,tab:e.composedPath().find(e=>t.includes(e))}}_choose(e,{focus:t=!1}={}){if(e.hasAttribute(`disabled`))return;t&&e.focus();let n=y(e);n&&n!==this.active&&(this.active=n)}render(){let e=this._slots.has(`title`),t=this._slots.has(`description`);return f`
|
|
2
|
+
<div class="bd-ensemble root">
|
|
3
|
+
<div class="title" id="title" ?hidden=${!e}><slot name="title"></slot></div>
|
|
4
|
+
<div class="description" ?hidden=${!t}><slot name="description"></slot></div>
|
|
5
|
+
<div
|
|
6
|
+
class="tablist"
|
|
7
|
+
role="tablist"
|
|
8
|
+
aria-labelledby=${e?`title`:p}
|
|
9
|
+
aria-label=${!e&&this.label?this.label:p}
|
|
10
|
+
@click=${this._onClick}
|
|
11
|
+
@keydown=${this._onKeydown}
|
|
12
|
+
><slot class="tabs"></slot></div>
|
|
13
|
+
<div class="panels"><slot class="shown"></slot><slot class="held"></slot></div>
|
|
14
|
+
</div>
|
|
15
|
+
`}};n([m({type:String,reflect:!0,attribute:`active`})],C.prototype,`active`,void 0),n([m({type:String,reflect:!0,attribute:`appearance`})],C.prototype,`appearance`,void 0),n([m({type:String,reflect:!0,attribute:`background`})],C.prototype,`background`,void 0),n([m({type:String,attribute:`label`})],C.prototype,`label`,void 0),C=n([e(`bd-tab-group`)],C);export{C as BdTabGroup};
|
|
16
|
+
//# sourceMappingURL=tab-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-group.js","names":["tabGroupCSS","_decorate","__decorate","tab_group_css_default","BACKGROUNDS","NAMED","isTab","el","isPanel","panelOf","tab","nameOf","panel","ROUTING","MOVING","BdTabGroup","LitElement","_args","SlotController","ObserverController","records","observer","event","next","onTablistKeydown","tabs","index","ensembleCSS","changed","isOneOf","TAB_APPEARANCES","name","panels","first","shown","tabFor","panelFor","switcher","stop","on","gone","release","hold","was","slot","selector","title","children","node","reroute","record","target","child","focus","hasTitle","hasDescription","nothing","property","defineElement"],"sources":["../../../../src/components/tab-group/tab-group.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { ObserverController } from \"#shared/controller.observer.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { hold, release } from \"#shared/hold.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\nimport { onTablistKeydown } from \"#shared/tablist.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n// ./tab-group registers the family (N4)\nimport { TAB_APPEARANCES, type BdTab, type TabAppearance } from \"./tab.ts\";\nimport type { BdTabPanel } from \"./tab-panel.ts\";\nimport \"./tab-panel.ts\";\n/* The atoms the page writes into the title and description slots, and the\n columns 3.x's ./tabs registered beside bd-tabs, which most panels hold. */\nimport \"#components/feature-columns/feature-columns.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport tabGroupCSS from \"./tab-group.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\nconst BACKGROUNDS = [\"none\", \"tint\"] as const;\ntype Background = typeof BACKGROUNDS[number];\n\n/* The two slots a child names itself into; every other child is routed by\n what it is. */\nconst NAMED = [\"title\", \"description\"] as const;\nconst isTab = (el: Element) => el.localName === \"bd-tab\" && !NAMED.includes(el.slot as typeof NAMED[number]);\nconst isPanel = (el: Element) => el.localName === \"bd-tab-panel\" && !NAMED.includes(el.slot as typeof NAMED[number]);\n\n/* Read as attributes, not properties, so a child that has not upgraded yet\n is read the same as one that has. */\nconst panelOf = (tab: Element) => tab.getAttribute(\"panel\") ?? \"\";\nconst nameOf = (panel: Element) => panel.getAttribute(\"name\") ?? \"\";\n\n/* What a change to these on a child of the group can move: which slot it\n goes to, which tab and panel pair up, which tab the keys skip. */\nconst ROUTING = [\"slot\", \"panel\", \"name\", \"disabled\"];\n/* ...and what, inside a held panel, can start something again. */\nconst MOVING = [\"src\", \"srcdoc\", \"autoplay\"];\n\n/**\n * A row of tabs over the panels they show, one at a time.\n *\n * <bd-tab-group>\n * <bd-h slot=\"title\" as=\"h2\">The Ultimate Protection for all platforms</bd-h>\n * <bd-p slot=\"description\">Your digital safety is our top priority.</bd-p>\n * <bd-tab panel=\"windows\">Windows</bd-tab>\n * <bd-tab panel=\"macos\">macOS</bd-tab>\n * <bd-tab-panel name=\"windows\">…</bd-tab-panel>\n * <bd-tab-panel name=\"macos\">…</bd-tab-panel>\n * </bd-tab-group>\n *\n * It was bd-tabs, and Web Awesome's wa-tab-group is the model. The page\n * writes the tabs and panels as plain children, with no `slot`: the group's\n * shadow root assigns its slots by hand (slotAssignment: \"manual\"), the tabs\n * into its tablist and the shown panel into its panel area. Imperative slot\n * assignment is Baseline Widely available since 2025-09-27 (Chrome 92,\n * Firefox 92, Safari 16.4; webstatus.dev slot-assign, looked up 2026-11-04\n * -- modern-web-guidance's shadow-dom guide covers slots but gives this no\n * status). The title and the description are routed by their `slot`, as a\n * named slot would. A child added, removed or renamed later, or a tab's\n * `panel` or a panel's `name` changed, is routed again (_apply), and the\n * routing reads attributes, so a tab or panel that upgrades after the group\n * is routed the same.\n *\n * ## Every panel stays the page's\n *\n * Nothing is copied. 3.x rendered a copy of each panel, kept copies of the\n * hidden ones as sizers in shadow roots of their own, and took the copies\n * again whenever a panel changed; all of that is gone. The hidden panels are\n * assigned too, to a second slot in the same grid cell as the shown one\n * (tab-group.css.ts), where they take part in layout and are never drawn, so\n * the panel area is as tall as the tallest panel and a tab switch moves\n * nothing below it. A hidden panel is `inert` and held still (shared/hold.ts):\n * its media paused and kept from autoplaying, its `paused` components\n * paused, its embeds unloaded. Shown, it is released: its frames load again,\n * and what the page wrote with autoplay plays. Content the page adds to a\n * held panel later -- a block it decorates once the group is on it -- is held\n * as it arrives.\n *\n * Two things follow from the panels being one tree with the page, and both\n * are behaviour 3.x did not have. Leaving a tab no longer puts what it holds\n * back as the page wrote it: an accordion opened there is still open when\n * the reader comes back. And same-name radios in two panels are one group,\n * as they would be anywhere in a page -- a choice in one clears the other's\n * -- so each panel that asks its own question wraps its radios in a\n * bd-radio-group.\n *\n * ## Names, roles and the keys\n *\n * bd-tab is role=\"tab\" and bd-tab-panel role=\"tabpanel\", each through\n * ElementInternals. The tablist is named by the title, through the wrapper\n * around its slot, or by `label` without one. Tab and panel are paired\n * through ElementInternals' element references: the tab's\n * ariaControlsElements and the panel's ariaLabelledByElements, so the group\n * writes no id, aria-controls or aria-labelledby on the page's elements.\n * They are Baseline Newly available, since 2025-04-04 (Chrome 135, Firefox\n * 136, Safari 16.4; modern-web-guidance, accessible-web-components, looked up\n * 2026-11-09), inside the target. The group hands each child its partner\n * through the child's _pair() on every _apply. A child that has not upgraded\n * when the group connects is paired on the apply after the group's first\n * update: the family's definitions are imported before the group's, so by\n * then it has. A tab or panel taken out of the group is unpaired. It also\n * writes the roving tabindex -- the one way to put a host with an\n * ElementInternals role in the tab order -- and `inert` on the held panels.\n * CLAUDE.md (Brands) records these writes.\n *\n * The keys are the WAI-ARIA tabs pattern's, onTablistKeydown(): ArrowRight\n * and ArrowLeft (mirrored on a right-to-left page), Home and End, a disabled\n * tab skipped, and automatic activation, since showing a panel costs\n * nothing.\n *\n * `active` is the name of the shown panel. Without one the first tab that is\n * not disabled is shown, and its name written to `active`. A name no tab has\n * yet is kept -- the page may be about to add the tab -- and the first is\n * shown meanwhile; the shown tab taken away, the first is shown and written.\n * The group sends bd-tab-show, `detail: { name }`, whenever the shown panel\n * changes after the first, by the reader or by the page. It bubbles, so a\n * group nested in another's panel reaches the outer group's listeners too:\n * `event.target` says which group it was.\n *\n * ## Two appearances\n *\n * `appearance=\"switcher\"` draws 3.x bd-tab-list's content switcher (Figma\n * node 311:931): a pill track on the action fill, the shown tab on a white\n * pill, every tab as wide as the widest and on one line. It is a look, not a\n * second element (N2): the roles, the references, the keys and the hold are the\n * same. The group hands `appearance` to its bd-tabs as an attribute, as it\n * hands them `active`, and each tab draws its own pill (tab.css.ts); the\n * track is this group's (tab-group.css.ts).\n *\n * The equal widths are CSS, where 3.x measured them in script after\n * fonts.ready and published --bd-switcher-option-width: the track is an\n * inline grid whose columns are each 1fr, and an inline grid sized to its\n * content makes every flexible column as wide as the widest column's content\n * (CSS Grid, \"find the size of an fr\"). So a translated label or a font that\n * arrives late resizes the track with no script. tab-group.css.ts records\n * where the two differ: only where the column is narrower than the equal\n * track, and the measured numbers.\n *\n * ## Nested groups\n *\n * A group routes its own children only, so a group in another's panel -- the\n * pricing card's billing tabs, in a panel of the plan tabs -- keeps its tabs,\n * its panels and its keys: the outer group's lists, clicks and keys stop at\n * its own children, and its hold reaches no further than the inner group's\n * held panels (shared/hold.ts, \"held roots nest\"). The inner group's own\n * `slot`, as in `<bd-tab-group slot=\"price\">` inside a card, is its parent's\n * business, not its children's.\n */\n@defineElement(\"bd-tab-group\")\nexport class BdTabGroup extends LitElement {\n static shadowRootOptions: ShadowRootInit = { ...LitElement.shadowRootOptions, slotAssignment: \"manual\" };\n static styles = [ensembleCSS, tabGroupCSS];\n\n /** The `name` of the shown bd-tab-panel. Reflected; the first tab's panel when unset. */\n @property({ type: String, reflect: true, attribute: \"active\" })\n active = \"\";\n\n /** The strip's look: standard, the underlined strip, or switcher, the pill track. Handed to every bd-tab. */\n @property({ type: String, reflect: true, attribute: \"appearance\" })\n appearance: TabAppearance = \"standard\";\n\n /** The group's ground: none, or tint, the brand wash behind it. */\n @property({ type: String, reflect: true, attribute: \"background\" })\n background: Background = \"none\";\n\n /** The tablist's accessible name while no title is slotted. No default. */\n @property({ type: String, attribute: \"label\" })\n label = \"\";\n\n _slots = new SlotController(this, { slots: [\"title\", \"description\"] });\n\n /* A child added or removed, or a child's routing attribute changed, routes\n everything again; a change inside a held panel holds what it brought.\n Observed from the first update; connectedCallback routes everything\n again on a reconnect, since nothing reports what changed while the\n group was out of the page. */\n _children = new ObserverController(this,\n () => new MutationObserver(records => this._onMutations(records)),\n observer => observer.observe(this, { childList: true, subtree: true, attributes: true, attributeFilter: [...ROUTING, ...MOVING] }));\n\n /* The panel shown at the last _apply that showed one, which bd-tab-show reports a change from. */\n private _shown = \"\";\n /* The panels this group is holding, and every panel it routed last time. */\n private readonly _held = new WeakSet<Element>();\n private _panels = new Set<Element>();\n private _pairedTabs = new Set<Element>();\n\n connectedCallback() {\n super.connectedCallback();\n /* Before the first render, so a hidden panel's frames are unloaded and\n its video paused now rather than a frame later; and again on every\n reconnect. */\n this._apply();\n }\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"appearance\") && !isOneOf(TAB_APPEARANCES, this.appearance)) this.appearance = \"standard\";\n if (changed.has(\"background\") && !isOneOf(BACKGROUNDS, this.background)) this.background = \"none\";\n // here as well as in _apply, so an update writes the default before it renders rather than after\n this._resolve(this._tabs(), this._tabPanels());\n }\n\n updated() {\n this._apply();\n }\n\n _tabs() {\n return [...this.children].filter(isTab);\n }\n\n _tabPanels() {\n return [...this.children].filter(isPanel);\n }\n\n /* The panel to show: `active` when a tab names it (or, with no tabs, a\n panel has it), else the first tab's that is not disabled. The default is\n written to `active`, and so is the first when the shown tab went away; a\n name no tab has yet is the page's, and stays. */\n private _resolve(tabs: Element[], panels: Element[]) {\n const known = (name: string) => name !== \"\"\n && (tabs.length ? tabs.some(tab => panelOf(tab) === name) : panels.some(panel => nameOf(panel) === name));\n if (known(this.active)) return this.active;\n const first = tabs.find(tab => panelOf(tab) && !tab.hasAttribute(\"disabled\")) ?? tabs.find(panelOf);\n const shown = first ? panelOf(first) : (panels.map(nameOf).find(Boolean) ?? \"\");\n if (shown && (!this.active || this.active === this._shown)) this.active = shown;\n return shown;\n }\n\n /**\n * Everything the group hands its children, from what they are now: which\n * tab and panel are active, the tabs' appearance, the references that\n * pair them, the roving tabindex, which panels are inert and held,\n * and the slot each child is assigned to. Idempotent; it runs on connect,\n * after every update and on every routing change.\n */\n _apply() {\n const tabs = this._tabs();\n const panels = this._tabPanels();\n const shown = this._resolve(tabs, panels);\n\n const tabFor = (name: string) => tabs.find(tab => panelOf(tab) === name);\n const panelFor = (name: string) => panels.find(panel => nameOf(panel) === name);\n\n /* The strip's look, which each tab draws itself (tab.css.ts). Written\n only for the switcher, so a standard group leaves its tabs as the page\n wrote them; a value the group does not know is the standard look. */\n const switcher = this.appearance === \"switcher\";\n\n let stop = false;\n for (const tab of tabs) {\n const on = panelOf(tab) === shown;\n tab.toggleAttribute(\"active\", on);\n if (switcher) tab.setAttribute(\"appearance\", \"switcher\");\n else tab.removeAttribute(\"appearance\");\n // one tab stop, the shown tab's\n tab.setAttribute(\"tabindex\", on && !stop ? \"0\" : \"-1\");\n stop ||= on;\n (tab as BdTab)._pair?.(panelFor(panelOf(tab)) ?? null);\n }\n\n // a tab taken out of the group controls nothing\n for (const gone of this._pairedTabs) if (!tabs.includes(gone)) (gone as BdTab)._pair?.(null);\n this._pairedTabs = new Set(tabs);\n\n for (const panel of panels) {\n const on = nameOf(panel) === shown;\n panel.toggleAttribute(\"active\", on);\n panel.toggleAttribute(\"inert\", !on);\n (panel as BdTabPanel)._pair?.(tabFor(nameOf(panel)) ?? null);\n if (on && this._held.has(panel)) {\n this._held.delete(panel);\n release(panel);\n } else if (!on && !this._held.has(panel)) {\n this._held.add(panel);\n void hold(panel);\n }\n }\n\n // a panel taken out of the group is the page's again, as it wrote it\n for (const gone of this._panels) {\n if (panels.includes(gone)) continue;\n gone.removeAttribute(\"inert\");\n gone.removeAttribute(\"active\");\n (gone as BdTabPanel)._pair?.(null);\n if (this._held.has(gone)) {\n this._held.delete(gone);\n release(gone);\n }\n }\n this._panels = new Set(panels);\n\n this._route(tabs, panels, shown);\n\n /* An emptied group shows nothing, which is no panel to report. The last\n panel it showed stays the one _resolve measures `active` against, so a\n group filled again writes its first new tab to `active`, and reports\n it, rather than keeping the old name as if the page had asked for it. */\n if (!shown) return;\n const was = this._shown;\n this._shown = shown;\n if (was && shown !== was) {\n this.dispatchEvent(new CustomEvent(\"bd-tab-show\", { detail: { name: shown }, bubbles: true, composed: true }));\n }\n }\n\n /* Each child into its slot. Nothing is rendered before the first update, so\n there is nothing to assign to until then. */\n private _route(tabs: Element[], panels: Element[], shown: string) {\n const slot = (selector: string) => this.renderRoot.querySelector<HTMLSlotElement>(selector);\n const title = slot('slot[name=\"title\"]');\n if (!title) return;\n const children = [...this.children];\n title.assign(...children.filter(el => el.slot === \"title\"));\n slot('slot[name=\"description\"]')!.assign(...children.filter(el => el.slot === \"description\"));\n slot(\"slot.tabs\")!.assign(...tabs);\n slot(\"slot.shown\")!.assign(...panels.filter(panel => nameOf(panel) === shown));\n slot(\"slot.held\")!.assign(...panels.filter(panel => nameOf(panel) !== shown));\n }\n\n /* The child of the group a node is in, if any. */\n private _childAround(node: Node | null) {\n while (node && node.parentNode !== this) node = node.parentNode;\n return node as Element | null;\n }\n\n private _onMutations(records: MutationRecord[]) {\n let reroute = false;\n const changed = new Set<Element>();\n for (const record of records) {\n const target = record.target as Element;\n if (target === this) reroute = true;\n else if (target.parentNode === this && record.type === \"attributes\" && ROUTING.includes(record.attributeName!)) reroute = true;\n else {\n const child = this._childAround(target);\n if (child && this._held.has(child)) changed.add(child);\n }\n }\n if (reroute) this._apply();\n for (const panel of changed) if (this._held.has(panel)) void hold(panel);\n }\n\n /* The bd-tab an event came from, if it is one of this group's. */\n private _tabFrom(event: Event) {\n const tabs = this._tabs();\n return { tabs, tab: event.composedPath().find((el): el is Element => tabs.includes(el as Element)) };\n }\n\n private _choose(tab: Element, { focus = false } = {}) {\n if (tab.hasAttribute(\"disabled\")) return;\n if (focus) (tab as HTMLElement).focus();\n const name = panelOf(tab);\n if (name && name !== this.active) this.active = name;\n }\n\n private _onClick = (event: MouseEvent) => {\n const { tab } = this._tabFrom(event);\n if (tab) this._choose(tab);\n };\n\n private _onKeydown = (event: KeyboardEvent) => {\n const { tabs, tab } = this._tabFrom(event);\n if (!tab) return;\n const next = onTablistKeydown(event, {\n count : tabs.length,\n current : tabs.indexOf(tab),\n rtl : this.matches(\":dir(rtl)\"),\n disabled: index => tabs[index].hasAttribute(\"disabled\")\n });\n if (next !== null) this._choose(tabs[next], { focus: true });\n };\n\n render() {\n const hasTitle = this._slots.has(\"title\");\n const hasDescription = this._slots.has(\"description\");\n return html`\n <div class=\"bd-ensemble root\">\n <div class=\"title\" id=\"title\" ?hidden=${!hasTitle}><slot name=\"title\"></slot></div>\n <div class=\"description\" ?hidden=${!hasDescription}><slot name=\"description\"></slot></div>\n <div\n class=\"tablist\"\n role=\"tablist\"\n aria-labelledby=${hasTitle ? \"title\" : nothing}\n aria-label=${!hasTitle && this.label ? this.label : nothing}\n @click=${this._onClick}\n @keydown=${this._onKeydown}\n ><slot class=\"tabs\"></slot></div>\n <div class=\"panels\"><slot class=\"shown\"></slot><slot class=\"held\"></slot></div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-tab-group\": BdTabGroup;\n }\n interface HTMLElementEventMap {\n \"bd-tab-show\": CustomEvent<{ name: string }>;\n }\n}\n"],"mappings":"A,iyBAsBA,IAAMI,EAAc,CAAC,OAAQ,MAAM,EAK7BC,EAAQ,CAAC,QAAS,aAAa,EAC/BC,EAAS,GAAgBC,EAAG,YAAc,UAAY,CAACF,EAAM,SAASE,EAAG,IAA4B,EACrGC,EAAW,GAAgBD,EAAG,YAAc,gBAAkB,CAACF,EAAM,SAASE,EAAG,IAA4B,EAI7GE,EAAW,GAAiBC,EAAI,aAAa,OAAO,GAAK,GACzDC,EAAU,GAAmBC,EAAM,aAAa,MAAM,GAAK,GAI3DC,EAAU,CAAC,OAAQ,QAAS,OAAQ,UAAU,EAE9CC,EAAS,CAAC,MAAO,SAAU,UAAU,EAiH9BC,EAAN,cAAyBC,CAAW,C,8BAMhC,KAAA,OAAA,GAImB,KAAA,WAAA,WAIH,KAAA,WAAA,OAIjB,KAAA,MAAA,GAEC,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,QAAS,aAAa,CAAE,CAAC,EAOzD,KAAA,UAAA,IAAIC,EAAmB,SAC3B,IAAI,iBAAiB,GAAW,KAAK,aAAaC,CAAO,CAAC,EAChE,GAAYC,EAAS,QAAQ,KAAM,CAAE,UAAW,GAAM,QAAS,GAAM,WAAY,GAAM,gBAAiB,CAAC,GAAGR,EAAS,GAAGC,CAAM,CAAE,CAAC,CAAC,EAGnH,KAAA,OAAA,GAEQ,KAAA,sBAAA,IAAI,QACX,KAAA,wBAAA,IAAI,IACA,KAAA,4BAAA,IAAI,IAyKN,KAAA,SAAA,GAAsB,CACxC,GAAM,CAAE,OAAQ,KAAK,SAASQ,CAAK,EAC/BZ,GAAK,KAAK,QAAQA,CAAG,CAC3B,EAEsB,KAAA,WAAA,GAAyB,CAC7C,GAAM,CAAE,OAAM,OAAQ,KAAK,SAASY,CAAK,EACzC,GAAI,CAACZ,EAAK,OACV,IAAMa,EAAOC,EAAiBF,EAAO,CACnC,MAAUG,EAAK,OACf,QAAUA,EAAK,QAAQf,CAAG,EAC1B,IAAU,KAAK,QAAQ,WAAW,EAClC,SAAU,GAASe,EAAKC,EAAM,CAAC,aAAa,UAAU,CACxD,CAAC,EACGH,IAAS,MAAM,KAAK,QAAQE,EAAKF,GAAO,CAAE,MAAO,EAAK,CAAC,CAC7D,C,QA3N2C,KAAA,kBAAA,CAAE,GAAGP,EAAW,kBAAmB,eAAgB,QAAS,C,QACvF,KAAA,OAAA,CAACW,EAAa3B,CAAW,C,CAoCzC,mBAAoB,CAClB,MAAM,kBAAkB,EAIxB,KAAK,OAAO,CACd,CAEA,WAAW,EAA+B,CACpC4B,EAAQ,IAAI,YAAY,GAAK,CAACC,EAAQC,EAAiB,KAAK,UAAU,IAAG,KAAK,WAAa,YAC3FF,EAAQ,IAAI,YAAY,GAAK,CAACC,EAAQzB,EAAa,KAAK,UAAU,IAAG,KAAK,WAAa,QAE3F,KAAK,SAAS,KAAK,MAAM,EAAG,KAAK,WAAW,CAAC,CAC/C,CAEA,SAAU,CACR,KAAK,OAAO,CACd,CAEA,OAAQ,CACN,MAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,OAAOE,CAAK,CACxC,CAEA,YAAa,CACX,MAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,OAAOE,CAAO,CAC1C,CAMA,SAAiB,EAAiB,EAAmB,CAGnD,IAFe,GAAiBuB,IAAS,KACnCN,EAAK,OAASA,EAAK,KAAK,GAAOhB,EAAQC,CAAG,IAAMqB,CAAI,EAAIC,EAAO,KAAK,GAASrB,EAAOC,CAAK,IAAMmB,CAAI,GACrG,CAAM,KAAK,MAAM,EAAG,OAAO,KAAK,OACpC,IAAME,EAAQR,EAAK,KAAK,GAAOhB,EAAQC,CAAG,GAAK,CAACA,EAAI,aAAa,UAAU,CAAC,GAAKe,EAAK,KAAKhB,CAAO,EAC5FyB,EAAQD,EAAQxB,EAAQwB,CAAK,EAAKD,EAAO,IAAIrB,CAAM,CAAC,CAAC,KAAK,OAAO,GAAK,GAE5E,OADIuB,IAAU,CAAC,KAAK,QAAU,KAAK,SAAW,KAAK,UAAS,KAAK,OAASA,GACnEA,CACT,CASA,QAAS,CACP,IAAMT,EAAO,KAAK,MAAM,EAClBO,EAAS,KAAK,WAAW,EACzBE,EAAQ,KAAK,SAAST,EAAMO,CAAM,EAElCG,EAAU,GAAiBV,EAAK,KAAK,GAAOhB,EAAQC,CAAG,IAAMqB,CAAI,EACjEK,EAAY,GAAiBJ,EAAO,KAAK,GAASrB,EAAOC,CAAK,IAAMmB,CAAI,EAKxEM,EAAW,KAAK,aAAe,WAEjCC,EAAO,GACX,IAAK,IAAM5B,KAAOe,EAAM,CACtB,IAAMc,EAAK9B,EAAQC,CAAG,IAAMwB,EAC5BxB,EAAI,gBAAgB,SAAU6B,CAAE,EAC5BF,EAAU3B,EAAI,aAAa,aAAc,UAAU,EAClDA,EAAI,gBAAgB,YAAY,EAErCA,EAAI,aAAa,WAAY6B,GAAM,CAACD,EAAO,IAAM,IAAI,EACrD,IAASC,EACT7B,EAAe,QAAQ0B,EAAS3B,EAAQC,CAAG,CAAC,GAAK,IAAI,CACvD,CAGA,IAAK,IAAM8B,KAAQ,KAAK,YAAkBf,EAAK,SAASe,CAAI,GAAGA,EAAgB,QAAQ,IAAI,EAC3F,KAAK,YAAc,IAAI,IAAIf,CAAI,EAE/B,IAAK,IAAMb,KAASoB,EAAQ,CAC1B,IAAMO,EAAK5B,EAAOC,CAAK,IAAMsB,EAC7BtB,EAAM,gBAAgB,SAAU2B,CAAE,EAClC3B,EAAM,gBAAgB,QAAS,CAAC2B,CAAE,EAClC3B,EAAsB,QAAQuB,EAAOxB,EAAOC,CAAK,CAAC,GAAK,IAAI,EACvD2B,GAAM,KAAK,MAAM,IAAI3B,CAAK,GAC5B,KAAK,MAAM,OAAOA,CAAK,EACvB6B,EAAQ7B,CAAK,GACJ,CAAC2B,GAAM,CAAC,KAAK,MAAM,IAAI3B,CAAK,IACrC,KAAK,MAAM,IAAIA,CAAK,EACpB8B,EAAU9B,CAAK,EAEnB,CAGA,IAAK,IAAM4B,KAAQ,KAAK,QAClBR,EAAO,SAASQ,CAAI,IACxBA,EAAK,gBAAgB,OAAO,EAC5BA,EAAK,gBAAgB,QAAQ,EAC7BA,EAAqB,QAAQ,IAAI,EAC7B,KAAK,MAAM,IAAIA,CAAI,IACrB,KAAK,MAAM,OAAOA,CAAI,EACtBC,EAAQD,CAAI,IAWhB,GARA,KAAK,QAAU,IAAI,IAAIR,CAAM,EAE7B,KAAK,OAAOP,EAAMO,EAAQE,CAAK,EAM3B,CAACA,EAAO,OACZ,IAAMS,EAAM,KAAK,OACjB,KAAK,OAAST,EACVS,GAAOT,IAAUS,GACnB,KAAK,cAAc,IAAI,YAAY,cAAe,CAAE,OAAQ,CAAE,KAAMT,CAAM,EAAG,QAAS,GAAM,SAAU,EAAK,CAAC,CAAC,CAEjH,CAIA,OAAe,EAAiB,EAAmB,EAAe,CAChE,IAAMU,EAAQ,GAAqB,KAAK,WAAW,cAA+BC,CAAQ,EACpFC,EAAQF,EAAK,oBAAoB,EACvC,GAAI,CAACE,EAAO,OACZ,IAAMC,EAAW,CAAC,GAAG,KAAK,QAAQ,EAClCD,EAAM,OAAO,GAAGC,EAAS,OAAO,GAAMxC,EAAG,OAAS,OAAO,CAAC,EAC1DqC,EAAK,0BAA0B,CAAC,CAAE,OAAO,GAAGG,EAAS,OAAO,GAAMxC,EAAG,OAAS,aAAa,CAAC,EAC5FqC,EAAK,WAAW,CAAC,CAAE,OAAO,GAAGnB,CAAI,EACjCmB,EAAK,YAAY,CAAC,CAAE,OAAO,GAAGZ,EAAO,OAAO,GAASrB,EAAOC,CAAK,IAAMsB,CAAK,CAAC,EAC7EU,EAAK,WAAW,CAAC,CAAE,OAAO,GAAGZ,EAAO,OAAO,GAASrB,EAAOC,CAAK,IAAMsB,CAAK,CAAC,CAC9E,CAGA,aAAqB,EAAmB,CACtC,KAAOc,GAAQA,EAAK,aAAe,MAAM,EAAOA,EAAK,WACrD,OAAOA,CACT,CAEA,aAAqB,EAA2B,CAC9C,IAAIC,EAAU,GACRrB,kBAAU,IAAI,IACpB,IAAK,IAAMsB,KAAU9B,EAAS,CAC5B,IAAM+B,EAASD,EAAO,OACtB,GAAIC,IAAW,KAAM,EAAU,QAC1B,GAAIA,EAAO,aAAe,MAAQD,EAAO,OAAS,cAAgBrC,EAAQ,SAASqC,EAAO,aAAc,EAAG,EAAU,OACrH,CACH,IAAME,EAAQ,KAAK,aAAaD,CAAM,EAClCC,GAAS,KAAK,MAAM,IAAIA,CAAK,GAAGxB,EAAQ,IAAIwB,CAAK,CACvD,CACF,CACIH,GAAS,KAAK,OAAO,EACzB,IAAK,IAAMrC,KAASgB,EAAa,KAAK,MAAM,IAAIhB,CAAK,GAAG8B,EAAU9B,CAAK,CACzE,CAGA,SAAiB,EAAc,CAC7B,IAAMa,EAAO,KAAK,MAAM,EACxB,MAAO,CAAE,OAAM,IAAKH,EAAM,aAAa,CAAC,CAAC,KAAM,GAAsBG,EAAK,SAASlB,CAAa,CAAC,CAAE,CACrG,CAEA,QAAgB,EAAc,CAAE,QAAQ,IAAU,CAAC,EAAG,CACpD,GAAIG,EAAI,aAAa,UAAU,EAAG,OAC9B2C,GAAO3C,EAAqB,MAAM,EACtC,IAAMqB,EAAOtB,EAAQC,CAAG,EACpBqB,GAAQA,IAAS,KAAK,SAAQ,KAAK,OAASA,EAClD,CAmBA,QAAS,CACP,IAAMuB,EAAW,KAAK,OAAO,IAAI,OAAO,EAClCC,EAAiB,KAAK,OAAO,IAAI,aAAa,EACpD,MAAO,EAAI;;gDAEiC,CAACD,EAAS;2CACf,CAACC,EAAe;;;;4BAI/BD,EAAW,QAAUE,EAAQ;uBAClC,CAACF,GAAY,KAAK,MAAQ,KAAK,MAAQE,EAAQ;mBACnD,KAAK,SAAS;qBACZ,KAAK,WAAW;;;;KAKnC,CACF,EA5OGvD,EAAA,CAAAwD,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,QAAS,CAAC,CAAA,EAAA1C,EAAA,UAAA,SAAA,IAAA,EAAA,EAI7Dd,EAAA,CAAAwD,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,YAAa,CAAC,CAAA,EAAA1C,EAAA,UAAA,aAAA,IAAA,EAAA,EAIjEd,EAAA,CAAAwD,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,YAAa,CAAC,CAAA,EAAA1C,EAAA,UAAA,aAAA,IAAA,EAAA,EAIjEd,EAAA,CAAAwD,EAAS,CAAE,KAAM,OAAQ,UAAW,OAAQ,CAAC,CAAA,EAAA1C,EAAA,UAAA,QAAA,IAAA,EAAA,EAlB/C,EAAAd,EAAA,CAAAyD,EAAc,cAAc,CAAA,EAAA3C,CAAA,E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../../tokens/tokens.js";
|
|
3
|
+
/**
|
|
4
|
+
* One panel of a bd-tab-group: what its tab shows.
|
|
5
|
+
*
|
|
6
|
+
* <bd-tab-panel name="windows">…</bd-tab-panel>
|
|
7
|
+
*
|
|
8
|
+
* role="tabpanel" through ElementInternals; its group names it by its tab
|
|
9
|
+
* (_pair(), which the panel hands to its ElementInternals as
|
|
10
|
+
* ariaLabelledByElements) and pushes `active`. The panel stays the page's: the
|
|
11
|
+
* group routes it into its own panel area without copying it, and while it is
|
|
12
|
+
* not the shown one it is `inert` and held still (shared/hold.ts).
|
|
13
|
+
*/
|
|
14
|
+
export declare class BdTabPanel extends LitElement {
|
|
15
|
+
static styles: import("lit").CSSResult;
|
|
16
|
+
/** The name its bd-tab's `panel` and the group's `active` call it by. Reflected, because the group reads it as an attribute. */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Whether this is the shown panel. Set by the group; reflected. */
|
|
19
|
+
active: boolean;
|
|
20
|
+
private readonly _internals;
|
|
21
|
+
constructor();
|
|
22
|
+
/** Called by the group with the tab that names this panel, or null when none does. */
|
|
23
|
+
_pair(tab: Element | null): void;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
"bd-tab-panel": BdTabPanel;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
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{LitElement as n,css as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=class extends n{static{this.styles=r`:host{display:block}`}constructor(){super(),this.name=``,this.active=!1,this._internals=this.attachInternals(),this._internals.role=`tabpanel`}_pair(e){this._internals.ariaLabelledByElements=e?[e]:null}render(){return i`<slot></slot>`}};t([a({type:String,reflect:!0,attribute:`name`})],o.prototype,`name`,void 0),t([a({type:Boolean,reflect:!0,attribute:`active`})],o.prototype,`active`,void 0),o=t([e(`bd-tab-panel`)],o);export{o as BdTabPanel};
|
|
2
|
+
//# sourceMappingURL=tab-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-panel.js","names":["_decorate","__decorate","BdTabPanel","LitElement","tab","property","defineElement"],"sources":["../../../../src/components/tab-group/tab-panel.ts"],"sourcesContent":["import { LitElement, css, html } 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\";\n\n/**\n * One panel of a bd-tab-group: what its tab shows.\n *\n * <bd-tab-panel name=\"windows\">…</bd-tab-panel>\n *\n * role=\"tabpanel\" through ElementInternals; its group names it by its tab\n * (_pair(), which the panel hands to its ElementInternals as\n * ariaLabelledByElements) and pushes `active`. The panel stays the page's: the\n * group routes it into its own panel area without copying it, and while it is\n * not the shown one it is `inert` and held still (shared/hold.ts).\n */\n@defineElement(\"bd-tab-panel\")\nexport class BdTabPanel extends LitElement {\n static styles = css`\n :host {\n display: block;\n }\n `;\n\n /** The name its bd-tab's `panel` and the group's `active` call it by. Reflected, because the group reads it as an attribute. */\n @property({ type: String, reflect: true, attribute: \"name\" })\n name = \"\";\n\n /** Whether this is the shown panel. Set by the group; reflected. */\n @property({ type: Boolean, reflect: true, attribute: \"active\" })\n active = false;\n\n private readonly _internals = this.attachInternals();\n\n constructor() {\n super();\n this._internals.role = \"tabpanel\";\n }\n\n /** Called by the group with the tab that names this panel, or null when none does. */\n _pair(tab: Element | null) {\n this._internals.ariaLabelledByElements = tab ? [tab] : null;\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-tab-panel\": BdTabPanel;\n }\n}\n"],"mappings":"A,sQAkBO,IAAME,EAAN,cAAyBC,CAAW,C,OACzB,KAAA,OAAA,CAAG,sB,CAgBnB,aAAc,CACZ,MAAM,EATD,KAAA,KAAA,GAIE,KAAA,OAAA,GAEqB,KAAA,WAAA,KAAK,gBAAgB,EAIjD,KAAK,WAAW,KAAO,UACzB,CAGA,MAAM,EAAqB,CACzB,KAAK,WAAW,uBAAyBC,EAAM,CAACA,CAAG,EAAI,IACzD,CAEA,QAAS,CACP,MAAO,EAAI,eACb,CACF,EAtBGJ,EAAA,CAAAK,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,MAAO,CAAC,CAAA,EAAAH,EAAA,UAAA,OAAA,IAAA,EAAA,EAI3DF,EAAA,CAAAK,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,QAAS,CAAC,CAAA,EAAAH,EAAA,UAAA,SAAA,IAAA,EAAA,EAbhE,EAAAF,EAAA,CAAAM,EAAc,cAAc,CAAA,EAAAJ,CAAA,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{justify-content:center;align-items:center;gap:var(--spacing-8);padding:var(--spacing-10) var(--spacing-16);cursor:pointer;color:var(--color-text-brand);font-family:var(--typography-fontFamily-sans);font-size:var(--typography-body-regular-fontSize);line-height:var(--typography-body-regular-lineHeight);font-weight:var(--typography-body-regular-fontWeight);transition:color var(--transition-duration-fast) var(--transition-easing-smooth);-webkit-user-select:none;user-select:none;display:inline-flex;position:relative}:host:after{content:"";height:var(--indicator-underline-height);background:var(--indicator-color);transform-origin:0;width:100%;transition:scale var(--indicator-underline-duration) var(--indicator-underline-easing);position:absolute;bottom:0;left:0;scale:0 1}:host(:dir(rtl)):after{transform-origin:100%}:host(:hover:not([active]):not([disabled])){color:var(--color-action-primary-active)}:host([active]){color:var(--color-text-primary);font-weight:var(--typography-fontWeight-bold)}:host([active]):after{scale:1}:host([disabled]){color:var(--color-text-disabled);cursor:not-allowed}:host(:focus-visible){outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);box-shadow:var(--focus-outline-primary);border-radius:var(--focus-outline-radius)}@media (prefers-reduced-motion:reduce){:host,:host:after{transition:none}}@media (forced-colors:active){:host:after{forced-color-adjust:none;background:highlight}}@media (width<576px){:host{padding:var(--spacing-8) var(--spacing-12)}}:host([appearance=switcher]){padding:var(--spacing-12) var(--spacing-24);border-radius:var(--radius-full);color:var(--color-brand-on-fill);font-weight:var(--typography-control-label-large-fontWeight);white-space:nowrap;transition:color var(--transition-duration-fast) var(--transition-easing-smooth), background-color var(--transition-duration-fast) var(--transition-easing-smooth)}:host([appearance=switcher]):after{display:none}:host([appearance=switcher]:hover:not([active]):not([disabled])){color:var(--color-brand-on-fill);background:var(--color-border-container-inverse)}:host([appearance=switcher][active]){color:var(--color-text-primary);font-weight:var(--typography-control-label-large-fontWeight);background:var(--color-surface-default)}:host([appearance=switcher][disabled]){color:var(--color-text-disabled)}@media (prefers-reduced-motion:reduce){:host([appearance=switcher]){transition:none}}@media (forced-colors:active){:host([appearance=switcher][active]){forced-color-adjust:none;color:highlighttext;background:highlight}}`;export{t as default};
|
|
2
|
+
//# sourceMappingURL=tab.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.css.js","names":["tab_css_default"],"sources":["../../../../src/components/tab-group/tab.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\n/* unsafeCSS is how a Lit css`` template accepts a computed string. The\n value is not arbitrary: below() resolves a name from the closed\n breakpoint set and throws on anything else, so the only strings that\n reach here are the ones the scale produced. */\nimport { below } from \"#shared/token-scales.ts\";\n\n/* bd-tab: the tab 3.x bd-tab-list drew as a <button class=\"bd-tab-button\">,\n drawn on the host, which is the control here. The values are that sheet's;\n bd-tab-list went in v4 (phase 6) and the pricing card's switch is a\n bd-tab-group appearance=\"switcher\" now, drawn by the second half of this\n sheet.\n\n 3.x's --bd-tab-* knobs on the tab are gone. The tab is the page's own\n element, so a page's rule on bd-tab or bd-tab[active] reaches it and wins\n over every rule here (the outer tree's normal declarations beat :host's),\n which leaves a knob for the ink, the padding, the gap or the type nothing\n to do but spell the same thing twice. The underline is the indicator\n role, --indicator-*, which the wayfinding family shares and the brand\n layer colours. */\nexport default css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-8);\n padding: var(--spacing-10) var(--spacing-16);\n cursor: pointer;\n position: relative;\n color: var(--color-text-brand);\n font-family: var(--typography-fontFamily-sans);\n /* body-regular, the role bd-tab-list's tabs, bd-anchor-nav's and\n bd-page-switcher's items resolve through: a label with an action\n attached, 10 + 24 + 10 = 44 tall. */\n font-size: var(--typography-body-regular-fontSize);\n line-height: var(--typography-body-regular-lineHeight);\n font-weight: var(--typography-body-regular-fontWeight);\n transition: color var(--transition-duration-fast) var(--transition-easing-smooth);\n -webkit-user-select: none;\n user-select: none;\n }\n\n /* The selected underline: full width, scaled to nothing at rest and grown\n from the inline start, so the compositor draws it. */\n :host::after {\n content: \"\";\n height: var(--indicator-underline-height);\n background: var(--indicator-color);\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n scale: 0 1;\n transform-origin: left center;\n transition: scale var(--indicator-underline-duration) var(--indicator-underline-easing);\n }\n\n :host(:dir(rtl))::after {\n transform-origin: right center;\n }\n\n /* action/primary-active under the pointer, the step bd-link's hover takes;\n not on the selected tab, whose ink does not move, nor a disabled one. */\n :host(:hover:not([active]):not([disabled])) {\n color: var(--color-action-primary-active);\n }\n\n :host([active]) {\n color: var(--color-text-primary);\n /* no role: the weight that marks the current item -- a state weight, as\n on bd-tab-list's selected tab and bd-link's current link */\n font-weight: var(--typography-fontWeight-bold);\n }\n\n :host([active])::after {\n scale: 1;\n }\n\n /* Disabled is exempt from the contrast minimum (WCAG 1.4.3), and it is\n disabled: the group never shows its panel and the keys skip it. */\n :host([disabled]) {\n color: var(--color-text-disabled);\n cursor: not-allowed;\n }\n\n :host(:focus-visible) {\n /* the one focus ring -- see Foundations/Focus. The transparent outline is\n what forced-colors mode paints, since it drops the box-shadow. */\n outline: var(--border-width-2) solid transparent;\n outline-offset: var(--focus-outline-offset);\n box-shadow: var(--focus-outline-primary);\n border-radius: var(--focus-outline-radius);\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host,\n :host::after {\n transition: none;\n }\n }\n\n /* Forced colours repaint the underline's background as Canvas; it opts out\n and draws in Highlight, the system colour for a selected thing. */\n @media (forced-colors: active) {\n :host::after {\n forced-color-adjust: none;\n background: Highlight;\n }\n }\n\n /* bd-tab-list's narrow step, below sm. */\n @media ${unsafeCSS(below(\"sm\"))} {\n :host {\n padding: var(--spacing-8) var(--spacing-12);\n }\n }\n\n /* ---- appearance=\"switcher\": an option of the content switcher ----------\n The group writes appearance=\"switcher\" on its tabs; the track around them\n is the group's (tab-group.css.ts). 3.x bd-tab-list's\n .bd-tabs-container--switcher .bd-tab-button, value for value. Figma:\n Content switcher, node 311:931 -- a 24px label with 12/24 around it is the\n 48px option, and the track's 4px padding makes the 56px frame.\n\n The white pill alone marks the shown option, so both states keep the\n control-label weight and a label does not reflow when the reader\n switches; the standard strip's bold belongs with its underline. Each rule\n names the appearance, so it outranks the standard rule it replaces\n whatever their order: :host([active]) and the hover above. */\n :host([appearance=\"switcher\"]) {\n /* below sm too, where it outranks the standard tab's 8/12: that step\n would take the pill off the 48px option, and two options of \"Individual\"\n and \"Family\" plus the track still fit a 375px screen */\n padding: var(--spacing-12) var(--spacing-24);\n border-radius: var(--radius-full);\n /* on the brand track */\n color: var(--color-brand-on-fill);\n /* the control-label step, which a button's label carries */\n font-weight: var(--typography-control-label-large-fontWeight);\n /* An option is a control label, one line by definition: a wrap would\n break the pill, and the track's equal columns are the longest label's\n one-line width. */\n white-space: nowrap;\n transition: color var(--transition-duration-fast) var(--transition-easing-smooth),\n background-color var(--transition-duration-fast) var(--transition-easing-smooth);\n }\n\n /* The underline belongs to the standard strip. display: none rather than\n no scale, so its transition has nothing to animate either. */\n :host([appearance=\"switcher\"])::after {\n display: none;\n }\n\n /* The standard hover goes to action/primary-active, a darker blue, which\n on the blue track would be near invisible. The pointer's cue is the pill\n appearing under the option instead: white at 12%. */\n :host([appearance=\"switcher\"]:hover:not([active]):not([disabled])) {\n color: var(--color-brand-on-fill);\n background: var(--color-border-container-inverse);\n }\n\n :host([appearance=\"switcher\"][active]) {\n color: var(--color-text-primary);\n font-weight: var(--typography-control-label-large-fontWeight);\n background: var(--color-surface-default);\n }\n\n :host([appearance=\"switcher\"][disabled]) {\n color: var(--color-text-disabled);\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host([appearance=\"switcher\"]) {\n transition: none;\n }\n }\n\n /* The pill is the whole of the shown state, and forced colours repaint it\n -- and the track under it -- as Canvas, so every option would read the\n same. The shown one opts out into the system's selected pair. */\n @media (forced-colors: active) {\n :host([appearance=\"switcher\"][active]) {\n forced-color-adjust: none;\n background: Highlight;\n color: HighlightText;\n }\n }\n`;\n"],"mappings":"A,4DAoBA,IAAAA,EAAe,CAAG,ghF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
2
|
+
import "../../tokens/tokens.js";
|
|
3
|
+
export declare const TAB_APPEARANCES: readonly ["standard", "switcher"];
|
|
4
|
+
export type TabAppearance = typeof TAB_APPEARANCES[number];
|
|
5
|
+
/**
|
|
6
|
+
* One tab of a bd-tab-group: its label, and the name of the panel it shows.
|
|
7
|
+
*
|
|
8
|
+
* <bd-tab panel="windows">Windows</bd-tab>
|
|
9
|
+
*
|
|
10
|
+
* The tab is the control itself: role="tab" through ElementInternals, with
|
|
11
|
+
* aria-selected following `active`, so nothing renders but the label. Its
|
|
12
|
+
* group writes the rest onto it -- `active`, its `appearance` and the roving
|
|
13
|
+
* tabindex as attributes, so a tab that upgrades after its group still finds
|
|
14
|
+
* them -- and pairs it with the panel it controls through _pair(), which the
|
|
15
|
+
* tab hands to its ElementInternals as ariaControlsElements (tab-group.ts
|
|
16
|
+
* says why).
|
|
17
|
+
*
|
|
18
|
+
* What the tab shows is the page's: a word, phrasing, a <bd-icon> beside the
|
|
19
|
+
* word. 3.x bd-tab-list's `icon` / `iconAlt` and rich `content` are whatever
|
|
20
|
+
* the page writes here, laid out in a row, centred, 8 apart.
|
|
21
|
+
*
|
|
22
|
+
* ElementInternals' ARIA reflection is Baseline Widely available since
|
|
23
|
+
* 2026-04-24 (Chrome 103, Firefox 119, Safari 16.4; webstatus.dev
|
|
24
|
+
* aria-attribute-reflection, looked up 2026-11-04), so the role needs no host
|
|
25
|
+
* attribute.
|
|
26
|
+
*/
|
|
27
|
+
export declare class BdTab extends LitElement {
|
|
28
|
+
static styles: import("lit").CSSResult[];
|
|
29
|
+
/** The `name` of the bd-tab-panel this tab shows. Reflected, because the group reads it as an attribute. */
|
|
30
|
+
panel: string;
|
|
31
|
+
/** Whether this is the shown tab. Set by the group from its `active`; reflected, for the stylesheet. */
|
|
32
|
+
active: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The strip's look, set by the group from its own `appearance`: written as
|
|
35
|
+
* "switcher" in a switcher group and taken away in a standard one, and the
|
|
36
|
+
* stylesheet reads the attribute. Not reflected: the default is no attribute.
|
|
37
|
+
*/
|
|
38
|
+
appearance: TabAppearance;
|
|
39
|
+
/** A disabled tab cannot be chosen, and the arrow keys skip it. */
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
private readonly _internals;
|
|
42
|
+
constructor();
|
|
43
|
+
willUpdate(changed: PropertyValues<this>): void;
|
|
44
|
+
updated(changed: PropertyValues<this>): void;
|
|
45
|
+
/** Called by the group with the panel this tab controls, or null when it controls none. */
|
|
46
|
+
_pair(panel: Element | null): void;
|
|
47
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
"bd-tab": BdTab;
|
|
52
|
+
}
|
|
53
|
+
}
|