@repobit/dex-system-design 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/src/_bundled/oxc-project_runtime/helpers/esm/decorate.js +1 -0
- package/dist/src/components/accordion/accordion-bg.css.js +1 -288
- package/dist/src/components/accordion/accordion-bg.css.js.map +1 -1
- package/dist/src/components/accordion/accordion-bg.d.ts +5 -5
- package/dist/src/components/accordion/accordion-bg.js +15 -210
- package/dist/src/components/accordion/accordion-bg.js.map +1 -1
- package/dist/src/components/accordion/accordion-keyboard.js +1 -89
- package/dist/src/components/accordion/accordion-keyboard.js.map +1 -1
- package/dist/src/components/accordion/accordion-panel.js +1 -22
- package/dist/src/components/accordion/accordion-panel.js.map +1 -1
- package/dist/src/components/accordion/accordion.css.js +1 -380
- package/dist/src/components/accordion/accordion.css.js.map +1 -1
- package/dist/src/components/accordion/accordion.d.ts +7 -7
- package/dist/src/components/accordion/accordion.js +16 -138
- package/dist/src/components/accordion/accordion.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js +1 -88
- package/dist/src/components/agent-endpoints/agent-endpoints.css.js.map +1 -1
- package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +4 -4
- package/dist/src/components/agent-endpoints/agent-endpoints.js +17 -76
- package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
- package/dist/src/components/alert/alert.css.js +1 -217
- package/dist/src/components/alert/alert.css.js.map +1 -1
- package/dist/src/components/alert/alert.d.ts +4 -4
- package/dist/src/components/alert/alert.js +6 -110
- package/dist/src/components/alert/alert.js.map +1 -1
- package/dist/src/components/anchor/anchor-nav.css.js +1 -546
- package/dist/src/components/anchor/anchor-nav.css.js.map +1 -1
- package/dist/src/components/anchor/anchor-nav.d.ts +4 -4
- package/dist/src/components/anchor/anchor-nav.js +23 -567
- package/dist/src/components/anchor/anchor-nav.js.map +1 -1
- package/dist/src/components/annotation/annotation.css.js +1 -64
- package/dist/src/components/annotation/annotation.css.js.map +1 -1
- package/dist/src/components/annotation/annotation.d.ts +2 -2
- package/dist/src/components/annotation/annotation.js +7 -72
- package/dist/src/components/annotation/annotation.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.css.js +1 -122
- package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.d.ts +2 -2
- package/dist/src/components/audience-card/audience-card.js +8 -83
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/avatar/avatar.css.js +1 -65
- package/dist/src/components/avatar/avatar.css.js.map +1 -1
- package/dist/src/components/avatar/avatar.d.ts +3 -3
- package/dist/src/components/avatar/avatar.js +6 -76
- package/dist/src/components/avatar/avatar.js.map +1 -1
- package/dist/src/components/awards/awards-flex.css.js +1 -273
- package/dist/src/components/awards/awards-flex.css.js.map +1 -1
- package/dist/src/components/awards/awards-flex.d.ts +12 -12
- package/dist/src/components/awards/awards-flex.js +33 -264
- package/dist/src/components/awards/awards-flex.js.map +1 -1
- package/dist/src/components/awards/awards-spotlight.css.js +1 -161
- package/dist/src/components/awards/awards-spotlight.css.js.map +1 -1
- package/dist/src/components/awards/awards-spotlight.d.ts +4 -4
- package/dist/src/components/awards/awards-spotlight.js +24 -140
- package/dist/src/components/awards/awards-spotlight.js.map +1 -1
- package/dist/src/components/awards/awards.css.js +1 -401
- package/dist/src/components/awards/awards.css.js.map +1 -1
- package/dist/src/components/awards/awards.d.ts +13 -13
- package/dist/src/components/awards/awards.js +26 -179
- package/dist/src/components/awards/awards.js.map +1 -1
- package/dist/src/components/awards/scroll-slides.js +1 -131
- package/dist/src/components/awards/scroll-slides.js.map +1 -1
- package/dist/src/components/back/back.css.js +1 -91
- package/dist/src/components/back/back.css.js.map +1 -1
- package/dist/src/components/back/back.d.ts +1 -1
- package/dist/src/components/back/back.js +8 -71
- package/dist/src/components/back/back.js.map +1 -1
- package/dist/src/components/badge/badge.css.js +1 -204
- package/dist/src/components/badge/badge.css.js.map +1 -1
- package/dist/src/components/badge/badge.d.ts +4 -4
- package/dist/src/components/badge/badge.js +2 -117
- package/dist/src/components/badge/badge.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.css.js +16 -150
- package/dist/src/components/bento-grid/bento-grid.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-grid.d.ts +3 -3
- package/dist/src/components/bento-grid/bento-grid.js +10 -189
- package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js +1 -338
- package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.d.ts +3 -3
- package/dist/src/components/bento-grid/bento-item.js +10 -94
- package/dist/src/components/bento-grid/bento-item.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.css.js +1 -54
- package/dist/src/components/blockquote/blockquote.css.js.map +1 -1
- package/dist/src/components/blockquote/blockquote.d.ts +2 -2
- package/dist/src/components/blockquote/blockquote.js +1 -44
- package/dist/src/components/blockquote/blockquote.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.css.js +1 -168
- package/dist/src/components/breadcrumb/breadcrumb.css.js.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts +5 -5
- package/dist/src/components/breadcrumb/breadcrumb.js +9 -166
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/button/button.css.js +1 -843
- package/dist/src/components/button/button.css.js.map +1 -1
- package/dist/src/components/button/button.d.ts +5 -5
- package/dist/src/components/button/button.js +18 -420
- package/dist/src/components/button/button.js.map +1 -1
- package/dist/src/components/caption/caption.css.js +1 -29
- package/dist/src/components/caption/caption.css.js.map +1 -1
- package/dist/src/components/caption/caption.d.ts +3 -3
- package/dist/src/components/caption/caption.js +2 -36
- package/dist/src/components/caption/caption.js.map +1 -1
- package/dist/src/components/card-features/card-features.css.js +1 -120
- package/dist/src/components/card-features/card-features.css.js.map +1 -1
- package/dist/src/components/card-features/card-features.d.ts +3 -3
- package/dist/src/components/card-features/card-features.js +12 -145
- package/dist/src/components/card-features/card-features.js.map +1 -1
- package/dist/src/components/cards/card.css.js +1 -369
- package/dist/src/components/cards/card.css.js.map +1 -1
- package/dist/src/components/cards/card.d.ts +3 -3
- package/dist/src/components/cards/card.js +21 -312
- package/dist/src/components/cards/card.js.map +1 -1
- package/dist/src/components/carousel/carousel.css.js +1 -261
- package/dist/src/components/carousel/carousel.css.js.map +1 -1
- package/dist/src/components/carousel/carousel.d.ts +5 -5
- package/dist/src/components/carousel/carousel.js +13 -297
- package/dist/src/components/carousel/carousel.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.css.js +1 -173
- package/dist/src/components/checkbox/checkbox.css.js.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +2 -2
- package/dist/src/components/checkbox/checkbox.js +5 -138
- package/dist/src/components/checkbox/checkbox.js.map +1 -1
- package/dist/src/components/code/code.css.js +1 -73
- package/dist/src/components/code/code.css.js.map +1 -1
- package/dist/src/components/code/code.d.ts +2 -2
- package/dist/src/components/code/code.js +4 -87
- package/dist/src/components/code/code.js.map +1 -1
- package/dist/src/components/compare/compare.css.js +1 -478
- package/dist/src/components/compare/compare.css.js.map +1 -1
- package/dist/src/components/compare/compare.d.ts +5 -5
- package/dist/src/components/compare/compare.js +23 -476
- package/dist/src/components/compare/compare.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.css.js +1 -141
- package/dist/src/components/comparison-panel/comparison-panel.css.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.d.ts +2 -2
- package/dist/src/components/comparison-panel/comparison-panel.js +18 -86
- package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.css.js +1 -391
- package/dist/src/components/compatibility-table/compatibility-table.css.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.d.ts +2 -2
- package/dist/src/components/compatibility-table/compatibility-table.js +26 -136
- package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.css.js +1 -97
- package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.d.ts +2 -2
- package/dist/src/components/cta-banner/cta-banner.js +8 -51
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/display/display.css.js +1 -95
- package/dist/src/components/display/display.css.js.map +1 -1
- package/dist/src/components/display/display.d.ts +2 -2
- package/dist/src/components/display/display.js +3 -84
- package/dist/src/components/display/display.js.map +1 -1
- package/dist/src/components/divider/divider-horizontal.d.ts +2 -2
- package/dist/src/components/divider/divider-horizontal.js +4 -63
- package/dist/src/components/divider/divider-horizontal.js.map +1 -1
- package/dist/src/components/divider/divider-vertical.d.ts +2 -2
- package/dist/src/components/divider/divider-vertical.js +6 -61
- package/dist/src/components/divider/divider-vertical.js.map +1 -1
- package/dist/src/components/divider/divider.css.js +1 -20
- package/dist/src/components/divider/divider.css.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.css.js +1 -121
- package/dist/src/components/dropdown/dropdown.css.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts +5 -5
- package/dist/src/components/dropdown/dropdown.js +17 -283
- package/dist/src/components/dropdown/dropdown.js.map +1 -1
- package/dist/src/components/features/features.css.js +1 -123
- package/dist/src/components/features/features.css.js.map +1 -1
- package/dist/src/components/features/features.d.ts +5 -5
- package/dist/src/components/features/features.js +11 -71
- package/dist/src/components/features/features.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.css.js +1 -100
- package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
- package/dist/src/components/features-tab/features-tab.d.ts +5 -5
- package/dist/src/components/features-tab/features-tab.js +9 -70
- package/dist/src/components/features-tab/features-tab.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.css.js +1 -28
- package/dist/src/components/fieldset/fieldset.css.js.map +1 -1
- package/dist/src/components/fieldset/fieldset.d.ts +2 -2
- package/dist/src/components/fieldset/fieldset.js +3 -31
- package/dist/src/components/fieldset/fieldset.js.map +1 -1
- package/dist/src/components/footer/footer-images.js +5 -27
- package/dist/src/components/footer/footer-images.js.map +1 -1
- package/dist/src/components/footer/footer-links-group.css.js +1 -33
- package/dist/src/components/footer/footer-links-group.css.js.map +1 -1
- package/dist/src/components/footer/footer-links-group.d.ts +3 -3
- package/dist/src/components/footer/footer-links-group.js +3 -32
- package/dist/src/components/footer/footer-links-group.js.map +1 -1
- package/dist/src/components/footer/footer-locale.js +1 -45
- package/dist/src/components/footer/footer-locale.js.map +1 -1
- package/dist/src/components/footer/footer-lp.d.ts +7 -7
- package/dist/src/components/footer/footer-lp.js +8 -121
- package/dist/src/components/footer/footer-lp.js.map +1 -1
- package/dist/src/components/footer/footer-nav-menu.css.js +1 -61
- package/dist/src/components/footer/footer-nav-menu.css.js.map +1 -1
- package/dist/src/components/footer/footer-nav-menu.d.ts +3 -3
- package/dist/src/components/footer/footer-nav-menu.js +3 -47
- package/dist/src/components/footer/footer-nav-menu.js.map +1 -1
- package/dist/src/components/footer/footer.css.js +1 -664
- package/dist/src/components/footer/footer.css.js.map +1 -1
- package/dist/src/components/footer/footer.d.ts +13 -13
- package/dist/src/components/footer/footer.js +20 -305
- package/dist/src/components/footer/footer.js.map +1 -1
- package/dist/src/components/footer/localeMap.js +1 -1
- package/dist/src/components/footer/localeMap.js.map +1 -1
- package/dist/src/components/grid/grid.css.js +1 -78
- package/dist/src/components/grid/grid.css.js.map +1 -1
- package/dist/src/components/grid/grid.d.ts +2 -2
- package/dist/src/components/grid/grid.js +9 -126
- package/dist/src/components/grid/grid.js.map +1 -1
- package/dist/src/components/header/header-code.css.js +1 -369
- package/dist/src/components/header/header-code.css.js.map +1 -1
- package/dist/src/components/header/header-code.d.ts +4 -4
- package/dist/src/components/header/header-code.js +15 -163
- package/dist/src/components/header/header-code.js.map +1 -1
- package/dist/src/components/header/header.css.js +1 -757
- package/dist/src/components/header/header.css.js.map +1 -1
- package/dist/src/components/header/header.d.ts +7 -7
- package/dist/src/components/header/header.js +4 -212
- package/dist/src/components/header/header.js.map +1 -1
- package/dist/src/components/heading/heading.css.js +1 -89
- package/dist/src/components/heading/heading.css.js.map +1 -1
- package/dist/src/components/heading/heading.d.ts +2 -2
- package/dist/src/components/heading/heading.js +1 -108
- package/dist/src/components/heading/heading.js.map +1 -1
- package/dist/src/components/help-text/help-text.css.js +1 -19
- package/dist/src/components/help-text/help-text.css.js.map +1 -1
- package/dist/src/components/help-text/help-text.d.ts +2 -2
- package/dist/src/components/help-text/help-text.js +3 -31
- package/dist/src/components/help-text/help-text.js.map +1 -1
- package/dist/src/components/hero/hero.css.js +1 -362
- package/dist/src/components/hero/hero.css.js.map +1 -1
- package/dist/src/components/hero/hero.d.ts +3 -3
- package/dist/src/components/hero/hero.js +12 -164
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/highlight/highlight.css.js +1 -175
- package/dist/src/components/highlight/highlight.css.js.map +1 -1
- package/dist/src/components/highlight/highlight.d.ts +3 -3
- package/dist/src/components/highlight/highlight.js +4 -115
- package/dist/src/components/highlight/highlight.js.map +1 -1
- package/dist/src/components/icons/analysis-icon.d.ts +1 -1
- package/dist/src/components/icons/analysis-icon.js +2 -20
- package/dist/src/components/icons/analysis-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-down-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-down-icon.js +2 -20
- package/dist/src/components/icons/arrow-down-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-icon.js +2 -48
- package/dist/src/components/icons/arrow-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-right-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-right-icon.js +2 -45
- package/dist/src/components/icons/arrow-right-icon.js.map +1 -1
- package/dist/src/components/icons/arrow-up-icon.d.ts +1 -1
- package/dist/src/components/icons/arrow-up-icon.js +2 -33
- package/dist/src/components/icons/arrow-up-icon.js.map +1 -1
- package/dist/src/components/icons/av-comparatives-icon.js +2 -31
- package/dist/src/components/icons/av-comparatives-icon.js.map +1 -1
- package/dist/src/components/icons/bd-ai-icon.js +2 -31
- package/dist/src/components/icons/bd-ai-icon.js.map +1 -1
- package/dist/src/components/icons/best-brands-icon.js +2 -31
- package/dist/src/components/icons/best-brands-icon.js.map +1 -1
- package/dist/src/components/icons/brand-signature-icon.d.ts +1 -1
- package/dist/src/components/icons/brand-signature-icon.js +2 -46
- package/dist/src/components/icons/brand-signature-icon.js.map +1 -1
- package/dist/src/components/icons/check-icon.d.ts +1 -1
- package/dist/src/components/icons/check-icon.js +2 -31
- package/dist/src/components/icons/check-icon.js.map +1 -1
- package/dist/src/components/icons/circle-info-icon.d.ts +1 -1
- package/dist/src/components/icons/circle-info-icon.js +2 -35
- package/dist/src/components/icons/circle-info-icon.js.map +1 -1
- package/dist/src/components/icons/close-icon.d.ts +1 -1
- package/dist/src/components/icons/close-icon.js +2 -20
- package/dist/src/components/icons/close-icon.js.map +1 -1
- package/dist/src/components/icons/enterprise-icon.d.ts +1 -1
- package/dist/src/components/icons/enterprise-icon.js +2 -22
- package/dist/src/components/icons/enterprise-icon.js.map +1 -1
- package/dist/src/components/icons/family-icon.d.ts +1 -1
- package/dist/src/components/icons/family-icon.js +2 -20
- package/dist/src/components/icons/family-icon.js.map +1 -1
- package/dist/src/components/icons/globe-icon.d.ts +1 -1
- package/dist/src/components/icons/globe-icon.js +2 -20
- package/dist/src/components/icons/globe-icon.js.map +1 -1
- package/dist/src/components/icons/guide-icon.d.ts +1 -1
- package/dist/src/components/icons/guide-icon.js +2 -20
- package/dist/src/components/icons/guide-icon.js.map +1 -1
- package/dist/src/components/icons/home-icon.d.ts +1 -1
- package/dist/src/components/icons/home-icon.js +2 -22
- package/dist/src/components/icons/home-icon.js.map +1 -1
- package/dist/src/components/icons/icon-element.js +1 -162
- package/dist/src/components/icons/icon-element.js.map +1 -1
- package/dist/src/components/icons/icons.d.ts +23 -23
- package/dist/src/components/icons/icons.js +1 -42
- package/dist/src/components/icons/individual-icon.d.ts +1 -1
- package/dist/src/components/icons/individual-icon.js +2 -20
- package/dist/src/components/icons/individual-icon.js.map +1 -1
- package/dist/src/components/icons/laurel-icon.d.ts +1 -1
- package/dist/src/components/icons/laurel-icon.js +2 -24
- package/dist/src/components/icons/laurel-icon.js.map +1 -1
- package/dist/src/components/icons/machine-learning-icon.d.ts +1 -1
- package/dist/src/components/icons/machine-learning-icon.js +2 -20
- package/dist/src/components/icons/machine-learning-icon.js.map +1 -1
- package/dist/src/components/icons/marks.d.ts +9 -9
- package/dist/src/components/icons/marks.js +1 -41
- package/dist/src/components/icons/minus-icon.d.ts +1 -1
- package/dist/src/components/icons/minus-icon.js +2 -19
- package/dist/src/components/icons/minus-icon.js.map +1 -1
- package/dist/src/components/icons/missing-icon.d.ts +1 -1
- package/dist/src/components/icons/missing-icon.js +3 -53
- package/dist/src/components/icons/missing-icon.js.map +1 -1
- package/dist/src/components/icons/pause-icon.d.ts +1 -1
- package/dist/src/components/icons/pause-icon.js +2 -22
- package/dist/src/components/icons/pause-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-2024-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-2024-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-business-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-business-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-icon.js +2 -31
- package/dist/src/components/icons/pc-mag-icon.js.map +1 -1
- package/dist/src/components/icons/pc-mag-readers-icon.js +2 -30
- package/dist/src/components/icons/pc-mag-readers-icon.js.map +1 -1
- package/dist/src/components/icons/play-icon.d.ts +1 -1
- package/dist/src/components/icons/play-icon.js +2 -22
- package/dist/src/components/icons/play-icon.js.map +1 -1
- package/dist/src/components/icons/plus-icon.d.ts +1 -1
- package/dist/src/components/icons/plus-icon.js +2 -19
- package/dist/src/components/icons/plus-icon.js.map +1 -1
- package/dist/src/components/icons/quote-icon.d.ts +1 -1
- package/dist/src/components/icons/quote-icon.js +2 -30
- package/dist/src/components/icons/quote-icon.js.map +1 -1
- package/dist/src/components/icons/small-business-icon.d.ts +1 -1
- package/dist/src/components/icons/small-business-icon.js +2 -22
- package/dist/src/components/icons/small-business-icon.js.map +1 -1
- package/dist/src/components/icons/top-product-icon.js +2 -31
- package/dist/src/components/icons/top-product-icon.js.map +1 -1
- package/dist/src/components/image/image.css.js +1 -106
- package/dist/src/components/image/image.css.js.map +1 -1
- package/dist/src/components/image/image.d.ts +2 -2
- package/dist/src/components/image/image.js +10 -115
- package/dist/src/components/image/image.js.map +1 -1
- package/dist/src/components/input/input-clipboard.css.js +1 -93
- package/dist/src/components/input/input-clipboard.css.js.map +1 -1
- package/dist/src/components/input/input-clipboard.d.ts +5 -5
- package/dist/src/components/input/input-clipboard.js +20 -257
- package/dist/src/components/input/input-clipboard.js.map +1 -1
- package/dist/src/components/input/input.css.js +1 -9
- package/dist/src/components/input/input.css.js.map +1 -1
- package/dist/src/components/input/input.d.ts +4 -4
- package/dist/src/components/input/input.js +19 -202
- package/dist/src/components/input/input.js.map +1 -1
- package/dist/src/components/install-options/install-options.css.js +1 -308
- package/dist/src/components/install-options/install-options.css.js.map +1 -1
- package/dist/src/components/install-options/install-options.d.ts +4 -4
- package/dist/src/components/install-options/install-options.js +28 -159
- package/dist/src/components/install-options/install-options.js.map +1 -1
- package/dist/src/components/label/label.css.js +1 -33
- package/dist/src/components/label/label.css.js.map +1 -1
- package/dist/src/components/label/label.d.ts +3 -3
- package/dist/src/components/label/label.js +3 -135
- package/dist/src/components/label/label.js.map +1 -1
- package/dist/src/components/light-carousel/light-carousel.css.js +1 -270
- package/dist/src/components/light-carousel/light-carousel.css.js.map +1 -1
- package/dist/src/components/light-carousel/light-carousel.d.ts +3 -3
- package/dist/src/components/light-carousel/light-carousel.js +16 -181
- package/dist/src/components/light-carousel/light-carousel.js.map +1 -1
- package/dist/src/components/link/link.css.js +1 -288
- package/dist/src/components/link/link.css.js.map +1 -1
- package/dist/src/components/link/link.d.ts +3 -3
- package/dist/src/components/link/link.js +6 -233
- package/dist/src/components/link/link.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.css.js +1 -167
- package/dist/src/components/list/list-item/list-item.css.js.map +1 -1
- package/dist/src/components/list/list-item/list-item.d.ts +3 -3
- package/dist/src/components/list/list-item/list-item.js +3 -122
- package/dist/src/components/list/list-item/list-item.js.map +1 -1
- package/dist/src/components/list/list.css.js +1 -180
- package/dist/src/components/list/list.css.js.map +1 -1
- package/dist/src/components/list/list.d.ts +1 -1
- package/dist/src/components/list/list.js +5 -82
- package/dist/src/components/list/list.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.css.js +1 -93
- package/dist/src/components/logo-marquee/logo-marquee.css.js.map +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.d.ts +3 -3
- package/dist/src/components/logo-marquee/logo-marquee.js +6 -147
- package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
- package/dist/src/components/modal/modal.css.js +1 -203
- package/dist/src/components/modal/modal.css.js.map +1 -1
- package/dist/src/components/modal/modal.d.ts +3 -3
- package/dist/src/components/modal/modal.js +3 -131
- package/dist/src/components/modal/modal.js.map +1 -1
- package/dist/src/components/motion-art/motion-art.d.ts +1 -1
- package/dist/src/components/motion-art/motion-art.js +1 -114
- package/dist/src/components/motion-art/motion-art.js.map +1 -1
- package/dist/src/components/overview/overview.css.js +1 -125
- package/dist/src/components/overview/overview.css.js.map +1 -1
- package/dist/src/components/overview/overview.d.ts +2 -2
- package/dist/src/components/overview/overview.js +9 -50
- package/dist/src/components/overview/overview.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.css.js +1 -174
- package/dist/src/components/page-switcher/page-switcher.css.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.d.ts +2 -2
- package/dist/src/components/page-switcher/page-switcher.js +6 -62
- package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.css.js +1 -160
- package/dist/src/components/pagination-dots/pagination-dots.css.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.d.ts +2 -2
- package/dist/src/components/pagination-dots/pagination-dots.js +10 -210
- package/dist/src/components/pagination-dots/pagination-dots.js.map +1 -1
- package/dist/src/components/paragraph/paragraph.css.js +1 -101
- package/dist/src/components/paragraph/paragraph.css.js.map +1 -1
- package/dist/src/components/paragraph/paragraph.d.ts +2 -2
- package/dist/src/components/paragraph/paragraph.js +3 -119
- package/dist/src/components/paragraph/paragraph.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.css.js +1 -245
- package/dist/src/components/partner-banner/partner-banner.css.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.d.ts +1 -1
- package/dist/src/components/partner-banner/partner-banner.js +6 -81
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/picture/picture.css.js +1 -208
- package/dist/src/components/picture/picture.css.js.map +1 -1
- package/dist/src/components/picture/picture.d.ts +2 -2
- package/dist/src/components/picture/picture.js +14 -186
- package/dist/src/components/picture/picture.js.map +1 -1
- package/dist/src/components/post-card/post-card.css.js +1 -149
- package/dist/src/components/post-card/post-card.css.js.map +1 -1
- package/dist/src/components/post-card/post-card.d.ts +2 -2
- package/dist/src/components/post-card/post-card.js +5 -97
- package/dist/src/components/post-card/post-card.js.map +1 -1
- package/dist/src/components/pricing-cards/adopt-styles.js +1 -18
- package/dist/src/components/pricing-cards/adopt-styles.js.map +1 -1
- package/dist/src/components/pricing-cards/new-pricing-card.d.ts +2 -2
- package/dist/src/components/pricing-cards/new-pricing-card.js +4 -49
- package/dist/src/components/pricing-cards/new-pricing-card.js.map +1 -1
- package/dist/src/components/pricing-cards/new-pricing.css.js +1 -74
- package/dist/src/components/pricing-cards/new-pricing.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js +1 -11
- package/dist/src/components/pricing-cards/pricing-card-actions.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-actions.d.ts +2 -2
- package/dist/src/components/pricing-cards/pricing-card-actions.js +2 -59
- package/dist/src/components/pricing-cards/pricing-card-actions.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.css.js +1 -41
- package/dist/src/components/pricing-cards/pricing-card-container.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.d.ts +1 -1
- package/dist/src/components/pricing-cards/pricing-card-container.js +2 -40
- package/dist/src/components/pricing-cards/pricing-card-container.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-header.css.js +1 -82
- package/dist/src/components/pricing-cards/pricing-card-header.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-header.d.ts +5 -5
- package/dist/src/components/pricing-cards/pricing-card-header.js +7 -70
- package/dist/src/components/pricing-cards/pricing-card-header.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js +1 -92
- package/dist/src/components/pricing-cards/pricing-card-pricing.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-pricing.d.ts +6 -6
- package/dist/src/components/pricing-cards/pricing-card-pricing.js +7 -87
- package/dist/src/components/pricing-cards/pricing-card-pricing.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js +1 -29
- package/dist/src/components/pricing-cards/pricing-card-show-more.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card-show-more.d.ts +4 -4
- package/dist/src/components/pricing-cards/pricing-card-show-more.js +5 -41
- package/dist/src/components/pricing-cards/pricing-card-show-more.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card.css.js +1 -660
- package/dist/src/components/pricing-cards/pricing-card.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-card.d.ts +7 -7
- package/dist/src/components/pricing-cards/pricing-card.js +53 -639
- package/dist/src/components/pricing-cards/pricing-card.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js +1 -34
- package/dist/src/components/pricing-cards/pricing-feature-item.css.js.map +1 -1
- package/dist/src/components/pricing-cards/pricing-feature-item.d.ts +2 -2
- package/dist/src/components/pricing-cards/pricing-feature-item.js +2 -22
- package/dist/src/components/pricing-cards/pricing-feature-item.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.css.js +1 -106
- package/dist/src/components/process-steps/process-steps.css.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.d.ts +5 -5
- package/dist/src/components/process-steps/process-steps.js +10 -78
- package/dist/src/components/process-steps/process-steps.js.map +1 -1
- package/dist/src/components/progress/progress.css.js +1 -123
- package/dist/src/components/progress/progress.css.js.map +1 -1
- package/dist/src/components/progress/progress.d.ts +2 -2
- package/dist/src/components/progress/progress.js +6 -72
- package/dist/src/components/progress/progress.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.css.js +1 -130
- package/dist/src/components/quick-answer/quick-answer.css.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.d.ts +2 -2
- package/dist/src/components/quick-answer/quick-answer.js +9 -49
- package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
- package/dist/src/components/radio/radio-group.css.js +1 -41
- package/dist/src/components/radio/radio-group.css.js.map +1 -1
- package/dist/src/components/radio/radio-group.d.ts +1 -1
- package/dist/src/components/radio/radio-group.js +5 -92
- package/dist/src/components/radio/radio-group.js.map +1 -1
- package/dist/src/components/radio/radio.css.js +1 -193
- package/dist/src/components/radio/radio.css.js.map +1 -1
- package/dist/src/components/radio/radio.d.ts +4 -4
- package/dist/src/components/radio/radio.js +6 -263
- package/dist/src/components/radio/radio.js.map +1 -1
- package/dist/src/components/radio/toggle-radio.d.ts +2 -2
- package/dist/src/components/radio/toggle-radio.js +3 -39
- package/dist/src/components/radio/toggle-radio.js.map +1 -1
- package/dist/src/components/review/review-grid.css.js +1 -46
- package/dist/src/components/review/review-grid.css.js.map +1 -1
- package/dist/src/components/review/review-grid.d.ts +2 -2
- package/dist/src/components/review/review-grid.js +4 -49
- package/dist/src/components/review/review-grid.js.map +1 -1
- package/dist/src/components/review/review.css.js +1 -54
- package/dist/src/components/review/review.css.js.map +1 -1
- package/dist/src/components/review/review.d.ts +2 -2
- package/dist/src/components/review/review.js +2 -59
- package/dist/src/components/review/review.js.map +1 -1
- package/dist/src/components/section/section.css.js +1 -37
- package/dist/src/components/section/section.css.js.map +1 -1
- package/dist/src/components/section/section.d.ts +1 -1
- package/dist/src/components/section/section.js +1 -50
- package/dist/src/components/section/section.js.map +1 -1
- package/dist/src/components/section-header/section-header.css.js +1 -99
- package/dist/src/components/section-header/section-header.css.js.map +1 -1
- package/dist/src/components/section-header/section-header.d.ts +2 -2
- package/dist/src/components/section-header/section-header.js +4 -85
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/dist/src/components/shared/announcer.d.ts +1 -1
- package/dist/src/components/shared/announcer.js +1 -34
- package/dist/src/components/shared/announcer.js.map +1 -1
- package/dist/src/components/shared/controller.media-query.d.ts +1 -1
- package/dist/src/components/shared/controller.media-query.js +1 -57
- package/dist/src/components/shared/controller.media-query.js.map +1 -1
- package/dist/src/components/shared/define-element.js +1 -16
- package/dist/src/components/shared/define-element.js.map +1 -1
- package/dist/src/components/shared/ensemble.css.js +1 -101
- package/dist/src/components/shared/ensemble.css.js.map +1 -1
- package/dist/src/components/shared/events.js +0 -13
- package/dist/src/components/shared/fill-width.css.js +2 -27
- package/dist/src/components/shared/fill-width.css.js.map +1 -1
- package/dist/src/components/shared/form-control.d.ts +1 -1
- package/dist/src/components/shared/form-control.js +1 -198
- package/dist/src/components/shared/form-control.js.map +1 -1
- package/dist/src/components/shared/form-field.css.js +1 -258
- package/dist/src/components/shared/form-field.css.js.map +1 -1
- package/dist/src/components/shared/prop-vocabulary.js +1 -49
- package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
- package/dist/src/components/shared/token-scales.js +1 -351
- package/dist/src/components/shared/token-scales.js.map +1 -1
- package/dist/src/components/skeleton/skeleton.css.js +1 -32
- package/dist/src/components/skeleton/skeleton.css.js.map +1 -1
- package/dist/src/components/skeleton/skeleton.d.ts +2 -2
- package/dist/src/components/skeleton/skeleton.js +4 -36
- package/dist/src/components/skeleton/skeleton.js.map +1 -1
- package/dist/src/components/spinner/spinner.css.js +1 -87
- package/dist/src/components/spinner/spinner.css.js.map +1 -1
- package/dist/src/components/spinner/spinner.d.ts +3 -3
- package/dist/src/components/spinner/spinner.js +3 -69
- package/dist/src/components/spinner/spinner.js.map +1 -1
- package/dist/src/components/spotlight-section/spotlight-section.css.js +1 -105
- package/dist/src/components/spotlight-section/spotlight-section.css.js.map +1 -1
- package/dist/src/components/spotlight-section/spotlight-section.d.ts +2 -2
- package/dist/src/components/spotlight-section/spotlight-section.js +11 -72
- package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
- package/dist/src/components/stat/stat-highlight.js +6 -82
- package/dist/src/components/stat/stat-highlight.js.map +1 -1
- package/dist/src/components/stat/stat-tile.js +5 -52
- package/dist/src/components/stat/stat-tile.js.map +1 -1
- package/dist/src/components/stat/stat.css.js +1 -145
- package/dist/src/components/stat/stat.css.js.map +1 -1
- package/dist/src/components/stat/stat.d.ts +2 -2
- package/dist/src/components/stat/stat.js +1 -3
- package/dist/src/components/switch/switch.css.js +1 -175
- package/dist/src/components/switch/switch.css.js.map +1 -1
- package/dist/src/components/switch/switch.d.ts +4 -4
- package/dist/src/components/switch/switch.js +4 -99
- package/dist/src/components/switch/switch.js.map +1 -1
- package/dist/src/components/tab-list/tab-list.css.js +1 -289
- package/dist/src/components/tab-list/tab-list.css.js.map +1 -1
- package/dist/src/components/tab-list/tab-list.d.ts +1 -1
- package/dist/src/components/tab-list/tab-list.js +13 -191
- package/dist/src/components/tab-list/tab-list.js.map +1 -1
- package/dist/src/components/tabs/tabs.css.js +1 -77
- package/dist/src/components/tabs/tabs.css.js.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +6 -6
- package/dist/src/components/tabs/tabs.js +8 -220
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/src/components/tag/tag.css.js +1 -52
- package/dist/src/components/tag/tag.css.js.map +1 -1
- package/dist/src/components/tag/tag.d.ts +2 -2
- package/dist/src/components/tag/tag.js +2 -37
- package/dist/src/components/tag/tag.js.map +1 -1
- package/dist/src/components/terminal/terminal-cursor.js +1 -65
- package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
- package/dist/src/components/terminal/terminal-message.css.js +1 -409
- package/dist/src/components/terminal/terminal-message.css.js.map +1 -1
- package/dist/src/components/terminal/terminal-message.d.ts +5 -5
- package/dist/src/components/terminal/terminal-message.js +28 -183
- package/dist/src/components/terminal/terminal-message.js.map +1 -1
- package/dist/src/components/termsOfUse/terms.css.js +1 -55
- package/dist/src/components/termsOfUse/terms.css.js.map +1 -1
- package/dist/src/components/termsOfUse/terms.d.ts +5 -5
- package/dist/src/components/termsOfUse/terms.js +9 -82
- package/dist/src/components/termsOfUse/terms.js.map +1 -1
- package/dist/src/components/textarea/textarea.css.js +1 -49
- package/dist/src/components/textarea/textarea.css.js.map +1 -1
- package/dist/src/components/textarea/textarea.d.ts +5 -5
- package/dist/src/components/textarea/textarea.js +15 -160
- package/dist/src/components/textarea/textarea.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.css.js +1 -96
- package/dist/src/components/tooltip/tooltip.css.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +2 -2
- package/dist/src/components/tooltip/tooltip.js +5 -285
- package/dist/src/components/tooltip/tooltip.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.css.js +1 -228
- package/dist/src/components/trust-panel/trust-panel.css.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.d.ts +4 -4
- package/dist/src/components/trust-panel/trust-panel.js +25 -104
- package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
- package/dist/src/components/video/video.css.js +1 -20
- package/dist/src/components/video/video.css.js.map +1 -1
- package/dist/src/components/video/video.d.ts +2 -2
- package/dist/src/components/video/video.js +5 -88
- package/dist/src/components/video/video.js.map +1 -1
- package/dist/src/components/video-player/video-player.css.js +1 -167
- package/dist/src/components/video-player/video-player.css.js.map +1 -1
- package/dist/src/components/video-player/video-player.d.ts +2 -2
- package/dist/src/components/video-player/video-player.js +15 -150
- package/dist/src/components/video-player/video-player.js.map +1 -1
- package/dist/src/components/visually-hidden/visually-hidden.css.js +1 -22
- package/dist/src/components/visually-hidden/visually-hidden.css.js.map +1 -1
- package/dist/src/components/visually-hidden/visually-hidden.d.ts +2 -2
- package/dist/src/components/visually-hidden/visually-hidden.js +2 -22
- package/dist/src/components/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/src/tokens/brand-layer.js +8 -162
- package/dist/src/tokens/brand-layer.js.map +1 -1
- package/dist/src/tokens/dark-derivation.js +1 -325
- package/dist/src/tokens/dark-derivation.js.map +1 -1
- package/dist/src/tokens/dark-findings.d.ts +1 -1
- package/dist/src/tokens/dark-findings.js +1 -204
- package/dist/src/tokens/dark-findings.js.map +1 -1
- package/dist/src/tokens/fonts.css +1 -166
- package/dist/src/tokens/layout.css +1 -61
- package/dist/src/tokens/story-chrome.js +27 -221
- package/dist/src/tokens/story-chrome.js.map +1 -1
- package/dist/src/tokens/themes/bitdefender.js +1 -30
- package/dist/src/tokens/themes/bitdefender.js.map +1 -1
- package/dist/src/tokens/themes/contract.js +1 -7
- package/dist/src/tokens/themes/contract.js.map +1 -1
- package/dist/src/tokens/themes/index.js +1 -39
- package/dist/src/tokens/themes/index.js.map +1 -1
- package/dist/src/tokens/token-map.js +1 -236
- package/dist/src/tokens/token-map.js.map +1 -1
- package/dist/src/tokens/token-purposes.js +1 -259
- package/dist/src/tokens/token-purposes.js.map +1 -1
- package/dist/src/tokens/tokens.css +1 -1809
- package/dist/src/tokens/tokens.js +1 -1865
- package/dist/src/tokens/tokens.js.map +1 -1
- package/dist/src/tokens/type-ceiling-words.js +1 -293
- package/dist/src/tokens/type-ceiling-words.js.map +1 -1
- package/package.json +14 -3
- package/schemas/component-manifest.json +1 -1
- package/dist/src/components/icons/icons.js.map +0 -1
- package/dist/src/components/icons/marks.js.map +0 -1
- package/dist/src/components/shared/events.js.map +0 -1
- package/dist/src/components/stat/stat.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.css.js","
|
|
1
|
+
{"version":3,"file":"checkbox.css.js","names":["checkbox_css_default"],"sources":["../../../../src/components/checkbox/checkbox.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/**\n * Styled entirely from src/tokens/tokens.ts — see CLAUDE.md, \"The foundation\n * rule\". Measurements were matched to the ds-checkbox design by finding the\n * token that already carries each value.\n *\n * The whole row is the control, not just the box. That makes clicking the\n * label work (it did nothing before) and gives the target the 24px minimum\n * WCAG 2.5.8 asks for, which a 20px box alone cannot reach.\n */\nexport default css`\n :host {\n display: inline-block;\n }\n\n .bd-checkbox {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-8);\n /* padding rather than a min-height: a min-height adds its slack only\n above and below, which left the focus ring 2px from the content at the\n sides and 4px at the top and bottom. Padding insets all four edges\n equally, and still carries the row past the 24px WCAG 2.5.8 asks for. */\n padding: var(--spacing-2);\n cursor: pointer;\n font-family: var(--typography-fontFamily-sans);\n /* body-small: sm / normal / 1.5, which is what this already rendered on all\n three axes. Only the axes this rule declares are adopted -- the role also\n carries a family and a tracking, and importing those would change text\n the rule never spoke for. */\n font-size: var(--typography-body-small-fontSize);\n line-height: var(--typography-body-small-lineHeight);\n color: var(--color-text-primary);\n vertical-align: middle;\n }\n\n /* The native checkbox is the control and stays in the accessibility tree;\n the box below draws it. The clip idiom bd-switch uses. */\n input {\n position: absolute;\n /* no token: 1px is the clip idiom's own measure, not a border -- as in\n switch.css.ts, with the -1px below. */\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n }\n\n /* On the row rather than the box, so the ring and the target are the same\n shape, as on bd-radio and bd-switch. */\n .bd-checkbox:has(input:focus-visible) {\n /* the one focus ring — see Foundations/Focus. A two-colour ring whose\n white inner band keeps it visible on a coloured or dark surface, which a\n single-colour outline cannot do. */\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 box-shadow: var(--focus-outline-primary);\n border-radius: var(--focus-outline-radius);\n }\n\n /* ---- the box ---------------------------------------------------------- */\n .box {\n flex: none;\n width: var(--dimension-20);\n height: var(--dimension-20);\n box-sizing: border-box;\n border: var(--border-width-2) solid var(--color-action-primary);\n border-radius: var(--shape-radius-sm);\n background: var(--color-surface-default);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* the mark is drawn in currentColor, so one declaration moves both. It is\n ink on an action fill, not \"the page colour\" -- the two are both white\n here, and only one of them stays white in a dark theme. The fill is the\n brand's, so the ink is the brand's: a light partner brand takes dark\n ink here, which white on its fill could not carry */\n color: var(--color-brand-on-fill);\n transition: background-color var(--transition-duration-normal) var(--transition-easing-smooth),\n border-color var(--transition-duration-normal) var(--transition-easing-smooth);\n }\n\n .bd-checkbox:hover .box {\n border-color: var(--color-action-primary-hover);\n }\n\n /* ---- checked and indeterminate: the box fills, the mark is white ------ */\n :host([checked]) .box,\n :host([indeterminate]) .box {\n background: var(--color-action-primary);\n border-color: var(--color-action-primary);\n }\n\n :host([checked]) .bd-checkbox:hover .box,\n :host([indeterminate]) .bd-checkbox:hover .box {\n background: var(--color-action-primary-hover);\n border-color: var(--color-action-primary-hover);\n }\n\n .mark {\n width: var(--dimension-12);\n height: var(--dimension-12);\n display: block;\n }\n\n .mark path {\n fill: none;\n stroke: currentColor;\n stroke-width: var(--border-width-2);\n /* flat ends and a mitred vertex: the tick and the dash read as sharp,\n matching the square corners of the box rather than softening them */\n stroke-linecap: butt;\n stroke-linejoin: miter;\n }\n\n /* ---- disabled --------------------------------------------------------\n :disabled rather than [disabled], so a <fieldset disabled> around the box\n greys it too: a form-associated element matches :disabled for both.\n\n Grey throughout, and the label greys too rather than the whole row\n dropping to an opacity, which is what the design specifies. Exempt from\n contrast under WCAG 1.4.3.\n\n The disabled edge is --color-border-disabled, the role named for the\n state it expresses. It was --color-border-subtle, a hierarchy role, and\n the family carried two answers: five controls drew neutral-200 for a\n disabled edge and four drew neutral-300, so a disabled checkbox and a\n disabled text field did not agree on what one looks like. The state role\n wins because the state is what the colour means, and because neutral-300\n measures 2.27:1 against the page where neutral-200 measures 1.66. A\n disabled control is exempt under 1.4.11, so this is perceptibility rather\n than conformance -- but it moves the right way, and it stays subordinate\n to every enabled edge.\n\n The fills below still draw neutral-200. A fill is not an edge, and whether\n a disabled checked box should darken along with its border is a separate\n question that has not been put yet. */\n :host(:disabled) .bd-checkbox {\n cursor: not-allowed;\n color: var(--color-text-subtle);\n }\n\n :host(:disabled) .box {\n border-color: var(--color-border-disabled);\n background: var(--color-surface-default);\n }\n\n :host(:disabled[checked]) .box,\n :host(:disabled[indeterminate]) .box {\n background: var(--color-border-subtle);\n border-color: var(--color-border-disabled);\n }\n\n :host(:disabled) .bd-checkbox:hover .box {\n border-color: var(--color-border-disabled);\n }\n\n :host(:disabled[checked]) .bd-checkbox:hover .box,\n :host(:disabled[indeterminate]) .bd-checkbox:hover .box {\n background: var(--color-border-subtle);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .box {\n transition: none;\n }\n }\n`;\n"],"mappings":"A,0BAWA,IAAAA,EAAe,CAAG,myE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import "../../tokens/tokens.
|
|
3
|
-
declare const BdCheckbox_base: (new (...args: any[]) => import("../shared/form-control.
|
|
2
|
+
import "../../tokens/tokens.js";
|
|
3
|
+
declare const BdCheckbox_base: (new (...args: any[]) => import("../shared/form-control.js").FormControlInterface) & typeof LitElement;
|
|
4
4
|
export declare class BdCheckbox extends BdCheckbox_base {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
name: string;
|
|
@@ -1,120 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { defineElement } from "../shared/define-element.js";
|
|
10
|
-
// Installs the design tokens into document scope; see src/tokens/tokens.ts
|
|
11
|
-
import "../../tokens/tokens.js";
|
|
12
|
-
// the extension matters: "./checkbox.css" only resolved because Vite appends
|
|
13
|
-
// .js for us, and failed outright under native ESM
|
|
14
|
-
import checkboxCSS from "./checkbox.css.js";
|
|
15
|
-
import { FormControl, omitEmpty } from "../shared/form-control.js";
|
|
16
|
-
let BdCheckbox = class BdCheckbox extends FormControl(LitElement) {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
/* reflected, because a form reads the name off the element: see
|
|
20
|
-
shared/form-control.ts */
|
|
21
|
-
this.name = "";
|
|
22
|
-
this.value = "";
|
|
23
|
-
// checked was left undefined, which rendered aria-checked="" — an invalid
|
|
24
|
-
// value, so an unchecked box announced no state at all
|
|
25
|
-
this.checked = false;
|
|
26
|
-
this.indeterminate = false;
|
|
27
|
-
this.disabled = false;
|
|
28
|
-
this.required = false;
|
|
29
|
-
this.label = "";
|
|
30
|
-
}
|
|
31
|
-
static { this.styles = [checkboxCSS]; }
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
super.connectedCallback();
|
|
34
|
-
/* What reset returns to: the state the box joined the page in. A native
|
|
35
|
-
checkbox keeps its default in the checked attribute, but this one's
|
|
36
|
-
checked reflects, so the attribute follows every click and cannot. */
|
|
37
|
-
this._defaults ??= { checked: this.checked, indeterminate: this.indeterminate };
|
|
38
|
-
}
|
|
39
|
-
get _control() {
|
|
40
|
-
return this.renderRoot?.querySelector?.("input");
|
|
41
|
-
}
|
|
42
|
-
// a native checkbox toggles when its label is clicked, or on el.click()
|
|
43
|
-
_activate() {
|
|
44
|
-
this._control?.click();
|
|
45
|
-
}
|
|
46
|
-
updated() {
|
|
47
|
-
// with no value it submits "on", as a native checkbox does
|
|
48
|
-
this._internals.setFormValue(this.checked ? this.value || "on" : null, String(this.checked));
|
|
49
|
-
this._mirrorValidity(this._control);
|
|
50
|
-
}
|
|
51
|
-
formResetCallback() {
|
|
52
|
-
super.formResetCallback();
|
|
53
|
-
/* A reset can reach a box that was never connected -- one in a <form>
|
|
54
|
-
built in script -- and that box has taken no default yet, so it keeps
|
|
55
|
-
what it holds. */
|
|
56
|
-
if (!this._defaults)
|
|
57
|
-
return;
|
|
58
|
-
this.checked = this._defaults.checked;
|
|
59
|
-
this.indeterminate = this._defaults.indeterminate;
|
|
60
|
-
}
|
|
61
|
-
formStateRestoreCallback(state) {
|
|
62
|
-
this.checked = state === "true";
|
|
63
|
-
}
|
|
64
|
-
_onChange(e) {
|
|
65
|
-
/* Clicking an indeterminate box resolves it to checked. A native one
|
|
66
|
-
toggles whatever it held underneath, so a box that was indeterminate
|
|
67
|
-
and checked would clear; this one always resolved to checked, and
|
|
68
|
-
still does. */
|
|
69
|
-
if (this.indeterminate)
|
|
70
|
-
e.target.checked = true;
|
|
71
|
-
this.indeterminate = false;
|
|
72
|
-
this.checked = e.target.checked;
|
|
73
|
-
// name is carried so a handler can tell which control changed, as
|
|
74
|
-
// bd-radio's change carries it
|
|
75
|
-
this.dispatchEvent(new CustomEvent("change", {
|
|
76
|
-
detail: { checked: this.checked, value: this.checked ? this.value : null, name: this.name },
|
|
77
|
-
bubbles: true,
|
|
78
|
-
composed: true
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
/* Space is the native input's own, and the only key that toggles. Enter
|
|
82
|
-
submits the form, as it does on a native checkbox -- it used to toggle
|
|
83
|
-
here, which no native checkbox does, so a reader pressing Enter to send
|
|
84
|
-
a form changed their answer instead. See shared/form-control.ts. */
|
|
85
|
-
_onKeydown(e) {
|
|
86
|
-
if (e.key !== "Enter")
|
|
87
|
-
return;
|
|
88
|
-
e.preventDefault();
|
|
89
|
-
this._submitImplicitly();
|
|
90
|
-
}
|
|
91
|
-
_renderMark() {
|
|
92
|
-
if (this.indeterminate) {
|
|
93
|
-
return html `<svg class="mark" viewBox="0 0 12 12" aria-hidden="true" focusable="false">
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{FormControl as n,omitEmpty as r}from"../shared/form-control.js";import i from"./checkbox.css.js";import{LitElement as a,html as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends n(a){constructor(...e){super(...e),this.name=``,this.value=``,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.required=!1,this.label=``}static{this.styles=[i]}connectedCallback(){super.connectedCallback(),this._defaults??={checked:this.checked,indeterminate:this.indeterminate}}get _control(){return this.renderRoot?.querySelector?.(`input`)}_activate(){this._control?.click()}updated(){this._internals.setFormValue(this.checked?this.value||`on`:null,String(this.checked)),this._mirrorValidity(this._control)}formResetCallback(){super.formResetCallback(),this._defaults&&(this.checked=this._defaults.checked,this.indeterminate=this._defaults.indeterminate)}formStateRestoreCallback(e){this.checked=e===`true`}_onChange(e){this.indeterminate&&(e.target.checked=!0),this.indeterminate=!1,this.checked=e.target.checked,this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.checked,value:this.checked?this.value:null,name:this.name},bubbles:!0,composed:!0}))}_onKeydown(e){e.key===`Enter`&&(e.preventDefault(),this._submitImplicitly())}_renderMark(){return this.indeterminate?o`<svg class="mark" viewBox="0 0 12 12" aria-hidden="true" focusable="false">
|
|
94
2
|
<path d="M2.5 6H9.5" />
|
|
95
|
-
</svg
|
|
96
|
-
}
|
|
97
|
-
if (this.checked) {
|
|
98
|
-
return html `<svg class="mark" viewBox="0 0 12 12" aria-hidden="true" focusable="false">
|
|
3
|
+
</svg>`:this.checked?o`<svg class="mark" viewBox="0 0 12 12" aria-hidden="true" focusable="false">
|
|
99
4
|
<path d="M2.5 6.5L4.75 8.75L9.5 3.5" />
|
|
100
|
-
</svg
|
|
101
|
-
}
|
|
102
|
-
return "";
|
|
103
|
-
}
|
|
104
|
-
render() {
|
|
105
|
-
// The row is the control, so the label is part of it rather than
|
|
106
|
-
// decoration beside it: clicking the label toggles, and the target clears
|
|
107
|
-
// the 24px WCAG 2.5.8 asks for, which the 20px box alone cannot. It used
|
|
108
|
-
// to be a <div role="checkbox"> with its keys written by hand; it is a
|
|
109
|
-
// native checkbox now, drawn over by the box, so the browser supplies the
|
|
110
|
-
// role, the states, Space and the disabled tab order.
|
|
111
|
-
return html `
|
|
5
|
+
</svg>`:``}render(){return o`
|
|
112
6
|
<label class="bd-checkbox">
|
|
113
7
|
<input
|
|
114
8
|
type="checkbox"
|
|
115
9
|
.checked=${this.checked}
|
|
116
10
|
.indeterminate=${this.indeterminate}
|
|
117
|
-
?disabled=${this.disabled
|
|
11
|
+
?disabled=${this.disabled||this._formDisabled}
|
|
118
12
|
?required=${this.required}
|
|
119
13
|
@change=${this._onChange}
|
|
120
14
|
@keydown=${this._onKeydown}
|
|
@@ -122,32 +16,5 @@ let BdCheckbox = class BdCheckbox extends FormControl(LitElement) {
|
|
|
122
16
|
<span class="box" part="box">${this._renderMark()}</span>
|
|
123
17
|
<span class="label" part="label"><slot>${this.label}</slot></span>
|
|
124
18
|
</label>
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
__decorate([
|
|
129
|
-
property({ type: String, reflect: true, converter: omitEmpty })
|
|
130
|
-
], BdCheckbox.prototype, "name", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
property({ type: String })
|
|
133
|
-
], BdCheckbox.prototype, "value", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
property({ type: Boolean, reflect: true })
|
|
136
|
-
], BdCheckbox.prototype, "checked", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
property({ type: Boolean, reflect: true })
|
|
139
|
-
], BdCheckbox.prototype, "indeterminate", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
property({ type: Boolean, reflect: true })
|
|
142
|
-
], BdCheckbox.prototype, "disabled", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
property({ type: Boolean })
|
|
145
|
-
], BdCheckbox.prototype, "required", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
property({ type: String })
|
|
148
|
-
], BdCheckbox.prototype, "label", void 0);
|
|
149
|
-
BdCheckbox = __decorate([
|
|
150
|
-
defineElement("bd-checkbox")
|
|
151
|
-
], BdCheckbox);
|
|
152
|
-
export { BdCheckbox };
|
|
19
|
+
`}};t([s({type:String,reflect:!0,converter:r})],c.prototype,`name`,void 0),t([s({type:String})],c.prototype,`value`,void 0),t([s({type:Boolean,reflect:!0})],c.prototype,`checked`,void 0),t([s({type:Boolean,reflect:!0})],c.prototype,`indeterminate`,void 0),t([s({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),t([s({type:Boolean})],c.prototype,`required`,void 0),t([s({type:String})],c.prototype,`label`,void 0),c=t([e(`bd-checkbox`)],c);export{c as BdCheckbox};
|
|
153
20
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["checkboxCSS","_decorate","__decorate","checkbox_css_default","BdCheckbox","FormControl","LitElement","_args","state","property","omitEmpty","defineElement"],"sources":["../../../../src/components/checkbox/checkbox.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n// the extension matters: \"./checkbox.css\" only resolved because Vite appends\n// .js for us, and failed outright under native ESM\nimport checkboxCSS from \"./checkbox.css.ts\";\nimport { FormControl, omitEmpty } from \"#shared/form-control.ts\";\n\n@defineElement(\"bd-checkbox\")\nexport class BdCheckbox extends FormControl(LitElement) {\n static styles = [checkboxCSS];\n\n /* reflected, because a form reads the name off the element: see\n shared/form-control.ts */\n @property({ type: String, reflect: true, converter: omitEmpty })\n name = \"\";\n @property({ type: String })\n value = \"\";\n // checked was left undefined, which rendered aria-checked=\"\" — an invalid\n // value, so an unchecked box announced no state at all\n @property({ type: Boolean, reflect: true })\n checked = false;\n @property({ type: Boolean, reflect: true })\n indeterminate = false;\n @property({ type: Boolean, reflect: true })\n disabled = false;\n @property({ type: Boolean })\n required = false;\n @property({ type: String })\n label = \"\";\n\n _defaults?: { checked: boolean; indeterminate: boolean };\n\n connectedCallback() {\n super.connectedCallback();\n /* What reset returns to: the state the box joined the page in. A native\n checkbox keeps its default in the checked attribute, but this one's\n checked reflects, so the attribute follows every click and cannot. */\n this._defaults ??= { checked: this.checked, indeterminate: this.indeterminate };\n }\n\n protected get _control(): HTMLInputElement | null {\n return this.renderRoot?.querySelector?.(\"input\");\n }\n\n // a native checkbox toggles when its label is clicked, or on el.click()\n protected _activate() {\n this._control?.click();\n }\n\n updated() {\n // with no value it submits \"on\", as a native checkbox does\n this._internals.setFormValue(this.checked ? this.value || \"on\" : null, String(this.checked));\n this._mirrorValidity(this._control);\n }\n\n formResetCallback() {\n super.formResetCallback();\n /* A reset can reach a box that was never connected -- one in a <form>\n built in script -- and that box has taken no default yet, so it keeps\n what it holds. */\n if (!this._defaults) return;\n this.checked = this._defaults.checked;\n this.indeterminate = this._defaults.indeterminate;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.checked = state === \"true\";\n }\n\n _onChange(e: Event & { target: HTMLInputElement }) {\n /* Clicking an indeterminate box resolves it to checked. A native one\n toggles whatever it held underneath, so a box that was indeterminate\n and checked would clear; this one always resolved to checked, and\n still does. */\n if (this.indeterminate) e.target.checked = true;\n this.indeterminate = false;\n this.checked = e.target.checked;\n\n // name is carried so a handler can tell which control changed, as\n // bd-radio's change carries it\n this.dispatchEvent(\n new CustomEvent(\"change\", {\n detail : { checked: this.checked, value: this.checked ? this.value : null, name: this.name },\n bubbles : true,\n composed: true\n })\n );\n }\n\n /* Space is the native input's own, and the only key that toggles. Enter\n submits the form, as it does on a native checkbox -- it used to toggle\n here, which no native checkbox does, so a reader pressing Enter to send\n a form changed their answer instead. See shared/form-control.ts. */\n _onKeydown(e: KeyboardEvent) {\n if (e.key !== \"Enter\") return;\n e.preventDefault();\n this._submitImplicitly();\n }\n\n _renderMark() {\n if (this.indeterminate) {\n return html`<svg class=\"mark\" viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M2.5 6H9.5\" />\n </svg>`;\n }\n if (this.checked) {\n return html`<svg class=\"mark\" viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M2.5 6.5L4.75 8.75L9.5 3.5\" />\n </svg>`;\n }\n return \"\";\n }\n\n render() {\n // The row is the control, so the label is part of it rather than\n // decoration beside it: clicking the label toggles, and the target clears\n // the 24px WCAG 2.5.8 asks for, which the 20px box alone cannot. It used\n // to be a <div role=\"checkbox\"> with its keys written by hand; it is a\n // native checkbox now, drawn over by the box, so the browser supplies the\n // role, the states, Space and the disabled tab order.\n return html`\n <label class=\"bd-checkbox\">\n <input\n type=\"checkbox\"\n .checked=${this.checked}\n .indeterminate=${this.indeterminate}\n ?disabled=${this.disabled || this._formDisabled}\n ?required=${this.required}\n @change=${this._onChange}\n @keydown=${this._onKeydown}\n />\n <span class=\"box\" part=\"box\">${this._renderMark()}</span>\n <span class=\"label\" part=\"label\"><slot>${this.label}</slot></span>\n </label>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-checkbox\": BdCheckbox;\n }\n}\n"],"mappings":"A,qWAWO,IAAMI,EAAN,cAAyBC,EAAYC,CAAU,CAAC,AAAC,C,8BAM/C,KAAA,KAAA,GAEC,KAAA,MAAA,GAIE,KAAA,QAAA,GAEM,KAAA,cAAA,GAEL,KAAA,SAAA,GAEA,KAAA,SAAA,GAEH,KAAA,MAAA,E,QAnBQ,KAAA,OAAA,CAACN,CAAW,C,CAuB5B,mBAAoB,CAClB,MAAM,kBAAkB,EAIxB,KAAK,YAAc,CAAE,QAAS,KAAK,QAAS,cAAe,KAAK,aAAc,CAChF,CAEA,IAAc,UAAoC,CAChD,OAAO,KAAK,YAAY,gBAAgB,OAAO,CACjD,CAGA,WAAsB,CACpB,KAAK,UAAU,MAAM,CACvB,CAEA,SAAU,CAER,KAAK,WAAW,aAAa,KAAK,QAAU,KAAK,OAAS,KAAO,KAAM,OAAO,KAAK,OAAO,CAAC,EAC3F,KAAK,gBAAgB,KAAK,QAAQ,CACpC,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EAInB,KAAK,YACV,KAAK,QAAU,KAAK,UAAU,QAC9B,KAAK,cAAgB,KAAK,UAAU,cACtC,CAEA,yBAAyB,EAAwC,CAC/D,KAAK,QAAUQ,IAAU,MAC3B,CAEA,UAAU,EAAyC,CAK7C,KAAK,gBAAe,EAAE,OAAO,QAAU,IAC3C,KAAK,cAAgB,GACrB,KAAK,QAAU,EAAE,OAAO,QAIxB,KAAK,cACH,IAAI,YAAY,SAAU,CACxB,OAAU,CAAE,QAAS,KAAK,QAAS,MAAO,KAAK,QAAU,KAAK,MAAQ,KAAM,KAAM,KAAK,IAAK,EAC5F,QAAU,GACV,SAAU,EACZ,CAAC,CACH,CACF,CAMA,WAAW,EAAkB,CACvB,EAAE,MAAQ,UACd,EAAE,eAAe,EACjB,KAAK,kBAAkB,EACzB,CAEA,aAAc,CAWZ,OAVI,KAAK,cACA,CAAI;;cAIT,KAAK,QACA,CAAI;;cAIN,EACT,CAEA,QAAS,CAOP,MAAO,EAAI;;;;qBAIM,KAAK,QAAQ;2BACP,KAAK,cAAc;sBACxB,KAAK,UAAY,KAAK,cAAc;sBACpC,KAAK,SAAS;oBAChB,KAAK,UAAU;qBACd,KAAK,WAAW;;uCAEE,KAAK,YAAY,EAAE;iDACT,KAAK,MAAM;;KAG1D,CACF,EA3HGP,EAAA,CAAAQ,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAWC,CAAU,CAAC,CAAA,EAAAN,EAAA,UAAA,OAAA,IAAA,EAAA,EAE9DH,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAIzBH,EAAA,CAAAQ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAL,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzCH,EAAA,CAAAQ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAL,EAAA,UAAA,gBAAA,IAAA,EAAA,EAEzCH,EAAA,CAAAQ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAL,EAAA,UAAA,WAAA,IAAA,EAAA,EAEzCH,EAAA,CAAAQ,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,EAAAL,EAAA,UAAA,WAAA,IAAA,EAAA,EAE1BH,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EApB3B,EAAAH,EAAA,CAAAU,EAAc,aAAa,CAAA,EAAAP,CAAA,E"}
|
|
@@ -1,74 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Styled entirely from design tokens — see npm run lint:tokens. */
|
|
3
|
-
export const codeCSS = css `
|
|
4
|
-
:host { display: inline; }
|
|
5
|
-
|
|
6
|
-
/* Scoped to the inline case: block mode nests a <code> inside the <pre>,
|
|
7
|
-
and an unscoped code selector would give it the inline chrome too. */
|
|
8
|
-
:host(:not([block])) code {
|
|
9
|
-
font-family: var(--typography-code-inline-fontFamily);
|
|
10
|
-
font-size: var(--typography-code-inline-fontSize);
|
|
11
|
-
font-weight: var(--typography-code-inline-fontWeight);
|
|
12
|
-
line-height: var(--typography-code-inline-lineHeight);
|
|
13
|
-
letter-spacing: var(--typography-code-inline-letterSpacing);
|
|
14
|
-
/* an explicit colour, not an inherited one: the background is fixed, so
|
|
15
|
-
inheriting a light foreground from a dark section put white on
|
|
16
|
-
neutral-50 at 1.12:1 */
|
|
17
|
-
color: var(--color-text-primary);
|
|
18
|
-
background: var(--color-surface-subtle);
|
|
19
|
-
padding: 0 var(--spacing-4);
|
|
20
|
-
border-radius: var(--shape-radius-sm);
|
|
21
|
-
/* a token name is one long unbreakable word, so let it break rather than
|
|
22
|
-
overflow a narrow column */
|
|
23
|
-
overflow-wrap: break-word;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([block]) { display: block; }
|
|
27
|
-
|
|
28
|
-
:host([block]) pre {
|
|
29
|
-
margin: 0;
|
|
30
|
-
font-family: var(--typography-code-block-fontFamily);
|
|
31
|
-
font-size: var(--typography-code-block-fontSize);
|
|
32
|
-
font-weight: var(--typography-code-block-fontWeight);
|
|
33
|
-
line-height: var(--typography-code-block-lineHeight);
|
|
34
|
-
letter-spacing: var(--typography-code-block-letterSpacing);
|
|
35
|
-
color: var(--color-text-primary);
|
|
36
|
-
background: var(--color-surface-subtle);
|
|
37
|
-
padding: var(--spacing-16);
|
|
38
|
-
/* --radius-xl, not --radius-3xl. 24px was the only use of the top step in
|
|
39
|
-
the whole atom layer — the Radius Census story labelled the row "code
|
|
40
|
-
block, and nothing else" — and because the focus ring is a box-shadow
|
|
41
|
-
that follows the element's own shape, it also made this the only atom
|
|
42
|
-
whose ring was a 24px rounded rectangle where every other one is 4-8px.
|
|
43
|
-
12px still reads softer than a control, which is the point of the
|
|
44
|
-
difference, without being the outlier. */
|
|
45
|
-
border-radius: var(--shape-radius-xl);
|
|
46
|
-
overflow-x: auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* the nested <code> carries the semantics only; the <pre> does the styling */
|
|
50
|
-
:host([block]) code {
|
|
51
|
-
font: inherit;
|
|
52
|
-
letter-spacing: inherit;
|
|
53
|
-
color: inherit;
|
|
54
|
-
background: none;
|
|
55
|
-
padding: 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* the block is focusable so it can be scrolled from the keyboard, so it
|
|
59
|
-
needs a visible focus indicator of its own */
|
|
60
|
-
:host([block]) pre:focus-visible {
|
|
61
|
-
/* the one focus ring — see Foundations/Focus. A two-colour ring whose
|
|
62
|
-
white inner band keeps it visible on a coloured or dark surface, which a
|
|
63
|
-
single-colour outline cannot do. */
|
|
64
|
-
/* forced-colors mode does not paint box-shadow, so the ring
|
|
65
|
-
vanishes there; it does paint an outline, in a system colour. This one
|
|
66
|
-
is transparent everywhere else, and the offset lands it on the ring's
|
|
67
|
-
outer band. */
|
|
68
|
-
outline: var(--border-width-2) solid transparent;
|
|
69
|
-
outline-offset: var(--focus-outline-offset);
|
|
70
|
-
box-shadow: var(--focus-outline-primary);
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
export default codeCSS;
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{display:inline}:host(:not([block])) code{font-family:var(--typography-code-inline-fontFamily);font-size:var(--typography-code-inline-fontSize);font-weight:var(--typography-code-inline-fontWeight);line-height:var(--typography-code-inline-lineHeight);letter-spacing:var(--typography-code-inline-letterSpacing);color:var(--color-text-primary);background:var(--color-surface-subtle);padding:0 var(--spacing-4);border-radius:var(--shape-radius-sm);overflow-wrap:break-word}:host([block]){display:block}:host([block]) pre{font-family:var(--typography-code-block-fontFamily);font-size:var(--typography-code-block-fontSize);font-weight:var(--typography-code-block-fontWeight);line-height:var(--typography-code-block-lineHeight);letter-spacing:var(--typography-code-block-letterSpacing);color:var(--color-text-primary);background:var(--color-surface-subtle);padding:var(--spacing-16);border-radius:var(--shape-radius-xl);margin:0;overflow-x:auto}:host([block]) code{font:inherit;letter-spacing:inherit;color:inherit;background:0 0;padding:0}:host([block]) pre:focus-visible{outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);box-shadow:var(--focus-outline-primary)}`;export{t as codeCSS,t as default};
|
|
74
2
|
//# sourceMappingURL=code.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.css.js","
|
|
1
|
+
{"version":3,"file":"code.css.js","names":["codeCSS"],"sources":["../../../../src/components/code/code.css.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** Styled entirely from design tokens — see npm run lint:tokens. */\nexport const codeCSS = css`\n :host { display: inline; }\n\n /* Scoped to the inline case: block mode nests a <code> inside the <pre>,\n and an unscoped code selector would give it the inline chrome too. */\n :host(:not([block])) code {\n font-family: var(--typography-code-inline-fontFamily);\n font-size: var(--typography-code-inline-fontSize);\n font-weight: var(--typography-code-inline-fontWeight);\n line-height: var(--typography-code-inline-lineHeight);\n letter-spacing: var(--typography-code-inline-letterSpacing);\n /* an explicit colour, not an inherited one: the background is fixed, so\n inheriting a light foreground from a dark section put white on\n neutral-50 at 1.12:1 */\n color: var(--color-text-primary);\n background: var(--color-surface-subtle);\n padding: 0 var(--spacing-4);\n border-radius: var(--shape-radius-sm);\n /* a token name is one long unbreakable word, so let it break rather than\n overflow a narrow column */\n overflow-wrap: break-word;\n }\n\n :host([block]) { display: block; }\n\n :host([block]) pre {\n margin: 0;\n font-family: var(--typography-code-block-fontFamily);\n font-size: var(--typography-code-block-fontSize);\n font-weight: var(--typography-code-block-fontWeight);\n line-height: var(--typography-code-block-lineHeight);\n letter-spacing: var(--typography-code-block-letterSpacing);\n color: var(--color-text-primary);\n background: var(--color-surface-subtle);\n padding: var(--spacing-16);\n /* --radius-xl, not --radius-3xl. 24px was the only use of the top step in\n the whole atom layer — the Radius Census story labelled the row \"code\n block, and nothing else\" — and because the focus ring is a box-shadow\n that follows the element's own shape, it also made this the only atom\n whose ring was a 24px rounded rectangle where every other one is 4-8px.\n 12px still reads softer than a control, which is the point of the\n difference, without being the outlier. */\n border-radius: var(--shape-radius-xl);\n overflow-x: auto;\n }\n\n /* the nested <code> carries the semantics only; the <pre> does the styling */\n :host([block]) code {\n font: inherit;\n letter-spacing: inherit;\n color: inherit;\n background: none;\n padding: 0;\n }\n\n /* the block is focusable so it can be scrolled from the keyboard, so it\n needs a visible focus indicator of its own */\n :host([block]) pre:focus-visible {\n /* the one focus ring — see Foundations/Focus. A two-colour ring whose\n white inner band keeps it visible on a coloured or dark surface, which a\n single-colour outline cannot do. */\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 box-shadow: var(--focus-outline-primary);\n }\n`;\n\nexport default codeCSS;\n"],"mappings":"A,0BAGA,IAAaA,EAAU,CAAG,qrC"}
|
|
@@ -1,89 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html, nothing } from 'lit';
|
|
8
|
-
import { property } from 'lit/decorators.js';
|
|
9
|
-
import { defineElement } from "../shared/define-element.js";
|
|
10
|
-
// Installs the design tokens into document scope; see src/tokens/tokens.ts
|
|
11
|
-
import "../../tokens/tokens.js";
|
|
12
|
-
import { codeCSS } from "./code.css.js";
|
|
13
|
-
let BdCode = class BdCode extends LitElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.block = false;
|
|
17
|
-
this.label = '';
|
|
18
|
-
}
|
|
19
|
-
static { this.styles = [codeCSS]; }
|
|
20
|
-
/* Whether the block is wider than its box. Only then is there anything to
|
|
21
|
-
scroll, and only then does it need to be a tab stop. The box changes
|
|
22
|
-
size with the page, and the content with the light DOM, so both are
|
|
23
|
-
watched. */
|
|
24
|
-
_measure() {
|
|
25
|
-
const pre = this.shadowRoot?.querySelector('pre');
|
|
26
|
-
const scrollable = !!pre && pre.scrollWidth > pre.clientWidth;
|
|
27
|
-
if (scrollable !== this._scrollable) {
|
|
28
|
-
this._scrollable = scrollable;
|
|
29
|
-
this.requestUpdate();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
updated() {
|
|
33
|
-
const pre = this.shadowRoot.querySelector('pre');
|
|
34
|
-
if (pre && pre !== this._observed) {
|
|
35
|
-
this._resize?.disconnect();
|
|
36
|
-
this._resize = new ResizeObserver(() => this._measure());
|
|
37
|
-
this._resize.observe(pre);
|
|
38
|
-
this._observed = pre;
|
|
39
|
-
}
|
|
40
|
-
if (!pre) {
|
|
41
|
-
this._resize?.disconnect();
|
|
42
|
-
this._observed = null;
|
|
43
|
-
}
|
|
44
|
-
this._measure();
|
|
45
|
-
}
|
|
46
|
-
connectedCallback() {
|
|
47
|
-
super.connectedCallback();
|
|
48
|
-
this._content = new MutationObserver(() => this._measure());
|
|
49
|
-
this._content.observe(this, { childList: true, characterData: true, subtree: true });
|
|
50
|
-
}
|
|
51
|
-
disconnectedCallback() {
|
|
52
|
-
this._content?.disconnect();
|
|
53
|
-
this._resize?.disconnect();
|
|
54
|
-
this._observed = null;
|
|
55
|
-
super.disconnectedCallback();
|
|
56
|
-
}
|
|
57
|
-
render() {
|
|
58
|
-
// Block mode nests <code> inside <pre>: <pre> carries the preformatted
|
|
59
|
-
// whitespace, <code> carries "this is code". A bare <pre> is only
|
|
60
|
-
// preformatted text, so assistive tech got no signal it was code at all,
|
|
61
|
-
// even though the inline variant gave one.
|
|
62
|
-
//
|
|
63
|
-
// A <pre> that scrolls horizontally has to be focusable, or it cannot be
|
|
64
|
-
// scrolled from the keyboard (WCAG 2.1.1), and a focusable element needs
|
|
65
|
-
// a name. It is a group, not a region: a named region is a landmark, so
|
|
66
|
-
// every code block on a page joined the landmark list a screen reader
|
|
67
|
-
// navigates by, beside header, main and footer. And it is a tab stop only
|
|
68
|
-
// while it overflows; a snippet that fits has nothing to scroll and was a
|
|
69
|
-
// stop that did nothing.
|
|
70
|
-
return this.block
|
|
71
|
-
? html `<pre
|
|
72
|
-
tabindex="${this._scrollable ? '0' : nothing}"
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{codeCSS as n}from"./code.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends r{constructor(...e){super(...e),this.block=!1,this.label=``}static{this.styles=[n]}_measure(){let e=this.shadowRoot?.querySelector(`pre`),t=!!e&&e.scrollWidth>e.clientWidth;t!==this._scrollable&&(this._scrollable=t,this.requestUpdate())}updated(){let e=this.shadowRoot.querySelector(`pre`);e&&e!==this._observed&&(this._resize?.disconnect(),this._resize=new ResizeObserver(()=>this._measure()),this._resize.observe(e),this._observed=e),e||(this._resize?.disconnect(),this._observed=null),this._measure()}connectedCallback(){super.connectedCallback(),this._content=new MutationObserver(()=>this._measure()),this._content.observe(this,{childList:!0,characterData:!0,subtree:!0})}disconnectedCallback(){this._content?.disconnect(),this._resize?.disconnect(),this._observed=null,super.disconnectedCallback()}render(){return this.block?i`<pre
|
|
2
|
+
tabindex="${this._scrollable?`0`:a}"
|
|
73
3
|
role="group"
|
|
74
|
-
aria-label="${this.label
|
|
75
|
-
><code><slot></slot></code></pre>`
|
|
76
|
-
: html `<code><slot></slot></code>`;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
__decorate([
|
|
80
|
-
property({ type: Boolean, reflect: true })
|
|
81
|
-
], BdCode.prototype, "block", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
property({ type: String })
|
|
84
|
-
], BdCode.prototype, "label", void 0);
|
|
85
|
-
BdCode = __decorate([
|
|
86
|
-
defineElement('bd-code')
|
|
87
|
-
], BdCode);
|
|
88
|
-
export { BdCode };
|
|
4
|
+
aria-label="${this.label||`Code`}"
|
|
5
|
+
><code><slot></slot></code></pre>`:i`<code><slot></slot></code>`}};t([o({type:Boolean,reflect:!0})],s.prototype,`block`,void 0),t([o({type:String})],s.prototype,`label`,void 0),s=t([e(`bd-code`)],s);export{s as BdCode};
|
|
89
6
|
//# sourceMappingURL=code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.js","
|
|
1
|
+
{"version":3,"file":"code.js","names":["_decorate","__decorate","BdCode","LitElement","_args","codeCSS","pre","scrollable","nothing","property","defineElement"],"sources":["../../../../src/components/code/code.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { defineElement } from '#shared/define-element.ts';\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport '#tokens/tokens.ts';\nimport { codeCSS } from './code.css.ts';\n\n@defineElement('bd-code')\nexport class BdCode extends LitElement {\n static styles = [codeCSS];\n\n @property({ type: Boolean, reflect: true })\n block = false;\n @property({ type: String })\n label = '';\n\n _scrollable?: boolean;\n _resize? : ResizeObserver;\n _observed? : HTMLPreElement | null;\n _content? : MutationObserver;\n\n /* Whether the block is wider than its box. Only then is there anything to\n scroll, and only then does it need to be a tab stop. The box changes\n size with the page, and the content with the light DOM, so both are\n watched. */\n _measure() {\n const pre = this.shadowRoot?.querySelector('pre');\n const scrollable = !!pre && pre.scrollWidth > pre.clientWidth;\n if (scrollable !== this._scrollable) {\n this._scrollable = scrollable;\n this.requestUpdate();\n }\n }\n\n updated() {\n const pre = this.shadowRoot!.querySelector('pre');\n if (pre && pre !== this._observed) {\n this._resize?.disconnect();\n this._resize = new ResizeObserver(() => this._measure());\n this._resize.observe(pre);\n this._observed = pre;\n }\n if (!pre) { this._resize?.disconnect(); this._observed = null; }\n this._measure();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._content = new MutationObserver(() => this._measure());\n this._content.observe(this, { childList: true, characterData: true, subtree: true });\n }\n\n disconnectedCallback() {\n this._content?.disconnect();\n this._resize?.disconnect();\n this._observed = null;\n super.disconnectedCallback();\n }\n\n render() {\n // Block mode nests <code> inside <pre>: <pre> carries the preformatted\n // whitespace, <code> carries \"this is code\". A bare <pre> is only\n // preformatted text, so assistive tech got no signal it was code at all,\n // even though the inline variant gave one.\n //\n // A <pre> that scrolls horizontally has to be focusable, or it cannot be\n // scrolled from the keyboard (WCAG 2.1.1), and a focusable element needs\n // a name. It is a group, not a region: a named region is a landmark, so\n // every code block on a page joined the landmark list a screen reader\n // navigates by, beside header, main and footer. And it is a tab stop only\n // while it overflows; a snippet that fits has nothing to scroll and was a\n // stop that did nothing.\n return this.block\n ? html`<pre\n tabindex=\"${this._scrollable ? '0' : nothing}\"\n role=\"group\"\n aria-label=\"${this.label || 'Code'}\"\n ><code><slot></slot></code></pre>`\n : html`<code><slot></slot></code>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-code': BdCode;\n }\n}\n"],"mappings":"A,kTAQO,IAAME,EAAN,cAAqBC,CAAW,C,8BAI7B,KAAA,MAAA,GAEA,KAAA,MAAA,E,QALQ,KAAA,OAAA,CAACE,CAAO,C,CAgBxB,UAAW,CACT,IAAMC,EAAM,KAAK,YAAY,cAAc,KAAK,EAC1CC,EAAa,CAAC,CAACD,GAAOA,EAAI,YAAcA,EAAI,YAC9CC,IAAe,KAAK,cACtB,KAAK,YAAcA,EACnB,KAAK,cAAc,EAEvB,CAEA,SAAU,CACR,IAAMD,EAAM,KAAK,WAAY,cAAc,KAAK,EAC5CA,GAAOA,IAAQ,KAAK,YACtB,KAAK,SAAS,WAAW,EACzB,KAAK,QAAU,IAAI,mBAAqB,KAAK,SAAS,CAAC,EACvD,KAAK,QAAQ,QAAQA,CAAG,EACxB,KAAK,UAAYA,GAEdA,IAAO,KAAK,SAAS,WAAW,EAAG,KAAK,UAAY,MACzD,KAAK,SAAS,CAChB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,SAAW,IAAI,qBAAuB,KAAK,SAAS,CAAC,EAC1D,KAAK,SAAS,QAAQ,KAAM,CAAE,UAAW,GAAM,cAAe,GAAM,QAAS,EAAK,CAAC,CACrF,CAEA,sBAAuB,CACrB,KAAK,UAAU,WAAW,EAC1B,KAAK,SAAS,WAAW,EACzB,KAAK,UAAY,KACjB,MAAM,qBAAqB,CAC7B,CAEA,QAAS,CAaP,OAAO,KAAK,MACR,CAAI;sBACU,KAAK,YAAc,IAAME,EAAQ;;wBAE/B,KAAK,OAAS,OAAO;2CAErC,CAAI,4BACV,CACF,EArEGR,EAAA,CAAAS,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzCF,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAN3B,EAAAF,EAAA,CAAAU,EAAc,SAAS,CAAA,EAAAR,CAAA,E"}
|