@repobit/dex-system-design 3.1.1 → 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 +1074 -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 @@
|
|
|
1
|
-
{"version":3,"file":"prop-vocabulary.js","names":["SIZES","LEGACY_SIZES","resolveEnum","mapped","legacy","value","allowed","fallback","isOneOf","set","resolveSize"],"sources":["../../../../src/components/shared/prop-vocabulary.ts"],"sourcesContent":["/**\n * The words a component prop is allowed to use, and the ones it used to.\n *\n * Three axes, three names, and each name means one thing everywhere:\n *\n * size how big sm · md · lg\n * variant how it looks primary, bullet, shade — per component\n * tone what it means neutral · brand · success · warning · error · info\n *\n * Before this there were three size vocabularies and `kind` meant four\n * unrelated things: the visual variant on bd-button and bd-link, the size on\n * the three form fields, the type step on bd-p and the marker on bd-li. An\n * author could not carry anything learned on one atom to the next.\n *\n * Every old name still resolves. bd-button already did this for the kind\n * values it retired, and that is the pattern the rest now follow — renaming a\n * prop is not worth breaking a consumer's markup over.\n */\n\n/** The one size scale. */\nexport const SIZES = ['sm', 'md', 'lg'] as const;\nexport type Size = typeof SIZES[number];\n\n/**\n * Size names from before there was one vocabulary. `default` is the\n * interesting one: it named a position rather than a size, so a reader had to\n * know the set to know whether it was smaller or larger than the alternative.\n */\nexport const LEGACY_SIZES: Record<string, Size> = {\n small : 'sm',\n medium : 'md',\n default: 'md',\n large : 'lg'\n};\n\n/**\n * Resolves a prop value against its closed set, mapping any legacy spelling\n * first and falling back when the value is not in the set at all. Returning\n * the fallback rather than the raw value is what stops a typo rendering an\n * unstyled component.\n */\nexport function resolveEnum<T extends string, F = T>(\n value: unknown,\n { allowed, legacy = {}, fallback }: { allowed: readonly T[]; legacy?: Readonly<Record<string, T>>; fallback: F }\n): T | F {\n const mapped = Object.hasOwn(legacy, value as PropertyKey) ? legacy[value as string] : value;\n return allowed.includes(mapped as T) ? mapped as T : fallback;\n}\n\n/**\n * Whether a value is in a closed set. A property typed by the set can still\n * hold anything an attribute wrote, which is why the components repair it in\n * willUpdate; this is the check they repair on.\n */\nexport const isOneOf = <T extends string>(set: readonly T[], value: unknown): value is T =>\n (set as readonly unknown[]).includes(value);\n\n/** The common case: a size prop, with the old spellings still accepted. */\nexport const resolveSize = (value: unknown, fallback: Size = 'md'): Size =>\n resolveEnum(value, { allowed: SIZES, legacy: LEGACY_SIZES, fallback });\n"],"mappings":"AAoBA,IAAaA,EAAQ,CAAC,KAAM,KAAM,IAAI,EAQzBC,EAAqC,CAChD,MAAS,KACT,OAAS,KACT,QAAS,KACT,MAAS,IACX,EAQA,SAAgBC,EACd,EACA,CAAE,UAAS,SAAS,CAAC,EAAG,YACjB,CACP,IAAMC,EAAS,OAAO,OAAOC,EAAQC,CAAoB,EAAID,EAAOC,GAAmBA,EACvF,OAAOC,EAAQ,SAASH,CAAW,EAAIA,EAAcI,CACvD,CAOA,IAAaC,GAA6B,EAAmB,IAC1DC,EAA2B,SAASJ,CAAK,EAG/BK,GAAe,EAAgB,EAAiB,OAC3DR,EAAYG,EAAO,CAAE,QAASL,EAAO,OAAQC,EAAc,UAAS,CAAC,E"}
|
|
1
|
+
{"version":3,"file":"prop-vocabulary.js","names":["SIZES","TONES","SLOT_NAMES","COMPONENT_SLOTS","PROP_AXES_V3","PROP_AXES_V4","axesFor","name","properties","resolveEnum","isOneOf","allowed","value","fallback","set"],"sources":["../../../../src/components/shared/prop-vocabulary.ts"],"sourcesContent":["/**\n * The words a component prop is allowed to use.\n *\n * Three axes, three names, and each name means one thing everywhere (N6,\n * docs/adr/0004-web-awesome-naming.md):\n *\n * size how big sm · md · lg\n * appearance how it looks primary, bullet, shade — per component\n * variant what it means neutral · brand · success · warning · error · info\n *\n * The look and the meaning share no value, and no set keeps a legacy alias:\n * a v4 tag reads these spellings and nothing else. A value outside its set,\n * an old one included (`size=\"small\"`, `kind=\"primary\"`), is repaired to the\n * default in willUpdate (isOneOf), the same as a typo. Translating a 3.x\n * spelling is scripts/codemod-v4.mjs's job, done once in the page's markup,\n * not every component's on every render.\n *\n * Before this there were three size vocabularies and `kind` meant four\n * unrelated things: the visual variant on bd-button and bd-link, the size on\n * the three form fields, the type step on bd-p and the marker on bd-li. An\n * author could not carry anything learned on one atom to the next.\n *\n * 3.x spelled the look `variant` and the meaning `tone`; v4 takes Web\n * Awesome's split. The tags move one family at a time, so until the last\n * family lands a tag is on one spelling or the other -- see axesFor().\n */\n\n/** The one size scale. */\nexport const SIZES = ['sm', 'md', 'lg'] as const;\nexport type Size = typeof SIZES[number];\n\n/**\n * The closed set of meanings. A meaning says what something is telling the\n * reader, not how it looks, so it is one set for every component: bd-badge\n * and bd-tag take all six, bd-callout and bd-progress-bar a subset. It was spelled\n * out in each of them; this is the declaration `check:enum-vocabulary` reads.\n */\nexport const TONES = ['neutral', 'brand', 'success', 'warning', 'error', 'info'] as const;\nexport type Tone = typeof TONES[number];\n\n/**\n * The names a slot may take (N7): the closed set, so `title` means the\n * heading in every component and nobody spells it `heading`, `headline` or\n * `header` again. '' is the default slot, which holds a container's items.\n * `start` and `end` hold decorations before and after a label, `label` and\n * `hint` a form control's words, `media` / `actions` / `footer` the parts a\n * card or a section shows around its copy.\n *\n * The naming rules in `check:element-api` fail a slot outside this set that\n * COMPONENT_SLOTS does not register for its tag. 3.x's names are frozen in\n * scripts/naming.baseline.json and leave it as each phase renames or\n * registers them.\n */\nexport const SLOT_NAMES = [\n '', 'eyebrow', 'title', 'description', 'caption', 'badge', 'icon',\n 'media', 'actions', 'footer', 'start', 'end', 'label', 'hint'\n] as const;\nexport type SlotName = typeof SLOT_NAMES[number];\n\n/**\n * A slot name only one component needs, keyed by tag, each with the reason\n * the vocabulary has no word for it. Register a name only when the slot holds\n * a part SLOT_NAMES cannot say -- a second collection beside the default\n * slot's items, or a part with no counterpart elsewhere -- never to keep a\n * 3.x name. A registered name the tag no longer renders fails as well, so\n * this cannot outlive the slot it explains.\n */\nexport const COMPONENT_SLOTS: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n 'bd-agent-endpoints': {\n endpoints : 'the first of two rows of links, the machine-readable files; a collection of its own beside the assistants, and the default slot takes what follows both rows',\n assistants: 'the second row of links, one per assistant; a collection of its own beside the endpoints'\n },\n 'bd-article': {\n authors : 'one bd-authors, which the article places under its title below lg and at the top of its sidebar from lg; no vocabulary word says a byline',\n promo : 'the product card the article draws at the end of its text, after its last section and before the newsletter, as REAL places it (DEX-29412); `actions` is a row of buttons, and this is an aside of its own',\n toc : 'the article\\'s one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg',\n newsletter: 'the signup the article draws after its body in the main column, which the sidebar does not run beside',\n related : 'the article\\'s related links, after its tags and a divider, a region of its own beside the body'\n },\n 'bd-bar-chart-item': {\n value: 'the text drawn at the end of the bar in place of its score (\"6 / 6\"), and the meter\\'s value text; a bar is a name and its value, and the vocabulary has a word only for the first'\n },\n 'bd-carousel-item': {\n 'detail-title': 'the heading of the item\\'s own dialog, which the item forwards into the dialog\\'s title and names its \"+\" by; the card itself shows no title, so `title` would say the card has one',\n detail : 'the body of the item\\'s own dialog, forwarded into the dialog\\'s default slot; a second region beside the card\\'s own body in the default slot, and not a description of the card'\n },\n 'bd-code': {\n copy : 'the words of a block\\'s own copy button and so its name (\"Copy code\"); the button stays in the shadow root, pinned outside the code\\'s <pre>, and only its words are the page\\'s, as bd-install-option\\'s copy is -- label is a form control\\'s, and bd-code\\'s `label` attribute names its <pre>',\n copied: 'what the copy button shows for 1.5s after a copy, and what the block\\'s live region says (\"Copied\"); a second state of the same button, which no word of the vocabulary names, as bd-install-option\\'s copied'\n },\n 'bd-comparison-panel': {\n positive : 'the items of the column that says what the thing is, each ticked; one of two collections side by side, so neither is the default slot',\n negative : 'the items of the column that says what the thing is not, each crossed; the second collection',\n 'positive-title': 'the positive column\\'s own heading; the panel\\'s title heads both columns',\n 'negative-title': 'the negative column\\'s own heading; the panel\\'s title heads both columns'\n },\n 'bd-fact': {\n value: 'what the label names -- the figure or the answer; a fact is a label and its value, and the vocabulary has a word only for the first'\n },\n 'bd-footer': {\n logo : 'the brand\\'s wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy',\n masterbrand : 'the masterbrand lockup at the masthead band\\'s end, opposite the logo; a second brand mark beside the first, which no word of the vocabulary names',\n nav : 'the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot',\n 'quick-links' : 'the bd-footer-group columns of links; a collection of its own beside the social links and the navigations',\n 'social-links' : 'the links to the brand\\'s social networks, drawn as their logos; a second collection of links beside the groups',\n 'secondary-nav': 'the legal and policy bd-footer-nav beside the address; the second of the two navigations',\n address : 'the office\\'s postal address beside the secondary nav; no word of the vocabulary names an address',\n copyright : 'the copyright line that opens the footer\\'s last row; a legal notice, not a caption of anything',\n anpc : 'the Romanian consumer authority\\'s ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for',\n 'country-label': 'the country picker\\'s words until a country is known, and the country list\\'s heading; label is a form control\\'s, and the picker is a disclosure, not a field'\n },\n 'bd-install-option': {\n code : 'the command the option shows in its code block and its Copy button copies, line breaks kept; no word of the vocabulary names a command',\n copy : 'the Copy button\\'s words and so its name (\"Copy\"); the button stays in the shadow root beside the code block, and only its words are the page\\'s, as bd-product-hero\\'s cta is -- label is a form control\\'s',\n copied: 'the words that take the Copy button\\'s place for 1.5s after a copy and are said through the option\\'s live region (\"Copied\"); a second state of the same button, which no word of the vocabulary names'\n },\n 'bd-install-options': {\n 'works-in' : 'the harnesses the options run in, one bd-tag each; a second collection beside the default slot\\'s options',\n 'works-in-label' : 'the words that introduce that row (\"Works in\"); the section\\'s eyebrow and title are its own, and label is a form control\\'s',\n 'prompt-title' : 'the heading of the \"Then just ask\" panel, a second region of the section beside the options, under the section\\'s own title',\n 'prompt-description': 'the paragraph under the prompt panel\\'s heading; the section\\'s description is the one under its title',\n 'prompt-label' : 'the small label above the prompt block, naming what the block is (\"Prompt for your agent\")',\n prompt : 'the prompt itself, the words the panel shows and its Copy button copies',\n 'prompt-note' : 'the warning-style note under the prompt',\n copy : 'the prompt panel\\'s Copy button\\'s words and so its name (\"Copy\"), as bd-install-option\\'s copy is for its command',\n copied : 'the words that take that button\\'s place for 1.5s after a copy and are said through the section\\'s live region (\"Copied\"), as bd-install-option\\'s copied'\n },\n 'bd-newsletter-signup': {\n cta : 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s',\n error : 'the words shown under the field after an invalid address, announced; nothing in the vocabulary is shown only when the reader\\'s input is refused',\n success: 'the words shown in place of the form once the page has sent the address (state=\"success\"), in a status region; a state\\'s message, which no vocabulary word names',\n failure: 'the words shown under the filled form when the page\\'s send failed (state=\"failed\"), announced; not `error`, which is the reader\\'s invalid address, while this is the page\\'s send'\n },\n 'bd-partner-banner': {\n lockup: 'the partner\\'s and Bitdefender\\'s logos side by side over the photo; a co-brand mark no word of the vocabulary names'\n },\n 'bd-post-card': {\n meta : 'the post\\'s byline row -- its date and reading time, bd-meta items -- between the cover and the title; not the eyebrow, a kicker naming what the title is about, nor a caption, which describes the cover',\n 'read-more': 'the words of the card\\'s visual cue to follow its link (\"Read more\"), drawn with an arrow and hidden from a screen reader, which hears the title as the link; not the card\\'s actions -- the whole card is its one link -- and not a caption, which describes something'\n },\n 'bd-pricing-card': {\n banner: 'the highlighted card\\'s ribbon above its top edge (\"Best value\"), drawn only with `highlight`',\n price : 'the card\\'s price zone, a bd-pricing-price or a bd-tab-group of them for a billing choice; the store\\'s figures, which no word of the vocabulary names'\n },\n 'bd-pricing-price': {\n full : 'the struck full price the discount is taken from; a price zone is a reference price, a discount and a price, and the vocabulary has a word for none of them',\n discount: 'the discount\\'s bd-badge beside the full price (\"Save 44%\"); a figure of its own, not the card\\'s badge',\n period : 'the price\\'s billing unit after it (\"/year\", \"/month\"); not a caption'\n },\n 'bd-product-hero': {\n 'product-name' : 'the product\\'s name, a kicker above the title in the heading-h4 role; the title is the promise, not the product',\n cta : 'the buy button\\'s words; the button stays in the shadow root inside bd-product, where the store finds it, and only its label is the page\\'s',\n 'cta-secondary': 'the second button\\'s words, drawn when cta-secondary-href is set'\n },\n 'bd-product-upsell': {\n cta: 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s'\n },\n 'bd-quick-answer': {\n facts: 'the labelled facts under the answer, one bd-fact each, drawn as a strip under a divider; a collection of its own beside the default slot, which takes whatever follows the answer'\n },\n 'bd-report-promo': {\n cta: 'the words of the promo\\'s own bd-button, which stays in the shadow root because its look is the promo\\'s; only its label is the page\\'s'\n },\n 'bd-review': {\n date: 'when the review was written, the line under its caption; the vocabulary has a word for who said it (caption) and none for when'\n },\n 'bd-spotlight': {\n 'description-actions': 'a second group of actions: the buttons under the description, in the other column from the `actions` under the title. Web Awesome names a second group by its part the same way (wa-card\\'s header-actions and footer-actions)'\n },\n 'bd-stat': {\n value: 'the figure the caption explains (\"580+\"), drawn at display size above it; a stat is a figure and its caption, and the vocabulary has a word only for the second'\n },\n 'bd-terminal-hero': {\n breadcrumb : 'the page\\'s bd-breadcrumb above the eyebrow, the hero\\'s own trail',\n 'annotation-top' : 'a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part',\n 'annotation-bottom': 'a note pinned below the terminal, on its bottom edge; the second of the pair',\n meta : 'the mono spec line that opens the facts row; a line of its own above the facts, not their caption',\n facts : 'the labelled facts under the spec line, one bd-fact each in the spec look, drawn as a grid under a rule; a collection of its own beside the copy, as bd-quick-answer\\'s facts are'\n },\n 'bd-tooltip': {\n content: 'the bubble\\'s words; a tooltip has a trigger and what it says about it, not a title or a description'\n },\n 'bd-trust-panel': {\n stats: 'a second collection beside the cards in the default slot: the bd-fact statistics row above them'\n }\n};\n\n/**\n * Which property names carry the look and which carry the meaning -- the one\n * place that says so. `check:enum-vocabulary` fails a look property that\n * allows a meaning value, and a meaning property that allows anything outside\n * TONES, so the two vocabularies stay disjoint and an old `variant=\"primary\"`\n * cannot pass for a meaning.\n *\n * 3.x's, which the families of the later phases still declare until they\n * move: the look is `variant` (or `kind`) and the meaning is `tone`.\n */\nexport const PROP_AXES_V3 = {\n look : ['variant', 'kind'],\n meaning: ['tone']\n} as const;\n\n/** v4's (N6): the look is `appearance` and the meaning is `variant`. */\nexport const PROP_AXES_V4 = {\n look : ['appearance'],\n meaning: ['variant']\n} as const;\n\nexport type PropAxes = typeof PROP_AXES_V3 | typeof PROP_AXES_V4;\n\n/**\n * The axes one tag is read with, from the names of the properties it\n * declares. A tag that declares `appearance` has moved to v4, so its\n * `variant` is the meaning; any other tag is still on 3.x's names, where\n * `variant` is the look. The same word means opposite things on the two\n * sides, which is why the rule is per tag rather than one constant while the\n * families move (v4 phases 1-7). Once every tag is on v4 this is\n * PROP_AXES_V4 for all of them, and PROP_AXES_V3 goes.\n */\nexport function axesFor(properties: Iterable<string>): PropAxes {\n for (const name of properties) if (name === 'appearance') return PROP_AXES_V4;\n return PROP_AXES_V3;\n}\n\n/**\n * A prop value if its closed set has it, else the fallback. Returning the\n * fallback rather than the raw value is what stops a typo rendering an\n * unstyled component. There is no legacy map to consult first: an old\n * spelling is a value outside the set like any other (N6).\n */\nexport function resolveEnum<T extends string, F = T>(\n value: unknown,\n { allowed, fallback }: { allowed: readonly T[]; fallback: F }\n): T | F {\n return isOneOf(allowed, value) ? value : fallback;\n}\n\n/**\n * Whether a value is in a closed set. A property typed by the set can still\n * hold anything an attribute wrote, which is why the components repair it in\n * willUpdate; this is the check they repair on.\n */\nexport const isOneOf = <T extends string>(set: readonly T[], value: unknown): value is T =>\n (set as readonly unknown[]).includes(value);\n"],"mappings":"AA4BA,IAAaA,EAAQ,CAAC,KAAM,KAAM,IAAI,EASzBC,EAAQ,CAAC,UAAW,QAAS,UAAW,UAAW,QAAS,MAAM,EAgBlEC,EAAa,CACxB,GAAI,UAAW,QAAS,cAAe,UAAW,QAAS,OAC3D,QAAS,UAAW,SAAU,QAAS,MAAO,QAAS,MACzD,EAWaC,EAA8E,CACzF,qBAAsB,CACpB,UAAY,+JACZ,WAAY,0FACd,EACA,aAAc,CACZ,QAAY,4IACZ,MAAY,6MACZ,IAAY,0HACZ,WAAY,wGACZ,QAAY,gGACd,EACA,oBAAqB,CACnB,MAAO,mLACT,EACA,mBAAoB,CAClB,eAAgB,sLAChB,OAAgB,gLAClB,EACA,UAAW,CACT,KAAQ,gSACR,OAAQ,6MACV,EACA,sBAAuB,CACrB,SAAkB,wIAClB,SAAkB,+FAClB,iBAAkB,0EAClB,iBAAkB,yEACpB,EACA,UAAW,CACT,MAAO,qIACT,EACA,YAAa,CACX,KAAiB,4HACjB,YAAiB,oJACjB,IAAiB,4HACjB,cAAiB,4GACjB,eAAiB,iHACjB,gBAAiB,2FACjB,QAAiB,mGACjB,UAAiB,iGACjB,KAAiB,4HACjB,gBAAiB,6JACnB,EACA,oBAAqB,CACnB,KAAQ,yIACR,KAAQ,2MACR,OAAQ,sMACV,EACA,qBAAsB,CACpB,WAAsB,2GACtB,iBAAsB,6HACtB,eAAsB,6HACtB,qBAAsB,uGACtB,eAAsB,6FACtB,OAAsB,0EACtB,cAAsB,0CACtB,KAAsB,kHACtB,OAAsB,wJACxB,EACA,uBAAwB,CACtB,IAAS,oJACT,MAAS,kJACT,QAAS,mKACT,QAAS,oLACX,EACA,oBAAqB,CACnB,OAAQ,oHACV,EACA,eAAgB,CACd,KAAa,2MACb,YAAa,uQACf,EACA,kBAAmB,CACjB,OAAQ,gGACR,MAAQ,sJACV,EACA,mBAAoB,CAClB,KAAU,8JACV,SAAU,wGACV,OAAU,sEACZ,EACA,kBAAmB,CACjB,eAAiB,iHACjB,IAAiB,4IACjB,gBAAiB,iEACnB,EACA,oBAAqB,CACnB,IAAK,mJACP,EACA,kBAAmB,CACjB,MAAO,mLACT,EACA,kBAAmB,CACjB,IAAK,sIACP,EACA,YAAa,CACX,KAAM,gIACR,EACA,eAAgB,CACd,sBAAuB,+NACzB,EACA,UAAW,CACT,MAAO,iKACT,EACA,mBAAoB,CAClB,WAAqB,mEACrB,iBAAqB,qHACrB,oBAAqB,+EACrB,KAAqB,oGACrB,MAAqB,kLACvB,EACA,aAAc,CACZ,QAAS,qGACX,EACA,iBAAkB,CAChB,MAAO,iGACT,CACF,EAYaC,EAAe,CAC1B,KAAS,CAAC,UAAW,MAAM,EAC3B,QAAS,CAAC,MAAM,CAClB,EAGaC,EAAe,CAC1B,KAAS,CAAC,YAAY,EACtB,QAAS,CAAC,SAAS,CACrB,EAaA,SAAgBC,EAAQ,EAAwC,CAC9D,IAAK,IAAMC,KAAQC,EAAY,GAAID,IAAS,aAAc,OAAOF,EACjE,OAAOD,CACT,CAQA,SAAgBK,EACd,EACA,CAAE,UAAS,YACJ,CACP,OAAOC,EAAQC,EAASC,CAAK,EAAIA,EAAQC,CAC3C,CAOA,IAAaH,GAA6B,EAAmB,IAC1DI,EAA2B,SAASF,CAAK,E"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Where a tablist's focus is, for onTablistKeydown(). */
|
|
2
|
+
export interface TablistPosition {
|
|
3
|
+
/** How many tabs the strip has. */
|
|
4
|
+
count: number;
|
|
5
|
+
/** The index of the tab the key was pressed on. */
|
|
6
|
+
current: number;
|
|
7
|
+
/** Whether the strip runs right to left: `host.matches(':dir(rtl)')`. */
|
|
8
|
+
rtl?: boolean;
|
|
9
|
+
/** Whether the tab at an index is disabled, which the keys skip. */
|
|
10
|
+
disabled?: (index: number) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The WAI-ARIA tabs pattern's keys, for a horizontal tablist: ArrowRight and
|
|
14
|
+
* ArrowLeft move to the next and the previous tab, wrapping at either end,
|
|
15
|
+
* Home to the first and End to the last; on a right-to-left strip the two
|
|
16
|
+
* arrows swap. A disabled tab is skipped.
|
|
17
|
+
*
|
|
18
|
+
* const next = onTablistKeydown(event, { count, current, rtl: this.matches(':dir(rtl)') });
|
|
19
|
+
* if (next !== null) this._select(next, { focus: true });
|
|
20
|
+
*
|
|
21
|
+
* Returns the index to move to -- `current` itself when there is nowhere else
|
|
22
|
+
* to go -- or null for a key the pattern does not use, which is left alone. A
|
|
23
|
+
* key it answers has its default prevented, so the page does not scroll.
|
|
24
|
+
* Moving is the caller's: the pattern's automatic activation, which is right
|
|
25
|
+
* when showing a panel costs nothing, is focusing the tab and selecting it in
|
|
26
|
+
* one step.
|
|
27
|
+
*
|
|
28
|
+
* It is the handler bd-tab-list had of its own, moved here when bd-tab-group
|
|
29
|
+
* took the same pattern, so the two strips cannot drift apart.
|
|
30
|
+
*/
|
|
31
|
+
export declare function onTablistKeydown(event: KeyboardEvent, { count, current, rtl, disabled }: TablistPosition): number | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={ArrowRight:`ArrowLeft`,ArrowLeft:`ArrowRight`};function t(t,{count:n,current:r,rtl:i=!1,disabled:a=()=>!1}){if(n<1)return null;let o=i?e[t.key]??t.key:t.key,s=e=>!a(e),c=(e,t,r)=>{for(let i=+!r;i<=n;i++){let r=((e+t*i)%n+n)%n;if(s(r))return r}return null},l;switch(o){case`ArrowRight`:l=c(r,1,!1);break;case`ArrowLeft`:l=c(r,-1,!1);break;case`Home`:l=c(0,1,!0);break;case`End`:l=c(n-1,-1,!0);break;default:return null}return t.preventDefault(),l??r}export{t as onTablistKeydown};
|
|
2
|
+
//# sourceMappingURL=tablist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tablist.js","names":["MIRRORED","onTablistKeydown","count","key","rtl","event","enabled","disabled","index","seek","from","step","next","current"],"sources":["../../../../src/components/shared/tablist.ts"],"sourcesContent":["/* The arrows follow the strip as it is drawn: on a right-to-left page the\n next tab is to the left, so ArrowLeft moves to it. */\nconst MIRRORED: Readonly<Record<string, string>> = { ArrowRight: 'ArrowLeft', ArrowLeft: 'ArrowRight' };\n\n/** Where a tablist's focus is, for onTablistKeydown(). */\nexport interface TablistPosition {\n /** How many tabs the strip has. */\n count : number;\n /** The index of the tab the key was pressed on. */\n current : number;\n /** Whether the strip runs right to left: `host.matches(':dir(rtl)')`. */\n rtl? : boolean;\n /** Whether the tab at an index is disabled, which the keys skip. */\n disabled?: (index: number) => boolean;\n}\n\n/**\n * The WAI-ARIA tabs pattern's keys, for a horizontal tablist: ArrowRight and\n * ArrowLeft move to the next and the previous tab, wrapping at either end,\n * Home to the first and End to the last; on a right-to-left strip the two\n * arrows swap. A disabled tab is skipped.\n *\n * const next = onTablistKeydown(event, { count, current, rtl: this.matches(':dir(rtl)') });\n * if (next !== null) this._select(next, { focus: true });\n *\n * Returns the index to move to -- `current` itself when there is nowhere else\n * to go -- or null for a key the pattern does not use, which is left alone. A\n * key it answers has its default prevented, so the page does not scroll.\n * Moving is the caller's: the pattern's automatic activation, which is right\n * when showing a panel costs nothing, is focusing the tab and selecting it in\n * one step.\n *\n * It is the handler bd-tab-list had of its own, moved here when bd-tab-group\n * took the same pattern, so the two strips cannot drift apart.\n */\nexport function onTablistKeydown(event: KeyboardEvent, { count, current, rtl = false, disabled = () => false }: TablistPosition): number | null {\n if (count < 1) return null;\n const key = rtl ? MIRRORED[event.key] ?? event.key : event.key;\n const enabled = (index: number) => !disabled(index);\n\n /* The first enabled tab `step` at a time from `from`, `from` included when\n `inclusive`, wrapping; null when every tab is disabled. */\n const seek = (from: number, step: 1 | -1, inclusive: boolean) => {\n for (let i = inclusive ? 0 : 1; i <= count; i++) {\n const index = ((from + step * i) % count + count) % count;\n if (enabled(index)) return index;\n }\n return null;\n };\n\n let next: number | null;\n switch (key) {\n case 'ArrowRight': next = seek(current, 1, false); break;\n case 'ArrowLeft': next = seek(current, -1, false); break;\n case 'Home': next = seek(0, 1, true); break;\n case 'End': next = seek(count - 1, -1, true); break;\n default: return null;\n }\n\n event.preventDefault();\n return next ?? current;\n}\n"],"mappings":"AAEA,IAAMA,EAA6C,CAAE,WAAY,YAAa,UAAW,YAAa,EAiCtG,SAAgBC,EAAiB,EAAsB,CAAE,QAAO,UAAS,MAAM,GAAO,eAAiB,IAAyC,CAC9I,GAAIC,EAAQ,EAAG,OAAO,KACtB,IAAMC,EAAMC,EAAMJ,EAASK,EAAM,MAAQA,EAAM,IAAMA,EAAM,IACrDC,EAAW,GAAkB,CAACC,EAASC,CAAK,EAI5CC,GAAQ,EAAc,EAAc,IAAuB,CAC/D,IAAK,IAAI,EAAI,IAAmB,GAAKP,EAAO,IAAK,CAC/C,IAAMM,IAAUE,EAAOC,EAAO,GAAKT,EAAQA,GAASA,EACpD,GAAII,EAAQE,CAAK,EAAG,OAAOA,CAC7B,CACA,OAAO,IACT,EAEII,EACJ,OAAQT,EAAR,CACE,IAAK,aAAc,EAAOM,EAAKI,EAAS,EAAG,EAAK,EAAG,MACnD,IAAK,YAAa,EAAOJ,EAAKI,EAAS,GAAI,EAAK,EAAG,MACnD,IAAK,OAAQ,EAAOJ,EAAK,EAAG,EAAG,EAAI,EAAG,MACtC,IAAK,MAAO,EAAOA,EAAKP,EAAQ,EAAG,GAAI,EAAI,EAAG,MAC9C,QAAS,OAAO,IAClB,CAGA,OADAG,EAAM,eAAe,EACdO,GAAQC,CACjB,C"}
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* come out of a component prop no matter what a caller passes. An
|
|
8
8
|
* unrecognised value is dropped and the component keeps its own styling.
|
|
9
9
|
*
|
|
10
|
-
* The breakpoint helpers at the foot of this file are
|
|
11
|
-
* they throw rather than returning empty. The reason is
|
|
12
|
-
* scale above is fed a value a *consumer* passed as an
|
|
13
|
-
* dropping a bad value degrades gracefully. A breakpoint name is written by
|
|
10
|
+
* The breakpoint, role-step and type-hook helpers at the foot of this file are
|
|
11
|
+
* the exception, and they throw rather than returning empty. The reason is
|
|
12
|
+
* who calls them: every scale above is fed a value a *consumer* passed as an
|
|
13
|
+
* attribute, where dropping a bad value degrades gracefully. A breakpoint name is written by
|
|
14
14
|
* the component author inside a stylesheet, and an empty string there yields
|
|
15
15
|
* `@media { ... }` — a malformed query the browser discards silently, taking
|
|
16
16
|
* the whole block with it. A typo has to fail loudly at the point it is made.
|
|
@@ -227,4 +227,30 @@ declare const ROLE_AXES: {
|
|
|
227
227
|
export type TypeRole = keyof typeof ROLE_AXES;
|
|
228
228
|
/** "Text set in role `from` reads as role `to` here." Declarations, for inside a rule. */
|
|
229
229
|
export declare const readAs: (from: TypeRole, to: TypeRole) => string;
|
|
230
|
+
export declare const HEADING_ROLES: readonly ["heading-h1", "heading-h2", "heading-h3", "heading-h4", "heading-h5", "heading-h6", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl", "display-3xl"];
|
|
231
|
+
export type HeadingRole = typeof HEADING_ROLES[number];
|
|
232
|
+
export declare const BODY_ROLES: readonly ["body-lead", "body-large", "body-regular", "body-small"];
|
|
233
|
+
export type BodyRole = typeof BODY_ROLES[number];
|
|
234
|
+
/**
|
|
235
|
+
* "The heading here is set in `role`." The five --bd-heading-* type hooks,
|
|
236
|
+
* for inside a rule that matches a bd-h or bd-display host.
|
|
237
|
+
*
|
|
238
|
+
* headingRole('heading-h2') → --bd-heading-font-size: var(--typography-heading-h2-fontSize); …
|
|
239
|
+
*/
|
|
240
|
+
export declare const headingRole: (role: HeadingRole) => string;
|
|
241
|
+
/**
|
|
242
|
+
* "The paragraph here is set in `role`." The four --bd-paragraph-* type
|
|
243
|
+
* hooks; the family is bd-p's own, as readAs() leaves it.
|
|
244
|
+
*
|
|
245
|
+
* bodyRole('body-large') → --bd-paragraph-font-size: var(--typography-body-large-fontSize); …
|
|
246
|
+
*/
|
|
247
|
+
export declare const bodyRole: (role: BodyRole) => string;
|
|
248
|
+
/**
|
|
249
|
+
* "Text here sits on a ground whose ink is `role`." Both ink hooks, from the
|
|
250
|
+
* same COLOR_ROLES the atoms' color prop takes, so a heading and its
|
|
251
|
+
* paragraph cannot be handed two inks for one band.
|
|
252
|
+
*
|
|
253
|
+
* ink('on-brand') → --bd-heading-color: var(--color-brand-on-fill); --bd-paragraph-color: var(--color-brand-on-fill);
|
|
254
|
+
*/
|
|
255
|
+
export declare const ink: (role: ColorRole) => string;
|
|
230
256
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=/* @__PURE__ */ `0.1.2.4.6.8.10.12.14.16.18.20.22.24.28.32.36.40.44.48.52.56.64.80.96.112.128`.split(`.`),t=[`xxs`,`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`],n=[`light`,`normal`,`medium`,`semibold`,`bold`],r=[`sans`,`mono`],i=[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`],a={none:`0`,"4xs":`2`,"3xs":`4`,"2xs":`8`,xs:`12`,sm:`16`,md:`24`,lg:`32`,xl:`40`,"2xl":`48`,"3xl":`64`,"4xl":`96`,"5xl":`128`},o=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`],s=[`none`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],c={primary:`--color-text-brand`,strong:`--color-text-primary`,muted:`--color-text-muted`,subtle:`--color-text-subtle`,inverse:`--color-text-inverse`,"on-brand":`--color-brand-on-fill`,success:`--color-text-success`,warning:`--color-text-warning`,error:`--color-text-error`},l=Object.keys(c),u={default:`--color-border-default`,subtle:`--color-border-subtle`,strong:`--color-border-strong`,container:`--color-border-container`,brand:`--color-border-brand`,disabled:`--color-border-disabled`,"brand-subtle":`--status-brand-border`},d=Object.keys(u),f=(e,t)=>n=>e.includes(String(n))?`var(${t}${n})`:``,p=f(e,`--spacing-`),m=f(t,`--typography-fontSize-`),h=f(n,`--typography-fontWeight-`),g=f(r,`--typography-fontFamily-`),_=f(i,`--typography-letterSpacing-`),v=f(s,`--radius-`),y=e=>[`none`,`full`].includes(String(e))?v(e):f(s,`--shape-radius-`)(e),b=[`0`,`1`,`2`,`3`,`4`,`8`],x=e=>{let t=String(e??``).replace(/px$/,``);return b.includes(t)?`var(--border-width-${t})`:``},S=e=>{if(e===``||e==null)return``;let t=Number(e);return Number.isFinite(t)&&t>=0&&t<=1?String(t):``},C=e=>Object.hasOwn(a,e)?`var(--spacing-${a[e]})`:``,w=e=>o.includes(String(e))?`var(--icon-${e}-size)`:``,T=e=>Object.hasOwn(c,e)?`var(${c[e]})`:``,E=e=>Object.hasOwn(u,e)?`var(${u[e]})`:T(e),D=e=>{let t=String(e??``).trim().split(/\s+/).filter(Boolean);if(t.length<1||t.length>4)return``;let n=t.map(p);return n.every(Boolean)?n.join(` `):``},O={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600},k=Object.keys(O),A=e=>{if(!Object.hasOwn(O,e))throw Error(`Unknown breakpoint: ${e}. Expected one of ${k.join(`, `)}.`);return O[e]},j=e=>`(width >= ${A(e)}px)`,M=e=>{let t=A(e);if(t===0)throw Error(`below('${e}') has no meaning: no viewport is narrower than ${t}px. Did you mean above('${e}')?`);return`(width < ${t}px)`},N=e=>{let t=M(e);return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(t).matches},P={"heading-h1":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h2":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h3":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h4":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h5":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h6":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"body-large":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`],"body-regular":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`],"body-small":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`]},F=(e,t)=>{for(let n of[e,t])if(!Object.hasOwn(P,n))throw Error(`Unknown type role: ${n}. Expected one of ${Object.keys(P).join(`, `)}.`);if(e.split(`-`)[0]!==t.split(`-`)[0])throw Error(`readAs('${e}', '${t}'): a heading role reads as a heading, a body role as a body role.`);return P[e].map(n=>`--typography-${e}-${n}: var(--typography-${t}-${n});`).join(` `)};export{u as BORDER_ROLES,d as BORDER_ROLE_NAMES,b as BORDER_WIDTH_STEPS,O as BREAKPOINTS,k as BREAKPOINT_NAMES,c as COLOR_ROLES,l as COLOR_ROLE_NAMES,r as FONT_FAMILY_STEPS,t as FONT_SIZE_STEPS,n as FONT_WEIGHT_STEPS,o as ICON_SIZE_STEPS,i as LETTER_SPACING_STEPS,s as RADIUS_STEPS,a as SPACE_STEPS,e as SPACING_STEPS,j as above,M as below,E as borderColor,x as borderWidth,T as color,g as fontFamily,m as fontSize,h as fontWeight,w as iconSize,_ as letterSpacing,N as matchesBelow,S as opacity,y as radius,F as readAs,C as space,p as spacing,D as spacingShorthand};
|
|
1
|
+
var e=/* @__PURE__ */ `0.1.2.4.6.8.10.12.14.16.18.20.22.24.28.32.36.40.44.48.52.56.64.80.96.112.128`.split(`.`),t=[`xxs`,`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`],n=[`light`,`normal`,`medium`,`semibold`,`bold`],r=[`sans`,`mono`],i=[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`],a={none:`0`,"4xs":`2`,"3xs":`4`,"2xs":`8`,xs:`12`,sm:`16`,md:`24`,lg:`32`,xl:`40`,"2xl":`48`,"3xl":`64`,"4xl":`96`,"5xl":`128`},o=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`],s=[`none`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],c={primary:`--color-text-brand`,strong:`--color-text-primary`,muted:`--color-text-muted`,subtle:`--color-text-subtle`,inverse:`--color-text-inverse`,"on-brand":`--color-brand-on-fill`,success:`--color-text-success`,warning:`--color-text-warning`,error:`--color-text-error`},l=Object.keys(c),u={default:`--color-border-default`,subtle:`--color-border-subtle`,strong:`--color-border-strong`,container:`--color-border-container`,brand:`--color-border-brand`,disabled:`--color-border-disabled`,"brand-subtle":`--status-brand-border`},d=Object.keys(u),f=(e,t)=>n=>e.includes(String(n))?`var(${t}${n})`:``,p=f(e,`--spacing-`),m=f(t,`--typography-fontSize-`),h=f(n,`--typography-fontWeight-`),g=f(r,`--typography-fontFamily-`),_=f(i,`--typography-letterSpacing-`),v=f(s,`--radius-`),y=e=>[`none`,`full`].includes(String(e))?v(e):f(s,`--shape-radius-`)(e),b=[`0`,`1`,`2`,`3`,`4`,`8`],x=e=>{let t=String(e??``).replace(/px$/,``);return b.includes(t)?`var(--border-width-${t})`:``},S=e=>{if(e===``||e==null)return``;let t=Number(e);return Number.isFinite(t)&&t>=0&&t<=1?String(t):``},C=e=>Object.hasOwn(a,e)?`var(--spacing-${a[e]})`:``,w=e=>o.includes(String(e))?`var(--icon-${e}-size)`:``,T=e=>Object.hasOwn(c,e)?`var(${c[e]})`:``,E=e=>Object.hasOwn(u,e)?`var(${u[e]})`:T(e),D=e=>{let t=String(e??``).trim().split(/\s+/).filter(Boolean);if(t.length<1||t.length>4)return``;let n=t.map(p);return n.every(Boolean)?n.join(` `):``},O={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600},k=Object.keys(O),A=e=>{if(!Object.hasOwn(O,e))throw Error(`Unknown breakpoint: ${e}. Expected one of ${k.join(`, `)}.`);return O[e]},j=e=>`(width >= ${A(e)}px)`,M=e=>{let t=A(e);if(t===0)throw Error(`below('${e}') has no meaning: no viewport is narrower than ${t}px. Did you mean above('${e}')?`);return`(width < ${t}px)`},N=e=>{let t=M(e);return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(t).matches},P={"heading-h1":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h2":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h3":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h4":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h5":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"heading-h6":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`],"body-large":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`],"body-regular":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`],"body-small":[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`]},F=(e,t)=>{for(let n of[e,t])if(!Object.hasOwn(P,n))throw Error(`Unknown type role: ${n}. Expected one of ${Object.keys(P).join(`, `)}.`);if(e.split(`-`)[0]!==t.split(`-`)[0])throw Error(`readAs('${e}', '${t}'): a heading role reads as a heading, a body role as a body role.`);if(e===t)throw Error(`readAs('${e}', '${t}'): a role read as itself is a custom-property cycle, and the text falls back to its parent's size. Leave the role alone instead.`);return P[e].map(n=>`--typography-${e}-${n}: var(--typography-${t}-${n});`).join(` `)},I={fontSize:`font-size`,fontWeight:`font-weight`,lineHeight:`line-height`,letterSpacing:`letter-spacing`,fontFamily:`font-family`},L=[`heading-h1`,`heading-h2`,`heading-h3`,`heading-h4`,`heading-h5`,`heading-h6`,`display-sm`,`display-md`,`display-lg`,`display-xl`,`display-2xl`,`display-3xl`],R=[`body-lead`,`body-large`,`body-regular`,`body-small`],z=(e,t,n)=>n.map(n=>`--bd-${e}-${I[n]}: var(--typography-${t}-${n});`).join(` `),B=e=>{if(!L.includes(e))throw Error(`Unknown heading role: ${e}. Expected one of ${L.join(`, `)}.`);return z(`heading`,e,[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`,`fontFamily`])},V=e=>{if(!R.includes(e))throw Error(`Unknown body role: ${e}. Expected one of ${R.join(`, `)}.`);return z(`paragraph`,e,[`fontSize`,`fontWeight`,`lineHeight`,`letterSpacing`])},H=e=>{let t=T(e);if(!t)throw Error(`Unknown colour role: ${e}. Expected one of ${l.join(`, `)}.`);return`--bd-heading-color: ${t}; --bd-paragraph-color: ${t};`};export{R as BODY_ROLES,u as BORDER_ROLES,d as BORDER_ROLE_NAMES,b as BORDER_WIDTH_STEPS,O as BREAKPOINTS,k as BREAKPOINT_NAMES,c as COLOR_ROLES,l as COLOR_ROLE_NAMES,r as FONT_FAMILY_STEPS,t as FONT_SIZE_STEPS,n as FONT_WEIGHT_STEPS,L as HEADING_ROLES,o as ICON_SIZE_STEPS,i as LETTER_SPACING_STEPS,s as RADIUS_STEPS,a as SPACE_STEPS,e as SPACING_STEPS,j as above,M as below,V as bodyRole,E as borderColor,x as borderWidth,T as color,g as fontFamily,m as fontSize,h as fontWeight,B as headingRole,w as iconSize,H as ink,_ as letterSpacing,N as matchesBelow,S as opacity,y as radius,F as readAs,C as space,p as spacing,D as spacingShorthand};
|
|
2
2
|
//# sourceMappingURL=token-scales.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-scales.js","names":["SPACING_STEPS","FONT_SIZE_STEPS","FONT_WEIGHT_STEPS","FONT_FAMILY_STEPS","LETTER_SPACING_STEPS","SPACE_STEPS","ICON_SIZE_STEPS","RADIUS_STEPS","COLOR_ROLES","COLOR_ROLE_NAMES","BORDER_ROLES","BORDER_ROLE_NAMES","onScale","steps","value","prefix","spacing","fontSize","fontWeight","fontFamily","letterSpacing","radiusStep","radius","step","BORDER_WIDTH_STEPS","borderWidth","opacity","n","space","name","iconSize","color","role","borderColor","spacingShorthand","parts","refs","BREAKPOINTS","BREAKPOINT_NAMES","above","below","matchesBelow","condition","ROLE_AXES","readAs","from","to","axis"],"sources":["../../../../src/components/shared/token-scales.ts"],"sourcesContent":["/**\n * The closed sets a component prop may draw from, and the only place that\n * turns a prop value into CSS.\n *\n * See CLAUDE.md, \"The foundation rule\". Every prop-facing function here\n * returns either a token reference or the empty string, so a literal cannot\n * come out of a component prop no matter what a caller passes. An\n * unrecognised value is dropped and the component keeps its own styling.\n *\n * The breakpoint helpers at the foot of this file are the one exception, and\n * they throw rather than returning empty. The reason is who calls them: every\n * scale above is fed a value a *consumer* passed as an attribute, where\n * dropping a bad value degrades gracefully. A breakpoint name is written by\n * the component author inside a stylesheet, and an empty string there yields\n * `@media { ... }` — a malformed query the browser discards silently, taking\n * the whole block with it. A typo has to fail loudly at the point it is made.\n */\n\nexport const SPACING_STEPS = [\n '0', '1', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20', '22', '24',\n '28', '32', '36', '40', '44', '48', '52', '56', '64', '80', '96', '112', '128'\n] as const;\nexport type SpacingStep = typeof SPACING_STEPS[number];\n\nexport const FONT_SIZE_STEPS = [\n 'xxs', 'xs', 'sm', 'base', 'lg', 'xl',\n '2xl', '3xl', '4xl', '5xl', '6xl', '7xl', '8xl', '9xl'\n] as const;\nexport type FontSizeStep = typeof FONT_SIZE_STEPS[number];\n\nexport const FONT_WEIGHT_STEPS = ['light', 'normal', 'medium', 'semibold', 'bold'] as const;\nexport type FontWeightStep = typeof FONT_WEIGHT_STEPS[number];\n\n/** The two faces the system ships. There is no third, and no escape hatch. */\nexport const FONT_FAMILY_STEPS = ['sans', 'mono'] as const;\nexport type FontFamilyStep = typeof FONT_FAMILY_STEPS[number];\n\nexport const LETTER_SPACING_STEPS = ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest'] as const;\nexport type LetterSpacingStep = typeof LETTER_SPACING_STEPS[number];\n\n/**\n * The t-shirt vocabulary bd-grid's gap and padding props take, mapped onto the\n * live pixel scale. It used to be a second CSS scale, --space-*, which existed\n * mainly so the component could build a token name from a prop — thirteen\n * tokens duplicating --spacing-* under other names. A prop vocabulary belongs\n * here, with the other closed sets, rather than in the token file.\n */\nexport const SPACE_STEPS = {\n none : '0', '4xs': '2', '3xs': '4', '2xs': '8', xs : '12', sm : '16',\n md : '24', lg : '32', xl : '40', '2xl': '48', '3xl': '64', '4xl': '96', '5xl': '128'\n} as const;\nexport type SpaceName = keyof typeof SPACE_STEPS;\n\n/** Icon sizes. The scale stops at 3xl (64px); there is no step above it. */\nexport const ICON_SIZE_STEPS = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nexport type IconSize = typeof ICON_SIZE_STEPS[number];\n\nexport const RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nexport type RadiusStep = typeof RADIUS_STEPS[number];\n\n/**\n * Semantic colour roles a component's `color` prop may name.\n *\n * These resolve through the --color-text-* roles rather than reaching past\n * them into the palette, which is what the semantic colour block in\n * src/tokens/tokens.ts says they should do. Spelled as palette steps, this\n * map was the reason a page could retint --color-text-muted and watch every\n * bd-h with color=\"muted\" ignore it: the values matched, so nothing looked\n * wrong until someone tried to change one.\n *\n * The prop vocabulary and the token vocabulary are deliberately not the same\n * words. `strong` and `primary` read better on a component than\n * `text-primary` and `text-brand` do, and renaming the prop would break\n * consumers' markup for no gain. The mapping is the seam, and it lives here.\n *\n * Every role clears 4.5:1 on white, which is what the docstring here always\n * claimed and what `subtle` did not do: it named neutral-400, which measures\n * 3.23:1 and fails 1.4.3 for text. It now resolves to --color-text-subtle\n * (neutral-500, 4.67:1). Nothing in this repository passed color=\"subtle\",\n * so the fix costs nothing today — note that neutral-400 is the step the\n * token layer calls `disabled`, and disabled text is exempt under 1.4.3,\n * which is presumably how the two got crossed.\n */\nexport const COLOR_ROLES = {\n primary : '--color-text-brand',\n strong : '--color-text-primary',\n muted : '--color-text-muted',\n subtle : '--color-text-subtle',\n inverse : '--color-text-inverse',\n /* Ink on a brand fill. `inverse` is for a dark neutral band; on a brand band\n the ink is the brand's, because a partner whose brand is light takes dark\n ink there, and white -- inverse -- would not read on it. Same pixel as\n inverse under Bitdefender. */\n 'on-brand': '--color-brand-on-fill',\n success : '--color-text-success',\n warning : '--color-text-warning',\n error : '--color-text-error'\n} as const;\nexport type ColorRole = keyof typeof COLOR_ROLES;\n\nexport const COLOR_ROLE_NAMES = Object.keys(COLOR_ROLES) as ColorRole[];\n\n/**\n * The hairline vocabulary.\n *\n * A divider is a border, and until now the only colour prop it had resolved\n * through COLOR_ROLES above -- the *ink* vocabulary. That is the category\n * error CLAUDE.md names (\"Never use a token from the wrong category\"), and\n * this file already carried a milder version of it: bd-divider-horizontal's\n * constructor records that its default used to say `subtle`, a text role that\n * matched the right value by coincidence.\n *\n * The cost was not theoretical. bd-quick-answer needs a hairline in\n * --status-brand-border, because its rule sits on a brand tint and a neutral\n * line reads as dirt there. No text role expresses that, so the component drew\n * its own `border-top` instead of composing the atom -- which is exactly the\n * \"dividers are not borders\" confusion the same document warns about, arrived\n * at from the other direction: the divider could not say what the component\n * meant, so the component stopped using the divider.\n *\n * `brand-subtle` is the one entry that reaches outside the --color-border-*\n * family, and it is here because it has a consumer today. The rest of the\n * status hairlines are deliberately absent until one does.\n *\n * `inverse` is deliberately NOT here. It would resolve to\n * --color-border-container-inverse, which is white at 12%, where the text\n * role it resolves to today is solid white -- and each divider then multiplies\n * that by its own `opacity` prop (0.25 by default on the horizontal, 1.00 on\n * the vertical). The dividers that pass color=\"inverse\" would drop from solid\n * white to 12%, or from 25% to 3%, and effectively vanish. It keeps falling\n * through to the legacy text role below, and that is recorded rather than\n * fixed: whether a hairline on a dark surface should be a 12% border role at\n * full opacity, or a solid one dimmed by the prop, is a real design question\n * and not this change's to answer.\n */\nexport const BORDER_ROLES = {\n default : '--color-border-default',\n subtle : '--color-border-subtle',\n strong : '--color-border-strong',\n container : '--color-border-container',\n brand : '--color-border-brand',\n disabled : '--color-border-disabled',\n 'brand-subtle': '--status-brand-border'\n} as const;\nexport type BorderRole = keyof typeof BORDER_ROLES;\n\nexport const BORDER_ROLE_NAMES = Object.keys(BORDER_ROLES) as BorderRole[];\n\nconst onScale = (steps: readonly string[], prefix: string) => (value: unknown): string =>\n steps.includes(String(value)) ? `var(${prefix}${value})` : '';\n\nexport const spacing = onScale(SPACING_STEPS, '--spacing-');\nexport const fontSize = onScale(FONT_SIZE_STEPS, '--typography-fontSize-');\nexport const fontWeight = onScale(FONT_WEIGHT_STEPS, '--typography-fontWeight-');\nexport const fontFamily = onScale(FONT_FAMILY_STEPS, '--typography-fontFamily-');\nexport const letterSpacing = onScale(LETTER_SPACING_STEPS, '--typography-letterSpacing-');\n/* none and full are corners a brand must not move -- square on purpose, and a\n circle -- so they stay on the scale; every other step reads the shape ramp a\n theme restates. Nothing calls this today; a caller that does gets partner\n corners for free. */\nconst radiusStep = onScale(RADIUS_STEPS, '--radius-');\nexport const radius = (step: unknown): string => (['none', 'full'].includes(String(step)) ? radiusStep(step) : onScale(RADIUS_STEPS, '--shape-radius-')(step));\n\n/* The border-width steps. A px spelling of a step -- \"2px\" -- is read as the\n step, because that is what callers wrote before there was a scale here. */\nexport const BORDER_WIDTH_STEPS = ['0', '1', '2', '3', '4', '8'] as const;\nexport type BorderWidthStep = typeof BORDER_WIDTH_STEPS[number];\nexport const borderWidth = (value: unknown): string => {\n const step = String(value ?? '').replace(/px$/, '');\n return (BORDER_WIDTH_STEPS as readonly string[]).includes(step) ? `var(--border-width-${step})` : '';\n};\n\n/* Not a scale: a fraction. An opacity given as a prop is kept only when it is\n a number from 0 to 1, so a stray string never reaches an inline style. */\nexport const opacity = (value: unknown): string => {\n if (value === '' || value == null) return '';\n const n = Number(value);\n return Number.isFinite(n) && n >= 0 && n <= 1 ? String(n) : '';\n};\n\nexport const space = (name: unknown): string =>\n (Object.hasOwn(SPACE_STEPS, name as PropertyKey) ? `var(--spacing-${SPACE_STEPS[name as SpaceName]})` : '');\n\n/** --icon-*-size wraps its step, so it needs a suffix onScale cannot express. */\nexport const iconSize = (value: unknown): string =>\n ((ICON_SIZE_STEPS as readonly string[]).includes(String(value)) ? `var(--icon-${value}-size)` : '');\n\nexport const color = (role: unknown): string =>\n Object.hasOwn(COLOR_ROLES, role as PropertyKey) ? `var(${COLOR_ROLES[role as ColorRole]})` : '';\n\n/**\n * A hairline's colour: border roles first, then the ink vocabulary as legacy.\n *\n * Border-first is the point -- `subtle` on a divider means\n * --color-border-subtle, not --color-text-subtle. The fallback exists so the\n * names already in use keep working (`inverse`, and `strong`, which resolves\n * to neutral-900 either way), and it is a migration path, not a second\n * vocabulary: a new divider should be spelled with a border role.\n */\nexport const borderColor = (role: unknown): string =>\n (Object.hasOwn(BORDER_ROLES, role as PropertyKey)\n ? `var(${BORDER_ROLES[role as BorderRole]})`\n : color(role));\n\n/**\n * A one-to-four-value spacing shorthand written as steps, e.g. \"10 0\" gives\n * `var(--spacing-10) var(--spacing-0)`. All parts must be on the scale, or\n * the whole value is dropped — a half-valid shorthand is worse than none.\n */\nexport const spacingShorthand = (value: unknown): string => {\n const parts = String(value ?? '').trim()\n .split(/\\s+/)\n .filter(Boolean);\n if (parts.length < 1 || parts.length > 4) return '';\n const refs = parts.map(spacing);\n return refs.every(Boolean) ? refs.join(' ') : '';\n};\n\n/* ================================================================\n BREAKPOINTS\n ================================================================\n The seven viewport widths, and the only place a media condition is built\n from them.\n\n This lives in JS rather than in the token file because a media condition\n cannot read a custom property — `@media (max-width: var(--breakpoint-md))`\n is not valid CSS — so the seven values have to be interpolated into the\n stylesheet at author time. `--breakpoint-*` in src/tokens/tokens.ts stays\n the published record of the scale; this is how a component consumes it.\n\n `above` and `below` return a media *condition*, not a whole `@media` rule,\n so they compose:\n\n @media ${below('md')} { ... }\n @media ${above('sm')} and ${below('lg')} { ... }\n\n ---\n\n WHY THE HELPER OWNS THE COMPLEMENT.\n\n A breakpoint is one number, but it has two sides, and writing the second\n one by hand is how the boundary drifts. `min-width: 768px` and\n `max-width: 768px` are both true at exactly 768px, so a component that\n spelled its mobile rule the obvious way applied both its mobile and its\n desktop styling at that one width: pricing-card.css.ts had\n `@media (max-width: 768px)` at one rule and\n `@media (min-width: 768px) and (max-width: 1024px)` at another, and\n thirteen more files used the same `max-width: 768px` form.\n\n The complement is derived here so that number is never typed. Do not write\n 767px, 991px or 1199px anywhere; write `below('md')`, `below('lg')`,\n `below('xl')`.\n\n ---\n\n WHY RANGE SYNTAX, AND NO EPSILON.\n\n `(width >= 768px)` and `(width < 768px)` are exact complements: every\n width, fractional ones included, matches one of them and never both. A\n viewport is not always a whole number of pixels -- browser zoom, some\n Android densities and fractional device-pixel-ratios all produce widths\n like 767.5px -- and the min-/max- spelling could not say \"narrower than\"\n without choosing a number below the breakpoint. `max-width: 767px` left\n every width between 767 and 768 matched by neither side, and the\n `max-width: 767.98px` this helper emitted until 2026-10-28 shrank that band\n to a fiftieth of a pixel rather than closing it. The range form has no\n number to choose.\n\n Media query range syntax is Baseline Widely available (since 2023-03), so\n it is used as is. The same conditions are valid in @container, where they\n ask the container's width instead of the viewport's:\n\n @container ${below('sm')} { ... } */\n\nexport const BREAKPOINTS = {\n xs : 0,\n sm : 576,\n md : 768,\n lg : 992,\n xl : 1200,\n xxl : 1400,\n /* Not a grid-progression step: the site's menu and footer widen here, and\n the page column has to widen with them. See --grid-container-max-xxxl. */\n xxxl: 1600\n} as const;\nexport type Breakpoint = keyof typeof BREAKPOINTS;\n\nexport const BREAKPOINT_NAMES = Object.keys(BREAKPOINTS) as Breakpoint[];\n\n/** Throws rather than returning empty — see the note in the file header. */\nconst step = (name: Breakpoint): number => {\n if (!Object.hasOwn(BREAKPOINTS, name)) {\n throw new Error(`Unknown breakpoint: ${name}. Expected one of ${BREAKPOINT_NAMES.join(', ')}.`);\n }\n return BREAKPOINTS[name];\n};\n\n/**\n * \"This breakpoint and wider.\"\n *\n * above('md') → (width >= 768px)\n *\n * `above('xs')` is `(width >= 0px)`, which is always true. That is a\n * harmless no-op rather than an error, because it is the honest answer for\n * the bottom of the scale — but a rule that needs no condition should have\n * no media query.\n */\nexport const above = (name: Breakpoint): string => `(width >= ${step(name)}px)`;\n\n/**\n * \"Narrower than this breakpoint\" — the exact complement of `above`.\n *\n * below('md') → (width < 768px)\n *\n * `below('xs')` throws: xs is 0, and no viewport is narrower than that, so\n * the query could only ever be dead CSS.\n */\nexport const below = (name: Breakpoint): string => {\n const value = step(name);\n if (value === 0) {\n throw new Error(`below('${name}') has no meaning: no viewport is narrower than ${value}px. Did you mean above('${name}')?`);\n }\n return `(width < ${value}px)`;\n};\n\n/**\n * The JS side of `below`, for the viewport logic CSS genuinely cannot express\n * — choosing which markup to render rather than how to style it.\n *\n * matchesBelow('md') → true when the viewport is narrower than md\n *\n * It reads the same scale as the stylesheet, so the two cannot disagree. That\n * is the failure this replaces: bd-footer switched at 767 in CSS and at 767\n * in JS while bd-footer-lp, sharing the same stylesheet, switched at 768.\n *\n * Prefer CSS. Reach for this only when the component's *behaviour* changes,\n * and re-read it on `resize` — the value is a snapshot, not a subscription.\n *\n * Outside a browser (SSR, a bare Node import) there is no viewport to be\n * narrower than, so this reports false. The name is still validated first, so\n * a typo throws in every environment rather than only in the browser.\n */\nexport const matchesBelow = (name: Breakpoint): boolean => {\n const condition = below(name);\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return window.matchMedia(condition).matches;\n};\n\n/* ================================================================\n ROLE STEPS\n ================================================================\n bd-h and bd-p size their text from the role their level or variant names\n -- `.bd-heading.h4` reads --typography-heading-h4-*, `variant=\"small\"`\n reads --typography-body-small-* -- and offer no other hook. A component\n whose type steps down at a width used to re-render with another level or\n variant, decided once from the screen at render time and stale after any\n resize, and moving the document outline with it.\n\n readAs() keeps the level and the variant and steps the size in CSS: inside\n a query, it points the role the element names at another one, on that\n element only.\n\n @container ${below('md')} {\n .card-title { ${readAs('heading-h4', 'heading-h5')} }\n }\n\n The declarations land on an element inside the component's own shadow\n root, where no page style can reach or override them -- not on :host,\n where a re-declared token would shadow the page's. A role name is written\n by the component author, so an unknown one throws, as below() does. */\n\nconst ROLE_AXES = {\n 'heading-h1' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h2' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h3' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h4' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h5' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h6' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n /* bd-p's variant rules read four axes; the family is the paragraph's own. */\n 'body-large' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing'],\n 'body-regular': ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing'],\n 'body-small' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing']\n} as const;\nexport type TypeRole = keyof typeof ROLE_AXES;\n\n/** \"Text set in role `from` reads as role `to` here.\" Declarations, for inside a rule. */\nexport const readAs = (from: TypeRole, to: TypeRole): string => {\n for (const role of [from, to]) {\n if (!Object.hasOwn(ROLE_AXES, role)) {\n throw new Error(`Unknown type role: ${role}. Expected one of ${Object.keys(ROLE_AXES).join(', ')}.`);\n }\n }\n if (from.split('-')[0] !== to.split('-')[0]) {\n throw new Error(`readAs('${from}', '${to}'): a heading role reads as a heading, a body role as a body role.`);\n }\n return ROLE_AXES[from].map(axis => `--typography-${from}-${axis}: var(--typography-${to}-${axis});`).join(' ');\n};\n"],"mappings":"AAkBA,IAAaA,EAAgB,wGAG7B,EAGaC,EAAkB,CAC7B,MAAO,KAAM,KAAM,OAAQ,KAAM,KACjC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KACnD,EAGaC,EAAoB,CAAC,QAAS,SAAU,SAAU,WAAY,MAAM,EAIpEC,EAAoB,CAAC,OAAQ,MAAM,EAGnCC,EAAuB,CAAC,UAAW,QAAS,SAAU,OAAQ,QAAS,QAAQ,EAU/EC,EAAc,CACzB,KAAO,IAAK,MAAO,IAAK,MAAO,IAAK,MAAO,IAAK,GAAO,KAAM,GAAO,KACpE,GAAO,KAAM,GAAO,KAAM,GAAO,KAAM,MAAO,KAAM,MAAO,KAAM,MAAO,KAAM,MAAO,KACvF,EAIaC,EAAkB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MAAO,KAAK,EAG7DC,EAAe,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EA0BpEC,EAAc,CACzB,QAAY,qBACZ,OAAY,uBACZ,MAAY,qBACZ,OAAY,sBACZ,QAAY,uBAKZ,WAAY,wBACZ,QAAY,uBACZ,QAAY,uBACZ,MAAY,oBACd,EAGaC,EAAmB,OAAO,KAAKD,CAAW,EAmC1CE,EAAe,CAC1B,QAAgB,yBAChB,OAAgB,wBAChB,OAAgB,wBAChB,UAAgB,2BAChB,MAAgB,uBAChB,SAAgB,0BAChB,eAAgB,uBAClB,EAGaC,EAAoB,OAAO,KAAKD,CAAY,EAEnDE,GAAW,EAA0B,IAAoB,GAC7DC,EAAM,SAAS,OAAOC,CAAK,CAAC,EAAI,OAAOC,IAASD,EAAM,GAAK,GAEhDE,EAAaJ,EAAQZ,EAAe,YAAY,EAChDiB,EAAaL,EAAQX,EAAiB,wBAAwB,EAC9DiB,EAAaN,EAAQV,EAAmB,0BAA0B,EAClEiB,EAAaP,EAAQT,EAAmB,0BAA0B,EAClEiB,EAAgBR,EAAQR,EAAsB,6BAA6B,EAKlFiB,EAAaT,EAAQL,EAAc,WAAW,EACvCe,EAAU,GAA2B,CAAC,OAAQ,MAAM,CAAC,CAAC,SAAS,OAAOC,CAAI,CAAC,EAAIF,EAAWE,CAAI,EAAIX,EAAQL,EAAc,iBAAiB,CAAC,CAACgB,CAAI,EAI/IC,EAAqB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAElDC,EAAe,GAA2B,CACrD,IAAMF,EAAO,OAAOT,GAAS,EAAE,CAAC,CAAC,QAAQ,MAAO,EAAE,EAClD,OAAQU,EAAyC,SAASD,CAAI,EAAI,sBAAsBA,EAAK,GAAK,EACpG,EAIaG,EAAW,GAA2B,CACjD,GAAIZ,IAAU,IAAMA,GAAS,KAAM,MAAO,GAC1C,IAAMa,EAAI,OAAOb,CAAK,EACtB,OAAO,OAAO,SAASa,CAAC,GAAKA,GAAK,GAAKA,GAAK,EAAI,OAAOA,CAAC,EAAI,EAC9D,EAEaC,EAAS,GACnB,OAAO,OAAOvB,EAAawB,CAAmB,EAAI,iBAAiBxB,EAAYwB,GAAmB,GAAK,GAG7FC,EAAY,GACrBxB,EAAsC,SAAS,OAAOQ,CAAK,CAAC,EAAI,cAAcA,EAAM,QAAU,GAErFiB,EAAS,GACpB,OAAO,OAAOvB,EAAawB,CAAmB,EAAI,OAAOxB,EAAYwB,GAAmB,GAAK,GAWlFC,EAAe,GACzB,OAAO,OAAOvB,EAAcsB,CAAmB,EAC5C,OAAOtB,EAAasB,GAAoB,GACxCD,EAAMC,CAAI,EAOHE,EAAoB,GAA2B,CAC1D,IAAMC,EAAQ,OAAOrB,GAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CACrC,MAAM,KAAK,CAAC,CACZ,OAAO,OAAO,EACjB,GAAIqB,EAAM,OAAS,GAAKA,EAAM,OAAS,EAAG,MAAO,GACjD,IAAMC,EAAOD,EAAM,IAAInB,CAAO,EAC9B,OAAOoB,EAAK,MAAM,OAAO,EAAIA,EAAK,KAAK,GAAG,EAAI,EAChD,EA0DaC,EAAc,CACzB,GAAM,EACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,KACN,IAAM,KAGN,KAAM,IACR,EAGaC,EAAmB,OAAO,KAAKD,CAAW,EAGjDd,EAAQ,GAA6B,CACzC,GAAI,CAAC,OAAO,OAAOc,EAAaR,CAAI,EAClC,MAAU,MAAM,uBAAuBA,EAAK,oBAAoBS,EAAiB,KAAK,IAAI,EAAE,EAAE,EAEhG,OAAOD,EAAYR,EACrB,EAYaU,EAAS,GAA6B,aAAahB,EAAKM,CAAI,EAAE,KAU9DW,EAAS,GAA6B,CACjD,IAAM1B,EAAQS,EAAKM,CAAI,EACvB,GAAIf,IAAU,EACZ,MAAU,MAAM,UAAUe,EAAK,kDAAkDf,EAAM,0BAA0Be,EAAK,IAAI,EAE5H,MAAO,YAAYf,EAAM,IAC3B,EAmBa2B,EAAgB,GAA8B,CACzD,IAAMC,EAAYF,EAAMX,CAAI,EAE5B,OADI,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WAAmB,GAC9E,OAAO,WAAWa,CAAS,CAAC,CAAC,OACtC,EAyBMC,EAAY,CAChB,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EAEtF,aAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,EACxE,eAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,EACxE,aAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,CAC1E,EAIaC,GAAU,EAAgB,IAAyB,CAC9D,IAAK,IAAMZ,IAAQ,CAACa,EAAMC,CAAE,EAC1B,GAAI,CAAC,OAAO,OAAOH,EAAWX,CAAI,EAChC,MAAU,MAAM,sBAAsBA,EAAK,oBAAoB,OAAO,KAAKW,CAAS,CAAC,CAAC,KAAK,IAAI,EAAE,EAAE,EAGvG,GAAIE,EAAK,MAAM,GAAG,CAAC,CAAC,KAAOC,EAAG,MAAM,GAAG,CAAC,CAAC,GACvC,MAAU,MAAM,WAAWD,EAAK,MAAMC,EAAG,mEAAmE,EAE9G,OAAOH,EAAUE,EAAK,CAAC,IAAI,GAAQ,gBAAgBA,EAAK,GAAGE,EAAK,qBAAqBD,EAAG,GAAGC,EAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAC/G,E"}
|
|
1
|
+
{"version":3,"file":"token-scales.js","names":["SPACING_STEPS","FONT_SIZE_STEPS","FONT_WEIGHT_STEPS","FONT_FAMILY_STEPS","LETTER_SPACING_STEPS","SPACE_STEPS","ICON_SIZE_STEPS","RADIUS_STEPS","COLOR_ROLES","COLOR_ROLE_NAMES","BORDER_ROLES","BORDER_ROLE_NAMES","onScale","steps","value","prefix","spacing","fontSize","fontWeight","fontFamily","letterSpacing","radiusStep","radius","step","BORDER_WIDTH_STEPS","borderWidth","opacity","n","space","name","iconSize","color","role","borderColor","spacingShorthand","parts","refs","BREAKPOINTS","BREAKPOINT_NAMES","above","below","matchesBelow","condition","ROLE_AXES","readAs","from","to","axis","HOOK_AXES","HEADING_ROLES","BODY_ROLES","hooksFor","axes","atom","headingRole","bodyRole","ink"],"sources":["../../../../src/components/shared/token-scales.ts"],"sourcesContent":["/**\n * The closed sets a component prop may draw from, and the only place that\n * turns a prop value into CSS.\n *\n * See CLAUDE.md, \"The foundation rule\". Every prop-facing function here\n * returns either a token reference or the empty string, so a literal cannot\n * come out of a component prop no matter what a caller passes. An\n * unrecognised value is dropped and the component keeps its own styling.\n *\n * The breakpoint, role-step and type-hook helpers at the foot of this file are\n * the exception, and they throw rather than returning empty. The reason is\n * who calls them: every scale above is fed a value a *consumer* passed as an\n * attribute, where dropping a bad value degrades gracefully. A breakpoint name is written by\n * the component author inside a stylesheet, and an empty string there yields\n * `@media { ... }` — a malformed query the browser discards silently, taking\n * the whole block with it. A typo has to fail loudly at the point it is made.\n */\n\nexport const SPACING_STEPS = [\n '0', '1', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20', '22', '24',\n '28', '32', '36', '40', '44', '48', '52', '56', '64', '80', '96', '112', '128'\n] as const;\nexport type SpacingStep = typeof SPACING_STEPS[number];\n\nexport const FONT_SIZE_STEPS = [\n 'xxs', 'xs', 'sm', 'base', 'lg', 'xl',\n '2xl', '3xl', '4xl', '5xl', '6xl', '7xl', '8xl', '9xl'\n] as const;\nexport type FontSizeStep = typeof FONT_SIZE_STEPS[number];\n\nexport const FONT_WEIGHT_STEPS = ['light', 'normal', 'medium', 'semibold', 'bold'] as const;\nexport type FontWeightStep = typeof FONT_WEIGHT_STEPS[number];\n\n/** The two faces the system ships. There is no third, and no escape hatch. */\nexport const FONT_FAMILY_STEPS = ['sans', 'mono'] as const;\nexport type FontFamilyStep = typeof FONT_FAMILY_STEPS[number];\n\nexport const LETTER_SPACING_STEPS = ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest'] as const;\nexport type LetterSpacingStep = typeof LETTER_SPACING_STEPS[number];\n\n/**\n * The t-shirt vocabulary bd-grid's gap and padding props take, mapped onto the\n * live pixel scale. It used to be a second CSS scale, --space-*, which existed\n * mainly so the component could build a token name from a prop — thirteen\n * tokens duplicating --spacing-* under other names. A prop vocabulary belongs\n * here, with the other closed sets, rather than in the token file.\n */\nexport const SPACE_STEPS = {\n none : '0', '4xs': '2', '3xs': '4', '2xs': '8', xs : '12', sm : '16',\n md : '24', lg : '32', xl : '40', '2xl': '48', '3xl': '64', '4xl': '96', '5xl': '128'\n} as const;\nexport type SpaceName = keyof typeof SPACE_STEPS;\n\n/** Icon sizes. The scale stops at 3xl (64px); there is no step above it. */\nexport const ICON_SIZE_STEPS = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nexport type IconSize = typeof ICON_SIZE_STEPS[number];\n\nexport const RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nexport type RadiusStep = typeof RADIUS_STEPS[number];\n\n/**\n * Semantic colour roles a component's `color` prop may name.\n *\n * These resolve through the --color-text-* roles rather than reaching past\n * them into the palette, which is what the semantic colour block in\n * src/tokens/tokens.ts says they should do. Spelled as palette steps, this\n * map was the reason a page could retint --color-text-muted and watch every\n * bd-h with color=\"muted\" ignore it: the values matched, so nothing looked\n * wrong until someone tried to change one.\n *\n * The prop vocabulary and the token vocabulary are deliberately not the same\n * words. `strong` and `primary` read better on a component than\n * `text-primary` and `text-brand` do, and renaming the prop would break\n * consumers' markup for no gain. The mapping is the seam, and it lives here.\n *\n * Every role clears 4.5:1 on white, which is what the docstring here always\n * claimed and what `subtle` did not do: it named neutral-400, which measures\n * 3.23:1 and fails 1.4.3 for text. It now resolves to --color-text-subtle\n * (neutral-500, 4.67:1). Nothing in this repository passed color=\"subtle\",\n * so the fix costs nothing today — note that neutral-400 is the step the\n * token layer calls `disabled`, and disabled text is exempt under 1.4.3,\n * which is presumably how the two got crossed.\n */\nexport const COLOR_ROLES = {\n primary : '--color-text-brand',\n strong : '--color-text-primary',\n muted : '--color-text-muted',\n subtle : '--color-text-subtle',\n inverse : '--color-text-inverse',\n /* Ink on a brand fill. `inverse` is for a dark neutral band; on a brand band\n the ink is the brand's, because a partner whose brand is light takes dark\n ink there, and white -- inverse -- would not read on it. Same pixel as\n inverse under Bitdefender. */\n 'on-brand': '--color-brand-on-fill',\n success : '--color-text-success',\n warning : '--color-text-warning',\n error : '--color-text-error'\n} as const;\nexport type ColorRole = keyof typeof COLOR_ROLES;\n\nexport const COLOR_ROLE_NAMES = Object.keys(COLOR_ROLES) as ColorRole[];\n\n/**\n * The hairline vocabulary.\n *\n * A divider is a border, and until now the only colour prop it had resolved\n * through COLOR_ROLES above -- the *ink* vocabulary. That is the category\n * error CLAUDE.md names (\"Never use a token from the wrong category\"), and\n * this file already carried a milder version of it: bd-divider-horizontal's\n * constructor records that its default used to say `subtle`, a text role that\n * matched the right value by coincidence.\n *\n * The cost was not theoretical. bd-quick-answer needs a hairline in\n * --status-brand-border, because its rule sits on a brand tint and a neutral\n * line reads as dirt there. No text role expresses that, so the component drew\n * its own `border-top` instead of composing the atom -- which is exactly the\n * \"dividers are not borders\" confusion the same document warns about, arrived\n * at from the other direction: the divider could not say what the component\n * meant, so the component stopped using the divider.\n *\n * `brand-subtle` is the one entry that reaches outside the --color-border-*\n * family, and it is here because it has a consumer today. The rest of the\n * status hairlines are deliberately absent until one does.\n *\n * `inverse` is deliberately NOT here. It would resolve to\n * --color-border-container-inverse, which is white at 12%, where the text\n * role it resolves to today is solid white -- and each divider then multiplies\n * that by its own `opacity` prop (0.25 by default on the horizontal, 1.00 on\n * the vertical). The dividers that pass color=\"inverse\" would drop from solid\n * white to 12%, or from 25% to 3%, and effectively vanish. It keeps falling\n * through to the legacy text role below, and that is recorded rather than\n * fixed: whether a hairline on a dark surface should be a 12% border role at\n * full opacity, or a solid one dimmed by the prop, is a real design question\n * and not this change's to answer.\n */\nexport const BORDER_ROLES = {\n default : '--color-border-default',\n subtle : '--color-border-subtle',\n strong : '--color-border-strong',\n container : '--color-border-container',\n brand : '--color-border-brand',\n disabled : '--color-border-disabled',\n 'brand-subtle': '--status-brand-border'\n} as const;\nexport type BorderRole = keyof typeof BORDER_ROLES;\n\nexport const BORDER_ROLE_NAMES = Object.keys(BORDER_ROLES) as BorderRole[];\n\nconst onScale = (steps: readonly string[], prefix: string) => (value: unknown): string =>\n steps.includes(String(value)) ? `var(${prefix}${value})` : '';\n\nexport const spacing = onScale(SPACING_STEPS, '--spacing-');\nexport const fontSize = onScale(FONT_SIZE_STEPS, '--typography-fontSize-');\nexport const fontWeight = onScale(FONT_WEIGHT_STEPS, '--typography-fontWeight-');\nexport const fontFamily = onScale(FONT_FAMILY_STEPS, '--typography-fontFamily-');\nexport const letterSpacing = onScale(LETTER_SPACING_STEPS, '--typography-letterSpacing-');\n/* none and full are corners a brand must not move -- square on purpose, and a\n circle -- so they stay on the scale; every other step reads the shape ramp a\n theme restates. Nothing calls this today; a caller that does gets partner\n corners for free. */\nconst radiusStep = onScale(RADIUS_STEPS, '--radius-');\nexport const radius = (step: unknown): string => (['none', 'full'].includes(String(step)) ? radiusStep(step) : onScale(RADIUS_STEPS, '--shape-radius-')(step));\n\n/* The border-width steps. A px spelling of a step -- \"2px\" -- is read as the\n step, because that is what callers wrote before there was a scale here. */\nexport const BORDER_WIDTH_STEPS = ['0', '1', '2', '3', '4', '8'] as const;\nexport type BorderWidthStep = typeof BORDER_WIDTH_STEPS[number];\nexport const borderWidth = (value: unknown): string => {\n const step = String(value ?? '').replace(/px$/, '');\n return (BORDER_WIDTH_STEPS as readonly string[]).includes(step) ? `var(--border-width-${step})` : '';\n};\n\n/* Not a scale: a fraction. An opacity given as a prop is kept only when it is\n a number from 0 to 1, so a stray string never reaches an inline style. */\nexport const opacity = (value: unknown): string => {\n if (value === '' || value == null) return '';\n const n = Number(value);\n return Number.isFinite(n) && n >= 0 && n <= 1 ? String(n) : '';\n};\n\nexport const space = (name: unknown): string =>\n (Object.hasOwn(SPACE_STEPS, name as PropertyKey) ? `var(--spacing-${SPACE_STEPS[name as SpaceName]})` : '');\n\n/** --icon-*-size wraps its step, so it needs a suffix onScale cannot express. */\nexport const iconSize = (value: unknown): string =>\n ((ICON_SIZE_STEPS as readonly string[]).includes(String(value)) ? `var(--icon-${value}-size)` : '');\n\nexport const color = (role: unknown): string =>\n Object.hasOwn(COLOR_ROLES, role as PropertyKey) ? `var(${COLOR_ROLES[role as ColorRole]})` : '';\n\n/**\n * A hairline's colour: border roles first, then the ink vocabulary as legacy.\n *\n * Border-first is the point -- `subtle` on a divider means\n * --color-border-subtle, not --color-text-subtle. The fallback exists so the\n * names already in use keep working (`inverse`, and `strong`, which resolves\n * to neutral-900 either way), and it is a migration path, not a second\n * vocabulary: a new divider should be spelled with a border role.\n */\nexport const borderColor = (role: unknown): string =>\n (Object.hasOwn(BORDER_ROLES, role as PropertyKey)\n ? `var(${BORDER_ROLES[role as BorderRole]})`\n : color(role));\n\n/**\n * A one-to-four-value spacing shorthand written as steps, e.g. \"10 0\" gives\n * `var(--spacing-10) var(--spacing-0)`. All parts must be on the scale, or\n * the whole value is dropped — a half-valid shorthand is worse than none.\n */\nexport const spacingShorthand = (value: unknown): string => {\n const parts = String(value ?? '').trim()\n .split(/\\s+/)\n .filter(Boolean);\n if (parts.length < 1 || parts.length > 4) return '';\n const refs = parts.map(spacing);\n return refs.every(Boolean) ? refs.join(' ') : '';\n};\n\n/* ================================================================\n BREAKPOINTS\n ================================================================\n The seven viewport widths, and the only place a media condition is built\n from them.\n\n This lives in JS rather than in the token file because a media condition\n cannot read a custom property — `@media (max-width: var(--breakpoint-md))`\n is not valid CSS — so the seven values have to be interpolated into the\n stylesheet at author time. `--breakpoint-*` in src/tokens/tokens.ts stays\n the published record of the scale; this is how a component consumes it.\n\n `above` and `below` return a media *condition*, not a whole `@media` rule,\n so they compose:\n\n @media ${below('md')} { ... }\n @media ${above('sm')} and ${below('lg')} { ... }\n\n ---\n\n WHY THE HELPER OWNS THE COMPLEMENT.\n\n A breakpoint is one number, but it has two sides, and writing the second\n one by hand is how the boundary drifts. `min-width: 768px` and\n `max-width: 768px` are both true at exactly 768px, so a component that\n spelled its mobile rule the obvious way applied both its mobile and its\n desktop styling at that one width: pricing-card.css.ts had\n `@media (max-width: 768px)` at one rule and\n `@media (min-width: 768px) and (max-width: 1024px)` at another, and\n thirteen more files used the same `max-width: 768px` form.\n\n The complement is derived here so that number is never typed. Do not write\n 767px, 991px or 1199px anywhere; write `below('md')`, `below('lg')`,\n `below('xl')`.\n\n ---\n\n WHY RANGE SYNTAX, AND NO EPSILON.\n\n `(width >= 768px)` and `(width < 768px)` are exact complements: every\n width, fractional ones included, matches one of them and never both. A\n viewport is not always a whole number of pixels -- browser zoom, some\n Android densities and fractional device-pixel-ratios all produce widths\n like 767.5px -- and the min-/max- spelling could not say \"narrower than\"\n without choosing a number below the breakpoint. `max-width: 767px` left\n every width between 767 and 768 matched by neither side, and the\n `max-width: 767.98px` this helper emitted until 2026-10-28 shrank that band\n to a fiftieth of a pixel rather than closing it. The range form has no\n number to choose.\n\n Media query range syntax is Baseline Widely available (since 2023-03), so\n it is used as is. The same conditions are valid in @container, where they\n ask the container's width instead of the viewport's:\n\n @container ${below('sm')} { ... } */\n\nexport const BREAKPOINTS = {\n xs : 0,\n sm : 576,\n md : 768,\n lg : 992,\n xl : 1200,\n xxl : 1400,\n /* Not a grid-progression step: the site's menu and footer widen here, and\n the page column has to widen with them. See --grid-container-max-xxxl. */\n xxxl: 1600\n} as const;\nexport type Breakpoint = keyof typeof BREAKPOINTS;\n\nexport const BREAKPOINT_NAMES = Object.keys(BREAKPOINTS) as Breakpoint[];\n\n/** Throws rather than returning empty — see the note in the file header. */\nconst step = (name: Breakpoint): number => {\n if (!Object.hasOwn(BREAKPOINTS, name)) {\n throw new Error(`Unknown breakpoint: ${name}. Expected one of ${BREAKPOINT_NAMES.join(', ')}.`);\n }\n return BREAKPOINTS[name];\n};\n\n/**\n * \"This breakpoint and wider.\"\n *\n * above('md') → (width >= 768px)\n *\n * `above('xs')` is `(width >= 0px)`, which is always true. That is a\n * harmless no-op rather than an error, because it is the honest answer for\n * the bottom of the scale — but a rule that needs no condition should have\n * no media query.\n */\nexport const above = (name: Breakpoint): string => `(width >= ${step(name)}px)`;\n\n/**\n * \"Narrower than this breakpoint\" — the exact complement of `above`.\n *\n * below('md') → (width < 768px)\n *\n * `below('xs')` throws: xs is 0, and no viewport is narrower than that, so\n * the query could only ever be dead CSS.\n */\nexport const below = (name: Breakpoint): string => {\n const value = step(name);\n if (value === 0) {\n throw new Error(`below('${name}') has no meaning: no viewport is narrower than ${value}px. Did you mean above('${name}')?`);\n }\n return `(width < ${value}px)`;\n};\n\n/**\n * The JS side of `below`, for the viewport logic CSS genuinely cannot express\n * — choosing which markup to render rather than how to style it.\n *\n * matchesBelow('md') → true when the viewport is narrower than md\n *\n * It reads the same scale as the stylesheet, so the two cannot disagree. That\n * is the failure this replaces: bd-footer switched at 767 in CSS and at 767\n * in JS while bd-footer-lp, sharing the same stylesheet, switched at 768.\n *\n * Prefer CSS. Reach for this only when the component's *behaviour* changes,\n * and re-read it on `resize` — the value is a snapshot, not a subscription.\n *\n * Outside a browser (SSR, a bare Node import) there is no viewport to be\n * narrower than, so this reports false. The name is still validated first, so\n * a typo throws in every environment rather than only in the browser.\n */\nexport const matchesBelow = (name: Breakpoint): boolean => {\n const condition = below(name);\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return window.matchMedia(condition).matches;\n};\n\n/* ================================================================\n ROLE STEPS\n ================================================================\n bd-h and bd-p size their text from the role their level or appearance\n names -- `.bd-heading.h4` reads --typography-heading-h4-*,\n `appearance=\"small\"` reads --typography-body-small-* -- unless a container\n sets one of the type hooks at the foot of this file on them. A component\n whose type steps down at a width used to re-render with another level or\n appearance, decided once from the screen at render time and stale after\n any resize, and moving the document outline with it.\n\n readAs() keeps the level and the appearance and steps the size in CSS: inside\n a query, it points the role the element names at another one, on that\n element only.\n\n @container ${below('md')} {\n .card-title { ${readAs('heading-h4', 'heading-h5')} }\n }\n\n The declarations land on an element inside the component's own shadow\n root, where no page style can reach or override them -- not on :host,\n where a re-declared token would shadow the page's. A role name is written\n by the component author, so an unknown one throws, as below() does. */\n\nconst ROLE_AXES = {\n 'heading-h1' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h2' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h3' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h4' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h5' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n 'heading-h6' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily'],\n /* bd-p's variant rules read four axes; the family is the paragraph's own. */\n 'body-large' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing'],\n 'body-regular': ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing'],\n 'body-small' : ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing']\n} as const;\nexport type TypeRole = keyof typeof ROLE_AXES;\n\n/** \"Text set in role `from` reads as role `to` here.\" Declarations, for inside a rule. */\nexport const readAs = (from: TypeRole, to: TypeRole): string => {\n for (const role of [from, to]) {\n if (!Object.hasOwn(ROLE_AXES, role)) {\n throw new Error(`Unknown type role: ${role}. Expected one of ${Object.keys(ROLE_AXES).join(', ')}.`);\n }\n }\n if (from.split('-')[0] !== to.split('-')[0]) {\n throw new Error(`readAs('${from}', '${to}'): a heading role reads as a heading, a body role as a body role.`);\n }\n /* Not a no-op. A role read as itself writes each of its axes as a var() of\n that same property, which is a custom-property cycle. Every property in a\n cycle is invalid at computed-value time, so the font-size reading it is\n too, and the text silently takes its parent's size -- measured in\n __tests__/type-hooks.test.ts, an h2 at the body's 16px. lint:tokens'\n self-referential-token rule catches the hand-written form; this is the\n generated one, which no source scan can see. */\n if (from === to) {\n throw new Error(`readAs('${from}', '${to}'): a role read as itself is a custom-property cycle, and the text falls back to its parent's size. Leave the role alone instead.`);\n }\n return ROLE_AXES[from].map(axis => `--typography-${from}-${axis}: var(--typography-${to}-${axis});`).join(' ');\n};\n\n/* ================================================================\n TYPE HOOKS\n ================================================================\n The page owns its outline and slots the heading in: <bd-h slot=\"title\"\n as=\"h4\">. The container still decides how that heading looks, and these\n say so. bd-h and bd-display read --bd-heading-*, bd-p reads\n --bd-paragraph-*, and each falls back to the role its own level or variant\n names, so an atom nobody sets a hook on renders as it always did.\n\n ::slotted(bd-h[slot=\"title\"]) {\n ${unsafeCSS(headingRole('heading-h2'))} ${unsafeCSS(ink('on-brand'))}\n }\n @container ${below('md')} {\n ::slotted(bd-h[slot=\"title\"]) { ${unsafeCSS(headingRole('heading-h4'))} }\n }\n\n readAs() above answers a different question: it re-points a role the\n element already names, inside the component's own shadow root. A hook\n sets the role from outside, whatever level the page chose.\n\n Each atom resets its type hooks to `initial` on its own :host, so a hook\n applies only on the element it is set on -- a section's title size never\n reaches a heading nested in a card below it. The ink hooks are not reset:\n ink belongs to the ground the text sits on, and everything inside a band\n sits on it. An explicit visual-level, color= or fontWeight= on the atom\n still wins over a hook.\n\n The role is written by the component author, so an unknown one throws, as\n readAs() and below() do. */\n\n/* Each hook is the axis's own CSS property name: --bd-heading-font-size\n carries what font-size reads. */\nconst HOOK_AXES = {\n fontSize : 'font-size',\n fontWeight : 'font-weight',\n lineHeight : 'line-height',\n letterSpacing: 'letter-spacing',\n fontFamily : 'font-family'\n} as const;\ntype HookAxis = keyof typeof HOOK_AXES;\n\n/* bd-h and bd-display share the heading hooks, so one rule sizes a title\n whichever atom the page wrote, and either kind of role goes into it. */\nexport const HEADING_ROLES = [\n 'heading-h1', 'heading-h2', 'heading-h3', 'heading-h4', 'heading-h5', 'heading-h6',\n 'display-sm', 'display-md', 'display-lg', 'display-xl', 'display-2xl', 'display-3xl'\n] as const;\nexport type HeadingRole = typeof HEADING_ROLES[number];\n\n/* The four body roles that carry every axis bd-p's variants read.\n body-xsmall is a size and nothing else -- bd-p borrows body-small's weight,\n leading and tracking for it -- so it is not a role a hook can name whole. */\nexport const BODY_ROLES = ['body-lead', 'body-large', 'body-regular', 'body-small'] as const;\nexport type BodyRole = typeof BODY_ROLES[number];\n\nconst hooksFor = (atom: 'heading' | 'paragraph', role: string, axes: readonly HookAxis[]): string =>\n axes.map(axis => `--bd-${atom}-${HOOK_AXES[axis]}: var(--typography-${role}-${axis});`).join(' ');\n\n/**\n * \"The heading here is set in `role`.\" The five --bd-heading-* type hooks,\n * for inside a rule that matches a bd-h or bd-display host.\n *\n * headingRole('heading-h2') → --bd-heading-font-size: var(--typography-heading-h2-fontSize); …\n */\nexport const headingRole = (role: HeadingRole): string => {\n if (!(HEADING_ROLES as readonly string[]).includes(role)) {\n throw new Error(`Unknown heading role: ${role}. Expected one of ${HEADING_ROLES.join(', ')}.`);\n }\n return hooksFor('heading', role, ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing', 'fontFamily']);\n};\n\n/**\n * \"The paragraph here is set in `role`.\" The four --bd-paragraph-* type\n * hooks; the family is bd-p's own, as readAs() leaves it.\n *\n * bodyRole('body-large') → --bd-paragraph-font-size: var(--typography-body-large-fontSize); …\n */\nexport const bodyRole = (role: BodyRole): string => {\n if (!(BODY_ROLES as readonly string[]).includes(role)) {\n throw new Error(`Unknown body role: ${role}. Expected one of ${BODY_ROLES.join(', ')}.`);\n }\n return hooksFor('paragraph', role, ['fontSize', 'fontWeight', 'lineHeight', 'letterSpacing']);\n};\n\n/**\n * \"Text here sits on a ground whose ink is `role`.\" Both ink hooks, from the\n * same COLOR_ROLES the atoms' color prop takes, so a heading and its\n * paragraph cannot be handed two inks for one band.\n *\n * ink('on-brand') → --bd-heading-color: var(--color-brand-on-fill); --bd-paragraph-color: var(--color-brand-on-fill);\n */\nexport const ink = (role: ColorRole): string => {\n const value = color(role);\n if (!value) {\n throw new Error(`Unknown colour role: ${role}. Expected one of ${COLOR_ROLE_NAMES.join(', ')}.`);\n }\n return `--bd-heading-color: ${value}; --bd-paragraph-color: ${value};`;\n};\n"],"mappings":"AAkBA,IAAaA,EAAgB,wGAG7B,EAGaC,EAAkB,CAC7B,MAAO,KAAM,KAAM,OAAQ,KAAM,KACjC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KACnD,EAGaC,EAAoB,CAAC,QAAS,SAAU,SAAU,WAAY,MAAM,EAIpEC,EAAoB,CAAC,OAAQ,MAAM,EAGnCC,EAAuB,CAAC,UAAW,QAAS,SAAU,OAAQ,QAAS,QAAQ,EAU/EC,EAAc,CACzB,KAAO,IAAK,MAAO,IAAK,MAAO,IAAK,MAAO,IAAK,GAAO,KAAM,GAAO,KACpE,GAAO,KAAM,GAAO,KAAM,GAAO,KAAM,MAAO,KAAM,MAAO,KAAM,MAAO,KAAM,MAAO,KACvF,EAIaC,EAAkB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MAAO,KAAK,EAG7DC,EAAe,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EA0BpEC,EAAc,CACzB,QAAY,qBACZ,OAAY,uBACZ,MAAY,qBACZ,OAAY,sBACZ,QAAY,uBAKZ,WAAY,wBACZ,QAAY,uBACZ,QAAY,uBACZ,MAAY,oBACd,EAGaC,EAAmB,OAAO,KAAKD,CAAW,EAmC1CE,EAAe,CAC1B,QAAgB,yBAChB,OAAgB,wBAChB,OAAgB,wBAChB,UAAgB,2BAChB,MAAgB,uBAChB,SAAgB,0BAChB,eAAgB,uBAClB,EAGaC,EAAoB,OAAO,KAAKD,CAAY,EAEnDE,GAAW,EAA0B,IAAoB,GAC7DC,EAAM,SAAS,OAAOC,CAAK,CAAC,EAAI,OAAOC,IAASD,EAAM,GAAK,GAEhDE,EAAaJ,EAAQZ,EAAe,YAAY,EAChDiB,EAAaL,EAAQX,EAAiB,wBAAwB,EAC9DiB,EAAaN,EAAQV,EAAmB,0BAA0B,EAClEiB,EAAaP,EAAQT,EAAmB,0BAA0B,EAClEiB,EAAgBR,EAAQR,EAAsB,6BAA6B,EAKlFiB,EAAaT,EAAQL,EAAc,WAAW,EACvCe,EAAU,GAA2B,CAAC,OAAQ,MAAM,CAAC,CAAC,SAAS,OAAOC,CAAI,CAAC,EAAIF,EAAWE,CAAI,EAAIX,EAAQL,EAAc,iBAAiB,CAAC,CAACgB,CAAI,EAI/IC,EAAqB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAElDC,EAAe,GAA2B,CACrD,IAAMF,EAAO,OAAOT,GAAS,EAAE,CAAC,CAAC,QAAQ,MAAO,EAAE,EAClD,OAAQU,EAAyC,SAASD,CAAI,EAAI,sBAAsBA,EAAK,GAAK,EACpG,EAIaG,EAAW,GAA2B,CACjD,GAAIZ,IAAU,IAAMA,GAAS,KAAM,MAAO,GAC1C,IAAMa,EAAI,OAAOb,CAAK,EACtB,OAAO,OAAO,SAASa,CAAC,GAAKA,GAAK,GAAKA,GAAK,EAAI,OAAOA,CAAC,EAAI,EAC9D,EAEaC,EAAS,GACnB,OAAO,OAAOvB,EAAawB,CAAmB,EAAI,iBAAiBxB,EAAYwB,GAAmB,GAAK,GAG7FC,EAAY,GACrBxB,EAAsC,SAAS,OAAOQ,CAAK,CAAC,EAAI,cAAcA,EAAM,QAAU,GAErFiB,EAAS,GACpB,OAAO,OAAOvB,EAAawB,CAAmB,EAAI,OAAOxB,EAAYwB,GAAmB,GAAK,GAWlFC,EAAe,GACzB,OAAO,OAAOvB,EAAcsB,CAAmB,EAC5C,OAAOtB,EAAasB,GAAoB,GACxCD,EAAMC,CAAI,EAOHE,EAAoB,GAA2B,CAC1D,IAAMC,EAAQ,OAAOrB,GAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CACrC,MAAM,KAAK,CAAC,CACZ,OAAO,OAAO,EACjB,GAAIqB,EAAM,OAAS,GAAKA,EAAM,OAAS,EAAG,MAAO,GACjD,IAAMC,EAAOD,EAAM,IAAInB,CAAO,EAC9B,OAAOoB,EAAK,MAAM,OAAO,EAAIA,EAAK,KAAK,GAAG,EAAI,EAChD,EA0DaC,EAAc,CACzB,GAAM,EACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,KACN,IAAM,KAGN,KAAM,IACR,EAGaC,EAAmB,OAAO,KAAKD,CAAW,EAGjDd,EAAQ,GAA6B,CACzC,GAAI,CAAC,OAAO,OAAOc,EAAaR,CAAI,EAClC,MAAU,MAAM,uBAAuBA,EAAK,oBAAoBS,EAAiB,KAAK,IAAI,EAAE,EAAE,EAEhG,OAAOD,EAAYR,EACrB,EAYaU,EAAS,GAA6B,aAAahB,EAAKM,CAAI,EAAE,KAU9DW,EAAS,GAA6B,CACjD,IAAM1B,EAAQS,EAAKM,CAAI,EACvB,GAAIf,IAAU,EACZ,MAAU,MAAM,UAAUe,EAAK,kDAAkDf,EAAM,0BAA0Be,EAAK,IAAI,EAE5H,MAAO,YAAYf,EAAM,IAC3B,EAmBa2B,EAAgB,GAA8B,CACzD,IAAMC,EAAYF,EAAMX,CAAI,EAE5B,OADI,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WAAmB,GAC9E,OAAO,WAAWa,CAAS,CAAC,CAAC,OACtC,EA0BMC,EAAY,CAChB,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EACtF,aAAgB,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,EAEtF,aAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,EACxE,eAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,EACxE,aAAgB,CAAC,WAAY,aAAc,aAAc,eAAe,CAC1E,EAIaC,GAAU,EAAgB,IAAyB,CAC9D,IAAK,IAAMZ,IAAQ,CAACa,EAAMC,CAAE,EAC1B,GAAI,CAAC,OAAO,OAAOH,EAAWX,CAAI,EAChC,MAAU,MAAM,sBAAsBA,EAAK,oBAAoB,OAAO,KAAKW,CAAS,CAAC,CAAC,KAAK,IAAI,EAAE,EAAE,EAGvG,GAAIE,EAAK,MAAM,GAAG,CAAC,CAAC,KAAOC,EAAG,MAAM,GAAG,CAAC,CAAC,GACvC,MAAU,MAAM,WAAWD,EAAK,MAAMC,EAAG,mEAAmE,EAS9G,GAAID,IAASC,EACX,MAAU,MAAM,WAAWD,EAAK,MAAMC,EAAG,kIAAkI,EAE7K,OAAOH,EAAUE,EAAK,CAAC,IAAI,GAAQ,gBAAgBA,EAAK,GAAGE,EAAK,qBAAqBD,EAAG,GAAGC,EAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAC/G,EAkCMC,EAAY,CAChB,SAAe,YACf,WAAe,cACf,WAAe,cACf,cAAe,iBACf,WAAe,aACjB,EAKaC,EAAgB,CAC3B,aAAc,aAAc,aAAc,aAAc,aAAc,aACtE,aAAc,aAAc,aAAc,aAAc,cAAe,aACzE,EAMaC,EAAa,CAAC,YAAa,aAAc,eAAgB,YAAY,EAG5EC,GAAY,EAA+B,EAAc,IAC7DC,EAAK,IAAI,GAAQ,QAAQC,EAAK,GAAGL,EAAUD,GAAM,qBAAqBf,EAAK,GAAGe,EAAK,GAAG,CAAC,CAAC,KAAK,GAAG,EAQrFO,EAAe,GAA8B,CACxD,GAAI,CAAEL,EAAoC,SAASjB,CAAI,EACrD,MAAU,MAAM,yBAAyBA,EAAK,oBAAoBiB,EAAc,KAAK,IAAI,EAAE,EAAE,EAE/F,OAAOE,EAAS,UAAWnB,EAAM,CAAC,WAAY,aAAc,aAAc,gBAAiB,YAAY,CAAC,CAC1G,EAQauB,EAAY,GAA2B,CAClD,GAAI,CAAEL,EAAiC,SAASlB,CAAI,EAClD,MAAU,MAAM,sBAAsBA,EAAK,oBAAoBkB,EAAW,KAAK,IAAI,EAAE,EAAE,EAEzF,OAAOC,EAAS,YAAanB,EAAM,CAAC,WAAY,aAAc,aAAc,eAAe,CAAC,CAC9F,EASawB,EAAO,GAA4B,CAC9C,IAAM1C,EAAQiB,EAAMC,CAAI,EACxB,GAAI,CAAClB,EACH,MAAU,MAAM,wBAAwBkB,EAAK,oBAAoBvB,EAAiB,KAAK,IAAI,EAAE,EAAE,EAEjG,MAAO,uBAAuBK,EAAM,0BAA0BA,EAAM,EACtE,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.css.js","names":["spinnerCSS"],"sources":["../../../../src/components/spinner/spinner.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const spinnerCSS = css`\n /* The arc and the track are component-local properties rather than values\n written into the rule, because a spinner is often the one thing on a\n coloured panel and was previously pinned to blue-500 on neutral-200 —\n 3.5:1 against a white page, and invisible on a blue one. Set them on the\n element to place it anywhere, or use surface=\"dark\" for the common case.\n\n bd-button does not use this element. Its loading mark is drawn inline\n because it needs to be em-sized to track the button's own type scale,\n currentColor to follow the variant's label, and decorative rather than\n announced — the button already carries aria-busy. Three different\n requirements from this component's one, so they stay separate. */\n :host {\n display: inline-flex;\n --bd-spinner-arc: var(--color-action-primary);\n --bd-spinner-track: var(--color-border-subtle);\n /* no role: the two roles at blue-100 are the heavier tints of the brand\n and info families -- a badge shade. This is a decorative pulse behind a\n spinning arc, which is not that job. Note the name says \"fill\" and .pulse\n reads it as a background, so the gate's kind inference is off by a\n category here; the classification does not depend on it. */\n --bd-spinner-pulse-fill: var(--color-brand-100);\n }\n\n :host([surface='dark']) {\n --bd-spinner-arc: var(--color-neutral-0);\n --bd-spinner-track: color-mix(in srgb, var(--color-neutral-0) 30%, transparent);\n /* no role: an alpha value, which an opaque palette cannot express at all --\n the same class as the scrim in modal.css.ts. */\n --bd-spinner-pulse-fill: color-mix(in srgb, var(--color-neutral-0) 30%, transparent);\n }\n\n /* The status region: text for assistive technology, nothing on screen. */\n .announce {\n position: absolute;\n /* no token: 1px is the clip idiom's own measure, not a border -- the same\n sanctioned literal as visually-hidden.css.ts. */\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n .spinner {\n width: var(--dimension-24);\n height: var(--dimension-24);\n border: var(--border-width-2) solid var(--bd-spinner-track);\n border-top-color: var(--bd-spinner-arc);\n border-radius: var(--radius-full);\n animation: bd-spin var(--transition-duration-slower) var(--transition-easing-linear) infinite;\n }\n\n :host([size='sm']) .spinner { width: var(--dimension-16); height: var(--dimension-16); }\n :host([size='lg']) .spinner { width: var(--dimension-40); height: var(--dimension-40); }\n\n @keyframes bd-spin { to { transform: rotate(360deg); } }\n\n /* A spinner that cannot spin should still say something, so it pulses\n rather than freezing solid -- but only the disc inside it. This used to\n repaint the arc in the track colour and pulse the whole ring, so what was\n left was the track alone: 1.66:1 against the page, 1.21:1 at the pulse's\n low point, under the 3:1 WCAG 1.4.11 asks of a graphic that conveys\n state. The arc now stays, still and at full strength (4.53:1 on the page,\n 3.64:1 on the disc), and the disc behind it carries the motion. Pulsing\n the whole spinner instead would take the arc to 1.79:1 at the bottom of\n each pulse. */\n @media (prefers-reduced-motion: reduce) {\n .spinner {\n position: relative;\n animation: none;\n }\n .spinner::before {\n content: \"\";\n position: absolute;\n inset: var(--spacing-0);\n border-radius: var(--radius-full);\n background: var(--bd-spinner-pulse-fill);\n animation: bd-pulse var(--transition-duration-slower) var(--transition-easing-smooth) infinite alternate;\n }\n @keyframes bd-pulse { to { opacity: var(--opacity-pulse); } }\n }\n`;\n\nexport default spinnerCSS;\n"],"mappings":"A,0BAGA,IAAaA,EAAa,CAAG,q2C"}
|
|
1
|
+
{"version":3,"file":"spinner.css.js","names":["spinnerCSS"],"sources":["../../../../src/components/spinner/spinner.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const spinnerCSS = css`\n /* The arc and the track are component-local properties rather than values\n written into the rule, because a spinner is often the one thing on a\n coloured panel and was previously pinned to blue-500 on neutral-200 —\n 3.5:1 against a white page, and invisible on a blue one. Set them on the\n element to place it anywhere, or use surface=\"dark\" for the common case.\n\n bd-button does not use this element. Its loading mark is drawn inline\n because it needs to be em-sized to track the button's own type scale,\n currentColor to follow the variant's label, and decorative rather than\n announced — the button already carries aria-busy. Three different\n requirements from this component's one, so they stay separate. */\n :host {\n display: inline-flex;\n --bd-spinner-arc: var(--color-action-primary);\n --bd-spinner-track: var(--color-border-subtle);\n /* no role: the two roles at blue-100 are the heavier tints of the brand\n and info families -- a badge shade. This is a decorative pulse behind a\n spinning arc, which is not that job. Note the name says \"fill\" and .pulse\n reads it as a background, so the gate's kind inference is off by a\n category here; the classification does not depend on it. */\n --bd-spinner-pulse-fill: var(--color-brand-100);\n }\n\n :host([surface='dark']) {\n /* no role: surface=\"dark\" is a ground dark in every theme, so its arc and\n track are white in both, as bd-button's surface=\"dark\" ink is */\n --bd-spinner-arc: var(--color-neutral-0);\n /* no role: as above, at 30% */\n --bd-spinner-track: color-mix(in srgb, var(--color-neutral-0) 30%, transparent);\n /* no role: an alpha value, which an opaque palette cannot express at all --\n the same class as the scrim in modal.css.ts. */\n --bd-spinner-pulse-fill: color-mix(in srgb, var(--color-neutral-0) 30%, transparent);\n }\n\n /* The status region: text for assistive technology, nothing on screen. */\n .announce {\n position: absolute;\n /* no token: 1px is the clip idiom's own measure, not a border -- the same\n sanctioned literal as visually-hidden.css.ts. */\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n .spinner {\n width: var(--dimension-24);\n height: var(--dimension-24);\n border: var(--border-width-2) solid var(--bd-spinner-track);\n border-top-color: var(--bd-spinner-arc);\n border-radius: var(--radius-full);\n animation: bd-spin var(--transition-duration-slower) var(--transition-easing-linear) infinite;\n }\n\n :host([size='sm']) .spinner { width: var(--dimension-16); height: var(--dimension-16); }\n :host([size='lg']) .spinner { width: var(--dimension-40); height: var(--dimension-40); }\n\n @keyframes bd-spin { to { transform: rotate(360deg); } }\n\n /* A spinner that cannot spin should still say something, so it pulses\n rather than freezing solid -- but only the disc inside it. This used to\n repaint the arc in the track colour and pulse the whole ring, so what was\n left was the track alone: 1.66:1 against the page, 1.21:1 at the pulse's\n low point, under the 3:1 WCAG 1.4.11 asks of a graphic that conveys\n state. The arc now stays, still and at full strength (4.53:1 on the page,\n 3.64:1 on the disc), and the disc behind it carries the motion. Pulsing\n the whole spinner instead would take the arc to 1.79:1 at the bottom of\n each pulse. */\n @media (prefers-reduced-motion: reduce) {\n .spinner {\n position: relative;\n animation: none;\n }\n .spinner::before {\n content: \"\";\n position: absolute;\n inset: var(--spacing-0);\n border-radius: var(--radius-full);\n background: var(--bd-spinner-pulse-fill);\n animation: bd-pulse var(--transition-duration-slower) var(--transition-easing-smooth) infinite alternate;\n }\n @keyframes bd-pulse { to { opacity: var(--opacity-pulse); } }\n }\n`;\n\nexport default spinnerCSS;\n"],"mappings":"A,0BAGA,IAAaA,EAAa,CAAG,q2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{SIZES as t,isOneOf as n}from"../shared/prop-vocabulary.js";import r from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import i from"./spinner.css.js";import{LitElement as a,html as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends a{constructor(...e){super(...e),this.size=`md`,this.label=`Loading`,this.surface=`light`,this._announce=!1}static{this.styles=[i]}firstUpdated(){this._announceTimer=setTimeout(()=>{this._announce=!0},100)}disconnectedCallback(){clearTimeout(this._announceTimer),super.disconnectedCallback()}willUpdate(e){e.has(`size`)&&!n(t,this.size)&&(this.size=`md`)}render(){return o`
|
|
2
2
|
<span class="spinner" aria-hidden="true"></span>
|
|
3
3
|
<span class="announce" role="status">${this._announce?this.label:``}</span>
|
|
4
|
-
`}};
|
|
4
|
+
`}};r([s({type:String,reflect:!0})],l.prototype,`size`,void 0),r([s({type:String})],l.prototype,`label`,void 0),r([s({type:String,reflect:!0})],l.prototype,`surface`,void 0),r([c()],l.prototype,`_announce`,void 0),l=r([e(`bd-spinner`)],l);export{l as BdSpinner};
|
|
5
5
|
//# sourceMappingURL=spinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","names":["_decorate","__decorate","spinnerCSS","BdSpinner","LitElement","_args","changed","
|
|
1
|
+
{"version":3,"file":"spinner.js","names":["_decorate","__decorate","spinnerCSS","BdSpinner","LitElement","_args","changed","isOneOf","SIZES","property","state","defineElement"],"sources":["../../../../src/components/spinner/spinner.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from 'lit';\nimport { property, state } 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 { spinnerCSS } from './spinner.css.ts';\nimport { isOneOf, SIZES, type Size } from '#shared/prop-vocabulary.ts';\n\ntype Surface = 'light' | 'dark';\n\n@defineElement('bd-spinner')\nexport class BdSpinner extends LitElement {\n static styles = [spinnerCSS];\n\n @property({ type: String, reflect: true })\n size: Size = 'md';\n @property({ type: String })\n label = 'Loading';\n /* The surface the spinner sits on. Its default arc and track were both\n chosen against a white page, so on a filled panel it all but disappears.\n Same attribute, same meaning, as on bd-button. */\n @property({ type: String, reflect: true })\n surface: Surface = 'light';\n @state()\n _announce = false;\n\n _announceTimer?: ReturnType<typeof setTimeout>;\n\n /* WHY THE TEXT ARRIVES LATE.\n This was an empty role=\"status\" named by aria-label. A live region is\n announced when its CONTENT changes, and a name is not content, so it\n never had anything to say: nothing announced the wait at all.\n\n The label is now text inside the region. It is rendered empty first and\n filled a moment later, because the region has to be in the accessibility\n tree before its text arrives -- a region inserted already holding its\n text is, to many screen readers, not a change. A later label change is\n a content change too, so it is announced as well. */\n firstUpdated() {\n this._announceTimer = setTimeout(() => { this._announce = true; }, 100);\n }\n\n disconnectedCallback() {\n clearTimeout(this._announceTimer);\n super.disconnectedCallback();\n }\n\n willUpdate(changed: PropertyValues<this>) {\n // sm, md or lg; anything else, the 3.x small / default / large included, is md\n if (changed.has('size') && !isOneOf(SIZES, this.size)) this.size = 'md';\n }\n\n render() {\n return html`\n <span class=\"spinner\" aria-hidden=\"true\"></span>\n <span class=\"announce\" role=\"status\">${this._announce ? this.label : ''}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-spinner': BdSpinner;\n }\n}\n"],"mappings":"A,0WAWO,IAAMG,EAAN,cAAwBC,CAAW,C,8BAI3B,KAAA,KAAA,KAEL,KAAA,MAAA,UAKW,KAAA,QAAA,QAEP,KAAA,UAAA,E,QAZI,KAAA,OAAA,CAACF,CAAU,C,CA0B3B,cAAe,CACb,KAAK,eAAiB,eAAiB,CAAE,KAAK,UAAY,EAAM,EAAG,GAAG,CACxE,CAEA,sBAAuB,CACrB,aAAa,KAAK,cAAc,EAChC,MAAM,qBAAqB,CAC7B,CAEA,WAAW,EAA+B,CAEpCI,EAAQ,IAAI,MAAM,GAAK,CAACC,EAAQC,EAAO,KAAK,IAAI,IAAG,KAAK,KAAO,KACrE,CAEA,QAAS,CACP,MAAO,EAAI;;6CAE8B,KAAK,UAAY,KAAK,MAAQ,GAAG;KAE5E,CACF,EA5CGR,EAAA,CAAAS,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAN,EAAA,UAAA,OAAA,IAAA,EAAA,EAExCH,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAKzBH,EAAA,CAAAS,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAN,EAAA,UAAA,UAAA,IAAA,EAAA,EAExCH,EAAA,CAAAU,EAAM,CAAA,EAAAP,EAAA,UAAA,YAAA,IAAA,EAAA,EAbR,EAAAH,EAAA,CAAAW,EAAc,YAAY,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);display:block}.bd-spotlight-container{background:linear-gradient(87.6deg, var(--color-surface-brand) 0%, var(--color-brand-950) 100%);border-radius:var(--shape-radius-2xl);padding:var(--spacing-48);box-sizing:border-box;align-items:center;gap:var(--spacing-96);flex-wrap:wrap;display:flex}.bd-spotlight-column{align-items:flex-start;gap:var(--spacing-16);max-width:var(--content-width-readable);flex-direction:column;flex:320px;display:flex}.bd-spotlight-column[hidden],.bd-spotlight-icon[hidden],.bd-spotlight-title[hidden],.bd-spotlight-description[hidden],.bd-spotlight-buttons[hidden]{display:none}.bd-spotlight-icon{color:var(--color-brand-on-fill);margin-bottom:var(--spacing-4);align-items:center;display:flex}.bd-spotlight-icon ::slotted(*){width:100%;max-width:160px;height:auto;display:block}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-normal);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill);margin:0}::slotted(bd-p[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);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill);--bd-paragraph-margin-bottom:0}.flipped ::slotted(bd-h[slot=title]),.flipped ::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h6-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-normal);--bd-heading-line-height:var(--typography-heading-h6-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h6-letterSpacing);--bd-heading-font-family:var(--typography-heading-h6-fontFamily)}.flipped ::slotted(bd-p[slot=description]){--bd-paragraph-font-size:var(--typography-body-lead-fontSize);--bd-paragraph-font-weight:var(--typography-body-lead-fontWeight);--bd-paragraph-line-height:var(--typography-body-lead-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-lead-letterSpacing)}.bd-spotlight-buttons{align-items:center;gap:var(--spacing-12);margin-top:var(--spacing-4);flex-wrap:wrap;display:flex}@media (width<768px){.bd-spotlight-container{padding:var(--spacing-28) var(--spacing-24);flex-direction:column;align-items:flex-start}.bd-spotlight-column{flex-basis:auto;max-width:none}}`;export{t as default};
|
|
2
|
+
//# sourceMappingURL=spotlight.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spotlight.css.js","names":["spotlight_css_default"],"sources":["../../../../src/components/spotlight/spotlight.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n }\n\n .bd-spotlight-container {\n /* no role: blue-950 is the gradient's far stop, as on bd-cta-banner. */\n background: linear-gradient(87.6deg, var(--color-surface-brand) 0%, var(--color-brand-950) 100%);\n border-radius: var(--shape-radius-2xl);\n padding: var(--spacing-48);\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-96);\n }\n\n .bd-spotlight-column {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-16);\n flex: 1 1 320px;\n max-width: var(--content-width-readable);\n }\n\n /* Each part's box, and a column with nothing in it, is left out while its\n slots are empty -- see spotlight.ts. */\n .bd-spotlight-column[hidden],\n .bd-spotlight-icon[hidden],\n .bd-spotlight-title[hidden],\n .bd-spotlight-description[hidden],\n .bd-spotlight-buttons[hidden] {\n display: none;\n }\n\n .bd-spotlight-icon {\n display: flex;\n align-items: center;\n color: var(--color-brand-on-fill);\n margin-bottom: var(--spacing-4);\n }\n\n /* The media and the icon share the exact same sizing -- each column's\n image is a mirror of the other's, not a different layout. */\n .bd-spotlight-icon ::slotted(*) {\n display: block;\n /* no token: a logo's width cap, set by the artwork rather than a scale. */\n max-width: 160px;\n width: 100%;\n height: auto;\n }\n\n /* The page's heading and description, in the band's ink. By default the\n title is the large line -- heading-h2 at the normal weight, what the\n band's own <bd-h as=\"h2\" font-weight=\"normal\"> drew -- and the\n description body-large. Full on-brand ink on both: white at 65%\n measured 2.6:1 on the brand end of the gradient. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n /* no role: heading-h2 at the regular weight, the band's lighter title;\n no heading role is drawn at 400 */\n --bd-heading-font-weight: var(--typography-fontWeight-normal);\n ${unsafeCSS(ink(\"on-brand\"))}\n margin: 0;\n }\n\n ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n ${unsafeCSS(ink(\"on-brand\"))}\n --bd-paragraph-margin-bottom: 0;\n }\n\n /* Media in the title column moves the emphasis to the description: the\n title steps down to heading-h6 at the normal weight, which is\n body-large's 18 and 1.45 from lg (16 on a phone), and the description\n up to body-lead, the largest body role. 3.x swapped the elements\n instead -- the title became a bd-p and the description a bd-h -- which\n put a paragraph where the page's heading was. */\n .flipped ::slotted(bd-h[slot=\"title\"]),\n .flipped ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h6\"))}\n /* no role: as above, heading-h6 at the regular weight */\n --bd-heading-font-weight: var(--typography-fontWeight-normal);\n }\n\n .flipped ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-lead\"))}\n }\n\n .bd-spotlight-buttons {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-12);\n margin-top: var(--spacing-4);\n }\n\n @media ${unsafeCSS(below('md'))} {\n .bd-spotlight-container {\n padding: var(--spacing-28) var(--spacing-24);\n flex-direction: column;\n align-items: flex-start;\n }\n\n .bd-spotlight-column {\n max-width: none;\n flex-basis: auto;\n }\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,wuF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
4
|
+
import "../h/h.js";
|
|
5
|
+
import "../p/p.js";
|
|
6
|
+
/**
|
|
7
|
+
* A two-column band on a brand gradient: a large title on one side, a logo
|
|
8
|
+
* and a description on the other, each with buttons of its own.
|
|
9
|
+
*
|
|
10
|
+
* Every word is the page's (ADR 0003): `<bd-h slot="title" as="h2">` and
|
|
11
|
+
* `<bd-p slot="description">`. The title column also takes `media` (an image
|
|
12
|
+
* above the title) and `actions` (buttons under it); the description column
|
|
13
|
+
* takes `icon` (the logo above the description) and `description-actions`
|
|
14
|
+
* (buttons under it). Each part's box is left out while its slot is empty,
|
|
15
|
+
* and so is a column with nothing in it.
|
|
16
|
+
*
|
|
17
|
+
* Media in the title column moves the emphasis across: the title steps down
|
|
18
|
+
* to the description's size and the description up, so the band still has
|
|
19
|
+
* one large line. The page keeps both elements and their levels; the band
|
|
20
|
+
* only changes the size it sets on them.
|
|
21
|
+
*/
|
|
22
|
+
export declare class BdSpotlight extends LitElement {
|
|
23
|
+
static styles: import("lit").CSSResult[];
|
|
24
|
+
_slots: SlotController<"title" | "description" | "icon" | "media" | "actions" | "description-actions">;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
"bd-spotlight": BdSpotlight;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import i from"./spotlight.css.js";import{LitElement as a,html as o}from"lit";var s=[`media`,`title`,`actions`,`icon`,`description`,`description-actions`],c=class extends a{constructor(...e){super(...e),this._slots=new n(this,{slots:s})}static{this.styles=[r,i]}render(){let e=e=>this._slots.has(e),t=e(`media`);return o`
|
|
2
|
+
<div class="bd-ensemble">
|
|
3
|
+
<div class="bd-spotlight-container ${t?`flipped`:``}">
|
|
4
|
+
<div class="bd-spotlight-column" ?hidden=${!t&&!e(`title`)&&!e(`actions`)}>
|
|
5
|
+
<div class="bd-spotlight-icon" ?hidden=${!t}><slot name="media"></slot></div>
|
|
6
|
+
<div class="bd-spotlight-title" ?hidden=${!e(`title`)}><slot name="title"></slot></div>
|
|
7
|
+
<div class="bd-spotlight-buttons" ?hidden=${!e(`actions`)}><slot name="actions"></slot></div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="bd-spotlight-column" ?hidden=${!e(`icon`)&&!e(`description`)&&!e(`description-actions`)}>
|
|
11
|
+
<div class="bd-spotlight-icon" ?hidden=${!e(`icon`)}><slot name="icon"></slot></div>
|
|
12
|
+
<div class="bd-spotlight-description" ?hidden=${!e(`description`)}><slot name="description"></slot></div>
|
|
13
|
+
<div class="bd-spotlight-buttons" ?hidden=${!e(`description-actions`)}><slot name="description-actions"></slot></div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
`}};c=t([e(`bd-spotlight`)],c);export{c as BdSpotlight};
|
|
18
|
+
//# sourceMappingURL=spotlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spotlight.js","names":["spotlightCSS","_decorate","__decorate","spotlight_css_default","SLOTS","BdSpotlight","LitElement","_args","SlotController","ensembleCSS","has","name","flipped","defineElement"],"sources":["../../../../src/components/spotlight/spotlight.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The atoms the page writes into the band's title and description. It\n renders neither now, but 3.x's bd-spotlight-section registered both, and\n a page importing only this module still gets them. */\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport spotlightCSS from \"./spotlight.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\nconst SLOTS = [\"media\", \"title\", \"actions\", \"icon\", \"description\", \"description-actions\"] as const;\ntype Slot = typeof SLOTS[number];\n\n/**\n * A two-column band on a brand gradient: a large title on one side, a logo\n * and a description on the other, each with buttons of its own.\n *\n * Every word is the page's (ADR 0003): `<bd-h slot=\"title\" as=\"h2\">` and\n * `<bd-p slot=\"description\">`. The title column also takes `media` (an image\n * above the title) and `actions` (buttons under it); the description column\n * takes `icon` (the logo above the description) and `description-actions`\n * (buttons under it). Each part's box is left out while its slot is empty,\n * and so is a column with nothing in it.\n *\n * Media in the title column moves the emphasis across: the title steps down\n * to the description's size and the description up, so the band still has\n * one large line. The page keeps both elements and their levels; the band\n * only changes the size it sets on them.\n */\n@defineElement(\"bd-spotlight\")\nexport class BdSpotlight extends LitElement {\n static styles = [ensembleCSS, spotlightCSS];\n\n _slots = new SlotController(this, { slots: SLOTS });\n\n render() {\n const has = (name: Slot) => this._slots.has(name);\n const flipped = has(\"media\");\n return html`\n <div class=\"bd-ensemble\">\n <div class=\"bd-spotlight-container ${flipped ? \"flipped\" : \"\"}\">\n <div class=\"bd-spotlight-column\" ?hidden=${!flipped && !has(\"title\") && !has(\"actions\")}>\n <div class=\"bd-spotlight-icon\" ?hidden=${!flipped}><slot name=\"media\"></slot></div>\n <div class=\"bd-spotlight-title\" ?hidden=${!has(\"title\")}><slot name=\"title\"></slot></div>\n <div class=\"bd-spotlight-buttons\" ?hidden=${!has(\"actions\")}><slot name=\"actions\"></slot></div>\n </div>\n\n <div class=\"bd-spotlight-column\" ?hidden=${!has(\"icon\") && !has(\"description\") && !has(\"description-actions\")}>\n <div class=\"bd-spotlight-icon\" ?hidden=${!has(\"icon\")}><slot name=\"icon\"></slot></div>\n <div class=\"bd-spotlight-description\" ?hidden=${!has(\"description\")}><slot name=\"description\"></slot></div>\n <div class=\"bd-spotlight-buttons\" ?hidden=${!has(\"description-actions\")}><slot name=\"description-actions\"></slot></div>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-spotlight\": BdSpotlight;\n }\n}\n"],"mappings":"A,4YAaA,IAAMI,EAAQ,CAAC,QAAS,QAAS,UAAW,OAAQ,cAAe,qBAAqB,EAoB3EC,EAAN,cAA0BC,CAAW,C,8BAGjC,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAOJ,CAAM,CAAC,C,QAFlC,KAAA,OAAA,CAACK,EAAaT,CAAY,C,CAI1C,QAAS,CACP,IAAMU,EAAO,GAAe,KAAK,OAAO,IAAIC,CAAI,EAC1CC,EAAUF,EAAI,OAAO,EAC3B,MAAO,EAAI;;6CAE8BE,EAAU,UAAY,GAAG;qDACjB,CAACA,GAAW,CAACF,EAAI,OAAO,GAAK,CAACA,EAAI,SAAS,EAAE;qDAC7C,CAACE,EAAQ;sDACR,CAACF,EAAI,OAAO,EAAE;wDACZ,CAACA,EAAI,SAAS,EAAE;;;qDAGnB,CAACA,EAAI,MAAM,GAAK,CAACA,EAAI,aAAa,GAAK,CAACA,EAAI,qBAAqB,EAAE;qDACnE,CAACA,EAAI,MAAM,EAAE;4DACN,CAACA,EAAI,aAAa,EAAE;wDACxB,CAACA,EAAI,qBAAqB,EAAE;;;;KAKlF,CACF,EA3BC,EAAAT,EAAA,CAAAY,EAAc,cAAc,CAAA,EAAAR,CAAA,E"}
|
|
@@ -21,7 +21,7 @@ export declare class StatHighlight extends LitElement {
|
|
|
21
21
|
_inView: ObserverController<IntersectionObserver>;
|
|
22
22
|
willUpdate(): void;
|
|
23
23
|
_renderChar(ch: string, i: number): import("lit-html").TemplateResult<1>;
|
|
24
|
-
render():
|
|
24
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
25
25
|
}
|
|
26
26
|
declare global {
|
|
27
27
|
interface HTMLElementTagNameMap {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const statCSS: import("lit").CSSResult;
|
|
2
2
|
export declare const statHighlightCSS: import("lit").CSSResult;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{width:100%;height:100%;display:block}.tile{box-sizing:border-box;justify-content:space-between;gap:var(--spacing-12);height:100%;padding:var(--spacing-20);text-align:start;background:var(--color-surface-info);border-radius:var(--shape-radius-3xl);flex-direction:column;display:flex}@media (width>=992px){.tile{gap:var(--spacing-48);padding:var(--spacing-24)}}.value,.caption{color:var(--color-text-primary);margin:0}.value{font-family:var(--typography-display-md-fontFamily);font-size:var(--typography-display-md-fontSize);font-weight:var(--typography-display-md-fontWeight);line-height:var(--typography-display-md-lineHeight);letter-spacing:var(--typography-display-md-letterSpacing);font-variant-numeric:tabular-nums}.caption{font-family:var(--typography-body-small-fontFamily);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing)
|
|
1
|
+
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{width:100%;height:100%;display:block}.tile{box-sizing:border-box;justify-content:space-between;gap:var(--spacing-12);height:100%;padding:var(--spacing-20);text-align:start;background:var(--color-surface-info);border-radius:var(--shape-radius-3xl);flex-direction:column;display:flex}.tile>[hidden]{display:none}@media (width>=992px){.tile{gap:var(--spacing-48);padding:var(--spacing-24)}}.value,.caption{color:var(--color-text-primary);margin:0}.value{font-family:var(--typography-display-md-fontFamily);font-size:var(--typography-display-md-fontSize);font-weight:var(--typography-display-md-fontWeight);line-height:var(--typography-display-md-lineHeight);letter-spacing:var(--typography-display-md-letterSpacing);font-variant-numeric:tabular-nums}.caption{font-family:var(--typography-body-small-fontFamily);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing)}`,n=e`:host{width:100%;display:block;container-type:inline-size}@supports (width:-moz-available){:host{width:-moz-available}}@supports (width:-webkit-fill-available){:host{width:-webkit-fill-available}}@supports (width:stretch){:host{width:-webkit-fill-available;width:-moz-available;width:stretch}}.highlight{text-align:start;color:var(--color-text-primary);font-family:var(--typography-display-3xl-fontFamily);font-weight:var(--typography-fontWeight-normal);letter-spacing:var(--typography-display-3xl-letterSpacing);font-variant-numeric:tabular-nums;margin:0;font-size:clamp(5rem,min(12.5vw,30.6122cqi),11.25rem);line-height:1}.chars{align-items:flex-end;display:inline-flex}.char{height:1em;display:inline-block}.digit{overflow:hidden}.reel{transform:translateY(calc(var(--bd-stat-digit) * -1em));transition:transform var(--transition-duration-slower) var(--transition-easing-smooth);transition-delay:calc(var(--bd-stat-order) * var(--transition-duration-fast));flex-direction:column;display:flex}.reel>span{height:1em}@media (prefers-reduced-motion:reduce){.reel{transition:none}}`;export{t as statCSS,n as statHighlightCSS};
|
|
2
2
|
//# sourceMappingURL=stat.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.css.js","names":["
|
|
1
|
+
{"version":3,"file":"stat.css.js","names":["statCSS","statHighlightCSS"],"sources":["../../../../src/components/stat/stat.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* bd-stat: a tile on surface/info, the value at display-md and the caption\n at body-small, pinned to the foot. Both are text slots, so the slotted\n words take their role and ink from the box each slot sits in. On the info\n tint the value's text-primary measures 16.65:1 and the caption's the same.\n The tile takes the card corner one step up, 3xl, as the design draws it; it\n is not a card -- it holds no controls and no heading, only a figure. */\nexport const statCSS = css`\n /* the full cell, both ways, so a row of tiles is one height and one width\n whatever each one holds */\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .tile {\n box-sizing: border-box;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: var(--spacing-12);\n padding: var(--spacing-20);\n text-align: start;\n background: var(--color-surface-info);\n border-radius: var(--shape-radius-3xl);\n }\n\n /* A part's box is hidden while its slot is empty; the attribute's selector\n outweighs the display the tile gives its items. */\n .tile > [hidden] {\n display: none;\n }\n\n /* The phone and tablet frames hold the copy 20 in and the caption at least\n 12 under the value; the desktop frame opens both up. */\n @media ${unsafeCSS(above(\"lg\"))} {\n .tile {\n gap: var(--spacing-48);\n padding: var(--spacing-24);\n }\n }\n\n .value,\n .caption {\n margin: 0;\n color: var(--color-text-primary);\n }\n\n .value {\n font-family: var(--typography-display-md-fontFamily);\n font-size: var(--typography-display-md-fontSize);\n font-weight: var(--typography-display-md-fontWeight);\n line-height: var(--typography-display-md-lineHeight);\n letter-spacing: var(--typography-display-md-letterSpacing);\n font-variant-numeric: tabular-nums;\n }\n\n .caption {\n font-family: var(--typography-body-small-fontFamily);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n }\n`;\n\n/* The leading figure. Its size is the one value here off the type scale: the\n display family stops at 3xl (128) and the design draws this at 180, as a\n deliberate one-off rather than a role, so it is spelled once, here.\n Each digit is a reel of 0-9 in a one-line window, moved up by its own\n value. */\nexport const statHighlightCSS = css`\n /* The figure is held to the width it is given, so the host is a size\n container and takes its column's whole width: its content gives it none,\n and in a flex column that aligns its items to the start it would measure\n 0 and hold the figure at its floor. The width is the column less the\n host's margins (shared/fill-width.css.ts). */\n :host {\n display: block;\n container-type: inline-size;\n }\n\n ${hostFillsWidth()}\n\n .highlight {\n margin: 0;\n text-align: start;\n color: var(--color-text-primary);\n font-family: var(--typography-display-3xl-fontFamily);\n /* no role: every display role is bold, and the design sets this one-off\n figure in IBM Plex Sans Text (450), a cut the system does not ship;\n Regular is the nearest it does */\n font-weight: var(--typography-fontWeight-normal);\n letter-spacing: var(--typography-display-3xl-letterSpacing);\n /* no token: the one-off figure the design sets; the display scale stops\n at 128. The frames scale it with the page, not with its own column --\n 80 on a phone, about 107 in the tablet frame's 656 column, 180 in the\n desktop frame's 588 half-column -- so the viewport stays the measure.\n The column is the cap: never more of it than the desktop frame takes,\n 180 of 588. Uncapped, the story's $1.5B+ ran past its half of the page\n column at 1060-1199 and 1283-1399, where the half holds at 428 and\n 518 while the viewport keeps growing. */\n font-size: clamp(5rem, min(12.5vw, 100cqi * 180 / 588), 11.25rem);\n /* no token: a reel of digits needs a line box exactly one digit tall, so\n the window and the steps the reel moves by are the same length */\n line-height: 1;\n font-variant-numeric: tabular-nums;\n }\n\n .chars {\n display: inline-flex;\n align-items: flex-end;\n }\n\n .char {\n display: inline-block;\n height: 1em;\n }\n\n .digit {\n overflow: hidden;\n }\n\n .reel {\n display: flex;\n flex-direction: column;\n transform: translateY(calc(var(--bd-stat-digit) * -1em));\n transition: transform var(--transition-duration-slower) var(--transition-easing-smooth);\n transition-delay: calc(var(--bd-stat-order) * var(--transition-duration-fast));\n }\n\n .reel > span {\n height: 1em;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .reel {\n transition: none;\n }\n }\n`;\n"],"mappings":"A,gGAUA,IAAaA,EAAU,CAAG,mgCAkEbC,EAAmB,CAAG,0jC"}
|
|
@@ -1,2 +1,42 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { SlotController } from "../shared/controller.slot.js";
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
1
4
|
import "./stat-highlight.js";
|
|
2
|
-
|
|
5
|
+
type Part = "value" | "caption";
|
|
6
|
+
/**
|
|
7
|
+
* One figure from the Why-trust stat grid: a display value over a short
|
|
8
|
+
* caption, on surface/info. The caption is pinned to the tile's foot so a row
|
|
9
|
+
* of tiles lines its captions up, whatever each value's length. Drawn in the
|
|
10
|
+
* foundation Figma file as Stat tile.
|
|
11
|
+
*
|
|
12
|
+
* <bd-stat>
|
|
13
|
+
* <span slot="value">580+</span>
|
|
14
|
+
* <span slot="caption">Patents filed, including breakthroughs in machine learning.</span>
|
|
15
|
+
* </bd-stat>
|
|
16
|
+
*
|
|
17
|
+
* It was bd-stat-tile, whose `value` and `caption` were attributes. Both are
|
|
18
|
+
* text slots now, and the stat sets their type and ink; each one's box is
|
|
19
|
+
* hidden while its slot is empty.
|
|
20
|
+
*
|
|
21
|
+
* The value and caption are read as one statement -- "580+ patents filed" --
|
|
22
|
+
* so the stat is a group named by both. Its name is the slotted words
|
|
23
|
+
* themselves (aria-labelledby at the two boxes), unless `label` spells the
|
|
24
|
+
* value out where its short form reads badly aloud ("50 billion plus"): then
|
|
25
|
+
* the name is the label and the caption's text, as 3.x composed it, and the
|
|
26
|
+
* visible parts are hidden from the tree so the figure is not read twice. A
|
|
27
|
+
* name set as a string cannot follow the caption by reference, so the caption
|
|
28
|
+
* is copied, and an edit to it renders the name again.
|
|
29
|
+
*/
|
|
30
|
+
export declare class BdStat extends LitElement {
|
|
31
|
+
static styles: import("lit").CSSResult[];
|
|
32
|
+
/** The value spelled out for a screen reader; never shown. */
|
|
33
|
+
label: string;
|
|
34
|
+
_slots: SlotController<Part>;
|
|
35
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
"bd-stat": BdStat;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export {};
|