@repobit/dex-system-design 4.3.3 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/src/components/accordion/accordion.css.js +1 -1
  3. package/dist/src/components/accordion/accordion.css.js.map +1 -1
  4. package/dist/src/components/cta-banner/cta-banner.css.js +1 -1
  5. package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
  6. package/dist/src/components/cta-banner/cta-banner.d.ts +15 -6
  7. package/dist/src/components/cta-banner/cta-banner.js +14 -11
  8. package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
  9. package/dist/src/components/fact/fact.css.js +1 -1
  10. package/dist/src/components/fact/fact.css.js.map +1 -1
  11. package/dist/src/components/feature-columns/feature-columns.css.js +1 -1
  12. package/dist/src/components/feature-columns/feature-columns.css.js.map +1 -1
  13. package/dist/src/components/features-tab/features-tab.css.js +1 -1
  14. package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
  15. package/dist/src/components/features-tab/features-tab.d.ts +1 -0
  16. package/dist/src/components/features-tab/features-tab.js +4 -4
  17. package/dist/src/components/features-tab/features-tab.js.map +1 -1
  18. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.d.ts +2 -0
  19. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.js +2 -0
  20. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.css.js.map +1 -0
  21. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.d.ts +25 -0
  22. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.js +6 -0
  23. package/dist/src/components/icon-columns-banner/icon-columns-banner-item.js.map +1 -0
  24. package/dist/src/components/icon-columns-banner/icon-columns-banner.css.d.ts +2 -0
  25. package/dist/src/components/icon-columns-banner/icon-columns-banner.css.js +2 -0
  26. package/dist/src/components/icon-columns-banner/icon-columns-banner.css.js.map +1 -0
  27. package/dist/src/components/icon-columns-banner/icon-columns-banner.d.ts +36 -0
  28. package/dist/src/components/icon-columns-banner/icon-columns-banner.js +9 -0
  29. package/dist/src/components/icon-columns-banner/icon-columns-banner.js.map +1 -0
  30. package/dist/src/components/product-hero/product-hero.css.js +1 -1
  31. package/dist/src/components/product-hero/product-hero.css.js.map +1 -1
  32. package/dist/src/components/section/section.css.js +1 -1
  33. package/dist/src/components/section/section.css.js.map +1 -1
  34. package/dist/src/components/section/section.d.ts +40 -4
  35. package/dist/src/components/section/section.js +1 -1
  36. package/dist/src/components/section/section.js.map +1 -1
  37. package/dist/src/components/shared/prop-vocabulary.js +1 -1
  38. package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
  39. package/dist/src/components/tab-group/tab-group.css.js +1 -1
  40. package/dist/src/components/tab-group/tab-group.css.js.map +1 -1
  41. package/dist/src/components/tab-group/tab-group.js +4 -2
  42. package/dist/src/components/tab-group/tab-group.js.map +1 -1
  43. package/dist/src/loader/registry.js +1 -1
  44. package/dist/src/loader/registry.js.map +1 -1
  45. package/dist/src/tokens/tokens.css +1 -1
  46. package/dist/src/tokens/tokens.js +1 -1
  47. package/dist/src/tokens/tokens.js.map +1 -1
  48. package/package.json +6 -2
  49. package/schemas/component-manifest.json +130 -4
  50. package/schemas/figma-component-map.json +10 -0
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{grid-row:span 3;grid-template-rows:subgrid;font-family:var(--typography-fontFamily-sans);display:grid}:host([hidden]),.icon[hidden],.title[hidden],.description[hidden]{display:none}.icon{color:var(--color-text-brand);margin-bottom:var(--spacing-24);align-items:flex-start;display:flex}.title{margin-bottom:var(--spacing-16)}::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{t as default};
2
+ //# sourceMappingURL=icon-columns-banner-item.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-columns-banner-item.css.js","names":["icon_columns_banner_item_css_default"],"sources":["../../../../src/components/icon-columns-banner/icon-columns-banner-item.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { headingRole } from \"#shared/token-scales.ts\";\n\nexport default css`\n /* The host takes three rows of the banner's grid and lays its parts on\n them, so the parts of neighbouring columns line up. */\n :host {\n display: grid;\n grid-row: span 3;\n grid-template-rows: subgrid;\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([hidden]),\n .icon[hidden],\n .title[hidden],\n .description[hidden] {\n display: none;\n }\n\n .icon {\n display: flex;\n align-items: flex-start;\n color: var(--color-text-brand);\n margin-bottom: var(--spacing-24);\n }\n\n .title {\n margin-bottom: var(--spacing-16);\n }\n\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h4\"))}\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,ktB"}
@@ -0,0 +1,25 @@
1
+ import { LitElement } from "lit";
2
+ import { SlotController } from "../shared/controller.slot.js";
3
+ import "../../tokens/tokens.js";
4
+ /**
5
+ * One column of bd-icon-columns-banner: an icon, a title and a description.
6
+ *
7
+ * <bd-icon-columns-banner-item>
8
+ * <bd-img slot="icon" src="…" alt="" width="56" height="56"></bd-img>
9
+ * <bd-h slot="title" as="h3">Powered by 20+ years of expertise</bd-h>
10
+ * <bd-p slot="description">…</bd-p>
11
+ * </bd-icon-columns-banner-item>
12
+ *
13
+ * The three parts take a row each of the banner's grid, so every column's
14
+ * icon, title and description line up with its neighbours'.
15
+ */
16
+ export declare class BdIconColumnsBannerItem extends LitElement {
17
+ static styles: import("lit").CSSResult[];
18
+ _slots: SlotController<"title" | "description" | "icon">;
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ "bd-icon-columns-banner-item": BdIconColumnsBannerItem;
24
+ }
25
+ }
@@ -0,0 +1,6 @@
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{SlotController as n}from"../shared/controller.slot.js";import r from"./icon-columns-banner-item.css.js";import{LitElement as i,html as a}from"lit";var o=class extends i{constructor(...e){super(...e),this._slots=new n(this,{slots:[`icon`,`title`,`description`]})}static{this.styles=[r]}render(){return a`
2
+ <div class="icon" ?hidden=${!this._slots.has(`icon`)}><slot name="icon"></slot></div>
3
+ <div class="title" ?hidden=${!this._slots.has(`title`)}><slot name="title"></slot></div>
4
+ <div class="description" ?hidden=${!this._slots.has(`description`)}><slot name="description"></slot></div>
5
+ `}};o=t([e(`bd-icon-columns-banner-item`)],o);export{o as BdIconColumnsBannerItem};
6
+ //# sourceMappingURL=icon-columns-banner-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-columns-banner-item.js","names":["itemCSS","_decorate","__decorate","icon_columns_banner_item_css_default","BdIconColumnsBannerItem","LitElement","_args","SlotController","defineElement"],"sources":["../../../../src/components/icon-columns-banner/icon-columns-banner-item.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\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 itemCSS from \"./icon-columns-banner-item.css.ts\";\n\n/**\n * One column of bd-icon-columns-banner: an icon, a title and a description.\n *\n * <bd-icon-columns-banner-item>\n * <bd-img slot=\"icon\" src=\"…\" alt=\"\" width=\"56\" height=\"56\"></bd-img>\n * <bd-h slot=\"title\" as=\"h3\">Powered by 20+ years of expertise</bd-h>\n * <bd-p slot=\"description\">…</bd-p>\n * </bd-icon-columns-banner-item>\n *\n * The three parts take a row each of the banner's grid, so every column's\n * icon, title and description line up with its neighbours'.\n */\n@defineElement(\"bd-icon-columns-banner-item\")\nexport class BdIconColumnsBannerItem extends LitElement {\n static styles = [itemCSS];\n\n _slots = new SlotController(this, { slots: [\"icon\", \"title\", \"description\"] });\n\n render() {\n return html`\n <div class=\"icon\" ?hidden=${!this._slots.has(\"icon\")}><slot name=\"icon\"></slot></div>\n <div class=\"title\" ?hidden=${!this._slots.has(\"title\")}><slot name=\"title\"></slot></div>\n <div class=\"description\" ?hidden=${!this._slots.has(\"description\")}><slot name=\"description\"></slot></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-icon-columns-banner-item\": BdIconColumnsBannerItem;\n }\n}\n"],"mappings":"A,+TAoBO,IAAMI,EAAN,cAAsCC,CAAW,C,8BAG7C,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,OAAQ,QAAS,aAAa,CAAE,CAAC,C,QAF7D,KAAA,OAAA,CAACP,CAAO,C,CAIxB,QAAS,CACP,MAAO,EAAI;kCACmB,CAAC,KAAK,OAAO,IAAI,MAAM,EAAE;mCACxB,CAAC,KAAK,OAAO,IAAI,OAAO,EAAE;yCACpB,CAAC,KAAK,OAAO,IAAI,aAAa,EAAE;KAEvE,CACF,EAbC,EAAAC,EAAA,CAAAO,EAAc,6BAA6B,CAAA,EAAAJ,CAAA,E"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;font-family:var(--typography-fontFamily-sans);color-scheme:light;padding-inline:var(--spacing-16);display:block;container-type:inline-size}.surface{isolation:isolate;box-sizing:border-box;width:100%;max-width:var(--content-width-max);padding:var(--spacing-64) var(--spacing-24);border-radius:var(--shape-radius-2xl);background:var(--status-brand-surface);margin-inline:auto;position:relative;overflow:hidden}.surface>[hidden]{display:none}.corner{z-index:var(--z-below);pointer-events:none;width:24%;height:40%;position:absolute;top:0}.corner-start{inset-inline-start:0}.corner-end{inset-inline-end:0}.corner ::slotted(*){object-fit:cover;width:100%;height:100%;display:block}.corner-start ::slotted(*){object-position:left top}.corner-end ::slotted(*){object-position:right top}.title{margin:0 auto var(--spacing-48);max-width:var(--grid-container-max-lg);text-align:center}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily)}.columns{column-gap:var(--spacing-48);max-width:var(--grid-container-max-lg);grid-template-columns:repeat(3,minmax(0,1fr));row-gap:0;margin-inline:auto;display:grid}@container (width<=600px){.surface{padding-block:var(--spacing-48)}.columns{row-gap:var(--spacing-32);grid-template-columns:1fr}.corner{width:32%;height:24%}}`;export{t as default};
2
+ //# sourceMappingURL=icon-columns-banner.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-columns-banner.css.js","names":["icon_columns_banner_css_default"],"sources":["../../../../src/components/icon-columns-banner/icon-columns-banner.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { headingRole } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n /* the banner is the container that decides when the columns stack */\n container-type: inline-size;\n box-sizing: border-box;\n font-family: var(--typography-fontFamily-sans);\n /* a soft brand surface drawn in the light scheme in every theme, as\n bd-cta-banner's brand-soft is */\n color-scheme: light;\n padding-inline: var(--spacing-16);\n }\n\n .surface {\n position: relative;\n overflow: hidden;\n isolation: isolate;\n box-sizing: border-box;\n width: 100%;\n /* not the column: a contained surface, inset from the page's edges */\n max-width: var(--content-width-max);\n margin-inline: auto;\n padding: var(--spacing-64) var(--spacing-24);\n border-radius: var(--shape-radius-2xl);\n background: var(--status-brand-surface);\n }\n\n .surface > [hidden] {\n display: none;\n }\n\n /* The page's corner art, behind the copy, anchored to its top corner. */\n .corner {\n position: absolute;\n top: 0;\n z-index: var(--z-below);\n width: 24%;\n height: 40%;\n pointer-events: none;\n }\n\n .corner-start {\n inset-inline-start: 0;\n }\n\n .corner-end {\n inset-inline-end: 0;\n }\n\n .corner ::slotted(*) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .corner-start ::slotted(*) {\n object-position: left top;\n }\n\n .corner-end ::slotted(*) {\n object-position: right top;\n }\n\n .title {\n margin: 0 auto var(--spacing-48);\n /* not the column: the title's centred measure, as the columns' below */\n max-width: var(--grid-container-max-lg);\n text-align: center;\n }\n\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h2\"))}\n }\n\n /* Each column takes three rows of this grid and shares them (subgrid), so\n a title that wraps or a longer description moves the next row down in\n every column. */\n .columns {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n column-gap: var(--spacing-48);\n row-gap: 0;\n /* not the column: three columns' measure, narrower than the surface */\n max-width: var(--grid-container-max-lg);\n margin-inline: auto;\n }\n\n @container (max-width: 600px) {\n .surface {\n padding-block: var(--spacing-48);\n }\n\n .columns {\n grid-template-columns: 1fr;\n row-gap: var(--spacing-32);\n }\n\n .corner {\n width: 32%;\n height: 24%;\n }\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,klD"}
@@ -0,0 +1,36 @@
1
+ import { LitElement } from "lit";
2
+ import { SlotController } from "../shared/controller.slot.js";
3
+ import "../../tokens/tokens.js";
4
+ import "./icon-columns-banner-item.js";
5
+ import "../h/h.js";
6
+ import "../img/img.js";
7
+ import "../p/p.js";
8
+ /**
9
+ * A soft brand surface with a centred title and a row of columns, each an
10
+ * icon, a title and a description. Decorative art sits in the surface's two
11
+ * top corners.
12
+ *
13
+ * <bd-icon-columns-banner>
14
+ * <bd-img slot="corner-start" src="…" alt=""></bd-img>
15
+ * <bd-img slot="corner-end" src="…" alt=""></bd-img>
16
+ * <bd-h slot="title" as="h2">Why trust Bitdefender Link Checker?</bd-h>
17
+ * <bd-icon-columns-banner-item>…</bd-icon-columns-banner-item>
18
+ * </bd-icon-columns-banner>
19
+ *
20
+ * The corner art is the page's content, not the component's: whatever is in
21
+ * `corner-start` and `corner-end` is clipped to the surface and anchored to
22
+ * its top corner, behind the copy, and hidden from assistive technology. The
23
+ * columns are the default slot and share their rows, so a title that wraps
24
+ * moves the descriptions down in every column. They stack at 600px wide or
25
+ * narrower. The page picks the title's level; the banner sets its size.
26
+ */
27
+ export declare class BdIconColumnsBanner extends LitElement {
28
+ static styles: import("lit").CSSResult[];
29
+ _slots: SlotController<"" | "title" | "corner-start" | "corner-end">;
30
+ render(): import("lit-html").TemplateResult<1>;
31
+ }
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ "bd-icon-columns-banner": BdIconColumnsBanner;
35
+ }
36
+ }
@@ -0,0 +1,9 @@
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import"../img/img.js";import"./icon-columns-banner-item.js";import r from"./icon-columns-banner.css.js";import{LitElement as i,html as a}from"lit";var o=class extends i{constructor(...e){super(...e),this._slots=new n(this,{slots:[`corner-start`,`corner-end`,`title`,``]})}static{this.styles=[r]}render(){let e=e=>this._slots.has(e);return a`
2
+ <div class="surface">
3
+ <div class="corner corner-start" aria-hidden="true" ?hidden=${!e(`corner-start`)}><slot name="corner-start"></slot></div>
4
+ <div class="corner corner-end" aria-hidden="true" ?hidden=${!e(`corner-end`)}><slot name="corner-end"></slot></div>
5
+ <div class="title" ?hidden=${!e(`title`)}><slot name="title"></slot></div>
6
+ <div class="columns" ?hidden=${!e(``)}><slot></slot></div>
7
+ </div>
8
+ `}};o=t([e(`bd-icon-columns-banner`)],o);export{o as BdIconColumnsBanner};
9
+ //# sourceMappingURL=icon-columns-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-columns-banner.js","names":["iconColumnsBannerCSS","_decorate","__decorate","icon_columns_banner_css_default","BdIconColumnsBanner","LitElement","_args","SlotController","has","name","defineElement"],"sources":["../../../../src/components/icon-columns-banner/icon-columns-banner.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\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 \"./icon-columns-banner-item.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/img/img.ts\";\nimport \"#components/p/p.ts\";\nimport iconColumnsBannerCSS from \"./icon-columns-banner.css.ts\";\n\n/**\n * A soft brand surface with a centred title and a row of columns, each an\n * icon, a title and a description. Decorative art sits in the surface's two\n * top corners.\n *\n * <bd-icon-columns-banner>\n * <bd-img slot=\"corner-start\" src=\"…\" alt=\"\"></bd-img>\n * <bd-img slot=\"corner-end\" src=\"…\" alt=\"\"></bd-img>\n * <bd-h slot=\"title\" as=\"h2\">Why trust Bitdefender Link Checker?</bd-h>\n * <bd-icon-columns-banner-item>…</bd-icon-columns-banner-item>\n * </bd-icon-columns-banner>\n *\n * The corner art is the page's content, not the component's: whatever is in\n * `corner-start` and `corner-end` is clipped to the surface and anchored to\n * its top corner, behind the copy, and hidden from assistive technology. The\n * columns are the default slot and share their rows, so a title that wraps\n * moves the descriptions down in every column. They stack at 600px wide or\n * narrower. The page picks the title's level; the banner sets its size.\n */\n@defineElement(\"bd-icon-columns-banner\")\nexport class BdIconColumnsBanner extends LitElement {\n static styles = [iconColumnsBannerCSS];\n\n _slots = new SlotController(this, { slots: [\"corner-start\", \"corner-end\", \"title\", \"\"] });\n\n render() {\n const has = (name: \"corner-start\" | \"corner-end\" | \"title\" | \"\") => this._slots.has(name);\n return html`\n <div class=\"surface\">\n <div class=\"corner corner-start\" aria-hidden=\"true\" ?hidden=${!has(\"corner-start\")}><slot name=\"corner-start\"></slot></div>\n <div class=\"corner corner-end\" aria-hidden=\"true\" ?hidden=${!has(\"corner-end\")}><slot name=\"corner-end\"></slot></div>\n <div class=\"title\" ?hidden=${!has(\"title\")}><slot name=\"title\"></slot></div>\n <div class=\"columns\" ?hidden=${!has(\"\")}><slot></slot></div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-icon-columns-banner\": BdIconColumnsBanner;\n }\n}\n"],"mappings":"A,0ZA+BO,IAAMI,EAAN,cAAkCC,CAAW,C,8BAGzC,KAAA,OAAA,IAAIE,EAAe,KAAM,CAAE,MAAO,CAAC,eAAgB,aAAc,QAAS,EAAE,CAAE,CAAC,C,QAFxE,KAAA,OAAA,CAACP,CAAoB,C,CAIrC,QAAS,CACP,IAAMQ,EAAO,GAAuD,KAAK,OAAO,IAAIC,CAAI,EACxF,MAAO,EAAI;;sEAEuD,CAACD,EAAI,cAAc,EAAE;oEACvB,CAACA,EAAI,YAAY,EAAE;qCAClD,CAACA,EAAI,OAAO,EAAE;uCACZ,CAACA,EAAI,EAAE,EAAE;;KAG9C,CACF,EAjBC,EAAAP,EAAA,CAAAS,EAAc,wBAAwB,CAAA,EAAAN,CAAA,E"}
@@ -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"}
@@ -1,2 +1,2 @@
1
- var e=[`sm`,`md`,`lg`],t=[`neutral`,`brand`,`success`,`warning`,`error`,`info`],n=[``,`eyebrow`,`title`,`description`,`caption`,`badge`,`icon`,`media`,`actions`,`footer`,`start`,`end`,`label`,`hint`],r={"bd-agent-endpoints":{endpoints:`the first of two rows of links, the machine-readable files; a collection of its own beside the assistants, and the default slot takes what follows both rows`,assistants:`the second row of links, one per assistant; a collection of its own beside the endpoints`},"bd-article":{authors:`one bd-authors, which the article places under its title below lg and at the top of its sidebar from lg; no vocabulary word says a byline`,promo:"the product card the article draws at the end of its text, after its last section and before the newsletter, as REAL places it (DEX-29412); `actions` is a row of buttons, and this is an aside of its own",toc:`the article's one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg`,newsletter:`the signup the article draws after its body in the main column, which the sidebar does not run beside`,related:`the article's related links, after its tags and a divider, a region of its own beside the body`},"bd-bar-chart-item":{value:`the text drawn at the end of the bar in place of its score ("6 / 6"), and the meter's value text; a bar is a name and its value, and the vocabulary has a word only for the first`},"bd-carousel-item":{"detail-title":`the heading of the item's own dialog, which the item forwards into the dialog's title and names its "+" by; the card itself shows no title, so \`title\` would say the card has one`,detail:`the body of the item's own dialog, forwarded into the dialog's default slot; a second region beside the card's own body in the default slot, and not a description of the card`},"bd-code":{copy:`the words of a block's own copy button and so its name ("Copy code"); the button stays in the shadow root, pinned outside the code's <pre>, and only its words are the page's, as bd-install-option's copy is -- label is a form control's, and bd-code's \`label\` attribute names its <pre>`,copied:`what the copy button shows for 1.5s after a copy, and what the block's live region says ("Copied"); a second state of the same button, which no word of the vocabulary names, as bd-install-option's copied`},"bd-comparison-panel":{positive:`the items of the column that says what the thing is, each ticked; one of two collections side by side, so neither is the default slot`,negative:`the items of the column that says what the thing is not, each crossed; the second collection`,"positive-title":`the positive column's own heading; the panel's title heads both columns`,"negative-title":`the negative column's own heading; the panel's title heads both columns`},"bd-fact":{value:`what the label names -- the figure or the answer; a fact is a label and its value, and the vocabulary has a word only for the first`},"bd-footer":{logo:`the brand's wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy`,masterbrand:`the masterbrand lockup at the masthead band's end, opposite the logo; a second brand mark beside the first, which no word of the vocabulary names`,nav:`the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot`,"quick-links":`the bd-footer-group columns of links; a collection of its own beside the social links and the navigations`,"social-links":`the links to the brand's social networks, drawn as their logos; a second collection of links beside the groups`,"secondary-nav":`the legal and policy bd-footer-nav beside the address; the second of the two navigations`,address:`the office's postal address beside the secondary nav; no word of the vocabulary names an address`,copyright:`the copyright line that opens the footer's last row; a legal notice, not a caption of anything`,anpc:`the Romanian consumer authority's ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for`,"country-label":`the country picker's words until a country is known, and the country list's heading; label is a form control's, and the picker is a disclosure, not a field`},"bd-install-option":{code:`the command the option shows in its code block and its Copy button copies, line breaks kept; no word of the vocabulary names a command`,copy:`the Copy button's words and so its name ("Copy"); the button stays in the shadow root beside the code block, and only its words are the page's, as bd-product-hero's cta is -- label is a form control's`,copied:`the words that take the Copy button's place for 1.5s after a copy and are said through the option's live region ("Copied"); a second state of the same button, which no word of the vocabulary names`},"bd-install-options":{"works-in":`the harnesses the options run in, one bd-tag each; a second collection beside the default slot's options`,"works-in-label":`the words that introduce that row ("Works in"); the section's eyebrow and title are its own, and label is a form control's`,"prompt-title":`the heading of the "Then just ask" panel, a second region of the section beside the options, under the section's own title`,"prompt-description":`the paragraph under the prompt panel's heading; the section's description is the one under its title`,"prompt-label":`the small label above the prompt block, naming what the block is ("Prompt for your agent")`,prompt:`the prompt itself, the words the panel shows and its Copy button copies`,"prompt-note":`the warning-style note under the prompt`,copy:`the prompt panel's Copy button's words and so its name ("Copy"), as bd-install-option's copy is for its command`,copied:`the words that take that button's place for 1.5s after a copy and are said through the section's live region ("Copied"), as bd-install-option's copied`},"bd-newsletter-signup":{cta:`the words of the component's own button or link, which stays in the shadow root because its look is the component's; only its label is the page's`,error:`the words shown under the field after an invalid address, announced; nothing in the vocabulary is shown only when the reader's input is refused`,success:`the words shown in place of the form once the page has sent the address (state="success"), in a status region; a state's message, which no vocabulary word names`,failure:`the words shown under the filled form when the page's send failed (state="failed"), announced; not \`error\`, which is the reader's invalid address, while this is the page's send`},"bd-partner-banner":{lockup:`the partner's and Bitdefender's logos side by side over the photo; a co-brand mark no word of the vocabulary names`},"bd-post-card":{meta:`the post's byline row -- its date and reading time, bd-meta items -- between the cover and the title; not the eyebrow, a kicker naming what the title is about, nor a caption, which describes the cover`,"read-more":`the words of the card's visual cue to follow its link ("Read more"), drawn with an arrow and hidden from a screen reader, which hears the title as the link; not the card's actions -- the whole card is its one link -- and not a caption, which describes something`},"bd-pricing-card":{banner:'the highlighted card\'s ribbon above its top edge ("Best value"), drawn only with `highlight`',price:`the card's price zone, a bd-pricing-price or a bd-tab-group of them for a billing choice; the store's figures, which no word of the vocabulary names`},"bd-pricing-price":{full:`the struck full price the discount is taken from; a price zone is a reference price, a discount and a price, and the vocabulary has a word for none of them`,discount:`the discount's bd-badge beside the full price ("Save 44%"); a figure of its own, not the card's badge`,period:`the price's billing unit after it ("/year", "/month"); not a caption`},"bd-product-hero":{"product-name":`the product's name, a kicker above the title in the heading-h4 role; the title is the promise, not the product`,cta:`the buy button's words; the button stays in the shadow root inside bd-product, where the store finds it, and only its label is the page's`,"cta-secondary":`the second button's words, drawn when cta-secondary-href is set`},"bd-product-upsell":{cta:`the words of the component's own button or link, which stays in the shadow root because its look is the component's; only its label is the page's`},"bd-quick-answer":{facts:`the labelled facts under the answer, one bd-fact each, drawn as a strip under a divider; a collection of its own beside the default slot, which takes whatever follows the answer`},"bd-report-promo":{cta:`the words of the promo's own bd-button, which stays in the shadow root because its look is the promo's; only its label is the page's`},"bd-review":{date:`when the review was written, the line under its caption; the vocabulary has a word for who said it (caption) and none for when`},"bd-spotlight":{"description-actions":"a second group of actions: the buttons under the description, in the other column from the `actions` under the title. Web Awesome names a second group by its part the same way (wa-card's header-actions and footer-actions)"},"bd-stat":{value:`the figure the caption explains ("580+"), drawn at display size above it; a stat is a figure and its caption, and the vocabulary has a word only for the second`},"bd-terminal-hero":{breadcrumb:`the page's bd-breadcrumb above the eyebrow, the hero's own trail`,"annotation-top":`a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part`,"annotation-bottom":`a note pinned below the terminal, on its bottom edge; the second of the pair`,meta:`the mono spec line that opens the facts row; a line of its own above the facts, not their caption`,facts:`the labelled facts under the spec line, one bd-fact each in the spec look, drawn as a grid under a rule; a collection of its own beside the copy, as bd-quick-answer's facts are`},"bd-tooltip":{content:`the bubble's words; a tooltip has a trigger and what it says about it, not a title or a description`},"bd-trust-panel":{stats:`a second collection beside the cards in the default slot: the bd-fact statistics row above them`}},i={look:[`variant`,`kind`],meaning:[`tone`]},a={look:[`appearance`],meaning:[`variant`]};function o(e){for(let t of e)if(t===`appearance`)return a;return i}function s(e,{allowed:t,fallback:n}){return c(t,e)?e:n}var c=(e,t)=>e.includes(t);export{r as COMPONENT_SLOTS,i as PROP_AXES_V3,a as PROP_AXES_V4,e as SIZES,n as SLOT_NAMES,t as TONES,o as axesFor,c as isOneOf,s as resolveEnum};
1
+ var e=[`sm`,`md`,`lg`],t=[`neutral`,`brand`,`success`,`warning`,`error`,`info`],n=[``,`eyebrow`,`title`,`description`,`caption`,`badge`,`icon`,`media`,`actions`,`footer`,`start`,`end`,`label`,`hint`],r={"bd-agent-endpoints":{endpoints:`the first of two rows of links, the machine-readable files; a collection of its own beside the assistants, and the default slot takes what follows both rows`,assistants:`the second row of links, one per assistant; a collection of its own beside the endpoints`},"bd-article":{authors:`one bd-authors, which the article places under its title below lg and at the top of its sidebar from lg; no vocabulary word says a byline`,promo:"the product card the article draws at the end of its text, after its last section and before the newsletter, as REAL places it (DEX-29412); `actions` is a row of buttons, and this is an aside of its own",toc:`the article's one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg`,newsletter:`the signup the article draws after its body in the main column, which the sidebar does not run beside`,related:`the article's related links, after its tags and a divider, a region of its own beside the body`},"bd-bar-chart-item":{value:`the text drawn at the end of the bar in place of its score ("6 / 6"), and the meter's value text; a bar is a name and its value, and the vocabulary has a word only for the first`},"bd-carousel-item":{"detail-title":`the heading of the item's own dialog, which the item forwards into the dialog's title and names its "+" by; the card itself shows no title, so \`title\` would say the card has one`,detail:`the body of the item's own dialog, forwarded into the dialog's default slot; a second region beside the card's own body in the default slot, and not a description of the card`},"bd-code":{copy:`the words of a block's own copy button and so its name ("Copy code"); the button stays in the shadow root, pinned outside the code's <pre>, and only its words are the page's, as bd-install-option's copy is -- label is a form control's, and bd-code's \`label\` attribute names its <pre>`,copied:`what the copy button shows for 1.5s after a copy, and what the block's live region says ("Copied"); a second state of the same button, which no word of the vocabulary names, as bd-install-option's copied`},"bd-comparison-panel":{positive:`the items of the column that says what the thing is, each ticked; one of two collections side by side, so neither is the default slot`,negative:`the items of the column that says what the thing is not, each crossed; the second collection`,"positive-title":`the positive column's own heading; the panel's title heads both columns`,"negative-title":`the negative column's own heading; the panel's title heads both columns`},"bd-fact":{value:`what the label names -- the figure or the answer; a fact is a label and its value, and the vocabulary has a word only for the first`},"bd-icon-columns-banner":{"corner-start":`decorative art anchored to the surface's top start corner behind the copy; an ornament, not media illustrating the copy`,"corner-end":`decorative art anchored to the surface's top end corner behind the copy; the counterpart of corner-start`},"bd-footer":{logo:`the brand's wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy`,masterbrand:`the masterbrand lockup at the masthead band's end, opposite the logo; a second brand mark beside the first, which no word of the vocabulary names`,nav:`the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot`,"quick-links":`the bd-footer-group columns of links; a collection of its own beside the social links and the navigations`,"social-links":`the links to the brand's social networks, drawn as their logos; a second collection of links beside the groups`,"secondary-nav":`the legal and policy bd-footer-nav beside the address; the second of the two navigations`,address:`the office's postal address beside the secondary nav; no word of the vocabulary names an address`,copyright:`the copyright line that opens the footer's last row; a legal notice, not a caption of anything`,anpc:`the Romanian consumer authority's ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for`,"country-label":`the country picker's words until a country is known, and the country list's heading; label is a form control's, and the picker is a disclosure, not a field`},"bd-install-option":{code:`the command the option shows in its code block and its Copy button copies, line breaks kept; no word of the vocabulary names a command`,copy:`the Copy button's words and so its name ("Copy"); the button stays in the shadow root beside the code block, and only its words are the page's, as bd-product-hero's cta is -- label is a form control's`,copied:`the words that take the Copy button's place for 1.5s after a copy and are said through the option's live region ("Copied"); a second state of the same button, which no word of the vocabulary names`},"bd-install-options":{"works-in":`the harnesses the options run in, one bd-tag each; a second collection beside the default slot's options`,"works-in-label":`the words that introduce that row ("Works in"); the section's eyebrow and title are its own, and label is a form control's`,"prompt-title":`the heading of the "Then just ask" panel, a second region of the section beside the options, under the section's own title`,"prompt-description":`the paragraph under the prompt panel's heading; the section's description is the one under its title`,"prompt-label":`the small label above the prompt block, naming what the block is ("Prompt for your agent")`,prompt:`the prompt itself, the words the panel shows and its Copy button copies`,"prompt-note":`the warning-style note under the prompt`,copy:`the prompt panel's Copy button's words and so its name ("Copy"), as bd-install-option's copy is for its command`,copied:`the words that take that button's place for 1.5s after a copy and are said through the section's live region ("Copied"), as bd-install-option's copied`},"bd-newsletter-signup":{cta:`the words of the component's own button or link, which stays in the shadow root because its look is the component's; only its label is the page's`,error:`the words shown under the field after an invalid address, announced; nothing in the vocabulary is shown only when the reader's input is refused`,success:`the words shown in place of the form once the page has sent the address (state="success"), in a status region; a state's message, which no vocabulary word names`,failure:`the words shown under the filled form when the page's send failed (state="failed"), announced; not \`error\`, which is the reader's invalid address, while this is the page's send`},"bd-partner-banner":{lockup:`the partner's and Bitdefender's logos side by side over the photo; a co-brand mark no word of the vocabulary names`},"bd-post-card":{meta:`the post's byline row -- its date and reading time, bd-meta items -- between the cover and the title; not the eyebrow, a kicker naming what the title is about, nor a caption, which describes the cover`,"read-more":`the words of the card's visual cue to follow its link ("Read more"), drawn with an arrow and hidden from a screen reader, which hears the title as the link; not the card's actions -- the whole card is its one link -- and not a caption, which describes something`},"bd-pricing-card":{banner:'the highlighted card\'s ribbon above its top edge ("Best value"), drawn only with `highlight`',price:`the card's price zone, a bd-pricing-price or a bd-tab-group of them for a billing choice; the store's figures, which no word of the vocabulary names`},"bd-pricing-price":{full:`the struck full price the discount is taken from; a price zone is a reference price, a discount and a price, and the vocabulary has a word for none of them`,discount:`the discount's bd-badge beside the full price ("Save 44%"); a figure of its own, not the card's badge`,period:`the price's billing unit after it ("/year", "/month"); not a caption`},"bd-product-hero":{"product-name":`the product's name, a kicker above the title in the heading-h4 role; the title is the promise, not the product`,cta:`the buy button's words; the button stays in the shadow root inside bd-product, where the store finds it, and only its label is the page's`,"cta-secondary":`the second button's words, drawn when cta-secondary-href is set`},"bd-product-upsell":{cta:`the words of the component's own button or link, which stays in the shadow root because its look is the component's; only its label is the page's`},"bd-quick-answer":{facts:`the labelled facts under the answer, one bd-fact each, drawn as a strip under a divider; a collection of its own beside the default slot, which takes whatever follows the answer`},"bd-report-promo":{cta:`the words of the promo's own bd-button, which stays in the shadow root because its look is the promo's; only its label is the page's`},"bd-review":{date:`when the review was written, the line under its caption; the vocabulary has a word for who said it (caption) and none for when`},"bd-spotlight":{"description-actions":"a second group of actions: the buttons under the description, in the other column from the `actions` under the title. Web Awesome names a second group by its part the same way (wa-card's header-actions and footer-actions)"},"bd-stat":{value:`the figure the caption explains ("580+"), drawn at display size above it; a stat is a figure and its caption, and the vocabulary has a word only for the second`},"bd-terminal-hero":{breadcrumb:`the page's bd-breadcrumb above the eyebrow, the hero's own trail`,"annotation-top":`a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part`,"annotation-bottom":`a note pinned below the terminal, on its bottom edge; the second of the pair`,meta:`the mono spec line that opens the facts row; a line of its own above the facts, not their caption`,facts:`the labelled facts under the spec line, one bd-fact each in the spec look, drawn as a grid under a rule; a collection of its own beside the copy, as bd-quick-answer's facts are`},"bd-tooltip":{content:`the bubble's words; a tooltip has a trigger and what it says about it, not a title or a description`},"bd-trust-panel":{stats:`a second collection beside the cards in the default slot: the bd-fact statistics row above them`}},i={look:[`variant`,`kind`],meaning:[`tone`]},a={look:[`appearance`],meaning:[`variant`]};function o(e){for(let t of e)if(t===`appearance`)return a;return i}function s(e,{allowed:t,fallback:n}){return c(t,e)?e:n}var c=(e,t)=>e.includes(t);export{r as COMPONENT_SLOTS,i as PROP_AXES_V3,a as PROP_AXES_V4,e as SIZES,n as SLOT_NAMES,t as TONES,o as axesFor,c as isOneOf,s as resolveEnum};
2
2
  //# sourceMappingURL=prop-vocabulary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-vocabulary.js","names":["SIZES","TONES","SLOT_NAMES","COMPONENT_SLOTS","PROP_AXES_V3","PROP_AXES_V4","axesFor","name","properties","resolveEnum","isOneOf","allowed","value","fallback","set"],"sources":["../../../../src/components/shared/prop-vocabulary.ts"],"sourcesContent":["/**\n * The words a component prop is allowed to use.\n *\n * Three axes, three names, and each name means one thing everywhere (N6,\n * docs/adr/0004-web-awesome-naming.md):\n *\n * size how big sm · md · lg\n * appearance how it looks primary, bullet, shade — per component\n * variant what it means neutral · brand · success · warning · error · info\n *\n * The look and the meaning share no value, and no set keeps a legacy alias:\n * a v4 tag reads these spellings and nothing else. A value outside its set,\n * an old one included (`size=\"small\"`, `kind=\"primary\"`), is repaired to the\n * default in willUpdate (isOneOf), the same as a typo. Translating a 3.x\n * spelling is scripts/codemod-v4.mjs's job, done once in the page's markup,\n * not every component's on every render.\n *\n * Before this there were three size vocabularies and `kind` meant four\n * unrelated things: the visual variant on bd-button and bd-link, the size on\n * the three form fields, the type step on bd-p and the marker on bd-li. An\n * author could not carry anything learned on one atom to the next.\n *\n * 3.x spelled the look `variant` and the meaning `tone`; v4 takes Web\n * Awesome's split. The tags move one family at a time, so until the last\n * family lands a tag is on one spelling or the other -- see axesFor().\n */\n\n/** The one size scale. */\nexport const SIZES = ['sm', 'md', 'lg'] as const;\nexport type Size = typeof SIZES[number];\n\n/**\n * The closed set of meanings. A meaning says what something is telling the\n * reader, not how it looks, so it is one set for every component: bd-badge\n * and bd-tag take all six, bd-callout and bd-progress-bar a subset. It was spelled\n * out in each of them; this is the declaration `check:enum-vocabulary` reads.\n */\nexport const TONES = ['neutral', 'brand', 'success', 'warning', 'error', 'info'] as const;\nexport type Tone = typeof TONES[number];\n\n/**\n * The names a slot may take (N7): the closed set, so `title` means the\n * heading in every component and nobody spells it `heading`, `headline` or\n * `header` again. '' is the default slot, which holds a container's items.\n * `start` and `end` hold decorations before and after a label, `label` and\n * `hint` a form control's words, `media` / `actions` / `footer` the parts a\n * card or a section shows around its copy.\n *\n * The naming rules in `check:element-api` fail a slot outside this set that\n * COMPONENT_SLOTS does not register for its tag. 3.x's names are frozen in\n * scripts/naming.baseline.json and leave it as each phase renames or\n * registers them.\n */\nexport const SLOT_NAMES = [\n '', 'eyebrow', 'title', 'description', 'caption', 'badge', 'icon',\n 'media', 'actions', 'footer', 'start', 'end', 'label', 'hint'\n] as const;\nexport type SlotName = typeof SLOT_NAMES[number];\n\n/**\n * A slot name only one component needs, keyed by tag, each with the reason\n * the vocabulary has no word for it. Register a name only when the slot holds\n * a part SLOT_NAMES cannot say -- a second collection beside the default\n * slot's items, or a part with no counterpart elsewhere -- never to keep a\n * 3.x name. A registered name the tag no longer renders fails as well, so\n * this cannot outlive the slot it explains.\n */\nexport const COMPONENT_SLOTS: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n 'bd-agent-endpoints': {\n endpoints : 'the first of two rows of links, the machine-readable files; a collection of its own beside the assistants, and the default slot takes what follows both rows',\n assistants: 'the second row of links, one per assistant; a collection of its own beside the endpoints'\n },\n 'bd-article': {\n authors : 'one bd-authors, which the article places under its title below lg and at the top of its sidebar from lg; no vocabulary word says a byline',\n promo : 'the product card the article draws at the end of its text, after its last section and before the newsletter, as REAL places it (DEX-29412); `actions` is a row of buttons, and this is an aside of its own',\n toc : 'the article\\'s one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg',\n newsletter: 'the signup the article draws after its body in the main column, which the sidebar does not run beside',\n related : 'the article\\'s related links, after its tags and a divider, a region of its own beside the body'\n },\n 'bd-bar-chart-item': {\n value: 'the text drawn at the end of the bar in place of its score (\"6 / 6\"), and the meter\\'s value text; a bar is a name and its value, and the vocabulary has a word only for the first'\n },\n 'bd-carousel-item': {\n 'detail-title': 'the heading of the item\\'s own dialog, which the item forwards into the dialog\\'s title and names its \"+\" by; the card itself shows no title, so `title` would say the card has one',\n detail : 'the body of the item\\'s own dialog, forwarded into the dialog\\'s default slot; a second region beside the card\\'s own body in the default slot, and not a description of the card'\n },\n 'bd-code': {\n copy : 'the words of a block\\'s own copy button and so its name (\"Copy code\"); the button stays in the shadow root, pinned outside the code\\'s <pre>, and only its words are the page\\'s, as bd-install-option\\'s copy is -- label is a form control\\'s, and bd-code\\'s `label` attribute names its <pre>',\n copied: 'what the copy button shows for 1.5s after a copy, and what the block\\'s live region says (\"Copied\"); a second state of the same button, which no word of the vocabulary names, as bd-install-option\\'s copied'\n },\n 'bd-comparison-panel': {\n positive : 'the items of the column that says what the thing is, each ticked; one of two collections side by side, so neither is the default slot',\n negative : 'the items of the column that says what the thing is not, each crossed; the second collection',\n 'positive-title': 'the positive column\\'s own heading; the panel\\'s title heads both columns',\n 'negative-title': 'the negative column\\'s own heading; the panel\\'s title heads both columns'\n },\n 'bd-fact': {\n value: 'what the label names -- the figure or the answer; a fact is a label and its value, and the vocabulary has a word only for the first'\n },\n 'bd-footer': {\n logo : 'the brand\\'s wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy',\n masterbrand : 'the masterbrand lockup at the masthead band\\'s end, opposite the logo; a second brand mark beside the first, which no word of the vocabulary names',\n nav : 'the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot',\n 'quick-links' : 'the bd-footer-group columns of links; a collection of its own beside the social links and the navigations',\n 'social-links' : 'the links to the brand\\'s social networks, drawn as their logos; a second collection of links beside the groups',\n 'secondary-nav': 'the legal and policy bd-footer-nav beside the address; the second of the two navigations',\n address : 'the office\\'s postal address beside the secondary nav; no word of the vocabulary names an address',\n copyright : 'the copyright line that opens the footer\\'s last row; a legal notice, not a caption of anything',\n anpc : 'the Romanian consumer authority\\'s ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for',\n 'country-label': 'the country picker\\'s words until a country is known, and the country list\\'s heading; label is a form control\\'s, and the picker is a disclosure, not a field'\n },\n 'bd-install-option': {\n code : 'the command the option shows in its code block and its Copy button copies, line breaks kept; no word of the vocabulary names a command',\n copy : 'the Copy button\\'s words and so its name (\"Copy\"); the button stays in the shadow root beside the code block, and only its words are the page\\'s, as bd-product-hero\\'s cta is -- label is a form control\\'s',\n copied: 'the words that take the Copy button\\'s place for 1.5s after a copy and are said through the option\\'s live region (\"Copied\"); a second state of the same button, which no word of the vocabulary names'\n },\n 'bd-install-options': {\n 'works-in' : 'the harnesses the options run in, one bd-tag each; a second collection beside the default slot\\'s options',\n 'works-in-label' : 'the words that introduce that row (\"Works in\"); the section\\'s eyebrow and title are its own, and label is a form control\\'s',\n 'prompt-title' : 'the heading of the \"Then just ask\" panel, a second region of the section beside the options, under the section\\'s own title',\n 'prompt-description': 'the paragraph under the prompt panel\\'s heading; the section\\'s description is the one under its title',\n 'prompt-label' : 'the small label above the prompt block, naming what the block is (\"Prompt for your agent\")',\n prompt : 'the prompt itself, the words the panel shows and its Copy button copies',\n 'prompt-note' : 'the warning-style note under the prompt',\n copy : 'the prompt panel\\'s Copy button\\'s words and so its name (\"Copy\"), as bd-install-option\\'s copy is for its command',\n copied : 'the words that take that button\\'s place for 1.5s after a copy and are said through the section\\'s live region (\"Copied\"), as bd-install-option\\'s copied'\n },\n 'bd-newsletter-signup': {\n cta : 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s',\n error : 'the words shown under the field after an invalid address, announced; nothing in the vocabulary is shown only when the reader\\'s input is refused',\n success: 'the words shown in place of the form once the page has sent the address (state=\"success\"), in a status region; a state\\'s message, which no vocabulary word names',\n failure: 'the words shown under the filled form when the page\\'s send failed (state=\"failed\"), announced; not `error`, which is the reader\\'s invalid address, while this is the page\\'s send'\n },\n 'bd-partner-banner': {\n lockup: 'the partner\\'s and Bitdefender\\'s logos side by side over the photo; a co-brand mark no word of the vocabulary names'\n },\n 'bd-post-card': {\n meta : 'the post\\'s byline row -- its date and reading time, bd-meta items -- between the cover and the title; not the eyebrow, a kicker naming what the title is about, nor a caption, which describes the cover',\n 'read-more': 'the words of the card\\'s visual cue to follow its link (\"Read more\"), drawn with an arrow and hidden from a screen reader, which hears the title as the link; not the card\\'s actions -- the whole card is its one link -- and not a caption, which describes something'\n },\n 'bd-pricing-card': {\n banner: 'the highlighted card\\'s ribbon above its top edge (\"Best value\"), drawn only with `highlight`',\n price : 'the card\\'s price zone, a bd-pricing-price or a bd-tab-group of them for a billing choice; the store\\'s figures, which no word of the vocabulary names'\n },\n 'bd-pricing-price': {\n full : 'the struck full price the discount is taken from; a price zone is a reference price, a discount and a price, and the vocabulary has a word for none of them',\n discount: 'the discount\\'s bd-badge beside the full price (\"Save 44%\"); a figure of its own, not the card\\'s badge',\n period : 'the price\\'s billing unit after it (\"/year\", \"/month\"); not a caption'\n },\n 'bd-product-hero': {\n 'product-name' : 'the product\\'s name, a kicker above the title in the heading-h4 role; the title is the promise, not the product',\n cta : 'the buy button\\'s words; the button stays in the shadow root inside bd-product, where the store finds it, and only its label is the page\\'s',\n 'cta-secondary': 'the second button\\'s words, drawn when cta-secondary-href is set'\n },\n 'bd-product-upsell': {\n cta: 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s'\n },\n 'bd-quick-answer': {\n facts: 'the labelled facts under the answer, one bd-fact each, drawn as a strip under a divider; a collection of its own beside the default slot, which takes whatever follows the answer'\n },\n 'bd-report-promo': {\n cta: 'the words of the promo\\'s own bd-button, which stays in the shadow root because its look is the promo\\'s; only its label is the page\\'s'\n },\n 'bd-review': {\n date: 'when the review was written, the line under its caption; the vocabulary has a word for who said it (caption) and none for when'\n },\n 'bd-spotlight': {\n 'description-actions': 'a second group of actions: the buttons under the description, in the other column from the `actions` under the title. Web Awesome names a second group by its part the same way (wa-card\\'s header-actions and footer-actions)'\n },\n 'bd-stat': {\n value: 'the figure the caption explains (\"580+\"), drawn at display size above it; a stat is a figure and its caption, and the vocabulary has a word only for the second'\n },\n 'bd-terminal-hero': {\n breadcrumb : 'the page\\'s bd-breadcrumb above the eyebrow, the hero\\'s own trail',\n 'annotation-top' : 'a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part',\n 'annotation-bottom': 'a note pinned below the terminal, on its bottom edge; the second of the pair',\n meta : 'the mono spec line that opens the facts row; a line of its own above the facts, not their caption',\n facts : 'the labelled facts under the spec line, one bd-fact each in the spec look, drawn as a grid under a rule; a collection of its own beside the copy, as bd-quick-answer\\'s facts are'\n },\n 'bd-tooltip': {\n content: 'the bubble\\'s words; a tooltip has a trigger and what it says about it, not a title or a description'\n },\n 'bd-trust-panel': {\n stats: 'a second collection beside the cards in the default slot: the bd-fact statistics row above them'\n }\n};\n\n/**\n * Which property names carry the look and which carry the meaning -- the one\n * place that says so. `check:enum-vocabulary` fails a look property that\n * allows a meaning value, and a meaning property that allows anything outside\n * TONES, so the two vocabularies stay disjoint and an old `variant=\"primary\"`\n * cannot pass for a meaning.\n *\n * 3.x's, which the families of the later phases still declare until they\n * move: the look is `variant` (or `kind`) and the meaning is `tone`.\n */\nexport const PROP_AXES_V3 = {\n look : ['variant', 'kind'],\n meaning: ['tone']\n} as const;\n\n/** v4's (N6): the look is `appearance` and the meaning is `variant`. */\nexport const PROP_AXES_V4 = {\n look : ['appearance'],\n meaning: ['variant']\n} as const;\n\nexport type PropAxes = typeof PROP_AXES_V3 | typeof PROP_AXES_V4;\n\n/**\n * The axes one tag is read with, from the names of the properties it\n * declares. A tag that declares `appearance` has moved to v4, so its\n * `variant` is the meaning; any other tag is still on 3.x's names, where\n * `variant` is the look. The same word means opposite things on the two\n * sides, which is why the rule is per tag rather than one constant while the\n * families move (v4 phases 1-7). Once every tag is on v4 this is\n * PROP_AXES_V4 for all of them, and PROP_AXES_V3 goes.\n */\nexport function axesFor(properties: Iterable<string>): PropAxes {\n for (const name of properties) if (name === 'appearance') return PROP_AXES_V4;\n return PROP_AXES_V3;\n}\n\n/**\n * A prop value if its closed set has it, else the fallback. Returning the\n * fallback rather than the raw value is what stops a typo rendering an\n * unstyled component. There is no legacy map to consult first: an old\n * spelling is a value outside the set like any other (N6).\n */\nexport function resolveEnum<T extends string, F = T>(\n value: unknown,\n { allowed, fallback }: { allowed: readonly T[]; fallback: F }\n): T | F {\n return isOneOf(allowed, value) ? value : fallback;\n}\n\n/**\n * Whether a value is in a closed set. A property typed by the set can still\n * hold anything an attribute wrote, which is why the components repair it in\n * willUpdate; this is the check they repair on.\n */\nexport const isOneOf = <T extends string>(set: readonly T[], value: unknown): value is T =>\n (set as readonly unknown[]).includes(value);\n"],"mappings":"AA4BA,IAAaA,EAAQ,CAAC,KAAM,KAAM,IAAI,EASzBC,EAAQ,CAAC,UAAW,QAAS,UAAW,UAAW,QAAS,MAAM,EAgBlEC,EAAa,CACxB,GAAI,UAAW,QAAS,cAAe,UAAW,QAAS,OAC3D,QAAS,UAAW,SAAU,QAAS,MAAO,QAAS,MACzD,EAWaC,EAA8E,CACzF,qBAAsB,CACpB,UAAY,+JACZ,WAAY,0FACd,EACA,aAAc,CACZ,QAAY,4IACZ,MAAY,6MACZ,IAAY,0HACZ,WAAY,wGACZ,QAAY,gGACd,EACA,oBAAqB,CACnB,MAAO,mLACT,EACA,mBAAoB,CAClB,eAAgB,sLAChB,OAAgB,gLAClB,EACA,UAAW,CACT,KAAQ,gSACR,OAAQ,6MACV,EACA,sBAAuB,CACrB,SAAkB,wIAClB,SAAkB,+FAClB,iBAAkB,0EAClB,iBAAkB,yEACpB,EACA,UAAW,CACT,MAAO,qIACT,EACA,YAAa,CACX,KAAiB,4HACjB,YAAiB,oJACjB,IAAiB,4HACjB,cAAiB,4GACjB,eAAiB,iHACjB,gBAAiB,2FACjB,QAAiB,mGACjB,UAAiB,iGACjB,KAAiB,4HACjB,gBAAiB,6JACnB,EACA,oBAAqB,CACnB,KAAQ,yIACR,KAAQ,2MACR,OAAQ,sMACV,EACA,qBAAsB,CACpB,WAAsB,2GACtB,iBAAsB,6HACtB,eAAsB,6HACtB,qBAAsB,uGACtB,eAAsB,6FACtB,OAAsB,0EACtB,cAAsB,0CACtB,KAAsB,kHACtB,OAAsB,wJACxB,EACA,uBAAwB,CACtB,IAAS,oJACT,MAAS,kJACT,QAAS,mKACT,QAAS,oLACX,EACA,oBAAqB,CACnB,OAAQ,oHACV,EACA,eAAgB,CACd,KAAa,2MACb,YAAa,uQACf,EACA,kBAAmB,CACjB,OAAQ,gGACR,MAAQ,sJACV,EACA,mBAAoB,CAClB,KAAU,8JACV,SAAU,wGACV,OAAU,sEACZ,EACA,kBAAmB,CACjB,eAAiB,iHACjB,IAAiB,4IACjB,gBAAiB,iEACnB,EACA,oBAAqB,CACnB,IAAK,mJACP,EACA,kBAAmB,CACjB,MAAO,mLACT,EACA,kBAAmB,CACjB,IAAK,sIACP,EACA,YAAa,CACX,KAAM,gIACR,EACA,eAAgB,CACd,sBAAuB,+NACzB,EACA,UAAW,CACT,MAAO,iKACT,EACA,mBAAoB,CAClB,WAAqB,mEACrB,iBAAqB,qHACrB,oBAAqB,+EACrB,KAAqB,oGACrB,MAAqB,kLACvB,EACA,aAAc,CACZ,QAAS,qGACX,EACA,iBAAkB,CAChB,MAAO,iGACT,CACF,EAYaC,EAAe,CAC1B,KAAS,CAAC,UAAW,MAAM,EAC3B,QAAS,CAAC,MAAM,CAClB,EAGaC,EAAe,CAC1B,KAAS,CAAC,YAAY,EACtB,QAAS,CAAC,SAAS,CACrB,EAaA,SAAgBC,EAAQ,EAAwC,CAC9D,IAAK,IAAMC,KAAQC,EAAY,GAAID,IAAS,aAAc,OAAOF,EACjE,OAAOD,CACT,CAQA,SAAgBK,EACd,EACA,CAAE,UAAS,YACJ,CACP,OAAOC,EAAQC,EAASC,CAAK,EAAIA,EAAQC,CAC3C,CAOA,IAAaH,GAA6B,EAAmB,IAC1DI,EAA2B,SAASF,CAAK,E"}
1
+ {"version":3,"file":"prop-vocabulary.js","names":["SIZES","TONES","SLOT_NAMES","COMPONENT_SLOTS","PROP_AXES_V3","PROP_AXES_V4","axesFor","name","properties","resolveEnum","isOneOf","allowed","value","fallback","set"],"sources":["../../../../src/components/shared/prop-vocabulary.ts"],"sourcesContent":["/**\n * The words a component prop is allowed to use.\n *\n * Three axes, three names, and each name means one thing everywhere (N6,\n * docs/adr/0004-web-awesome-naming.md):\n *\n * size how big sm · md · lg\n * appearance how it looks primary, bullet, shade — per component\n * variant what it means neutral · brand · success · warning · error · info\n *\n * The look and the meaning share no value, and no set keeps a legacy alias:\n * a v4 tag reads these spellings and nothing else. A value outside its set,\n * an old one included (`size=\"small\"`, `kind=\"primary\"`), is repaired to the\n * default in willUpdate (isOneOf), the same as a typo. Translating a 3.x\n * spelling is scripts/codemod-v4.mjs's job, done once in the page's markup,\n * not every component's on every render.\n *\n * Before this there were three size vocabularies and `kind` meant four\n * unrelated things: the visual variant on bd-button and bd-link, the size on\n * the three form fields, the type step on bd-p and the marker on bd-li. An\n * author could not carry anything learned on one atom to the next.\n *\n * 3.x spelled the look `variant` and the meaning `tone`; v4 takes Web\n * Awesome's split. The tags move one family at a time, so until the last\n * family lands a tag is on one spelling or the other -- see axesFor().\n */\n\n/** The one size scale. */\nexport const SIZES = ['sm', 'md', 'lg'] as const;\nexport type Size = typeof SIZES[number];\n\n/**\n * The closed set of meanings. A meaning says what something is telling the\n * reader, not how it looks, so it is one set for every component: bd-badge\n * and bd-tag take all six, bd-callout and bd-progress-bar a subset. It was spelled\n * out in each of them; this is the declaration `check:enum-vocabulary` reads.\n */\nexport const TONES = ['neutral', 'brand', 'success', 'warning', 'error', 'info'] as const;\nexport type Tone = typeof TONES[number];\n\n/**\n * The names a slot may take (N7): the closed set, so `title` means the\n * heading in every component and nobody spells it `heading`, `headline` or\n * `header` again. '' is the default slot, which holds a container's items.\n * `start` and `end` hold decorations before and after a label, `label` and\n * `hint` a form control's words, `media` / `actions` / `footer` the parts a\n * card or a section shows around its copy.\n *\n * The naming rules in `check:element-api` fail a slot outside this set that\n * COMPONENT_SLOTS does not register for its tag. 3.x's names are frozen in\n * scripts/naming.baseline.json and leave it as each phase renames or\n * registers them.\n */\nexport const SLOT_NAMES = [\n '', 'eyebrow', 'title', 'description', 'caption', 'badge', 'icon',\n 'media', 'actions', 'footer', 'start', 'end', 'label', 'hint'\n] as const;\nexport type SlotName = typeof SLOT_NAMES[number];\n\n/**\n * A slot name only one component needs, keyed by tag, each with the reason\n * the vocabulary has no word for it. Register a name only when the slot holds\n * a part SLOT_NAMES cannot say -- a second collection beside the default\n * slot's items, or a part with no counterpart elsewhere -- never to keep a\n * 3.x name. A registered name the tag no longer renders fails as well, so\n * this cannot outlive the slot it explains.\n */\nexport const COMPONENT_SLOTS: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n 'bd-agent-endpoints': {\n endpoints : 'the first of two rows of links, the machine-readable files; a collection of its own beside the assistants, and the default slot takes what follows both rows',\n assistants: 'the second row of links, one per assistant; a collection of its own beside the endpoints'\n },\n 'bd-article': {\n authors : 'one bd-authors, which the article places under its title below lg and at the top of its sidebar from lg; no vocabulary word says a byline',\n promo : 'the product card the article draws at the end of its text, after its last section and before the newsletter, as REAL places it (DEX-29412); `actions` is a row of buttons, and this is an aside of its own',\n toc : 'the article\\'s one table of contents, inline before the first section heading below lg and sticky in the sidebar from lg',\n newsletter: 'the signup the article draws after its body in the main column, which the sidebar does not run beside',\n related : 'the article\\'s related links, after its tags and a divider, a region of its own beside the body'\n },\n 'bd-bar-chart-item': {\n value: 'the text drawn at the end of the bar in place of its score (\"6 / 6\"), and the meter\\'s value text; a bar is a name and its value, and the vocabulary has a word only for the first'\n },\n 'bd-carousel-item': {\n 'detail-title': 'the heading of the item\\'s own dialog, which the item forwards into the dialog\\'s title and names its \"+\" by; the card itself shows no title, so `title` would say the card has one',\n detail : 'the body of the item\\'s own dialog, forwarded into the dialog\\'s default slot; a second region beside the card\\'s own body in the default slot, and not a description of the card'\n },\n 'bd-code': {\n copy : 'the words of a block\\'s own copy button and so its name (\"Copy code\"); the button stays in the shadow root, pinned outside the code\\'s <pre>, and only its words are the page\\'s, as bd-install-option\\'s copy is -- label is a form control\\'s, and bd-code\\'s `label` attribute names its <pre>',\n copied: 'what the copy button shows for 1.5s after a copy, and what the block\\'s live region says (\"Copied\"); a second state of the same button, which no word of the vocabulary names, as bd-install-option\\'s copied'\n },\n 'bd-comparison-panel': {\n positive : 'the items of the column that says what the thing is, each ticked; one of two collections side by side, so neither is the default slot',\n negative : 'the items of the column that says what the thing is not, each crossed; the second collection',\n 'positive-title': 'the positive column\\'s own heading; the panel\\'s title heads both columns',\n 'negative-title': 'the negative column\\'s own heading; the panel\\'s title heads both columns'\n },\n 'bd-fact': {\n value: 'what the label names -- the figure or the answer; a fact is a label and its value, and the vocabulary has a word only for the first'\n },\n 'bd-icon-columns-banner': {\n 'corner-start': 'decorative art anchored to the surface\\'s top start corner behind the copy; an ornament, not media illustrating the copy',\n 'corner-end' : 'decorative art anchored to the surface\\'s top end corner behind the copy; the counterpart of corner-start'\n },\n 'bd-footer': {\n logo : 'the brand\\'s wordmark at the start of the masthead band; a mark the footer is signed with, not media illustrating its copy',\n masterbrand : 'the masterbrand lockup at the masthead band\\'s end, opposite the logo; a second brand mark beside the first, which no word of the vocabulary names',\n nav : 'the main footer navigation, a bd-footer-nav above the link groups; one of two navigations, so neither is the default slot',\n 'quick-links' : 'the bd-footer-group columns of links; a collection of its own beside the social links and the navigations',\n 'social-links' : 'the links to the brand\\'s social networks, drawn as their logos; a second collection of links beside the groups',\n 'secondary-nav': 'the legal and policy bd-footer-nav beside the address; the second of the two navigations',\n address : 'the office\\'s postal address beside the secondary nav; no word of the vocabulary names an address',\n copyright : 'the copyright line that opens the footer\\'s last row; a legal notice, not a caption of anything',\n anpc : 'the Romanian consumer authority\\'s ANPC badge, drawn on a ro locale only; a regulatory mark the vocabulary has no word for',\n 'country-label': 'the country picker\\'s words until a country is known, and the country list\\'s heading; label is a form control\\'s, and the picker is a disclosure, not a field'\n },\n 'bd-install-option': {\n code : 'the command the option shows in its code block and its Copy button copies, line breaks kept; no word of the vocabulary names a command',\n copy : 'the Copy button\\'s words and so its name (\"Copy\"); the button stays in the shadow root beside the code block, and only its words are the page\\'s, as bd-product-hero\\'s cta is -- label is a form control\\'s',\n copied: 'the words that take the Copy button\\'s place for 1.5s after a copy and are said through the option\\'s live region (\"Copied\"); a second state of the same button, which no word of the vocabulary names'\n },\n 'bd-install-options': {\n 'works-in' : 'the harnesses the options run in, one bd-tag each; a second collection beside the default slot\\'s options',\n 'works-in-label' : 'the words that introduce that row (\"Works in\"); the section\\'s eyebrow and title are its own, and label is a form control\\'s',\n 'prompt-title' : 'the heading of the \"Then just ask\" panel, a second region of the section beside the options, under the section\\'s own title',\n 'prompt-description': 'the paragraph under the prompt panel\\'s heading; the section\\'s description is the one under its title',\n 'prompt-label' : 'the small label above the prompt block, naming what the block is (\"Prompt for your agent\")',\n prompt : 'the prompt itself, the words the panel shows and its Copy button copies',\n 'prompt-note' : 'the warning-style note under the prompt',\n copy : 'the prompt panel\\'s Copy button\\'s words and so its name (\"Copy\"), as bd-install-option\\'s copy is for its command',\n copied : 'the words that take that button\\'s place for 1.5s after a copy and are said through the section\\'s live region (\"Copied\"), as bd-install-option\\'s copied'\n },\n 'bd-newsletter-signup': {\n cta : 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s',\n error : 'the words shown under the field after an invalid address, announced; nothing in the vocabulary is shown only when the reader\\'s input is refused',\n success: 'the words shown in place of the form once the page has sent the address (state=\"success\"), in a status region; a state\\'s message, which no vocabulary word names',\n failure: 'the words shown under the filled form when the page\\'s send failed (state=\"failed\"), announced; not `error`, which is the reader\\'s invalid address, while this is the page\\'s send'\n },\n 'bd-partner-banner': {\n lockup: 'the partner\\'s and Bitdefender\\'s logos side by side over the photo; a co-brand mark no word of the vocabulary names'\n },\n 'bd-post-card': {\n meta : 'the post\\'s byline row -- its date and reading time, bd-meta items -- between the cover and the title; not the eyebrow, a kicker naming what the title is about, nor a caption, which describes the cover',\n 'read-more': 'the words of the card\\'s visual cue to follow its link (\"Read more\"), drawn with an arrow and hidden from a screen reader, which hears the title as the link; not the card\\'s actions -- the whole card is its one link -- and not a caption, which describes something'\n },\n 'bd-pricing-card': {\n banner: 'the highlighted card\\'s ribbon above its top edge (\"Best value\"), drawn only with `highlight`',\n price : 'the card\\'s price zone, a bd-pricing-price or a bd-tab-group of them for a billing choice; the store\\'s figures, which no word of the vocabulary names'\n },\n 'bd-pricing-price': {\n full : 'the struck full price the discount is taken from; a price zone is a reference price, a discount and a price, and the vocabulary has a word for none of them',\n discount: 'the discount\\'s bd-badge beside the full price (\"Save 44%\"); a figure of its own, not the card\\'s badge',\n period : 'the price\\'s billing unit after it (\"/year\", \"/month\"); not a caption'\n },\n 'bd-product-hero': {\n 'product-name' : 'the product\\'s name, a kicker above the title in the heading-h4 role; the title is the promise, not the product',\n cta : 'the buy button\\'s words; the button stays in the shadow root inside bd-product, where the store finds it, and only its label is the page\\'s',\n 'cta-secondary': 'the second button\\'s words, drawn when cta-secondary-href is set'\n },\n 'bd-product-upsell': {\n cta: 'the words of the component\\'s own button or link, which stays in the shadow root because its look is the component\\'s; only its label is the page\\'s'\n },\n 'bd-quick-answer': {\n facts: 'the labelled facts under the answer, one bd-fact each, drawn as a strip under a divider; a collection of its own beside the default slot, which takes whatever follows the answer'\n },\n 'bd-report-promo': {\n cta: 'the words of the promo\\'s own bd-button, which stays in the shadow root because its look is the promo\\'s; only its label is the page\\'s'\n },\n 'bd-review': {\n date: 'when the review was written, the line under its caption; the vocabulary has a word for who said it (caption) and none for when'\n },\n 'bd-spotlight': {\n 'description-actions': 'a second group of actions: the buttons under the description, in the other column from the `actions` under the title. Web Awesome names a second group by its part the same way (wa-card\\'s header-actions and footer-actions)'\n },\n 'bd-stat': {\n value: 'the figure the caption explains (\"580+\"), drawn at display size above it; a stat is a figure and its caption, and the vocabulary has a word only for the second'\n },\n 'bd-terminal-hero': {\n breadcrumb : 'the page\\'s bd-breadcrumb above the eyebrow, the hero\\'s own trail',\n 'annotation-top' : 'a note pinned above the terminal, on its top edge; no word of the vocabulary names a note placed over another part',\n 'annotation-bottom': 'a note pinned below the terminal, on its bottom edge; the second of the pair',\n meta : 'the mono spec line that opens the facts row; a line of its own above the facts, not their caption',\n facts : 'the labelled facts under the spec line, one bd-fact each in the spec look, drawn as a grid under a rule; a collection of its own beside the copy, as bd-quick-answer\\'s facts are'\n },\n 'bd-tooltip': {\n content: 'the bubble\\'s words; a tooltip has a trigger and what it says about it, not a title or a description'\n },\n 'bd-trust-panel': {\n stats: 'a second collection beside the cards in the default slot: the bd-fact statistics row above them'\n }\n};\n\n/**\n * Which property names carry the look and which carry the meaning -- the one\n * place that says so. `check:enum-vocabulary` fails a look property that\n * allows a meaning value, and a meaning property that allows anything outside\n * TONES, so the two vocabularies stay disjoint and an old `variant=\"primary\"`\n * cannot pass for a meaning.\n *\n * 3.x's, which the families of the later phases still declare until they\n * move: the look is `variant` (or `kind`) and the meaning is `tone`.\n */\nexport const PROP_AXES_V3 = {\n look : ['variant', 'kind'],\n meaning: ['tone']\n} as const;\n\n/** v4's (N6): the look is `appearance` and the meaning is `variant`. */\nexport const PROP_AXES_V4 = {\n look : ['appearance'],\n meaning: ['variant']\n} as const;\n\nexport type PropAxes = typeof PROP_AXES_V3 | typeof PROP_AXES_V4;\n\n/**\n * The axes one tag is read with, from the names of the properties it\n * declares. A tag that declares `appearance` has moved to v4, so its\n * `variant` is the meaning; any other tag is still on 3.x's names, where\n * `variant` is the look. The same word means opposite things on the two\n * sides, which is why the rule is per tag rather than one constant while the\n * families move (v4 phases 1-7). Once every tag is on v4 this is\n * PROP_AXES_V4 for all of them, and PROP_AXES_V3 goes.\n */\nexport function axesFor(properties: Iterable<string>): PropAxes {\n for (const name of properties) if (name === 'appearance') return PROP_AXES_V4;\n return PROP_AXES_V3;\n}\n\n/**\n * A prop value if its closed set has it, else the fallback. Returning the\n * fallback rather than the raw value is what stops a typo rendering an\n * unstyled component. There is no legacy map to consult first: an old\n * spelling is a value outside the set like any other (N6).\n */\nexport function resolveEnum<T extends string, F = T>(\n value: unknown,\n { allowed, fallback }: { allowed: readonly T[]; fallback: F }\n): T | F {\n return isOneOf(allowed, value) ? value : fallback;\n}\n\n/**\n * Whether a value is in a closed set. A property typed by the set can still\n * hold anything an attribute wrote, which is why the components repair it in\n * willUpdate; this is the check they repair on.\n */\nexport const isOneOf = <T extends string>(set: readonly T[], value: unknown): value is T =>\n (set as readonly unknown[]).includes(value);\n"],"mappings":"AA4BA,IAAaA,EAAQ,CAAC,KAAM,KAAM,IAAI,EASzBC,EAAQ,CAAC,UAAW,QAAS,UAAW,UAAW,QAAS,MAAM,EAgBlEC,EAAa,CACxB,GAAI,UAAW,QAAS,cAAe,UAAW,QAAS,OAC3D,QAAS,UAAW,SAAU,QAAS,MAAO,QAAS,MACzD,EAWaC,EAA8E,CACzF,qBAAsB,CACpB,UAAY,+JACZ,WAAY,0FACd,EACA,aAAc,CACZ,QAAY,4IACZ,MAAY,6MACZ,IAAY,0HACZ,WAAY,wGACZ,QAAY,gGACd,EACA,oBAAqB,CACnB,MAAO,mLACT,EACA,mBAAoB,CAClB,eAAgB,sLAChB,OAAgB,gLAClB,EACA,UAAW,CACT,KAAQ,gSACR,OAAQ,6MACV,EACA,sBAAuB,CACrB,SAAkB,wIAClB,SAAkB,+FAClB,iBAAkB,0EAClB,iBAAkB,yEACpB,EACA,UAAW,CACT,MAAO,qIACT,EACA,yBAA0B,CACxB,eAAgB,0HAChB,aAAgB,0GAClB,EACA,YAAa,CACX,KAAiB,4HACjB,YAAiB,oJACjB,IAAiB,4HACjB,cAAiB,4GACjB,eAAiB,iHACjB,gBAAiB,2FACjB,QAAiB,mGACjB,UAAiB,iGACjB,KAAiB,4HACjB,gBAAiB,6JACnB,EACA,oBAAqB,CACnB,KAAQ,yIACR,KAAQ,2MACR,OAAQ,sMACV,EACA,qBAAsB,CACpB,WAAsB,2GACtB,iBAAsB,6HACtB,eAAsB,6HACtB,qBAAsB,uGACtB,eAAsB,6FACtB,OAAsB,0EACtB,cAAsB,0CACtB,KAAsB,kHACtB,OAAsB,wJACxB,EACA,uBAAwB,CACtB,IAAS,oJACT,MAAS,kJACT,QAAS,mKACT,QAAS,oLACX,EACA,oBAAqB,CACnB,OAAQ,oHACV,EACA,eAAgB,CACd,KAAa,2MACb,YAAa,uQACf,EACA,kBAAmB,CACjB,OAAQ,gGACR,MAAQ,sJACV,EACA,mBAAoB,CAClB,KAAU,8JACV,SAAU,wGACV,OAAU,sEACZ,EACA,kBAAmB,CACjB,eAAiB,iHACjB,IAAiB,4IACjB,gBAAiB,iEACnB,EACA,oBAAqB,CACnB,IAAK,mJACP,EACA,kBAAmB,CACjB,MAAO,mLACT,EACA,kBAAmB,CACjB,IAAK,sIACP,EACA,YAAa,CACX,KAAM,gIACR,EACA,eAAgB,CACd,sBAAuB,+NACzB,EACA,UAAW,CACT,MAAO,iKACT,EACA,mBAAoB,CAClB,WAAqB,mEACrB,iBAAqB,qHACrB,oBAAqB,+EACrB,KAAqB,oGACrB,MAAqB,kLACvB,EACA,aAAc,CACZ,QAAS,qGACX,EACA,iBAAkB,CAChB,MAAO,iGACT,CACF,EAYaC,EAAe,CAC1B,KAAS,CAAC,UAAW,MAAM,EAC3B,QAAS,CAAC,MAAM,CAClB,EAGaC,EAAe,CAC1B,KAAS,CAAC,YAAY,EACtB,QAAS,CAAC,SAAS,CACrB,EAaA,SAAgBC,EAAQ,EAAwC,CAC9D,IAAK,IAAMC,KAAQC,EAAY,GAAID,IAAS,aAAc,OAAOF,EACjE,OAAOD,CACT,CAQA,SAAgBK,EACd,EACA,CAAE,UAAS,YACJ,CACP,OAAOC,EAAQC,EAASC,CAAK,EAAIA,EAAQC,CAC3C,CAOA,IAAaH,GAA6B,EAAmB,IAC1DI,EAA2B,SAASF,CAAK,E"}
@@ -1,2 +1,2 @@
1
- import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);--bd-features-padding-bottom:0;display:block}:host([hidden]){display:none}:host([background=tint]){background:var(--status-brand-surface);--bd-features-padding-bottom:var(--spacing-32)}.root{box-sizing:border-box;flex-direction:column;align-items:center;display:flex}.title[hidden],.description[hidden]{display:none}.title{margin:var(--spacing-24);box-sizing:border-box;text-align:center;max-width:820px}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h3-fontSize);--bd-heading-font-weight:var(--typography-heading-h3-fontWeight);--bd-heading-line-height:var(--typography-heading-h3-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h3-letterSpacing);--bd-heading-font-family:var(--typography-heading-h3-fontFamily);margin:0}.description{box-sizing:border-box;margin:var(--spacing-32) var(--spacing-24);text-align:center;max-width:780px}::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing)}.tablist{margin:var(--spacing-24);border-bottom:var(--border-width-1) solid var(--bd-tab-border-color,var(--color-border-container));flex-wrap:wrap;justify-content:center;display:inline-flex}:host([appearance=switcher]) .tablist{gap:var(--spacing-4);padding:var(--spacing-4);border-radius:var(--radius-full);background:var(--color-action-primary);border-bottom:none;grid-auto-columns:1fr;grid-auto-flow:column;margin-inline:0;display:inline-grid}.panels{box-sizing:border-box;grid-template-columns:minmax(0,1fr);width:100%;display:grid}::slotted(bd-tab-panel){grid-area:1/1}.held::slotted(*){visibility:hidden;opacity:0}@media (width<576px){.tablist{gap:var(--spacing-4)}}`;export{t as default};
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);--bd-features-padding-top:0;--bd-features-padding-bottom:0;display:block}:host([hidden]){display:none}:host([background=tint]){background:var(--status-brand-surface)}:host([background=tint]) .root{padding-block:var(--spacing-48)}@media (width>=768px){:host([background=tint]) .root{padding-block:var(--spacing-64)}}.root{align-items:center;gap:var(--spacing-32);box-sizing:border-box;flex-direction:column;display:flex}.header[hidden],.title[hidden],.description[hidden]{display:none}.header{align-items:center;gap:var(--spacing-16);flex-direction:column;margin-block-end:var(--spacing-16);display:flex}@media (width>=768px){.header{margin-block-end:var(--spacing-32)}}.title{box-sizing:border-box;text-align:center;max-width:820px}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h2-fontSize);--bd-heading-font-weight:var(--typography-heading-h2-fontWeight);--bd-heading-line-height:var(--typography-heading-h2-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h2-letterSpacing);--bd-heading-font-family:var(--typography-heading-h2-fontFamily);margin:0}.description{box-sizing:border-box;text-align:center;max-width:780px}::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-paragraph-margin-bottom:0;margin:0}@media (width>=992px){::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing)}}.tablist{margin-inline:var(--spacing-24);border-bottom:var(--border-width-1) solid var(--bd-tab-border-color,var(--color-border-container));flex-wrap:wrap;justify-content:center;display:inline-flex}:host([appearance=switcher]) .tablist{gap:var(--spacing-4);padding:var(--spacing-4);border-radius:var(--radius-full);background:var(--color-action-primary);border-bottom:none;grid-auto-columns:1fr;grid-auto-flow:column;margin-inline:0;display:inline-grid}.panels{box-sizing:border-box;grid-template-columns:minmax(0,1fr);width:100%;display:grid}::slotted(bd-tab-panel){grid-area:1/1}.held::slotted(*){visibility:hidden;opacity:0}@media (width<576px){.tablist{gap:var(--spacing-4)}}`;export{t as default};
2
2
  //# sourceMappingURL=tab-group.css.js.map