@repobit/dex-system-design 4.3.2 → 4.4.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 CHANGED
@@ -3,6 +3,26 @@
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.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)
7
+
8
+ ### Features
9
+
10
+ * **DEX-28696:** bd-section grounds and even spacing where the ground changes
11
+ * **DEX-28696:** product hero headline set at a 1.1 leading
12
+
13
+ ### Bug Fixes
14
+
15
+ * **DEX-28696:** classify bd-section's background in the string-props registry
16
+
17
+
18
+ ## [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)
19
+
20
+ **Note:** Version bump only for package @repobit/dex-system-design
21
+
22
+
23
+
24
+
25
+
6
26
  ## [4.3.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.3.1...@repobit/dex-system-design@4.3.2) (2026-11-20)
7
27
 
8
28
  ### Bug Fixes
@@ -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{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.1}: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};
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 token: 1.1 is neither --typography-lineHeight-none (1) nor -tight\n (1.25), and choosing between them changes the height of a rendered\n statistic. A design-review item since P5E, carried here from\n trust-panel.css.ts unchanged. */\n line-height: 1.1;\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,ugG"}
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 padding-top: var(--spacing-64);\n /* A host that nests the section (bd-tabs) can shorten the closing pad.\n The name is 3.x's, which bd-tabs still sets. */\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,4wBAwFvBC,EAAmB,CAAG,m2B"}
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{background:var(--color-surface-default);padding-top:var(--spacing-16);padding-bottom:var(--spacing-16);display:block}.bd-container [hidden]{display:none}::slotted([slot=media]){object-fit:cover;width:100%;height:100%;z-index:var(--z-base);border-radius:var(--shape-radius-2xl);display:block;position:relative}::slotted(bd-img[slot=media]){grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:stretch stretch;display:grid}.bd-container{gap:var(--spacing-64);grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;display:grid}.bd-header-left{padding-block:var(--spacing-24)}.bd-header-left,.bd-header-right{flex:1}.bd-header-right{justify-content:center;align-items:stretch;width:100%;display:flex;position:relative}.bd-product-name{font-size:var(--typography-heading-h4-fontSize);font-weight:var(--typography-heading-h4-fontWeight);line-height:var(--typography-heading-h4-lineHeight);letter-spacing:var(--typography-heading-h4-letterSpacing);font-family:var(--typography-heading-h4-fontFamily);color:var(--color-text-brand);margin-top:var(--spacing-0);margin-bottom:var(--spacing-16)}.bd-value-prop{margin:var(--spacing-0)}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h1-fontSize);--bd-heading-font-weight:var(--typography-heading-h1-fontWeight);--bd-heading-line-height:var(--typography-heading-h1-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h1-letterSpacing);--bd-heading-font-family:var(--typography-heading-h1-fontFamily)}.bd-description{margin-top:var(--spacing-8);margin-bottom:var(--spacing-0)}::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-regular-fontSize);--bd-paragraph-font-weight:var(--typography-body-regular-fontWeight);--bd-paragraph-line-height:var(--typography-body-regular-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-regular-letterSpacing);--bd-heading-color:var(--color-text-primary);--bd-paragraph-color:var(--color-text-primary)}.bd-price-zone-top{gap:var(--spacing-8);margin-top:var(--spacing-16);align-items:center;display:flex}.original-price{--bd-paragraph-margin-bottom:0;color:var(--color-text-muted)}.bd-price-zone-final{font-size:var(--typography-heading-h2-fontSize);font-weight:var(--typography-heading-h2-fontWeight);line-height:var(--typography-heading-h2-lineHeight);letter-spacing:var(--typography-heading-h2-letterSpacing);font-family:var(--typography-heading-h2-fontFamily);margin-bottom:var(--spacing-16);display:block}.bd-cta{gap:var(--spacing-16);flex-wrap:wrap;display:flex}.bd-caption,.bd-small-print{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);color:var(--color-text-muted);margin:var(--spacing-0)}.bd-caption{margin-top:var(--spacing-8)}.bd-small-print{--bd-link-color:var(--color-text-primary)}.bd-header-image-wrapper{border-radius:var(--shape-radius-2xl);--bd-header-mark-inset:var(--spacing-24);--bd-header-mark-height:var(--icon-lg-size);--bd-header-scrim-fade:var(--spacing-112);--bd-header-scrim-mid:var(--spacing-40);justify-content:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.bd-header-scrim{height:calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height) + var(--bd-header-scrim-fade));background:linear-gradient(to top, color-mix(in srgb, var(--color-brand-950) 60%, transparent) 0, color-mix(in srgb, var(--color-brand-950) 60%, transparent) calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height)), color-mix(in srgb, var(--color-brand-950) 22%, transparent) calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height) + var(--bd-header-scrim-mid)), transparent 100%);z-index:var(--z-raised);pointer-events:none;position:absolute;inset-block-end:0;inset-inline:0}.bd-header-signature{z-index:var(--z-raised);color:var(--color-text-inverse);pointer-events:none;position:absolute;inset-block-end:var(--bd-header-mark-inset);inset-inline-end:var(--bd-header-mark-inset)}@media (width<992px){.bd-container{row-gap:var(--spacing-32);grid-template-columns:1fr}}@media (width<768px){.bd-cta{flex-direction:column;align-items:stretch}.bd-cta bd-button:not([hidden]){display:grid}.bd-header-image-wrapper{--bd-header-mark-inset:var(--spacing-16);--bd-header-mark-height:var(--icon-sm-size);--bd-header-scrim-fade:var(--spacing-48);--bd-header-scrim-mid:var(--spacing-16)}.bd-header-signature{height:var(--icon-sm-size)}}`;export{t as default};
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{background:var(--color-surface-default);padding-top:var(--spacing-16);padding-bottom:var(--spacing-16);display:block}.bd-container [hidden]{display:none}::slotted([slot=media]){object-fit:cover;width:100%;height:100%;z-index:var(--z-base);border-radius:var(--shape-radius-2xl);display:block;position:relative}::slotted(bd-img[slot=media]){grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:stretch stretch;display:grid}.bd-container{gap:var(--spacing-64);grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;display:grid}.bd-header-left{padding-block:var(--spacing-24)}.bd-header-left,.bd-header-right{flex:1}.bd-header-right{justify-content:center;align-items:stretch;width:100%;display:flex;position:relative}.bd-product-name{font-size:var(--typography-heading-h4-fontSize);font-weight:var(--typography-heading-h4-fontWeight);line-height:var(--typography-heading-h4-lineHeight);letter-spacing:var(--typography-heading-h4-letterSpacing);font-family:var(--typography-heading-h4-fontFamily);color:var(--color-text-brand);margin-top:var(--spacing-0);margin-bottom:var(--spacing-16)}.bd-value-prop{margin:var(--spacing-0)}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h1-fontSize);--bd-heading-font-weight:var(--typography-heading-h1-fontWeight);--bd-heading-line-height:var(--typography-lineHeight-110);--bd-heading-letter-spacing:var(--typography-heading-h1-letterSpacing);--bd-heading-font-family:var(--typography-heading-h1-fontFamily)}.bd-description{margin-top:var(--spacing-8);margin-bottom:var(--spacing-0)}::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-regular-fontSize);--bd-paragraph-font-weight:var(--typography-body-regular-fontWeight);--bd-paragraph-line-height:var(--typography-body-regular-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-regular-letterSpacing);--bd-heading-color:var(--color-text-primary);--bd-paragraph-color:var(--color-text-primary)}.bd-price-zone-top{gap:var(--spacing-8);margin-top:var(--spacing-16);align-items:center;display:flex}.original-price{--bd-paragraph-margin-bottom:0;color:var(--color-text-muted)}.bd-price-zone-final{font-size:var(--typography-heading-h2-fontSize);font-weight:var(--typography-heading-h2-fontWeight);line-height:var(--typography-heading-h2-lineHeight);letter-spacing:var(--typography-heading-h2-letterSpacing);font-family:var(--typography-heading-h2-fontFamily);margin-bottom:var(--spacing-16);display:block}.bd-cta{gap:var(--spacing-16);flex-wrap:wrap;display:flex}.bd-caption,.bd-small-print{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);color:var(--color-text-muted);margin:var(--spacing-0)}.bd-caption{margin-top:var(--spacing-8)}.bd-small-print{--bd-link-color:var(--color-text-primary)}.bd-header-image-wrapper{border-radius:var(--shape-radius-2xl);--bd-header-mark-inset:var(--spacing-24);--bd-header-mark-height:var(--icon-lg-size);--bd-header-scrim-fade:var(--spacing-112);--bd-header-scrim-mid:var(--spacing-40);justify-content:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.bd-header-scrim{height:calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height) + var(--bd-header-scrim-fade));background:linear-gradient(to top, color-mix(in srgb, var(--color-brand-950) 60%, transparent) 0, color-mix(in srgb, var(--color-brand-950) 60%, transparent) calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height)), color-mix(in srgb, var(--color-brand-950) 22%, transparent) calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height) + var(--bd-header-scrim-mid)), transparent 100%);z-index:var(--z-raised);pointer-events:none;position:absolute;inset-block-end:0;inset-inline:0}.bd-header-signature{z-index:var(--z-raised);color:var(--color-text-inverse);pointer-events:none;position:absolute;inset-block-end:var(--bd-header-mark-inset);inset-inline-end:var(--bd-header-mark-inset)}@media (width<992px){.bd-container{row-gap:var(--spacing-32);grid-template-columns:1fr}}@media (width<768px){.bd-cta{flex-direction:column;align-items:stretch}.bd-cta bd-button:not([hidden]){display:grid}.bd-header-image-wrapper{--bd-header-mark-inset:var(--spacing-16);--bd-header-mark-height:var(--icon-sm-size);--bd-header-scrim-fade:var(--spacing-48);--bd-header-scrim-mid:var(--spacing-16)}.bd-header-signature{height:var(--icon-sm-size)}}`;export{t as default};
2
2
  //# sourceMappingURL=product-hero.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-hero.css.js","names":["product_hero_css_default"],"sources":["../../../../src/components/product-hero/product-hero.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 /* --color-surface-default, the role, not --color-neutral-0, the primitive\n it resolves to. Same value; the category is the point, and CLAUDE.md's\n \"same primitive value is not same semantic meaning\" section exists for\n exactly this. */\n background: var(--color-surface-default);\n /* Sixteen top and bottom, which is how Header / v2's chosen configuration\n pads the hero row. That is the line of headroom the height study bought\n to get the header under 600 -- \"drop the frame padding 24 -> 16, which\n lands 562px and leaves 38px\". The text column takes its own 24 back\n below (.bd-header-left), so the copy still breathes; what got thinner\n is the band around the media panel, which needed nothing. */\n padding-top: var(--spacing-16);\n padding-bottom: var(--spacing-16);\n }\n\n /* Each part's box is hidden while its slot is empty -- the picture's whole\n column with it -- and the attribute's selector outweighs the display a\n box sets below. The second button is hidden the same way until it has\n somewhere to go: an outer-tree rule beats the button's own :host. */\n .bd-container [hidden] {\n display: none;\n }\n\n /* A REAL COVER FILL, not a zoom. 3.x once said height: auto with\n transform: scale(1.35) translateY(-7%), which is how a wide photograph was\n made to fill a tall box before the column stretched: blow it up 135%,\n shove it up 7%, and let the wrapper's overflow: hidden crop whatever\n misses. That threw away a third of the image's resolution for nothing --\n object-fit: cover already crops, and crops without magnifying -- and the\n crop it landed on moved with the viewport.\n .\n height: 100% is available because .bd-container stretches both columns to\n the taller one, so the wrapper has a definite height to fill. Header / v2\n shows a plain 613-wide media panel filled edge to edge with no transform,\n which is what this is.\n .\n It also matters to the scrim: the band and the mark are positioned against\n the WRAPPER, while a transformed image is not where the wrapper is. */\n ::slotted([slot=\"media\"]) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n z-index: var(--z-base);\n position: relative;\n border-radius: var(--shape-radius-2xl);\n }\n\n /* bd-img's own <img> is out of reach and sizes itself from its image, so\n the panel would show the ground under a picture shorter than the copy\n beside it. As a grid item stretched both ways it fills the panel instead,\n and its fit (cover by default) keeps the picture's proportions -- the\n cover fill above, one shadow root down. bd-post-card fills its cover the\n same way. */\n ::slotted(bd-img[slot=\"media\"]) {\n display: grid;\n grid-template: minmax(0, 1fr) / minmax(0, 1fr);\n justify-items: stretch;\n align-items: stretch;\n }\n\n .bd-container {\n display: grid;\n /* minmax(0, 1fr), not 1fr: a bare 1fr floors each column at its own\n min-content width, which held .bd-header-left at 201px however narrow\n the screen got and pushed the right-hand column 29px past a 320px\n viewport. The columns still share the space equally; they are simply\n allowed to go below their content's natural width, which is what lets\n the text inside wrap instead of the layout overflowing. With no\n picture the copy keeps its column: the second track stays, empty. */\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n /* --spacing-64, which is the 64px gap between the two 613px columns in\n Header / v2. */\n gap: var(--spacing-64);\n /* the page column (bd-ensemble), not a 240px gutter: a fixed gutter made the\n hero the one section whose content width depended on the viewport --\n 960 wide at 1440, 1440 wide at 1920 -- while every other module capped\n itself */\n align-items: stretch;\n }\n\n /* The content column's own inset, and the second half of the padding on\n :host. Header / v2 nests a 24-padded content frame inside a 16-padded\n row, so the copy sits 40 from the top of the section while the media panel\n sits 16 -- the image is meant to be the taller of the two. */\n .bd-header-left {\n padding-block: var(--spacing-24);\n }\n\n .bd-header-left,\n .bd-header-right {\n flex: 1;\n }\n\n .bd-header-right {\n display: flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n position: relative;\n }\n\n /* ---- the vertical rhythm of the content column --------------------------\n Header / v2's chosen configuration nests four auto-layout frames, and the\n gaps below are theirs read top to bottom:\n\n content gap 16 product-name -> body\n body gap 16 copy -> price -> actions\n copy gap 8 headline -> description\n actions gap 8 CTA row -> caption\n\n The 16/8/8 triple is variant I from the height study, the one\n configuration that measured the same 578px in all four languages tested.\n\n These are margins rather than a flex/grid gap because the column is a\n plain block flow and the atoms carry their own flow margins; a gap would\n mean also cancelling those. The description's bd-p keeps the 16 below\n it that its --bd-paragraph-margin-bottom gives, collapsing through the\n box around it, and that is the copy -> price gap. */\n\n /* The kicker. Its slot takes words, so the box around it is a <p> and this\n stylesheet declares its type: the heading-h4 ROLE rather than four\n primitives -- 2xl / semibold / 130 / normal tracking, which is what\n Header / v2 gives the product name. The words inherit it.\n\n A heading role on a non-heading element is the right way round, not a\n compromise. The job here is \"the most prominent label on the section\" --\n there is no 24px label role, and picking body-lead at 20 because it is\n nearer the body would be choosing by number. What the element is NOT is a\n heading, and that is settled by the tag, not by the role's name. */\n .bd-product-name {\n font-size: var(--typography-heading-h4-fontSize);\n font-weight: var(--typography-heading-h4-fontWeight);\n line-height: var(--typography-heading-h4-lineHeight);\n letter-spacing: var(--typography-heading-h4-letterSpacing);\n font-family: var(--typography-heading-h4-fontFamily);\n color: var(--color-text-brand);\n margin-top: var(--spacing-0);\n margin-bottom: var(--spacing-16);\n }\n\n /* The headline: heading-h1 at whatever level the page writes. 3.x pinned\n visual-level=\"h1\" on the bd-h it rendered, so heading-level could move\n the hero in the outline without repainting it -- unpinned, an h3 measured\n 32px at 1024 and 24px at 320 against 48 and 30. The hooks keep that\n promise for the page's own bd-h: its as is the outline, this is the size,\n and a visual-level or color= the page writes on it still wins.\n heading-h1 is fluid (CLAUDE.md, typography rule 13), 48 at lg and up and\n 30 at 320, so the headline steps down with the screen through the role\n rather than through a query here. */\n .bd-value-prop {\n margin: var(--spacing-0);\n }\n\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h1\"))}\n }\n\n .bd-description {\n margin-top: var(--spacing-8);\n margin-bottom: var(--spacing-0);\n }\n\n /* The paragraph 3.x drew as bd-p appearance=\"regular\" in primary ink: the\n body-regular role and the strong ink, through the hooks, so the page's\n bd-p is drawn as 3.x's was whatever appearance it carries. */\n ::slotted([slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-regular\"))}\n ${unsafeCSS(ink(\"strong\"))}\n }\n\n .bd-price-zone-top {\n display: flex;\n /* 8, which is the price-was frame's gap between the struck price and the\n discount badge. */\n gap: var(--spacing-8);\n align-items: center;\n /* the body frame's gap, 16. */\n margin-top: var(--spacing-16);\n }\n\n /* The struck price is <s> inside <bd-p appearance=\"regular\"> with the class\n .original-price, matching pricing-card.ts and pricing-card-pricing.ts:\n the role answers its size, <s> carries the strike natively, and bd-p's\n own :host sets the ink below.\n\n The one thing this rule has to do that is not typography: bd-p's inner\n <p> carries a 16px flow margin, and a bd-p in a flex row is a flex item,\n so it establishes a block formatting context and that margin cannot\n collapse through the host. Measured, the host rendered 37px where its\n text is 21px, which grew this zone from 28px to 37px and shifted the\n struck price 6px against the discount badge beside it. The atom takes\n --bd-paragraph-margin-bottom, so the margin is simply turned off. */\n .original-price {\n --bd-paragraph-margin-bottom: 0;\n /* text/muted, which is what Header / v2 gives the struck price. Colour on\n a bd-p host is LIVE (scripts/atom-inert-properties.json). A former\n price is the one number here that is deliberately not being offered --\n primary ink gave it the same weight in the eye as the price you can\n actually pay. */\n color: var(--color-text-muted);\n }\n\n /* .bd-discount is a bd-badge, so there is nothing left to declare; the\n class is kept only as a positioning hook. Header / v2 asks for the fill\n appearance -- a saturated status/success/fill ground with\n status/success/on-fill ink -- not the shade tint a hand-rolled span drew\n here before 3.x made it a badge. */\n\n .bd-price-zone-final {\n display: block;\n /* Header / v2 sets the final price at 36 Bold on a 1.25 leading, which is\n heading-h2 exactly (4xl / bold / tight / normal tracking) on all four\n axes. The role rather than the four primitives, so the size and the\n weight cannot drift apart. */\n font-size: var(--typography-heading-h2-fontSize);\n font-weight: var(--typography-heading-h2-fontWeight);\n line-height: var(--typography-heading-h2-lineHeight);\n letter-spacing: var(--typography-heading-h2-letterSpacing);\n font-family: var(--typography-heading-h2-fontFamily);\n /* the body frame's gap to the actions frame below, 16. */\n margin-bottom: var(--spacing-16);\n }\n\n .bd-cta {\n display: flex;\n gap: var(--spacing-16);\n /* WRAP, because the alternative is not \"stays on one line\" -- it is\n \"shrinks\". Flex items shrink by default, and measured at a 312px column\n the two buttons went from 183/246 to 150/146 and both labels broke over\n three lines inside a box padded for one. Wrapping costs about 71px, and\n it happens on its own at whatever width runs out rather than at a\n breakpoint somebody picks. */\n flex-wrap: wrap;\n }\n\n /* ---- the caption and the small print -------------------------------------\n Header / v2 draws these as ONE text node of two lines at 12 Regular in\n text/muted. Each is the page's words in a box of this component's, so\n the box carries the type and the words inherit it: bd-p's xsmall step,\n which 3.x drew both lines in. body-xsmall is a size and nothing else, so\n the weight, leading and tracking are body-small's, as bd-p borrows them\n -- 12 on a 1.45 leading, 17.4px, where the file says 150%. Figma binds\n the size to a variable there and leaves the leading raw, so the role is\n spelled rather than the file's number.\n\n 3.x drew the caption as a bd-p with the slot inside it and an English\n fallback (\"Protection for 1 account & 5 PCs, Macs, tablets, or\n smartphones. Windows | macOS | Android | iOS\"), and the small print as a\n bd-p around three slots that made one sentence between them. Neither has\n a fallback now, and the small print is one run of the page's phrasing,\n its link an inline bd-link. */\n .bd-caption,\n .bd-small-print {\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 color: var(--color-text-muted);\n margin: var(--spacing-0);\n }\n\n /* the actions frame's gap, 8. Zero between the two lines: the design has\n them as two consecutive lines of one paragraph, not two blocks with air\n between them. */\n .bd-caption {\n margin-top: var(--spacing-8);\n }\n\n /* The small print's link, in the ink 3.x gave the link it slotted: primary\n text, where a bd-link's own resting ink is the brand's. Set as the link's\n resting-colour hook, so its hover and its focus ring are still its own,\n and a color= the page writes on it still wins. */\n .bd-small-print {\n --bd-link-color: var(--color-text-primary);\n }\n\n .bd-header-image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow: hidden;\n border-radius: var(--shape-radius-2xl);\n }\n\n /* ---- THE BRAND SIGNATURE AND ITS SCRIM ---------------------------------\n Figma: Header / v2, media-panel, children bottom-to-top\n media -> scrim -> brand-signature. Both rules below are that stack.\n\n The mark replaced a .bd-header-watermark div holding the words \"Trusted.\n Always.\" at 32px/700: type doing a mark's job (CLAUDE.md's icon rule),\n English hardcoded beside a stylesheet, and clipped -- measured at 320px\n it read \"rusted. lways.\". The mark is our own artwork, says nothing that\n needs translating, and is 182px wide.\n\n WHY THERE IS A SCRIM AT ALL. The mark is white and the image underneath\n is the page's. Rendered against a real photo with no scrim the worst\n pixel-neighbourhood under the mark measured 1.00:1, with 33.5% of its area\n under the 3:1 that WCAG 1.4.11 asks of a non-text graphic.\n\n WHY blue-950 AND NOT THE BRAND BLUE. White on --color-blue-500 is 4.53:1\n SOLID, so no partial coverage of it can ever guarantee the minimum.\n blue-950 at 60% holds white above 4.5:1 over any image including a white\n one. Measured over the test photo: worst 8.64:1, nothing under 4.5.\n\n THE GEOMETRY IS DERIVED, NOT DRAWN. The band is 48 + 112: 48 is the\n mark's own box -- a --spacing-24 inset plus the 24px the artwork is drawn\n at -- and 112 is the fade above it, so the plateau ends exactly on the\n mark's top edge by construction. That survives a reader enlarging their\n text: the inset is rem and the artwork is px, so at a 24px root the band is\n 240 with its plateau at 72 and the mark occupies 36-60. It does NOT survive\n a root SMALLER than 16px -- at 12px the mark's top edge sits about 6px into\n the ramp, where the scrim is still ~0.52 rather than 0.60.\n\n The first stop is the transparent keyword rather than blue-950 at 0%.\n Gradient interpolation is premultiplied, so that keyword does not fade\n through grey. */\n /* The lengths everything below is derived from. They live on the wrapper\n so the scrim and the mark, both its children, read the SAME inset. */\n .bd-header-image-wrapper {\n --bd-header-mark-inset: var(--spacing-24);\n /* the height the artwork is drawn at, and the step the atom defaults to */\n --bd-header-mark-height: var(--icon-lg-size);\n --bd-header-scrim-fade: var(--spacing-112);\n --bd-header-scrim-mid: var(--spacing-40);\n }\n\n /* LENGTH STOPS, NOT PERCENTAGES. Written as lengths from the bottom, the\n plateau IS the mark's box at any size, so the narrow version below is\n two smaller numbers rather than a second set of percentages. The stops\n resolve to Figma's exactly at desktop: plateau 0-48, 0.22 at 88, zero at\n 160. */\n .bd-header-scrim {\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n height: calc(\n var(--bd-header-mark-inset) + var(--bd-header-mark-height) +\n var(--bd-header-scrim-fade)\n );\n background: linear-gradient(\n to top,\n color-mix(in srgb, var(--color-brand-950) 60%, transparent) 0,\n color-mix(in srgb, var(--color-brand-950) 60%, transparent)\n calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height)),\n color-mix(in srgb, var(--color-brand-950) 22%, transparent)\n calc(\n var(--bd-header-mark-inset) + var(--bd-header-mark-height) +\n var(--bd-header-scrim-mid)\n ),\n transparent 100%\n );\n z-index: var(--z-raised);\n pointer-events: none;\n }\n\n .bd-header-signature {\n position: absolute;\n /* the same property the scrim sizes its plateau from, so the band cannot\n stop covering the mark when the inset changes below md */\n inset-block-end: var(--bd-header-mark-inset);\n inset-inline-end: var(--bd-header-mark-inset);\n z-index: var(--z-raised);\n color: var(--color-text-inverse);\n pointer-events: none;\n }\n\n /* ---- RESPONSIVE ---------------------------------------------------------\n Three steps, each on the breakpoint scale in shared/token-scales.ts, and\n each one measured rather than guessed. There is no mobile frame in Figma:\n the height study was run at 1290 only, so every width below that is a\n decision taken here.\n\n WHY below('lg') IS THE STACKING POINT. The page column caps at\n --grid-container-max-* with --grid-padding-* either side, so the content\n width per step is fixed and so is the two-column arithmetic once the 64px\n gap comes out of it:\n\n xxxl 1372 - 80 = 1292 -> 614 per column\n xxl 1280 - 80 = 1200 -> 568\n xl 1140 - 80 = 1060 -> 498\n lg 960 - 80 = 880 -> 408\n md 720 - 64 = 656 -> 296\n sm 540 - 48 = 492 -> 214\n\n The CTA row is 446px wide. It fits at xl and above, wraps at lg, and at md\n there is less room than one button needs. lg is therefore the last step\n where two columns are even arguable: two columns at lg cost the\n description a fourth line, the CTA row a wrap, and the section 661px\n against the design's 566. Stacked at lg the copy gets one 880px column\n and then an 880px-wide photograph under it at its own 1.497 ratio, about\n 1100px of hero in a window 992-1199 wide. 661 beats that. Stacking is\n the answer below lg, not at it. */\n @media ${unsafeCSS(below('lg'))} {\n .bd-container {\n /* grid-template-columns, not flex-direction: the container is a grid */\n grid-template-columns: 1fr;\n /* row-gap only. 32 is the distance between the copy and the image once\n they are stacked; with no picture there is no second row and no\n gap. */\n row-gap: var(--spacing-32);\n }\n }\n\n /* Narrower than md. Separate from the stacking block above on purpose:\n stacking and the phone treatment are different decisions at different\n widths, and at md the column is 656px where a side-by-side CTA row still\n fits.\n\n THE CONTENT STAYS LEFT-ALIGNED AT EVERY WIDTH. Header / v2 is\n left-aligned and no frame in the file centres; six stacked blocks of very\n different widths share no edge when centred; and centring needed a patch\n (justify-content on the flex price row, which text-align cannot move) to\n stop looking broken, which is the argument against it. */\n @media ${unsafeCSS(below('md'))} {\n /* stretch, not center. The two labels are different lengths, so hugging\n gave a 183px button above a 246px one. Full-width they are the same\n object twice and the tap targets stop varying with the copy. */\n .bd-cta {\n flex-direction: column;\n align-items: stretch;\n }\n\n /* STRETCHING THE COLUMN IS NOT ENOUGH. With align-items: stretch the\n HOSTS go full width, but the anchor inside each one is inline-flex and\n hugs its label. The atom's own answer is its full-width attribute, which\n a media query cannot set, so this reaches the same computed result\n through the host's formatting context instead: an outer-tree rule beats\n the atom's :host, and a lone child of a single-column grid fills its\n track. Measured: hosts 492, anchors 183/246 -> 492/492.\n\n The coupling is worth knowing: this depends on the control being the\n button's only shadow child, which it is (a.button, or button.button\n for a secondary with no href). If the button ever wraps it, prefer\n full-width on the markup and the viewport state it needs.\n\n :not([hidden]), so the second button stays hidden while it has nowhere\n to go: this rule outweighs the [hidden] one above. */\n .bd-cta bd-button:not([hidden]) {\n display: grid;\n }\n }\n\n /* THE BAND STEPS WITH THE PANEL, and it steps at md rather than sm because\n that is where the panel stops being landscape. Measured with the band held\n at its desktop 160 all the way down: 37% of the panel at 768-991, then 49%\n at 600. The panel's height follows the copy beside it when the columns\n are side by side, and its own 1.497 ratio once they stack -- 311x208 at\n 375 and 256x171 at 320, which put a 160px band at 77% and 94% of it. So\n the band is re-proportioned rather than capped: the inset drops a step\n and the fade drops to 48, giving 40 + 48 = 88, 42% at 375 and 51% at 320,\n and the plateau still covers the mark exactly. */\n @media ${unsafeCSS(below('md'))} {\n .bd-header-image-wrapper {\n --bd-header-mark-inset: var(--spacing-16);\n --bd-header-mark-height: var(--icon-sm-size);\n --bd-header-scrim-fade: var(--spacing-48);\n --bd-header-scrim-mid: var(--spacing-16);\n }\n\n /* THE MARK STEPS DOWN A SIZE. At 320 the panel is 256 wide and the mark\n was 182 of it -- 71%, against 30% in the design -- so a corner\n signature became a caption laid across the picture. A height on the\n host rather than the atom's size attribute, because the size is a\n viewport question and the attribute is not reachable from a media\n query; the atom's own rule is :host { height: var(--bd-icon-size, ...) },\n and the outer tree wins. sm on the icon scale is 16px, so the mark\n renders 121 wide, and --bd-header-mark-height above follows it. */\n .bd-header-signature {\n height: var(--icon-sm-size);\n }\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,0/I"}
1
+ {"version":3,"file":"product-hero.css.js","names":["product_hero_css_default"],"sources":["../../../../src/components/product-hero/product-hero.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 /* --color-surface-default, the role, not --color-neutral-0, the primitive\n it resolves to. Same value; the category is the point, and CLAUDE.md's\n \"same primitive value is not same semantic meaning\" section exists for\n exactly this. */\n background: var(--color-surface-default);\n /* Sixteen top and bottom, which is how Header / v2's chosen configuration\n pads the hero row. That is the line of headroom the height study bought\n to get the header under 600 -- \"drop the frame padding 24 -> 16, which\n lands 562px and leaves 38px\". The text column takes its own 24 back\n below (.bd-header-left), so the copy still breathes; what got thinner\n is the band around the media panel, which needed nothing. */\n padding-top: var(--spacing-16);\n padding-bottom: var(--spacing-16);\n }\n\n /* Each part's box is hidden while its slot is empty -- the picture's whole\n column with it -- and the attribute's selector outweighs the display a\n box sets below. The second button is hidden the same way until it has\n somewhere to go: an outer-tree rule beats the button's own :host. */\n .bd-container [hidden] {\n display: none;\n }\n\n /* A REAL COVER FILL, not a zoom. 3.x once said height: auto with\n transform: scale(1.35) translateY(-7%), which is how a wide photograph was\n made to fill a tall box before the column stretched: blow it up 135%,\n shove it up 7%, and let the wrapper's overflow: hidden crop whatever\n misses. That threw away a third of the image's resolution for nothing --\n object-fit: cover already crops, and crops without magnifying -- and the\n crop it landed on moved with the viewport.\n .\n height: 100% is available because .bd-container stretches both columns to\n the taller one, so the wrapper has a definite height to fill. Header / v2\n shows a plain 613-wide media panel filled edge to edge with no transform,\n which is what this is.\n .\n It also matters to the scrim: the band and the mark are positioned against\n the WRAPPER, while a transformed image is not where the wrapper is. */\n ::slotted([slot=\"media\"]) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n z-index: var(--z-base);\n position: relative;\n border-radius: var(--shape-radius-2xl);\n }\n\n /* bd-img's own <img> is out of reach and sizes itself from its image, so\n the panel would show the ground under a picture shorter than the copy\n beside it. As a grid item stretched both ways it fills the panel instead,\n and its fit (cover by default) keeps the picture's proportions -- the\n cover fill above, one shadow root down. bd-post-card fills its cover the\n same way. */\n ::slotted(bd-img[slot=\"media\"]) {\n display: grid;\n grid-template: minmax(0, 1fr) / minmax(0, 1fr);\n justify-items: stretch;\n align-items: stretch;\n }\n\n .bd-container {\n display: grid;\n /* minmax(0, 1fr), not 1fr: a bare 1fr floors each column at its own\n min-content width, which held .bd-header-left at 201px however narrow\n the screen got and pushed the right-hand column 29px past a 320px\n viewport. The columns still share the space equally; they are simply\n allowed to go below their content's natural width, which is what lets\n the text inside wrap instead of the layout overflowing. With no\n picture the copy keeps its column: the second track stays, empty. */\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n /* --spacing-64, which is the 64px gap between the two 613px columns in\n Header / v2. */\n gap: var(--spacing-64);\n /* the page column (bd-ensemble), not a 240px gutter: a fixed gutter made the\n hero the one section whose content width depended on the viewport --\n 960 wide at 1440, 1440 wide at 1920 -- while every other module capped\n itself */\n align-items: stretch;\n }\n\n /* The content column's own inset, and the second half of the padding on\n :host. Header / v2 nests a 24-padded content frame inside a 16-padded\n row, so the copy sits 40 from the top of the section while the media panel\n sits 16 -- the image is meant to be the taller of the two. */\n .bd-header-left {\n padding-block: var(--spacing-24);\n }\n\n .bd-header-left,\n .bd-header-right {\n flex: 1;\n }\n\n .bd-header-right {\n display: flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n position: relative;\n }\n\n /* ---- the vertical rhythm of the content column --------------------------\n Header / v2's chosen configuration nests four auto-layout frames, and the\n gaps below are theirs read top to bottom:\n\n content gap 16 product-name -> body\n body gap 16 copy -> price -> actions\n copy gap 8 headline -> description\n actions gap 8 CTA row -> caption\n\n The 16/8/8 triple is variant I from the height study, the one\n configuration that measured the same 578px in all four languages tested.\n\n These are margins rather than a flex/grid gap because the column is a\n plain block flow and the atoms carry their own flow margins; a gap would\n mean also cancelling those. The description's bd-p keeps the 16 below\n it that its --bd-paragraph-margin-bottom gives, collapsing through the\n box around it, and that is the copy -> price gap. */\n\n /* The kicker. Its slot takes words, so the box around it is a <p> and this\n stylesheet declares its type: the heading-h4 ROLE rather than four\n primitives -- 2xl / semibold / 130 / normal tracking, which is what\n Header / v2 gives the product name. The words inherit it.\n\n A heading role on a non-heading element is the right way round, not a\n compromise. The job here is \"the most prominent label on the section\" --\n there is no 24px label role, and picking body-lead at 20 because it is\n nearer the body would be choosing by number. What the element is NOT is a\n heading, and that is settled by the tag, not by the role's name. */\n .bd-product-name {\n font-size: var(--typography-heading-h4-fontSize);\n font-weight: var(--typography-heading-h4-fontWeight);\n line-height: var(--typography-heading-h4-lineHeight);\n letter-spacing: var(--typography-heading-h4-letterSpacing);\n font-family: var(--typography-heading-h4-fontFamily);\n color: var(--color-text-brand);\n margin-top: var(--spacing-0);\n margin-bottom: var(--spacing-16);\n }\n\n /* The headline: heading-h1 at whatever level the page writes. 3.x pinned\n visual-level=\"h1\" on the bd-h it rendered, so heading-level could move\n the hero in the outline without repainting it -- unpinned, an h3 measured\n 32px at 1024 and 24px at 320 against 48 and 30. The hooks keep that\n promise for the page's own bd-h: its as is the outline, this is the size,\n and a visual-level or color= the page writes on it still wins.\n heading-h1 is fluid (CLAUDE.md, typography rule 13), 48 at lg and up and\n 30 at 320, so the headline steps down with the screen through the role\n rather than through a query here. */\n .bd-value-prop {\n margin: var(--spacing-0);\n }\n\n /* ...its lines set close, the 110 step: the product pages draw the\n headline tighter than the h1 role's tight (DEX-28696; tokens.ts says\n what that costs). */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h1\"))}\n /* no role: the h1 role's size, set closer than any role's leading */\n --bd-heading-line-height: var(--typography-lineHeight-110);\n }\n\n .bd-description {\n margin-top: var(--spacing-8);\n margin-bottom: var(--spacing-0);\n }\n\n /* The paragraph 3.x drew as bd-p appearance=\"regular\" in primary ink: the\n body-regular role and the strong ink, through the hooks, so the page's\n bd-p is drawn as 3.x's was whatever appearance it carries. */\n ::slotted([slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-regular\"))}\n ${unsafeCSS(ink(\"strong\"))}\n }\n\n .bd-price-zone-top {\n display: flex;\n /* 8, which is the price-was frame's gap between the struck price and the\n discount badge. */\n gap: var(--spacing-8);\n align-items: center;\n /* the body frame's gap, 16. */\n margin-top: var(--spacing-16);\n }\n\n /* The struck price is <s> inside <bd-p appearance=\"regular\"> with the class\n .original-price, matching pricing-card.ts and pricing-card-pricing.ts:\n the role answers its size, <s> carries the strike natively, and bd-p's\n own :host sets the ink below.\n\n The one thing this rule has to do that is not typography: bd-p's inner\n <p> carries a 16px flow margin, and a bd-p in a flex row is a flex item,\n so it establishes a block formatting context and that margin cannot\n collapse through the host. Measured, the host rendered 37px where its\n text is 21px, which grew this zone from 28px to 37px and shifted the\n struck price 6px against the discount badge beside it. The atom takes\n --bd-paragraph-margin-bottom, so the margin is simply turned off. */\n .original-price {\n --bd-paragraph-margin-bottom: 0;\n /* text/muted, which is what Header / v2 gives the struck price. Colour on\n a bd-p host is LIVE (scripts/atom-inert-properties.json). A former\n price is the one number here that is deliberately not being offered --\n primary ink gave it the same weight in the eye as the price you can\n actually pay. */\n color: var(--color-text-muted);\n }\n\n /* .bd-discount is a bd-badge, so there is nothing left to declare; the\n class is kept only as a positioning hook. Header / v2 asks for the fill\n appearance -- a saturated status/success/fill ground with\n status/success/on-fill ink -- not the shade tint a hand-rolled span drew\n here before 3.x made it a badge. */\n\n .bd-price-zone-final {\n display: block;\n /* Header / v2 sets the final price at 36 Bold on a 1.25 leading, which is\n heading-h2 exactly (4xl / bold / tight / normal tracking) on all four\n axes. The role rather than the four primitives, so the size and the\n weight cannot drift apart. */\n font-size: var(--typography-heading-h2-fontSize);\n font-weight: var(--typography-heading-h2-fontWeight);\n line-height: var(--typography-heading-h2-lineHeight);\n letter-spacing: var(--typography-heading-h2-letterSpacing);\n font-family: var(--typography-heading-h2-fontFamily);\n /* the body frame's gap to the actions frame below, 16. */\n margin-bottom: var(--spacing-16);\n }\n\n .bd-cta {\n display: flex;\n gap: var(--spacing-16);\n /* WRAP, because the alternative is not \"stays on one line\" -- it is\n \"shrinks\". Flex items shrink by default, and measured at a 312px column\n the two buttons went from 183/246 to 150/146 and both labels broke over\n three lines inside a box padded for one. Wrapping costs about 71px, and\n it happens on its own at whatever width runs out rather than at a\n breakpoint somebody picks. */\n flex-wrap: wrap;\n }\n\n /* ---- the caption and the small print -------------------------------------\n Header / v2 draws these as ONE text node of two lines at 12 Regular in\n text/muted. Each is the page's words in a box of this component's, so\n the box carries the type and the words inherit it: bd-p's xsmall step,\n which 3.x drew both lines in. body-xsmall is a size and nothing else, so\n the weight, leading and tracking are body-small's, as bd-p borrows them\n -- 12 on a 1.45 leading, 17.4px, where the file says 150%. Figma binds\n the size to a variable there and leaves the leading raw, so the role is\n spelled rather than the file's number.\n\n 3.x drew the caption as a bd-p with the slot inside it and an English\n fallback (\"Protection for 1 account & 5 PCs, Macs, tablets, or\n smartphones. Windows | macOS | Android | iOS\"), and the small print as a\n bd-p around three slots that made one sentence between them. Neither has\n a fallback now, and the small print is one run of the page's phrasing,\n its link an inline bd-link. */\n .bd-caption,\n .bd-small-print {\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 color: var(--color-text-muted);\n margin: var(--spacing-0);\n }\n\n /* the actions frame's gap, 8. Zero between the two lines: the design has\n them as two consecutive lines of one paragraph, not two blocks with air\n between them. */\n .bd-caption {\n margin-top: var(--spacing-8);\n }\n\n /* The small print's link, in the ink 3.x gave the link it slotted: primary\n text, where a bd-link's own resting ink is the brand's. Set as the link's\n resting-colour hook, so its hover and its focus ring are still its own,\n and a color= the page writes on it still wins. */\n .bd-small-print {\n --bd-link-color: var(--color-text-primary);\n }\n\n .bd-header-image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow: hidden;\n border-radius: var(--shape-radius-2xl);\n }\n\n /* ---- THE BRAND SIGNATURE AND ITS SCRIM ---------------------------------\n Figma: Header / v2, media-panel, children bottom-to-top\n media -> scrim -> brand-signature. Both rules below are that stack.\n\n The mark replaced a .bd-header-watermark div holding the words \"Trusted.\n Always.\" at 32px/700: type doing a mark's job (CLAUDE.md's icon rule),\n English hardcoded beside a stylesheet, and clipped -- measured at 320px\n it read \"rusted. lways.\". The mark is our own artwork, says nothing that\n needs translating, and is 182px wide.\n\n WHY THERE IS A SCRIM AT ALL. The mark is white and the image underneath\n is the page's. Rendered against a real photo with no scrim the worst\n pixel-neighbourhood under the mark measured 1.00:1, with 33.5% of its area\n under the 3:1 that WCAG 1.4.11 asks of a non-text graphic.\n\n WHY blue-950 AND NOT THE BRAND BLUE. White on --color-blue-500 is 4.53:1\n SOLID, so no partial coverage of it can ever guarantee the minimum.\n blue-950 at 60% holds white above 4.5:1 over any image including a white\n one. Measured over the test photo: worst 8.64:1, nothing under 4.5.\n\n THE GEOMETRY IS DERIVED, NOT DRAWN. The band is 48 + 112: 48 is the\n mark's own box -- a --spacing-24 inset plus the 24px the artwork is drawn\n at -- and 112 is the fade above it, so the plateau ends exactly on the\n mark's top edge by construction. That survives a reader enlarging their\n text: the inset is rem and the artwork is px, so at a 24px root the band is\n 240 with its plateau at 72 and the mark occupies 36-60. It does NOT survive\n a root SMALLER than 16px -- at 12px the mark's top edge sits about 6px into\n the ramp, where the scrim is still ~0.52 rather than 0.60.\n\n The first stop is the transparent keyword rather than blue-950 at 0%.\n Gradient interpolation is premultiplied, so that keyword does not fade\n through grey. */\n /* The lengths everything below is derived from. They live on the wrapper\n so the scrim and the mark, both its children, read the SAME inset. */\n .bd-header-image-wrapper {\n --bd-header-mark-inset: var(--spacing-24);\n /* the height the artwork is drawn at, and the step the atom defaults to */\n --bd-header-mark-height: var(--icon-lg-size);\n --bd-header-scrim-fade: var(--spacing-112);\n --bd-header-scrim-mid: var(--spacing-40);\n }\n\n /* LENGTH STOPS, NOT PERCENTAGES. Written as lengths from the bottom, the\n plateau IS the mark's box at any size, so the narrow version below is\n two smaller numbers rather than a second set of percentages. The stops\n resolve to Figma's exactly at desktop: plateau 0-48, 0.22 at 88, zero at\n 160. */\n .bd-header-scrim {\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n height: calc(\n var(--bd-header-mark-inset) + var(--bd-header-mark-height) +\n var(--bd-header-scrim-fade)\n );\n background: linear-gradient(\n to top,\n color-mix(in srgb, var(--color-brand-950) 60%, transparent) 0,\n color-mix(in srgb, var(--color-brand-950) 60%, transparent)\n calc(var(--bd-header-mark-inset) + var(--bd-header-mark-height)),\n color-mix(in srgb, var(--color-brand-950) 22%, transparent)\n calc(\n var(--bd-header-mark-inset) + var(--bd-header-mark-height) +\n var(--bd-header-scrim-mid)\n ),\n transparent 100%\n );\n z-index: var(--z-raised);\n pointer-events: none;\n }\n\n .bd-header-signature {\n position: absolute;\n /* the same property the scrim sizes its plateau from, so the band cannot\n stop covering the mark when the inset changes below md */\n inset-block-end: var(--bd-header-mark-inset);\n inset-inline-end: var(--bd-header-mark-inset);\n z-index: var(--z-raised);\n color: var(--color-text-inverse);\n pointer-events: none;\n }\n\n /* ---- RESPONSIVE ---------------------------------------------------------\n Three steps, each on the breakpoint scale in shared/token-scales.ts, and\n each one measured rather than guessed. There is no mobile frame in Figma:\n the height study was run at 1290 only, so every width below that is a\n decision taken here.\n\n WHY below('lg') IS THE STACKING POINT. The page column caps at\n --grid-container-max-* with --grid-padding-* either side, so the content\n width per step is fixed and so is the two-column arithmetic once the 64px\n gap comes out of it:\n\n xxxl 1372 - 80 = 1292 -> 614 per column\n xxl 1280 - 80 = 1200 -> 568\n xl 1140 - 80 = 1060 -> 498\n lg 960 - 80 = 880 -> 408\n md 720 - 64 = 656 -> 296\n sm 540 - 48 = 492 -> 214\n\n The CTA row is 446px wide. It fits at xl and above, wraps at lg, and at md\n there is less room than one button needs. lg is therefore the last step\n where two columns are even arguable: two columns at lg cost the\n description a fourth line, the CTA row a wrap, and the section 661px\n against the design's 566. Stacked at lg the copy gets one 880px column\n and then an 880px-wide photograph under it at its own 1.497 ratio, about\n 1100px of hero in a window 992-1199 wide. 661 beats that. Stacking is\n the answer below lg, not at it. */\n @media ${unsafeCSS(below('lg'))} {\n .bd-container {\n /* grid-template-columns, not flex-direction: the container is a grid */\n grid-template-columns: 1fr;\n /* row-gap only. 32 is the distance between the copy and the image once\n they are stacked; with no picture there is no second row and no\n gap. */\n row-gap: var(--spacing-32);\n }\n }\n\n /* Narrower than md. Separate from the stacking block above on purpose:\n stacking and the phone treatment are different decisions at different\n widths, and at md the column is 656px where a side-by-side CTA row still\n fits.\n\n THE CONTENT STAYS LEFT-ALIGNED AT EVERY WIDTH. Header / v2 is\n left-aligned and no frame in the file centres; six stacked blocks of very\n different widths share no edge when centred; and centring needed a patch\n (justify-content on the flex price row, which text-align cannot move) to\n stop looking broken, which is the argument against it. */\n @media ${unsafeCSS(below('md'))} {\n /* stretch, not center. The two labels are different lengths, so hugging\n gave a 183px button above a 246px one. Full-width they are the same\n object twice and the tap targets stop varying with the copy. */\n .bd-cta {\n flex-direction: column;\n align-items: stretch;\n }\n\n /* STRETCHING THE COLUMN IS NOT ENOUGH. With align-items: stretch the\n HOSTS go full width, but the anchor inside each one is inline-flex and\n hugs its label. The atom's own answer is its full-width attribute, which\n a media query cannot set, so this reaches the same computed result\n through the host's formatting context instead: an outer-tree rule beats\n the atom's :host, and a lone child of a single-column grid fills its\n track. Measured: hosts 492, anchors 183/246 -> 492/492.\n\n The coupling is worth knowing: this depends on the control being the\n button's only shadow child, which it is (a.button, or button.button\n for a secondary with no href). If the button ever wraps it, prefer\n full-width on the markup and the viewport state it needs.\n\n :not([hidden]), so the second button stays hidden while it has nowhere\n to go: this rule outweighs the [hidden] one above. */\n .bd-cta bd-button:not([hidden]) {\n display: grid;\n }\n }\n\n /* THE BAND STEPS WITH THE PANEL, and it steps at md rather than sm because\n that is where the panel stops being landscape. Measured with the band held\n at its desktop 160 all the way down: 37% of the panel at 768-991, then 49%\n at 600. The panel's height follows the copy beside it when the columns\n are side by side, and its own 1.497 ratio once they stack -- 311x208 at\n 375 and 256x171 at 320, which put a 160px band at 77% and 94% of it. So\n the band is re-proportioned rather than capped: the inset drops a step\n and the fade drops to 48, giving 40 + 48 = 88, 42% at 375 and 51% at 320,\n and the plateau still covers the mark exactly. */\n @media ${unsafeCSS(below('md'))} {\n .bd-header-image-wrapper {\n --bd-header-mark-inset: var(--spacing-16);\n --bd-header-mark-height: var(--icon-sm-size);\n --bd-header-scrim-fade: var(--spacing-48);\n --bd-header-scrim-mid: var(--spacing-16);\n }\n\n /* THE MARK STEPS DOWN A SIZE. At 320 the panel is 256 wide and the mark\n was 182 of it -- 71%, against 30% in the design -- so a corner\n signature became a caption laid across the picture. A height on the\n host rather than the atom's size attribute, because the size is a\n viewport question and the attribute is not reachable from a media\n query; the atom's own rule is :host { height: var(--bd-icon-size, ...) },\n and the outer tree wins. sm on the icon scale is 16px, so the mark\n renders 121 wide, and --bd-header-mark-height above follows it. */\n .bd-header-signature {\n height: var(--icon-sm-size);\n }\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,m/I"}
@@ -1,2 +1,2 @@
1
- import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{--bd-section-padding:var(--spacing-24);gap:calc(var(--bd-section-padding) * 2);padding-block:var(--bd-section-padding);flex-direction:column;display:flex}@media (width>=768px){:host{--bd-section-padding:var(--spacing-32)}}:host([without-padding-top]){padding-block-start:0}:host([without-padding-bottom]){padding-block-end:0}`;export{t as default};
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{--bd-section-padding:var(--spacing-24);gap:calc(var(--bd-section-padding) * 2);padding-block:var(--bd-section-padding);flex-direction:column;display:flex}@media (width>=768px){:host{--bd-section-padding:var(--spacing-32)}}:host([without-padding-top]){padding-block-start:0}:host([without-padding-bottom]){padding-block-end:0}:host([background=container]){background-color:var(--color-surface-container)}:host([background=tint]){background-color:var(--status-brand-surface)}:host(:state(ground-change-above):not([without-padding-top])){padding-block-start:calc(var(--bd-section-padding) * 2)}:host(:state(ground-change-below):not([without-padding-bottom])){padding-block-end:calc(var(--bd-section-padding) * 2)}`;export{t as default};
2
2
  //# sourceMappingURL=section.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"section.css.js","names":["section_css_default"],"sources":["../../../../src/components/section/section.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* One distance, and twice it. Every section of the Figma homepage frames sits\n the same inset in from its top and its bottom -- 24 on the 390 phone frame,\n 32 on the 768 tablet and the 1440 desktop -- so two sections stand twice\n that apart, 48 and 64. The blocks inside a section take the same doubled\n gap, so two blocks of one section sit as far apart as two sections do, and\n one rhythm runs down the whole page.\n\n Vertical only. The page column is each module's own (ensembleCSS), so a\n section never sets a width, an inline padding or a ground. */\nexport default css`\n :host {\n --bd-section-padding: var(--spacing-24);\n\n display: flex;\n flex-direction: column;\n gap: calc(var(--bd-section-padding) * 2);\n padding-block: var(--bd-section-padding);\n }\n\n @media ${unsafeCSS(above(\"md\"))} {\n :host {\n --bd-section-padding: var(--spacing-32);\n }\n }\n\n /* An edge is on or off, never another size: the block meets its neighbour\n there, and keeps the inset everywhere else. */\n :host([without-padding-top]) {\n padding-block-start: 0;\n }\n\n :host([without-padding-bottom]) {\n padding-block-end: 0;\n }\n`;\n"],"mappings":"A,4DAYA,IAAAA,EAAe,CAAG,8U"}
1
+ {"version":3,"file":"section.css.js","names":["section_css_default"],"sources":["../../../../src/components/section/section.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* One distance, and twice it. Every section of the Figma homepage frames sits\n the same inset in from its top and its bottom -- 24 on the 390 phone frame,\n 32 on the 768 tablet and the 1440 desktop -- so two sections stand twice\n that apart, 48 and 64. The blocks inside a section take the same doubled\n gap, so two blocks of one section sit as far apart as two sections do, and\n one rhythm runs down the whole page.\n\n Vertical only. The page column is each module's own (ensembleCSS), so a\n section never sets a width or an inline padding. Its ground is optional\n (background, below). */\nexport default css`\n :host {\n --bd-section-padding: var(--spacing-24);\n\n display: flex;\n flex-direction: column;\n gap: calc(var(--bd-section-padding) * 2);\n padding-block: var(--bd-section-padding);\n }\n\n @media ${unsafeCSS(above(\"md\"))} {\n :host {\n --bd-section-padding: var(--spacing-32);\n }\n }\n\n /* An edge is on or off, never another size: the block meets its neighbour\n there, and keeps the inset everywhere else. */\n :host([without-padding-top]) {\n padding-block-start: 0;\n }\n\n :host([without-padding-bottom]) {\n padding-block-end: 0;\n }\n\n /* A ground, painted across the padding: the band's edge is the section's\n edge. */\n :host([background=\"container\"]) {\n background-color: var(--color-surface-container);\n }\n\n :host([background=\"tint\"]) {\n background-color: var(--status-brand-surface);\n }\n\n /* Where the ground changes, the edge pads twice the inset, on both sides\n of it: the eye measures to the edge there, not to the content beyond it\n (section.ts states which edges). An edge turned off stays off. */\n :host(:state(ground-change-above):not([without-padding-top])) {\n padding-block-start: calc(var(--bd-section-padding) * 2);\n }\n\n :host(:state(ground-change-below):not([without-padding-bottom])) {\n padding-block-end: calc(var(--bd-section-padding) * 2);\n }\n`;\n"],"mappings":"A,4DAaA,IAAAA,EAAe,CAAG,+sB"}
@@ -1,5 +1,7 @@
1
- import { LitElement } from "lit";
1
+ import { LitElement, type PropertyValues } from "lit";
2
2
  import "../../tokens/tokens.js";
3
+ export declare const SECTION_BACKGROUNDS: readonly ["none", "container", "tint"];
4
+ export type SectionBackground = typeof SECTION_BACKGROUNDS[number];
3
5
  /**
4
6
  * A page section: the vertical rhythm a page is built on, and nothing else.
5
7
  * It pads its top and bottom by the section inset (24 on a phone, 32 from md)
@@ -15,15 +17,49 @@ import "../../tokens/tokens.js";
15
17
  * section after it. (3.x spelled them `no-padding-top` and
16
18
  * `no-padding-bottom`; N5 makes a removed default part `without-*`.)
17
19
  *
18
- * It sets no width and no ground. The blocks inside bring their own page
19
- * column; a full-bleed band is a block like any other, so it stands twice the
20
- * inset clear of its neighbours. It carries no semantics either -- a page that
20
+ * It sets no width. The blocks inside bring their own page column; a
21
+ * full-bleed band is a block like any other, so it stands twice the inset
22
+ * clear of its neighbours. It carries no semantics either -- a page that
21
23
  * wants a landmark puts one inside.
24
+ *
25
+ * `background` gives the section a ground (`container` or `tint`; `none`, the
26
+ * default, is the page's own), painted full bleed across its padding, so the
27
+ * band's edge is the section's edge.
28
+ *
29
+ * ## Where the ground changes, both sides pad twice
30
+ *
31
+ * Two sections on one ground stand two insets apart, one from each, and the
32
+ * eye measures content to content. Where the ground changes, the eye measures
33
+ * to the edge instead, from either side: one inset there would put the content
34
+ * on each side half as far from the edge as from its neighbours. So every
35
+ * edge where the ground changes takes twice the inset: the band inside its
36
+ * paint, and the section on the page's ground beside it on that side. Two
37
+ * neighbours on the same ground keep one inset each, so two tint sections in
38
+ * a row read as one band. No section beyond an edge is the page's ground, so
39
+ * a section with a ground pads twice at the page's ends too. An edge turned
40
+ * off stays off.
41
+ *
42
+ * The neighbours are the section's sibling elements, which a shadow root
43
+ * cannot select, so the section reads them and states the result as custom
44
+ * states (`:state(ground-change-above)`, `:state(ground-change-below)`),
45
+ * written nowhere on the page. It reads them again when its own ground
46
+ * changes, when a sibling's does (that sibling asks it to), and when siblings
47
+ * are added, removed or moved.
22
48
  */
23
49
  declare class BdSection extends LitElement {
50
+ private readonly _internals;
51
+ private _siblings?;
24
52
  withoutPaddingTop: boolean;
25
53
  withoutPaddingBottom: boolean;
54
+ /** The section's ground: none (the page's), container or tint. A ground pads twice the inset inside it. */
55
+ background: SectionBackground;
26
56
  static styles: import("lit").CSSResult[];
57
+ connectedCallback(): void;
58
+ disconnectedCallback(): void;
59
+ willUpdate(changed: PropertyValues<this>): void;
60
+ updated(changed: PropertyValues<this>): void;
61
+ private _readEdges;
62
+ private _state;
27
63
  render(): import("lit-html").TemplateResult<1>;
28
64
  }
29
65
  declare global {
@@ -1,2 +1,2 @@
1
- import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import n from"./section.css.js";import{LitElement as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=class extends r{constructor(...e){super(...e),this.withoutPaddingTop=!1,this.withoutPaddingBottom=!1}static{this.styles=[n]}render(){return i`<slot></slot>`}};t([a({type:Boolean,reflect:!0,attribute:`without-padding-top`})],o.prototype,`withoutPaddingTop`,void 0),t([a({type:Boolean,reflect:!0,attribute:`without-padding-bottom`})],o.prototype,`withoutPaddingBottom`,void 0),o=t([e(`bd-section`)],o);
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{isOneOf as t}from"../shared/prop-vocabulary.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./section.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s,c=[`none`,`container`,`tint`],l=/* @__PURE__ */ new Set([`style`,`script`,`template`,`link`,`meta`]),u=(e,t)=>{let n=e[t];for(;n&&l.has(n.localName);)n=n[t];return n},d=e=>{if(e?.localName!==`bd-section`)return`none`;let n=e.getAttribute(`background`);return t(c,n)?n:`none`},f=class extends i{static{s=this}constructor(...e){super(...e),this._internals=this.attachInternals(),this.withoutPaddingTop=!1,this.withoutPaddingBottom=!1,this.background=`none`}static{this.styles=[r]}connectedCallback(){super.connectedCallback();let e=this.parentNode;e&&(this._siblings=new MutationObserver(()=>this._readEdges()),this._siblings.observe(e,{childList:!0})),this._readEdges()}disconnectedCallback(){super.disconnectedCallback(),this._siblings?.disconnect(),this._siblings=void 0}willUpdate(e){e.has(`background`)&&!t(c,this.background)&&(this.background=`none`)}updated(e){if(e.has(`background`)){this._readEdges();for(let e of[u(this,`previousElementSibling`),u(this,`nextElementSibling`)])e instanceof s&&e._readEdges()}}_readEdges(){let e=d(this);this._state(`ground-change-above`,d(u(this,`previousElementSibling`))!==e),this._state(`ground-change-below`,d(u(this,`nextElementSibling`))!==e)}_state(e,t){t?this._internals.states.add(e):this._internals.states.delete(e)}render(){return a`<slot></slot>`}};n([o({type:Boolean,reflect:!0,attribute:`without-padding-top`})],f.prototype,`withoutPaddingTop`,void 0),n([o({type:Boolean,reflect:!0,attribute:`without-padding-bottom`})],f.prototype,`withoutPaddingBottom`,void 0),n([o({type:String,reflect:!0,attribute:`background`})],f.prototype,`background`,void 0),f=s=n([e(`bd-section`)],f);export{c as SECTION_BACKGROUNDS};
2
2
  //# sourceMappingURL=section.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"section.js","names":["sectionCSS","_decorate","__decorate","section_css_default","BdSection","LitElement","_args","property","defineElement"],"sources":["../../../../src/components/section/section.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 sectionCSS from \"./section.css.ts\";\n\n/**\n * A page section: the vertical rhythm a page is built on, and nothing else.\n * It pads its top and bottom by the section inset (24 on a phone, 32 from md)\n * and stacks its blocks twice that apart, so every section and every block on\n * a page sits on one distance. The inset is not a choice a page makes: it can\n * only be on or off at either edge, never a different size, so the rhythm\n * cannot drift.\n *\n * `without-padding-top` and `without-padding-bottom` turn one edge off, for a\n * block that must meet what is above or below it -- the hero, whose band\n * starts under the site menu, takes `without-padding-top`. The block keeps the\n * rest of the rhythm: the hero still stands twice the inset clear of the\n * section after it. (3.x spelled them `no-padding-top` and\n * `no-padding-bottom`; N5 makes a removed default part `without-*`.)\n *\n * It sets no width and no ground. The blocks inside bring their own page\n * column; a full-bleed band is a block like any other, so it stands twice the\n * inset clear of its neighbours. It carries no semantics either -- a page that\n * wants a landmark puts one inside.\n */\n@defineElement(\"bd-section\")\nclass BdSection extends LitElement {\n @property({ type: Boolean, reflect: true, attribute: \"without-padding-top\" })\n withoutPaddingTop = false;\n @property({ type: Boolean, reflect: true, attribute: \"without-padding-bottom\" })\n withoutPaddingBottom = false;\n\n static styles = [sectionCSS];\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section\": BdSection;\n }\n}\n"],"mappings":"A,6RA2BA,IACMI,EADN,cACwBC,CAAW,C,8BAEb,KAAA,kBAAA,GAEG,KAAA,qBAAA,E,QAEP,KAAA,OAAA,CAACL,CAAU,C,CAE3B,QAAS,CACP,MAAO,EAAI,eACb,CACF,EAVGC,EAAA,CAAAM,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,qBAAsB,CAAC,CAAA,EAAAH,EAAA,UAAA,oBAAA,IAAA,EAAA,EAE3EH,EAAA,CAAAM,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,wBAAyB,CAAC,CAAA,EAAAH,EAAA,UAAA,uBAAA,IAAA,EAAA,EAJhF,EAAAH,EAAA,CAAAO,EAAc,YAAY,CAAA,EAAAJ,CAAA"}
1
+ {"version":3,"file":"section.js","names":["sectionCSS","_decorate","__decorate","section_css_default","_BdSection","SECTION_BACKGROUNDS","UNDRAWN","neighbour","el","from","side","groundOf","background","isOneOf","BdSection","LitElement","_args","parent","changed","section","own","on","name","property","defineElement"],"sources":["../../../../src/components/section/section.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport sectionCSS from \"./section.css.ts\";\n\n/* The grounds a section can stand on, the words bd-accordion's band uses:\n none, the page's own; container, --color-surface-container; tint, the\n brand wash (--status-brand-surface). */\nexport const SECTION_BACKGROUNDS = [\"none\", \"container\", \"tint\"] as const;\nexport type SectionBackground = typeof SECTION_BACKGROUNDS[number];\n\n/* What draws nothing is not a neighbour: a style or a script between two\n sections leaves them next to each other. */\nconst UNDRAWN = new Set([\"style\", \"script\", \"template\", \"link\", \"meta\"]);\n\nconst neighbour = (from: Element, side: \"previousElementSibling\" | \"nextElementSibling\") => {\n let el = from[side];\n while (el && UNDRAWN.has(el.localName)) el = el[side];\n return el;\n};\n\n/* A section's ground, read from the attribute so a section that has not\n upgraded is read the same. Anything else beside a section, and the page's\n end, stands on the page's own ground. */\nconst groundOf = (el: Element | null): SectionBackground => {\n if (el?.localName !== \"bd-section\") return \"none\";\n const background = el.getAttribute(\"background\");\n return isOneOf(SECTION_BACKGROUNDS, background) ? background : \"none\";\n};\n\n/**\n * A page section: the vertical rhythm a page is built on, and nothing else.\n * It pads its top and bottom by the section inset (24 on a phone, 32 from md)\n * and stacks its blocks twice that apart, so every section and every block on\n * a page sits on one distance. The inset is not a choice a page makes: it can\n * only be on or off at either edge, never a different size, so the rhythm\n * cannot drift.\n *\n * `without-padding-top` and `without-padding-bottom` turn one edge off, for a\n * block that must meet what is above or below it -- the hero, whose band\n * starts under the site menu, takes `without-padding-top`. The block keeps the\n * rest of the rhythm: the hero still stands twice the inset clear of the\n * section after it. (3.x spelled them `no-padding-top` and\n * `no-padding-bottom`; N5 makes a removed default part `without-*`.)\n *\n * It sets no width. The blocks inside bring their own page column; a\n * full-bleed band is a block like any other, so it stands twice the inset\n * clear of its neighbours. It carries no semantics either -- a page that\n * wants a landmark puts one inside.\n *\n * `background` gives the section a ground (`container` or `tint`; `none`, the\n * default, is the page's own), painted full bleed across its padding, so the\n * band's edge is the section's edge.\n *\n * ## Where the ground changes, both sides pad twice\n *\n * Two sections on one ground stand two insets apart, one from each, and the\n * eye measures content to content. Where the ground changes, the eye measures\n * to the edge instead, from either side: one inset there would put the content\n * on each side half as far from the edge as from its neighbours. So every\n * edge where the ground changes takes twice the inset: the band inside its\n * paint, and the section on the page's ground beside it on that side. Two\n * neighbours on the same ground keep one inset each, so two tint sections in\n * a row read as one band. No section beyond an edge is the page's ground, so\n * a section with a ground pads twice at the page's ends too. An edge turned\n * off stays off.\n *\n * The neighbours are the section's sibling elements, which a shadow root\n * cannot select, so the section reads them and states the result as custom\n * states (`:state(ground-change-above)`, `:state(ground-change-below)`),\n * written nowhere on the page. It reads them again when its own ground\n * changes, when a sibling's does (that sibling asks it to), and when siblings\n * are added, removed or moved.\n */\n@defineElement(\"bd-section\")\nclass BdSection extends LitElement {\n private readonly _internals = this.attachInternals();\n private _siblings?: MutationObserver;\n\n @property({ type: Boolean, reflect: true, attribute: \"without-padding-top\" })\n withoutPaddingTop = false;\n @property({ type: Boolean, reflect: true, attribute: \"without-padding-bottom\" })\n withoutPaddingBottom = false;\n /** The section's ground: none (the page's), container or tint. A ground pads twice the inset inside it. */\n @property({ type: String, reflect: true, attribute: \"background\" })\n background: SectionBackground = \"none\";\n\n static styles = [sectionCSS];\n\n connectedCallback() {\n super.connectedCallback();\n const parent = this.parentNode;\n if (parent) {\n // a sibling added, removed or moved changes who the neighbours are\n this._siblings = new MutationObserver(() => this._readEdges());\n this._siblings.observe(parent, { childList: true });\n }\n this._readEdges();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._siblings?.disconnect();\n this._siblings = undefined;\n }\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"background\") && !isOneOf(SECTION_BACKGROUNDS, this.background)) this.background = \"none\";\n }\n\n updated(changed: PropertyValues<this>) {\n if (!changed.has(\"background\")) return;\n this._readEdges();\n // the neighbours' edges face this one's ground too\n for (const section of [neighbour(this, \"previousElementSibling\"), neighbour(this, \"nextElementSibling\")]) {\n if (section instanceof BdSection) section._readEdges();\n }\n }\n\n /* An edge pads twice where the ground on its other side is not this one's. */\n private _readEdges() {\n const own = groundOf(this);\n this._state(\"ground-change-above\", groundOf(neighbour(this, \"previousElementSibling\")) !== own);\n this._state(\"ground-change-below\", groundOf(neighbour(this, \"nextElementSibling\")) !== own);\n }\n\n private _state(name: string, on: boolean) {\n if (on) this._internals.states.add(name);\n else this._internals.states.delete(name);\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section\": BdSection;\n }\n}\n"],"mappings":"A,0VAWaK,EAAsB,CAAC,OAAQ,YAAa,MAAM,EAKzDC,kBAAU,IAAI,IAAI,CAAC,QAAS,SAAU,WAAY,OAAQ,MAAM,CAAC,EAEjEC,GAAa,EAAe,IAA0D,CAC1F,IAAIC,EAAKC,EAAKC,GACd,KAAOF,GAAMF,EAAQ,IAAIE,EAAG,SAAS,GAAG,EAAKA,EAAGE,GAChD,OAAOF,CACT,EAKMG,EAAY,GAA0C,CAC1D,GAAIH,GAAI,YAAc,aAAc,MAAO,OAC3C,IAAMI,EAAaJ,EAAG,aAAa,YAAY,EAC/C,OAAOK,EAAQR,EAAqBO,CAAU,EAAIA,EAAa,MACjE,EA+CME,EADN,cACwBC,CAAW,C,4CACH,KAAA,WAAA,KAAK,gBAAgB,EAI/B,KAAA,kBAAA,GAEG,KAAA,qBAAA,GAGS,KAAA,WAAA,M,QAEhB,KAAA,OAAA,CAACf,CAAU,C,CAE3B,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,IAAMiB,EAAS,KAAK,WAChBA,IAEF,KAAK,UAAY,IAAI,qBAAuB,KAAK,WAAW,CAAC,EAC7D,KAAK,UAAU,QAAQA,EAAQ,CAAE,UAAW,EAAK,CAAC,GAEpD,KAAK,WAAW,CAClB,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,KAAK,WAAW,WAAW,EAC3B,KAAK,UAAY,IAAA,EACnB,CAEA,WAAW,EAA+B,CACpCC,EAAQ,IAAI,YAAY,GAAK,CAACL,EAAQR,EAAqB,KAAK,UAAU,IAAG,KAAK,WAAa,OACrG,CAEA,QAAQ,EAA+B,CACrC,GAAKa,EAAQ,IAAI,YAAY,EAC7B,MAAK,WAAW,EAEhB,IAAK,IAAMC,IAAW,CAACZ,EAAU,KAAM,wBAAwB,EAAGA,EAAU,KAAM,oBAAoB,CAAC,EACjGY,aAAAf,GAA8Be,EAAQ,WAAW,CAHvC,CAKlB,CAGA,YAAqB,CACnB,IAAMC,EAAMT,EAAS,IAAI,EACzB,KAAK,OAAO,sBAAuBA,EAASJ,EAAU,KAAM,wBAAwB,CAAC,IAAMa,CAAG,EAC9F,KAAK,OAAO,sBAAuBT,EAASJ,EAAU,KAAM,oBAAoB,CAAC,IAAMa,CAAG,CAC5F,CAEA,OAAe,EAAc,EAAa,CACpCC,EAAI,KAAK,WAAW,OAAO,IAAIC,CAAI,EAClC,KAAK,WAAW,OAAO,OAAOA,CAAI,CACzC,CAEA,QAAS,CACP,MAAO,EAAI,eACb,CACF,EAvDGrB,EAAA,CAAAsB,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,qBAAsB,CAAC,CAAA,EAAAT,EAAA,UAAA,oBAAA,IAAA,EAAA,EAE3Eb,EAAA,CAAAsB,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,wBAAyB,CAAC,CAAA,EAAAT,EAAA,UAAA,uBAAA,IAAA,EAAA,EAG9Eb,EAAA,CAAAsB,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,YAAa,CAAC,CAAA,EAAAT,EAAA,UAAA,aAAA,IAAA,EAAA,EAVnE,EAAA,EAAAb,EAAA,CAAAuB,EAAc,YAAY,CAAA,EAAAV,CAAA,E"}