@repobit/dex-system-design 4.3.3 → 4.5.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 +25 -0
- 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/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 +15 -6
- package/dist/src/components/cta-banner/cta-banner.js +14 -11
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/fact/fact.css.js +1 -1
- package/dist/src/components/fact/fact.css.js.map +1 -1
- package/dist/src/components/feature-columns/feature-columns.css.js +1 -1
- package/dist/src/components/feature-columns/feature-columns.css.js.map +1 -1
- 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 +1 -0
- package/dist/src/components/features-tab/features-tab.js +4 -4
- package/dist/src/components/features-tab/features-tab.js.map +1 -1
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.d.ts +2 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.js +2 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.js.map +1 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.d.ts +25 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.js +6 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner-item.js.map +1 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.css.d.ts +2 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.css.js +2 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.css.js.map +1 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.d.ts +36 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.js +9 -0
- package/dist/src/components/icon-columns-banner/icon-columns-banner.js.map +1 -0
- package/dist/src/components/product-hero/product-hero.css.js +1 -1
- package/dist/src/components/product-hero/product-hero.css.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 +40 -4
- package/dist/src/components/section/section.js +1 -1
- package/dist/src/components/section/section.js.map +1 -1
- 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/tab-group/tab-group.css.js +1 -1
- package/dist/src/components/tab-group/tab-group.css.js.map +1 -1
- package/dist/src/components/tab-group/tab-group.js +4 -2
- package/dist/src/components/tab-group/tab-group.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/tokens.css +1 -1
- package/dist/src/tokens/tokens.js +1 -1
- package/dist/src/tokens/tokens.js.map +1 -1
- package/package.json +6 -2
- package/schemas/component-manifest.json +130 -4
- package/schemas/figma-component-map.json +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.4.0...@repobit/dex-system-design@4.5.0) (2026-11-25)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **DEX-29434:** split columns
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **DEX-29434:** clear remaining design-system checks
|
|
15
|
+
* **DEX-29434:** mark icon-columns-banner measures as not the column
|
|
16
|
+
* **DEX-29434:** satisfy ensemble, token and breakpoint gates for icon-columns-banner
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [4.4.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.3.3...@repobit/dex-system-design@4.4.0) (2026-11-25)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **DEX-28696:** bd-section grounds and even spacing where the ground changes
|
|
24
|
+
* **DEX-28696:** product hero headline set at a 1.1 leading
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **DEX-28696:** classify bd-section's background in the string-props registry
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [4.3.3](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.3.2...@repobit/dex-system-design@4.3.3) (2026-11-25)
|
|
7
32
|
|
|
8
33
|
**Note:** Version bump only for package @repobit/dex-system-design
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{margin-bottom:var(--bd-acc-item-margin-bottom,var(--spacing-16));box-sizing:border-box;border-radius:var(--shape-radius-sm);display:block}:host([hidden]){display:none}:host(:last-child),:host([appearance=faq][background=none]:last-of-type){margin-bottom:0}.disclosure{border-radius:inherit}.disclosure:has(>.heading>.header:focus-visible){z-index:var(--z-base);background-color:inherit;box-shadow:var(--focus-outline-primary);outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);position:relative}.heading{margin:0}::slotted(bd-list){--bd-li-margin-bottom:var(--spacing-16);margin-bottom:var(--spacing-16);display:block}::slotted(bd-list:last-child){margin-bottom:0}::slotted(bd-p:last-of-type){--bd-paragraph-margin-bottom:0}.header{width:100%;padding:var(--bd-acc-header-padding,var(--spacing-0));text-align:start;cursor:pointer;align-items:flex-start;gap:var(--bd-acc-icon-gap,var(--spacing-12));font-family:var(--bd-acc-title-font-family,var(--typography-label-large-fontFamily));font-style:normal;font-size:var(--bd-acc-title-font-size,var(--typography-label-large-fontSize));font-weight:var(--bd-acc-title-font-weight,var(--typography-label-large-fontWeight));line-height:var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight));margin-bottom:var(--bd-acc-header-margin-bottom,var(--spacing-16));--bd-heading-color:var(--bd-acc-title-color-collapsed,var(--color-text-brand));background:0 0;border:none;display:flex}.header:focus-visible{outline:none}.header[aria-expanded=true]{--bd-heading-color:var(--bd-acc-title-color-expanded,var(--color-text-brand))}.header[aria-expanded=true]:hover{--bd-heading-color:var(--bd-acc-title-color-hover,var(--bd-acc-title-color-expanded,var(--color-text-brand)))}.header[aria-expanded=false]:hover{--bd-heading-color:var(--bd-acc-title-color-hover,var(--bd-acc-title-color-collapsed,var(--color-text-brand)))}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--bd-acc-title-font-size,var(--typography-label-large-fontSize));--bd-heading-font-weight:var(--bd-acc-title-font-weight,var(--typography-label-large-fontWeight));--bd-heading-line-height:var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight));--bd-heading-letter-spacing:var(--bd-acc-title-letter-spacing,var(--typography-label-large-letterSpacing));--bd-heading-font-family:var(--bd-acc-title-font-family,var(--typography-label-large-fontFamily))}.toggle{width:var(--bd-acc-toggle-size,var(--icon-sm-size));min-width:var(--bd-acc-toggle-size,var(--icon-sm-size));height:var(--bd-acc-toggle-size,var(--icon-sm-size));line-height:var(--typography-lineHeight-none);-webkit-user-select:none;user-select:none;margin-top:calc((var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight)) * 1em - var(--bd-acc-toggle-size,var(--icon-sm-size))) / 2);color:var(--color-text-brand);flex-shrink:0;justify-content:center;align-items:center;display:flex}.title-badge-wrapper{align-items:center;gap:var(--spacing-8);flex-wrap:wrap;flex:1;display:flex}.title{min-width:0}.content{padding-block:var(--bd-acc-panel-padding-block,0);padding-inline:var(--bd-acc-panel-padding-inline,calc(var(--icon-sm-size) + var(--spacing-12)) 0);font-family:var(--typography-fontFamily-sans);font-size:var(--bd-acc-panel-font-size,var(--typography-body-small-fontSize));font-weight:var(--bd-acc-panel-font-weight,var(--typography-body-small-fontWeight));line-height:var(--bd-acc-panel-line-height,var(--typography-body-small-lineHeight));color:var(--bd-acc-panel-color,var(--color-text-primary))}.content[hidden]:not([hidden=until-found i]){display:none!important}.content[hidden]{padding-block:0;position:absolute}::slotted(p){margin-top:0;margin-bottom:var(--bd-acc-panel-paragraph-gap,var(--spacing-16));font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit;color:inherit}::slotted(p:last-child){margin-bottom:0}:host([appearance=small]){--bd-acc-header-padding:var(--spacing-12) var(--spacing-8);--bd-acc-header-margin-bottom:var(--spacing-0);--bd-acc-icon-gap:var(--spacing-12);--bd-acc-toggle-size:var(--icon-sm-size);--bd-acc-title-font-size:var(--typography-label-default-fontSize);--bd-acc-title-font-weight:var(--typography-label-default-fontWeight);--bd-acc-title-line-height:var(--typography-label-default-lineHeight);--bd-acc-title-letter-spacing:var(--typography-label-default-letterSpacing);--bd-acc-title-font-family:var(--typography-label-default-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-primary);--bd-acc-title-color-expanded:var(--color-text-brand-hover);--bd-acc-title-color-hover:var(--color-text-brand);--bd-acc-panel-font-size:var(--typography-caption-default-fontSize);--bd-acc-panel-font-weight:var(--typography-caption-default-fontWeight);--bd-acc-panel-line-height:var(--typography-caption-default-lineHeight);--bd-acc-panel-color:var(--color-text-primary);--bd-acc-panel-padding-block:var(--spacing-0) var(--spacing-8);--bd-acc-panel-padding-inline:var(--spacing-36) var(--spacing-8);--bd-acc-panel-paragraph-gap:var(--spacing-0);--bd-acc-item-margin-bottom:var(--spacing-0)}:host([appearance=faq]){--bd-acc-header-padding:var(--spacing-16) var(--spacing-0);--bd-acc-header-margin-bottom:var(--spacing-0);--bd-acc-title-font-size:var(--typography-control-label-xl-fontSize);--bd-acc-title-font-weight:var(--typography-control-label-xl-fontWeight);--bd-acc-title-line-height:var(--typography-control-label-xl-lineHeight);--bd-acc-title-letter-spacing:var(--typography-control-label-xl-letterSpacing);--bd-acc-title-font-family:var(--typography-control-label-xl-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-primary);--bd-acc-title-color-expanded:var(--color-text-brand);--bd-acc-title-color-hover:var(--color-text-brand);--bd-acc-panel-padding-block:var(--spacing-0)}:host([appearance=faq][open]){--bd-acc-panel-padding-block:var(--spacing-0) var(--spacing-16)}:host([appearance=faq]) .content{overflow:hidden}:host([appearance=faq][background=none]){border-radius:var(--radius-none);--bd-acc-panel-padding-inline:var(--spacing-40)}:host([appearance=faq][background=none][open]){--bd-acc-panel-padding-block:var(--spacing-16)}:host([appearance=terms]){border-radius:var(--radius-none)}:host([appearance=terms][background=none]) .disclosure:has(>.heading>.header:focus-visible),:host([appearance=faq][background=none]) .disclosure:has(>.heading>.header:focus-visible){border-radius:var(--focus-outline-radius)}:host([appearance=chevron]){--bd-acc-title-font-size:var(--typography-label-default-fontSize);--bd-acc-title-font-weight:var(--typography-label-default-fontWeight);--bd-acc-title-line-height:var(--typography-label-default-lineHeight);--bd-acc-title-letter-spacing:var(--typography-label-default-letterSpacing);--bd-acc-title-font-family:var(--typography-label-default-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-brand);--bd-acc-title-color-expanded:var(--color-text-brand);--bd-acc-icon-gap:var(--spacing-8);--bd-acc-header-padding:var(--spacing-0);--bd-acc-header-margin-bottom:var(--spacing-24);--bd-acc-panel-padding-block:var(--spacing-0);--bd-acc-panel-padding-inline:var(--spacing-0)}:host([appearance=chevron]) .header{border-radius:var(--radius-none);justify-content:flex-start;align-items:center;width:auto;display:inline-flex}:host([appearance=chevron]) .title-badge-wrapper{flex:0 auto}:host([appearance=chevron]) ::slotted(bd-h[slot=title]){white-space:nowrap}:host([appearance=chevron]) .header:hover ::slotted(bd-h[slot=title]){text-decoration:underline}:host([appearance=chevron]) .toggle{width:16px;min-width:16px;height:16px;margin-top:0}:host([background=container]){background-color:var(--color-surface-container);border-radius:var(--shape-radius-lg)}:host([background=tint]){background-color:var(--status-brand-surface);border-radius:var(--shape-radius-lg)}:host([background=container]) .disclosure,:host([background=tint]) .disclosure{padding-inline:var(--spacing-16)}:host([background=container]:not([appearance=faq])) .disclosure,:host([background=tint]:not([appearance=faq])) .disclosure{padding-block:var(--spacing-16)}:host([background=container]:not([appearance=faq]):not([open])),:host([background=tint]:not([appearance=faq]):not([open])){--bd-acc-header-margin-bottom:var(--spacing-0)}`,n=e`:host{display:block}.band{border-radius:var(--radius-none);box-sizing:border-box;padding-block:var(--bd-acc-section-padding-v,var(--spacing-32))}:host([background=container]) .band{background-color:var(--color-surface-container)}:host([background=tint]) .band{background-color:var(--status-brand-surface)}.inner{box-sizing:border-box}:host([appearance=small]){--bd-acc-section-padding-v:var(--spacing-24)}:host([appearance=faq]){--bd-acc-section-padding-v:var(--spacing-64)}:host([without-padding]) .band{padding-block:var(--spacing-0)}.title{margin-bottom:var(--spacing-24)}:host([appearance=small]) .title{margin-bottom:var(--spacing-16)}:host([appearance=terms]) .title{margin-bottom:var(--spacing-56)}:host([appearance=faq]) .title{margin-bottom:var(--spacing-32)}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h6-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-bold);--bd-heading-line-height:var(--typography-heading-h6-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h6-letterSpacing);--bd-heading-font-family:var(--typography-heading-h6-fontFamily)}:host([appearance=faq]) ::slotted(bd-h[slot=title]),:host([appearance=faq]) ::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);text-align:center}.footer{align-items:flex-start;gap:var(--spacing-16);margin-top:var(--spacing-32);flex-direction:column;display:flex}:host([appearance=faq]) .footer{margin-top:var(--spacing-0);padding-top:var(--spacing-16)}.footer[hidden]{display:none}::slotted(bd-p[slot=footer]){font-style:italic}`;export{n as accordionCSS,t as accordionItemCSS};
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{margin-bottom:var(--bd-acc-item-margin-bottom,var(--spacing-16));box-sizing:border-box;border-radius:var(--shape-radius-sm);display:block}:host([hidden]){display:none}:host(:last-child),:host([appearance=faq][background=none]:last-of-type){margin-bottom:0}.disclosure{border-radius:inherit}.disclosure:has(>.heading>.header:focus-visible){z-index:var(--z-base);background-color:inherit;box-shadow:var(--focus-outline-primary);outline:var(--border-width-2) solid transparent;outline-offset:var(--focus-outline-offset);position:relative}.heading{margin:0}::slotted(bd-list){--bd-li-margin-bottom:var(--spacing-16);margin-bottom:var(--spacing-16);display:block}::slotted(bd-list:last-child){margin-bottom:0}::slotted(bd-p:last-of-type){--bd-paragraph-margin-bottom:0}.header{width:100%;padding:var(--bd-acc-header-padding,var(--spacing-0));text-align:start;cursor:pointer;align-items:flex-start;gap:var(--bd-acc-icon-gap,var(--spacing-12));font-family:var(--bd-acc-title-font-family,var(--typography-label-large-fontFamily));font-style:normal;font-size:var(--bd-acc-title-font-size,var(--typography-label-large-fontSize));font-weight:var(--bd-acc-title-font-weight,var(--typography-label-large-fontWeight));line-height:var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight));margin-bottom:var(--bd-acc-header-margin-bottom,var(--spacing-16));--bd-heading-color:var(--bd-acc-title-color-collapsed,var(--color-text-brand));background:0 0;border:none;display:flex}.header:focus-visible{outline:none}.header[aria-expanded=true]{--bd-heading-color:var(--bd-acc-title-color-expanded,var(--color-text-brand))}.header[aria-expanded=true]:hover{--bd-heading-color:var(--bd-acc-title-color-hover,var(--bd-acc-title-color-expanded,var(--color-text-brand)))}.header[aria-expanded=false]:hover{--bd-heading-color:var(--bd-acc-title-color-hover,var(--bd-acc-title-color-collapsed,var(--color-text-brand)))}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--bd-acc-title-font-size,var(--typography-label-large-fontSize));--bd-heading-font-weight:var(--bd-acc-title-font-weight,var(--typography-label-large-fontWeight));--bd-heading-line-height:var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight));--bd-heading-letter-spacing:var(--bd-acc-title-letter-spacing,var(--typography-label-large-letterSpacing));--bd-heading-font-family:var(--bd-acc-title-font-family,var(--typography-label-large-fontFamily))}.toggle{width:var(--bd-acc-toggle-size,var(--icon-sm-size));min-width:var(--bd-acc-toggle-size,var(--icon-sm-size));height:var(--bd-acc-toggle-size,var(--icon-sm-size));line-height:var(--typography-lineHeight-none);-webkit-user-select:none;user-select:none;margin-top:calc((var(--bd-acc-title-line-height,var(--typography-label-large-lineHeight)) * 1em - var(--bd-acc-toggle-size,var(--icon-sm-size))) / 2);color:var(--color-text-brand);flex-shrink:0;justify-content:center;align-items:center;display:flex}.title-badge-wrapper{align-items:center;gap:var(--spacing-8);flex-wrap:wrap;flex:1;display:flex}.title{min-width:0}.content{padding-block:var(--bd-acc-panel-padding-block,0);padding-inline:var(--bd-acc-panel-padding-inline,calc(var(--icon-sm-size) + var(--spacing-12)) 0);font-family:var(--typography-fontFamily-sans);font-size:var(--bd-acc-panel-font-size,var(--typography-body-small-fontSize));font-weight:var(--bd-acc-panel-font-weight,var(--typography-body-small-fontWeight));line-height:var(--bd-acc-panel-line-height,var(--typography-body-small-lineHeight));color:var(--bd-acc-panel-color,var(--color-text-primary))}.content[hidden]:not([hidden=until-found i]){display:none!important}.content[hidden]{padding-block:0;position:absolute}::slotted(p){margin-top:0;margin-bottom:var(--bd-acc-panel-paragraph-gap,var(--spacing-16));font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit;color:inherit}::slotted(p:last-child){margin-bottom:0}:host([appearance=small]){--bd-acc-header-padding:var(--spacing-12) var(--spacing-8);--bd-acc-header-margin-bottom:var(--spacing-0);--bd-acc-icon-gap:var(--spacing-12);--bd-acc-toggle-size:var(--icon-sm-size);--bd-acc-title-font-size:var(--typography-label-default-fontSize);--bd-acc-title-font-weight:var(--typography-label-default-fontWeight);--bd-acc-title-line-height:var(--typography-label-default-lineHeight);--bd-acc-title-letter-spacing:var(--typography-label-default-letterSpacing);--bd-acc-title-font-family:var(--typography-label-default-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-primary);--bd-acc-title-color-expanded:var(--color-text-brand-hover);--bd-acc-title-color-hover:var(--color-text-brand);--bd-acc-panel-font-size:var(--typography-caption-default-fontSize);--bd-acc-panel-font-weight:var(--typography-caption-default-fontWeight);--bd-acc-panel-line-height:var(--typography-caption-default-lineHeight);--bd-acc-panel-color:var(--color-text-primary);--bd-acc-panel-padding-block:var(--spacing-0) var(--spacing-8);--bd-acc-panel-padding-inline:var(--spacing-36) var(--spacing-8);--bd-acc-panel-paragraph-gap:var(--spacing-0);--bd-acc-item-margin-bottom:var(--spacing-0)}:host([appearance=faq]){--bd-acc-header-padding:var(--spacing-16) var(--spacing-0);--bd-acc-header-margin-bottom:var(--spacing-0);--bd-acc-title-font-size:var(--typography-control-label-xl-fontSize);--bd-acc-title-font-weight:var(--typography-control-label-xl-fontWeight);--bd-acc-title-line-height:var(--typography-control-label-xl-lineHeight);--bd-acc-title-letter-spacing:var(--typography-control-label-xl-letterSpacing);--bd-acc-title-font-family:var(--typography-control-label-xl-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-primary);--bd-acc-title-color-expanded:var(--color-text-brand);--bd-acc-title-color-hover:var(--color-text-brand);--bd-acc-panel-padding-block:var(--spacing-0)}:host([appearance=faq][open]){--bd-acc-panel-padding-block:var(--spacing-0) var(--spacing-16)}:host([appearance=faq]) .content{overflow:hidden}:host([appearance=faq][background=none]){border-radius:var(--radius-none);--bd-acc-panel-padding-inline:var(--spacing-40)}:host([appearance=faq][background=none][open]){--bd-acc-panel-padding-block:var(--spacing-16)}:host([appearance=terms]){border-radius:var(--radius-none)}:host([appearance=terms][background=none]) .disclosure:has(>.heading>.header:focus-visible),:host([appearance=faq][background=none]) .disclosure:has(>.heading>.header:focus-visible){border-radius:var(--focus-outline-radius)}:host([appearance=chevron]){--bd-acc-title-font-size:var(--typography-label-default-fontSize);--bd-acc-title-font-weight:var(--typography-label-default-fontWeight);--bd-acc-title-line-height:var(--typography-label-default-lineHeight);--bd-acc-title-letter-spacing:var(--typography-label-default-letterSpacing);--bd-acc-title-font-family:var(--typography-label-default-fontFamily);--bd-acc-title-color-collapsed:var(--color-text-brand);--bd-acc-title-color-expanded:var(--color-text-brand);--bd-acc-icon-gap:var(--spacing-8);--bd-acc-header-padding:var(--spacing-0);--bd-acc-header-margin-bottom:var(--spacing-24);--bd-acc-panel-padding-block:var(--spacing-0);--bd-acc-panel-padding-inline:var(--spacing-0)}:host([appearance=chevron]) .header{border-radius:var(--radius-none);justify-content:flex-start;align-items:center;width:auto;display:inline-flex}:host([appearance=chevron]) .title-badge-wrapper{flex:0 auto}:host([appearance=chevron]) ::slotted(bd-h[slot=title]){white-space:nowrap}:host([appearance=chevron]) .header:hover ::slotted(bd-h[slot=title]){text-decoration:underline}:host([appearance=chevron]) .toggle{width:16px;min-width:16px;height:16px;margin-top:0}:host([background=container]){background-color:var(--color-surface-container);border-radius:var(--shape-radius-lg)}:host([background=tint]){background-color:var(--status-brand-surface);border-radius:var(--shape-radius-lg)}:host([background=container]) .disclosure,:host([background=tint]) .disclosure{padding-inline:var(--spacing-16)}:host([background=container]:not([appearance=faq])) .disclosure,:host([background=tint]:not([appearance=faq])) .disclosure{padding-block:var(--spacing-16)}:host([background=container]:not([appearance=faq]):not([open])),:host([background=tint]:not([appearance=faq]):not([open])){--bd-acc-header-margin-bottom:var(--spacing-0)}`,n=e`:host{display:block}.band{border-radius:var(--radius-none);box-sizing:border-box;padding-block:var(--bd-acc-section-padding-v,var(--spacing-32))}:host([background=container]) .band{background-color:var(--color-surface-container)}:host([background=tint]) .band{background-color:var(--status-brand-surface)}.inner{box-sizing:border-box}:host([appearance=small]){--bd-acc-section-padding-v:var(--spacing-24)}:host([appearance=faq]){--bd-acc-section-padding-v:var(--spacing-64)}:host([appearance=faq][background=none]){--bd-acc-section-padding-v:var(--spacing-0)}:host([without-padding]) .band{padding-block:var(--spacing-0)}.title{margin-bottom:var(--spacing-24)}:host([appearance=small]) .title{margin-bottom:var(--spacing-16)}:host([appearance=terms]) .title{margin-bottom:var(--spacing-56)}:host([appearance=faq]) .title{margin-bottom:var(--spacing-48)}@media (width>=768px){:host([appearance=faq]) .title{margin-bottom:var(--spacing-64)}}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h6-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-bold);--bd-heading-line-height:var(--typography-heading-h6-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h6-letterSpacing);--bd-heading-font-family:var(--typography-heading-h6-fontFamily)}:host([appearance=faq]) ::slotted(bd-h[slot=title]),:host([appearance=faq]) ::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);text-align:center}.footer{align-items:flex-start;gap:var(--spacing-16);margin-top:var(--spacing-32);flex-direction:column;display:flex}:host([appearance=faq]) .footer{margin-top:var(--spacing-0);padding-top:var(--spacing-16)}.footer[hidden]{display:none}::slotted(bd-p[slot=footer]){font-style:italic}`;export{n as accordionCSS,t as accordionItemCSS};
|
|
2
2
|
//# sourceMappingURL=accordion.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.css.js","names":["accordionItemCSS","accordionCSS"],"sources":["../../../../src/components/accordion/accordion.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-accordion-item's five looks in one DOM. standard, small and chevron are\n 3.x bd-accordion-item's, which bd-accordion-section retuned through these\n custom properties; faq and terms are bd-accordion-bg-item's, which drew a\n second DOM (accordion-bg.css.ts, merged here) for the same disclosure. Each\n was carried over from the stylesheet that drew it and measured against\n that render at 375 and 1280.\n\n The --bd-acc-* properties are the item's knobs: each look sets them on the\n item's own host, and a page can still set them on a bd-accordion-item from\n outside, which beats a :host rule. */\nexport const accordionItemCSS = css`\n :host {\n display: block;\n margin-bottom: var(--bd-acc-item-margin-bottom, var(--spacing-16));\n box-sizing: border-box;\n border-radius: var(--shape-radius-sm);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* The last child sets no margin under itself, as 3.x's items did. A footer\n the page writes after the items keeps the last item's 16, which the\n group's footer spacing counts on: the faq footer pads 16 on top of it,\n and the standard footer's 32 margin collapses with it. The flat faq item\n (3.x's no-bg) dropped its margin as the last of its type instead, so its\n footer sits 16 under it, not 32. */\n :host(:last-child),\n :host([appearance=\"faq\"][background=\"none\"]:last-of-type) {\n margin-bottom: 0;\n }\n\n /* The one focus ring, on the item.\n\n Two owners are in play and they are deliberately different elements. The\n TRIGGER owns focus: it is the button, it carries aria-expanded, a keyboard\n lands on it and a screen reader announces it. The ITEM owns the focus\n VISUAL: a disclosure is perceived as one object -- the question and, when\n open, its answer -- and the ring goes round that object, growing with the\n answer when it is revealed. Measured before the item drew it, on\n Components/Accordion \"Item open by default\": host [99,131,1242,61],\n trigger [99,131,1242,24], content [99,171,1242,21] -- the ring stopped at\n the question and the answer sat outside it.\n\n Exactly one painter. The trigger's :focus-visible rule below sets outline\n none and nothing else; the ring lives here. P6C.2.1 found both painting the\n same --focus-outline-primary and removed the host's; P6C.2.2 moved the one\n ring up to the item and took the trigger's away, so the invariant that\n phase established -- one token, one painter -- still holds.\n\n The item is .disclosure, the element in this shadow root that holds the\n heading (and the trigger in it) and the panel and fills the host's box, so\n :has() can see the trigger match :focus-visible -- one hop further down\n since v4, through the heading the WAI-ARIA pattern wraps the button in.\n The host cannot: :host(:has(...)) looks at light-DOM children, never at\n the shadow tree. It used to be the host all the same, through\n data-bd-acc-focus, an attribute script set two frames after focusin and\n again on every keydown when the trigger matched :focus-visible; the\n selector answers both of those as they happen. A mouse click is still not\n :focus-visible, so it still draws no ring.\n\n The radius is the host's, inherited, so the ring follows the item's own\n corner: --shape-radius-lg on the tinted faq card, which is right.\n\n The stacking is measured: --bd-acc-item-margin-bottom is a public custom\n property, and with it zeroed on a group of tinted faq cards a 300x5 sample where\n the ring overlaps the next item holds 600 blue-500 pixels with\n position/z-index and 0 without -- the next item's tint paints over the\n ring. On an untinted item it reads 600 either way.\n\n This is the one rule that rings and stacks every look, so nothing here\n could give one look a different colour -- the divergence P5G found and\n P5G.1 closed stays closed by construction. */\n .disclosure {\n border-radius: inherit;\n }\n\n .disclosure:has(> .heading > .header:focus-visible) {\n position: relative;\n z-index: var(--z-base);\n /* The host's ground, repainted by the element that draws the ring, so\n one element anti-aliases the ring's inner corner against the tint.\n Split between the two, the corner showed a faint tinted seam inside\n the ring's white band (60 pixels at 8x, measured). Unset hosts are\n transparent, so this paints nothing on them. */\n background-color: inherit;\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 /* The heading is the WAI-ARIA pattern's wrapper round the button, and adds\n no box of its own. */\n .heading {\n margin: 0;\n }\n\n ::slotted(bd-list) {\n --bd-li-margin-bottom: var(--spacing-16);\n display: block;\n margin-bottom: var(--spacing-16);\n }\n\n ::slotted(bd-list:last-child) {\n margin-bottom: 0;\n }\n\n /* bd-p in bd-accordion simplu — spacing-16 intre paragrafe */\n ::slotted(bd-p:last-of-type) {\n --bd-paragraph-margin-bottom: 0;\n }\n\n .header {\n display: flex;\n align-items: flex-start;\n width: 100%;\n padding: var(--bd-acc-header-padding, var(--spacing-0));\n border: none;\n background: none;\n text-align: start;\n cursor: pointer;\n gap: var(--bd-acc-icon-gap, var(--spacing-12));\n /* The title's role, on the button too: the toggle's margin below counts\n in its em, and the button is what lays the row out. */\n font-family: var(--bd-acc-title-font-family, var(--typography-label-large-fontFamily));\n font-style: normal;\n font-size: var(--bd-acc-title-font-size, var(--typography-label-large-fontSize));\n font-weight: var(--bd-acc-title-font-weight, var(--typography-label-large-fontWeight));\n line-height: var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight));\n margin-bottom: var(--bd-acc-header-margin-bottom, var(--spacing-16));\n /* The title's ink, which the slotted bd-h reads: --bd-heading-color is\n the one hook it inherits rather than resets (h.css.ts), so it follows\n the button's state from here. A color= on the bd-h still wins. */\n --bd-heading-color: var(--bd-acc-title-color-collapsed, var(--color-text-brand));\n }\n\n /* No ring on the trigger. outline: none is not a removal: the visible focus\n indicator is the item's ring, drawn by .disclosure above on exactly the\n frames this pseudo-class matches. Painting it here as well is the double\n ring P6C.2.1 measured and removed. */\n .header:focus-visible {\n outline: none;\n }\n\n /* blue-500 is 4.2:1 on the blue-50 tint these titles sit on; blue-600 is 5.72 */\n .header[aria-expanded=\"true\"] {\n --bd-heading-color: var(--bd-acc-title-color-expanded, var(--color-text-brand));\n }\n\n /* Only a look that sets a hover colour changes on hover; the fallback is\n each state's own colour. */\n .header[aria-expanded=\"true\"]:hover {\n --bd-heading-color: var(--bd-acc-title-color-hover, var(--bd-acc-title-color-expanded, var(--color-text-brand)));\n }\n\n .header[aria-expanded=\"false\"]:hover {\n --bd-heading-color: var(--bd-acc-title-color-hover, var(--bd-acc-title-color-collapsed, var(--color-text-brand)));\n }\n\n /* The title is the page's bd-h, set at the look's label role through the\n type hooks: label-large on standard and terms, label-default on small and\n chevron, control-label-xl on faq -- what 3.x set its own text in. The\n page keeps the level, which the item's heading reports; a visual-level,\n font-weight= or color= on the bd-h still wins. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n --bd-heading-font-size: var(--bd-acc-title-font-size, var(--typography-label-large-fontSize));\n --bd-heading-font-weight: var(--bd-acc-title-font-weight, var(--typography-label-large-fontWeight));\n --bd-heading-line-height: var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight));\n --bd-heading-letter-spacing: var(--bd-acc-title-letter-spacing, var(--typography-label-large-letterSpacing));\n --bd-heading-font-family: var(--bd-acc-title-font-family, var(--typography-label-large-fontFamily));\n }\n\n .toggle {\n flex-shrink: 0;\n width: var(--bd-acc-toggle-size, var(--icon-sm-size));\n min-width: var(--bd-acc-toggle-size, var(--icon-sm-size));\n height: var(--bd-acc-toggle-size, var(--icon-sm-size));\n display: flex;\n align-items: center;\n justify-content: center;\n /* the box holds an icon, not text; none collapses the leading to the\n glyph rather than reserving a text line around it */\n line-height: var(--typography-lineHeight-none);\n /* Safari reads only the prefixed property */\n -webkit-user-select: none;\n user-select: none;\n /* Half the difference between the title's first line box and the glyph,\n so the icon sits on the optical centre of the type it aligns with. */\n margin-top: calc(\n (var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight)) * 1em -\n var(--bd-acc-toggle-size, var(--icon-sm-size))) / 2\n );\n /* The icon's ink: --color-text-brand, the role the label beside it\n resolves to and the one bd-link's whole family does. It passed\n --color-blue-500 until the Figma audit put icon and label side by side,\n and passed on the 3:1 non-text bar where the text beside it needed\n 4.5:1. The icon draws in currentColor. */\n color: var(--color-text-brand);\n }\n\n /* Wrapping is the whole mechanism: whether a title and its badge fit on one\n line depends on how long the title is and how much room this accordion\n has, not on how wide the window is. A 430px viewport rule used to force\n the column stack, which was both too eager and too narrow -- measured, a\n 320px-wide accordion on a 1280px viewport never triggered it and laid out\n correctly anyway, while a short title on a 320px viewport was stacked when\n it would have fitted. flex-wrap answers the question actually being asked. */\n .title-badge-wrapper {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n flex: 1;\n flex-wrap: wrap;\n }\n\n .title {\n min-width: 0;\n }\n\n /* The panel is indented past the toggle, so the indent is on the inline\n start: on a right-to-left page the toggle and the indent are both on the\n right. A look passes its padding as a block pair and an inline pair\n (start end) for the same reason; it was one four-value shorthand, which\n put the indent on the left whatever the direction. */\n .content {\n padding-block: var(--bd-acc-panel-padding-block, 0);\n padding-inline: var(--bd-acc-panel-padding-inline, calc(var(--icon-sm-size) + var(--spacing-12)) 0);\n font-family: var(--typography-fontFamily-sans);\n font-size: var(--bd-acc-panel-font-size, var(--typography-body-small-fontSize));\n font-weight: var(--bd-acc-panel-font-weight, var(--typography-body-small-fontWeight));\n line-height: var(--bd-acc-panel-line-height, var(--typography-body-small-lineHeight));\n /* -primary, which is what every look renders this at, and what the\n Figma item draws: text/primary. An answer is the payload of the\n disclosure, body copy, not supporting copy under a title. */\n color: var(--bd-acc-panel-color, var(--color-text-primary));\n }\n\n /* Plain hidden only: a panel that is hidden=\"until-found\" must keep its\n box, or find in page cannot reach it (accordion-panel.ts). The browser\n skips its contents, so it paints nothing, but a box in flow still counts:\n its block padding would show (the small look's is 8 at the bottom), and\n even at zero height it stops the trigger's bottom margin collapsing\n through the item -- measured, every closed item grew from 24 to 40. Out of\n flow and unpadded, a closed panel lays out as display: none did. */\n .content[hidden]:not([hidden=\"until-found\" i]) {\n display: none !important;\n }\n\n .content[hidden] {\n position: absolute;\n padding-block: 0;\n }\n\n ::slotted(p) {\n margin-top: 0;\n margin-bottom: var(--bd-acc-panel-paragraph-gap, var(--spacing-16));\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n ::slotted(p:last-child) {\n margin-bottom: 0;\n }\n\n /* === SMALL === tighter rows and smaller type, on the page ground. Was\n bd-accordion-section[variant=\"small\"], which set these on its own host\n for the items to inherit through the slot. */\n :host([appearance=\"small\"]) {\n --bd-acc-header-padding: var(--spacing-12) var(--spacing-8);\n --bd-acc-header-margin-bottom: var(--spacing-0);\n --bd-acc-icon-gap: var(--spacing-12);\n --bd-acc-toggle-size: var(--icon-sm-size);\n --bd-acc-title-font-size: var(--typography-label-default-fontSize);\n --bd-acc-title-font-weight: var(--typography-label-default-fontWeight);\n --bd-acc-title-line-height: var(--typography-label-default-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-label-default-letterSpacing);\n --bd-acc-title-font-family: var(--typography-label-default-fontFamily);\n --bd-acc-title-color-collapsed: var(--color-text-primary);\n /* The expanded title, one step past its hover's brand ink: the stronger\n brand ink role. It was brand-800, one consumer and no role, and so the\n same deep blue on a dark page, 1.68:1 there. Light moves 800 to 700\n (11.59 to 8.56:1 on white); dark takes the role's brand-300. */\n --bd-acc-title-color-expanded: var(--color-text-brand-hover);\n --bd-acc-title-color-hover: var(--color-text-brand);\n --bd-acc-panel-font-size: var(--typography-caption-default-fontSize);\n --bd-acc-panel-font-weight: var(--typography-caption-default-fontWeight);\n --bd-acc-panel-line-height: var(--typography-caption-default-lineHeight);\n /* Panel body copy, small look. */\n --bd-acc-panel-color: var(--color-text-primary);\n --bd-acc-panel-padding-block: var(--spacing-0) var(--spacing-8);\n --bd-acc-panel-padding-inline: var(--spacing-36) var(--spacing-8);\n --bd-acc-panel-paragraph-gap: var(--spacing-0);\n --bd-acc-item-margin-bottom: var(--spacing-0);\n }\n\n /* === FAQ === bd-accordion-bg-item's look: a question at control-label-xl\n in a 16px block inset, primary until open, and the answer clipped to its\n box. With a ground (background=\"tint\", 3.x's default) the item is a card;\n with none it is 3.x's no-bg item, flat with its answer inset 40 on both\n sides. */\n :host([appearance=\"faq\"]) {\n --bd-acc-header-padding: var(--spacing-16) var(--spacing-0);\n --bd-acc-header-margin-bottom: var(--spacing-0);\n --bd-acc-title-font-size: var(--typography-control-label-xl-fontSize);\n --bd-acc-title-font-weight: var(--typography-control-label-xl-fontWeight);\n --bd-acc-title-line-height: var(--typography-control-label-xl-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-control-label-xl-letterSpacing);\n --bd-acc-title-font-family: var(--typography-control-label-xl-fontFamily);\n /* 18px/500 on the blue-50 item ground -- below WCAG large (18.66px bold),\n so it needs 4.5:1. blue-500 measured 4.20:1. */\n --bd-acc-title-color-collapsed: var(--color-text-primary);\n --bd-acc-title-color-expanded: var(--color-text-brand);\n --bd-acc-title-color-hover: var(--color-text-brand);\n --bd-acc-panel-padding-block: var(--spacing-0);\n }\n\n :host([appearance=\"faq\"][open]) {\n --bd-acc-panel-padding-block: var(--spacing-0) var(--spacing-16);\n }\n\n /* A closed answer is [hidden]; this clip is the one that stayed from the\n max-height collapse it once animated. */\n :host([appearance=\"faq\"]) .content {\n overflow: hidden;\n }\n\n :host([appearance=\"faq\"][background=\"none\"]) {\n border-radius: var(--radius-none);\n --bd-acc-panel-padding-inline: var(--spacing-40);\n }\n\n :host([appearance=\"faq\"][background=\"none\"][open]) {\n --bd-acc-panel-padding-block: var(--spacing-16);\n }\n\n /* === TERMS === the standard item without its corner: bd-accordion-bg-item\n inside .terms-of-use, which drew bd-accordion-item's DOM transparent and\n square. */\n :host([appearance=\"terms\"]) {\n border-radius: var(--radius-none);\n }\n\n /* The flat faq and terms items are transparent boxes with --radius-none, so\n their ring would be a hard rectangle, which Foundations/Focus says the\n ring should not be on an element with no shape of its own. They take the\n focus radius while focused. That changes no resting pixel -- these hosts\n paint no background and no border. */\n :host([appearance=\"terms\"][background=\"none\"]) .disclosure:has(> .heading > .header:focus-visible),\n :host([appearance=\"faq\"][background=\"none\"]) .disclosure:has(> .heading > .header:focus-visible) {\n border-radius: var(--focus-outline-radius);\n }\n\n /* === CHEVRON === text and an arrow, with no border, pill or ground: an\n item on its own, outside a group. It was the chevron boolean. */\n :host([appearance=\"chevron\"]) {\n --bd-acc-title-font-size: var(--typography-label-default-fontSize);\n --bd-acc-title-font-weight: var(--typography-label-default-fontWeight);\n --bd-acc-title-line-height: var(--typography-label-default-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-label-default-letterSpacing);\n --bd-acc-title-font-family: var(--typography-label-default-fontFamily);\n --bd-acc-title-color-collapsed: var(--color-text-brand);\n --bd-acc-title-color-expanded: var(--color-text-brand);\n --bd-acc-icon-gap: var(--spacing-8);\n --bd-acc-header-padding: var(--spacing-0);\n --bd-acc-header-margin-bottom: var(--spacing-24);\n --bd-acc-panel-padding-block: var(--spacing-0);\n --bd-acc-panel-padding-inline: var(--spacing-0);\n }\n\n :host([appearance=\"chevron\"]) .header {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n width: auto;\n border-radius: var(--radius-none);\n }\n\n :host([appearance=\"chevron\"]) .title-badge-wrapper {\n flex: 0 1 auto;\n }\n\n :host([appearance=\"chevron\"]) ::slotted(bd-h[slot=\"title\"]) {\n white-space: nowrap;\n }\n\n :host([appearance=\"chevron\"]) .header:hover ::slotted(bd-h[slot=\"title\"]) {\n text-decoration: underline;\n }\n\n :host([appearance=\"chevron\"]) .toggle {\n width: 16px;\n min-width: 16px;\n height: 16px;\n margin-top: 0;\n }\n\n /* === THE ITEM'S OWN GROUND === background, N5's words, on the item's own\n box: none (default) paints nothing; container (--color-surface-container)\n and tint (the brand wash) make the item a card, at the corner 3.x's\n tinted FAQ card had. The inset is on .disclosure, not the host: the focus\n ring is drawn on .disclosure, and it has to go round the whole card, not\n 16px inside it. A group never hands this down -- its own background is\n its band, a different box. */\n :host([background=\"container\"]) {\n background-color: var(--color-surface-container);\n border-radius: var(--shape-radius-lg);\n }\n\n :host([background=\"tint\"]) {\n background-color: var(--status-brand-surface);\n border-radius: var(--shape-radius-lg);\n }\n\n :host([background=\"container\"]) .disclosure,\n :host([background=\"tint\"]) .disclosure {\n padding-inline: var(--spacing-16);\n }\n\n /* The faq question pads its own row 16 above and below, which is the card's\n block inset; every other look's row has none, so the card adds it, and a\n closed card keeps no gap under its row. */\n :host([background=\"container\"]:not([appearance=\"faq\"])) .disclosure,\n :host([background=\"tint\"]:not([appearance=\"faq\"])) .disclosure {\n padding-block: var(--spacing-16);\n }\n\n :host([background=\"container\"]:not([appearance=\"faq\"]):not([open])),\n :host([background=\"tint\"]:not([appearance=\"faq\"]):not([open])) {\n --bd-acc-header-margin-bottom: var(--spacing-0);\n }\n`;\n\n/* bd-accordion: the band, the column, the title and the footer, per look. It\n was two stylesheets, bd-accordion-section's and bd-accordion-bg's, for the\n same structure. */\nexport const accordionCSS = css`\n :host {\n display: block;\n }\n\n /* The band is as wide as the group, and the group, like every page\n section, is as wide as the page; the column inside is .bd-ensemble's. It\n used to escape to the window's edges with width: 100vw and calc(50% -\n 50vw) margins, and 100vw counts a classic scrollbar: measured with a 15px\n one, the band ran from -7px to 1273px over a 1265px page, so every page\n with an accordion section scrolled sideways.\n\n Its ground is the background attribute, in N5's words: container\n (default), the section's own; tint, the brand wash (the section's\n default-blue, the Figma section's status/brand/surface); none, no\n ground. The look sets\n only the band's padding: 32 above and below, 24 on small, 64 on faq.\n 3.x's small band was --color-surface-default, the page's own white, which\n is none on a page (measured the same at 375 and 1280); bd-accordion-bg's\n drew none, its ground being each item's card. */\n .band {\n border-radius: var(--radius-none);\n box-sizing: border-box;\n padding-block: var(--bd-acc-section-padding-v, var(--spacing-32));\n }\n\n :host([background=\"container\"]) .band {\n background-color: var(--color-surface-container);\n }\n\n :host([background=\"tint\"]) .band {\n background-color: var(--status-brand-surface);\n }\n\n .inner {\n box-sizing: border-box;\n }\n\n :host([appearance=\"small\"]) {\n --bd-acc-section-padding-v: var(--spacing-24);\n }\n\n :host([appearance=\"faq\"]) {\n --bd-acc-section-padding-v: var(--spacing-64);\n }\n\n :host([without-padding]) .band {\n padding-block: var(--spacing-0);\n }\n\n /* The title: heading-h6 in bold over the items (3.x's <bd-h as=\"h6\"\n font-weight=\"bold\">), or heading-h2 centred on faq. The page picks the\n level. */\n .title {\n margin-bottom: var(--spacing-24);\n }\n\n :host([appearance=\"small\"]) .title {\n margin-bottom: var(--spacing-16);\n }\n\n /* 24, and the 32 the terms look padded under its heading */\n :host([appearance=\"terms\"]) .title {\n margin-bottom: var(--spacing-56);\n }\n\n :host([appearance=\"faq\"]) .title {\n margin-bottom: var(--spacing-32);\n }\n\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h6\"))}\n /* no role: the h6 role at 700, which 3.x's font-weight=\"bold\" asked for;\n no heading role carries the h6 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-bold);\n }\n\n :host([appearance=\"faq\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"faq\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n text-align: center;\n }\n\n /* The footer: the guide link (3.x's guide-label, guide-href and guide-icon,\n a bd-link now) or a note. 32 under the items, which is where the guide\n link sat, the last item's own 16 collapsing into it; a note is set in\n italics, as the bg group's footer slot drew it. */\n .footer {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-16);\n margin-top: var(--spacing-32);\n }\n\n /* faq pads its footer 16, as the bg group's footer slot did, on top of the\n last item's margin: 32 under a card, which keeps its 16, and 16 under a\n flat item, which drops it (accordionItemCSS). A margin here would\n collapse with the card's and lose the difference. */\n :host([appearance=\"faq\"]) .footer {\n margin-top: var(--spacing-0);\n padding-top: var(--spacing-16);\n }\n\n /* display: flex above would show an empty footer's margin */\n .footer[hidden] {\n display: none;\n }\n\n ::slotted(bd-p[slot=\"footer\"]) {\n font-style: italic;\n }\n`;\n"],"mappings":"A,4DAaA,IAAaA,EAAmB,CAAG,qoQAkbtBC,EAAe,CAAG,o2D"}
|
|
1
|
+
{"version":3,"file":"accordion.css.js","names":["accordionItemCSS","accordionCSS"],"sources":["../../../../src/components/accordion/accordion.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above, headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-accordion-item's five looks in one DOM. standard, small and chevron are\n 3.x bd-accordion-item's, which bd-accordion-section retuned through these\n custom properties; faq and terms are bd-accordion-bg-item's, which drew a\n second DOM (accordion-bg.css.ts, merged here) for the same disclosure. Each\n was carried over from the stylesheet that drew it and measured against\n that render at 375 and 1280.\n\n The --bd-acc-* properties are the item's knobs: each look sets them on the\n item's own host, and a page can still set them on a bd-accordion-item from\n outside, which beats a :host rule. */\nexport const accordionItemCSS = css`\n :host {\n display: block;\n margin-bottom: var(--bd-acc-item-margin-bottom, var(--spacing-16));\n box-sizing: border-box;\n border-radius: var(--shape-radius-sm);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* The last child sets no margin under itself, as 3.x's items did. A footer\n the page writes after the items keeps the last item's 16, which the\n group's footer spacing counts on: the faq footer pads 16 on top of it,\n and the standard footer's 32 margin collapses with it. The flat faq item\n (3.x's no-bg) dropped its margin as the last of its type instead, so its\n footer sits 16 under it, not 32. */\n :host(:last-child),\n :host([appearance=\"faq\"][background=\"none\"]:last-of-type) {\n margin-bottom: 0;\n }\n\n /* The one focus ring, on the item.\n\n Two owners are in play and they are deliberately different elements. The\n TRIGGER owns focus: it is the button, it carries aria-expanded, a keyboard\n lands on it and a screen reader announces it. The ITEM owns the focus\n VISUAL: a disclosure is perceived as one object -- the question and, when\n open, its answer -- and the ring goes round that object, growing with the\n answer when it is revealed. Measured before the item drew it, on\n Components/Accordion \"Item open by default\": host [99,131,1242,61],\n trigger [99,131,1242,24], content [99,171,1242,21] -- the ring stopped at\n the question and the answer sat outside it.\n\n Exactly one painter. The trigger's :focus-visible rule below sets outline\n none and nothing else; the ring lives here. P6C.2.1 found both painting the\n same --focus-outline-primary and removed the host's; P6C.2.2 moved the one\n ring up to the item and took the trigger's away, so the invariant that\n phase established -- one token, one painter -- still holds.\n\n The item is .disclosure, the element in this shadow root that holds the\n heading (and the trigger in it) and the panel and fills the host's box, so\n :has() can see the trigger match :focus-visible -- one hop further down\n since v4, through the heading the WAI-ARIA pattern wraps the button in.\n The host cannot: :host(:has(...)) looks at light-DOM children, never at\n the shadow tree. It used to be the host all the same, through\n data-bd-acc-focus, an attribute script set two frames after focusin and\n again on every keydown when the trigger matched :focus-visible; the\n selector answers both of those as they happen. A mouse click is still not\n :focus-visible, so it still draws no ring.\n\n The radius is the host's, inherited, so the ring follows the item's own\n corner: --shape-radius-lg on the tinted faq card, which is right.\n\n The stacking is measured: --bd-acc-item-margin-bottom is a public custom\n property, and with it zeroed on a group of tinted faq cards a 300x5 sample where\n the ring overlaps the next item holds 600 blue-500 pixels with\n position/z-index and 0 without -- the next item's tint paints over the\n ring. On an untinted item it reads 600 either way.\n\n This is the one rule that rings and stacks every look, so nothing here\n could give one look a different colour -- the divergence P5G found and\n P5G.1 closed stays closed by construction. */\n .disclosure {\n border-radius: inherit;\n }\n\n .disclosure:has(> .heading > .header:focus-visible) {\n position: relative;\n z-index: var(--z-base);\n /* The host's ground, repainted by the element that draws the ring, so\n one element anti-aliases the ring's inner corner against the tint.\n Split between the two, the corner showed a faint tinted seam inside\n the ring's white band (60 pixels at 8x, measured). Unset hosts are\n transparent, so this paints nothing on them. */\n background-color: inherit;\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 /* The heading is the WAI-ARIA pattern's wrapper round the button, and adds\n no box of its own. */\n .heading {\n margin: 0;\n }\n\n ::slotted(bd-list) {\n --bd-li-margin-bottom: var(--spacing-16);\n display: block;\n margin-bottom: var(--spacing-16);\n }\n\n ::slotted(bd-list:last-child) {\n margin-bottom: 0;\n }\n\n /* bd-p in bd-accordion simplu — spacing-16 intre paragrafe */\n ::slotted(bd-p:last-of-type) {\n --bd-paragraph-margin-bottom: 0;\n }\n\n .header {\n display: flex;\n align-items: flex-start;\n width: 100%;\n padding: var(--bd-acc-header-padding, var(--spacing-0));\n border: none;\n background: none;\n text-align: start;\n cursor: pointer;\n gap: var(--bd-acc-icon-gap, var(--spacing-12));\n /* The title's role, on the button too: the toggle's margin below counts\n in its em, and the button is what lays the row out. */\n font-family: var(--bd-acc-title-font-family, var(--typography-label-large-fontFamily));\n font-style: normal;\n font-size: var(--bd-acc-title-font-size, var(--typography-label-large-fontSize));\n font-weight: var(--bd-acc-title-font-weight, var(--typography-label-large-fontWeight));\n line-height: var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight));\n margin-bottom: var(--bd-acc-header-margin-bottom, var(--spacing-16));\n /* The title's ink, which the slotted bd-h reads: --bd-heading-color is\n the one hook it inherits rather than resets (h.css.ts), so it follows\n the button's state from here. A color= on the bd-h still wins. */\n --bd-heading-color: var(--bd-acc-title-color-collapsed, var(--color-text-brand));\n }\n\n /* No ring on the trigger. outline: none is not a removal: the visible focus\n indicator is the item's ring, drawn by .disclosure above on exactly the\n frames this pseudo-class matches. Painting it here as well is the double\n ring P6C.2.1 measured and removed. */\n .header:focus-visible {\n outline: none;\n }\n\n /* blue-500 is 4.2:1 on the blue-50 tint these titles sit on; blue-600 is 5.72 */\n .header[aria-expanded=\"true\"] {\n --bd-heading-color: var(--bd-acc-title-color-expanded, var(--color-text-brand));\n }\n\n /* Only a look that sets a hover colour changes on hover; the fallback is\n each state's own colour. */\n .header[aria-expanded=\"true\"]:hover {\n --bd-heading-color: var(--bd-acc-title-color-hover, var(--bd-acc-title-color-expanded, var(--color-text-brand)));\n }\n\n .header[aria-expanded=\"false\"]:hover {\n --bd-heading-color: var(--bd-acc-title-color-hover, var(--bd-acc-title-color-collapsed, var(--color-text-brand)));\n }\n\n /* The title is the page's bd-h, set at the look's label role through the\n type hooks: label-large on standard and terms, label-default on small and\n chevron, control-label-xl on faq -- what 3.x set its own text in. The\n page keeps the level, which the item's heading reports; a visual-level,\n font-weight= or color= on the bd-h still wins. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n --bd-heading-font-size: var(--bd-acc-title-font-size, var(--typography-label-large-fontSize));\n --bd-heading-font-weight: var(--bd-acc-title-font-weight, var(--typography-label-large-fontWeight));\n --bd-heading-line-height: var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight));\n --bd-heading-letter-spacing: var(--bd-acc-title-letter-spacing, var(--typography-label-large-letterSpacing));\n --bd-heading-font-family: var(--bd-acc-title-font-family, var(--typography-label-large-fontFamily));\n }\n\n .toggle {\n flex-shrink: 0;\n width: var(--bd-acc-toggle-size, var(--icon-sm-size));\n min-width: var(--bd-acc-toggle-size, var(--icon-sm-size));\n height: var(--bd-acc-toggle-size, var(--icon-sm-size));\n display: flex;\n align-items: center;\n justify-content: center;\n /* the box holds an icon, not text; none collapses the leading to the\n glyph rather than reserving a text line around it */\n line-height: var(--typography-lineHeight-none);\n /* Safari reads only the prefixed property */\n -webkit-user-select: none;\n user-select: none;\n /* Half the difference between the title's first line box and the glyph,\n so the icon sits on the optical centre of the type it aligns with. */\n margin-top: calc(\n (var(--bd-acc-title-line-height, var(--typography-label-large-lineHeight)) * 1em -\n var(--bd-acc-toggle-size, var(--icon-sm-size))) / 2\n );\n /* The icon's ink: --color-text-brand, the role the label beside it\n resolves to and the one bd-link's whole family does. It passed\n --color-blue-500 until the Figma audit put icon and label side by side,\n and passed on the 3:1 non-text bar where the text beside it needed\n 4.5:1. The icon draws in currentColor. */\n color: var(--color-text-brand);\n }\n\n /* Wrapping is the whole mechanism: whether a title and its badge fit on one\n line depends on how long the title is and how much room this accordion\n has, not on how wide the window is. A 430px viewport rule used to force\n the column stack, which was both too eager and too narrow -- measured, a\n 320px-wide accordion on a 1280px viewport never triggered it and laid out\n correctly anyway, while a short title on a 320px viewport was stacked when\n it would have fitted. flex-wrap answers the question actually being asked. */\n .title-badge-wrapper {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n flex: 1;\n flex-wrap: wrap;\n }\n\n .title {\n min-width: 0;\n }\n\n /* The panel is indented past the toggle, so the indent is on the inline\n start: on a right-to-left page the toggle and the indent are both on the\n right. A look passes its padding as a block pair and an inline pair\n (start end) for the same reason; it was one four-value shorthand, which\n put the indent on the left whatever the direction. */\n .content {\n padding-block: var(--bd-acc-panel-padding-block, 0);\n padding-inline: var(--bd-acc-panel-padding-inline, calc(var(--icon-sm-size) + var(--spacing-12)) 0);\n font-family: var(--typography-fontFamily-sans);\n font-size: var(--bd-acc-panel-font-size, var(--typography-body-small-fontSize));\n font-weight: var(--bd-acc-panel-font-weight, var(--typography-body-small-fontWeight));\n line-height: var(--bd-acc-panel-line-height, var(--typography-body-small-lineHeight));\n /* -primary, which is what every look renders this at, and what the\n Figma item draws: text/primary. An answer is the payload of the\n disclosure, body copy, not supporting copy under a title. */\n color: var(--bd-acc-panel-color, var(--color-text-primary));\n }\n\n /* Plain hidden only: a panel that is hidden=\"until-found\" must keep its\n box, or find in page cannot reach it (accordion-panel.ts). The browser\n skips its contents, so it paints nothing, but a box in flow still counts:\n its block padding would show (the small look's is 8 at the bottom), and\n even at zero height it stops the trigger's bottom margin collapsing\n through the item -- measured, every closed item grew from 24 to 40. Out of\n flow and unpadded, a closed panel lays out as display: none did. */\n .content[hidden]:not([hidden=\"until-found\" i]) {\n display: none !important;\n }\n\n .content[hidden] {\n position: absolute;\n padding-block: 0;\n }\n\n ::slotted(p) {\n margin-top: 0;\n margin-bottom: var(--bd-acc-panel-paragraph-gap, var(--spacing-16));\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n ::slotted(p:last-child) {\n margin-bottom: 0;\n }\n\n /* === SMALL === tighter rows and smaller type, on the page ground. Was\n bd-accordion-section[variant=\"small\"], which set these on its own host\n for the items to inherit through the slot. */\n :host([appearance=\"small\"]) {\n --bd-acc-header-padding: var(--spacing-12) var(--spacing-8);\n --bd-acc-header-margin-bottom: var(--spacing-0);\n --bd-acc-icon-gap: var(--spacing-12);\n --bd-acc-toggle-size: var(--icon-sm-size);\n --bd-acc-title-font-size: var(--typography-label-default-fontSize);\n --bd-acc-title-font-weight: var(--typography-label-default-fontWeight);\n --bd-acc-title-line-height: var(--typography-label-default-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-label-default-letterSpacing);\n --bd-acc-title-font-family: var(--typography-label-default-fontFamily);\n --bd-acc-title-color-collapsed: var(--color-text-primary);\n /* The expanded title, one step past its hover's brand ink: the stronger\n brand ink role. It was brand-800, one consumer and no role, and so the\n same deep blue on a dark page, 1.68:1 there. Light moves 800 to 700\n (11.59 to 8.56:1 on white); dark takes the role's brand-300. */\n --bd-acc-title-color-expanded: var(--color-text-brand-hover);\n --bd-acc-title-color-hover: var(--color-text-brand);\n --bd-acc-panel-font-size: var(--typography-caption-default-fontSize);\n --bd-acc-panel-font-weight: var(--typography-caption-default-fontWeight);\n --bd-acc-panel-line-height: var(--typography-caption-default-lineHeight);\n /* Panel body copy, small look. */\n --bd-acc-panel-color: var(--color-text-primary);\n --bd-acc-panel-padding-block: var(--spacing-0) var(--spacing-8);\n --bd-acc-panel-padding-inline: var(--spacing-36) var(--spacing-8);\n --bd-acc-panel-paragraph-gap: var(--spacing-0);\n --bd-acc-item-margin-bottom: var(--spacing-0);\n }\n\n /* === FAQ === bd-accordion-bg-item's look: a question at control-label-xl\n in a 16px block inset, primary until open, and the answer clipped to its\n box. With a ground (background=\"tint\", 3.x's default) the item is a card;\n with none it is 3.x's no-bg item, flat with its answer inset 40 on both\n sides. */\n :host([appearance=\"faq\"]) {\n --bd-acc-header-padding: var(--spacing-16) var(--spacing-0);\n --bd-acc-header-margin-bottom: var(--spacing-0);\n --bd-acc-title-font-size: var(--typography-control-label-xl-fontSize);\n --bd-acc-title-font-weight: var(--typography-control-label-xl-fontWeight);\n --bd-acc-title-line-height: var(--typography-control-label-xl-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-control-label-xl-letterSpacing);\n --bd-acc-title-font-family: var(--typography-control-label-xl-fontFamily);\n /* 18px/500 on the blue-50 item ground -- below WCAG large (18.66px bold),\n so it needs 4.5:1. blue-500 measured 4.20:1. */\n --bd-acc-title-color-collapsed: var(--color-text-primary);\n --bd-acc-title-color-expanded: var(--color-text-brand);\n --bd-acc-title-color-hover: var(--color-text-brand);\n --bd-acc-panel-padding-block: var(--spacing-0);\n }\n\n :host([appearance=\"faq\"][open]) {\n --bd-acc-panel-padding-block: var(--spacing-0) var(--spacing-16);\n }\n\n /* A closed answer is [hidden]; this clip is the one that stayed from the\n max-height collapse it once animated. */\n :host([appearance=\"faq\"]) .content {\n overflow: hidden;\n }\n\n :host([appearance=\"faq\"][background=\"none\"]) {\n border-radius: var(--radius-none);\n --bd-acc-panel-padding-inline: var(--spacing-40);\n }\n\n :host([appearance=\"faq\"][background=\"none\"][open]) {\n --bd-acc-panel-padding-block: var(--spacing-16);\n }\n\n /* === TERMS === the standard item without its corner: bd-accordion-bg-item\n inside .terms-of-use, which drew bd-accordion-item's DOM transparent and\n square. */\n :host([appearance=\"terms\"]) {\n border-radius: var(--radius-none);\n }\n\n /* The flat faq and terms items are transparent boxes with --radius-none, so\n their ring would be a hard rectangle, which Foundations/Focus says the\n ring should not be on an element with no shape of its own. They take the\n focus radius while focused. That changes no resting pixel -- these hosts\n paint no background and no border. */\n :host([appearance=\"terms\"][background=\"none\"]) .disclosure:has(> .heading > .header:focus-visible),\n :host([appearance=\"faq\"][background=\"none\"]) .disclosure:has(> .heading > .header:focus-visible) {\n border-radius: var(--focus-outline-radius);\n }\n\n /* === CHEVRON === text and an arrow, with no border, pill or ground: an\n item on its own, outside a group. It was the chevron boolean. */\n :host([appearance=\"chevron\"]) {\n --bd-acc-title-font-size: var(--typography-label-default-fontSize);\n --bd-acc-title-font-weight: var(--typography-label-default-fontWeight);\n --bd-acc-title-line-height: var(--typography-label-default-lineHeight);\n --bd-acc-title-letter-spacing: var(--typography-label-default-letterSpacing);\n --bd-acc-title-font-family: var(--typography-label-default-fontFamily);\n --bd-acc-title-color-collapsed: var(--color-text-brand);\n --bd-acc-title-color-expanded: var(--color-text-brand);\n --bd-acc-icon-gap: var(--spacing-8);\n --bd-acc-header-padding: var(--spacing-0);\n --bd-acc-header-margin-bottom: var(--spacing-24);\n --bd-acc-panel-padding-block: var(--spacing-0);\n --bd-acc-panel-padding-inline: var(--spacing-0);\n }\n\n :host([appearance=\"chevron\"]) .header {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n width: auto;\n border-radius: var(--radius-none);\n }\n\n :host([appearance=\"chevron\"]) .title-badge-wrapper {\n flex: 0 1 auto;\n }\n\n :host([appearance=\"chevron\"]) ::slotted(bd-h[slot=\"title\"]) {\n white-space: nowrap;\n }\n\n :host([appearance=\"chevron\"]) .header:hover ::slotted(bd-h[slot=\"title\"]) {\n text-decoration: underline;\n }\n\n :host([appearance=\"chevron\"]) .toggle {\n width: 16px;\n min-width: 16px;\n height: 16px;\n margin-top: 0;\n }\n\n /* === THE ITEM'S OWN GROUND === background, N5's words, on the item's own\n box: none (default) paints nothing; container (--color-surface-container)\n and tint (the brand wash) make the item a card, at the corner 3.x's\n tinted FAQ card had. The inset is on .disclosure, not the host: the focus\n ring is drawn on .disclosure, and it has to go round the whole card, not\n 16px inside it. A group never hands this down -- its own background is\n its band, a different box. */\n :host([background=\"container\"]) {\n background-color: var(--color-surface-container);\n border-radius: var(--shape-radius-lg);\n }\n\n :host([background=\"tint\"]) {\n background-color: var(--status-brand-surface);\n border-radius: var(--shape-radius-lg);\n }\n\n :host([background=\"container\"]) .disclosure,\n :host([background=\"tint\"]) .disclosure {\n padding-inline: var(--spacing-16);\n }\n\n /* The faq question pads its own row 16 above and below, which is the card's\n block inset; every other look's row has none, so the card adds it, and a\n closed card keeps no gap under its row. */\n :host([background=\"container\"]:not([appearance=\"faq\"])) .disclosure,\n :host([background=\"tint\"]:not([appearance=\"faq\"])) .disclosure {\n padding-block: var(--spacing-16);\n }\n\n :host([background=\"container\"]:not([appearance=\"faq\"]):not([open])),\n :host([background=\"tint\"]:not([appearance=\"faq\"]):not([open])) {\n --bd-acc-header-margin-bottom: var(--spacing-0);\n }\n`;\n\n/* bd-accordion: the band, the column, the title and the footer, per look. It\n was two stylesheets, bd-accordion-section's and bd-accordion-bg's, for the\n same structure. */\nexport const accordionCSS = css`\n :host {\n display: block;\n }\n\n /* The band is as wide as the group, and the group, like every page\n section, is as wide as the page; the column inside is .bd-ensemble's. It\n used to escape to the window's edges with width: 100vw and calc(50% -\n 50vw) margins, and 100vw counts a classic scrollbar: measured with a 15px\n one, the band ran from -7px to 1273px over a 1265px page, so every page\n with an accordion section scrolled sideways.\n\n Its ground is the background attribute, in N5's words: container\n (default), the section's own; tint, the brand wash (the section's\n default-blue, the Figma section's status/brand/surface); none, no\n ground. The look sets\n only the band's padding: 32 above and below, 24 on small, 64 on faq.\n 3.x's small band was --color-surface-default, the page's own white, which\n is none on a page (measured the same at 375 and 1280); bd-accordion-bg's\n drew none, its ground being each item's card. */\n .band {\n border-radius: var(--radius-none);\n box-sizing: border-box;\n padding-block: var(--bd-acc-section-padding-v, var(--spacing-32));\n }\n\n :host([background=\"container\"]) .band {\n background-color: var(--color-surface-container);\n }\n\n :host([background=\"tint\"]) .band {\n background-color: var(--status-brand-surface);\n }\n\n .inner {\n box-sizing: border-box;\n }\n\n :host([appearance=\"small\"]) {\n --bd-acc-section-padding-v: var(--spacing-24);\n }\n\n :host([appearance=\"faq\"]) {\n --bd-acc-section-padding-v: var(--spacing-64);\n }\n\n /* ...unless it paints no ground: then the 64 is space round a band nobody\n sees, on top of the bd-section that spaces it as it spaces every block. */\n :host([appearance=\"faq\"][background=\"none\"]) {\n --bd-acc-section-padding-v: var(--spacing-0);\n }\n\n :host([without-padding]) .band {\n padding-block: var(--spacing-0);\n }\n\n /* The title: heading-h6 in bold over the items (3.x's <bd-h as=\"h6\"\n font-weight=\"bold\">), or heading-h2 centred on faq. The page picks the\n level. */\n .title {\n margin-bottom: var(--spacing-24);\n }\n\n :host([appearance=\"small\"]) .title {\n margin-bottom: var(--spacing-16);\n }\n\n /* 24, and the 32 the terms look padded under its heading */\n :host([appearance=\"terms\"]) .title {\n margin-bottom: var(--spacing-56);\n }\n\n /* faq's title is a section title: it stands two section insets above the\n items, as a section header stands above its section's content (48, 64\n from md; bd-section). */\n :host([appearance=\"faq\"]) .title {\n margin-bottom: var(--spacing-48);\n }\n\n @media ${unsafeCSS(above(\"md\"))} {\n :host([appearance=\"faq\"]) .title {\n margin-bottom: var(--spacing-64);\n }\n }\n\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h6\"))}\n /* no role: the h6 role at 700, which 3.x's font-weight=\"bold\" asked for;\n no heading role carries the h6 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-bold);\n }\n\n :host([appearance=\"faq\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"faq\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n text-align: center;\n }\n\n /* The footer: the guide link (3.x's guide-label, guide-href and guide-icon,\n a bd-link now) or a note. 32 under the items, which is where the guide\n link sat, the last item's own 16 collapsing into it; a note is set in\n italics, as the bg group's footer slot drew it. */\n .footer {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-16);\n margin-top: var(--spacing-32);\n }\n\n /* faq pads its footer 16, as the bg group's footer slot did, on top of the\n last item's margin: 32 under a card, which keeps its 16, and 16 under a\n flat item, which drops it (accordionItemCSS). A margin here would\n collapse with the card's and lose the difference. */\n :host([appearance=\"faq\"]) .footer {\n margin-top: var(--spacing-0);\n padding-top: var(--spacing-16);\n }\n\n /* display: flex above would show an empty footer's margin */\n .footer[hidden] {\n display: none;\n }\n\n ::slotted(bd-p[slot=\"footer\"]) {\n font-style: italic;\n }\n`;\n"],"mappings":"A,4DAaA,IAAaA,EAAmB,CAAG,qoQAkbtBC,EAAe,CAAG,+gE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{isolation:isolate;font-family:var(--typography-fontFamily-sans);background:linear-gradient(160deg, var(--color-surface-brand) 0%, var(--color-brand-700) 48%, var(--color-brand-950) 100%);display:block;position:relative}:host:before{content:"";z-index:var(--z-below);pointer-events:none;background:radial-gradient(1200px 600px at 78% -10%, var(--color-brand-400) 0%, transparent 55%);position:absolute;inset:0}.bd-ctabanner-container{padding-block:var(--spacing-64);box-sizing:border-box;text-align:center;align-items:center;gap:var(--spacing-16);flex-direction:column;display:flex}.bd-ctabanner-footer{margin-top:var(--spacing-24);align-items:center;gap:var(--spacing-8);text-align:center;flex-direction:column;display:flex}.bd-ctabanner-title[hidden],.bd-ctabanner-description[hidden],.bd-ctabanner-cta[hidden],.bd-ctabanner-caption[hidden],.bd-ctabanner-footer[hidden]{display:none}.bd-ctabanner-title{max-width:800px}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill);margin:0}.bd-ctabanner-description{margin-bottom:var(--spacing-16);max-width:640px}::slotted(bd-p[slot=description]){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill)}.bd-ctabanner-cta{justify-content:center;gap:var(--spacing-16);flex-wrap:wrap;display:flex}.bd-ctabanner-caption{margin:var(--spacing-8) 0 0;font-family:var(--typography-fontFamily-mono);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);color:var(--color-brand-on-fill)}@media (width<576px){.bd-ctabanner-container{padding-block:var(--spacing-48)}.bd-ctabanner-cta{flex-direction:column;width:100%}}`;export{t as default};
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{isolation:isolate;font-family:var(--typography-fontFamily-sans);background:linear-gradient(160deg, var(--color-surface-brand) 0%, var(--color-brand-700) 48%, var(--color-brand-950) 100%);display:block;position:relative}:host([appearance=brand-soft]){color-scheme:light;background:var(--status-brand-surface)}:host([appearance=brand-deep]){background:var(--color-brand-700)}:host:before{content:"";z-index:var(--z-below);pointer-events:none;background:radial-gradient(1200px 600px at 78% -10%, var(--color-brand-400) 0%, transparent 55%);position:absolute;inset:0}:host([appearance=brand-soft]):before,:host([appearance=brand-deep]):before,:host([width=contained]):before{display:none}:host([width=contained]){background:0 0}.bd-ctabanner-container{padding-block:var(--spacing-64);box-sizing:border-box;text-align:center;align-items:center;gap:var(--spacing-16);flex-direction:column;display:flex}:host([width=contained]) .bd-ctabanner-container{box-sizing:border-box;width:min(calc(100% - var(--spacing-32)), var(--content-width-max));max-width:var(--content-width-max);border-radius:var(--shape-radius-2xl);background:var(--color-surface-brand);margin-inline:auto}:host([width=contained][appearance=brand-soft]) .bd-ctabanner-container{background:var(--status-brand-surface)}:host([width=contained][appearance=brand-deep]) .bd-ctabanner-container{background:var(--color-brand-700)}.bd-ctabanner-footer{margin-top:var(--spacing-24);align-items:center;gap:var(--spacing-8);text-align:center;flex-direction:column;display:flex}.bd-ctabanner-title[hidden],.bd-ctabanner-description[hidden],.bd-ctabanner-cta[hidden],.bd-ctabanner-caption[hidden],.bd-ctabanner-media[hidden],.bd-ctabanner-footer[hidden]{display:none}.bd-ctabanner-media{color:var(--color-brand-on-fill);justify-content:center;display:flex}.bd-ctabanner-media ::slotted(*){display:block}:host([appearance=brand-soft]) .bd-ctabanner-media{color:var(--color-text-primary)}.bd-ctabanner-title{max-width:800px}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill);margin:0}:host([appearance=brand-soft]) ::slotted(bd-h[slot=title]),:host([appearance=brand-soft]) ::slotted(bd-display[slot=title]){--bd-heading-color:var(--color-text-primary);--bd-paragraph-color:var(--color-text-primary)}.bd-ctabanner-description{margin-bottom:var(--spacing-16);max-width:640px}::slotted(bd-p[slot=description]){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing);--bd-heading-color:var(--color-brand-on-fill);--bd-paragraph-color:var(--color-brand-on-fill)}:host([appearance=brand-soft]) ::slotted(bd-p[slot=description]){--bd-heading-color:var(--color-text-primary);--bd-paragraph-color:var(--color-text-primary)}.bd-ctabanner-cta{justify-content:center;gap:var(--spacing-16);flex-wrap:wrap;display:flex}.bd-ctabanner-caption{margin:var(--spacing-8) 0 0;font-family:var(--typography-fontFamily-mono);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);color:var(--color-brand-on-fill)}:host([appearance=brand-soft]) .bd-ctabanner-caption{color:var(--color-text-primary)}@media (width<576px){.bd-ctabanner-container{padding-block:var(--spacing-48)}.bd-ctabanner-cta{flex-direction:column;width:100%}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=cta-banner.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cta-banner.css.js","names":["cta_banner_css_default"],"sources":["../../../../src/components/cta-banner/cta-banner.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n /* the light spot below is drawn behind the copy, inside this box */\n position: relative;\n isolation: isolate;\n font-family: var(--typography-fontFamily-sans);\n /* The band runs full-bleed on the host; the column inside it is\n bd-ensemble. Its ground is the brand fill, --color-surface-brand,\n deepening along the ramp: the ground --color-brand-on-fill is held to,\n and the same in both themes, as a brand band is. */\n background: linear-gradient(160deg, var(--color-surface-brand) 0%, var(--color-brand-700) 48%, var(--color-brand-950) 100%);\n }\n\n /* The light spot at the band's top right: decoration over the ground,\n under the copy. It was the first layer of the host's background, so a\n reading of the band's ground from its first stop -- the theme and brand\n sweeps' -- took brand-400 for the ground under every word, where the\n copy never sits: the spot is centred above the band and mostly outside\n it (Foundations/Text on a surface). */\n :host::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: var(--z-below);\n pointer-events: none;\n background: radial-gradient(1200px 600px at 78% -10%, var(--color-brand-400) 0%, transparent 55%);\n }\n\n .bd-ctabanner-container {\n padding-block: var(--spacing-64);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: var(--spacing-16);\n }\n .bd-ctabanner-footer {\n margin-top: var(--spacing-24);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-8);\n text-align: center;\n }\n\n /* Each part's box is left out while its slot is empty (cta-banner.ts). The\n footer's used to be hidden by :not(:has(*)), which its own <slot> always\n defeated, so an empty footer kept its 24 above it. */\n .bd-ctabanner-title[hidden],\n .bd-ctabanner-description[hidden],\n .bd-ctabanner-cta[hidden],\n .bd-ctabanner-caption[hidden],\n .bd-ctabanner-footer[hidden] {\n display: none;\n }\n\n .bd-ctabanner-title {\n max-width: 800px;\n }\n\n /* The page's heading, at the page-section role whatever level it chose,\n in the band's ink -- what as=\"h2\" color=\"on-brand\" on the banner's own\n bd-h used to say. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n ${unsafeCSS(ink(\"on-brand\"))}\n margin: 0;\n }\n\n .bd-ctabanner-description {\n margin-bottom: var(--spacing-16);\n max-width: 640px;\n }\n\n /* Solid on-brand ink, the title's. It was 85% white, translucent so the\n gradient showed through, and recorded as 4.67:1. Measured from\n screenshots of the Default story on 2026-10-29 -- text hidden, the ground\n under the glyph band sampled, the ink composited -- it was 4.07:1 at 375,\n 4.24 at 768 and 4.41 at 1024, at 18px/400 against a 4.5 bar: on a narrow\n screen it wraps up into the gradient's light spot. Nothing under 93%\n white clears that, so it is solid: worst point rgb(18,106,226) at 375,\n 5.02:1.\n .\n bd-p's flow margin is left on, as it was on the banner's own bd-p: with\n the box's 16 and the gap it holds the buttons and the caption where the\n caption's contrast was measured (below). */\n ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n ${unsafeCSS(ink(\"on-brand\"))}\n }\n\n .bd-ctabanner-cta {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--spacing-16);\n }\n\n /* The caption is text, so the page writes the words and this box sets\n them: body-small in mono, what <bd-p appearance=\"small\"\n font-family=\"mono\"> drew. */\n .bd-ctabanner-caption {\n margin: var(--spacing-8) 0 0;\n font-family: var(--typography-fontFamily-mono);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n /* The band's ink, solid, as the description's became. It was that ink\n at 65%, no role, sampled from screenshots where it sat -- 4.92:1 at\n its worst, rgb(0,63,158) at 1600, on 2026-11-04 -- and re-measured\n each time the band's height or copy moved it. Against the band's own\n fill, the ground --color-brand-on-fill is held to under every theme,\n 65% is 2.7:1. Solid, it is that pair's 4.5:1 or more wherever the\n caption lands, under a partner's dark ink as under Bitdefender's white\n (9.5:1 at the worst point above). */\n color: var(--color-brand-on-fill);\n }\n\n @media ${unsafeCSS(below('sm'))} {\n .bd-ctabanner-container {\n padding-block: var(--spacing-48);\n }\n\n .bd-ctabanner-cta {\n flex-direction: column;\n width: 100%;\n }\n }\n`;"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,
|
|
1
|
+
{"version":3,"file":"cta-banner.css.js","names":["cta_banner_css_default"],"sources":["../../../../src/components/cta-banner/cta-banner.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n /* the light spot below is drawn behind the copy, inside this box */\n position: relative;\n isolation: isolate;\n font-family: var(--typography-fontFamily-sans);\n /* The band runs full-bleed on the host; the column inside it is\n bd-ensemble. Its ground is the brand fill, --color-surface-brand,\n deepening along the ramp: the ground --color-brand-on-fill is held to,\n and the same in both themes, as a brand band is. */\n background: linear-gradient(160deg, var(--color-surface-brand) 0%, var(--color-brand-700) 48%, var(--color-brand-950) 100%);\n }\n\n :host([appearance=\"brand-soft\"]) {\n color-scheme: light;\n background: var(--status-brand-surface);\n }\n\n :host([appearance=\"brand-deep\"]) {\n /* no token: a deep brand band, dark in every theme; no role names the\n brand ramp's 700 as a ground */\n background: var(--color-brand-700);\n }\n\n /* The light spot at the band's top right: decoration over the ground,\n under the copy. It was the first layer of the host's background, so a\n reading of the band's ground from its first stop -- the theme and brand\n sweeps' -- took brand-400 for the ground under every word, where the\n copy never sits: the spot is centred above the band and mostly outside\n it (Foundations/Text on a surface). */\n :host::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: var(--z-below);\n pointer-events: none;\n background: radial-gradient(1200px 600px at 78% -10%, var(--color-brand-400) 0%, transparent 55%);\n }\n\n :host([appearance=\"brand-soft\"])::before,\n :host([appearance=\"brand-deep\"])::before,\n :host([width=\"contained\"])::before {\n display: none;\n }\n\n :host([width=\"contained\"]) {\n background: transparent;\n }\n\n .bd-ctabanner-container {\n padding-block: var(--spacing-64);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: var(--spacing-16);\n }\n\n :host([width=\"contained\"]) .bd-ctabanner-container {\n box-sizing: border-box;\n width: min(calc(100% - var(--spacing-32)), var(--content-width-max));\n /* not the column: a contained surface, inset from the page's edges */\n max-width: var(--content-width-max);\n margin-inline: auto;\n border-radius: var(--shape-radius-2xl);\n background: var(--color-surface-brand);\n }\n\n :host([width=\"contained\"][appearance=\"brand-soft\"]) .bd-ctabanner-container {\n background: var(--status-brand-surface);\n }\n\n :host([width=\"contained\"][appearance=\"brand-deep\"]) .bd-ctabanner-container {\n /* no token: the deep band's ground, as the host's above */\n background: var(--color-brand-700);\n }\n .bd-ctabanner-footer {\n margin-top: var(--spacing-24);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-8);\n text-align: center;\n }\n\n /* Each part's box is left out while its slot is empty (cta-banner.ts). The\n footer's used to be hidden by :not(:has(*)), which its own <slot> always\n defeated, so an empty footer kept its 24 above it. */\n .bd-ctabanner-title[hidden],\n .bd-ctabanner-description[hidden],\n .bd-ctabanner-cta[hidden],\n .bd-ctabanner-caption[hidden],\n .bd-ctabanner-media[hidden],\n .bd-ctabanner-footer[hidden] {\n display: none;\n }\n\n .bd-ctabanner-media {\n display: flex;\n justify-content: center;\n color: var(--color-brand-on-fill);\n }\n\n .bd-ctabanner-media ::slotted(*) {\n display: block;\n }\n\n :host([appearance=\"brand-soft\"]) .bd-ctabanner-media {\n color: var(--color-text-primary);\n }\n\n .bd-ctabanner-title {\n max-width: 800px;\n }\n\n /* The page's heading, at the page-section role whatever level it chose,\n in the band's ink -- what as=\"h2\" color=\"on-brand\" on the banner's own\n bd-h used to say. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n ${unsafeCSS(ink(\"on-brand\"))}\n margin: 0;\n }\n\n :host([appearance=\"brand-soft\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"brand-soft\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(ink(\"strong\"))}\n }\n\n .bd-ctabanner-description {\n margin-bottom: var(--spacing-16);\n max-width: 640px;\n }\n\n /* Solid on-brand ink, the title's. It was 85% white, translucent so the\n gradient showed through, and recorded as 4.67:1. Measured from\n screenshots of the Default story on 2026-10-29 -- text hidden, the ground\n under the glyph band sampled, the ink composited -- it was 4.07:1 at 375,\n 4.24 at 768 and 4.41 at 1024, at 18px/400 against a 4.5 bar: on a narrow\n screen it wraps up into the gradient's light spot. Nothing under 93%\n white clears that, so it is solid: worst point rgb(18,106,226) at 375,\n 5.02:1.\n .\n bd-p's flow margin is left on, as it was on the banner's own bd-p: with\n the box's 16 and the gap it holds the buttons and the caption where the\n caption's contrast was measured (below). */\n ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n ${unsafeCSS(ink(\"on-brand\"))}\n }\n\n :host([appearance=\"brand-soft\"]) ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(ink(\"strong\"))}\n }\n\n .bd-ctabanner-cta {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--spacing-16);\n }\n\n /* The caption is text, so the page writes the words and this box sets\n them: body-small in mono, what <bd-p appearance=\"small\"\n font-family=\"mono\"> drew. */\n .bd-ctabanner-caption {\n margin: var(--spacing-8) 0 0;\n font-family: var(--typography-fontFamily-mono);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n /* The band's ink, solid, as the description's became. It was that ink\n at 65%, no role, sampled from screenshots where it sat -- 4.92:1 at\n its worst, rgb(0,63,158) at 1600, on 2026-11-04 -- and re-measured\n each time the band's height or copy moved it. Against the band's own\n fill, the ground --color-brand-on-fill is held to under every theme,\n 65% is 2.7:1. Solid, it is that pair's 4.5:1 or more wherever the\n caption lands, under a partner's dark ink as under Bitdefender's white\n (9.5:1 at the worst point above). */\n color: var(--color-brand-on-fill);\n }\n\n :host([appearance=\"brand-soft\"]) .bd-ctabanner-caption {\n color: var(--color-text-primary);\n }\n\n @media ${unsafeCSS(below('sm'))} {\n .bd-ctabanner-container {\n padding-block: var(--spacing-48);\n }\n\n .bd-ctabanner-cta {\n flex-direction: column;\n width: 100%;\n }\n }\n`;"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,s3H"}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
2
2
|
import { SlotController } from "../shared/controller.slot.js";
|
|
3
3
|
import "../../tokens/tokens.js";
|
|
4
4
|
import "../h/h.js";
|
|
5
5
|
import "../p/p.js";
|
|
6
|
+
declare const APPEARANCES: readonly ["brand", "brand-soft", "brand-deep"];
|
|
7
|
+
declare const WIDTHS: readonly ["full", "contained"];
|
|
8
|
+
type Appearance = typeof APPEARANCES[number];
|
|
9
|
+
type Width = typeof WIDTHS[number];
|
|
6
10
|
/**
|
|
7
|
-
* A
|
|
8
|
-
*
|
|
11
|
+
* A centred closing call to action: a title, supporting line, one or two
|
|
12
|
+
* buttons, and an optional caption underneath. The surface can be full-width
|
|
13
|
+
* or contained, with optional media above the copy.
|
|
9
14
|
*
|
|
10
15
|
* Every word is the page's (ADR 0003): `<bd-h slot="title" as="h2">`,
|
|
11
16
|
* `<bd-p slot="description">`, `<bd-button slot="actions">` (one or two, in
|
|
12
17
|
* source order) and `<span slot="caption">`. The page picks the title's
|
|
13
18
|
* level; the banner sets the title's size (heading-h2), the description's
|
|
14
|
-
* (body-large) and the
|
|
15
|
-
* while its slot is empty.
|
|
19
|
+
* (body-large) and the ink for its appearance. `media` takes an icon or image.
|
|
20
|
+
* Each part's box is left out while its slot is empty.
|
|
16
21
|
*/
|
|
17
22
|
export declare class BdCtaBanner extends LitElement {
|
|
18
23
|
static styles: import("lit").CSSResult[];
|
|
19
|
-
|
|
24
|
+
appearance: Appearance;
|
|
25
|
+
width: Width;
|
|
26
|
+
_slots: SlotController<"title" | "description" | "caption" | "media" | "actions" | "footer">;
|
|
27
|
+
willUpdate(changed: PropertyValues<this>): void;
|
|
20
28
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
29
|
}
|
|
22
30
|
declare global {
|
|
@@ -24,3 +32,4 @@ declare global {
|
|
|
24
32
|
"bd-cta-banner": BdCtaBanner;
|
|
25
33
|
}
|
|
26
34
|
}
|
|
35
|
+
export {};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as
|
|
2
|
-
<div class="bd-
|
|
3
|
-
<div class="bd-ctabanner-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{resolveEnum as t}from"../shared/prop-vocabulary.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as r}from"../shared/controller.slot.js";import"../h/h.js";import{ensembleCSS as i}from"../shared/ensemble.css.js";import a from"./cta-banner.css.js";import{LitElement as o,html as s}from"lit";import{property as c}from"lit/decorators.js";var l=[`brand`,`brand-soft`,`brand-deep`],u=[`full`,`contained`],d=class extends o{constructor(...e){super(...e),this.appearance=`brand`,this.width=`full`,this._slots=new r(this,{slots:[`media`,`title`,`description`,`actions`,`caption`,`footer`]})}static{this.styles=[i,a]}willUpdate(e){e.has(`appearance`)&&(this.appearance=t(this.appearance,{allowed:l,fallback:`brand`})),e.has(`width`)&&(this.width=t(this.width,{allowed:u,fallback:`full`}))}render(){let e=e=>this._slots.has(e);return s`
|
|
2
|
+
<div class="bd-ctabanner-surface">
|
|
3
|
+
<div class="bd-ensemble bd-ctabanner-container">
|
|
4
|
+
<div class="bd-ctabanner-media" ?hidden=${!e(`media`)}><slot name="media"></slot></div>
|
|
5
|
+
<div class="bd-ctabanner-title" ?hidden=${!e(`title`)}><slot name="title"></slot></div>
|
|
6
|
+
<div class="bd-ctabanner-description" ?hidden=${!e(`description`)}><slot name="description"></slot></div>
|
|
7
|
+
<div class="bd-ctabanner-cta" ?hidden=${!e(`actions`)}><slot name="actions"></slot></div>
|
|
8
|
+
<div class="bd-ctabanner-caption" ?hidden=${!e(`caption`)}><slot name="caption"></slot></div>
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<!-- Freeform slot for extra content below the caption -- contact
|
|
11
|
+
info, legal disclaimers, links, etc. Empty by default,
|
|
12
|
+
collapses to nothing when unused. -->
|
|
13
|
+
<div class="bd-ctabanner-footer" ?hidden=${!e(`footer`)}><slot name="footer"></slot></div>
|
|
14
|
+
</div>
|
|
12
15
|
</div>
|
|
13
|
-
`}};
|
|
16
|
+
`}};n([c({type:String,reflect:!0})],d.prototype,`appearance`,void 0),n([c({type:String,reflect:!0})],d.prototype,`width`,void 0),d=n([e(`bd-cta-banner`)],d);export{d as BdCtaBanner};
|
|
14
17
|
//# sourceMappingURL=cta-banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cta-banner.js","names":["ctaBannerCSS","_decorate","__decorate","cta_banner_css_default","BdCtaBanner","LitElement","_args","SlotController","ensembleCSS","has","name","defineElement"],"sources":["../../../../src/components/cta-banner/cta-banner.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The atoms the page writes into the banner's title and description. It\n renders neither now, but 3.x's module registered both, and a page\n importing only this module still gets them. */\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport ctaBannerCSS from \"./cta-banner.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n/**\n * A
|
|
1
|
+
{"version":3,"file":"cta-banner.js","names":["ctaBannerCSS","_decorate","__decorate","cta_banner_css_default","APPEARANCES","WIDTHS","BdCtaBanner","LitElement","_args","SlotController","ensembleCSS","changed","resolveEnum","has","name","property","defineElement"],"sources":["../../../../src/components/cta-banner/cta-banner.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The atoms the page writes into the banner's title and description. It\n renders neither now, but 3.x's module registered both, and a page\n importing only this module still gets them. */\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport ctaBannerCSS from \"./cta-banner.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\nconst APPEARANCES = [\"brand\", \"brand-soft\", \"brand-deep\"] as const;\nconst WIDTHS = [\"full\", \"contained\"] as const;\n\ntype Appearance = typeof APPEARANCES[number];\ntype Width = typeof WIDTHS[number];\n\n/**\n * A centred closing call to action: a title, supporting line, one or two\n * buttons, and an optional caption underneath. The surface can be full-width\n * or contained, with optional media above the copy.\n *\n * Every word is the page's (ADR 0003): `<bd-h slot=\"title\" as=\"h2\">`,\n * `<bd-p slot=\"description\">`, `<bd-button slot=\"actions\">` (one or two, in\n * source order) and `<span slot=\"caption\">`. The page picks the title's\n * level; the banner sets the title's size (heading-h2), the description's\n * (body-large) and the ink for its appearance. `media` takes an icon or image.\n * Each part's box is left out while its slot is empty.\n */\n@defineElement(\"bd-cta-banner\")\nexport class BdCtaBanner extends LitElement {\n static styles = [ensembleCSS, ctaBannerCSS];\n\n @property({ type: String, reflect: true })\n appearance: Appearance = \"brand\";\n\n @property({ type: String, reflect: true })\n width: Width = \"full\";\n\n _slots = new SlotController(this, { slots: [\"media\", \"title\", \"description\", \"actions\", \"caption\", \"footer\"] });\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"appearance\")) {\n this.appearance = resolveEnum(this.appearance, { allowed: APPEARANCES, fallback: \"brand\" });\n }\n if (changed.has(\"width\")) {\n this.width = resolveEnum(this.width, { allowed: WIDTHS, fallback: \"full\" });\n }\n }\n\n render() {\n const has = (name: \"media\" | \"title\" | \"description\" | \"actions\" | \"caption\" | \"footer\") => this._slots.has(name);\n return html`\n <div class=\"bd-ctabanner-surface\">\n <div class=\"bd-ensemble bd-ctabanner-container\">\n <div class=\"bd-ctabanner-media\" ?hidden=${!has(\"media\")}><slot name=\"media\"></slot></div>\n <div class=\"bd-ctabanner-title\" ?hidden=${!has(\"title\")}><slot name=\"title\"></slot></div>\n <div class=\"bd-ctabanner-description\" ?hidden=${!has(\"description\")}><slot name=\"description\"></slot></div>\n <div class=\"bd-ctabanner-cta\" ?hidden=${!has(\"actions\")}><slot name=\"actions\"></slot></div>\n <div class=\"bd-ctabanner-caption\" ?hidden=${!has(\"caption\")}><slot name=\"caption\"></slot></div>\n\n <!-- Freeform slot for extra content below the caption -- contact\n info, legal disclaimers, links, etc. Empty by default,\n collapses to nothing when unused. -->\n <div class=\"bd-ctabanner-footer\" ?hidden=${!has(\"footer\")}><slot name=\"footer\"></slot></div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-cta-banner\": BdCtaBanner;\n }\n}\n"],"mappings":"A,qfAeA,IAAMI,EAAc,CAAC,QAAS,aAAc,YAAY,EAClDC,EAAS,CAAC,OAAQ,WAAW,EAkBtBC,EAAN,cAA0BC,CAAW,C,8BAIjB,KAAA,WAAA,QAGV,KAAA,MAAA,OAEN,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,QAAS,QAAS,cAAe,UAAW,UAAW,QAAQ,CAAE,CAAC,C,QAR9F,KAAA,OAAA,CAACC,EAAaV,CAAY,C,CAU1C,WAAW,EAA+B,CACpCW,EAAQ,IAAI,YAAY,IAC1B,KAAK,WAAaC,EAAY,KAAK,WAAY,CAAE,QAASR,EAAa,SAAU,OAAQ,CAAC,GAExFO,EAAQ,IAAI,OAAO,IACrB,KAAK,MAAQC,EAAY,KAAK,MAAO,CAAE,QAASP,EAAQ,SAAU,MAAO,CAAC,EAE9E,CAEA,QAAS,CACP,IAAMQ,EAAO,GAA+E,KAAK,OAAO,IAAIC,CAAI,EAChH,MAAO,EAAI;;;oDAGqC,CAACD,EAAI,OAAO,EAAE;oDACd,CAACA,EAAI,OAAO,EAAE;0DACR,CAACA,EAAI,aAAa,EAAE;kDAC5B,CAACA,EAAI,SAAS,EAAE;sDACZ,CAACA,EAAI,SAAS,EAAE;;;;;qDAKjB,CAACA,EAAI,QAAQ,EAAE;;;KAIlE,CACF,EApCGZ,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAT,EAAA,UAAA,aAAA,IAAA,EAAA,EAGxCL,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAP1C,EAAAL,EAAA,CAAAe,EAAc,eAAe,CAAA,EAAAV,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as e}from"lit";var t=e`:host{border-top:var(--border-width-2) solid var(--color-border-brand);font-family:var(--typography-fontFamily-sans);flex-direction:column;display:flex}:host([hidden]),.label[hidden],.value[hidden]{display:none}:host([appearance=row]){row-gap:var(--spacing-20);padding-block:var(--spacing-20) var(--spacing-16)}:host([appearance=row]) .label{color:var(--color-text-muted);text-transform:uppercase;font-size:var(--typography-body-xsmall-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily)}:host([appearance=row]) .value{color:var(--color-text-primary);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily)}:host([appearance=stat]){row-gap:var(--spacing-4);padding-top:var(--spacing-16)}:host([appearance=stat]) .value{color:var(--color-text-brand);font-size:var(--typography-fontSize-3xl);font-weight:var(--typography-fontWeight-bold);line-height:
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{border-top:var(--border-width-2) solid var(--color-border-brand);font-family:var(--typography-fontFamily-sans);flex-direction:column;display:flex}:host([hidden]),.label[hidden],.value[hidden]{display:none}:host([appearance=row]){row-gap:var(--spacing-20);padding-block:var(--spacing-20) var(--spacing-16)}:host([appearance=row]) .label{color:var(--color-text-muted);text-transform:uppercase;font-size:var(--typography-body-xsmall-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily)}:host([appearance=row]) .value{color:var(--color-text-primary);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily)}:host([appearance=stat]){row-gap:var(--spacing-4);padding-top:var(--spacing-16)}:host([appearance=stat]) .value{color:var(--color-text-brand);font-size:var(--typography-fontSize-3xl);font-weight:var(--typography-fontWeight-bold);line-height:var(--typography-lineHeight-110)}:host([appearance=stat]) .label{color:var(--color-text-muted);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily)}:host([appearance=inline]){align-items:baseline;column-gap:var(--spacing-8);border-top:none;flex-direction:row}:host([appearance=inline]) .label{color:var(--color-text-muted);font-size:var(--typography-fontSize-xxs);font-family:var(--typography-fontFamily-mono);line-height:var(--typography-lineHeight-normal);text-transform:uppercase;letter-spacing:.04em}:host([appearance=spec]){align-items:baseline;column-gap:var(--spacing-8);padding-bottom:var(--spacing-16);white-space:nowrap;border-top:none;flex-direction:row}:host([appearance=spec]) .label{color:var(--color-text-muted);text-transform:uppercase;font-size:var(--typography-body-xsmall-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-letterSpacing-widest);font-family:var(--typography-fontFamily-mono)}:host([appearance=spec]) .value{color:var(--color-text-primary);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-fontWeight-bold);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily)}:host([appearance=inline]) .value{color:var(--color-text-primary);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-fontWeight-semibold);line-height:var(--typography-lineHeight-tight);letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily)}`;export{t as factCSS};
|
|
2
2
|
//# sourceMappingURL=fact.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact.css.js","names":["factCSS"],"sources":["../../../../src/components/fact/fact.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/* The looks are the ones 3.x drew, measured against bd-overview's,\n bd-trust-panel's, bd-quick-answer's and bd-header-code's renders: the same\n rules, sizes, inks and distances. */\nexport const factCSS = css`\n /* The brand rule above a row and a stat. A boundary at the top of the\n fact's own box, not a divider between regions: it is drawn whether or not\n a fact sits above, as 3.x's divider element was. The inline look draws\n none. */\n :host {\n display: flex;\n flex-direction: column;\n border-top: var(--border-width-2) solid var(--color-border-brand);\n font-family: var(--typography-fontFamily-sans);\n }\n\n /* The native hidden attribute has to beat the display above. */\n :host([hidden]),\n .label[hidden],\n .value[hidden] {\n display: none;\n }\n\n /* === ROW: bd-overview's spec-sheet line ===\n 3.x drew the label and the value as bd-p xsmall and regular, and each\n <p> carried bd-p's 16px flow margin. The distances here are what those\n margins made: 16 under the rule plus the row's 4px gap above the label,\n the same 4 plus the label's margin between label and value, and the\n value's margin under it. So a column of rows measures what it did. */\n :host([appearance=\"row\"]) {\n row-gap: var(--spacing-20);\n padding-block: var(--spacing-20) var(--spacing-16);\n }\n\n /* bd-p xsmall: body-xsmall is a size and nothing else, so the weight,\n leading and tracking are body-small's, as bd-p borrows them. */\n :host([appearance=\"row\"]) .label {\n color: var(--color-text-muted);\n text-transform: uppercase;\n font-size: var(--typography-body-xsmall-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n }\n\n :host([appearance=\"row\"]) .value {\n color: var(--color-text-primary);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n }\n\n /* === STAT: bd-trust-panel's statistic === */\n :host([appearance=\"stat\"]) {\n row-gap: var(--spacing-4);\n padding-top: var(--spacing-16);\n }\n\n :host([appearance=\"stat\"]) .value {\n /* The brand text role, not the brand's step 500: the figure sits on the\n trust panel's tint, where step 500 measured 4.20:1 and passed only on\n the large-text exemption. The role measures 5.72:1. */\n color: var(--color-text-brand);\n font-size: var(--typography-fontSize-3xl);\n font-weight: var(--typography-fontWeight-bold);\n /* no
|
|
1
|
+
{"version":3,"file":"fact.css.js","names":["factCSS"],"sources":["../../../../src/components/fact/fact.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/* The looks are the ones 3.x drew, measured against bd-overview's,\n bd-trust-panel's, bd-quick-answer's and bd-header-code's renders: the same\n rules, sizes, inks and distances. */\nexport const factCSS = css`\n /* The brand rule above a row and a stat. A boundary at the top of the\n fact's own box, not a divider between regions: it is drawn whether or not\n a fact sits above, as 3.x's divider element was. The inline look draws\n none. */\n :host {\n display: flex;\n flex-direction: column;\n border-top: var(--border-width-2) solid var(--color-border-brand);\n font-family: var(--typography-fontFamily-sans);\n }\n\n /* The native hidden attribute has to beat the display above. */\n :host([hidden]),\n .label[hidden],\n .value[hidden] {\n display: none;\n }\n\n /* === ROW: bd-overview's spec-sheet line ===\n 3.x drew the label and the value as bd-p xsmall and regular, and each\n <p> carried bd-p's 16px flow margin. The distances here are what those\n margins made: 16 under the rule plus the row's 4px gap above the label,\n the same 4 plus the label's margin between label and value, and the\n value's margin under it. So a column of rows measures what it did. */\n :host([appearance=\"row\"]) {\n row-gap: var(--spacing-20);\n padding-block: var(--spacing-20) var(--spacing-16);\n }\n\n /* bd-p xsmall: body-xsmall is a size and nothing else, so the weight,\n leading and tracking are body-small's, as bd-p borrows them. */\n :host([appearance=\"row\"]) .label {\n color: var(--color-text-muted);\n text-transform: uppercase;\n font-size: var(--typography-body-xsmall-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n }\n\n :host([appearance=\"row\"]) .value {\n color: var(--color-text-primary);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n }\n\n /* === STAT: bd-trust-panel's statistic === */\n :host([appearance=\"stat\"]) {\n row-gap: var(--spacing-4);\n padding-top: var(--spacing-16);\n }\n\n :host([appearance=\"stat\"]) .value {\n /* The brand text role, not the brand's step 500: the figure sits on the\n trust panel's tint, where step 500 measured 4.20:1 and passed only on\n the large-text exemption. The role measures 5.72:1. */\n color: var(--color-text-brand);\n font-size: var(--typography-fontSize-3xl);\n font-weight: var(--typography-fontWeight-bold);\n /* no role: a figure set close, on one line, which no role's leading\n draws: the 110 step, which it shares with the product hero's headline\n (tokens.ts) */\n line-height: var(--typography-lineHeight-110);\n }\n\n /* The sentence under a statistic, and it wraps to two lines at most widths:\n supporting body copy rather than a form label, so body-small and not\n label-default's weight 500. */\n :host([appearance=\"stat\"]) .label {\n color: var(--color-text-muted);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n }\n\n /* === INLINE: bd-quick-answer's meta strip ===\n A key and its value on one line, on their shared baseline, 8 apart, with\n no rule: the quick answer draws one divider above the whole strip. */\n :host([appearance=\"inline\"]) {\n flex-direction: row;\n align-items: baseline;\n column-gap: var(--spacing-8);\n border-top: none;\n }\n\n :host([appearance=\"inline\"]) .label {\n /* subtle is only safe on the page ground: on the quick answer's tint it\n lands at 4.33:1 and these keys are 11px. muted is the next step in the\n same family. */\n color: var(--color-text-muted);\n /* no role: a meta strip's key -- mono, upper-case and tracked at 11px --\n and not the eyebrow the package keeps almost naming a role for, which\n is sans body copy above a heading. label-extra-small is the only role\n at xxs and it is sans with normal tracking, so it describes different\n text. The size and the family stay primitives, carried from\n quick-answer.css.ts, where this look was drawn until v4. */\n font-size: var(--typography-fontSize-xxs);\n font-family: var(--typography-fontFamily-mono);\n /* no role: the key's leading, for the same reason. 1.5, the step\n label-extra-small takes at this size; the key sits on the value's\n baseline, so the value's line decides the fact's height. */\n line-height: var(--typography-lineHeight-normal);\n text-transform: uppercase;\n /* no token: 0.04em sits between --typography-letterSpacing-wide (0.025em)\n and -wider (0.05em), and choosing either changes the width of every\n key. Carried from quick-answer.css.ts unchanged. */\n letter-spacing: 0.04em;\n }\n\n /* === SPEC: bd-terminal-hero's facts (3.x bd-header-code's metafacts) ===\n A key and its value on their shared baseline, 8 apart, on one line, with\n no rule: the hero draws one rule above the whole grid of them. 3.x drew\n both as bd-p, each in a flex item that kept its <p>'s 16px flow margin\n inside it; the padding under the fact is that margin, so a grid of facts\n measures what it did. */\n :host([appearance=\"spec\"]) {\n flex-direction: row;\n align-items: baseline;\n column-gap: var(--spacing-8);\n border-top: none;\n padding-bottom: var(--spacing-16);\n white-space: nowrap;\n }\n\n /* bd-p xsmall in mono at the widest tracking: body-xsmall's size, with\n body-small's weight and leading as bd-p borrows them. Muted: the spec\n fact is the terminal hero's, and the hero can be tinted, where subtle --\n which sits on the page or a card and nowhere else (dark mode decision\n 17) -- read 3.86:1 at the tint's strongest in light and 4.32:1 in dark.\n A fact cannot see which ground its hero drew, so it takes the step that\n reads on both: 6.59:1 on white (subtle was 4.81), 5.28:1 on the tint. */\n :host([appearance=\"spec\"]) .label {\n color: var(--color-text-muted);\n text-transform: uppercase;\n font-size: var(--typography-body-xsmall-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-letterSpacing-widest);\n font-family: var(--typography-fontFamily-mono);\n }\n\n /* The value in body copy. */\n :host([appearance=\"spec\"]) .value {\n color: var(--color-text-primary);\n font-size: var(--typography-body-regular-fontSize);\n /* no role: the weight marks the value as the answer to its key --\n emphasis within the row, not a text-content type; see button.css.ts's\n .button--bold for that argument. As 3.x drew it (font-weight=\"bold\"). */\n font-weight: var(--typography-fontWeight-bold);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n }\n\n /* The answer, at the body size. */\n :host([appearance=\"inline\"]) .value {\n color: var(--color-text-primary);\n font-size: var(--typography-body-regular-fontSize);\n /* no role: the weight marks it as the answer rather than the question --\n emphasis within the strip, not a text-content type; see\n button.css.ts's .button--bold for that argument. As in 3.x. */\n font-weight: var(--typography-fontWeight-semibold);\n /* no role: a 20px line, what 3.x drew -- it inherited the font's own\n \"normal\" metric undeclared -- and the floor for text that can wrap.\n body-regular's 1.5 would make every fact 4px taller. */\n line-height: var(--typography-lineHeight-tight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n }\n`;\n"],"mappings":"A,0BAKA,IAAaA,EAAU,CAAG,oiG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;width:100%;padding-top:var(--spacing-64);padding-bottom:var(--bd-features-padding-bottom,var(--spacing-64));justify-content:center;display:flex;container-type:inline-size}.bd-features-container{column-gap:var(--spacing-32);grid-template-rows:repeat(4,auto);grid-auto-columns:minmax(0,400px);grid-auto-flow:column;row-gap:0;width:fit-content;max-width:100%;margin-inline:auto;display:grid}::slotted(bd-feature-column){grid-row:span 4;grid-template-rows:subgrid;align-content:start;min-width:0;display:grid}@container (width<=600px){.bd-features-container{row-gap:var(--spacing-32);grid-template-rows:none;grid-template-columns:minmax(0,1fr);grid-auto-flow:row;width:100%}::slotted(bd-feature-column){flex-direction:column;grid-row:auto;display:flex}}`,n=e`:host{--bd-acc-header-margin-bottom:var(--spacing-8);display:block}.col-icon-wrapper{grid-row:1}.col-title-wrapper{grid-row:2}.col-description{grid-row:3}.col-content{grid-row:4}.col-icon-wrapper,.col-title-wrapper{margin-bottom:var(--spacing-8);align-items:flex-start;display:flex;overflow:hidden}.col-description{margin-bottom:var(--spacing-24);overflow:hidden}.col-icon-wrapper[hidden],.col-title-wrapper[hidden],.col-description[hidden],.col-content[hidden]{display:none}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h4-fontSize);--bd-heading-font-weight:var(--typography-heading-h4-fontWeight);--bd-heading-line-height:var(--typography-heading-h4-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h4-letterSpacing);--bd-heading-font-family:var(--typography-heading-h4-fontFamily)}`;export{n as featureColumnCSS,t as featureColumnsCSS};
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;width:100%;padding-top:var(--bd-features-padding-top,var(--spacing-64));padding-bottom:var(--bd-features-padding-bottom,var(--spacing-64));justify-content:center;display:flex;container-type:inline-size}.bd-features-container{column-gap:var(--spacing-32);grid-template-rows:repeat(4,auto);grid-auto-columns:minmax(0,400px);grid-auto-flow:column;row-gap:0;width:fit-content;max-width:100%;margin-inline:auto;display:grid}::slotted(bd-feature-column){grid-row:span 4;grid-template-rows:subgrid;align-content:start;min-width:0;display:grid}@container (width<=600px){.bd-features-container{row-gap:var(--spacing-32);grid-template-rows:none;grid-template-columns:minmax(0,1fr);grid-auto-flow:row;width:100%}::slotted(bd-feature-column){flex-direction:column;grid-row:auto;display:flex}}`,n=e`:host{--bd-acc-header-margin-bottom:var(--spacing-8);display:block}.col-icon-wrapper{grid-row:1}.col-title-wrapper{grid-row:2}.col-description{grid-row:3}.col-content{grid-row:4}.col-icon-wrapper,.col-title-wrapper{margin-bottom:var(--spacing-8);align-items:flex-start;display:flex;overflow:hidden}.col-description{margin-bottom:var(--spacing-24);overflow:hidden}.col-icon-wrapper[hidden],.col-title-wrapper[hidden],.col-description[hidden],.col-content[hidden]{display:none}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h4-fontSize);--bd-heading-font-weight:var(--typography-heading-h4-fontWeight);--bd-heading-line-height:var(--typography-heading-h4-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h4-letterSpacing);--bd-heading-font-family:var(--typography-heading-h4-fontFamily)}`;export{n as featureColumnCSS,t as featureColumnsCSS};
|
|
2
2
|
//# sourceMappingURL=feature-columns.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-columns.css.js","names":["featureColumnsCSS","featureColumnCSS"],"sources":["../../../../src/components/feature-columns/feature-columns.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-feature-columns: the section, and the grid its columns share. */\nexport const featureColumnsCSS = css`\n /* padding-block, not padding-top alone. This section opened with 64px above\n it and closed with nothing, so whatever followed it sat flush against the\n last feature column -- measured 64px/0px while every other module in the\n family pads both ends (48/48 for five of them, 64/64 for three). The\n bottom now matches the top, which is what the module was already doing at\n one end.\n\n The duplicate display went with it: block was declared and then\n immediately overridden by flex on the next line but one, so it had never\n applied. */\n :host {\n /* The section is the container that decides when the columns stack, not\n the screen: across the page the two are the same width, inside\n bd-tabs or any narrower column the columns stack with it. width: 100%\n because a size container contributes nothing to its own intrinsic\n width. */\n container-type: inline-size;\n width: 100%;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n
|
|
1
|
+
{"version":3,"file":"feature-columns.css.js","names":["featureColumnsCSS","featureColumnCSS"],"sources":["../../../../src/components/feature-columns/feature-columns.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-feature-columns: the section, and the grid its columns share. */\nexport const featureColumnsCSS = css`\n /* padding-block, not padding-top alone. This section opened with 64px above\n it and closed with nothing, so whatever followed it sat flush against the\n last feature column -- measured 64px/0px while every other module in the\n family pads both ends (48/48 for five of them, 64/64 for three). The\n bottom now matches the top, which is what the module was already doing at\n one end.\n\n The duplicate display went with it: block was declared and then\n immediately overridden by flex on the next line but one, so it had never\n applied. */\n :host {\n /* The section is the container that decides when the columns stack, not\n the screen: across the page the two are the same width, inside\n bd-tabs or any narrower column the columns stack with it. width: 100%\n because a size container contributes nothing to its own intrinsic\n width. */\n container-type: inline-size;\n width: 100%;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n /* A host that nests the section (bd-tab-group) can shorten either pad:\n it spaces what it holds. The bottom name is 3.x's. */\n padding-top: var(--bd-features-padding-top, var(--spacing-64));\n padding-bottom: var(--bd-features-padding-bottom, var(--spacing-64));\n /* No padding-inline here: the gutter is the column's, inside the shadow\n root. A host pad was 24px on top of it standing alone, and inside\n bd-tabs -- where the nested column collapses to its parent's edges --\n it was the one inset left, putting the features 24px inside every\n other section's edge. */\n }\n\n /* Columns grid: its own measure -- one track of up to 400 per column, as\n many as there are columns -- centred inside the page column. The column\n count and the N x 400 cap used to be written inline by features.ts; an\n auto-flowing column track says both. The slot is display: contents, so\n the page's columns are this grid's items. */\n .bd-features-container {\n margin-inline: auto;\n display: grid;\n grid-auto-flow: column;\n /* no token: the column's measure, the 400 the design gives each one */\n grid-auto-columns: minmax(0, 400px);\n /* The rows every column shares: icon, title, description, content. */\n grid-template-rows: repeat(4, auto);\n column-gap: var(--spacing-32);\n row-gap: 0;\n /* as wide as its columns, and no wider than the page column */\n width: fit-content;\n max-width: 100%;\n }\n\n /* Each column is a subgrid of those four rows, so a title that wraps to two\n lines, or a longer description, moves the next row down in every column\n at once. A column's parts are in its own shadow root and name their rows\n there (featureColumnCSS below); a subgrid lays out the flat tree, so they\n line up across the shadow boundary. Set here rather than on the column's\n :host, because the rows are this grid's: a column alone is a stack. */\n ::slotted(bd-feature-column) {\n display: grid;\n grid-row: span 4;\n grid-template-rows: subgrid;\n align-content: start;\n min-width: 0;\n }\n\n /* One column under another: nothing to line up across, so each column is a\n plain stack again, its parts at their own heights. The !important that\n stood here was beating the inline repeat(N) features.ts wrote. */\n @container (width <= 600px) {\n .bd-features-container {\n grid-auto-flow: row;\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: none;\n row-gap: var(--spacing-32);\n width: 100%;\n }\n\n ::slotted(bd-feature-column) {\n display: flex;\n flex-direction: column;\n grid-row: auto;\n }\n }\n`;\n\n/* bd-feature-column: its parts, each in the row it names. */\nexport const featureColumnCSS = css`\n :host {\n display: block;\n /* 8px from an accordion item's title to its content, as in 3.x, where\n this was written inline on every item of a cloned accordion. */\n --bd-acc-header-margin-bottom: var(--spacing-8);\n }\n\n .col-icon-wrapper { grid-row: 1; }\n .col-title-wrapper { grid-row: 2; }\n .col-description { grid-row: 3; }\n /* The wrapper fills the row, which is as tall as the longest content; the\n accordion in it keeps its own height. In 3.x the accordion was the grid\n item, so it needed align-self: start in the grid and stretch once the\n columns stacked. */\n .col-content { grid-row: 4; }\n\n /* Icon wrapper */\n .col-icon-wrapper {\n display: flex;\n align-items: flex-start;\n margin-bottom: var(--spacing-8);\n overflow: hidden;\n }\n\n /* Title wrapper */\n .col-title-wrapper {\n display: flex;\n align-items: flex-start;\n margin-bottom: var(--spacing-8);\n overflow: hidden;\n }\n\n /* The description is the page's bd-p, and keeps its own appearance. 3.x\n re-rendered its text into a bd-p of its own at regular, so the type this\n wrapper declared never reached it, and it went. */\n .col-description {\n margin-bottom: var(--spacing-24);\n overflow: hidden;\n }\n\n /* A wrapper whose slot is empty; display above outranks the hidden\n attribute's own rule. Its row stays, held open by the other columns. */\n .col-icon-wrapper[hidden],\n .col-title-wrapper[hidden],\n .col-description[hidden],\n .col-content[hidden] {\n display: none;\n }\n\n /* The column owns its title's size, never its level: the page writes the\n bd-h at the level its outline needs, and it is drawn at heading-h4, the\n level 3.x rendered. A visual-level on the page's bd-h still wins. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole('heading-h4'))}\n }\n`;\n"],"mappings":"A,4DAIA,IAAaA,EAAoB,CAAG,2yBAwFvBC,EAAmB,CAAG,m2B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;width:100%;display:block}.bd-features-tab-container{align-items:center;gap:var(--spacing-64);width:100%;animation:bd-fade-slide-right var(--transition-duration-slow) var(--transition-easing-ease) forwards;display:flex}.bd-features-tab-left{align-items:flex-start;gap:var(--spacing-24);flex-direction:column;flex:1;display:flex}.bd-features-tab-content{gap:var(--spacing-8);flex-direction:column;display:flex}.bd-features-tab-content[hidden]{display:none}.bd-features-tab-right{flex:1;justify-content:center;align-items:center;display:flex}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h3-fontSize);--bd-heading-font-weight:var(--typography-heading-h3-fontWeight);--bd-heading-line-height:var(--typography-heading-h3-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h3-letterSpacing);--bd-heading-font-family:var(--typography-heading-h3-fontFamily);--bd-heading-color:var(--color-text-brand);--bd-paragraph-color:var(--color-text-brand);margin:0}::slotted([slot=media]){border-radius:var(--shape-radius-lg);width:100%;max-width:520px;height:auto;display:block}@media (prefers-reduced-motion:reduce){.bd-features-tab-container{animation:none}}@keyframes bd-fade-slide-right{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@media (width<992px){.bd-features-tab-container{gap:var(--spacing-32);flex-direction:column-reverse}.bd-features-tab-container.bd-features-tab-reverse{flex-direction:column-reverse}.bd-features-tab-left{text-align:center;align-items:center}::slotted([slot=media]){max-width:100%}}@media (width<576px){.bd-features-tab-container{gap:var(--spacing-24)}}`;export{t as default};
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;width:100%;display:block}.bd-features-tab-container{align-items:center;gap:var(--spacing-64);width:100%;animation:bd-fade-slide-right var(--transition-duration-slow) var(--transition-easing-ease) forwards;display:flex}.bd-features-tab-left{align-items:flex-start;gap:var(--spacing-24);flex-direction:column;flex:1;display:flex}.bd-features-tab-content{gap:var(--spacing-8);flex-direction:column;display:flex}.bd-features-tab-content[hidden]{display:none}.bd-features-tab-right{flex:1;justify-content:center;align-items:center;display:flex}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h3-fontSize);--bd-heading-font-weight:var(--typography-heading-h3-fontWeight);--bd-heading-line-height:var(--typography-heading-h3-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h3-letterSpacing);--bd-heading-font-family:var(--typography-heading-h3-fontFamily);--bd-heading-color:var(--color-text-brand);--bd-paragraph-color:var(--color-text-brand);margin:0}::slotted([slot=media]){border-radius:var(--shape-radius-lg);width:100%;max-width:520px;height:auto;display:block}:host([appearance=contained]) .bd-features-tab-container{background:var(--color-surface-container);border-radius:var(--shape-radius-2xl);align-items:stretch;gap:0;overflow:clip}:host([appearance=contained]) .bd-features-tab-left,:host([appearance=contained]) .bd-features-tab-right{box-sizing:border-box;flex:0 0 50%;min-width:0}:host([appearance=contained]) .bd-features-tab-left{padding:var(--spacing-64);justify-content:center}:host([appearance=contained]) .bd-features-tab-right{aspect-ratio:16/9;position:relative}:host([appearance=contained]) ::slotted(img[slot=media]){border-radius:var(--radius-none);object-fit:cover;width:100%;max-width:none;height:100%;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){.bd-features-tab-container{animation:none}}@keyframes bd-fade-slide-right{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@media (width<992px){.bd-features-tab-container{gap:var(--spacing-32);flex-direction:column-reverse}.bd-features-tab-container.bd-features-tab-reverse{flex-direction:column-reverse}.bd-features-tab-left{text-align:center;align-items:center}::slotted([slot=media]){max-width:100%}:host([appearance=contained]) .bd-features-tab-container{gap:0}:host([appearance=contained]) .bd-features-tab-left,:host([appearance=contained]) .bd-features-tab-right{flex:none;width:100%}:host([appearance=contained]) .bd-features-tab-left{padding:var(--spacing-32)}:host([appearance=contained]) .bd-features-tab-right{aspect-ratio:auto}:host([appearance=contained]) ::slotted(img[slot=media]){height:auto;position:static}}@media (width<576px){.bd-features-tab-container{gap:var(--spacing-24)}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=features-tab.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features-tab.css.js","names":["features_tab_css_default"],"sources":["../../../../src/components/features-tab/features-tab.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, headingRole, ink } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n\n .bd-features-tab-container {\n display: flex;\n align-items: center;\n gap: var(--spacing-64);\n width: 100%;\n /* slow, not 350ms: a 50ms difference nobody chose, on a one-shot\n entrance that is not repeated. */\n animation: bd-fade-slide-right var(--transition-duration-slow) var(--transition-easing-ease) forwards;\n }\n\n .bd-features-tab-left {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-24);\n }\n\n .bd-features-tab-content {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-8);\n }\n\n /* The body's wrapper while the default slot is empty; display above\n outranks the hidden attribute's own rule. */\n .bd-features-tab-content[hidden] {\n display: none;\n }\n\n .bd-features-tab-right {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* The panel owns its title's size and ink, never its level: heading-h3 in\n brand ink. In 3.x the page's bd-h chose both, and the two places that\n follow the design -- the Figma component's Code Connect snippet and the\n Ultimate Security page rebuilt from the reference -- both wrote\n visual-level=\"h3\" color=\"primary\" (this file's own stories wrote h4). A\n visual-level or color on the page's bd-h still wins. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n margin: 0;\n ${unsafeCSS(headingRole('heading-h3'))}\n ${unsafeCSS(ink('primary'))}\n }\n\n ::slotted([slot=\"media\"]) {\n width: 100%;\n max-width: 520px;\n height: auto;\n border-radius: var(--shape-radius-lg);\n display: block;\n }\n\n /* The entrance is skipped rather than shortened. Its first frame is\n opacity 0 and a 24px offset, so under reduced motion the container simply\n renders where it belongs, fully opaque: it declares no opacity of its own,\n and none is what the keyframes stop supplying. Content is present\n immediately rather than waiting to be revealed. */\n @media (prefers-reduced-motion: reduce) {\n .bd-features-tab-container {\n animation: none;\n }\n }\n\n @keyframes bd-fade-slide-right {\n from {\n opacity: 0;\n transform: translateX(24px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @media ${unsafeCSS(below('lg'))} {\n .bd-features-tab-container {\n flex-direction: column-reverse;\n gap: var(--spacing-32);\n }\n\n .bd-features-tab-container.bd-features-tab-reverse {\n flex-direction: column-reverse;\n }\n\n .bd-features-tab-left {\n align-items: center;\n text-align: center;\n }\n\n ::slotted([slot=\"media\"]) {\n max-width: 100%;\n }\n }\n\n @media ${unsafeCSS(below('sm'))} {\n .bd-features-tab-container {\n gap: var(--spacing-24);\n }\n }\n`;"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,
|
|
1
|
+
{"version":3,"file":"features-tab.css.js","names":["features_tab_css_default"],"sources":["../../../../src/components/features-tab/features-tab.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, headingRole, ink } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n\n .bd-features-tab-container {\n display: flex;\n align-items: center;\n gap: var(--spacing-64);\n width: 100%;\n /* slow, not 350ms: a 50ms difference nobody chose, on a one-shot\n entrance that is not repeated. */\n animation: bd-fade-slide-right var(--transition-duration-slow) var(--transition-easing-ease) forwards;\n }\n\n .bd-features-tab-left {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-24);\n }\n\n .bd-features-tab-content {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-8);\n }\n\n /* The body's wrapper while the default slot is empty; display above\n outranks the hidden attribute's own rule. */\n .bd-features-tab-content[hidden] {\n display: none;\n }\n\n .bd-features-tab-right {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* The panel owns its title's size and ink, never its level: heading-h3 in\n brand ink. In 3.x the page's bd-h chose both, and the two places that\n follow the design -- the Figma component's Code Connect snippet and the\n Ultimate Security page rebuilt from the reference -- both wrote\n visual-level=\"h3\" color=\"primary\" (this file's own stories wrote h4). A\n visual-level or color on the page's bd-h still wins. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n margin: 0;\n ${unsafeCSS(headingRole('heading-h3'))}\n ${unsafeCSS(ink('primary'))}\n }\n\n ::slotted([slot=\"media\"]) {\n width: 100%;\n max-width: 520px;\n height: auto;\n border-radius: var(--shape-radius-lg);\n display: block;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-container {\n gap: 0;\n align-items: stretch;\n background: var(--color-surface-container);\n border-radius: var(--shape-radius-2xl);\n overflow: clip;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-left,\n :host([appearance=\"contained\"]) .bd-features-tab-right {\n box-sizing: border-box;\n flex: 0 0 50%;\n min-width: 0;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-left {\n justify-content: center;\n padding: var(--spacing-64);\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-right {\n position: relative;\n aspect-ratio: 16 / 9;\n }\n\n :host([appearance=\"contained\"]) ::slotted(img[slot=\"media\"]) {\n position: absolute;\n inset: 0;\n width: 100%;\n max-width: none;\n height: 100%;\n border-radius: var(--radius-none);\n object-fit: cover;\n }\n\n /* The entrance is skipped rather than shortened. Its first frame is\n opacity 0 and a 24px offset, so under reduced motion the container simply\n renders where it belongs, fully opaque: it declares no opacity of its own,\n and none is what the keyframes stop supplying. Content is present\n immediately rather than waiting to be revealed. */\n @media (prefers-reduced-motion: reduce) {\n .bd-features-tab-container {\n animation: none;\n }\n }\n\n @keyframes bd-fade-slide-right {\n from {\n opacity: 0;\n transform: translateX(24px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @media ${unsafeCSS(below('lg'))} {\n .bd-features-tab-container {\n flex-direction: column-reverse;\n gap: var(--spacing-32);\n }\n\n .bd-features-tab-container.bd-features-tab-reverse {\n flex-direction: column-reverse;\n }\n\n .bd-features-tab-left {\n align-items: center;\n text-align: center;\n }\n\n ::slotted([slot=\"media\"]) {\n max-width: 100%;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-container {\n gap: 0;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-left,\n :host([appearance=\"contained\"]) .bd-features-tab-right {\n flex: none;\n width: 100%;\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-left {\n padding: var(--spacing-32);\n }\n\n :host([appearance=\"contained\"]) .bd-features-tab-right {\n aspect-ratio: auto;\n }\n\n :host([appearance=\"contained\"]) ::slotted(img[slot=\"media\"]) {\n position: static;\n height: auto;\n }\n }\n\n @media ${unsafeCSS(below('sm'))} {\n .bd-features-tab-container {\n gap: var(--spacing-24);\n }\n }\n`;"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,uwF"}
|
|
@@ -25,6 +25,7 @@ import { SlotController } from "../shared/controller.slot.js";
|
|
|
25
25
|
declare class BdFeaturesTab extends LitElement {
|
|
26
26
|
static styles: import("lit").CSSResult[];
|
|
27
27
|
reverse: boolean;
|
|
28
|
+
appearance: "default" | "contained";
|
|
28
29
|
_slots: SlotController<"">;
|
|
29
30
|
render(): import("lit-html").TemplateResult<1>;
|
|
30
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../button/button.js";import i from"./features-tab.css.js";import"../video-player/video-player.js";import{LitElement as a,html as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends a{constructor(...e){super(...e),this.reverse=!1,this._slots=new n(this,{slots:[``]})}static{this.styles=[r,i]}render(){let e=o`
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../button/button.js";import i from"./features-tab.css.js";import"../video-player/video-player.js";import{LitElement as a,html as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends a{constructor(...e){super(...e),this.reverse=!1,this.appearance=`default`,this._slots=new n(this,{slots:[``]})}static{this.styles=[r,i]}render(){let e=o`
|
|
2
2
|
<div class="bd-features-tab-left">
|
|
3
3
|
<slot name="title"></slot>
|
|
4
4
|
<div class="bd-features-tab-content" ?hidden=${!this._slots.has(``)}><slot></slot></div>
|
|
@@ -6,9 +6,9 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
6
6
|
</div>
|
|
7
7
|
`,t=o`
|
|
8
8
|
<div class="bd-features-tab-right"><slot name="media"></slot></div>
|
|
9
|
-
|
|
10
|
-
<div class="bd-ensemble bd-features-tab-container ${this.reverse?`bd-features-tab-reverse`:``}">
|
|
9
|
+
`,n=this.appearance===`contained`,r=o`
|
|
10
|
+
<div class="${n?``:`bd-ensemble`} bd-features-tab-container ${this.reverse?`bd-features-tab-reverse`:``}">
|
|
11
11
|
${this.reverse?o`${t}${e}`:o`${e}${t}`}
|
|
12
12
|
</div>
|
|
13
|
-
|
|
13
|
+
`;return n?o`<div class="bd-ensemble">${r}</div>`:r}};t([s({type:Boolean,reflect:!0})],c.prototype,`reverse`,void 0),t([s({type:String,reflect:!0})],c.prototype,`appearance`,void 0),c=t([e(`bd-features-tab`)],c);
|
|
14
14
|
//# sourceMappingURL=features-tab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features-tab.js","names":["featuresTabCSS","_decorate","__decorate","features_tab_css_default","BdFeaturesTab","LitElement","_args","SlotController","ensembleCSS","leftContent","rightContent","property","defineElement"],"sources":["../../../../src/components/features-tab/features-tab.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport \"#components/video-player/video-player.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport featuresTabCSS from \"./features-tab.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n/**\n * Copy on one side, media on the other: a title, the body, the actions and a\n * picture, a video or an embed.\n *\n * <bd-features-tab>\n * <bd-h slot=\"title\" as=\"h3\">Keep your loved ones protected.</bd-h>\n * <bd-p appearance=\"regular\">As the Subscription Manager, you can…</bd-p>\n * <bd-button slot=\"actions\" href=\"#plans\" appearance=\"accent\">Stay worry free</bd-button>\n * <img slot=\"media\" src=\"/family.png\" alt=\"…\" width=\"520\" height=\"390\">\n * </bd-features-tab>\n *\n * Everything is the page's. 3.x's CTA attributes (cta-label, cta-href,\n * cta-kind, cta-size) drew a bd-button here; the page writes that button into\n * `actions` now, with its own appearance and size. The title is drawn at\n * heading-h3 in brand ink, as the design draws it (features-tab.css.ts); the\n * level is the page's.\n */\n@defineElement(\"bd-features-tab\")\nclass BdFeaturesTab extends LitElement {\n static styles = [ensembleCSS, featuresTabCSS];\n\n @property({ type: Boolean, reflect: true })\n reverse = false;\n\n _slots = new SlotController(this, { slots: [\"\"] });\n\n render() {\n /* The title and the actions are flex items of the column themselves, so\n an empty one takes no box and leaves no gap. The body has a wrapper of\n its own, its paragraphs closer together, hidden while it is empty. */\n const leftContent = html`\n <div class=\"bd-features-tab-left\">\n <slot name=\"title\"></slot>\n <div class=\"bd-features-tab-content\" ?hidden=${!this._slots.has(\"\")}><slot></slot></div>\n <slot name=\"actions\"></slot>\n </div>\n `;\n\n const rightContent = html`\n <div class=\"bd-features-tab-right\"><slot name=\"media\"></slot></div>\n `;\n\n
|
|
1
|
+
{"version":3,"file":"features-tab.js","names":["featuresTabCSS","_decorate","__decorate","features_tab_css_default","BdFeaturesTab","LitElement","_args","SlotController","ensembleCSS","leftContent","rightContent","contained","content","property","defineElement"],"sources":["../../../../src/components/features-tab/features-tab.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/p/p.ts\";\nimport \"#components/video-player/video-player.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport featuresTabCSS from \"./features-tab.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n/**\n * Copy on one side, media on the other: a title, the body, the actions and a\n * picture, a video or an embed.\n *\n * <bd-features-tab>\n * <bd-h slot=\"title\" as=\"h3\">Keep your loved ones protected.</bd-h>\n * <bd-p appearance=\"regular\">As the Subscription Manager, you can…</bd-p>\n * <bd-button slot=\"actions\" href=\"#plans\" appearance=\"accent\">Stay worry free</bd-button>\n * <img slot=\"media\" src=\"/family.png\" alt=\"…\" width=\"520\" height=\"390\">\n * </bd-features-tab>\n *\n * Everything is the page's. 3.x's CTA attributes (cta-label, cta-href,\n * cta-kind, cta-size) drew a bd-button here; the page writes that button into\n * `actions` now, with its own appearance and size. The title is drawn at\n * heading-h3 in brand ink, as the design draws it (features-tab.css.ts); the\n * level is the page's.\n */\n@defineElement(\"bd-features-tab\")\nclass BdFeaturesTab extends LitElement {\n static styles = [ensembleCSS, featuresTabCSS];\n\n @property({ type: Boolean, reflect: true })\n reverse = false;\n\n @property({ type: String, reflect: true })\n appearance: \"default\" | \"contained\" = \"default\";\n\n _slots = new SlotController(this, { slots: [\"\"] });\n\n render() {\n /* The title and the actions are flex items of the column themselves, so\n an empty one takes no box and leaves no gap. The body has a wrapper of\n its own, its paragraphs closer together, hidden while it is empty. */\n const leftContent = html`\n <div class=\"bd-features-tab-left\">\n <slot name=\"title\"></slot>\n <div class=\"bd-features-tab-content\" ?hidden=${!this._slots.has(\"\")}><slot></slot></div>\n <slot name=\"actions\"></slot>\n </div>\n `;\n\n const rightContent = html`\n <div class=\"bd-features-tab-right\"><slot name=\"media\"></slot></div>\n `;\n\n const contained = this.appearance === \"contained\";\n const content = html`\n <div class=\"${contained ? \"\" : \"bd-ensemble\"} bd-features-tab-container ${this.reverse ? \"bd-features-tab-reverse\" : \"\"}\">\n ${this.reverse\n ? html`${rightContent}${leftContent}`\n : html`${leftContent}${rightContent}`}\n </div>\n `;\n return contained ? html`<div class=\"bd-ensemble\">${content}</div>` : content;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-features-tab\": BdFeaturesTab;\n }\n}\n"],"mappings":"A,ggBA8BA,IACMI,EADN,cAC4BC,CAAW,C,8BAI3B,KAAA,QAAA,GAG4B,KAAA,WAAA,UAE7B,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,EAAE,CAAE,CAAC,C,QARjC,KAAA,OAAA,CAACC,EAAaR,CAAc,C,CAU5C,QAAS,CAIP,IAAMS,EAAc,CAAI;;;uDAG2B,CAAC,KAAK,OAAO,IAAI,EAAE,EAAE;;;MAKlEC,EAAe,CAAI;;MAInBC,EAAY,KAAK,aAAe,YAChCC,EAAU,CAAI;oBACJD,EAAY,GAAK,cAAc,6BAA6B,KAAK,QAAU,0BAA4B,GAAG;UACpH,KAAK,QACH,CAAI,GAAGD,IAAeD,IACtB,CAAI,GAAGA,IAAcC,IAAe;;MAG5C,OAAOC,EAAY,CAAI,4BAA4BC,EAAQ,QAAUA,CACvE,CACF,EAlCGX,EAAA,CAAAY,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAT,EAAA,UAAA,UAAA,IAAA,EAAA,EAGzCH,EAAA,CAAAY,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAT,EAAA,UAAA,aAAA,IAAA,EAAA,EAP1C,EAAAH,EAAA,CAAAa,EAAc,iBAAiB,CAAA,EAAAV,CAAA"}
|