@repobit/dex-system-design 3.1.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1067 -0
- package/README.md +31 -6
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Bold.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-BoldItalic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Italic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Medium.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-MediumItalic.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-Regular.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-SemiBold.woff2 +0 -0
- package/dist/src/assets/fonts/IBMPlexSansCondensed-SemiBoldItalic.woff2 +0 -0
- package/dist/src/components/abstract/abstract.css.d.ts +7 -0
- package/dist/src/components/abstract/abstract.css.js +2 -0
- package/dist/src/components/abstract/abstract.css.js.map +1 -0
- package/dist/src/components/abstract/abstract.d.ts +31 -0
- package/dist/src/components/abstract/abstract.js +2 -0
- package/dist/src/components/abstract/abstract.js.map +1 -0
- package/dist/src/components/accordion/accordion-item.d.ts +93 -0
- package/dist/src/components/accordion/accordion-item.js +25 -0
- package/dist/src/components/accordion/accordion-item.js.map +1 -0
- package/dist/src/components/accordion/accordion-keyboard.d.ts +5 -5
- package/dist/src/components/accordion/accordion-keyboard.js +1 -1
- package/dist/src/components/accordion/accordion-keyboard.js.map +1 -1
- package/dist/src/components/accordion/accordion.css.d.ts +2 -2
- package/dist/src/components/accordion/accordion.css.js +1 -1
- package/dist/src/components/accordion/accordion.css.js.map +1 -1
- package/dist/src/components/accordion/accordion.d.ts +66 -31
- package/dist/src/components/accordion/accordion.js +8 -66
- package/dist/src/components/accordion/accordion.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints-pills.css.js +2 -0
- package/dist/src/components/agent-endpoints/agent-endpoints-pills.css.js.map +1 -0
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +38 -21
- package/dist/src/components/agent-endpoints/agent-endpoints.js +22 -41
- package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
- package/dist/src/components/anchor-nav/anchor-nav-item.css.d.ts +1 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.css.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.css.js.map +1 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.d.ts +38 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav-item.js.map +1 -0
- package/dist/src/components/anchor-nav/anchor-nav.css.js +2 -0
- package/dist/src/components/anchor-nav/anchor-nav.css.js.map +1 -0
- package/dist/src/components/{anchor → anchor-nav}/anchor-nav.d.ts +41 -23
- package/dist/src/components/anchor-nav/anchor-nav.js +43 -0
- package/dist/src/components/anchor-nav/anchor-nav.js.map +1 -0
- package/dist/src/components/annotation/annotation.css.js +1 -1
- package/dist/src/components/annotation/annotation.css.js.map +1 -1
- package/dist/src/components/annotation/annotation.js +2 -2
- package/dist/src/components/annotation/annotation.js.map +1 -1
- package/dist/src/components/article/article.css.d.ts +30 -0
- package/dist/src/components/article/article.css.js +2 -0
- package/dist/src/components/article/article.css.js.map +1 -0
- package/dist/src/components/article/article.d.ts +135 -0
- package/dist/src/components/article/article.js +39 -0
- package/dist/src/components/article/article.js.map +1 -0
- package/dist/src/components/audience-card/audience-card.css.js +1 -1
- package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.d.ts +30 -15
- package/dist/src/components/audience-card/audience-card.js +9 -11
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/authors/authors.css.d.ts +7 -0
- package/dist/src/components/authors/authors.css.js +2 -0
- package/dist/src/components/authors/authors.css.js.map +1 -0
- package/dist/src/components/authors/authors.d.ts +29 -0
- package/dist/src/components/authors/authors.js +7 -0
- package/dist/src/components/authors/authors.js.map +1 -0
- package/dist/src/components/avatar/avatar.js +6 -6
- package/dist/src/components/avatar/avatar.js.map +1 -1
- package/dist/src/components/awards/award-marks.css.js +2 -0
- package/dist/src/components/awards/award-marks.css.js.map +1 -0
- package/dist/src/components/awards/award.css.js +2 -0
- package/dist/src/components/awards/award.css.js.map +1 -0
- package/dist/src/components/awards/award.d.ts +65 -0
- package/dist/src/components/awards/award.js +11 -0
- package/dist/src/components/awards/award.js.map +1 -0
- package/dist/src/components/awards/awards.css.d.ts +2 -1
- package/dist/src/components/awards/awards.css.js +1 -1
- package/dist/src/components/awards/awards.css.js.map +1 -1
- package/dist/src/components/awards/awards.d.ts +123 -71
- package/dist/src/components/awards/awards.js +46 -57
- package/dist/src/components/awards/awards.js.map +1 -1
- package/dist/src/components/awards/scroll-slides.d.ts +9 -8
- package/dist/src/components/awards/scroll-slides.js.map +1 -1
- package/dist/src/components/back/back.d.ts +12 -7
- package/dist/src/components/back/back.js +6 -6
- package/dist/src/components/back/back.js.map +1 -1
- package/dist/src/components/badge/badge.css.js +1 -1
- package/dist/src/components/badge/badge.css.js.map +1 -1
- package/dist/src/components/badge/badge.d.ts +11 -11
- package/dist/src/components/badge/badge.js +2 -2
- package/dist/src/components/badge/badge.js.map +1 -1
- package/dist/src/components/bar-chart/bar-chart.css.js +2 -0
- package/dist/src/components/bar-chart/bar-chart.css.js.map +1 -0
- package/dist/src/components/bar-chart/bar-chart.d.ts +147 -0
- package/dist/src/components/bar-chart/bar-chart.js +42 -0
- package/dist/src/components/bar-chart/bar-chart.js.map +1 -0
- package/dist/src/components/bento-grid/bento-grid.css.js +2 -2
- package/dist/src/components/bento-grid/bento-grid.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.d.ts +21 -9
- package/dist/src/components/bento-grid/bento-grid.js +10 -26
- package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.d.ts +34 -13
- package/dist/src/components/bento-grid/bento-item.js +9 -26
- package/dist/src/components/bento-grid/bento-item.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.css.js +1 -1
- package/dist/src/components/blockquote/blockquote.css.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.d.ts +27 -2
- package/dist/src/components/blockquote/blockquote.js +1 -1
- package/dist/src/components/blockquote/blockquote.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts +5 -4
- package/dist/src/components/breadcrumb/breadcrumb.js +5 -5
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/button/button.css.js +1 -1
- package/dist/src/components/button/button.css.js.map +1 -1
- package/dist/src/components/button/button.d.ts +87 -96
- package/dist/src/components/button/button.js +20 -33
- package/dist/src/components/button/button.js.map +1 -1
- package/dist/src/components/{alert/alert.css.d.ts → callout/callout.css.d.ts} +9 -9
- package/dist/src/components/callout/callout.css.js +2 -0
- package/dist/src/components/callout/callout.css.js.map +1 -0
- package/dist/src/components/callout/callout.d.ts +56 -0
- package/dist/src/components/callout/callout.js +28 -0
- package/dist/src/components/callout/callout.js.map +1 -0
- package/dist/src/components/caption/caption.js +2 -2
- package/dist/src/components/caption/caption.js.map +1 -1
- package/dist/src/components/card/card-grid.css.js +2 -0
- package/dist/src/components/card/card-grid.css.js.map +1 -0
- package/dist/src/components/card/card-grid.d.ts +63 -0
- package/dist/src/components/card/card-grid.js +10 -0
- package/dist/src/components/card/card-grid.js.map +1 -0
- package/dist/src/components/card/card.css.js +2 -0
- package/dist/src/components/card/card.css.js.map +1 -0
- package/dist/src/components/card/card.d.ts +86 -0
- package/dist/src/components/card/card.js +15 -0
- package/dist/src/components/card/card.js.map +1 -0
- package/dist/src/components/carousel/carousel.css.js +1 -1
- package/dist/src/components/carousel/carousel.css.js.map +1 -1
- package/dist/src/components/carousel/carousel.d.ts +64 -37
- package/dist/src/components/carousel/carousel.js +24 -32
- package/dist/src/components/carousel/carousel.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +15 -1
- package/dist/src/components/checkbox/checkbox.js +6 -5
- package/dist/src/components/checkbox/checkbox.js.map +1 -1
- package/dist/src/components/code/code.css.d.ts +15 -0
- package/dist/src/components/code/code.css.js +1 -1
- package/dist/src/components/code/code.css.js.map +1 -1
- package/dist/src/components/code/code.d.ts +100 -4
- package/dist/src/components/code/code.js +17 -3
- package/dist/src/components/code/code.js.map +1 -1
- package/dist/src/components/code/prism-page.d.ts +2 -0
- package/dist/src/components/code/prism-page.js +2 -0
- package/dist/src/components/code/prism-page.js.map +1 -0
- package/dist/src/components/code/prism.d.ts +10 -0
- package/dist/src/components/code/prism.js +2 -0
- package/dist/src/components/code/prism.js.map +1 -0
- package/dist/src/components/comparison-panel/comparison-panel.css.js +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.css.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.d.ts +36 -15
- package/dist/src/components/comparison-panel/comparison-panel.js +25 -46
- package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.d.ts +25 -0
- package/dist/src/components/compatibility-table/compatibility-table.css.js +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.d.ts +66 -42
- package/dist/src/components/compatibility-table/compatibility-table.js +5 -64
- package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.d.ts +17 -8
- package/dist/src/components/cta-banner/cta-banner.js +8 -28
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/dialog/dialog.css.js +2 -0
- package/dist/src/components/dialog/dialog.css.js.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +76 -0
- package/dist/src/components/dialog/dialog.js +32 -0
- package/dist/src/components/dialog/dialog.js.map +1 -0
- package/dist/src/components/display/display.css.js +1 -1
- package/dist/src/components/display/display.css.js.map +1 -1
- package/dist/src/components/display/display.d.ts +30 -6
- package/dist/src/components/display/display.js +7 -5
- package/dist/src/components/display/display.js.map +1 -1
- package/dist/src/components/divider/divider.css.d.ts +2 -2
- package/dist/src/components/divider/divider.css.js +1 -1
- package/dist/src/components/divider/divider.css.js.map +1 -1
- package/dist/src/components/divider/divider.d.ts +36 -0
- package/dist/src/components/divider/divider.js +21 -0
- package/dist/src/components/divider/divider.js.map +1 -0
- package/dist/src/components/fact/fact.css.d.ts +1 -0
- package/dist/src/components/fact/fact.css.js +2 -0
- package/dist/src/components/fact/fact.css.js.map +1 -0
- package/dist/src/components/fact/fact.d.ts +37 -0
- package/dist/src/components/fact/fact.js +2 -0
- package/dist/src/components/fact/fact.js.map +1 -0
- package/dist/src/components/feature-columns/feature-columns.css.d.ts +2 -0
- package/dist/src/components/feature-columns/feature-columns.css.js +2 -0
- package/dist/src/components/feature-columns/feature-columns.css.js.map +1 -0
- package/dist/src/components/feature-columns/feature-columns.d.ts +61 -0
- package/dist/src/components/feature-columns/feature-columns.js +11 -0
- package/dist/src/components/feature-columns/feature-columns.js.map +1 -0
- package/dist/src/components/features-tab/features-tab.css.js +1 -1
- package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.d.ts +21 -6
- package/dist/src/components/features-tab/features-tab.js +9 -21
- package/dist/src/components/features-tab/features-tab.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.d.ts +16 -1
- package/dist/src/components/fieldset/fieldset.js +3 -3
- package/dist/src/components/fieldset/fieldset.js.map +1 -1
- package/dist/src/components/footer/footer-group.css.js +2 -0
- package/dist/src/components/footer/footer-group.css.js.map +1 -0
- package/dist/src/components/footer/footer-group.d.ts +28 -0
- package/dist/src/components/footer/footer-group.js +5 -0
- package/dist/src/components/footer/footer-group.js.map +1 -0
- package/dist/src/components/footer/footer-locale.js +1 -1
- package/dist/src/components/footer/footer-locale.js.map +1 -1
- package/dist/src/components/footer/footer-nav.css.js +2 -0
- package/dist/src/components/footer/footer-nav.css.js.map +1 -0
- package/dist/src/components/footer/{footer-nav-menu.d.ts → footer-nav.d.ts} +2 -1
- package/dist/src/components/footer/footer-nav.js +6 -0
- package/dist/src/components/footer/footer-nav.js.map +1 -0
- package/dist/src/components/footer/footer.css.js +1 -1
- package/dist/src/components/footer/footer.css.js.map +1 -1
- package/dist/src/components/footer/footer.d.ts +38 -10
- package/dist/src/components/footer/footer.js +71 -93
- package/dist/src/components/footer/footer.js.map +1 -1
- package/dist/src/components/grid/grid.js +7 -7
- package/dist/src/components/h/h.css.js +2 -0
- package/dist/src/components/h/h.css.js.map +1 -0
- package/dist/src/components/{heading/heading.d.ts → h/h.d.ts} +14 -0
- package/dist/src/components/h/h.js +7 -0
- package/dist/src/components/h/h.js.map +1 -0
- package/dist/src/components/hero/hero.css.js +1 -1
- package/dist/src/components/hero/hero.css.js.map +1 -1
- package/dist/src/components/hero/hero.d.ts +42 -24
- package/dist/src/components/hero/hero.js +15 -19
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/highlight/highlight.css.js +1 -1
- package/dist/src/components/highlight/highlight.css.js.map +1 -1
- package/dist/src/components/highlight/highlight.d.ts +21 -12
- package/dist/src/components/highlight/highlight.js +1 -4
- package/dist/src/components/highlight/highlight.js.map +1 -1
- package/dist/src/components/hint/hint.css.d.ts +3 -0
- package/dist/src/components/{help-text/help-text.css.js → hint/hint.css.js} +2 -2
- package/dist/src/components/hint/hint.css.js.map +1 -0
- package/dist/src/components/hint/hint.d.ts +33 -0
- package/dist/src/components/hint/hint.js +4 -0
- package/dist/src/components/hint/hint.js.map +1 -0
- package/dist/src/components/icons/analysis.d.ts +1 -0
- package/dist/src/components/icons/analysis.js +6 -0
- package/dist/src/components/icons/analysis.js.map +1 -0
- package/dist/src/components/icons/arrow-down.d.ts +1 -0
- package/dist/src/components/icons/arrow-down.js +6 -0
- package/dist/src/components/icons/arrow-down.js.map +1 -0
- package/dist/src/components/icons/arrow-right.d.ts +1 -0
- package/dist/src/components/icons/arrow-right.js +6 -0
- package/dist/src/components/icons/arrow-right.js.map +1 -0
- package/dist/src/components/icons/arrow-up.d.ts +1 -0
- package/dist/src/components/icons/arrow-up.js +6 -0
- package/dist/src/components/icons/arrow-up.js.map +1 -0
- package/dist/src/components/icons/arrow.d.ts +1 -0
- package/dist/src/components/icons/arrow.js +6 -0
- package/dist/src/components/icons/arrow.js.map +1 -0
- package/dist/src/components/icons/brand-signature.d.ts +1 -0
- package/dist/src/components/icons/brand-signature.js +6 -0
- package/dist/src/components/icons/brand-signature.js.map +1 -0
- package/dist/src/components/icons/check.d.ts +1 -0
- package/dist/src/components/icons/check.js +6 -0
- package/dist/src/components/icons/check.js.map +1 -0
- package/dist/src/components/icons/circle-info.d.ts +1 -0
- package/dist/src/components/icons/circle-info.js +8 -0
- package/dist/src/components/icons/circle-info.js.map +1 -0
- package/dist/src/components/icons/clipboard.d.ts +1 -0
- package/dist/src/components/icons/clipboard.js +7 -0
- package/dist/src/components/icons/clipboard.js.map +1 -0
- package/dist/src/components/icons/close.d.ts +1 -0
- package/dist/src/components/icons/close.js +6 -0
- package/dist/src/components/icons/close.js.map +1 -0
- package/dist/src/components/icons/enterprise.d.ts +1 -0
- package/dist/src/components/icons/enterprise.js +6 -0
- package/dist/src/components/icons/enterprise.js.map +1 -0
- package/dist/src/components/icons/envelope.d.ts +1 -0
- package/dist/src/components/icons/envelope.js +7 -0
- package/dist/src/components/icons/envelope.js.map +1 -0
- package/dist/src/components/icons/family.d.ts +1 -0
- package/dist/src/components/icons/family.js +8 -0
- package/dist/src/components/icons/family.js.map +1 -0
- package/dist/src/components/icons/globe.d.ts +1 -0
- package/dist/src/components/icons/globe.js +6 -0
- package/dist/src/components/icons/globe.js.map +1 -0
- package/dist/src/components/icons/guide.d.ts +1 -0
- package/dist/src/components/icons/guide.js +6 -0
- package/dist/src/components/icons/guide.js.map +1 -0
- package/dist/src/components/icons/home.d.ts +1 -0
- package/dist/src/components/icons/home.js +6 -0
- package/dist/src/components/icons/home.js.map +1 -0
- package/dist/src/components/icons/icon.d.ts +60 -0
- package/dist/src/components/icons/icon.js +2 -0
- package/dist/src/components/icons/icon.js.map +1 -0
- package/dist/src/components/icons/icons.d.ts +43 -36
- package/dist/src/components/icons/icons.js +1 -1
- package/dist/src/components/icons/individual.d.ts +1 -0
- package/dist/src/components/icons/individual.js +6 -0
- package/dist/src/components/icons/individual.js.map +1 -0
- package/dist/src/components/icons/laurel.d.ts +1 -0
- package/dist/src/components/icons/laurel.js +13 -0
- package/dist/src/components/icons/laurel.js.map +1 -0
- package/dist/src/components/icons/machine-learning.d.ts +1 -0
- package/dist/src/components/icons/machine-learning.js +6 -0
- package/dist/src/components/icons/machine-learning.js.map +1 -0
- package/dist/src/components/icons/mark.d.ts +66 -0
- package/dist/src/components/icons/mark.js +2 -0
- package/dist/src/components/icons/mark.js.map +1 -0
- package/dist/src/components/icons/marks/ai.d.ts +1 -0
- package/dist/src/components/icons/marks/ai.js +6 -0
- package/dist/src/components/icons/marks/ai.js.map +1 -0
- package/dist/src/components/icons/marks/av-comparatives.d.ts +1 -0
- package/dist/src/components/icons/marks/av-comparatives.js +12 -0
- package/dist/src/components/icons/marks/av-comparatives.js.map +1 -0
- package/dist/src/components/icons/marks/best-brands.d.ts +1 -0
- package/dist/src/components/icons/marks/best-brands.js +12 -0
- package/dist/src/components/icons/marks/best-brands.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-2024.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-2024.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-2024.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-business.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-business.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-business.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag-readers.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag-readers.js +11 -0
- package/dist/src/components/icons/marks/pc-mag-readers.js.map +1 -0
- package/dist/src/components/icons/marks/pc-mag.d.ts +1 -0
- package/dist/src/components/icons/marks/pc-mag.js +11 -0
- package/dist/src/components/icons/marks/pc-mag.js.map +1 -0
- package/dist/src/components/icons/marks/top-product.d.ts +1 -0
- package/dist/src/components/icons/marks/top-product.js +11 -0
- package/dist/src/components/icons/marks/top-product.js.map +1 -0
- package/dist/src/components/icons/marks.d.ts +29 -28
- package/dist/src/components/icons/marks.js +1 -1
- package/dist/src/components/icons/minus.d.ts +1 -0
- package/dist/src/components/icons/minus.js +6 -0
- package/dist/src/components/icons/minus.js.map +1 -0
- package/dist/src/components/icons/pause.d.ts +1 -0
- package/dist/src/components/icons/pause.js +7 -0
- package/dist/src/components/icons/pause.js.map +1 -0
- package/dist/src/components/icons/play.d.ts +1 -0
- package/dist/src/components/icons/play.js +6 -0
- package/dist/src/components/icons/play.js.map +1 -0
- package/dist/src/components/icons/plus.d.ts +1 -0
- package/dist/src/components/icons/plus.js +6 -0
- package/dist/src/components/icons/plus.js.map +1 -0
- package/dist/src/components/icons/quote.d.ts +1 -0
- package/dist/src/components/icons/quote.js +6 -0
- package/dist/src/components/icons/quote.js.map +1 -0
- package/dist/src/components/icons/registry.d.ts +122 -0
- package/dist/src/components/icons/registry.js +4 -0
- package/dist/src/components/icons/registry.js.map +1 -0
- package/dist/src/components/icons/small-business.d.ts +1 -0
- package/dist/src/components/icons/small-business.js +6 -0
- package/dist/src/components/icons/small-business.js.map +1 -0
- package/dist/src/components/{image/image.css.js → img/img.css.js} +1 -1
- package/dist/src/components/img/img.css.js.map +1 -0
- package/dist/src/components/{image/image.d.ts → img/img.d.ts} +2 -2
- package/dist/src/components/img/img.js +17 -0
- package/dist/src/components/img/img.js.map +1 -0
- package/dist/src/components/input/input.css.d.ts +7 -5
- package/dist/src/components/input/input.css.js +1 -1
- package/dist/src/components/input/input.css.js.map +1 -1
- package/dist/src/components/input/input.d.ts +34 -12
- package/dist/src/components/input/input.js +30 -29
- package/dist/src/components/input/input.js.map +1 -1
- package/dist/src/components/install-options/install-option.css.js +2 -0
- package/dist/src/components/install-options/install-option.css.js.map +1 -0
- package/dist/src/components/install-options/install-option.d.ts +57 -0
- package/dist/src/components/install-options/install-option.js +29 -0
- package/dist/src/components/install-options/install-option.js.map +1 -0
- package/dist/src/components/install-options/install-options.css.js +1 -1
- package/dist/src/components/install-options/install-options.css.js.map +1 -1
- package/dist/src/components/install-options/install-options.d.ts +42 -31
- package/dist/src/components/install-options/install-options.js +42 -85
- package/dist/src/components/install-options/install-options.js.map +1 -1
- package/dist/src/components/key-takeaways/key-takeaways.css.d.ts +9 -0
- package/dist/src/components/key-takeaways/key-takeaways.css.js +2 -0
- package/dist/src/components/key-takeaways/key-takeaways.css.js.map +1 -0
- package/dist/src/components/key-takeaways/key-takeaways.d.ts +35 -0
- package/dist/src/components/key-takeaways/key-takeaways.js +10 -0
- package/dist/src/components/key-takeaways/key-takeaways.js.map +1 -0
- package/dist/src/components/label/label.js +3 -3
- package/dist/src/components/label/label.js.map +1 -1
- package/dist/src/components/link/link.css.js +1 -1
- package/dist/src/components/link/link.css.js.map +1 -1
- package/dist/src/components/link/link.d.ts +25 -16
- package/dist/src/components/link/link.js +3 -3
- package/dist/src/components/link/link.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.css.js +1 -1
- package/dist/src/components/list/list-item/list-item.css.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.d.ts +9 -7
- package/dist/src/components/list/list-item/list-item.js +3 -3
- package/dist/src/components/list/list-item/list-item.js.map +1 -1
- package/dist/src/components/list/list.d.ts +3 -2
- package/dist/src/components/list/list.js +2 -2
- package/dist/src/components/list/list.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.d.ts +2 -2
- package/dist/src/components/logo-marquee/logo-marquee.js +6 -8
- package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
- package/dist/src/components/meta/meta.css.d.ts +8 -0
- package/dist/src/components/meta/meta.css.js +2 -0
- package/dist/src/components/meta/meta.css.js.map +1 -0
- package/dist/src/components/meta/meta.d.ts +37 -0
- package/dist/src/components/meta/meta.js +2 -0
- package/dist/src/components/meta/meta.js.map +1 -0
- package/dist/src/components/motion-art/motion-art.d.ts +39 -2
- package/dist/src/components/motion-art/motion-art.js +1 -1
- package/dist/src/components/motion-art/motion-art.js.map +1 -1
- package/dist/src/components/newsletter-signup/newsletter-signup.css.js +2 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.css.js.map +1 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.d.ts +97 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.js +37 -0
- package/dist/src/components/newsletter-signup/newsletter-signup.js.map +1 -0
- package/dist/src/components/overview/overview.css.js +1 -1
- package/dist/src/components/overview/overview.css.js.map +1 -1
- package/dist/src/components/overview/overview.d.ts +23 -12
- package/dist/src/components/overview/overview.js +9 -24
- package/dist/src/components/overview/overview.js.map +1 -1
- package/dist/src/components/p/p.css.js +2 -0
- package/dist/src/components/p/p.css.js.map +1 -0
- package/dist/src/components/{paragraph/paragraph.d.ts → p/p.d.ts} +3 -5
- package/dist/src/components/p/p.js +6 -0
- package/dist/src/components/p/p.js.map +1 -0
- package/dist/src/components/page-switcher/page-switcher.css.js +1 -1
- package/dist/src/components/page-switcher/page-switcher.css.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.d.ts +28 -28
- package/dist/src/components/page-switcher/page-switcher.js +5 -13
- package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.d.ts +4 -2
- package/dist/src/components/pagination-dots/pagination-dots.js +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.d.ts +44 -21
- package/dist/src/components/partner-banner/partner-banner.js +11 -11
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/paste-button/paste-button.css.d.ts +10 -0
- package/dist/src/components/paste-button/paste-button.css.js +2 -0
- package/dist/src/components/paste-button/paste-button.css.js.map +1 -0
- package/dist/src/components/paste-button/paste-button.d.ts +68 -0
- package/dist/src/components/paste-button/paste-button.js +17 -0
- package/dist/src/components/paste-button/paste-button.js.map +1 -0
- package/dist/src/components/picture/picture.js +3 -3
- package/dist/src/components/picture/picture.js.map +1 -1
- package/dist/src/components/post-card/post-card.css.js +1 -1
- package/dist/src/components/post-card/post-card.css.js.map +1 -1
- package/dist/src/components/post-card/post-card.d.ts +65 -24
- package/dist/src/components/post-card/post-card.js +13 -9
- package/dist/src/components/post-card/post-card.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-card.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-card.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-card.d.ts +80 -0
- package/dist/src/components/pricing-card/pricing-card.js +16 -0
- package/dist/src/components/pricing-card/pricing-card.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature-group.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-feature-group.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature-group.d.ts +50 -0
- package/dist/src/components/pricing-card/pricing-feature-group.js +7 -0
- package/dist/src/components/pricing-card/pricing-feature-group.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-feature.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-feature.d.ts +64 -0
- package/dist/src/components/pricing-card/pricing-feature.js +19 -0
- package/dist/src/components/pricing-card/pricing-feature.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-group.css.d.ts +3 -0
- package/dist/src/components/pricing-card/pricing-group.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-group.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-group.d.ts +48 -0
- package/dist/src/components/pricing-card/pricing-group.js +6 -0
- package/dist/src/components/pricing-card/pricing-group.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-price.css.js +2 -0
- package/dist/src/components/pricing-card/pricing-price.css.js.map +1 -0
- package/dist/src/components/pricing-card/pricing-price.d.ts +56 -0
- package/dist/src/components/pricing-card/pricing-price.js +11 -0
- package/dist/src/components/pricing-card/pricing-price.js.map +1 -0
- package/dist/src/components/process-steps/process-step.css.js +2 -0
- package/dist/src/components/process-steps/process-step.css.js.map +1 -0
- package/dist/src/components/process-steps/process-step.d.ts +31 -0
- package/dist/src/components/process-steps/process-step.js +6 -0
- package/dist/src/components/process-steps/process-step.js.map +1 -0
- package/dist/src/components/process-steps/process-steps.css.js +1 -1
- package/dist/src/components/process-steps/process-steps.css.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.d.ts +36 -19
- package/dist/src/components/process-steps/process-steps.js +5 -26
- package/dist/src/components/process-steps/process-steps.js.map +1 -1
- package/dist/src/components/product-hero/product-hero.css.js +2 -0
- package/dist/src/components/product-hero/product-hero.css.js.map +1 -0
- package/dist/src/components/product-hero/product-hero.d.ts +71 -0
- package/dist/src/components/product-hero/product-hero.js +123 -0
- package/dist/src/components/product-hero/product-hero.js.map +1 -0
- package/dist/src/components/product-upsell/product-upsell.css.js +2 -0
- package/dist/src/components/product-upsell/product-upsell.css.js.map +1 -0
- package/dist/src/components/product-upsell/product-upsell.d.ts +49 -0
- package/dist/src/components/product-upsell/product-upsell.js +14 -0
- package/dist/src/components/product-upsell/product-upsell.js.map +1 -0
- package/dist/src/components/progress-bar/progress-bar.css.d.ts +3 -0
- package/dist/src/components/progress-bar/progress-bar.css.js +2 -0
- package/dist/src/components/progress-bar/progress-bar.css.js.map +1 -0
- package/dist/src/components/progress-bar/progress-bar.d.ts +27 -0
- package/dist/src/components/progress-bar/progress-bar.js +15 -0
- package/dist/src/components/progress-bar/progress-bar.js.map +1 -0
- package/dist/src/components/quick-answer/quick-answer.css.js +1 -1
- package/dist/src/components/quick-answer/quick-answer.css.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.d.ts +25 -12
- package/dist/src/components/quick-answer/quick-answer.js +13 -29
- package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
- package/dist/src/components/radio/radio-group.css.js +1 -1
- package/dist/src/components/radio/radio-group.css.js.map +1 -1
- package/dist/src/components/radio/radio-group.d.ts +9 -5
- package/dist/src/components/radio/radio-group.js +5 -5
- package/dist/src/components/radio/radio-group.js.map +1 -1
- package/dist/src/components/radio/radio.css.d.ts +2 -1
- package/dist/src/components/radio/radio.css.js.map +1 -1
- package/dist/src/components/radio/radio.d.ts +8 -2
- package/dist/src/components/radio/radio.js +6 -5
- package/dist/src/components/radio/radio.js.map +1 -1
- package/dist/src/components/related-articles/related-articles.css.js +2 -0
- package/dist/src/components/related-articles/related-articles.css.js.map +1 -0
- package/dist/src/components/related-articles/related-articles.d.ts +52 -0
- package/dist/src/components/related-articles/related-articles.js +9 -0
- package/dist/src/components/related-articles/related-articles.js.map +1 -0
- package/dist/src/components/report-promo/report-promo.css.js +2 -0
- package/dist/src/components/report-promo/report-promo.css.js.map +1 -0
- package/dist/src/components/report-promo/report-promo.d.ts +70 -0
- package/dist/src/components/report-promo/report-promo.js +19 -0
- package/dist/src/components/report-promo/report-promo.js.map +1 -0
- package/dist/src/components/review/review-grid.css.js +1 -1
- package/dist/src/components/review/review-grid.css.js.map +1 -1
- package/dist/src/components/review/review-grid.d.ts +27 -6
- package/dist/src/components/review/review-grid.js +7 -7
- package/dist/src/components/review/review-grid.js.map +1 -1
- package/dist/src/components/review/review.css.js +1 -1
- package/dist/src/components/review/review.css.js.map +1 -1
- package/dist/src/components/review/review.d.ts +24 -17
- package/dist/src/components/review/review.js +7 -11
- package/dist/src/components/review/review.js.map +1 -1
- package/dist/src/components/section/section.css.js +1 -1
- package/dist/src/components/section/section.css.js.map +1 -1
- package/dist/src/components/section/section.d.ts +8 -6
- package/dist/src/components/section/section.js +1 -1
- package/dist/src/components/section/section.js.map +1 -1
- package/dist/src/components/section-header/section-header.css.js +1 -1
- package/dist/src/components/section-header/section-header.css.js.map +1 -1
- package/dist/src/components/section-header/section-header.d.ts +22 -23
- package/dist/src/components/section-header/section-header.js +6 -8
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/dist/src/components/select/select-option.d.ts +29 -0
- package/dist/src/components/select/select-option.js +2 -0
- package/dist/src/components/select/select-option.js.map +1 -0
- package/dist/src/components/{dropdown/dropdown.css.js → select/select.css.js} +1 -1
- package/dist/src/components/select/select.css.js.map +1 -0
- package/dist/src/components/select/select.d.ts +78 -0
- package/dist/src/components/select/select.js +35 -0
- package/dist/src/components/select/select.js.map +1 -0
- package/dist/src/components/shared/adopt-styles.d.ts +53 -0
- package/dist/src/components/shared/adopt-styles.js +2 -0
- package/dist/src/components/shared/adopt-styles.js.map +1 -0
- package/dist/src/components/shared/controller.slot.d.ts +65 -0
- package/dist/src/components/shared/controller.slot.js +2 -0
- package/dist/src/components/shared/controller.slot.js.map +1 -0
- package/dist/src/components/shared/events.d.ts +19 -23
- package/dist/src/components/shared/fill-width.css.js.map +1 -1
- package/dist/src/components/shared/flat-text.d.ts +15 -0
- package/dist/src/components/shared/flat-text.js +2 -0
- package/dist/src/components/shared/flat-text.js.map +1 -0
- package/dist/src/components/shared/form-control.d.ts +27 -3
- package/dist/src/components/shared/form-control.js +11 -1
- package/dist/src/components/shared/form-control.js.map +1 -1
- package/dist/src/components/shared/form-field.css.d.ts +5 -5
- package/dist/src/components/shared/form-field.css.js +1 -1
- package/dist/src/components/shared/form-field.css.js.map +1 -1
- package/dist/src/components/shared/hold.d.ts +14 -0
- package/dist/src/components/shared/hold.js +2 -0
- package/dist/src/components/shared/hold.js.map +1 -0
- package/dist/src/components/shared/prop-vocabulary.d.ts +81 -20
- package/dist/src/components/shared/prop-vocabulary.js +1 -1
- package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
- package/dist/src/components/shared/tablist.d.ts +31 -0
- package/dist/src/components/shared/tablist.js +2 -0
- package/dist/src/components/shared/tablist.js.map +1 -0
- package/dist/src/components/shared/token-scales.d.ts +30 -4
- package/dist/src/components/shared/token-scales.js +1 -1
- package/dist/src/components/shared/token-scales.js.map +1 -1
- package/dist/src/components/spinner/spinner.css.js.map +1 -1
- package/dist/src/components/spinner/spinner.js +2 -2
- package/dist/src/components/spinner/spinner.js.map +1 -1
- package/dist/src/components/spotlight/spotlight.css.js +2 -0
- package/dist/src/components/spotlight/spotlight.css.js.map +1 -0
- package/dist/src/components/spotlight/spotlight.d.ts +31 -0
- package/dist/src/components/spotlight/spotlight.js +18 -0
- package/dist/src/components/spotlight/spotlight.js.map +1 -0
- package/dist/src/components/stat/stat-highlight.d.ts +1 -1
- package/dist/src/components/stat/stat.css.d.ts +1 -1
- package/dist/src/components/stat/stat.css.js +1 -1
- package/dist/src/components/stat/stat.css.js.map +1 -1
- package/dist/src/components/stat/stat.d.ts +41 -1
- package/dist/src/components/stat/stat.js +12 -1
- package/dist/src/components/stat/stat.js.map +1 -0
- package/dist/src/components/switch/switch.css.js +1 -1
- package/dist/src/components/switch/switch.css.js.map +1 -1
- package/dist/src/components/switch/switch.d.ts +10 -2
- package/dist/src/components/switch/switch.js +5 -4
- package/dist/src/components/switch/switch.js.map +1 -1
- package/dist/src/components/tab-group/tab-group.css.js +2 -0
- package/dist/src/components/tab-group/tab-group.css.js.map +1 -0
- package/dist/src/components/tab-group/tab-group.d.ts +172 -0
- package/dist/src/components/tab-group/tab-group.js +16 -0
- package/dist/src/components/tab-group/tab-group.js.map +1 -0
- package/dist/src/components/tab-group/tab-panel.d.ts +30 -0
- package/dist/src/components/tab-group/tab-panel.js +2 -0
- package/dist/src/components/tab-group/tab-panel.js.map +1 -0
- package/dist/src/components/tab-group/tab.css.js +2 -0
- package/dist/src/components/tab-group/tab.css.js.map +1 -0
- package/dist/src/components/tab-group/tab.d.ts +53 -0
- package/dist/src/components/tab-group/tab.js +2 -0
- package/dist/src/components/tab-group/tab.js.map +1 -0
- package/dist/src/components/table-of-contents/reading-line.d.ts +24 -0
- package/dist/src/components/table-of-contents/reading-line.js +2 -0
- package/dist/src/components/table-of-contents/reading-line.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.d.ts +7 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.css.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.d.ts +40 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents-item.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.d.ts +10 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.js +2 -0
- package/dist/src/components/table-of-contents/table-of-contents.css.js.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +116 -0
- package/dist/src/components/table-of-contents/table-of-contents.js +24 -0
- package/dist/src/components/table-of-contents/table-of-contents.js.map +1 -0
- package/dist/src/components/tag/tag.css.js +1 -1
- package/dist/src/components/tag/tag.css.js.map +1 -1
- package/dist/src/components/tag/tag.d.ts +31 -4
- package/dist/src/components/tag/tag.js +1 -3
- package/dist/src/components/tag/tag.js.map +1 -1
- package/dist/src/components/terminal/terminal-cursor.d.ts +2 -3
- package/dist/src/components/terminal/terminal-cursor.js +1 -1
- package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
- package/dist/src/components/terminal/terminal-line.css.d.ts +2 -0
- package/dist/src/components/terminal/terminal-line.css.js +2 -0
- package/dist/src/components/terminal/terminal-line.css.js.map +1 -0
- package/dist/src/components/terminal/terminal-line.d.ts +42 -0
- package/dist/src/components/terminal/terminal-line.js +8 -0
- package/dist/src/components/terminal/terminal-line.js.map +1 -0
- package/dist/src/components/terminal/terminal.css.d.ts +2 -0
- package/dist/src/components/terminal/terminal.css.js +2 -0
- package/dist/src/components/terminal/terminal.css.js.map +1 -0
- package/dist/src/components/terminal/terminal.d.ts +52 -0
- package/dist/src/components/terminal/terminal.js +19 -0
- package/dist/src/components/terminal/terminal.js.map +1 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.d.ts +2 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.js +2 -0
- package/dist/src/components/terminal-hero/terminal-hero.css.js.map +1 -0
- package/dist/src/components/terminal-hero/terminal-hero.d.ts +62 -0
- package/dist/src/components/terminal-hero/terminal-hero.js +48 -0
- package/dist/src/components/terminal-hero/terminal-hero.js.map +1 -0
- package/dist/src/components/terms/terms.css.d.ts +2 -0
- package/dist/src/components/terms/terms.css.js +2 -0
- package/dist/src/components/terms/terms.css.js.map +1 -0
- package/dist/src/components/terms/terms.d.ts +42 -0
- package/dist/src/components/terms/terms.js +9 -0
- package/dist/src/components/terms/terms.js.map +1 -0
- package/dist/src/components/textarea/textarea.css.d.ts +2 -2
- package/dist/src/components/textarea/textarea.css.js.map +1 -1
- package/dist/src/components/textarea/textarea.d.ts +15 -6
- package/dist/src/components/textarea/textarea.js +13 -17
- package/dist/src/components/textarea/textarea.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +25 -4
- package/dist/src/components/tooltip/tooltip.js +5 -8
- package/dist/src/components/tooltip/tooltip.js.map +1 -1
- package/dist/src/components/trust-panel/trust-card.css.d.ts +2 -0
- package/dist/src/components/trust-panel/trust-card.css.js +2 -0
- package/dist/src/components/trust-panel/trust-card.css.js.map +1 -0
- package/dist/src/components/trust-panel/trust-card.d.ts +31 -0
- package/dist/src/components/trust-panel/trust-card.js +10 -0
- package/dist/src/components/trust-panel/trust-card.js.map +1 -0
- package/dist/src/components/trust-panel/trust-panel.css.js +1 -1
- package/dist/src/components/trust-panel/trust-panel.css.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.d.ts +28 -25
- package/dist/src/components/trust-panel/trust-panel.js +10 -57
- package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
- package/dist/src/components/video/video.js +1 -1
- package/dist/src/components/video/video.js.map +1 -1
- package/dist/src/components/video-player/video-player.d.ts +25 -3
- package/dist/src/components/video-player/video-player.js +7 -7
- package/dist/src/components/video-player/video-player.js.map +1 -1
- package/dist/src/loader/create-loader.d.ts +13 -2
- package/dist/src/loader/create-loader.js +1 -1
- package/dist/src/loader/create-loader.js.map +1 -1
- package/dist/src/loader/loader.d.ts +7 -4
- package/dist/src/loader/loader.js.map +1 -1
- package/dist/src/loader/registry.js +1 -1
- package/dist/src/loader/registry.js.map +1 -1
- package/dist/src/tokens/fonts.css +1 -1
- package/dist/src/tokens/layout.css +1 -1
- package/dist/src/tokens/scheme-layer.d.ts +55 -0
- package/dist/src/tokens/scheme-layer.js +5 -0
- package/dist/src/tokens/scheme-layer.js.map +1 -0
- package/dist/src/tokens/themes/dark.d.ts +64 -0
- package/dist/src/tokens/themes/dark.js +2 -0
- package/dist/src/tokens/themes/dark.js.map +1 -0
- package/dist/src/tokens/tokens.css +1 -1
- package/dist/src/tokens/tokens.d.ts +4 -25
- package/dist/src/tokens/tokens.js +1 -1
- package/dist/src/tokens/tokens.js.map +1 -1
- package/dist/src/vendor/prism/LICENSE +21 -0
- package/dist/src/vendor/prism/README.md +65 -0
- package/dist/src/vendor/prism/prism.d.ts +7 -0
- package/dist/src/vendor/prism/prism.js +13 -0
- package/package.json +163 -105
- package/schemas/README.md +55 -1
- package/schemas/component-manifest.json +4546 -3215
- package/schemas/figma-component-map.json +3247 -0
- package/schemas/manifest-omissions.json +1 -26
- package/schemas/page-schema.json +28 -1
- package/dist/src/components/accordion/accordion-bg.css.js +0 -2
- package/dist/src/components/accordion/accordion-bg.css.js.map +0 -1
- package/dist/src/components/accordion/accordion-bg.d.ts +0 -52
- package/dist/src/components/accordion/accordion-bg.js +0 -76
- package/dist/src/components/accordion/accordion-bg.js.map +0 -1
- package/dist/src/components/alert/alert.css.js +0 -2
- package/dist/src/components/alert/alert.css.js.map +0 -1
- package/dist/src/components/alert/alert.d.ts +0 -55
- package/dist/src/components/alert/alert.js +0 -28
- package/dist/src/components/alert/alert.js.map +0 -1
- package/dist/src/components/anchor/anchor-nav.css.js +0 -2
- package/dist/src/components/anchor/anchor-nav.css.js.map +0 -1
- package/dist/src/components/anchor/anchor-nav.js +0 -67
- package/dist/src/components/anchor/anchor-nav.js.map +0 -1
- package/dist/src/components/awards/awards-flex.css.d.ts +0 -1
- package/dist/src/components/awards/awards-flex.css.js +0 -2
- package/dist/src/components/awards/awards-flex.css.js.map +0 -1
- package/dist/src/components/awards/awards-flex.d.ts +0 -65
- package/dist/src/components/awards/awards-flex.js +0 -68
- package/dist/src/components/awards/awards-flex.js.map +0 -1
- package/dist/src/components/awards/awards-spotlight.css.d.ts +0 -1
- package/dist/src/components/awards/awards-spotlight.css.js +0 -2
- package/dist/src/components/awards/awards-spotlight.css.js.map +0 -1
- package/dist/src/components/awards/awards-spotlight.d.ts +0 -60
- package/dist/src/components/awards/awards-spotlight.js +0 -51
- package/dist/src/components/awards/awards-spotlight.js.map +0 -1
- package/dist/src/components/card-features/card-features.css.js +0 -2
- package/dist/src/components/card-features/card-features.css.js.map +0 -1
- package/dist/src/components/card-features/card-features.d.ts +0 -43
- package/dist/src/components/card-features/card-features.js +0 -37
- package/dist/src/components/card-features/card-features.js.map +0 -1
- package/dist/src/components/cards/card.css.js +0 -2
- package/dist/src/components/cards/card.css.js.map +0 -1
- package/dist/src/components/cards/card.d.ts +0 -61
- package/dist/src/components/cards/card.js +0 -54
- package/dist/src/components/cards/card.js.map +0 -1
- package/dist/src/components/compare/compare.css.js +0 -2
- package/dist/src/components/compare/compare.css.js.map +0 -1
- package/dist/src/components/compare/compare.d.ts +0 -79
- package/dist/src/components/compare/compare.js +0 -122
- package/dist/src/components/compare/compare.js.map +0 -1
- package/dist/src/components/divider/divider-horizontal.d.ts +0 -15
- package/dist/src/components/divider/divider-horizontal.js +0 -11
- package/dist/src/components/divider/divider-horizontal.js.map +0 -1
- package/dist/src/components/divider/divider-vertical.d.ts +0 -16
- package/dist/src/components/divider/divider-vertical.js +0 -12
- package/dist/src/components/divider/divider-vertical.js.map +0 -1
- package/dist/src/components/dropdown/dropdown.css.js.map +0 -1
- package/dist/src/components/dropdown/dropdown.d.ts +0 -49
- package/dist/src/components/dropdown/dropdown.js +0 -36
- package/dist/src/components/dropdown/dropdown.js.map +0 -1
- package/dist/src/components/features/features.css.js +0 -2
- package/dist/src/components/features/features.css.js.map +0 -1
- package/dist/src/components/features/features.d.ts +0 -21
- package/dist/src/components/features/features.js +0 -28
- package/dist/src/components/features/features.js.map +0 -1
- package/dist/src/components/footer/footer-images.d.ts +0 -3
- package/dist/src/components/footer/footer-images.js +0 -9
- package/dist/src/components/footer/footer-images.js.map +0 -1
- package/dist/src/components/footer/footer-links-group.css.js +0 -2
- package/dist/src/components/footer/footer-links-group.css.js.map +0 -1
- package/dist/src/components/footer/footer-links-group.d.ts +0 -13
- package/dist/src/components/footer/footer-links-group.js +0 -5
- package/dist/src/components/footer/footer-links-group.js.map +0 -1
- package/dist/src/components/footer/footer-lp.d.ts +0 -26
- package/dist/src/components/footer/footer-lp.js +0 -45
- package/dist/src/components/footer/footer-lp.js.map +0 -1
- package/dist/src/components/footer/footer-nav-menu.css.js +0 -2
- package/dist/src/components/footer/footer-nav-menu.css.js.map +0 -1
- package/dist/src/components/footer/footer-nav-menu.js +0 -6
- package/dist/src/components/footer/footer-nav-menu.js.map +0 -1
- package/dist/src/components/header/header-code.css.js +0 -2
- package/dist/src/components/header/header-code.css.js.map +0 -1
- package/dist/src/components/header/header-code.d.ts +0 -50
- package/dist/src/components/header/header-code.js +0 -80
- package/dist/src/components/header/header-code.js.map +0 -1
- package/dist/src/components/header/header.css.js +0 -2
- package/dist/src/components/header/header.css.js.map +0 -1
- package/dist/src/components/header/header.d.ts +0 -32
- package/dist/src/components/header/header.js +0 -165
- package/dist/src/components/header/header.js.map +0 -1
- package/dist/src/components/heading/heading.css.js +0 -2
- package/dist/src/components/heading/heading.css.js.map +0 -1
- package/dist/src/components/heading/heading.js +0 -6
- package/dist/src/components/heading/heading.js.map +0 -1
- package/dist/src/components/help-text/help-text.css.d.ts +0 -3
- package/dist/src/components/help-text/help-text.css.js.map +0 -1
- package/dist/src/components/help-text/help-text.d.ts +0 -14
- package/dist/src/components/help-text/help-text.js +0 -4
- package/dist/src/components/help-text/help-text.js.map +0 -1
- package/dist/src/components/icons/analysis-icon.d.ts +0 -11
- package/dist/src/components/icons/analysis-icon.js +0 -6
- package/dist/src/components/icons/analysis-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-down-icon.d.ts +0 -11
- package/dist/src/components/icons/arrow-down-icon.js +0 -6
- package/dist/src/components/icons/arrow-down-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-icon.d.ts +0 -37
- package/dist/src/components/icons/arrow-icon.js +0 -6
- package/dist/src/components/icons/arrow-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-right-icon.d.ts +0 -34
- package/dist/src/components/icons/arrow-right-icon.js +0 -6
- package/dist/src/components/icons/arrow-right-icon.js.map +0 -1
- package/dist/src/components/icons/arrow-up-icon.d.ts +0 -24
- package/dist/src/components/icons/arrow-up-icon.js +0 -6
- package/dist/src/components/icons/arrow-up-icon.js.map +0 -1
- package/dist/src/components/icons/av-comparatives-icon.d.ts +0 -13
- package/dist/src/components/icons/av-comparatives-icon.js +0 -13
- package/dist/src/components/icons/av-comparatives-icon.js.map +0 -1
- package/dist/src/components/icons/bd-ai-icon.d.ts +0 -13
- package/dist/src/components/icons/bd-ai-icon.js +0 -6
- package/dist/src/components/icons/bd-ai-icon.js.map +0 -1
- package/dist/src/components/icons/best-brands-icon.d.ts +0 -13
- package/dist/src/components/icons/best-brands-icon.js +0 -15
- package/dist/src/components/icons/best-brands-icon.js.map +0 -1
- package/dist/src/components/icons/brand-signature-icon.d.ts +0 -37
- package/dist/src/components/icons/brand-signature-icon.js +0 -6
- package/dist/src/components/icons/brand-signature-icon.js.map +0 -1
- package/dist/src/components/icons/check-icon.d.ts +0 -22
- package/dist/src/components/icons/check-icon.js +0 -6
- package/dist/src/components/icons/check-icon.js.map +0 -1
- package/dist/src/components/icons/circle-info-icon.d.ts +0 -26
- package/dist/src/components/icons/circle-info-icon.js +0 -8
- package/dist/src/components/icons/circle-info-icon.js.map +0 -1
- package/dist/src/components/icons/close-icon.d.ts +0 -11
- package/dist/src/components/icons/close-icon.js +0 -6
- package/dist/src/components/icons/close-icon.js.map +0 -1
- package/dist/src/components/icons/enterprise-icon.d.ts +0 -11
- package/dist/src/components/icons/enterprise-icon.js +0 -6
- package/dist/src/components/icons/enterprise-icon.js.map +0 -1
- package/dist/src/components/icons/family-icon.d.ts +0 -11
- package/dist/src/components/icons/family-icon.js +0 -8
- package/dist/src/components/icons/family-icon.js.map +0 -1
- package/dist/src/components/icons/globe-icon.d.ts +0 -11
- package/dist/src/components/icons/globe-icon.js +0 -6
- package/dist/src/components/icons/globe-icon.js.map +0 -1
- package/dist/src/components/icons/guide-icon.d.ts +0 -11
- package/dist/src/components/icons/guide-icon.js +0 -6
- package/dist/src/components/icons/guide-icon.js.map +0 -1
- package/dist/src/components/icons/home-icon.d.ts +0 -11
- package/dist/src/components/icons/home-icon.js +0 -6
- package/dist/src/components/icons/home-icon.js.map +0 -1
- package/dist/src/components/icons/icon-element.d.ts +0 -58
- package/dist/src/components/icons/icon-element.js +0 -2
- package/dist/src/components/icons/icon-element.js.map +0 -1
- package/dist/src/components/icons/individual-icon.d.ts +0 -11
- package/dist/src/components/icons/individual-icon.js +0 -6
- package/dist/src/components/icons/individual-icon.js.map +0 -1
- package/dist/src/components/icons/laurel-icon.d.ts +0 -11
- package/dist/src/components/icons/laurel-icon.js +0 -14
- package/dist/src/components/icons/laurel-icon.js.map +0 -1
- package/dist/src/components/icons/machine-learning-icon.d.ts +0 -11
- package/dist/src/components/icons/machine-learning-icon.js +0 -6
- package/dist/src/components/icons/machine-learning-icon.js.map +0 -1
- package/dist/src/components/icons/minus-icon.d.ts +0 -11
- package/dist/src/components/icons/minus-icon.js +0 -7
- package/dist/src/components/icons/minus-icon.js.map +0 -1
- package/dist/src/components/icons/missing-icon.d.ts +0 -41
- package/dist/src/components/icons/missing-icon.js +0 -8
- package/dist/src/components/icons/missing-icon.js.map +0 -1
- package/dist/src/components/icons/pause-icon.d.ts +0 -11
- package/dist/src/components/icons/pause-icon.js +0 -7
- package/dist/src/components/icons/pause-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-2024-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-2024-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-2024-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-business-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-business-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-business-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-icon.js.map +0 -1
- package/dist/src/components/icons/pc-mag-readers-icon.d.ts +0 -13
- package/dist/src/components/icons/pc-mag-readers-icon.js +0 -14
- package/dist/src/components/icons/pc-mag-readers-icon.js.map +0 -1
- package/dist/src/components/icons/play-icon.d.ts +0 -11
- package/dist/src/components/icons/play-icon.js +0 -6
- package/dist/src/components/icons/play-icon.js.map +0 -1
- package/dist/src/components/icons/plus-icon.d.ts +0 -11
- package/dist/src/components/icons/plus-icon.js +0 -6
- package/dist/src/components/icons/plus-icon.js.map +0 -1
- package/dist/src/components/icons/quote-icon.d.ts +0 -20
- package/dist/src/components/icons/quote-icon.js +0 -6
- package/dist/src/components/icons/quote-icon.js.map +0 -1
- package/dist/src/components/icons/small-business-icon.d.ts +0 -11
- package/dist/src/components/icons/small-business-icon.js +0 -6
- package/dist/src/components/icons/small-business-icon.js.map +0 -1
- package/dist/src/components/icons/top-product-icon.d.ts +0 -13
- package/dist/src/components/icons/top-product-icon.js +0 -14
- package/dist/src/components/icons/top-product-icon.js.map +0 -1
- package/dist/src/components/image/image.css.js.map +0 -1
- package/dist/src/components/image/image.js +0 -17
- package/dist/src/components/image/image.js.map +0 -1
- package/dist/src/components/input/input-clipboard.css.d.ts +0 -9
- package/dist/src/components/input/input-clipboard.css.js +0 -2
- package/dist/src/components/input/input-clipboard.css.js.map +0 -1
- package/dist/src/components/input/input-clipboard.d.ts +0 -52
- package/dist/src/components/input/input-clipboard.js +0 -62
- package/dist/src/components/input/input-clipboard.js.map +0 -1
- package/dist/src/components/light-carousel/light-carousel.css.js +0 -2
- package/dist/src/components/light-carousel/light-carousel.css.js.map +0 -1
- package/dist/src/components/light-carousel/light-carousel.d.ts +0 -74
- package/dist/src/components/light-carousel/light-carousel.js +0 -34
- package/dist/src/components/light-carousel/light-carousel.js.map +0 -1
- package/dist/src/components/modal/modal.css.js +0 -2
- package/dist/src/components/modal/modal.css.js.map +0 -1
- package/dist/src/components/modal/modal.d.ts +0 -52
- package/dist/src/components/modal/modal.js +0 -17
- package/dist/src/components/modal/modal.js.map +0 -1
- package/dist/src/components/paragraph/paragraph.css.js +0 -2
- package/dist/src/components/paragraph/paragraph.css.js.map +0 -1
- package/dist/src/components/paragraph/paragraph.js +0 -6
- package/dist/src/components/paragraph/paragraph.js.map +0 -1
- package/dist/src/components/pricing-cards/adopt-styles.d.ts +0 -10
- package/dist/src/components/pricing-cards/adopt-styles.js +0 -2
- package/dist/src/components/pricing-cards/adopt-styles.js.map +0 -1
- package/dist/src/components/pricing-cards/new-pricing-card.d.ts +0 -18
- package/dist/src/components/pricing-cards/new-pricing-card.js +0 -12
- package/dist/src/components/pricing-cards/new-pricing-card.js.map +0 -1
- package/dist/src/components/pricing-cards/new-pricing.css.js +0 -2
- package/dist/src/components/pricing-cards/new-pricing.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.d.ts +0 -19
- package/dist/src/components/pricing-cards/pricing-card-actions.js +0 -25
- package/dist/src/components/pricing-cards/pricing-card-actions.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-container.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-container.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-container.d.ts +0 -14
- package/dist/src/components/pricing-cards/pricing-card-container.js +0 -6
- package/dist/src/components/pricing-cards/pricing-card-container.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-header.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-header.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-header.d.ts +0 -22
- package/dist/src/components/pricing-cards/pricing-card-header.js +0 -18
- package/dist/src/components/pricing-cards/pricing-card-header.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.d.ts +0 -39
- package/dist/src/components/pricing-cards/pricing-card-pricing.js +0 -49
- package/dist/src/components/pricing-cards/pricing-card-pricing.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.d.ts +0 -16
- package/dist/src/components/pricing-cards/pricing-card-show-more.js +0 -12
- package/dist/src/components/pricing-cards/pricing-card-show-more.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-card.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-card.d.ts +0 -155
- package/dist/src/components/pricing-cards/pricing-card.js +0 -258
- package/dist/src/components/pricing-cards/pricing-card.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js +0 -2
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js.map +0 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.d.ts +0 -13
- package/dist/src/components/pricing-cards/pricing-feature-item.js +0 -5
- package/dist/src/components/pricing-cards/pricing-feature-item.js.map +0 -1
- package/dist/src/components/progress/progress.css.d.ts +0 -3
- package/dist/src/components/progress/progress.css.js +0 -2
- package/dist/src/components/progress/progress.css.js.map +0 -1
- package/dist/src/components/progress/progress.d.ts +0 -19
- package/dist/src/components/progress/progress.js +0 -11
- package/dist/src/components/progress/progress.js.map +0 -1
- package/dist/src/components/radio/toggle-radio.d.ts +0 -28
- package/dist/src/components/radio/toggle-radio.js +0 -15
- package/dist/src/components/radio/toggle-radio.js.map +0 -1
- package/dist/src/components/spotlight-section/spotlight-section.css.js +0 -2
- package/dist/src/components/spotlight-section/spotlight-section.css.js.map +0 -1
- package/dist/src/components/spotlight-section/spotlight-section.d.ts +0 -22
- package/dist/src/components/spotlight-section/spotlight-section.js +0 -46
- package/dist/src/components/spotlight-section/spotlight-section.js.map +0 -1
- package/dist/src/components/stat/stat-tile.d.ts +0 -24
- package/dist/src/components/stat/stat-tile.js +0 -7
- package/dist/src/components/stat/stat-tile.js.map +0 -1
- package/dist/src/components/tab-list/tab-list.css.d.ts +0 -16
- package/dist/src/components/tab-list/tab-list.css.js +0 -2
- package/dist/src/components/tab-list/tab-list.css.js.map +0 -1
- package/dist/src/components/tab-list/tab-list.d.ts +0 -99
- package/dist/src/components/tab-list/tab-list.js +0 -25
- package/dist/src/components/tab-list/tab-list.js.map +0 -1
- package/dist/src/components/tabs/tabs.css.js +0 -2
- package/dist/src/components/tabs/tabs.css.js.map +0 -1
- package/dist/src/components/tabs/tabs.d.ts +0 -69
- package/dist/src/components/tabs/tabs.js +0 -29
- package/dist/src/components/tabs/tabs.js.map +0 -1
- package/dist/src/components/terminal/terminal-message.css.js +0 -2
- package/dist/src/components/terminal/terminal-message.css.js.map +0 -1
- package/dist/src/components/terminal/terminal-message.d.ts +0 -44
- package/dist/src/components/terminal/terminal-message.js +0 -68
- package/dist/src/components/terminal/terminal-message.js.map +0 -1
- package/dist/src/components/termsOfUse/terms.css.js +0 -2
- package/dist/src/components/termsOfUse/terms.css.js.map +0 -1
- package/dist/src/components/termsOfUse/terms.d.ts +0 -22
- package/dist/src/components/termsOfUse/terms.js +0 -78
- package/dist/src/components/termsOfUse/terms.js.map +0 -1
- /package/dist/src/components/{accordion/accordion-bg.css.d.ts → agent-endpoints/agent-endpoints-pills.css.d.ts} +0 -0
- /package/dist/src/components/{anchor → anchor-nav}/anchor-nav.css.d.ts +0 -0
- /package/dist/src/components/{card-features/card-features.css.d.ts → awards/award-marks.css.d.ts} +0 -0
- /package/dist/src/components/{cards/card.css.d.ts → awards/award.css.d.ts} +0 -0
- /package/dist/src/components/{compare/compare.css.d.ts → bar-chart/bar-chart.css.d.ts} +0 -0
- /package/dist/src/components/{features/features.css.d.ts → card/card-grid.css.d.ts} +0 -0
- /package/dist/src/components/{footer/footer-links-group.css.d.ts → card/card.css.d.ts} +0 -0
- /package/dist/src/components/{footer/footer-nav-menu.css.d.ts → dialog/dialog.css.d.ts} +0 -0
- /package/dist/src/components/{header/header-code.css.d.ts → footer/footer-group.css.d.ts} +0 -0
- /package/dist/src/components/{header/header.css.d.ts → footer/footer-nav.css.d.ts} +0 -0
- /package/dist/src/components/{heading/heading.css.d.ts → h/h.css.d.ts} +0 -0
- /package/dist/src/components/{image/image.css.d.ts → img/img.css.d.ts} +0 -0
- /package/dist/src/components/{light-carousel/light-carousel.css.d.ts → install-options/install-option.css.d.ts} +0 -0
- /package/dist/src/components/{modal/modal.css.d.ts → newsletter-signup/newsletter-signup.css.d.ts} +0 -0
- /package/dist/src/components/{paragraph/paragraph.css.d.ts → p/p.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards → pricing-card}/pricing-card.css.d.ts +0 -0
- /package/dist/src/components/{pricing-cards/new-pricing.css.d.ts → pricing-card/pricing-feature-group.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-actions.css.d.ts → pricing-card/pricing-feature.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-container.css.d.ts → pricing-card/pricing-price.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-header.css.d.ts → process-steps/process-step.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-pricing.css.d.ts → product-hero/product-hero.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-card-show-more.css.d.ts → product-upsell/product-upsell.css.d.ts} +0 -0
- /package/dist/src/components/{pricing-cards/pricing-feature-item.css.d.ts → related-articles/related-articles.css.d.ts} +0 -0
- /package/dist/src/components/{spotlight-section/spotlight-section.css.d.ts → report-promo/report-promo.css.d.ts} +0 -0
- /package/dist/src/components/{dropdown/dropdown.css.d.ts → select/select.css.d.ts} +0 -0
- /package/dist/src/components/{tabs/tabs.css.d.ts → spotlight/spotlight.css.d.ts} +0 -0
- /package/dist/src/components/{terminal/terminal-message.css.d.ts → tab-group/tab-group.css.d.ts} +0 -0
- /package/dist/src/components/{termsOfUse/terms.css.d.ts → tab-group/tab.css.d.ts} +0 -0
|
@@ -1,34 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The events several elements send, declared once.
|
|
3
3
|
*
|
|
4
4
|
* Every other bd-* event is declared beside the one element that dispatches
|
|
5
|
-
* it.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* it. These four are the show/hide vocabulary N8 gives every element that
|
|
6
|
+
* opens and closes -- the tooltip today, the dialog and the accordion item as
|
|
7
|
+
* their phases land -- so no single sender owns them, and declaring them in
|
|
8
|
+
* each would be one declaration per sender of the same name.
|
|
9
|
+
*
|
|
10
|
+
* bd-show and bd-hide report that the element is opening or closing;
|
|
11
|
+
* bd-after-show and bd-after-hide that it has finished, once any transition
|
|
12
|
+
* has run (at once under prefers-reduced-motion). None carries a detail.
|
|
13
|
+
*
|
|
14
|
+
* 3.x declared bd-change and bd-input here, the generic "the value changed"
|
|
15
|
+
* pair. v4 form controls send the native `input` and `change`, whose target
|
|
16
|
+
* carries the value, and bd-pagination-dots sends bd-slide-change, so neither
|
|
17
|
+
* has a sender left.
|
|
9
18
|
*
|
|
10
19
|
* A sender imports this module for its side effect, which is what puts these
|
|
11
20
|
* declarations in front of a consumer who imports that element.
|
|
12
21
|
*/
|
|
13
|
-
/** What a text field or a dropdown says about its value. */
|
|
14
|
-
export interface BdFieldDetail {
|
|
15
|
-
value: string;
|
|
16
|
-
name: string;
|
|
17
|
-
}
|
|
18
22
|
declare global {
|
|
19
23
|
interface HTMLElementEventMap {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
'bd-change': CustomEvent<BdFieldDetail | boolean | {
|
|
26
|
-
current: number;
|
|
27
|
-
}>;
|
|
28
|
-
/**
|
|
29
|
-
* bd-custom-input, the clipboard field and bd-custom-dropdown:
|
|
30
|
-
* `{ value, name }`. bd-textarea: the value itself.
|
|
31
|
-
*/
|
|
32
|
-
'bd-input': CustomEvent<BdFieldDetail | string>;
|
|
24
|
+
'bd-show': CustomEvent<null>;
|
|
25
|
+
'bd-hide': CustomEvent<null>;
|
|
26
|
+
'bd-after-show': CustomEvent<null>;
|
|
27
|
+
'bd-after-hide': CustomEvent<null>;
|
|
33
28
|
}
|
|
34
29
|
}
|
|
30
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill-width.css.js","names":["KEYWORDS","hostFillsWidth","unsafeCSS","keyword"],"sources":["../../../../src/components/shared/fill-width.css.ts"],"sourcesContent":["import { unsafeCSS } from \"lit\";\n\n/**\n * The width a size container's host takes: all of its column, less its own\n * margins.\n *\n * An element with `container-type: inline-size` contributes nothing to its\n * own intrinsic width, so where its parent sizes it to its content -- a flex\n * row, a grid placing items at start -- it measures 0. These hosts used to\n * answer that with `width: 100%`, which fills the containing block and\n * ignores the host's margins: a page writing `margin-inline: 24px` on one got\n * a box 48px wider than its column, scrolling the page sideways on a phone.\n *\n * `stretch` is the width a block takes by default -- the containing block\n * less the margins -- asked for explicitly, so it holds in a flex row or a\n * grid cell too. It is
|
|
1
|
+
{"version":3,"file":"fill-width.css.js","names":["KEYWORDS","hostFillsWidth","unsafeCSS","keyword"],"sources":["../../../../src/components/shared/fill-width.css.ts"],"sourcesContent":["import { unsafeCSS } from \"lit\";\n\n/**\n * The width a size container's host takes: all of its column, less its own\n * margins.\n *\n * An element with `container-type: inline-size` contributes nothing to its\n * own intrinsic width, so where its parent sizes it to its content -- a flex\n * row, a grid placing items at start -- it measures 0. These hosts used to\n * answer that with `width: 100%`, which fills the containing block and\n * ignores the host's margins: a page writing `margin-inline: 24px` on one got\n * a box 48px wider than its column, scrolling the page sideways on a phone.\n *\n * `stretch` is the width a block takes by default -- the containing block\n * less the margins -- asked for explicitly, so it holds in a flex row or a\n * grid cell too. It is Limited availability, short of the Newly available\n * target, so it is behind @supports with 100% before it, and its prefixed\n * spellings come first, Gecko's and then WebKit's, so the standard one wins\n * where more than one is read (CLAUDE.md, Browser support).\n *\n * :host { display: block; container-type: inline-size; }\n * ${hostFillsWidth()}\n */\nconst KEYWORDS = [\"-moz-available\", \"-webkit-fill-available\", \"stretch\"];\n\nexport const hostFillsWidth = () => unsafeCSS([\n \":host { width: 100%; }\",\n ...KEYWORDS.map(keyword => `@supports (width: ${keyword}) { :host { width: ${keyword}; } }`)\n].join(\"\\n\"));\n"],"mappings":"A,gCAuBA,IAAMA,EAAW,CAAC,iBAAkB,yBAA0B,SAAS,EAE1DC,MAAuBC,EAAU,CAC5C,yBACA,GAAGF,EAAS,IAAI,GAAW,qBAAqBG,EAAQ,qBAAqBA,EAAQ,MAAM,CAC7F,CAAC,CAAC,KAAK;CAAI,CAAC,E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words a node reads as in the flat tree, whitespace collapsed and
|
|
3
|
+
* trimmed: a <slot> through what it shows, anything else through its
|
|
4
|
+
* light-DOM children. Shadow roots are not entered, because a component's
|
|
5
|
+
* own chrome -- an icon, a fallback label -- is not the page's copy.
|
|
6
|
+
*
|
|
7
|
+
* Several nodes read as one run, so the space between a text node and the
|
|
8
|
+
* element after it survives: flatText(...slot.assignedNodes()).
|
|
9
|
+
*
|
|
10
|
+
* This is the text a component copies into a name the platform cannot
|
|
11
|
+
* reference across a shadow boundary (ElementInternals, a control inside a
|
|
12
|
+
* nested atom). Where aria-labelledby can reach, point it at the slot's
|
|
13
|
+
* wrapper instead and let accname read the flat tree itself.
|
|
14
|
+
*/
|
|
15
|
+
export declare function flatText(...nodes: Node[]): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=/* @__PURE__ */ new Set([`script`,`style`,`template`]);function t(e){let t=e.assignedNodes({flatten:!0});return t.length?t:[...e.childNodes]}function n(r){return r.nodeType===Node.TEXT_NODE?r.data:r.nodeType!==Node.ELEMENT_NODE||e.has(r.localName)?``:(r instanceof HTMLSlotElement?t(r):[...r.childNodes]).map(n).join(``)}function r(...e){return e.map(n).join(``).replace(/\s+/g,` `).trim()}export{r as flatText};
|
|
2
|
+
//# sourceMappingURL=flat-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flat-text.js","names":["SILENT","shown","assigned","slot","gather","node","flatText","nodes"],"sources":["../../../../src/components/shared/flat-text.ts"],"sourcesContent":["/* Elements whose children never render as words: a <style> slotted inside a\n label would otherwise put its rules into the name a component copies. A\n template's children are its content fragment, so it reads as nothing anyway;\n listing it says so. */\nconst SILENT = new Set(['script', 'style', 'template']);\n\n/**\n * What a <slot> shows: its flattened assigned nodes, or, with none, its own\n * children. assignedNodes({ flatten: true }) already returns the fallback of a\n * slot in a shadow root; a slot outside one is assigned nothing and renders\n * its children, so those are its text too.\n */\nfunction shown(slot: HTMLSlotElement): Node[] {\n const assigned = slot.assignedNodes({ flatten: true });\n return assigned.length ? assigned : [...slot.childNodes];\n}\n\nfunction gather(node: Node): string {\n if (node.nodeType === Node.TEXT_NODE) return (node as Text).data;\n if (node.nodeType !== Node.ELEMENT_NODE || SILENT.has((node as Element).localName)) return '';\n const children = node instanceof HTMLSlotElement ? shown(node) : [...node.childNodes];\n return children.map(gather).join('');\n}\n\n/**\n * The words a node reads as in the flat tree, whitespace collapsed and\n * trimmed: a <slot> through what it shows, anything else through its\n * light-DOM children. Shadow roots are not entered, because a component's\n * own chrome -- an icon, a fallback label -- is not the page's copy.\n *\n * Several nodes read as one run, so the space between a text node and the\n * element after it survives: flatText(...slot.assignedNodes()).\n *\n * This is the text a component copies into a name the platform cannot\n * reference across a shadow boundary (ElementInternals, a control inside a\n * nested atom). Where aria-labelledby can reach, point it at the slot's\n * wrapper instead and let accname read the flat tree itself.\n */\nexport function flatText(...nodes: Node[]): string {\n return nodes.map(gather).join('')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n"],"mappings":"AAIA,IAAMA,kBAAS,IAAI,IAAI,CAAC,SAAU,QAAS,UAAU,CAAC,EAQtD,SAASC,EAAM,EAA+B,CAC5C,IAAMC,EAAWC,EAAK,cAAc,CAAE,QAAS,EAAK,CAAC,EACrD,OAAOD,EAAS,OAASA,EAAW,CAAC,GAAGC,EAAK,UAAU,CACzD,CAEA,SAASC,EAAO,EAAoB,CAIlC,OAHIC,EAAK,WAAa,KAAK,UAAmBA,EAAc,KACxDA,EAAK,WAAa,KAAK,cAAgBL,EAAO,IAAKK,EAAiB,SAAS,EAAU,IAC1EA,aAAgB,gBAAkBJ,EAAMI,CAAI,EAAI,CAAC,GAAGA,EAAK,UAAU,EAAA,CACpE,IAAID,CAAM,CAAC,CAAC,KAAK,EAAE,CACrC,CAgBA,SAAgBE,EAAS,GAAGC,EAAuB,CACjD,OAAOA,EAAM,IAAIH,CAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAC9B,QAAQ,OAAQ,GAAG,CAAC,CACpB,KAAK,CACV,C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { nothing, type ComplexAttributeConverter, type LitElement, type TemplateResult } from "lit";
|
|
2
2
|
/**
|
|
3
3
|
* What makes a bd-* control take part in a <form>.
|
|
4
4
|
*
|
|
@@ -38,6 +38,7 @@ export declare class FormControlInterface {
|
|
|
38
38
|
checkValidity(): boolean;
|
|
39
39
|
reportValidity(): boolean;
|
|
40
40
|
protected _submitImplicitly(): void;
|
|
41
|
+
protected _relayChange(): void;
|
|
41
42
|
formDisabledCallback(disabled: boolean): void;
|
|
42
43
|
formResetCallback(): void;
|
|
43
44
|
protected _mirrorValidity(control: NativeControl | null | undefined): void;
|
|
@@ -46,16 +47,18 @@ export declare class ValueControlInterface {
|
|
|
46
47
|
protected _resets: number;
|
|
47
48
|
value: string;
|
|
48
49
|
protected _sync(): void;
|
|
50
|
+
protected _defaultValue(): string;
|
|
49
51
|
formStateRestoreCallback(state: string | File | FormData | null): void;
|
|
50
52
|
protected _onFieldKeydown(e: KeyboardEvent): void;
|
|
51
53
|
}
|
|
52
54
|
export declare const FormControl: <T extends Constructor<LitElement>>(Base: T) => Constructor<FormControlInterface> & T;
|
|
53
55
|
/**
|
|
54
56
|
* What a control holding a typed or chosen value adds to FormControl --
|
|
55
|
-
* bd-
|
|
57
|
+
* bd-input, bd-textarea and bd-select.
|
|
56
58
|
*
|
|
57
59
|
* The `value` property is the current value and the value ATTRIBUTE is the
|
|
58
|
-
* default a reset returns to, as on a native field
|
|
60
|
+
* default a reset returns to, as on a native field (bd-select also takes a
|
|
61
|
+
* `selected` option; see _defaultValue there). A reset also rebuilds the
|
|
59
62
|
* native control -- the subclass keys it on `_resets` -- because it has to
|
|
60
63
|
* forget that the reader touched it (:user-invalid), and only the form it
|
|
61
64
|
* belongs to could tell it that; the control in here has none.
|
|
@@ -63,4 +66,25 @@ export declare const FormControl: <T extends Constructor<LitElement>>(Base: T) =
|
|
|
63
66
|
* class BdField extends ValueControl(LitElement) { ... }
|
|
64
67
|
*/
|
|
65
68
|
export declare const ValueControl: <T extends Constructor<LitElement>>(Base: T) => Constructor<ValueControlInterface> & Constructor<FormControlInterface> & T;
|
|
69
|
+
/** The id of the native control a field renders, which its <label for> names. */
|
|
70
|
+
export declare const CONTROL_ID = "control";
|
|
71
|
+
/** The id of the box around the hint slot, which aria-describedby names. */
|
|
72
|
+
export declare const HINT_ID = "hint";
|
|
73
|
+
/** The slots every field renders. */
|
|
74
|
+
export declare const FIELD_SLOTS: readonly ["label", "hint"];
|
|
75
|
+
/** What a field asks of the SlotController that follows its slots. */
|
|
76
|
+
interface Slots {
|
|
77
|
+
has(name: string): boolean;
|
|
78
|
+
}
|
|
79
|
+
/** The size step a field's label class is named for. */
|
|
80
|
+
type FieldSize = 'sm' | 'md' | 'lg';
|
|
81
|
+
/** The field's label: its label slot, inside a <label for> the native control. */
|
|
82
|
+
export declare function fieldLabel(slots: Slots, { size, required }: {
|
|
83
|
+
size: FieldSize;
|
|
84
|
+
required: boolean;
|
|
85
|
+
}, slot: TemplateResult): TemplateResult<1>;
|
|
86
|
+
/** The field's hint: its hint slot, in the box the control is described by. */
|
|
87
|
+
export declare function fieldHint(slots: Slots, tone: 'default' | 'error' | 'success', slot: TemplateResult): TemplateResult<1>;
|
|
88
|
+
/** The control's aria-describedby: the hint, while there is one. */
|
|
89
|
+
export declare const describedBy: (slots: Slots) => "hint" | typeof nothing;
|
|
66
90
|
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import e from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{
|
|
1
|
+
import e from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{html as t,nothing as n}from"lit";import{state as r}from"lit/decorators.js";var i={toAttribute:e=>e||null},a=/* @__PURE__ */ new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`date`,`month`,`week`,`time`,`datetime-local`,`number`]),o=t=>{class n extends t{static{this.formAssociated=!0}constructor(...e){super(...e),this._formDisabled=!1,this._attempted=!1,this._internals=this.attachInternals(),this.addEventListener(`invalid`,()=>{this._attempted=!0}),this.addEventListener(`click`,e=>{e.composedPath()[0]===this&&this._fromOutside(e)&&(e.stopImmediatePropagation(),this._activate())})}_fromOutside(e){if(!e.isTrusted)return!0;let t=this.getBoundingClientRect();return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}get _control(){return null}_activate(){this._control?.focus()}get form(){return this._internals.form}get labels(){return this._internals.labels}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}_submitImplicitly(){let e=this.form;if(!e)return;let t=[...e.elements],n=t.find(e=>e.type===`submit`||e.type===`image`);n?n.matches(`:disabled`)||n.click():t.filter(e=>a.has(e.type)).length<=1&&e.requestSubmit()}_relayChange(){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}formDisabledCallback(e){this._formDisabled=e}formResetCallback(){this._attempted=!1}_mirrorValidity(e){!e?.willValidate||e.validity.valid?this._internals.setValidity({}):this._internals.setValidity(e.validity,e.validationMessage,e)}}return e([r()],n.prototype,`_formDisabled`,void 0),e([r()],n.prototype,`_attempted`,void 0),n},s=t=>{class n extends o(t){constructor(...e){super(...e),this._resets=0}_sync(){this._internals.setFormValue(this.value),this._mirrorValidity(this._control)}_defaultValue(){return this.getAttribute(`value`)??``}formResetCallback(){super.formResetCallback(),this.value=this._defaultValue(),this._resets++}formStateRestoreCallback(e){this.value=e}_onFieldKeydown(e){e.key===`Enter`&&!e.isComposing&&this._submitImplicitly()}}return e([r()],n.prototype,`_resets`,void 0),n},c=`control`,l=`hint`,u=[`label`,`hint`];function d(e,{size:r,required:i},a){return t`<label
|
|
2
|
+
for=${c}
|
|
3
|
+
part="label"
|
|
4
|
+
class="form-label label-${r}"
|
|
5
|
+
?hidden=${!e.has(`label`)}
|
|
6
|
+
>${a}${i?t`<span class="form-label__required" aria-hidden="true">*</span>`:n}</label>`}function f(e,n,r){return t`<div
|
|
7
|
+
id=${l}
|
|
8
|
+
part="hint"
|
|
9
|
+
class="form-help-text form-help-text--${n}"
|
|
10
|
+
?hidden=${!e.has(`hint`)}
|
|
11
|
+
>${r}</div>`}var p=e=>e.has(`hint`)?l:n;export{c as CONTROL_ID,u as FIELD_SLOTS,o as FormControl,l as HINT_ID,s as ValueControl,p as describedBy,f as fieldHint,d as fieldLabel,i as omitEmpty};
|
|
2
12
|
//# sourceMappingURL=form-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.js","names":["__decorate","omitEmpty","value","BLOCKS_IMPLICIT_SUBMISSION","FormControl","FormControlElement","Base","args","r","form","elements","button","el","disabled","control","state","ValueControl","ValueControlElement","_args"],"sources":["../../../../src/components/shared/form-control.ts"],"sourcesContent":["import type { ComplexAttributeConverter, LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\n\n/**\n * What makes a bd-* control take part in a <form>.\n *\n * Every control in this package renders its native element inside a shadow\n * root, and a native control there has no form owner: the <form> around the\n * element could not see it. A form submitted none of them, reset none of them\n * and let a required one through empty. Form-associated custom elements are\n * the platform's answer -- Baseline Widely available since 2023 -- so the\n * host joins the form itself through ElementInternals, the way the guide in\n * .claude/skills/modern-web-guidance/guides/html/form-associated-custom-elements.md\n * lays out, with no hidden input.\n *\n * This is the part every control shares: the opt-in, the internals, the\n * read-only surface a native control has (form, validity, checkValidity...),\n * and the two states a control cannot see from inside its shadow root -- a\n * <fieldset disabled> around it, and a submit that failed. What a control\n * submits, when it is valid and what reset puts back are its own.\n *\n * class BdThing extends FormControl(LitElement) { ... }\n */\n\n/* For `name`, which reflects: FACE submits under the host's name ATTRIBUTE, so\n a name set as a property -- what every framework binding does -- has to\n reach it. An empty name submits nothing either way, so it is left off the\n element rather than written as name=\"\" on every control on the page. */\nexport const omitEmpty: ComplexAttributeConverter<string> = { toAttribute: value => value || null };\n\n/* The input types that block implicit submission (HTML, \"implicit\n submission\"): a form with no submit button submits on Enter only while it\n has at most one field of these. A text field here says which type it is\n through its own `type`, so it is counted the same way. */\nconst BLOCKS_IMPLICIT_SUBMISSION = new Set<string | undefined>([\n 'text', 'search', 'url', 'tel', 'email', 'password', 'date', 'month', 'week', 'time',\n 'datetime-local', 'number'\n]);\n\n// Lit's mixin pattern: the class a mixin returns is typed by the declared\n// interfaces below, so its members reach the elements built on it without the\n// anonymous class itself leaking into the published declarations.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T = object> = new (...args: any[]) => T;\n\n/** The native element a control renders and stands in for. */\ntype NativeControl = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement;\n\n/* The members a control's own code reaches are protected: they are how the\n elements built on the mixin talk to it, not part of what a page may call. */\nexport declare class FormControlInterface {\n protected _internals : ElementInternals;\n protected _formDisabled: boolean;\n protected _attempted : boolean;\n protected _fromOutside(e: MouseEvent): boolean;\n protected get _control(): NativeControl | null;\n protected _activate(): void;\n get form(): HTMLFormElement | null;\n get labels(): NodeList;\n get validity(): ValidityState;\n get validationMessage(): string;\n get willValidate(): boolean;\n checkValidity(): boolean;\n reportValidity(): boolean;\n protected _submitImplicitly(): void;\n formDisabledCallback(disabled: boolean): void;\n formResetCallback(): void;\n protected _mirrorValidity(control: NativeControl | null | undefined): void;\n}\n\nexport declare class ValueControlInterface {\n protected _resets: number;\n value : string;\n protected _sync(): void;\n formStateRestoreCallback(state: string | File | FormData | null): void;\n protected _onFieldKeydown(e: KeyboardEvent): void;\n}\n\nexport const FormControl = <T extends Constructor<LitElement>>(Base: T) => {\n class FormControlElement extends Base {\n static formAssociated = true;\n\n /* Disabled as the form sees it: the control's own `disabled`, or a\n <fieldset disabled> it sits in. The platform reports both through\n formDisabledCallback. It is kept here and never written to the host's\n attribute, or a fieldset re-enabled later could not re-enable it. */\n @state() protected _formDisabled = false;\n /* A submit has been tried and found this control invalid. A native\n control turns :user-invalid then, but the native element in here has\n no form owner, so it never learns of the attempt; the `invalid` event\n the form fires at the host is how it hears. checkValidity() fires the\n same event, so a silent check counts too. Reset clears it. */\n @state() protected _attempted = false;\n protected _internals: ElementInternals;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a mixin constructor must take any[]\n constructor(...args: any[]) {\n super(...args);\n this._internals = this.attachInternals();\n this.addEventListener('invalid', () => { this._attempted = true; });\n /* An outside activation is passed on to the native control, whose own\n click then reaches this element like any other. This one stops here, so\n a click listener on the element hears one click, not two -- one\n el.click() is one click on a native control. Registered in the\n constructor, it runs before any listener the page adds. */\n this.addEventListener('click', e => {\n if (e.composedPath()[0] !== this || !this._fromOutside(e)) return;\n e.stopImmediatePropagation();\n this._activate();\n });\n }\n\n /* A click on the host itself, not on anything inside it, is one of three\n things. A <label for> pointing at this element sends one carrying the\n label's position, and el.click() an untrusted one: the two ways a native\n control is activated from outside, and both activate this one. The third\n is a real click inside the host's own box but on nothing in it -- the\n slack beside a short label when a column stretches the host -- and that\n did nothing before and still does not, or a wide row would toggle from\n across the page. */\n protected _fromOutside(e: MouseEvent) {\n if (!e.isTrusted) return true;\n const r = this.getBoundingClientRect();\n return e.clientX < r.left || e.clientX > r.right || e.clientY < r.top || e.clientY > r.bottom;\n }\n\n /** The native element inside; each control says which. */\n protected get _control(): NativeControl | null {\n return null;\n }\n\n /** What an outside activation does: a field takes focus, a checkable control overrides this to toggle. */\n protected _activate() {\n this._control?.focus();\n }\n\n get form() { return this._internals.form; }\n get labels() { return this._internals.labels; }\n get validity() { return this._internals.validity; }\n get validationMessage() { return this._internals.validationMessage; }\n get willValidate() { return this._internals.willValidate; }\n checkValidity() { return this._internals.checkValidity(); }\n reportValidity() { return this._internals.reportValidity(); }\n\n /* Enter in a native text field, checkbox, radio or switch submits its\n form -- implicit submission: the form's default button is clicked, or,\n with none, the form is submitted, unless more than one of its fields\n blocks that (BLOCKS_IMPLICIT_SUBMISSION above). Enter never toggles;\n Space does. The native control in here has no form, so the host does it.\n The default button is the form's first submit button, and a bd-button\n with type=\"submit\" is one: it is in form.elements and its type says so.\n A disabled default button means no submission, as natively. */\n protected _submitImplicitly() {\n const form = this.form;\n if (!form) return;\n const elements = [...form.elements] as Array<HTMLElement & { type?: string }>;\n const button = elements.find(el => el.type === 'submit' || el.type === 'image');\n if (button) {\n if (!button.matches(':disabled')) button.click();\n return;\n }\n const blocking = elements.filter(el => BLOCKS_IMPLICIT_SUBMISSION.has(el.type)).length;\n if (blocking <= 1) form.requestSubmit();\n }\n\n formDisabledCallback(disabled: boolean) {\n this._formDisabled = disabled;\n }\n\n formResetCallback() {\n this._attempted = false;\n }\n\n /* The native control already knows whether it is valid, and says so in the\n browser's own words and language, so the host repeats it rather than\n re-deriving it. The control is the anchor: reportValidity() and a failed\n submit focus it and point the message at it. A disabled control is out\n of validation altogether, and says so with an empty message that\n setValidity() would refuse; the host is disabled with it. */\n protected _mirrorValidity(control: NativeControl | null | undefined) {\n if (!control?.willValidate || control.validity.valid) {\n this._internals.setValidity({});\n } else {\n this._internals.setValidity(control.validity, control.validationMessage, control);\n }\n }\n }\n return FormControlElement as unknown as Constructor<FormControlInterface> & T;\n};\n\n/**\n * What a control holding a typed or chosen value adds to FormControl --\n * bd-custom-input, the clipboard field, bd-textarea, bd-custom-dropdown.\n *\n * The `value` property is the current value and the value ATTRIBUTE is the\n * default a reset returns to, as on a native field. A reset also rebuilds the\n * native control -- the subclass keys it on `_resets` -- because it has to\n * forget that the reader touched it (:user-invalid), and only the form it\n * belongs to could tell it that; the control in here has none.\n *\n * class BdField extends ValueControl(LitElement) { ... }\n */\nexport const ValueControl = <T extends Constructor<LitElement>>(Base: T) => {\n class ValueControlElement extends FormControl(Base) {\n @state() protected _resets = 0;\n declare value: string;\n\n /* What a form sees: the value, and whether the native control finds it\n valid -- required, type, and anything else it checks -- in its own\n words. Called after every update, and before a field's own events, so a\n handler asking the form gets the answer for what was just typed. */\n protected _sync() {\n this._internals.setFormValue(this.value);\n this._mirrorValidity(this._control);\n }\n\n formResetCallback() {\n super.formResetCallback();\n this.value = this.getAttribute('value') ?? '';\n this._resets++;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = state as string;\n }\n\n /* Enter in a one-line field submits its form, as from a native <input>.\n Not mid-composition: there Enter commits the IME's candidate. */\n protected _onFieldKeydown(e: KeyboardEvent) {\n if (e.key === 'Enter' && !e.isComposing) this._submitImplicitly();\n }\n }\n return ValueControlElement as unknown as Constructor<ValueControlInterface> & Constructor<FormControlInterface> & T;\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"form-control.js","names":["__decorate","omitEmpty","value","BLOCKS_IMPLICIT_SUBMISSION","FormControl","FormControlElement","Base","args","r","form","elements","button","el","disabled","control","state","ValueControl","ValueControlElement","_args","CONTROL_ID","HINT_ID","FIELD_SLOTS","fieldLabel","size","slots","slot","required","nothing","fieldHint","tone","describedBy"],"sources":["../../../../src/components/shared/form-control.ts"],"sourcesContent":["import { html, nothing, type ComplexAttributeConverter, type LitElement, type TemplateResult } from 'lit';\nimport { state } from 'lit/decorators.js';\n\n/**\n * What makes a bd-* control take part in a <form>.\n *\n * Every control in this package renders its native element inside a shadow\n * root, and a native control there has no form owner: the <form> around the\n * element could not see it. A form submitted none of them, reset none of them\n * and let a required one through empty. Form-associated custom elements are\n * the platform's answer -- Baseline Widely available since 2023 -- so the\n * host joins the form itself through ElementInternals, the way the guide in\n * .claude/skills/modern-web-guidance/guides/html/form-associated-custom-elements.md\n * lays out, with no hidden input.\n *\n * This is the part every control shares: the opt-in, the internals, the\n * read-only surface a native control has (form, validity, checkValidity...),\n * and the two states a control cannot see from inside its shadow root -- a\n * <fieldset disabled> around it, and a submit that failed. What a control\n * submits, when it is valid and what reset puts back are its own.\n *\n * class BdThing extends FormControl(LitElement) { ... }\n */\n\n/* For `name`, which reflects: FACE submits under the host's name ATTRIBUTE, so\n a name set as a property -- what every framework binding does -- has to\n reach it. An empty name submits nothing either way, so it is left off the\n element rather than written as name=\"\" on every control on the page. */\nexport const omitEmpty: ComplexAttributeConverter<string> = { toAttribute: value => value || null };\n\n/* The input types that block implicit submission (HTML, \"implicit\n submission\"): a form with no submit button submits on Enter only while it\n has at most one field of these. A text field here says which type it is\n through its own `type`, so it is counted the same way. */\nconst BLOCKS_IMPLICIT_SUBMISSION = new Set<string | undefined>([\n 'text', 'search', 'url', 'tel', 'email', 'password', 'date', 'month', 'week', 'time',\n 'datetime-local', 'number'\n]);\n\n// Lit's mixin pattern: the class a mixin returns is typed by the declared\n// interfaces below, so its members reach the elements built on it without the\n// anonymous class itself leaking into the published declarations.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T = object> = new (...args: any[]) => T;\n\n/** The native element a control renders and stands in for. */\ntype NativeControl = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement;\n\n/* The members a control's own code reaches are protected: they are how the\n elements built on the mixin talk to it, not part of what a page may call. */\nexport declare class FormControlInterface {\n protected _internals : ElementInternals;\n protected _formDisabled: boolean;\n protected _attempted : boolean;\n protected _fromOutside(e: MouseEvent): boolean;\n protected get _control(): NativeControl | null;\n protected _activate(): void;\n get form(): HTMLFormElement | null;\n get labels(): NodeList;\n get validity(): ValidityState;\n get validationMessage(): string;\n get willValidate(): boolean;\n checkValidity(): boolean;\n reportValidity(): boolean;\n protected _submitImplicitly(): void;\n protected _relayChange(): void;\n formDisabledCallback(disabled: boolean): void;\n formResetCallback(): void;\n protected _mirrorValidity(control: NativeControl | null | undefined): void;\n}\n\nexport declare class ValueControlInterface {\n protected _resets: number;\n value : string;\n protected _sync(): void;\n protected _defaultValue(): string;\n formStateRestoreCallback(state: string | File | FormData | null): void;\n protected _onFieldKeydown(e: KeyboardEvent): void;\n}\n\nexport const FormControl = <T extends Constructor<LitElement>>(Base: T) => {\n class FormControlElement extends Base {\n static formAssociated = true;\n\n /* Disabled as the form sees it: the control's own `disabled`, or a\n <fieldset disabled> it sits in. The platform reports both through\n formDisabledCallback. It is kept here and never written to the host's\n attribute, or a fieldset re-enabled later could not re-enable it. */\n @state() protected _formDisabled = false;\n /* A submit has been tried and found this control invalid. A native\n control turns :user-invalid then, but the native element in here has\n no form owner, so it never learns of the attempt; the `invalid` event\n the form fires at the host is how it hears. checkValidity() fires the\n same event, so a silent check counts too. Reset clears it. */\n @state() protected _attempted = false;\n protected _internals: ElementInternals;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a mixin constructor must take any[]\n constructor(...args: any[]) {\n super(...args);\n this._internals = this.attachInternals();\n this.addEventListener('invalid', () => { this._attempted = true; });\n /* An outside activation is passed on to the native control, whose own\n click then reaches this element like any other. This one stops here, so\n a click listener on the element hears one click, not two -- one\n el.click() is one click on a native control. Registered in the\n constructor, it runs before any listener the page adds. */\n this.addEventListener('click', e => {\n if (e.composedPath()[0] !== this || !this._fromOutside(e)) return;\n e.stopImmediatePropagation();\n this._activate();\n });\n }\n\n /* A click on the host itself, not on anything inside it, is one of three\n things. A <label for> pointing at this element sends one carrying the\n label's position, and el.click() an untrusted one: the two ways a native\n control is activated from outside, and both activate this one. The third\n is a real click inside the host's own box but on nothing in it -- the\n slack beside a short label when a column stretches the host -- and that\n did nothing before and still does not, or a wide row would toggle from\n across the page. */\n protected _fromOutside(e: MouseEvent) {\n if (!e.isTrusted) return true;\n const r = this.getBoundingClientRect();\n return e.clientX < r.left || e.clientX > r.right || e.clientY < r.top || e.clientY > r.bottom;\n }\n\n /** The native element inside; each control says which. */\n protected get _control(): NativeControl | null {\n return null;\n }\n\n /** What an outside activation does: a field takes focus, a checkable control overrides this to toggle. */\n protected _activate() {\n this._control?.focus();\n }\n\n get form() { return this._internals.form; }\n get labels() { return this._internals.labels; }\n get validity() { return this._internals.validity; }\n get validationMessage() { return this._internals.validationMessage; }\n get willValidate() { return this._internals.willValidate; }\n checkValidity() { return this._internals.checkValidity(); }\n reportValidity() { return this._internals.reportValidity(); }\n\n /* Enter in a native text field, checkbox, radio or switch submits its\n form -- implicit submission: the form's default button is clicked, or,\n with none, the form is submitted, unless more than one of its fields\n blocks that (BLOCKS_IMPLICIT_SUBMISSION above). Enter never toggles;\n Space does. The native control in here has no form, so the host does it.\n The default button is the form's first submit button, and a bd-button\n with type=\"submit\" is one: it is in form.elements and its type says so.\n A disabled default button means no submission, as natively. */\n protected _submitImplicitly() {\n const form = this.form;\n if (!form) return;\n const elements = [...form.elements] as Array<HTMLElement & { type?: string }>;\n const button = elements.find(el => el.type === 'submit' || el.type === 'image');\n if (button) {\n if (!button.matches(':disabled')) button.click();\n return;\n }\n const blocking = elements.filter(el => BLOCKS_IMPLICIT_SUBMISSION.has(el.type)).length;\n if (blocking <= 1) form.requestSubmit();\n }\n\n /* THE NATIVE EVENTS, AND WHICH ONE HAS TO BE SENT AGAIN.\n A control sends what its native control sends -- `input` as the value\n moves, `change` when it is committed -- with no detail: a listener reads\n event.target.value, or .checked, off the element, as it would off an\n <input>. (3.x sent bd-input and bd-change with a detail; v4 drops both,\n N8 in docs/adr/0004-web-awesome-naming.md.)\n\n The two do not leave the shadow root alike. `input` is composed, so the\n native one already reaches the page, retargeted to this element, and is\n not sent again: a second would make one keystroke two events. `change`\n is not composed and stops at the shadow root, so the element sends its\n own, once, after its state has followed the native control's. Composed,\n as `input` is, so a form handler above an enclosing component's shadow\n root hears both. */\n protected _relayChange() {\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));\n }\n\n formDisabledCallback(disabled: boolean) {\n this._formDisabled = disabled;\n }\n\n formResetCallback() {\n this._attempted = false;\n }\n\n /* The native control already knows whether it is valid, and says so in the\n browser's own words and language, so the host repeats it rather than\n re-deriving it. The control is the anchor: reportValidity() and a failed\n submit focus it and point the message at it. A disabled control is out\n of validation altogether, and says so with an empty message that\n setValidity() would refuse; the host is disabled with it. */\n protected _mirrorValidity(control: NativeControl | null | undefined) {\n if (!control?.willValidate || control.validity.valid) {\n this._internals.setValidity({});\n } else {\n this._internals.setValidity(control.validity, control.validationMessage, control);\n }\n }\n }\n return FormControlElement as unknown as Constructor<FormControlInterface> & T;\n};\n\n/**\n * What a control holding a typed or chosen value adds to FormControl --\n * bd-input, bd-textarea and bd-select.\n *\n * The `value` property is the current value and the value ATTRIBUTE is the\n * default a reset returns to, as on a native field (bd-select also takes a\n * `selected` option; see _defaultValue there). A reset also rebuilds the\n * native control -- the subclass keys it on `_resets` -- because it has to\n * forget that the reader touched it (:user-invalid), and only the form it\n * belongs to could tell it that; the control in here has none.\n *\n * class BdField extends ValueControl(LitElement) { ... }\n */\nexport const ValueControl = <T extends Constructor<LitElement>>(Base: T) => {\n class ValueControlElement extends FormControl(Base) {\n @state() protected _resets = 0;\n declare value: string;\n\n /* What a form sees: the value, and whether the native control finds it\n valid -- required, type, and anything else it checks -- in its own\n words. Called after every update, and before a field's own events, so a\n handler asking the form gets the answer for what was just typed. */\n protected _sync() {\n this._internals.setFormValue(this.value);\n this._mirrorValidity(this._control);\n }\n\n /** What a reset returns to: the value attribute, as on a native field. */\n protected _defaultValue() {\n return this.getAttribute('value') ?? '';\n }\n\n formResetCallback() {\n super.formResetCallback();\n this.value = this._defaultValue();\n this._resets++;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = state as string;\n }\n\n /* Enter in a one-line field submits its form, as from a native <input>.\n Not mid-composition: there Enter commits the IME's candidate. */\n protected _onFieldKeydown(e: KeyboardEvent) {\n if (e.key === 'Enter' && !e.isComposing) this._submitImplicitly();\n }\n }\n return ValueControlElement as unknown as Constructor<ValueControlInterface> & Constructor<FormControlInterface> & T;\n};\n\n/* ---------- the field's label and hint ----------\n bd-input, bd-select and bd-textarea draw one field: a label, the control\n and a hint under it. The copy is the page's, in two slots (contract rule 4,\n docs/adr/0003-copy-in-light-dom.md):\n\n <bd-input name=\"email\" type=\"email\" required>\n <span slot=\"label\">Email</span>\n <span slot=\"hint\">Where we send the licence.</span>\n </bd-input>\n\n Each slot is always rendered, and its wrapper hidden while it is empty, so\n an unlabelled field draws no label box and no gap.\n\n The names reach the control inside without copying any text. The label\n slot sits in the <label for> of the native control, and the hint slot in\n the box its aria-describedby names: both references stay inside this\n shadow root, and name computation reads the flattened tree, so the slotted\n words are the control's name and description. The description is only\n pointed at while the hint holds something -- an empty one would describe\n the field as nothing. ids are scoped to the shadow root, so fixed ones are\n safe.\n\n The wrappers are drawn here, once; each field writes its own <slot> into\n them, so the slots a component renders stay in its render, where\n check:manifest reads them:\n\n ${fieldLabel(this._slots, { size, required }, html`<slot name=\"label\"></slot>`)} */\n\n/** The id of the native control a field renders, which its <label for> names. */\nexport const CONTROL_ID = 'control';\n/** The id of the box around the hint slot, which aria-describedby names. */\nexport const HINT_ID = 'hint';\n/** The slots every field renders. */\nexport const FIELD_SLOTS = ['label', 'hint'] as const;\n\n/** What a field asks of the SlotController that follows its slots. */\ninterface Slots { has(name: string): boolean }\n\n/** The size step a field's label class is named for. */\ntype FieldSize = 'sm' | 'md' | 'lg';\n\n/** The field's label: its label slot, inside a <label for> the native control. */\nexport function fieldLabel(slots: Slots, { size, required }: { size: FieldSize; required: boolean }, slot: TemplateResult) {\n return html`<label\n for=${CONTROL_ID}\n part=\"label\"\n class=\"form-label label-${size}\"\n ?hidden=${!slots.has('label')}\n >${slot}${required\n ? html`<span class=\"form-label__required\" aria-hidden=\"true\">*</span>`\n : nothing}</label>`;\n}\n\n/** The field's hint: its hint slot, in the box the control is described by. */\nexport function fieldHint(slots: Slots, tone: 'default' | 'error' | 'success', slot: TemplateResult) {\n return html`<div\n id=${HINT_ID}\n part=\"hint\"\n class=\"form-help-text form-help-text--${tone}\"\n ?hidden=${!slots.has('hint')}\n >${slot}</div>`;\n}\n\n/** The control's aria-describedby: the hint, while there is one. */\nexport const describedBy = (slots: Slots) => (slots.has('hint') ? HINT_ID : nothing);\n"],"mappings":"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"}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
* The shared chrome for a form field: its label, the control itself, its three
|
|
3
3
|
* sizes, its states and its help text.
|
|
4
4
|
*
|
|
5
|
-
* bd-
|
|
6
|
-
*
|
|
5
|
+
* bd-input, bd-select and bd-textarea are one field with three kinds of
|
|
6
|
+
* control in the middle. bd-input and bd-select, with the clipboard field
|
|
7
|
+
* 3.x had, used to be three
|
|
7
8
|
* stylesheets of about 160 lines each, roughly 130 of them identical, and they
|
|
8
9
|
* had drifted: the select set its labels and help text at line-height normal
|
|
9
10
|
* where the other two used tight, and its `md` size declared 8px of vertical
|
|
10
11
|
* padding while the height formula on the line below assumed 12. Every fix had
|
|
11
12
|
* to be applied three times and demonstrably had not been.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
* bd-toggle-radio. A component imports this first and then its own sheet:
|
|
14
|
+
* A component imports this first and then its own sheet:
|
|
15
15
|
*
|
|
16
|
-
* static styles = [formFieldCSS,
|
|
16
|
+
* static styles = [formFieldCSS, selectCSS];
|
|
17
17
|
*
|
|
18
18
|
* Values come from the --form-input-* and --form-label-* component tokens
|
|
19
19
|
* rather than from the palette, which is what bd-textarea was already doing
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as e}from"lit";var t=e`:host{display:block}.input-container{flex-direction:column;display:flex}.form-label{font-family:var(--form-label-default-fontFamily);color:var(--form-label-default-color);letter-spacing:var(--form-label-default-letterSpacing);display:block}.label-sm{font-size:var(--form-label-small-fontSize);font-weight:var(--form-label-small-fontWeight);line-height:var(--form-label-small-lineHeight);letter-spacing:var(--form-label-small-letterSpacing);margin-bottom:var(--form-label-small-marginBottom)}.label-md{font-size:var(--form-label-default-fontSize);font-weight:var(--form-label-default-fontWeight);line-height:var(--form-label-default-lineHeight);margin-bottom:var(--form-label-default-marginBottom)}.label-lg{font-size:var(--form-label-large-fontSize);font-weight:var(--form-label-large-fontWeight);line-height:var(--form-label-large-lineHeight);margin-bottom:var(--form-label-large-marginBottom)}.form-label__required{color:var(--form-label-required-color);margin-inline-start:var(--form-label-required-marginLeft)}.form-input-bd{box-sizing:border-box;width:100%;font-family:var(--form-input-default-fontFamily);line-height:var(--typography-lineHeight-tight);border:var(--form-input-default-borderWidth) solid var(--form-input-default-borderColor);background-color:var(--form-input-default-backgroundColor);color:var(--form-input-default-color);transition:border-color var(--transition-duration-slow) var(--transition-easing-smooth), background-color var(--transition-duration-slow) var(--transition-easing-smooth), box-shadow var(--transition-duration-slow) var(--transition-easing-smooth);outline:none}.form-input-bd:focus-visible{border-color:var(--form-input-focus-borderColor);box-shadow:var(--focus-outline-primary);outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset)}.input-sm{padding:var(--form-input-small-padding);font-size:var(--form-input-small-fontSize);height:var(--form-input-small-height);border-radius:var(--form-input-small-borderRadius)}.input-md{padding:var(--form-input-medium-padding);font-size:var(--form-input-medium-fontSize);height:var(--form-input-medium-height);border-radius:var(--form-input-medium-borderRadius)}.input-lg{padding:var(--form-input-large-padding);font-size:var(--form-input-large-fontSize);height:var(--form-input-large-height);border-radius:var(--form-input-large-borderRadius)}.input-sm:not(textarea){padding-block:calc(var(--spacing-8) - var(--form-input-default-borderWidth))}.input-md:not(textarea){padding-block:calc(var(--spacing-12) - var(--form-input-default-borderWidth))}.input-lg:not(textarea){padding-block:calc(var(--spacing-16) - var(--form-input-default-borderWidth))}::placeholder{color:var(--color-text-subtle);opacity:1}.form-input--error::placeholder,.form-input-bd:where(:user-invalid)::placeholder,.form-input--attempted:where(:invalid)::placeholder,.form-input--success::placeholder{color:var(--color-text-muted)}.form-input--error,.form-input-bd:where(:user-invalid),.form-input--attempted:where(:invalid){background-color:var(--form-input-error-backgroundColor);border-color:var(--form-input-error-borderColor)}.form-input--success{background-color:var(--form-input-success-backgroundColor);border-color:var(--form-input-success-borderColor)}.form-input--disabled{background-color:var(--form-input-disabled-backgroundColor);border-color:var(--form-input-disabled-borderColor);color:var(--form-input-disabled-color);cursor:not-allowed}.form-help-text{font-family:var(--form-help-text-default-fontFamily);font-size:var(--form-help-text-default-fontSize);font-weight:var(--form-help-text-default-fontWeight);line-height:var(--form-help-text-default-lineHeight);letter-spacing:var(--form-help-text-default-letterSpacing);margin-top:var(--form-help-text-default-marginTop)}.form-help-text--default{color:var(--form-help-text-default-color)}.form-help-text--error,.input-container:has(.form-input--attempted:invalid) .form-help-text--default{color:var(--form-help-text-error-color)}.input-container:has(.form-input-bd:user-invalid) .form-help-text--default{color:var(--form-help-text-error-color)}.form-help-text--success{color:var(--form-help-text-success-color)}@media (prefers-reduced-motion:reduce){.form-input-bd{transition:none}}`;export{t as default,t as formFieldCSS};
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{display:block}.input-container{flex-direction:column;display:flex}.form-label[hidden],.form-help-text[hidden]{display:none}.form-label{font-family:var(--form-label-default-fontFamily);color:var(--form-label-default-color);letter-spacing:var(--form-label-default-letterSpacing);display:block}.label-sm{font-size:var(--form-label-small-fontSize);font-weight:var(--form-label-small-fontWeight);line-height:var(--form-label-small-lineHeight);letter-spacing:var(--form-label-small-letterSpacing);margin-bottom:var(--form-label-small-marginBottom)}.label-md{font-size:var(--form-label-default-fontSize);font-weight:var(--form-label-default-fontWeight);line-height:var(--form-label-default-lineHeight);margin-bottom:var(--form-label-default-marginBottom)}.label-lg{font-size:var(--form-label-large-fontSize);font-weight:var(--form-label-large-fontWeight);line-height:var(--form-label-large-lineHeight);margin-bottom:var(--form-label-large-marginBottom)}.form-label__required{color:var(--form-label-required-color);margin-inline-start:var(--form-label-required-marginLeft)}.form-input-bd{box-sizing:border-box;width:100%;font-family:var(--form-input-default-fontFamily);line-height:var(--typography-lineHeight-tight);border:var(--form-input-default-borderWidth) solid var(--form-input-default-borderColor);background-color:var(--form-input-default-backgroundColor);color:var(--form-input-default-color);transition:border-color var(--transition-duration-slow) var(--transition-easing-smooth), background-color var(--transition-duration-slow) var(--transition-easing-smooth), box-shadow var(--transition-duration-slow) var(--transition-easing-smooth);outline:none}.form-input-bd:focus-visible{border-color:var(--form-input-focus-borderColor);box-shadow:var(--focus-outline-primary);outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset)}.input-sm{padding:var(--form-input-small-padding);font-size:var(--form-input-small-fontSize);height:var(--form-input-small-height);border-radius:var(--form-input-small-borderRadius)}.input-md{padding:var(--form-input-medium-padding);font-size:var(--form-input-medium-fontSize);height:var(--form-input-medium-height);border-radius:var(--form-input-medium-borderRadius)}.input-lg{padding:var(--form-input-large-padding);font-size:var(--form-input-large-fontSize);height:var(--form-input-large-height);border-radius:var(--form-input-large-borderRadius)}.input-sm:not(textarea){padding-block:calc(var(--spacing-8) - var(--form-input-default-borderWidth))}.input-md:not(textarea){padding-block:calc(var(--spacing-12) - var(--form-input-default-borderWidth))}.input-lg:not(textarea){padding-block:calc(var(--spacing-16) - var(--form-input-default-borderWidth))}::placeholder{color:var(--color-text-subtle);opacity:1}.form-input--error::placeholder,.form-input-bd:where(:user-invalid)::placeholder,.form-input--attempted:where(:invalid)::placeholder,.form-input--success::placeholder{color:var(--color-text-muted)}.form-input--error,.form-input-bd:where(:user-invalid),.form-input--attempted:where(:invalid){background-color:var(--form-input-error-backgroundColor);border-color:var(--form-input-error-borderColor)}.form-input--success{background-color:var(--form-input-success-backgroundColor);border-color:var(--form-input-success-borderColor)}.form-input--disabled{background-color:var(--form-input-disabled-backgroundColor);border-color:var(--form-input-disabled-borderColor);color:var(--form-input-disabled-color);cursor:not-allowed}.form-help-text{font-family:var(--form-help-text-default-fontFamily);font-size:var(--form-help-text-default-fontSize);font-weight:var(--form-help-text-default-fontWeight);line-height:var(--form-help-text-default-lineHeight);letter-spacing:var(--form-help-text-default-letterSpacing);margin-top:var(--form-help-text-default-marginTop)}.form-help-text--default{color:var(--form-help-text-default-color)}.form-help-text--error,.input-container:has(.form-input--attempted:invalid) .form-help-text--default{color:var(--form-help-text-error-color)}.input-container:has(.form-input-bd:user-invalid) .form-help-text--default{color:var(--form-help-text-error-color)}.form-help-text--success{color:var(--form-help-text-success-color)}@media (prefers-reduced-motion:reduce){.form-input-bd{transition:none}}`;export{t as default,t as formFieldCSS};
|
|
2
2
|
//# sourceMappingURL=form-field.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.css.js","names":["formFieldCSS"],"sources":["../../../../src/components/shared/form-field.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/**\n * The shared chrome for a form field: its label, the control itself, its three\n * sizes, its states and its help text.\n *\n * bd-custom-input, bd-custom-dropdown and bd-custom-input-clipboard are one\n * field with three kinds of control in the middle. They used to be three\n * stylesheets of about 160 lines each, roughly 130 of them identical, and they\n * had drifted: the select set its labels and help text at line-height normal\n * where the other two used tight, and its `md` size declared 8px of vertical\n * padding while the height formula on the line below assumed 12. Every fix had\n * to be applied three times and demonstrably had not been.\n *\n * This is the same arrangement radio.css.ts already uses across bd-radio and\n * bd-toggle-radio. A component imports this first and then its own sheet:\n *\n * static styles = [formFieldCSS, dropdownCSS];\n *\n * Values come from the --form-input-* and --form-label-* component tokens\n * rather than from the palette, which is what bd-textarea was already doing\n * and what lets a single token change reach all four controls.\n */\nexport const formFieldCSS = css`\n /* No width. This used to be 90%, an arbitrary fraction that made every field\n narrower than whatever contained it and left the last tenth unexplained.\n A field is display:block and fills its container; deciding how wide that\n container is belongs to the page. */\n :host {\n display: block;\n }\n\n .input-container {\n display: flex;\n flex-direction: column;\n }\n\n /* ---- label ------------------------------------------------------------\n Driven by --form-label-*, the same tokens bd-label reads, so the field's\n built-in label and the standalone atom render identically. They did not\n before: these rules hardcoded bold where the token says medium, which is\n 200 units apart on the same line of the same form. */\n .form-label {\n display: block;\n font-family: var(--form-label-default-fontFamily);\n color: var(--form-label-default-color);\n letter-spacing: var(--form-label-default-letterSpacing);\n }\n\n .label-sm {\n font-size: var(--form-label-small-fontSize);\n font-weight: var(--form-label-small-fontWeight);\n line-height: var(--form-label-small-lineHeight);\n letter-spacing: var(--form-label-small-letterSpacing);\n margin-bottom: var(--form-label-small-marginBottom);\n }\n\n .label-md {\n font-size: var(--form-label-default-fontSize);\n font-weight: var(--form-label-default-fontWeight);\n line-height: var(--form-label-default-lineHeight);\n margin-bottom: var(--form-label-default-marginBottom);\n }\n\n .label-lg {\n font-size: var(--form-label-large-fontSize);\n font-weight: var(--form-label-large-fontWeight);\n line-height: var(--form-label-large-lineHeight);\n margin-bottom: var(--form-label-large-marginBottom);\n }\n\n .form-label__required {\n color: var(--form-label-required-color);\n margin-inline-start: var(--form-label-required-marginLeft);\n }\n\n /* ---- the control ------------------------------------------------------\n line-height is tight here and only here. The height below is derived from\n padding, type step and line-height, and bd-button derives its own from the\n same three, which is what keeps a field and a button of the same size the\n same height. At normal (1.5) the line box also stood taller than the\n content box the fixed height leaves, and the select clipped the descenders\n of its own option text. */\n .form-input-bd {\n width: 100%;\n box-sizing: border-box;\n font-family: var(--form-input-default-fontFamily);\n /* no role: tight is load-bearing here rather than chosen -- the comment\n above this rule has the argument. The height is DERIVED from padding,\n type step and this leading, so a role's leading would change the\n control's height; and an <input> renders one line, so CLAUDE.md's\n \"anything that can wrap needs at least tight\" floor is met and its\n concern does not arise. Overridden for the textarea, which does wrap:\n see textarea.css.ts. */\n line-height: var(--typography-lineHeight-tight);\n border: var(--form-input-default-borderWidth) solid var(--form-input-default-borderColor);\n background-color: var(--form-input-default-backgroundColor);\n color: var(--form-input-default-color);\n outline: none;\n transition: border-color var(--transition-duration-slow) var(--transition-easing-smooth),\n background-color var(--transition-duration-slow) var(--transition-easing-smooth),\n box-shadow var(--transition-duration-slow) var(--transition-easing-smooth);\n }\n\n /* :focus-visible, not :focus. On a text field the two agree — a browser\n shows the indicator for a pointer click there too, because typing is\n expected — but the select is a control you click and walk away from, and\n it was drawing the full ring on every mouse press where bd-button drew\n nothing. There is no .focused class any more: a field's focused prop now\n moves real focus, so :focus-visible is the only thing that draws this. */\n .form-input-bd:focus-visible {\n border-color: var(--form-input-focus-borderColor);\n box-shadow: var(--focus-outline-primary);\n /* forced-colors mode does not paint box-shadow, so the ring\n vanishes there; it does paint an outline, in a system colour. This one\n is transparent everywhere else, and the offset lands it on the ring's\n outer band. */\n outline: var(--border-width-2) solid transparent;\n outline-offset: var(--focus-outline-offset);\n }\n\n /* ---- sizes ------------------------------------------------------------\n Four reads of the size's own token, no arithmetic. The height calc used to\n live here in triplicate; it lives in --form-input-*-height now, where the\n value it produces is also the value the package publishes. */\n .input-sm {\n padding: var(--form-input-small-padding);\n font-size: var(--form-input-small-fontSize);\n height: var(--form-input-small-height);\n border-radius: var(--form-input-small-borderRadius);\n }\n\n .input-md {\n padding: var(--form-input-medium-padding);\n font-size: var(--form-input-medium-fontSize);\n height: var(--form-input-medium-height);\n border-radius: var(--form-input-medium-borderRadius);\n }\n\n .input-lg {\n padding: var(--form-input-large-padding);\n font-size: var(--form-input-large-fontSize);\n height: var(--form-input-large-height);\n border-radius: var(--form-input-large-borderRadius);\n }\n\n /* The text's own room. --form-input-*-height is padding plus the line box,\n and the box is border-box, so the 1px border on each edge came out of the\n content: the line box stood 2px taller than the space left for it. An\n input centres its line and paints into the padding, so it never showed;\n a select does neither -- it clips at the content box -- and at md the\n descenders of \"Italy gjpqy ș ț\" lost their bottoms. Taking the border out\n of the block padding instead gives the line all of its box and leaves\n every height where it was, on its button. The textarea is left out: its\n height comes from its rows, so this would only make it 2px shorter. */\n .input-sm:not(textarea) {\n padding-block: calc(var(--spacing-8) - var(--form-input-default-borderWidth));\n }\n\n .input-md:not(textarea) {\n padding-block: calc(var(--spacing-12) - var(--form-input-default-borderWidth));\n }\n\n .input-lg:not(textarea) {\n padding-block: calc(var(--spacing-16) - var(--form-input-default-borderWidth));\n }\n\n ::placeholder {\n color: var(--color-text-subtle);\n opacity: 1;\n }\n\n /* On a tinted field the placeholder takes the next step up. text-subtle on\n the error tint measured 4.22:1 and on the success tint 4.43 -- under 4.5,\n and an empty required field in error is exactly when the placeholder is\n showing. text-muted gives 5.95 and 6.25. The plain field keeps\n text-subtle (4.81). */\n .form-input--error::placeholder,\n .form-input-bd:where(:user-invalid)::placeholder,\n .form-input--attempted:where(:invalid)::placeholder,\n .form-input--success::placeholder {\n color: var(--color-text-muted);\n }\n\n /* ---- states -----------------------------------------------------------\n Error is what the browser finds, not only a flag. A control that fails\n its own constraints -- required and empty, an email that is not one --\n shows it once the reader has finished with it (:user-invalid: changed,\n then left) or once a submit has been tried (--attempted, which the host\n sets on the form's invalid event: the control in here has no form owner,\n so :user-invalid never hears of the submit). Before either, an empty\n required field is not yet an error, which is the point of :user-invalid.\n\n The invalid prop still forces the state, for what only the page\n knows -- a server's answer. :where() holds all three at one class's\n weight, so the focus border above still wins while the reader is\n correcting the field, as it always has for the prop. */\n .form-input--error,\n .form-input-bd:where(:user-invalid),\n .form-input--attempted:where(:invalid) {\n background-color: var(--form-input-error-backgroundColor);\n border-color: var(--form-input-error-borderColor);\n }\n\n .form-input--success {\n background-color: var(--form-input-success-backgroundColor);\n border-color: var(--form-input-success-borderColor);\n }\n\n .form-input--disabled {\n background-color: var(--form-input-disabled-backgroundColor);\n border-color: var(--form-input-disabled-borderColor);\n color: var(--form-input-disabled-color);\n cursor: not-allowed;\n }\n\n /* ---- help text --------------------------------------------------------\n The same roles bd-help-text renders, so a field's built-in message and the\n standalone atom agree on colour and measure. */\n .form-help-text {\n font-family: var(--form-help-text-default-fontFamily);\n font-size: var(--form-help-text-default-fontSize);\n font-weight: var(--form-help-text-default-fontWeight);\n line-height: var(--form-help-text-default-lineHeight);\n letter-spacing: var(--form-help-text-default-letterSpacing);\n margin-top: var(--form-help-text-default-marginTop);\n }\n\n .form-help-text--default {\n color: var(--form-help-text-default-color);\n }\n\n .form-help-text--error {\n color: var(--form-help-text-error-color);\n }\n\n /* Rules of their own: :has() is not forgiving, so a browser that does not\n know :user-invalid drops the whole rule it sits in -- in a list with the\n class above, it took the invalid prop's help-text colour with it, and\n beside the attempted case it would take that too. */\n .input-container:has(.form-input--attempted:invalid) .form-help-text--default {\n color: var(--form-help-text-error-color);\n }\n\n .input-container:has(.form-input-bd:user-invalid) .form-help-text--default {\n color: var(--form-help-text-error-color);\n }\n\n .form-help-text--success {\n color: var(--form-help-text-success-color);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .form-input-bd {\n transition: none;\n }\n }\n`;\n\nexport default formFieldCSS;\n"],"mappings":"A,0BAuBA,IAAaA,EAAe,CAAG,gpI"}
|
|
1
|
+
{"version":3,"file":"form-field.css.js","names":["formFieldCSS"],"sources":["../../../../src/components/shared/form-field.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/**\n * The shared chrome for a form field: its label, the control itself, its three\n * sizes, its states and its help text.\n *\n * bd-input, bd-select and bd-textarea are one field with three kinds of\n * control in the middle. bd-input and bd-select, with the clipboard field\n * 3.x had, used to be three\n * stylesheets of about 160 lines each, roughly 130 of them identical, and they\n * had drifted: the select set its labels and help text at line-height normal\n * where the other two used tight, and its `md` size declared 8px of vertical\n * padding while the height formula on the line below assumed 12. Every fix had\n * to be applied three times and demonstrably had not been.\n *\n * A component imports this first and then its own sheet:\n *\n * static styles = [formFieldCSS, selectCSS];\n *\n * Values come from the --form-input-* and --form-label-* component tokens\n * rather than from the palette, which is what bd-textarea was already doing\n * and what lets a single token change reach all four controls.\n */\nexport const formFieldCSS = css`\n /* No width. This used to be 90%, an arbitrary fraction that made every field\n narrower than whatever contained it and left the last tenth unexplained.\n A field is display:block and fills its container; deciding how wide that\n container is belongs to the page. */\n :host {\n display: block;\n }\n\n .input-container {\n display: flex;\n flex-direction: column;\n }\n\n /* The label and the hint are wrappers around the page's slots, hidden while\n their slot is empty (form-control.ts). The label sets display: block\n below, which outranks the hidden attribute's own display: none, so it is\n said again here at a weight that wins. */\n .form-label[hidden],\n .form-help-text[hidden] {\n display: none;\n }\n\n /* ---- label ------------------------------------------------------------\n Driven by --form-label-*, the same tokens bd-label reads, so the field's\n built-in label and the standalone atom render identically. They did not\n before: these rules hardcoded bold where the token says medium, which is\n 200 units apart on the same line of the same form. */\n .form-label {\n display: block;\n font-family: var(--form-label-default-fontFamily);\n color: var(--form-label-default-color);\n letter-spacing: var(--form-label-default-letterSpacing);\n }\n\n .label-sm {\n font-size: var(--form-label-small-fontSize);\n font-weight: var(--form-label-small-fontWeight);\n line-height: var(--form-label-small-lineHeight);\n letter-spacing: var(--form-label-small-letterSpacing);\n margin-bottom: var(--form-label-small-marginBottom);\n }\n\n .label-md {\n font-size: var(--form-label-default-fontSize);\n font-weight: var(--form-label-default-fontWeight);\n line-height: var(--form-label-default-lineHeight);\n margin-bottom: var(--form-label-default-marginBottom);\n }\n\n .label-lg {\n font-size: var(--form-label-large-fontSize);\n font-weight: var(--form-label-large-fontWeight);\n line-height: var(--form-label-large-lineHeight);\n margin-bottom: var(--form-label-large-marginBottom);\n }\n\n .form-label__required {\n color: var(--form-label-required-color);\n margin-inline-start: var(--form-label-required-marginLeft);\n }\n\n /* ---- the control ------------------------------------------------------\n line-height is tight here and only here. The height below is derived from\n padding, type step and line-height, and bd-button derives its own from the\n same three, which is what keeps a field and a button of the same size the\n same height. At normal (1.5) the line box also stood taller than the\n content box the fixed height leaves, and the select clipped the descenders\n of its own option text. */\n .form-input-bd {\n width: 100%;\n box-sizing: border-box;\n font-family: var(--form-input-default-fontFamily);\n /* no role: tight is load-bearing here rather than chosen -- the comment\n above this rule has the argument. The height is DERIVED from padding,\n type step and this leading, so a role's leading would change the\n control's height; and an <input> renders one line, so CLAUDE.md's\n \"anything that can wrap needs at least tight\" floor is met and its\n concern does not arise. Overridden for the textarea, which does wrap:\n see textarea.css.ts. */\n line-height: var(--typography-lineHeight-tight);\n border: var(--form-input-default-borderWidth) solid var(--form-input-default-borderColor);\n background-color: var(--form-input-default-backgroundColor);\n color: var(--form-input-default-color);\n outline: none;\n transition: border-color var(--transition-duration-slow) var(--transition-easing-smooth),\n background-color var(--transition-duration-slow) var(--transition-easing-smooth),\n box-shadow var(--transition-duration-slow) var(--transition-easing-smooth);\n }\n\n /* :focus-visible, not :focus. On a text field the two agree — a browser\n shows the indicator for a pointer click there too, because typing is\n expected — but the select is a control you click and walk away from, and\n it was drawing the full ring on every mouse press where bd-button drew\n nothing. There is no .focused class any more: a field's focused prop now\n moves real focus, so :focus-visible is the only thing that draws this. */\n .form-input-bd:focus-visible {\n border-color: var(--form-input-focus-borderColor);\n box-shadow: var(--focus-outline-primary);\n /* forced-colors mode does not paint box-shadow, so the ring\n vanishes there; it does paint an outline, in a system colour. This one\n is transparent everywhere else, and the offset lands it on the ring's\n outer band. */\n outline: var(--border-width-2) solid transparent;\n outline-offset: var(--focus-outline-offset);\n }\n\n /* ---- sizes ------------------------------------------------------------\n Four reads of the size's own token, no arithmetic. The height calc used to\n live here in triplicate; it lives in --form-input-*-height now, where the\n value it produces is also the value the package publishes. */\n .input-sm {\n padding: var(--form-input-small-padding);\n font-size: var(--form-input-small-fontSize);\n height: var(--form-input-small-height);\n border-radius: var(--form-input-small-borderRadius);\n }\n\n .input-md {\n padding: var(--form-input-medium-padding);\n font-size: var(--form-input-medium-fontSize);\n height: var(--form-input-medium-height);\n border-radius: var(--form-input-medium-borderRadius);\n }\n\n .input-lg {\n padding: var(--form-input-large-padding);\n font-size: var(--form-input-large-fontSize);\n height: var(--form-input-large-height);\n border-radius: var(--form-input-large-borderRadius);\n }\n\n /* The text's own room. --form-input-*-height is padding plus the line box,\n and the box is border-box, so the 1px border on each edge came out of the\n content: the line box stood 2px taller than the space left for it. An\n input centres its line and paints into the padding, so it never showed;\n a select does neither -- it clips at the content box -- and at md the\n descenders of \"Italy gjpqy ș ț\" lost their bottoms. Taking the border out\n of the block padding instead gives the line all of its box and leaves\n every height where it was, on its button. The textarea is left out: its\n height comes from its rows, so this would only make it 2px shorter. */\n .input-sm:not(textarea) {\n padding-block: calc(var(--spacing-8) - var(--form-input-default-borderWidth));\n }\n\n .input-md:not(textarea) {\n padding-block: calc(var(--spacing-12) - var(--form-input-default-borderWidth));\n }\n\n .input-lg:not(textarea) {\n padding-block: calc(var(--spacing-16) - var(--form-input-default-borderWidth));\n }\n\n ::placeholder {\n color: var(--color-text-subtle);\n opacity: 1;\n }\n\n /* On a tinted field the placeholder takes the next step up. text-subtle on\n the error tint measured 4.22:1 and on the success tint 4.43 -- under 4.5,\n and an empty required field in error is exactly when the placeholder is\n showing. text-muted gives 5.95 and 6.25. The plain field keeps\n text-subtle (4.81). */\n .form-input--error::placeholder,\n .form-input-bd:where(:user-invalid)::placeholder,\n .form-input--attempted:where(:invalid)::placeholder,\n .form-input--success::placeholder {\n color: var(--color-text-muted);\n }\n\n /* ---- states -----------------------------------------------------------\n Error is what the browser finds, not only a flag. A control that fails\n its own constraints -- required and empty, an email that is not one --\n shows it once the reader has finished with it (:user-invalid: changed,\n then left) or once a submit has been tried (--attempted, which the host\n sets on the form's invalid event: the control in here has no form owner,\n so :user-invalid never hears of the submit). Before either, an empty\n required field is not yet an error, which is the point of :user-invalid.\n\n The invalid prop still forces the state, for what only the page\n knows -- a server's answer. :where() holds all three at one class's\n weight, so the focus border above still wins while the reader is\n correcting the field, as it always has for the prop. */\n .form-input--error,\n .form-input-bd:where(:user-invalid),\n .form-input--attempted:where(:invalid) {\n background-color: var(--form-input-error-backgroundColor);\n border-color: var(--form-input-error-borderColor);\n }\n\n .form-input--success {\n background-color: var(--form-input-success-backgroundColor);\n border-color: var(--form-input-success-borderColor);\n }\n\n .form-input--disabled {\n background-color: var(--form-input-disabled-backgroundColor);\n border-color: var(--form-input-disabled-borderColor);\n color: var(--form-input-disabled-color);\n cursor: not-allowed;\n }\n\n /* ---- help text --------------------------------------------------------\n The same roles bd-hint renders, so a field's built-in message and the\n standalone atom agree on colour and measure. */\n .form-help-text {\n font-family: var(--form-help-text-default-fontFamily);\n font-size: var(--form-help-text-default-fontSize);\n font-weight: var(--form-help-text-default-fontWeight);\n line-height: var(--form-help-text-default-lineHeight);\n letter-spacing: var(--form-help-text-default-letterSpacing);\n margin-top: var(--form-help-text-default-marginTop);\n }\n\n .form-help-text--default {\n color: var(--form-help-text-default-color);\n }\n\n .form-help-text--error {\n color: var(--form-help-text-error-color);\n }\n\n /* Rules of their own: :has() is not forgiving, so a browser that does not\n know :user-invalid drops the whole rule it sits in -- in a list with the\n class above, it took the invalid prop's help-text colour with it, and\n beside the attempted case it would take that too. */\n .input-container:has(.form-input--attempted:invalid) .form-help-text--default {\n color: var(--form-help-text-error-color);\n }\n\n .input-container:has(.form-input-bd:user-invalid) .form-help-text--default {\n color: var(--form-help-text-error-color);\n }\n\n .form-help-text--success {\n color: var(--form-help-text-success-color);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .form-input-bd {\n transition: none;\n }\n }\n`;\n\nexport default formFieldCSS;\n"],"mappings":"A,0BAuBA,IAAaA,EAAe,CAAG,ysI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Holds everything under `root` still: media paused and kept from
|
|
3
|
+
* autoplaying, `paused` components paused, embeds unloaded. Resolves once
|
|
4
|
+
* what the components under it rendered has been reached as well.
|
|
5
|
+
*/
|
|
6
|
+
export declare function hold(root: Element): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Lets `root` go: every element under it that hold() changed is put back as
|
|
9
|
+
* the page wrote it, except under a root inside it that is still held. A
|
|
10
|
+
* root inside another held root is let go with that one.
|
|
11
|
+
*/
|
|
12
|
+
export declare function release(root: Element): void;
|
|
13
|
+
/** Whether `root` is held. */
|
|
14
|
+
export declare const isHeld: (root: Element) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=`about:blank`,t=/* @__PURE__ */ new WeakMap,n=/* @__PURE__ */ new WeakSet,r=/* @__PURE__ */ new WeakMap,i=e=>e.localName.includes(`-`)&&`paused`in e,a=e=>e.parentElement??e.parentNode?.host??null;function*o(e,t=()=>!1){yield e;for(let n of e.shadowRoot?[e,e.shadowRoot]:[e])for(let e of n.children)t(e)||(yield*o(e,t))}function s(n){let r=t.get(n);if(n instanceof HTMLMediaElement)r?n.autoplay&&(r.autoplay=!0):t.set(n,{autoplay:n.autoplay}),n.autoplay=!1,n.pause();else if(n instanceof HTMLIFrameElement){let i=n.getAttribute(`src`),a=n.getAttribute(`srcdoc`);r?(i!==e&&(r.src=i),a!==null&&(r.srcdoc=a)):t.set(n,{src:i,srcdoc:a}),n.removeAttribute(`srcdoc`),i!==e&&n.setAttribute(`src`,e)}else i(n)&&(r||t.set(n,{paused:n.paused}),n.paused=!0)}function c(e){let n=t.get(e);n&&(t.delete(e),e instanceof HTMLMediaElement?(e.autoplay=n.autoplay??!1,n.autoplay&&e.play().catch(()=>{})):e instanceof HTMLIFrameElement?(n.srcdoc!=null&&e.setAttribute(`srcdoc`,n.srcdoc),n.src==null?e.removeAttribute(`src`):e.setAttribute(`src`,n.src)):i(e)&&(e.paused=n.paused??!1))}var l=e=>!!e.isUpdatePending;function u(e,t){let i=r.get(e)??/* @__PURE__ */ new Set;r.set(e,i);let a=new WeakRef(e);for(let e of t){let t=e.localName,o=!!customElements.get(t);i.has(t)||!e.matches(`:not(:defined)`)||o&&!e.isConnected||(i.add(t),customElements.whenDefined(t).then(()=>{let e=a.deref();e&&(o||r.get(e)?.delete(t),n.has(e)&&f(e))}))}}function d(e){for(let t=a(e);t;t=a(t))if(n.has(t))return!0;return!1}async function f(e){n.add(e);for(let t=0;t<3;t++){if(!n.has(e))return;let t=[...o(e)];t.forEach(s),u(e,t);let r=t.filter(l);if(!r.length)return;await Promise.all(r.map(e=>e.updateComplete.catch(()=>{})))}}function p(e){if(n.has(e)&&(n.delete(e),!d(e)))for(let t of o(e,e=>n.has(e)))c(t)}var m=e=>n.has(e);export{f as hold,m as isHeld,p as release};
|
|
2
|
+
//# sourceMappingURL=hold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hold.js","names":["BLANK","records","roots","waiting","pausable","el","composedParent","composedTree","scope","child","skip","holdOne","was","src","srcdoc","releaseOne","updating","awaitDefinitions","tags","root","ref","all","tag","defined","held","hold","inHeld","round","pending","release","isHeld"],"sources":["../../../../src/components/shared/hold.ts"],"sourcesContent":["import type { ReactiveElement } from 'lit';\n\n/**\n * Holding a part of the page still while it is out of sight, and letting it\n * go when it comes back.\n *\n * hold(panel); // its media paused, its `paused` components paused, its embeds unloaded\n * release(panel); // each put back as the page wrote it\n *\n * Hidden is not stopped. A panel a tab group keeps laid out but not shown --\n * so the group holds the tallest panel's height -- still plays the video in\n * it from the moment the page opens, and an intro that waits to be on screen\n * runs where nobody sees it and is over by the time the tab is opened. So a\n * hidden panel is held:\n *\n * - a <video> or <audio> is paused and kept from autoplaying;\n * - every component that moves on its own -- this package spells that\n * `paused`: bd-hero, bd-logo-marquee, bd-motion-art, bd-pagination-dots --\n * is paused;\n * - an embed (<iframe>) is unloaded instead: it is a page from another\n * origin, which no script here can pause, so a bd-video-player whose\n * YouTube URL asks for autoplay played in a tab nobody had opened. A\n * frame's box is its own CSS, not its document's, so the height holds\n * without it. Images stay: their size is their file's.\n *\n * release() puts back what hold() changed and nothing else. An unloaded frame\n * gets its own src (or srcdoc) again, so it loads afresh; a medium the page\n * wrote with `autoplay` gets it back and plays, as it would have on a page\n * that opened on it; one without stays paused, whoever started it before; a\n * component the page had paused itself stays paused. Nothing autoplays that\n * the page did not ask to.\n *\n * Both walk the composed tree -- the light DOM and every open shadow root\n * under it -- because the media a component renders are in its shadow root.\n * Components render after they upgrade, so what they render is reached a\n * round later: hold() goes round again while anything it found has an update\n * pending, up to three rounds, and stops early once the root is released.\n * Calling hold() again on a held root holds what arrived since; what was held\n * already keeps the state it was first held from, so release() restores the\n * page's, not the hold's.\n *\n * A component that is not defined yet has no `paused` and has rendered\n * nothing, and its definition arriving is no mutation anyone hears: the\n * loader defines each tag when its module lands, often after the panel it\n * sits in was held. So hold() waits for the definition of every undefined\n * custom element it passes, and holds the root again once it arrives, which\n * reaches the upgraded component and, a round later, what it renders.\n *\n * Held roots nest -- a tab group in a tab group's panel. A release reaches no\n * further than the next root still held, and a root released inside a root\n * that is still held is let go only when the outer one is.\n */\n\n/* What one element was before hold() changed it. */\ninterface Record {\n autoplay?: boolean;\n src? : string | null;\n srcdoc? : string | null;\n paused? : boolean;\n}\n\nconst BLANK = 'about:blank';\nconst records = new WeakMap<Element, Record>();\nconst roots = new WeakSet<Element>();\n/* The tags each held root waits to see defined, so holding it again -- a tab\n group does on every change inside a held panel -- does not wait twice. */\nconst waiting = new WeakMap<Element, Set<string>>();\n\ntype Pausable = Element & { paused: boolean };\nconst pausable = (el: Element): el is Pausable => el.localName.includes('-') && 'paused' in el;\n\n/* The element after `el` in the composed tree going up: its parent, or the\n host of the shadow root it is in. */\nconst composedParent = (el: Element): Element | null => el.parentElement\n ?? ((el.parentNode as ShadowRoot | null)?.host ?? null);\n\n/** `el`, everything under it and everything in the open shadow roots below, skipping the subtrees `skip` says no to. */\nfunction* composedTree(el: Element, skip: (el: Element) => boolean = () => false): Generator<Element> {\n yield el;\n for (const scope of el.shadowRoot ? [el, el.shadowRoot] : [el]) {\n for (const child of scope.children) {\n if (!skip(child)) yield* composedTree(child, skip);\n }\n }\n}\n\nfunction holdOne(el: Element) {\n const was = records.get(el);\n if (el instanceof HTMLMediaElement) {\n // a page that sets autoplay while the element is held is asking for it once it shows\n if (!was) records.set(el, { autoplay: el.autoplay });\n else if (el.autoplay) was.autoplay = true;\n el.autoplay = false;\n el.pause();\n } else if (el instanceof HTMLIFrameElement) {\n const src = el.getAttribute('src');\n const srcdoc = el.getAttribute('srcdoc');\n // a src or srcdoc the page wrote while it was held is the one it comes back to\n if (!was) records.set(el, { src, srcdoc });\n else {\n if (src !== BLANK) was.src = src;\n if (srcdoc !== null) was.srcdoc = srcdoc;\n }\n // srcdoc outranks src, so it goes first\n el.removeAttribute('srcdoc');\n if (src !== BLANK) el.setAttribute('src', BLANK);\n } else if (pausable(el)) {\n if (!was) records.set(el, { paused: el.paused });\n el.paused = true;\n }\n}\n\nfunction releaseOne(el: Element) {\n const was = records.get(el);\n if (!was) return;\n records.delete(el);\n if (el instanceof HTMLMediaElement) {\n el.autoplay = was.autoplay ?? false;\n // a play() the browser refuses -- an unmuted autoplay -- is the page's to handle\n if (was.autoplay) el.play().catch(() => {});\n } else if (el instanceof HTMLIFrameElement) {\n if (was.srcdoc != null) el.setAttribute('srcdoc', was.srcdoc);\n if (was.src == null) el.removeAttribute('src');\n else el.setAttribute('src', was.src);\n } else if (pausable(el)) {\n el.paused = was.paused ?? false;\n }\n}\n\nconst updating = (el: Element): el is ReactiveElement => Boolean((el as Partial<ReactiveElement>).isUpdatePending);\n\n/* Holds `root` again once each custom element under it that is not defined\n yet is. The root is reached through a WeakRef: a tag that is never defined\n leaves its promise pending for good, and it must not keep a panel the page\n has dropped alive with it. */\nfunction awaitDefinitions(root: Element, all: Element[]) {\n const tags = waiting.get(root) ?? new Set<string>();\n waiting.set(root, tags);\n const ref = new WeakRef(root);\n for (const el of all) {\n const tag = el.localName;\n /* An element of a tag already defined that is still undefined is either\n about to upgrade or never will. In the page it is about to: innerHTML\n inserts a tree whole, and a tab group holds its hidden panel from its\n own connectedCallback, before the elements after it in tree order have\n upgraded, so the wait -- which resolves at once -- holds it a round\n later. Out of the page it never will, since a detached element is not\n upgraded, so it is not waited on: waiting would resolve at once and\n hold again, for ever -- a tab panel removed before the store's\n elements were defined did that. A defined tag is waited on once per\n root, for the same reason: an element whose upgrade failed stays\n undefined in the page. */\n const defined = Boolean(customElements.get(tag));\n if (tags.has(tag) || !el.matches(':not(:defined)') || (defined && !el.isConnected)) continue;\n tags.add(tag);\n void customElements.whenDefined(tag).then(() => {\n const held = ref.deref();\n if (!held) return;\n if (!defined) waiting.get(held)?.delete(tag);\n if (roots.has(held)) void hold(held);\n });\n }\n}\n\n/** Whether `root` is inside another root that is still held. */\nfunction inHeld(root: Element) {\n for (let el = composedParent(root); el; el = composedParent(el)) if (roots.has(el)) return true;\n return false;\n}\n\n/**\n * Holds everything under `root` still: media paused and kept from\n * autoplaying, `paused` components paused, embeds unloaded. Resolves once\n * what the components under it rendered has been reached as well.\n */\nexport async function hold(root: Element): Promise<void> {\n roots.add(root);\n for (let round = 0; round < 3; round++) {\n if (!roots.has(root)) return;\n const all = [...composedTree(root)];\n all.forEach(holdOne);\n awaitDefinitions(root, all);\n const pending = all.filter(updating);\n if (!pending.length) return;\n await Promise.all(pending.map(el => el.updateComplete.catch(() => {})));\n }\n}\n\n/**\n * Lets `root` go: every element under it that hold() changed is put back as\n * the page wrote it, except under a root inside it that is still held. A\n * root inside another held root is let go with that one.\n */\nexport function release(root: Element): void {\n if (!roots.has(root)) return;\n roots.delete(root);\n if (inHeld(root)) return;\n for (const el of composedTree(root, child => roots.has(child))) releaseOne(el);\n}\n\n/** Whether `root` is held. */\nexport const isHeld = (root: Element): boolean => roots.has(root);\n"],"mappings":"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"}
|
|
@@ -1,39 +1,102 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The words a component prop is allowed to use
|
|
2
|
+
* The words a component prop is allowed to use.
|
|
3
3
|
*
|
|
4
|
-
* Three axes, three names, and each name means one thing everywhere
|
|
4
|
+
* Three axes, three names, and each name means one thing everywhere (N6,
|
|
5
|
+
* docs/adr/0004-web-awesome-naming.md):
|
|
5
6
|
*
|
|
6
|
-
* size
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* size how big sm · md · lg
|
|
8
|
+
* appearance how it looks primary, bullet, shade — per component
|
|
9
|
+
* variant what it means neutral · brand · success · warning · error · info
|
|
10
|
+
*
|
|
11
|
+
* The look and the meaning share no value, and no set keeps a legacy alias:
|
|
12
|
+
* a v4 tag reads these spellings and nothing else. A value outside its set,
|
|
13
|
+
* an old one included (`size="small"`, `kind="primary"`), is repaired to the
|
|
14
|
+
* default in willUpdate (isOneOf), the same as a typo. Translating a 3.x
|
|
15
|
+
* spelling is scripts/codemod-v4.mjs's job, done once in the page's markup,
|
|
16
|
+
* not every component's on every render.
|
|
9
17
|
*
|
|
10
18
|
* Before this there were three size vocabularies and `kind` meant four
|
|
11
19
|
* unrelated things: the visual variant on bd-button and bd-link, the size on
|
|
12
20
|
* the three form fields, the type step on bd-p and the marker on bd-li. An
|
|
13
21
|
* author could not carry anything learned on one atom to the next.
|
|
14
22
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
23
|
+
* 3.x spelled the look `variant` and the meaning `tone`; v4 takes Web
|
|
24
|
+
* Awesome's split. The tags move one family at a time, so until the last
|
|
25
|
+
* family lands a tag is on one spelling or the other -- see axesFor().
|
|
18
26
|
*/
|
|
19
27
|
/** The one size scale. */
|
|
20
28
|
export declare const SIZES: readonly ["sm", "md", "lg"];
|
|
21
29
|
export type Size = typeof SIZES[number];
|
|
22
30
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
31
|
+
* The closed set of meanings. A meaning says what something is telling the
|
|
32
|
+
* reader, not how it looks, so it is one set for every component: bd-badge
|
|
33
|
+
* and bd-tag take all six, bd-callout and bd-progress-bar a subset. It was spelled
|
|
34
|
+
* out in each of them; this is the declaration `check:enum-vocabulary` reads.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TONES: readonly ["neutral", "brand", "success", "warning", "error", "info"];
|
|
37
|
+
export type Tone = typeof TONES[number];
|
|
38
|
+
/**
|
|
39
|
+
* The names a slot may take (N7): the closed set, so `title` means the
|
|
40
|
+
* heading in every component and nobody spells it `heading`, `headline` or
|
|
41
|
+
* `header` again. '' is the default slot, which holds a container's items.
|
|
42
|
+
* `start` and `end` hold decorations before and after a label, `label` and
|
|
43
|
+
* `hint` a form control's words, `media` / `actions` / `footer` the parts a
|
|
44
|
+
* card or a section shows around its copy.
|
|
45
|
+
*
|
|
46
|
+
* The naming rules in `check:element-api` fail a slot outside this set that
|
|
47
|
+
* COMPONENT_SLOTS does not register for its tag. 3.x's names are frozen in
|
|
48
|
+
* scripts/naming.baseline.json and leave it as each phase renames or
|
|
49
|
+
* registers them.
|
|
50
|
+
*/
|
|
51
|
+
export declare const SLOT_NAMES: readonly ["", "eyebrow", "title", "description", "caption", "badge", "icon", "media", "actions", "footer", "start", "end", "label", "hint"];
|
|
52
|
+
export type SlotName = typeof SLOT_NAMES[number];
|
|
53
|
+
/**
|
|
54
|
+
* A slot name only one component needs, keyed by tag, each with the reason
|
|
55
|
+
* the vocabulary has no word for it. Register a name only when the slot holds
|
|
56
|
+
* a part SLOT_NAMES cannot say -- a second collection beside the default
|
|
57
|
+
* slot's items, or a part with no counterpart elsewhere -- never to keep a
|
|
58
|
+
* 3.x name. A registered name the tag no longer renders fails as well, so
|
|
59
|
+
* this cannot outlive the slot it explains.
|
|
60
|
+
*/
|
|
61
|
+
export declare const COMPONENT_SLOTS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
62
|
+
/**
|
|
63
|
+
* Which property names carry the look and which carry the meaning -- the one
|
|
64
|
+
* place that says so. `check:enum-vocabulary` fails a look property that
|
|
65
|
+
* allows a meaning value, and a meaning property that allows anything outside
|
|
66
|
+
* TONES, so the two vocabularies stay disjoint and an old `variant="primary"`
|
|
67
|
+
* cannot pass for a meaning.
|
|
68
|
+
*
|
|
69
|
+
* 3.x's, which the families of the later phases still declare until they
|
|
70
|
+
* move: the look is `variant` (or `kind`) and the meaning is `tone`.
|
|
71
|
+
*/
|
|
72
|
+
export declare const PROP_AXES_V3: {
|
|
73
|
+
readonly look: readonly ["variant", "kind"];
|
|
74
|
+
readonly meaning: readonly ["tone"];
|
|
75
|
+
};
|
|
76
|
+
/** v4's (N6): the look is `appearance` and the meaning is `variant`. */
|
|
77
|
+
export declare const PROP_AXES_V4: {
|
|
78
|
+
readonly look: readonly ["appearance"];
|
|
79
|
+
readonly meaning: readonly ["variant"];
|
|
80
|
+
};
|
|
81
|
+
export type PropAxes = typeof PROP_AXES_V3 | typeof PROP_AXES_V4;
|
|
82
|
+
/**
|
|
83
|
+
* The axes one tag is read with, from the names of the properties it
|
|
84
|
+
* declares. A tag that declares `appearance` has moved to v4, so its
|
|
85
|
+
* `variant` is the meaning; any other tag is still on 3.x's names, where
|
|
86
|
+
* `variant` is the look. The same word means opposite things on the two
|
|
87
|
+
* sides, which is why the rule is per tag rather than one constant while the
|
|
88
|
+
* families move (v4 phases 1-7). Once every tag is on v4 this is
|
|
89
|
+
* PROP_AXES_V4 for all of them, and PROP_AXES_V3 goes.
|
|
26
90
|
*/
|
|
27
|
-
export declare
|
|
91
|
+
export declare function axesFor(properties: Iterable<string>): PropAxes;
|
|
28
92
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
93
|
+
* A prop value if its closed set has it, else the fallback. Returning the
|
|
94
|
+
* fallback rather than the raw value is what stops a typo rendering an
|
|
95
|
+
* unstyled component. There is no legacy map to consult first: an old
|
|
96
|
+
* spelling is a value outside the set like any other (N6).
|
|
33
97
|
*/
|
|
34
|
-
export declare function resolveEnum<T extends string, F = T>(value: unknown, { allowed,
|
|
98
|
+
export declare function resolveEnum<T extends string, F = T>(value: unknown, { allowed, fallback }: {
|
|
35
99
|
allowed: readonly T[];
|
|
36
|
-
legacy?: Readonly<Record<string, T>>;
|
|
37
100
|
fallback: F;
|
|
38
101
|
}): T | F;
|
|
39
102
|
/**
|
|
@@ -42,5 +105,3 @@ export declare function resolveEnum<T extends string, F = T>(value: unknown, { a
|
|
|
42
105
|
* willUpdate; this is the check they repair on.
|
|
43
106
|
*/
|
|
44
107
|
export declare const isOneOf: <T extends string>(set: readonly T[], value: unknown) => value is T;
|
|
45
|
-
/** The common case: a size prop, with the old spellings still accepted. */
|
|
46
|
-
export declare const resolveSize: (value: unknown, fallback?: Size) => Size;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=[`sm`,`md`,`lg`],t={small:`sm`,medium:`md`,default:`md`,large:`lg`};function n(e,{allowed:t,legacy:n={},fallback:r}){let i=Object.hasOwn(n,e)?n[e]:e;return t.includes(i)?i:r}var r=(e,t)=>e.includes(t),i=(r,i=`md`)=>n(r,{allowed:e,legacy:t,fallback:i});export{t as LEGACY_SIZES,e as SIZES,r as isOneOf,n as resolveEnum,i as resolveSize};
|
|
1
|
+
var e=[`sm`,`md`,`lg`],t=[`neutral`,`brand`,`success`,`warning`,`error`,`info`],n=[``,`eyebrow`,`title`,`description`,`caption`,`badge`,`icon`,`media`,`actions`,`footer`,`start`,`end`,`label`,`hint`],r={"bd-agent-endpoints":{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`,assistants:`the second row of links, one per assistant; a collection of its own beside the endpoints`},"bd-article":{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`,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",toc:`the article's one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg`,newsletter:`the signup the article draws after its body in the main column, which the sidebar does not run beside`,related:`the article's related links, after its tags and a divider, a region of its own beside the body`},"bd-bar-chart-item":{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`},"bd-carousel-item":{"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`,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`},"bd-code":{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>`,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`},"bd-comparison-panel":{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`,negative:`the items of the column that says what the thing is not, each crossed; the second collection`,"positive-title":`the positive column's own heading; the panel's title heads both columns`,"negative-title":`the negative column's own heading; the panel's title heads both columns`},"bd-fact":{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`},"bd-footer":{logo:`the brand's wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy`,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`,nav:`the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot`,"quick-links":`the bd-footer-group columns of links; a collection of its own beside the social links and the navigations`,"social-links":`the links to the brand's social networks, drawn as their logos; a second collection of links beside the groups`,"secondary-nav":`the legal and policy bd-footer-nav beside the address; the second of the two navigations`,address:`the office's postal address beside the secondary nav; no word of the vocabulary names an address`,copyright:`the copyright line that opens the footer's last row; a legal notice, not a caption of anything`,anpc:`the Romanian consumer authority's ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for`,"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`},"bd-install-option":{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`,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`,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`},"bd-install-options":{"works-in":`the harnesses the options run in, one bd-tag each; a second collection beside the default slot's options`,"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`,"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`,"prompt-description":`the paragraph under the prompt panel's heading; the section's description is the one under its title`,"prompt-label":`the small label above the prompt block, naming what the block is ("Prompt for your agent")`,prompt:`the prompt itself, the words the panel shows and its Copy button copies`,"prompt-note":`the warning-style note under the prompt`,copy:`the prompt panel's Copy button's words and so its name ("Copy"), as bd-install-option's copy is for its command`,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`},"bd-newsletter-signup":{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`,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`,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`,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`},"bd-partner-banner":{lockup:`the partner's and Bitdefender's logos side by side over the photo; a co-brand mark no word of the vocabulary names`},"bd-post-card":{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`,"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`},"bd-pricing-card":{banner:'the highlighted card\'s ribbon above its top edge ("Best value"), drawn only with `highlight`',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`},"bd-pricing-price":{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`,discount:`the discount's bd-badge beside the full price ("Save 44%"); a figure of its own, not the card's badge`,period:`the price's billing unit after it ("/year", "/month"); not a caption`},"bd-product-hero":{"product-name":`the product's name, a kicker above the title in the heading-h4 role; the title is the promise, not the product`,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`,"cta-secondary":`the second button's words, drawn when cta-secondary-href is set`},"bd-product-upsell":{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`},"bd-quick-answer":{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`},"bd-report-promo":{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`},"bd-review":{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`},"bd-spotlight":{"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)"},"bd-stat":{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`},"bd-terminal-hero":{breadcrumb:`the page's bd-breadcrumb above the eyebrow, the hero's own trail`,"annotation-top":`a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part`,"annotation-bottom":`a note pinned below the terminal, on its bottom edge; the second of the pair`,meta:`the mono spec line that opens the facts row; a line of its own above the facts, not their caption`,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`},"bd-tooltip":{content:`the bubble's words; a tooltip has a trigger and what it says about it, not a title or a description`},"bd-trust-panel":{stats:`a second collection beside the cards in the default slot: the bd-fact statistics row above them`}},i={look:[`variant`,`kind`],meaning:[`tone`]},a={look:[`appearance`],meaning:[`variant`]};function o(e){for(let t of e)if(t===`appearance`)return a;return i}function s(e,{allowed:t,fallback:n}){return c(t,e)?e:n}var c=(e,t)=>e.includes(t);export{r as COMPONENT_SLOTS,i as PROP_AXES_V3,a as PROP_AXES_V4,e as SIZES,n as SLOT_NAMES,t as TONES,o as axesFor,c as isOneOf,s as resolveEnum};
|
|
2
2
|
//# sourceMappingURL=prop-vocabulary.js.map
|