@repobit/dex-system-design 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/src/components/audience-card/audience-card.css.js +1 -1
- package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.js +1 -1
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js +1 -1
- package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
- package/dist/src/components/grid/grid.css.js +1 -1
- package/dist/src/components/grid/grid.css.js.map +1 -1
- package/dist/src/components/grid/grid.d.ts +1 -0
- package/dist/src/components/grid/grid.js +4 -3
- package/dist/src/components/grid/grid.js.map +1 -1
- package/dist/src/components/hero/hero.js +1 -1
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/partner-banner/partner-banner.js +1 -1
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/section-header/section-header.js +1 -1
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/package.json +2 -2
- package/schemas/component-manifest.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.1.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@3.1.0...@repobit/dex-system-design@3.1.1) (2026-11-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **DEX-29311:** homepage components hold their layout under any authored content
|
|
11
|
+
* **DEX-29311:** keep the partner lockup at the top of the banner card
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.1.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@3.0.3...@repobit/dex-system-design@3.1.0) (2026-11-03)
|
|
7
15
|
|
|
8
16
|
### Features
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{width:100%;
|
|
1
|
+
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{grid-template-rows:auto auto 1fr auto;width:100%;display:grid}@supports (width:-moz-available){:host{width:-moz-available}}@supports (width:-webkit-fill-available){:host{width:-webkit-fill-available}}@supports (width:stretch){:host{width:-webkit-fill-available;width:-moz-available;width:stretch}}.card{box-sizing:border-box;grid-row:1/-1;grid-template-rows:subgrid;padding:var(--card-padding-compact);background:var(--color-surface-default);border:var(--border-width-1) solid var(--color-border-container);border-radius:var(--card-radius);grid-template-columns:minmax(0,1fr);row-gap:0;display:grid;position:relative}.copy{display:contents}.eyebrow{align-items:center;gap:var(--spacing-8);margin:0 0 var(--spacing-8);font-family:var(--typography-label-default-fontFamily);font-size:var(--typography-label-default-fontSize);font-weight:var(--typography-label-default-fontWeight);line-height:var(--typography-label-default-lineHeight);letter-spacing:var(--typography-label-default-letterSpacing);text-transform:uppercase;color:var(--color-text-brand);grid-row:1;display:flex}::slotted([slot=icon]){color:var(--color-text-brand);flex:none}.heading{grid-row:2;margin:0}.description{margin:var(--spacing-8) 0 0;font-family:var(--typography-body-regular-fontFamily);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);color:var(--color-text-primary);grid-row:3}.arrow{grid-row:4;place-self:end;margin-block-start:var(--spacing-8)}.arrow::part(button):after{content:"";position:absolute;inset:0}@media (width>=768px) and (width<992px){.card{column-gap:var(--spacing-24);grid-template-columns:minmax(0,1fr) auto}.arrow{grid-area:1/2/-1;align-self:center;margin-block-start:0}}.text,.description{white-space:pre-line}`;export{t as audienceCardCSS};
|
|
2
2
|
//# sourceMappingURL=audience-card.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience-card.css.js","names":["audienceCardCSS"],"sources":["../../../../src/components/audience-card/audience-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* The card sits on the hero's brand band and the page below it at once, so\n it takes the second clause of the card rule: surface/default with a\n border/container edge, at the card corner and the compact inset
|
|
1
|
+
{"version":3,"file":"audience-card.css.js","names":["audienceCardCSS"],"sources":["../../../../src/components/audience-card/audience-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above, below } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* The card sits on the hero's brand band and the page below it at once, so\n it takes the second clause of the card rule: surface/default with a\n border/container edge, at the card corner and the compact inset.\n\n Four rows, one per part: the eyebrow, the title, the description and the\n arrow. The host is a grid of its own four, and the card a subgrid of them;\n in a bd-grid with item-rows=\"4\" the host is in turn a subgrid of the\n grid's rows (grid.css.ts), so every card's title starts on one line and\n its description on the next, however differently the cards' titles wrap.\n A part a card leaves out leaves its row at the height the others give it,\n so the rest still line up.\n\n That is also why the host is no longer a size container: containment\n makes a grid its own, and a subgrid inside it lines up with nothing. The\n row the card becomes between md and lg is the documented one, the hero's\n tablet frame, and follows the screen. */\nexport const audienceCardCSS = css`\n /* bd-grid places its items at start, so the host asks for its column's\n whole width rather than its content's; the width is the column less the\n host's margins (shared/fill-width.css.ts). */\n :host {\n display: grid;\n grid-template-rows: auto auto 1fr auto;\n }\n\n ${hostFillsWidth()}\n\n .card {\n box-sizing: border-box;\n display: grid;\n grid-row: 1 / -1;\n grid-template-rows: subgrid;\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n padding: var(--card-padding-compact);\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n /* the containing block for the link's stretched hit area, below */\n position: relative;\n }\n\n /* the copy's parts are the card's rows, not a box of their own */\n .copy {\n display: contents;\n }\n\n /* The eyebrow is label-default set in capitals, in text/brand -- the draft\n paints it status/info/accent, a status role on a plain label. The parts\n are 8 apart, as margins rather than the row gap, so a part a card leaves\n out takes its space with it. */\n .eyebrow {\n grid-row: 1;\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n margin: 0 0 var(--spacing-8);\n font-family: var(--typography-label-default-fontFamily);\n font-size: var(--typography-label-default-fontSize);\n font-weight: var(--typography-label-default-fontWeight);\n line-height: var(--typography-label-default-lineHeight);\n letter-spacing: var(--typography-label-default-letterSpacing);\n text-transform: uppercase;\n color: var(--color-text-brand);\n }\n\n ::slotted([slot=\"icon\"]) {\n flex: none;\n color: var(--color-text-brand);\n }\n\n .heading {\n grid-row: 2;\n margin: 0;\n }\n\n .description {\n grid-row: 3;\n margin: var(--spacing-8) 0 0;\n font-family: var(--typography-body-regular-fontFamily);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n color: var(--color-text-primary);\n }\n\n /* bottom-right, under the copy, on the card's last row */\n .arrow {\n grid-row: 4;\n justify-self: end;\n align-self: end;\n margin-block-start: var(--spacing-8);\n }\n\n /* The stretched link: the arrow's own <a> (bd-button-link's part=\"button\")\n draws an ::after over the whole card, so the card is the link's hit area\n -- middle-click, Ctrl/Cmd-click and the link menu included -- with no\n script. Nothing between the card and the <a> is positioned, so the card\n is what it fills. The pointer over it is the link's own. It paints\n nothing, so it takes no corner of its own. */\n .arrow::part(button)::after {\n content: \"\";\n position: absolute;\n inset: 0;\n }\n\n /* The tablet row, copy left and the arrow right and centred down the\n card, between md and lg, as the hero's tablet frame draws it: one card\n a row there, so nothing beside it to line up with. Above and below it\n stacks, the arrow bottom-right. */\n @media ${unsafeCSS(above(\"md\"))} and ${unsafeCSS(below(\"lg\"))} {\n .card {\n grid-template-columns: minmax(0, 1fr) auto;\n column-gap: var(--spacing-24);\n }\n\n .arrow {\n grid-column: 2;\n grid-row: 1 / -1;\n align-self: center;\n margin-block-start: 0;\n }\n }\n\n /* A newline in the text is a line break, so a page can keep the breaks its\n copy was written with (a <br> in the authored eyebrow, heading or lead\n arrives as a newline in the property). Text only: nothing here renders\n HTML. The rule sits on a span around the text, not on bd-h or on the\n eyebrow, which also holds the slotted icon. */\n .text,\n .description {\n white-space: pre-line;\n }\n`;\n"],"mappings":"A,gGAoBA,IAAaA,EAAkB,CAAG,21D"}
|
|
@@ -2,7 +2,7 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
2
2
|
<article class="card">
|
|
3
3
|
<div class="copy">
|
|
4
4
|
${this.eyebrow?i`<p class="eyebrow"><slot name="icon"></slot><span class="text">${this.eyebrow}</span></p>`:a}
|
|
5
|
-
|
|
5
|
+
${this.heading?i`<bd-h as="${this.as}" visual-level="h4" class="heading"><span class="text">${this.heading}</span></bd-h>`:a}
|
|
6
6
|
${this.description?i`<p class="description">${this.description}</p>`:a}
|
|
7
7
|
</div>
|
|
8
8
|
${this.href?i`<bd-button-link
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience-card.js","names":["_decorate","__decorate","AudienceCard","LitElement","_args","audienceCardCSS","nothing","property","defineElement"],"sources":["../../../../src/components/audience-card/audience-card.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/heading/heading.ts\";\nimport { audienceCardCSS } from \"./audience-card.css.ts\";\n\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The homepage's audience entry: who it is for, a title, a line of\n * description, and a round arrow into that audience's page. Drawn in the\n * foundation Figma file as Audience card.\n *\n * One link, not three. The arrow is the link and carries the accessible name\n * (`label`, the eyebrow by default, e.g. \"For home\"), so the page reads one\n * link per card instead of a title, a paragraph and an arrow. Its hit area is\n * stretched across the card by an ::after on the link itself (see\n * audience-card.css.ts), so a click anywhere on the card is a click on the\n * link: middle-click and Ctrl/Cmd-click open it in a new tab and the link's\n * context menu is there, which the click handler that stood here could not\n * do -- it forwarded a plain click() whatever the reader had asked for.\n *\n * Between md and lg -- the tablet frame -- the card turns into a row, the copy\n * on the left and the arrow on the right; above and below it stacks.\n */\n@defineElement(\"bd-audience-card\")\nexport class AudienceCard extends LitElement {\n static styles = [audienceCardCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: String })\n href = \"\";\n @property({ type: String })\n target = \"\";\n @property({ type: String })\n label = \"\";\n // three cards under the hero's h1\n @property({ type: String })\n as: HeadingTag = \"h2\";\n\n render() {\n return html`\n <article class=\"card\">\n <div class=\"copy\">\n ${this.eyebrow\n ? html`<p class=\"eyebrow\"><slot name=\"icon\"></slot><span class=\"text\">${this.eyebrow}</span></p>`\n : nothing}\n
|
|
1
|
+
{"version":3,"file":"audience-card.js","names":["_decorate","__decorate","AudienceCard","LitElement","_args","audienceCardCSS","nothing","property","defineElement"],"sources":["../../../../src/components/audience-card/audience-card.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/heading/heading.ts\";\nimport { audienceCardCSS } from \"./audience-card.css.ts\";\n\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The homepage's audience entry: who it is for, a title, a line of\n * description, and a round arrow into that audience's page. Drawn in the\n * foundation Figma file as Audience card.\n *\n * One link, not three. The arrow is the link and carries the accessible name\n * (`label`, the eyebrow by default, e.g. \"For home\"), so the page reads one\n * link per card instead of a title, a paragraph and an arrow. Its hit area is\n * stretched across the card by an ::after on the link itself (see\n * audience-card.css.ts), so a click anywhere on the card is a click on the\n * link: middle-click and Ctrl/Cmd-click open it in a new tab and the link's\n * context menu is there, which the click handler that stood here could not\n * do -- it forwarded a plain click() whatever the reader had asked for.\n *\n * Between md and lg -- the tablet frame -- the card turns into a row, the copy\n * on the left and the arrow on the right; above and below it stacks.\n */\n@defineElement(\"bd-audience-card\")\nexport class AudienceCard extends LitElement {\n static styles = [audienceCardCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: String })\n href = \"\";\n @property({ type: String })\n target = \"\";\n @property({ type: String })\n label = \"\";\n // three cards under the hero's h1\n @property({ type: String })\n as: HeadingTag = \"h2\";\n\n render() {\n return html`\n <article class=\"card\">\n <div class=\"copy\">\n ${this.eyebrow\n ? html`<p class=\"eyebrow\"><slot name=\"icon\"></slot><span class=\"text\">${this.eyebrow}</span></p>`\n : nothing}\n ${this.heading\n ? html`<bd-h as=\"${this.as}\" visual-level=\"h4\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>`\n : nothing}\n ${this.description ? html`<p class=\"description\">${this.description}</p>` : nothing}\n </div>\n ${this.href\n ? html`<bd-button-link\n class=\"arrow\"\n variant=\"accent\"\n size=\"md\"\n icon-only\n href=\"${this.href}\"\n target=\"${this.target || nothing}\"\n label=\"${this.label || this.eyebrow || this.heading}\"\n ></bd-button-link>`\n : nothing}\n </article>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-audience-card\": AudienceCard;\n }\n}\n"],"mappings":"A,6XA6BO,IAAME,EAAN,cAA2BC,CAAW,C,8BAIjC,KAAA,QAAA,GAEA,KAAA,QAAA,GAEI,KAAA,YAAA,GAEP,KAAA,KAAA,GAEE,KAAA,OAAA,GAED,KAAA,MAAA,GAGS,KAAA,GAAA,I,QAhBD,KAAA,OAAA,CAACE,CAAe,C,CAkBhC,QAAS,CACP,MAAO,EAAI;;;YAGH,KAAK,QACH,CAAI,kEAAkE,KAAK,QAAQ,aACnFC,EAAQ;YACV,KAAK,QACH,CAAI,aAAa,KAAK,GAAG,yDAAyD,KAAK,QAAQ,gBAC/FA,EAAQ;YACV,KAAK,YAAc,CAAI,0BAA0B,KAAK,YAAY,MAAQA,EAAQ;;UAEpF,KAAK,KACH,CAAI;;;;;sBAKM,KAAK,KAAK;wBACR,KAAK,QAAUA,EAAQ;uBACxB,KAAK,OAAS,KAAK,SAAW,KAAK,QAAQ;gCAEtDA,EAAQ;;KAGlB,CACF,EA1CGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,KAAA,IAAA,EAAA,EAjB3B,EAAAF,EAAA,CAAAQ,EAAc,kBAAkB,CAAA,EAAAN,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;height:100%;display:block}:host([tone=brand]){width:100%;container:bento-item/inline-size}.bd-bentoitem-box{background:var(--color-surface-container);border-radius:var(--card-radius);padding:var(--card-padding);text-align:start;box-sizing:border-box;height:100%;font-family:var(--typography-fontFamily-sans);min-width:0;transition:transform var(--transition-duration-normal) var(--transition-easing-ease), box-shadow var(--transition-duration-normal) var(--transition-easing-ease);flex-direction:column;justify-content:flex-start;align-items:stretch;display:flex}@media (hover:hover){.bd-bentoitem-box:hover{box-shadow:0px 14px 40px color-mix(in srgb, var(--color-neutral-1000) 7%, transparent);transform:translateY(-3px)}}@media (prefers-reduced-motion:reduce){.bd-bentoitem-box{transition:none}.bd-bentoitem-box:hover{transform:none}}.bd-bentoitem-icon-wrap{justify-content:flex-start;align-items:flex-start;gap:var(--spacing-8);padding-bottom:var(--spacing-8);flex-direction:column;min-height:48px;display:flex}.bd-bentoitem-icon,::slotted([slot=icon]){object-fit:contain;width:48px;max-width:48px;height:48px;max-height:48px;display:block}.bd-bentoitem-title-wrap{align-items:flex-start;gap:var(--spacing-4);margin-bottom:var(--spacing-8);width:100%;display:flex;overflow:hidden}.bd-bentoitem-body{color:var(--color-text-secondary);width:100%;margin:0 0 1em}::slotted(bd-p){width:100%}:host([tone=tint]) .bd-bentoitem-box{background:var(--status-brand-surface)}:host([tone=dark]) .bd-bentoitem-box{background:linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-brand-950) 130%)}:host([tone=dark]) .bd-bentoitem-title-wrap bd-h,:host([tone=dark]) .bd-bentoitem-body{color:var(--color-text-inverse)}@media (width<768px){.bd-bentoitem-box{padding:var(--card-padding-compact)}}:host([tone=brand]) .bd-bentoitem-box{gap:var(--spacing-24);padding:var(--spacing-24);background:var(--color-surface-brand);border-radius:var(--shape-radius-2xl);color:var(--color-brand-on-fill);flex-direction:column;display:flex;position:relative;overflow:hidden}@container bento-item (width<518px){:host([tone=brand]) .bd-bentoitem-cta{margin-block-start:auto}:host([tone=brand]) .bd-bentoitem-cta ::slotted(*){--bd-button-width:100%}}:host([tone=brand]) .bd-bentoitem-box:hover{box-shadow:none;transform:none}.bd-bentoitem-media{aspect-ratio:1;border-radius:var(--shape-radius-xl);position:relative;overflow:hidden;container-type:size}::slotted([slot=media]){object-fit:cover;width:100%;height:100%;display:block}::slotted(bd-motion-art[slot=media]){width:100cqh;height:auto;margin-block-start:-50cqh;margin-inline-start:-50cqh;position:absolute;inset-block-start:50%;inset-inline-start:50%}.bd-bentoitem-text{align-items:flex-start;gap:var(--spacing-12);flex-direction:column;display:flex}.bd-bentoitem-brand-title{margin:0}.bd-bentoitem-brand-body{font-family:var(--typography-body-regular-fontFamily);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);color:var(--color-brand-on-fill);margin:0}@container bento-item (width>=518px){:host([tone=brand]) .bd-bentoitem-box{padding:var(--spacing-32);border-radius:var(--shape-radius-3xl);grid-template:".media"1fr"text media""cta media"".media"1fr/300px minmax(0,1fr);gap:0;display:grid}:host([tone=brand][priority=featured]) .bd-bentoitem-box{grid-template-columns:42% minmax(0,1fr)}.bd-bentoitem-text{grid-area:text}.bd-bentoitem-cta{grid-area:cta;margin-block-start:var(--spacing-24)}.bd-bentoitem-media{aspect-ratio:auto;border-radius:var(--radius-none);margin-block:calc(-1 * var(--spacing-32));grid-area:media;margin-inline-end:calc(-1 * var(--spacing-32))}::slotted(bd-motion-art[slot=media]){
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{box-sizing:border-box;height:100%;display:block}:host([tone=brand]){width:100%;container:bento-item/inline-size}.bd-bentoitem-box{background:var(--color-surface-container);border-radius:var(--card-radius);padding:var(--card-padding);text-align:start;box-sizing:border-box;height:100%;font-family:var(--typography-fontFamily-sans);min-width:0;transition:transform var(--transition-duration-normal) var(--transition-easing-ease), box-shadow var(--transition-duration-normal) var(--transition-easing-ease);flex-direction:column;justify-content:flex-start;align-items:stretch;display:flex}@media (hover:hover){.bd-bentoitem-box:hover{box-shadow:0px 14px 40px color-mix(in srgb, var(--color-neutral-1000) 7%, transparent);transform:translateY(-3px)}}@media (prefers-reduced-motion:reduce){.bd-bentoitem-box{transition:none}.bd-bentoitem-box:hover{transform:none}}.bd-bentoitem-icon-wrap{justify-content:flex-start;align-items:flex-start;gap:var(--spacing-8);padding-bottom:var(--spacing-8);flex-direction:column;min-height:48px;display:flex}.bd-bentoitem-icon,::slotted([slot=icon]){object-fit:contain;width:48px;max-width:48px;height:48px;max-height:48px;display:block}.bd-bentoitem-title-wrap{align-items:flex-start;gap:var(--spacing-4);margin-bottom:var(--spacing-8);width:100%;display:flex;overflow:hidden}.bd-bentoitem-body{color:var(--color-text-secondary);width:100%;margin:0 0 1em}::slotted(bd-p){width:100%}:host([tone=tint]) .bd-bentoitem-box{background:var(--status-brand-surface)}:host([tone=dark]) .bd-bentoitem-box{background:linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-brand-950) 130%)}:host([tone=dark]) .bd-bentoitem-title-wrap bd-h,:host([tone=dark]) .bd-bentoitem-body{color:var(--color-text-inverse)}@media (width<768px){.bd-bentoitem-box{padding:var(--card-padding-compact)}}:host([tone=brand]) .bd-bentoitem-box{gap:var(--spacing-24);padding:var(--spacing-24);background:var(--color-surface-brand);border-radius:var(--shape-radius-2xl);color:var(--color-brand-on-fill);flex-direction:column;display:flex;position:relative;overflow:hidden}@container bento-item (width<518px){:host([tone=brand]) .bd-bentoitem-cta{margin-block-start:auto}:host([tone=brand]) .bd-bentoitem-cta ::slotted(*){--bd-button-width:100%}}:host([tone=brand]) .bd-bentoitem-box:hover{box-shadow:none;transform:none}.bd-bentoitem-media{aspect-ratio:1;border-radius:var(--shape-radius-xl);position:relative;overflow:hidden;container-type:size}::slotted([slot=media]){object-fit:cover;width:100%;height:100%;display:block}::slotted(bd-motion-art[slot=media]){width:100cqh;height:auto;margin-block-start:-50cqh;margin-inline-start:-50cqh;position:absolute;inset-block-start:50%;inset-inline-start:50%}.bd-bentoitem-text{align-items:flex-start;gap:var(--spacing-12);flex-direction:column;display:flex}.bd-bentoitem-brand-title{margin:0}.bd-bentoitem-brand-body{font-family:var(--typography-body-regular-fontFamily);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);color:var(--color-brand-on-fill);margin:0}@container bento-item (width>=518px){:host([tone=brand]) .bd-bentoitem-box{padding:var(--spacing-32);border-radius:var(--shape-radius-3xl);grid-template:".media"1fr"text media""cta media"".media"1fr/300px minmax(0,1fr);gap:0;display:grid}:host([tone=brand][priority=featured]) .bd-bentoitem-box{grid-template-columns:42% minmax(0,1fr)}.bd-bentoitem-text{grid-area:text}.bd-bentoitem-cta{grid-area:cta;margin-block-start:var(--spacing-24)}.bd-bentoitem-media{aspect-ratio:auto;border-radius:var(--radius-none);margin-block:calc(-1 * var(--spacing-32));grid-area:media;margin-inline-end:calc(-1 * var(--spacing-32))}::slotted(bd-motion-art[slot=media]){--bd-bento-art:max(100cqw, min(100cqh, 24.5rem));width:var(--bd-bento-art);margin-block-start:calc(var(--bd-bento-art) / -2);margin-inline-start:0;inset-inline-start:0}}@container bento-item (656px<=width<880px){::slotted(bd-motion-art[slot=media]){--bd-bento-art:max(100cqw, min(135cqh, 36rem))}}.text,.bd-bentoitem-brand-body{white-space:pre-line}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=bento-item.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-item.css.js","names":["bento_item_css_default"],"sources":["../../../../src/components/bento-grid/bento-item.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n height: 100%;\n box-sizing: border-box;\n }\n\n /* A brand card is the container its own layout asks: the row, the column\n and the size of the art follow the card's width (BRAND, below). Only the\n brand tone: a size container contributes nothing to its own intrinsic\n width, and the other tones are also set in rows that size them to their\n content (Foundations/Visual Alignment's card family), where one would\n collapse. width: 100% for the same reason, in the grid cell a brand card\n always sits in. */\n :host([tone=\"brand\"]) {\n width: 100%;\n container: bento-item / inline-size;\n }\n\n .bd-bentoitem-box {\n background: var(--color-surface-container);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n text-align: start;\n height: 100%;\n box-sizing: border-box;\n font-family: var(--typography-fontFamily-sans);\n min-width: 0;\n /* The same hover lift as trust-panel, now at the same scale step. */\n transition: transform var(--transition-duration-normal) var(--transition-easing-ease),\n box-shadow var(--transition-duration-normal) var(--transition-easing-ease);\n /* No edge. --color-surface-container is documented as \"the ground of a\n self-contained object -- a card, a tile, a panel -- one step off the page\n so it reads as its own object WITHOUT needing a border or a shadow to say\n so\", and this card sits on the page ground, so the tonal step is the\n separation and an edge is redundant with the role's own purpose.\n\n The rule, from the cards-and-surfaces review: a card on the page ground\n takes surface/container and no edge; a card on a tinted section takes\n surface/default plus a 1px border/container, because there is no tonal\n step available there and the edge earns its keep. Six components on the\n page ground drew no edge; this one drew one, and five identical siblings\n did not. See CLAUDE.md, \"A card's ground and its edge\". */\n }\n\n\n /* Only where something can hover: a tap leaves :hover on the card it\n touched, so a touch screen kept the last card lifted until the next tap\n landed somewhere else. */\n @media (hover: hover) {\n .bd-bentoitem-box:hover {\n transform: translateY(-3px);\n /* no token: trust-panel's card lift, the same 7% black layer -- see the\n reason there. */\n box-shadow: 0px 14px 40px color-mix(in srgb, var(--color-neutral-1000) 7%, transparent);\n }\n }\n\n /* Same reasoning as trust-panel, checked separately: the shadow is the part\n that communicates hover, the 3px is the part that moves. */\n @media (prefers-reduced-motion: reduce) {\n .bd-bentoitem-box {\n transition: none;\n }\n\n .bd-bentoitem-box:hover {\n transform: none;\n }\n }\n\n .bd-bentoitem-icon-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n gap: var(--spacing-8);\n padding-bottom: var(--spacing-8);\n min-height: 48px;\n }\n\n .bd-bentoitem-icon,\n ::slotted([slot=\"icon\"]) {\n max-width: 48px;\n max-height: 48px;\n width: 48px;\n height: 48px;\n object-fit: contain;\n display: block;\n }\n\n .bd-bentoitem-title-wrap {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-4);\n overflow: hidden;\n margin-bottom: var(--spacing-8);\n width: 100%;\n }\n\n .bd-bentoitem-body {\n margin: 0 0 1em 0;\n color: var(--color-text-secondary);\n width: 100%;\n }\n\n ::slotted(bd-p) {\n width: 100%;\n }\n\n /* === TONE VARIANTS ===\n The card has no edge (see .bd-bentoitem-box), so a tone is the fill\n alone. */\n :host([tone=\"tint\"]) .bd-bentoitem-box {\n background: var(--status-brand-surface);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-box {\n /* The inverse ground the card's inverse ink is written for, running into\n the brand's darkest blue.\n no role: blue-950 is a gradient's far stop, decoration rather than a\n ground any text is measured against -- the same stop bd-cta-banner ends on. */\n background: linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-brand-950) 130%);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-title-wrap bd-h {\n color: var(--color-text-inverse);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-body {\n color: var(--color-text-inverse);\n }\n\n /* below('md'), not below('sm'). The Comparison Panel and the Trust Panel both\n take the compact inset at md and this took it at sm, so the same card was\n affording 32px at 600px wide in one component and not in another. Two of\n the three picked md; this one moved. Visible: the inset steps down 192px\n of viewport earlier than it used to. */\n @media ${unsafeCSS(below('md'))} {\n .bd-bentoitem-box {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === BRAND ===\n The homepage AI cards, as the Figma 2026_splitter frames draw them. No\n hover lift: the CTA is the card's one control, and a card that moves as a\n whole promises a link it does not have.\n\n A card narrower than 518 (every phone): a column at the compact inset --\n the copy, the art whole in a square at the card's inner width, the CTA\n across the card -- 24 apart, at the smaller corner. */\n :host([tone=\"brand\"]) .bd-bentoitem-box {\n position: relative;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-24);\n padding: var(--spacing-24);\n background: var(--color-surface-brand);\n border-radius: var(--shape-radius-2xl);\n color: var(--color-brand-on-fill);\n }\n\n /* A set of brand cards shares one row height (bento-grid.ts), so a card\n with shorter copy is taller than its content. In the column the slack\n goes above the CTA, which keeps every card's CTA on its bottom edge\n rather than leaving a gap under the shortest one.\n\n In the column the CTA also runs the card's width, as the Figma phone\n frame draws it; in the row it hugs its label. --bd-button-width is\n bd-button's width hook. It followed the screen (below md) while the\n layout followed the card, so a 518-543 card on a 550-575 screen drew the\n row with a CTA stretched across its 300 copy column. */\n @container bento-item (width < 518px) {\n :host([tone=\"brand\"]) .bd-bentoitem-cta {\n margin-block-start: auto;\n }\n\n :host([tone=\"brand\"]) .bd-bentoitem-cta ::slotted(*) {\n --bd-button-width: 100%;\n }\n }\n\n :host([tone=\"brand\"]) .bd-bentoitem-box:hover {\n transform: none;\n box-shadow: none;\n }\n\n .bd-bentoitem-media {\n position: relative;\n /* the art is square; the phone frame draws its box 302 by 308 */\n aspect-ratio: 1;\n overflow: hidden;\n border-radius: var(--shape-radius-xl);\n /* slotted motion art sizes itself from the box */\n container-type: size;\n }\n\n ::slotted([slot=\"media\"]) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n /* bd-motion-art is square and draws at its own width, so the box gives it\n one: here the square box itself, the art whole. Margins, not a translate,\n so it centres in RTL too. */\n ::slotted(bd-motion-art[slot=\"media\"]) {\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n width: 100cqh;\n height: auto;\n margin-block-start: -50cqh;\n margin-inline-start: -50cqh;\n }\n\n .bd-bentoitem-text {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-12);\n }\n\n .bd-bentoitem-brand-title {\n margin: 0;\n }\n\n .bd-bentoitem-brand-body {\n margin: 0;\n font-family: var(--typography-body-regular-fontFamily);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n color: var(--color-brand-on-fill);\n }\n\n /* A card 518 wide or wider, tablet and desktop alike, is a row at the\n card inset: the copy over the CTA in a 300 column on the near side, 24\n apart and centred down the card, and the art from the column's edge out\n to the card's, bleeding through the inset. The featured card's column is\n a share of the row instead.\n\n 518 is the narrowest card the frames draw as a row -- one of the pair at\n xl, half the 1060 column less the gap -- and it reads the card, not the\n screen: it was md, which gave a card in a narrow column at desktop the\n phone's column, and the 656 tablet card and the 518 pair the same row\n for different reasons. Measured: the column up to 511 wide (575 in\n Storybook), the row from 518, in every story. */\n @container bento-item (width >= 518px) {\n :host([tone=\"brand\"]) .bd-bentoitem-box {\n display: grid;\n /* no token: the copy's measure, the 300 every frame gives it */\n grid-template-columns: 300px minmax(0, 1fr);\n /* The copy and CTA centred down the card by the two 1fr rows around\n them, rather than by align-content: the art spans all four rows, so\n it runs the card's full height however much taller than its copy\n the shared row height makes the card. No row gap, so the empty rows\n add nothing to a card that is only as tall as its content; the 24\n between copy and CTA is the CTA's margin. */\n grid-template-rows: 1fr auto auto 1fr;\n grid-template-areas:\n \". media\"\n \"text media\"\n \"cta media\"\n \". media\";\n gap: 0;\n padding: var(--spacing-32);\n border-radius: var(--shape-radius-3xl);\n }\n\n :host([tone=\"brand\"][priority=\"featured\"]) .bd-bentoitem-box {\n /* not the column: the copy keeps to the near half of a full-row card */\n grid-template-columns: 42% minmax(0, 1fr);\n }\n\n .bd-bentoitem-text {\n grid-area: text;\n }\n\n .bd-bentoitem-cta {\n grid-area: cta;\n margin-block-start: var(--spacing-24);\n }\n\n .bd-bentoitem-media {\n grid-area: media;\n aspect-ratio: auto;\n border-radius: var(--radius-none);\n margin-block: calc(-1 * var(--spacing-32));\n margin-inline-end: calc(-1 * var(--spacing-32));\n }\n\n /* Beside the copy the art takes the card's height, so in one of the\n desktop pair -- whose art box is a tall strip -- the stack and the\n globe stay in the card beside their pills; a box wider than that, the\n featured card's, takes its own width. */\n ::slotted(bd-motion-art[slot=\"media\"]) {\n inset-inline-start: 0;\n width: max(100cqw, 100cqh);\n margin-block-start: calc(max(100cqw, 100cqh) / -2);\n margin-inline-start: 0;\n }\n }\n\n /* A card a whole tablet column wide or wider draws the art larger than its\n box, as the tablet frame does: held against the copy, centred down the\n card, and running off the card's outer edge and its top and bottom --\n never off the side its badges and pills face. 135% of the card's height\n is that frame's 434 square on a 321 card. The pair never reaches 656\n (634 at the widest page) and a card 880 wide is the desktop's, so this\n is the tablet card's rule, between the two; it was the md-to-lg band of\n the screen, where every card is the 656 column. */\n @container bento-item (656px <= width < 880px) {\n ::slotted(bd-motion-art[slot=\"media\"]) {\n width: max(100cqw, 135cqh);\n margin-block-start: calc(max(100cqw, 135cqh) / -2);\n }\n }\n\n /* A newline in the text is a line break, so a page can keep the breaks its\n copy was written with (a <br> in the authored eyebrow, heading or lead\n arrives as a newline in the property). Text only: nothing here renders\n HTML. The rule sits on a span around the text, not on bd-h or bd-p,\n whose own templates hold newlines that would break too. */\n .text,\n .bd-bentoitem-brand-body {\n white-space: pre-line;\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,okI"}
|
|
1
|
+
{"version":3,"file":"bento-item.css.js","names":["bento_item_css_default"],"sources":["../../../../src/components/bento-grid/bento-item.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below } from \"#shared/token-scales.ts\";\n\nexport default css`\n :host {\n display: block;\n height: 100%;\n box-sizing: border-box;\n }\n\n /* A brand card is the container its own layout asks: the row, the column\n and the size of the art follow the card's width (BRAND, below). Only the\n brand tone: a size container contributes nothing to its own intrinsic\n width, and the other tones are also set in rows that size them to their\n content (Foundations/Visual Alignment's card family), where one would\n collapse. width: 100% for the same reason, in the grid cell a brand card\n always sits in. */\n :host([tone=\"brand\"]) {\n width: 100%;\n container: bento-item / inline-size;\n }\n\n .bd-bentoitem-box {\n background: var(--color-surface-container);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n text-align: start;\n height: 100%;\n box-sizing: border-box;\n font-family: var(--typography-fontFamily-sans);\n min-width: 0;\n /* The same hover lift as trust-panel, now at the same scale step. */\n transition: transform var(--transition-duration-normal) var(--transition-easing-ease),\n box-shadow var(--transition-duration-normal) var(--transition-easing-ease);\n /* No edge. --color-surface-container is documented as \"the ground of a\n self-contained object -- a card, a tile, a panel -- one step off the page\n so it reads as its own object WITHOUT needing a border or a shadow to say\n so\", and this card sits on the page ground, so the tonal step is the\n separation and an edge is redundant with the role's own purpose.\n\n The rule, from the cards-and-surfaces review: a card on the page ground\n takes surface/container and no edge; a card on a tinted section takes\n surface/default plus a 1px border/container, because there is no tonal\n step available there and the edge earns its keep. Six components on the\n page ground drew no edge; this one drew one, and five identical siblings\n did not. See CLAUDE.md, \"A card's ground and its edge\". */\n }\n\n\n /* Only where something can hover: a tap leaves :hover on the card it\n touched, so a touch screen kept the last card lifted until the next tap\n landed somewhere else. */\n @media (hover: hover) {\n .bd-bentoitem-box:hover {\n transform: translateY(-3px);\n /* no token: trust-panel's card lift, the same 7% black layer -- see the\n reason there. */\n box-shadow: 0px 14px 40px color-mix(in srgb, var(--color-neutral-1000) 7%, transparent);\n }\n }\n\n /* Same reasoning as trust-panel, checked separately: the shadow is the part\n that communicates hover, the 3px is the part that moves. */\n @media (prefers-reduced-motion: reduce) {\n .bd-bentoitem-box {\n transition: none;\n }\n\n .bd-bentoitem-box:hover {\n transform: none;\n }\n }\n\n .bd-bentoitem-icon-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n gap: var(--spacing-8);\n padding-bottom: var(--spacing-8);\n min-height: 48px;\n }\n\n .bd-bentoitem-icon,\n ::slotted([slot=\"icon\"]) {\n max-width: 48px;\n max-height: 48px;\n width: 48px;\n height: 48px;\n object-fit: contain;\n display: block;\n }\n\n .bd-bentoitem-title-wrap {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-4);\n overflow: hidden;\n margin-bottom: var(--spacing-8);\n width: 100%;\n }\n\n .bd-bentoitem-body {\n margin: 0 0 1em 0;\n color: var(--color-text-secondary);\n width: 100%;\n }\n\n ::slotted(bd-p) {\n width: 100%;\n }\n\n /* === TONE VARIANTS ===\n The card has no edge (see .bd-bentoitem-box), so a tone is the fill\n alone. */\n :host([tone=\"tint\"]) .bd-bentoitem-box {\n background: var(--status-brand-surface);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-box {\n /* The inverse ground the card's inverse ink is written for, running into\n the brand's darkest blue.\n no role: blue-950 is a gradient's far stop, decoration rather than a\n ground any text is measured against -- the same stop bd-cta-banner ends on. */\n background: linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-brand-950) 130%);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-title-wrap bd-h {\n color: var(--color-text-inverse);\n }\n\n :host([tone=\"dark\"]) .bd-bentoitem-body {\n color: var(--color-text-inverse);\n }\n\n /* below('md'), not below('sm'). The Comparison Panel and the Trust Panel both\n take the compact inset at md and this took it at sm, so the same card was\n affording 32px at 600px wide in one component and not in another. Two of\n the three picked md; this one moved. Visible: the inset steps down 192px\n of viewport earlier than it used to. */\n @media ${unsafeCSS(below('md'))} {\n .bd-bentoitem-box {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === BRAND ===\n The homepage AI cards, as the Figma 2026_splitter frames draw them. No\n hover lift: the CTA is the card's one control, and a card that moves as a\n whole promises a link it does not have.\n\n A card narrower than 518 (every phone): a column at the compact inset --\n the copy, the art whole in a square at the card's inner width, the CTA\n across the card -- 24 apart, at the smaller corner. */\n :host([tone=\"brand\"]) .bd-bentoitem-box {\n position: relative;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-24);\n padding: var(--spacing-24);\n background: var(--color-surface-brand);\n border-radius: var(--shape-radius-2xl);\n color: var(--color-brand-on-fill);\n }\n\n /* A set of brand cards shares one row height (bento-grid.ts), so a card\n with shorter copy is taller than its content. In the column the slack\n goes above the CTA, which keeps every card's CTA on its bottom edge\n rather than leaving a gap under the shortest one.\n\n In the column the CTA also runs the card's width, as the Figma phone\n frame draws it; in the row it hugs its label. --bd-button-width is\n bd-button's width hook. It followed the screen (below md) while the\n layout followed the card, so a 518-543 card on a 550-575 screen drew the\n row with a CTA stretched across its 300 copy column. */\n @container bento-item (width < 518px) {\n :host([tone=\"brand\"]) .bd-bentoitem-cta {\n margin-block-start: auto;\n }\n\n :host([tone=\"brand\"]) .bd-bentoitem-cta ::slotted(*) {\n --bd-button-width: 100%;\n }\n }\n\n :host([tone=\"brand\"]) .bd-bentoitem-box:hover {\n transform: none;\n box-shadow: none;\n }\n\n .bd-bentoitem-media {\n position: relative;\n /* the art is square; the phone frame draws its box 302 by 308 */\n aspect-ratio: 1;\n overflow: hidden;\n border-radius: var(--shape-radius-xl);\n /* slotted motion art sizes itself from the box */\n container-type: size;\n }\n\n ::slotted([slot=\"media\"]) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n /* bd-motion-art is square and draws at its own width, so the box gives it\n one: here the square box itself, the art whole. Margins, not a translate,\n so it centres in RTL too. */\n ::slotted(bd-motion-art[slot=\"media\"]) {\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n width: 100cqh;\n height: auto;\n margin-block-start: -50cqh;\n margin-inline-start: -50cqh;\n }\n\n .bd-bentoitem-text {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-12);\n }\n\n .bd-bentoitem-brand-title {\n margin: 0;\n }\n\n .bd-bentoitem-brand-body {\n margin: 0;\n font-family: var(--typography-body-regular-fontFamily);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n color: var(--color-brand-on-fill);\n }\n\n /* A card 518 wide or wider, tablet and desktop alike, is a row at the\n card inset: the copy over the CTA in a 300 column on the near side, 24\n apart and centred down the card, and the art from the column's edge out\n to the card's, bleeding through the inset. The featured card's column is\n a share of the row instead.\n\n 518 is the narrowest card the frames draw as a row -- one of the pair at\n xl, half the 1060 column less the gap -- and it reads the card, not the\n screen: it was md, which gave a card in a narrow column at desktop the\n phone's column, and the 656 tablet card and the 518 pair the same row\n for different reasons. Measured: the column up to 511 wide (575 in\n Storybook), the row from 518, in every story. */\n @container bento-item (width >= 518px) {\n :host([tone=\"brand\"]) .bd-bentoitem-box {\n display: grid;\n /* no token: the copy's measure, the 300 every frame gives it */\n grid-template-columns: 300px minmax(0, 1fr);\n /* The copy and CTA centred down the card by the two 1fr rows around\n them, rather than by align-content: the art spans all four rows, so\n it runs the card's full height however much taller than its copy\n the shared row height makes the card. No row gap, so the empty rows\n add nothing to a card that is only as tall as its content; the 24\n between copy and CTA is the CTA's margin. */\n grid-template-rows: 1fr auto auto 1fr;\n grid-template-areas:\n \". media\"\n \"text media\"\n \"cta media\"\n \". media\";\n gap: 0;\n padding: var(--spacing-32);\n border-radius: var(--shape-radius-3xl);\n }\n\n :host([tone=\"brand\"][priority=\"featured\"]) .bd-bentoitem-box {\n /* not the column: the copy keeps to the near half of a full-row card */\n grid-template-columns: 42% minmax(0, 1fr);\n }\n\n .bd-bentoitem-text {\n grid-area: text;\n }\n\n .bd-bentoitem-cta {\n grid-area: cta;\n margin-block-start: var(--spacing-24);\n }\n\n .bd-bentoitem-media {\n grid-area: media;\n aspect-ratio: auto;\n border-radius: var(--radius-none);\n margin-block: calc(-1 * var(--spacing-32));\n margin-inline-end: calc(-1 * var(--spacing-32));\n }\n\n /* Beside the copy the art takes the card's height, so in one of the\n desktop pair -- whose art box is a tall strip -- the stack and the\n globe stay in the card beside their pills; a box wider than that, the\n featured card's, takes its own width.\n\n The card's height is its copy's, and a longer title or body made the\n art grow with it -- 599 square in a 599 card for a title three lines\n longer, its pills pushed off the card's edge. The height the art\n follows is therefore held to the card the frames draw, 391 with the\n homepage's copy: up to it the art is what it was, past it the art\n keeps that size and stays centred down the taller card.\n no token: the frames' card height, a dimension past the scale's 64 */\n ::slotted(bd-motion-art[slot=\"media\"]) {\n --bd-bento-art: max(100cqw, min(100cqh, 24.5rem));\n inset-inline-start: 0;\n width: var(--bd-bento-art);\n margin-block-start: calc(var(--bd-bento-art) / -2);\n margin-inline-start: 0;\n }\n }\n\n /* A card a whole tablet column wide or wider draws the art larger than its\n box, as the tablet frame does: held against the copy, centred down the\n card, and running off the card's outer edge and its top and bottom --\n never off the side its badges and pills face. 135% of the card's height\n is that frame's 434 square on a 321 card. The pair never reaches 656\n (634 at the widest page) and a card 880 wide is the desktop's, so this\n is the tablet card's rule, between the two; it was the md-to-lg band of\n the screen, where every card is the 656 column. */\n @container bento-item (656px <= width < 880px) {\n /* held, as above, to what the frame's card gives it: 135% of the 424\n its copy makes it here, 572 square.\n no token: the frame's art, a dimension past the scale's 64 */\n ::slotted(bd-motion-art[slot=\"media\"]) {\n --bd-bento-art: max(100cqw, min(135cqh, 36rem));\n }\n }\n\n /* A newline in the text is a line break, so a page can keep the breaks its\n copy was written with (a <br> in the authored eyebrow, heading or lead\n arrives as a newline in the property). Text only: nothing here renders\n HTML. The rule sits on a span around the text, not on bd-h or bd-p,\n whose own templates hold newlines that would break too. */\n .text,\n .bd-bentoitem-brand-body {\n white-space: pre-line;\n }\n`;\n"],"mappings":"A,4DAGA,IAAAA,EAAe,CAAG,gmI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{display:block}.grid{--grid-cols-active:var(--grid-cols);--grid-gap-active:var(--grid-gap,var(--spacing-24));grid-template-columns:repeat(var(--grid-cols-active), 1fr);place-items:stretch start;gap:var(--grid-gap-active);display:grid}@media (width>=576px){.grid{--grid-cols-active:var(--grid-cols-sm);--grid-gap-active:var(--grid-gap-sm,var(--spacing-24))}}@media (width>=768px){.grid{--grid-cols-active:var(--grid-cols-md);--grid-gap-active:var(--grid-gap-md,var(--spacing-24))}}@media (width>=992px){.grid{--grid-cols-active:var(--grid-cols-lg);--grid-gap-active:var(--grid-gap-lg,var(--spacing-24))}}.grid.grid--fit{grid-template-columns:repeat(auto-fill, minmax(min(100%, max(var(--grid-min-col-width), (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active))), 1fr))}`;export{t as default};
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{display:block}.grid{--grid-cols-active:var(--grid-cols);--grid-gap-active:var(--grid-gap,var(--spacing-24));grid-template-columns:repeat(var(--grid-cols-active), 1fr);place-items:stretch start;gap:var(--grid-gap-active);display:grid}@media (width>=576px){.grid{--grid-cols-active:var(--grid-cols-sm);--grid-gap-active:var(--grid-gap-sm,var(--spacing-24))}}@media (width>=768px){.grid{--grid-cols-active:var(--grid-cols-md);--grid-gap-active:var(--grid-gap-md,var(--spacing-24))}}@media (width>=992px){.grid{--grid-cols-active:var(--grid-cols-lg);--grid-gap-active:var(--grid-gap-lg,var(--spacing-24))}}.grid.grid--fit{grid-template-columns:repeat(auto-fill, minmax(min(100%, max(var(--grid-min-col-width), (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active))), 1fr))}.grid--rows{row-gap:0;margin-block-end:calc(-1 * var(--grid-gap-active))}.grid--rows ::slotted(*){grid-template-rows:subgrid;grid-row:span var(--grid-item-rows);margin-block-end:var(--grid-gap-active);display:grid}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=grid.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.css.js","names":["grid_css_default"],"sources":["../../../../src/components/grid/grid.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* The column steps follow the screen: cols, then cols-sm, cols-md and\n cols-lg from 576, 768 and 992 -- the sm, md and lg every other breakpoint\n in this package means. A grid's steps are a page's structure, and that is\n a question about the screen; it can answer differently at the same width\n in two places -- a 492 grid across a 600 screen and a 518 one beside the\n stat highlight at 1280 hold different layouts on the homepage.\n\n 2.6.0 stepped by the grid's own width instead, at the page column's widths\n (492, 656, 880). A grid as wide as the page stepped where it always had; a\n narrower one never reached its upper steps, so the homepage's stat tiles,\n two across beside the highlight since they were drawn, stacked one a row\n on every desktop, and bd-footer opted its grid out to keep its layout.\n Nothing that was measured gained from it, so the steps read the screen\n again.\n\n What reading its own width was for -- a 3-column step taken at a 992\n screen gave a 360 column 104px cells -- is min-col-width's: each step's\n count becomes the most columns there will be, and a column is never\n narrower than min-col-width, so a grid in a narrow column takes fewer,\n wider ones, wherever it is laid out. It asks the cells, which is the\n question a collection has, where the page's widths could only be answered\n by a grid as wide as the page. */\nexport default css`\n :host {\n display: block;\n }\n\n /* Each step below says only which columns and which gap apply; they are\n laid out here, once, so that min-col-width reads the same two. */\n .grid {\n display: grid;\n align-items: stretch;\n justify-items: start;\n --grid-cols-active: var(--grid-cols);\n --grid-gap-active: var(--grid-gap, var(--spacing-24));\n grid-template-columns: repeat(var(--grid-cols-active), 1fr);\n gap: var(--grid-gap-active);\n }\n\n /* The columns and the gap step together; a gap left unset carries the\n one below it up. */\n @media ${unsafeCSS(above('sm'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-sm);\n --grid-gap-active: var(--grid-gap-sm, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('md'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-md);\n --grid-gap-active: var(--grid-gap-md, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('lg'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-lg);\n --grid-gap-active: var(--grid-gap-lg, var(--spacing-24));\n }\n }\n\n /* min-col-width: as many columns as fit at min-col-width, up to the\n step's count. auto-fill takes as many as fit; the second term of max()\n is what holds it to the count -- a column at least the grid less the\n count's gaps, over the count, leaves no room for one more, with a gap\n to spare so rounding cannot drop one either; and min(100%, ...) keeps\n one column inside a grid narrower than the floor. The columns then\n share what is left, as 1fr always has. */\n .grid.grid--fit {\n grid-template-columns: repeat(auto-fill, minmax(min(100%, max(\n var(--grid-min-col-width),\n (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active)\n )), 1fr));\n }\n`;\n"],"mappings":"A,4DAyBA,IAAAA,EAAe,CAAG,
|
|
1
|
+
{"version":3,"file":"grid.css.js","names":["grid_css_default"],"sources":["../../../../src/components/grid/grid.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* The column steps follow the screen: cols, then cols-sm, cols-md and\n cols-lg from 576, 768 and 992 -- the sm, md and lg every other breakpoint\n in this package means. A grid's steps are a page's structure, and that is\n a question about the screen; it can answer differently at the same width\n in two places -- a 492 grid across a 600 screen and a 518 one beside the\n stat highlight at 1280 hold different layouts on the homepage.\n\n 2.6.0 stepped by the grid's own width instead, at the page column's widths\n (492, 656, 880). A grid as wide as the page stepped where it always had; a\n narrower one never reached its upper steps, so the homepage's stat tiles,\n two across beside the highlight since they were drawn, stacked one a row\n on every desktop, and bd-footer opted its grid out to keep its layout.\n Nothing that was measured gained from it, so the steps read the screen\n again.\n\n What reading its own width was for -- a 3-column step taken at a 992\n screen gave a 360 column 104px cells -- is min-col-width's: each step's\n count becomes the most columns there will be, and a column is never\n narrower than min-col-width, so a grid in a narrow column takes fewer,\n wider ones, wherever it is laid out. It asks the cells, which is the\n question a collection has, where the page's widths could only be answered\n by a grid as wide as the page. */\nexport default css`\n :host {\n display: block;\n }\n\n /* Each step below says only which columns and which gap apply; they are\n laid out here, once, so that min-col-width reads the same two. */\n .grid {\n display: grid;\n align-items: stretch;\n justify-items: start;\n --grid-cols-active: var(--grid-cols);\n --grid-gap-active: var(--grid-gap, var(--spacing-24));\n grid-template-columns: repeat(var(--grid-cols-active), 1fr);\n gap: var(--grid-gap-active);\n }\n\n /* The columns and the gap step together; a gap left unset carries the\n one below it up. */\n @media ${unsafeCSS(above('sm'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-sm);\n --grid-gap-active: var(--grid-gap-sm, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('md'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-md);\n --grid-gap-active: var(--grid-gap-md, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('lg'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-lg);\n --grid-gap-active: var(--grid-gap-lg, var(--spacing-24));\n }\n }\n\n /* min-col-width: as many columns as fit at min-col-width, up to the\n step's count. auto-fill takes as many as fit; the second term of max()\n is what holds it to the count -- a column at least the grid less the\n count's gaps, over the count, leaves no room for one more, with a gap\n to spare so rounding cannot drop one either; and min(100%, ...) keeps\n one column inside a grid narrower than the floor. The columns then\n share what is left, as 1fr always has. */\n .grid.grid--fit {\n grid-template-columns: repeat(auto-fill, minmax(min(100%, max(\n var(--grid-min-col-width),\n (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active)\n )), 1fr));\n }\n\n /* item-rows: every item spans that many of the grid's rows as a subgrid,\n so its parts sit in rows it shares with the items beside it and line\n up across them, however each one's text wraps. The gap inside an item\n is the item's own row-gap.\n\n The track's row gap is 0 and the items are spaced by a margin under\n each one instead, the grid's gap, which the grid hands back under its\n last row: a subgrid's row-gap differing from its grid's is laid out by\n spreading the difference over the item's edges, so the gap between two\n items and the one inside each came out at neither value (40 and 8\n measured 46 and 14 in Chromium). bd-card's track does the same.\n\n A subgrid cannot be a size container -- containment makes it a grid of\n its own -- so an item laid out by its own width (container-type) does\n not line up here. A light-DOM item's own display or margin rule beats\n these, since the page's styles win over a shadow root's ::slotted(). */\n .grid--rows {\n row-gap: 0;\n margin-block-end: calc(-1 * var(--grid-gap-active));\n }\n\n .grid--rows ::slotted(*) {\n display: grid;\n grid-template-rows: subgrid;\n grid-row: span var(--grid-item-rows);\n margin-block-end: var(--grid-gap-active);\n }\n`;\n"],"mappings":"A,4DAyBA,IAAAA,EAAe,CAAG,8/B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{space as t}from"../shared/token-scales.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./grid.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends i{constructor(...e){super(...e),this.cols=1,this.colsSm=1,this.colsMd=2,this.colsLg=3,this.gap=`md`,this.gapSm=``,this.gapMd=``,this.gapLg=``,this.align=`stretch`,this.justify=`start`,this.padding=`none`,this.minColWidth=0}static{this.styles=[r]}render(){return a`
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{space as t}from"../shared/token-scales.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./grid.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends i{constructor(...e){super(...e),this.cols=1,this.colsSm=1,this.colsMd=2,this.colsLg=3,this.gap=`md`,this.gapSm=``,this.gapMd=``,this.gapLg=``,this.align=`stretch`,this.justify=`start`,this.padding=`none`,this.minColWidth=0,this.itemRows=0}static{this.styles=[r]}render(){return a`
|
|
2
2
|
<div
|
|
3
|
-
class="grid ${this.minColWidth>0?`grid--fit`:``}"
|
|
3
|
+
class="grid ${this.minColWidth>0?`grid--fit`:``} ${this.itemRows>0?`grid--rows`:``}"
|
|
4
4
|
style="
|
|
5
5
|
--grid-cols: ${this.cols};
|
|
6
6
|
--grid-cols-sm: ${this.colsSm};
|
|
@@ -14,9 +14,10 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
14
14
|
justify-items: ${this.justify};
|
|
15
15
|
padding: ${t(this.padding)};
|
|
16
16
|
${this.minColWidth>0?`--grid-min-col-width: ${this.minColWidth/16}rem;`:``}
|
|
17
|
+
${this.itemRows>0?`--grid-item-rows: ${Math.round(this.itemRows)};`:``}
|
|
17
18
|
"
|
|
18
19
|
>
|
|
19
20
|
<slot></slot>
|
|
20
21
|
</div>
|
|
21
|
-
`}};n([o({type:Number})],s.prototype,`cols`,void 0),n([o({type:Number,attribute:`cols-sm`})],s.prototype,`colsSm`,void 0),n([o({type:Number,attribute:`cols-md`})],s.prototype,`colsMd`,void 0),n([o({type:Number,attribute:`cols-lg`})],s.prototype,`colsLg`,void 0),n([o({type:String})],s.prototype,`gap`,void 0),n([o({type:String,attribute:`gap-sm`})],s.prototype,`gapSm`,void 0),n([o({type:String,attribute:`gap-md`})],s.prototype,`gapMd`,void 0),n([o({type:String,attribute:`gap-lg`})],s.prototype,`gapLg`,void 0),n([o({type:String})],s.prototype,`align`,void 0),n([o({type:String})],s.prototype,`justify`,void 0),n([o({type:String})],s.prototype,`padding`,void 0),n([o({type:Number,attribute:`min-col-width`})],s.prototype,`minColWidth`,void 0),s=n([e(`bd-grid`)],s);
|
|
22
|
+
`}};n([o({type:Number})],s.prototype,`cols`,void 0),n([o({type:Number,attribute:`cols-sm`})],s.prototype,`colsSm`,void 0),n([o({type:Number,attribute:`cols-md`})],s.prototype,`colsMd`,void 0),n([o({type:Number,attribute:`cols-lg`})],s.prototype,`colsLg`,void 0),n([o({type:String})],s.prototype,`gap`,void 0),n([o({type:String,attribute:`gap-sm`})],s.prototype,`gapSm`,void 0),n([o({type:String,attribute:`gap-md`})],s.prototype,`gapMd`,void 0),n([o({type:String,attribute:`gap-lg`})],s.prototype,`gapLg`,void 0),n([o({type:String})],s.prototype,`align`,void 0),n([o({type:String})],s.prototype,`justify`,void 0),n([o({type:String})],s.prototype,`padding`,void 0),n([o({type:Number,attribute:`min-col-width`})],s.prototype,`minColWidth`,void 0),n([o({type:Number,attribute:`item-rows`})],s.prototype,`itemRows`,void 0),s=n([e(`bd-grid`)],s);
|
|
22
23
|
//# sourceMappingURL=grid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","names":["gridCSS","_decorate","__decorate","grid_css_default","BdGrid","LitElement","_args","space","property","defineElement"],"sources":["../../../../src/components/grid/grid.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 gridCSS from \"#components/grid/grid.css.ts\";\nimport { space, type SpaceName } from \"#shared/token-scales.ts\";\n\ntype Align = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype Justify = \"start\" | \"center\" | \"end\" | \"stretch\";\n\n@defineElement(\"bd-grid\")\nclass BdGrid extends LitElement {\n static styles = [gridCSS];\n\n /* The three responsive properties name their attribute, and that is the\n whole fix. Lit derives an observed attribute by LOWERCASING the property\n name -- not by dash-casing it -- so `colsSm` observed `colssm` and the\n `cols-sm` this component documents was not an attribute it had ever been\n listening for. observedAttributes read\n [\"cols\",\"colssm\",\"colsmd\",\"colslg\",\"gap\",\"align\",\"justify\",\"padding\"];\n `cols` worked because it is one word, which is why the failure looked like\n a responsive bug rather than a naming one.\n\n So every dash-cased column attribute in the package was inert and the\n properties kept their constructor defaults 1/1/2/3. Those defaults sit one\n step under the 2/3/4 the Responsive columns story asks for, which is why\n the rendered grid looked merely one breakpoint late instead of ignoring\n the markup entirely. Measured across five stories x six viewports, 25 of\n 66 readings rendered a column count nobody had asked for:\n\n Layout/Grid \"Single column\" cols-lg=\"1\" -> 3 columns at 992 and 1440\n Layout/Grid \"Gap scale\" cols-sm=\"3\" -> 1 column at 576-767\n Layout/Grid \"Alignment\" cols-sm=\"3\" -> 1 column at 576-767\n bd-footer quick links cols-lg=\"2\" -> 3 columns at 992 and 1440\n\n The last one is not a story: footer.ts writes cols-md/cols-lg in its own\n shadow root, so a shipped component's layout was running on the defaults\n too.\n\n Naming the attribute is what this package already does everywhere else --\n 94 explicit dash-cased mappings across 40 files, `heading-level`,\n `visual-level`, `max-columns`, `min-card-width` -- and it is what the\n component's own documentation promises: grid.stories.ts reads \"`cols`\n below 576, then `cols-sm`, `cols-md` at 768 and `cols-lg` at 992\", and its\n argTypes map colsSm to the control name \"cols-sm\". The code was the only\n part that disagreed.\n\n An explicit name replaces the lowercase one rather than adding to it, so\n `colssm` stops being observed. Nothing reads it: grepped for colssm,\n colsmd, colslg and fallbacksrc across src, schemas and docs -- zero\n occurrences outside these declarations. The responsive behaviour itself is\n untouched; the media queries in grid.css.ts and the 576/768/992 steps are\n the ones that were already there, and this adds no smartness to a layout\n primitive -- it only lets the primitive hear what it is told. */\n @property({ type: Number })\n cols = 1; // default cols\n @property({ type: Number, attribute: \"cols-sm\" })\n colsSm = 1; // optional cols on small screens\n @property({ type: Number, attribute: \"cols-md\" })\n colsMd = 2; // optional cols on medium\n @property({ type: Number, attribute: \"cols-lg\" })\n colsLg = 3; // optional cols on large\n @property({ type: String })\n gap: SpaceName = \"md\"; // e.g., 'sm', 'md'\n @property({ type: String, attribute: \"gap-sm\" })\n gapSm: SpaceName | \"\" = \"\"; // optional gap from sm; unset keeps the step below\n @property({ type: String, attribute: \"gap-md\" })\n gapMd: SpaceName | \"\" = \"\"; // optional gap from md\n @property({ type: String, attribute: \"gap-lg\" })\n gapLg: SpaceName | \"\" = \"\"; // optional gap from lg\n @property({ type: String })\n align: Align = \"stretch\"; // start, center, end, stretch\n @property({ type: String })\n justify: Justify = \"start\"; // start, center, end, stretch: justify-items takes no space-between\n @property({ type: String })\n padding: SpaceName = \"none\"; // e.g., 'none', 'sm', 'md', 'lg'\n /* The narrowest a column may be. Unset, each step's count is the\n columns there are; set, it is the most there will be, and the grid\n takes fewer, wider ones where that many would not fit (grid.css.ts).\n A number of px at the default text size, laid out in rem: a cell holds\n text, so its floor grows with the reader's text, as the gaps do. */\n @property({ type: Number, attribute: \"min-col-width\" })\n minColWidth = 0;\n\n render() {\n return html`\n <div\n class=\"grid ${this.minColWidth > 0 ? \"grid--fit\" : \"\"}\"\n style=\"\n --grid-cols: ${this.cols};\n --grid-cols-sm: ${this.colsSm};\n --grid-cols-md: ${this.colsMd};\n --grid-cols-lg: ${this.colsLg};\n ${space(this.gap) ? `--grid-gap: ${space(this.gap)};` : \"\"}\n --grid-gap-sm: ${space(this.gapSm) || \"var(--grid-gap)\"};\n --grid-gap-md: ${space(this.gapMd) || \"var(--grid-gap-sm)\"};\n --grid-gap-lg: ${space(this.gapLg) || \"var(--grid-gap-md)\"};\n align-items: ${this.align};\n justify-items: ${this.justify};\n padding: ${space(this.padding)};\n ${this.minColWidth > 0 ? `--grid-min-col-width: ${this.minColWidth / 16}rem;` : \"\"}\n \"\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-grid\": BdGrid;\n }\n}\n"],"mappings":"A,4UAWA,IACMI,EADN,cACqBC,CAAW,C,8BA4CvB,KAAA,KAAA,EAEE,KAAA,OAAA,EAEA,KAAA,OAAA,EAEA,KAAA,OAAA,EAEQ,KAAA,IAAA,KAEO,KAAA,MAAA,GAEA,KAAA,MAAA,GAEA,KAAA,MAAA,GAET,KAAA,MAAA,UAEI,KAAA,QAAA,QAEE,KAAA,QAAA,OAOP,KAAA,YAAA,C,
|
|
1
|
+
{"version":3,"file":"grid.js","names":["gridCSS","_decorate","__decorate","grid_css_default","BdGrid","LitElement","_args","space","property","defineElement"],"sources":["../../../../src/components/grid/grid.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 gridCSS from \"#components/grid/grid.css.ts\";\nimport { space, type SpaceName } from \"#shared/token-scales.ts\";\n\ntype Align = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype Justify = \"start\" | \"center\" | \"end\" | \"stretch\";\n\n@defineElement(\"bd-grid\")\nclass BdGrid extends LitElement {\n static styles = [gridCSS];\n\n /* The three responsive properties name their attribute, and that is the\n whole fix. Lit derives an observed attribute by LOWERCASING the property\n name -- not by dash-casing it -- so `colsSm` observed `colssm` and the\n `cols-sm` this component documents was not an attribute it had ever been\n listening for. observedAttributes read\n [\"cols\",\"colssm\",\"colsmd\",\"colslg\",\"gap\",\"align\",\"justify\",\"padding\"];\n `cols` worked because it is one word, which is why the failure looked like\n a responsive bug rather than a naming one.\n\n So every dash-cased column attribute in the package was inert and the\n properties kept their constructor defaults 1/1/2/3. Those defaults sit one\n step under the 2/3/4 the Responsive columns story asks for, which is why\n the rendered grid looked merely one breakpoint late instead of ignoring\n the markup entirely. Measured across five stories x six viewports, 25 of\n 66 readings rendered a column count nobody had asked for:\n\n Layout/Grid \"Single column\" cols-lg=\"1\" -> 3 columns at 992 and 1440\n Layout/Grid \"Gap scale\" cols-sm=\"3\" -> 1 column at 576-767\n Layout/Grid \"Alignment\" cols-sm=\"3\" -> 1 column at 576-767\n bd-footer quick links cols-lg=\"2\" -> 3 columns at 992 and 1440\n\n The last one is not a story: footer.ts writes cols-md/cols-lg in its own\n shadow root, so a shipped component's layout was running on the defaults\n too.\n\n Naming the attribute is what this package already does everywhere else --\n 94 explicit dash-cased mappings across 40 files, `heading-level`,\n `visual-level`, `max-columns`, `min-card-width` -- and it is what the\n component's own documentation promises: grid.stories.ts reads \"`cols`\n below 576, then `cols-sm`, `cols-md` at 768 and `cols-lg` at 992\", and its\n argTypes map colsSm to the control name \"cols-sm\". The code was the only\n part that disagreed.\n\n An explicit name replaces the lowercase one rather than adding to it, so\n `colssm` stops being observed. Nothing reads it: grepped for colssm,\n colsmd, colslg and fallbacksrc across src, schemas and docs -- zero\n occurrences outside these declarations. The responsive behaviour itself is\n untouched; the media queries in grid.css.ts and the 576/768/992 steps are\n the ones that were already there, and this adds no smartness to a layout\n primitive -- it only lets the primitive hear what it is told. */\n @property({ type: Number })\n cols = 1; // default cols\n @property({ type: Number, attribute: \"cols-sm\" })\n colsSm = 1; // optional cols on small screens\n @property({ type: Number, attribute: \"cols-md\" })\n colsMd = 2; // optional cols on medium\n @property({ type: Number, attribute: \"cols-lg\" })\n colsLg = 3; // optional cols on large\n @property({ type: String })\n gap: SpaceName = \"md\"; // e.g., 'sm', 'md'\n @property({ type: String, attribute: \"gap-sm\" })\n gapSm: SpaceName | \"\" = \"\"; // optional gap from sm; unset keeps the step below\n @property({ type: String, attribute: \"gap-md\" })\n gapMd: SpaceName | \"\" = \"\"; // optional gap from md\n @property({ type: String, attribute: \"gap-lg\" })\n gapLg: SpaceName | \"\" = \"\"; // optional gap from lg\n @property({ type: String })\n align: Align = \"stretch\"; // start, center, end, stretch\n @property({ type: String })\n justify: Justify = \"start\"; // start, center, end, stretch: justify-items takes no space-between\n @property({ type: String })\n padding: SpaceName = \"none\"; // e.g., 'none', 'sm', 'md', 'lg'\n /* The narrowest a column may be. Unset, each step's count is the\n columns there are; set, it is the most there will be, and the grid\n takes fewer, wider ones where that many would not fit (grid.css.ts).\n A number of px at the default text size, laid out in rem: a cell holds\n text, so its floor grows with the reader's text, as the gaps do. */\n @property({ type: Number, attribute: \"min-col-width\" })\n minColWidth = 0;\n /* Rows each item shares with the items beside it. Unset, an item is one\n cell and lays itself out; set, every item is a subgrid of that many of\n the grid's rows (grid.css.ts), so the parts of one item -- a link over\n its line, a card's title over its copy -- line up with the same parts of\n its neighbours however differently their text wraps. The item places its\n parts in those rows; one that leaves a row empty leaves it at the height\n its neighbours give it. */\n @property({ type: Number, attribute: \"item-rows\" })\n itemRows = 0;\n\n render() {\n return html`\n <div\n class=\"grid ${this.minColWidth > 0 ? \"grid--fit\" : \"\"} ${this.itemRows > 0 ? \"grid--rows\" : \"\"}\"\n style=\"\n --grid-cols: ${this.cols};\n --grid-cols-sm: ${this.colsSm};\n --grid-cols-md: ${this.colsMd};\n --grid-cols-lg: ${this.colsLg};\n ${space(this.gap) ? `--grid-gap: ${space(this.gap)};` : \"\"}\n --grid-gap-sm: ${space(this.gapSm) || \"var(--grid-gap)\"};\n --grid-gap-md: ${space(this.gapMd) || \"var(--grid-gap-sm)\"};\n --grid-gap-lg: ${space(this.gapLg) || \"var(--grid-gap-md)\"};\n align-items: ${this.align};\n justify-items: ${this.justify};\n padding: ${space(this.padding)};\n ${this.minColWidth > 0 ? `--grid-min-col-width: ${this.minColWidth / 16}rem;` : \"\"}\n ${this.itemRows > 0 ? `--grid-item-rows: ${Math.round(this.itemRows)};` : \"\"}\n \"\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-grid\": BdGrid;\n }\n}\n"],"mappings":"A,4UAWA,IACMI,EADN,cACqBC,CAAW,C,8BA4CvB,KAAA,KAAA,EAEE,KAAA,OAAA,EAEA,KAAA,OAAA,EAEA,KAAA,OAAA,EAEQ,KAAA,IAAA,KAEO,KAAA,MAAA,GAEA,KAAA,MAAA,GAEA,KAAA,MAAA,GAET,KAAA,MAAA,UAEI,KAAA,QAAA,QAEE,KAAA,QAAA,OAOP,KAAA,YAAA,EASH,KAAA,SAAA,C,QA/EK,KAAA,OAAA,CAACL,CAAO,C,CAiFxB,QAAS,CACP,MAAO,EAAI;;sBAEO,KAAK,YAAc,EAAI,YAAc,GAAG,GAAG,KAAK,SAAW,EAAI,aAAe,GAAG;;yBAE9E,KAAK,KAAK;4BACP,KAAK,OAAO;4BACZ,KAAK,OAAO;4BACZ,KAAK,OAAO;YAC5BO,EAAM,KAAK,GAAG,EAAI,eAAeA,EAAM,KAAK,GAAG,EAAE,GAAK,GAAG;2BAC1CA,EAAM,KAAK,KAAK,GAAK,kBAAkB;2BACvCA,EAAM,KAAK,KAAK,GAAK,qBAAqB;2BAC1CA,EAAM,KAAK,KAAK,GAAK,qBAAqB;yBAC5C,KAAK,MAAM;2BACT,KAAK,QAAQ;qBACnBA,EAAM,KAAK,OAAO,EAAE;YAC7B,KAAK,YAAc,EAAI,yBAAyB,KAAK,YAAc,GAAG,MAAQ,GAAG;YACjF,KAAK,SAAW,EAAI,qBAAqB,KAAK,MAAM,KAAK,QAAQ,EAAE,GAAK,GAAG;;;;;KAMrF,CACF,EA/DGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAOzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAJ,EAAA,UAAA,cAAA,IAAA,EAAA,EASrDH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAJ,EAAA,UAAA,WAAA,IAAA,EAAA,EAhFnD,EAAAH,EAAA,CAAAQ,EAAc,SAAS,CAAA,EAAAL,CAAA"}
|
|
@@ -30,7 +30,7 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
30
30
|
<div class="bd-ensemble column">
|
|
31
31
|
<div class="copy">
|
|
32
32
|
${this.eyebrow?s`<p class="eyebrow">${this.eyebrow}</p>`:c}
|
|
33
|
-
|
|
33
|
+
${this.heading?s`<h1 class="heading">${this.heading}</h1>`:c}
|
|
34
34
|
${this.lead?s`<p class="lead">${this.lead}</p>`:c}
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.js","names":["_decorate","__decorate","Hero","LitElement","ensembleCSS","heroCSS","MediaQueryController","REDUCED_MOTION","reduced","changed","video","el","nothing","moving","property","state","defineElement"],"sources":["../../../../src/components/hero/hero.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { MediaQueryController, REDUCED_MOTION } from \"#shared/controller.media-query.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/icons/pause-icon.ts\";\nimport \"#components/icons/play-icon.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { heroCSS } from \"./hero.css.ts\";\n\n/**\n * The homepage hero: a brand band with a full-bleed looping video fading into\n * the brand at the bottom, an eyebrow, the page's one h1 and a lead. Drawn in\n * the foundation Figma file as Hero.\n *\n * Desktop sets the copy left over the video, and a faint brand haze spills\n * out under the band, behind the cards (the desktop frame's glow); below lg\n * the video sits on top and the copy is centred under it.\n * Slot `cards` takes the audience cards:\n * from lg they overlap the band's lower edge, below it they follow the band\n * on the same brand ground, as the phone and tablet frames draw them.\n *\n * Not bd-header. That is the white two-column product hero with a price; this\n * one sells nothing and carries no CTA.\n *\n * Slot `media` takes animated art in the video's place: the homepage slots\n * <bd-motion-art object=\"brand-surface\">. Slotted, it replaces the video and\n * the poster, and it is centred in the stage below lg and on the sphere's\n * line, right of the copy, from lg.\n *\n * The video loops on its own, so there is a pause button (WCAG 2.2.2). Under\n * prefers-reduced-motion it never plays: the poster stands still in its place.\n * Without a video-src the poster is all there is, and so is no button. The\n * slotted art takes no button: it holds a still frame of its own under\n * prefers-reduced-motion, and stops with `paused` when a page sets it.\n */\n@defineElement(\"bd-hero\")\nexport class Hero extends LitElement {\n static styles = [ensembleCSS, heroCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n @property({ type: String, attribute: \"video-src\" })\n videoSrc = \"\";\n @property({ type: String })\n poster = \"\";\n @property({ type: Boolean, reflect: true })\n paused = false;\n @property({ type: String, attribute: \"pause-label\" })\n pauseLabel = \"Pause the background video\";\n @property({ type: String, attribute: \"play-label\" })\n playLabel = \"Play the background video\";\n @state()\n _reduced = false;\n @state()\n _hasCards = false;\n @state()\n _hasMedia = false;\n\n _media: Element[] | undefined;\n\n constructor() {\n super();\n new MediaQueryController(this, REDUCED_MOTION, reduced => { this._reduced = reduced; });\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has(\"paused\") || changed.has(\"_hasMedia\")) this._syncMedia();\n if (!changed.has(\"paused\") && !changed.has(\"_reduced\") && !changed.has(\"videoSrc\")) return;\n const video = this.renderRoot.querySelector(\"video\");\n if (!video) return;\n if (this.paused || this._reduced) video.pause();\n else video.play()?.catch(() => { /* autoplay refused: the poster stays */ });\n }\n\n _toggle() {\n this.paused = !this.paused;\n }\n\n _onCardsSlot(e: Event) {\n this._hasCards = (e.target as HTMLSlotElement).assignedElements({ flatten: true }).length > 0;\n }\n\n _onMediaSlot(e: Event) {\n this._media = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\n this._hasMedia = this._media.length > 0;\n this._syncMedia();\n }\n\n /* the slotted art stops with the hero's `paused` */\n _syncMedia() {\n for (const el of this._media ?? []) if (\"paused\" in el) el.paused = this.paused;\n }\n\n _renderMedia() {\n if (this._hasMedia) return nothing;\n /* preload=\"none\": under reduced motion, or paused, the video never plays\n and the poster is all there is, so nothing else is fetched for it. */\n if (this.videoSrc) {\n return html`<video\n class=\"media\"\n src=\"${this.videoSrc}\"\n poster=\"${this.poster || nothing}\"\n ?autoplay=${!this._reduced && !this.paused}\n muted\n loop\n playsinline\n preload=\"none\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n .muted=${true}\n ></video>`;\n }\n /* The poster alone is the band's picture, and the band opens the page, so\n it is the image the page is waiting for: high priority, never lazy. The\n size is the homepage poster's; the stage sizes the box itself, so the\n attributes only give the image its shape before it arrives. alt=\"\" is\n what keeps it out of the accessibility tree -- aria-hidden beside it\n said the same thing twice. */\n return this.poster\n ? html`<img class=\"media\" src=\"${this.poster}\" alt=\"\" width=\"1440\" height=\"613\" fetchpriority=\"high\">`\n : nothing;\n }\n\n render() {\n const moving = this.videoSrc && !this._hasMedia && !this._reduced;\n return html`\n <section class=\"root ${this._hasCards ? \"has-cards\" : \"\"}\">\n <div class=\"band\">\n <div class=\"stage\">\n ${this._renderMedia()}\n <slot name=\"media\" @slotchange=${this._onMediaSlot}></slot>\n <div class=\"fade\"></div>\n ${moving\n ? html`<bd-button\n class=\"toggle\"\n variant=\"outline-white\"\n surface=\"brand\"\n size=\"md\"\n icon-only\n label=\"${this.paused ? this.playLabel : this.pauseLabel}\"\n @click=${this._toggle}\n >${this.paused\n ? html`<bd-play-icon size=\"md\"></bd-play-icon>`\n : html`<bd-pause-icon size=\"md\"></bd-pause-icon>`}</bd-button>`\n : nothing}\n </div>\n <div class=\"bd-ensemble column\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n
|
|
1
|
+
{"version":3,"file":"hero.js","names":["_decorate","__decorate","Hero","LitElement","ensembleCSS","heroCSS","MediaQueryController","REDUCED_MOTION","reduced","changed","video","el","nothing","moving","property","state","defineElement"],"sources":["../../../../src/components/hero/hero.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { MediaQueryController, REDUCED_MOTION } from \"#shared/controller.media-query.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/icons/pause-icon.ts\";\nimport \"#components/icons/play-icon.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { heroCSS } from \"./hero.css.ts\";\n\n/**\n * The homepage hero: a brand band with a full-bleed looping video fading into\n * the brand at the bottom, an eyebrow, the page's one h1 and a lead. Drawn in\n * the foundation Figma file as Hero.\n *\n * Desktop sets the copy left over the video, and a faint brand haze spills\n * out under the band, behind the cards (the desktop frame's glow); below lg\n * the video sits on top and the copy is centred under it.\n * Slot `cards` takes the audience cards:\n * from lg they overlap the band's lower edge, below it they follow the band\n * on the same brand ground, as the phone and tablet frames draw them.\n *\n * Not bd-header. That is the white two-column product hero with a price; this\n * one sells nothing and carries no CTA.\n *\n * Slot `media` takes animated art in the video's place: the homepage slots\n * <bd-motion-art object=\"brand-surface\">. Slotted, it replaces the video and\n * the poster, and it is centred in the stage below lg and on the sphere's\n * line, right of the copy, from lg.\n *\n * The video loops on its own, so there is a pause button (WCAG 2.2.2). Under\n * prefers-reduced-motion it never plays: the poster stands still in its place.\n * Without a video-src the poster is all there is, and so is no button. The\n * slotted art takes no button: it holds a still frame of its own under\n * prefers-reduced-motion, and stops with `paused` when a page sets it.\n */\n@defineElement(\"bd-hero\")\nexport class Hero extends LitElement {\n static styles = [ensembleCSS, heroCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n @property({ type: String, attribute: \"video-src\" })\n videoSrc = \"\";\n @property({ type: String })\n poster = \"\";\n @property({ type: Boolean, reflect: true })\n paused = false;\n @property({ type: String, attribute: \"pause-label\" })\n pauseLabel = \"Pause the background video\";\n @property({ type: String, attribute: \"play-label\" })\n playLabel = \"Play the background video\";\n @state()\n _reduced = false;\n @state()\n _hasCards = false;\n @state()\n _hasMedia = false;\n\n _media: Element[] | undefined;\n\n constructor() {\n super();\n new MediaQueryController(this, REDUCED_MOTION, reduced => { this._reduced = reduced; });\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has(\"paused\") || changed.has(\"_hasMedia\")) this._syncMedia();\n if (!changed.has(\"paused\") && !changed.has(\"_reduced\") && !changed.has(\"videoSrc\")) return;\n const video = this.renderRoot.querySelector(\"video\");\n if (!video) return;\n if (this.paused || this._reduced) video.pause();\n else video.play()?.catch(() => { /* autoplay refused: the poster stays */ });\n }\n\n _toggle() {\n this.paused = !this.paused;\n }\n\n _onCardsSlot(e: Event) {\n this._hasCards = (e.target as HTMLSlotElement).assignedElements({ flatten: true }).length > 0;\n }\n\n _onMediaSlot(e: Event) {\n this._media = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\n this._hasMedia = this._media.length > 0;\n this._syncMedia();\n }\n\n /* the slotted art stops with the hero's `paused` */\n _syncMedia() {\n for (const el of this._media ?? []) if (\"paused\" in el) el.paused = this.paused;\n }\n\n _renderMedia() {\n if (this._hasMedia) return nothing;\n /* preload=\"none\": under reduced motion, or paused, the video never plays\n and the poster is all there is, so nothing else is fetched for it. */\n if (this.videoSrc) {\n return html`<video\n class=\"media\"\n src=\"${this.videoSrc}\"\n poster=\"${this.poster || nothing}\"\n ?autoplay=${!this._reduced && !this.paused}\n muted\n loop\n playsinline\n preload=\"none\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n .muted=${true}\n ></video>`;\n }\n /* The poster alone is the band's picture, and the band opens the page, so\n it is the image the page is waiting for: high priority, never lazy. The\n size is the homepage poster's; the stage sizes the box itself, so the\n attributes only give the image its shape before it arrives. alt=\"\" is\n what keeps it out of the accessibility tree -- aria-hidden beside it\n said the same thing twice. */\n return this.poster\n ? html`<img class=\"media\" src=\"${this.poster}\" alt=\"\" width=\"1440\" height=\"613\" fetchpriority=\"high\">`\n : nothing;\n }\n\n render() {\n const moving = this.videoSrc && !this._hasMedia && !this._reduced;\n return html`\n <section class=\"root ${this._hasCards ? \"has-cards\" : \"\"}\">\n <div class=\"band\">\n <div class=\"stage\">\n ${this._renderMedia()}\n <slot name=\"media\" @slotchange=${this._onMediaSlot}></slot>\n <div class=\"fade\"></div>\n ${moving\n ? html`<bd-button\n class=\"toggle\"\n variant=\"outline-white\"\n surface=\"brand\"\n size=\"md\"\n icon-only\n label=\"${this.paused ? this.playLabel : this.pauseLabel}\"\n @click=${this._toggle}\n >${this.paused\n ? html`<bd-play-icon size=\"md\"></bd-play-icon>`\n : html`<bd-pause-icon size=\"md\"></bd-pause-icon>`}</bd-button>`\n : nothing}\n </div>\n <div class=\"bd-ensemble column\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<h1 class=\"heading\">${this.heading}</h1>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n </div>\n </div>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <div class=\"cards-band\" ?hidden=${!this._hasCards}>\n <div class=\"bd-ensemble cards\">\n <slot name=\"cards\" @slotchange=${this._onCardsSlot}></slot>\n </div>\n </div>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-hero\": Hero;\n }\n}\n"],"mappings":"A,6iBAuCO,IAAME,EAAN,cAAmBC,CAAW,C,OACnB,KAAA,OAAA,CAACC,EAAaC,CAAO,C,CA2BrC,aAAc,CACZ,MAAM,EAzBE,KAAA,QAAA,GAEA,KAAA,QAAA,GAEH,KAAA,KAAA,GAEI,KAAA,SAAA,GAEF,KAAA,OAAA,GAEA,KAAA,OAAA,GAEI,KAAA,WAAA,6BAED,KAAA,UAAA,4BAED,KAAA,SAAA,GAEC,KAAA,UAAA,GAEA,KAAA,UAAA,GAMV,IAAIC,EAAqB,KAAMC,EAAgB,GAAW,CAAE,KAAK,SAAWC,CAAS,CAAC,CACxF,CAEA,QAAQ,EAA+B,CAErC,IADIC,EAAQ,IAAI,QAAQ,GAAKA,EAAQ,IAAI,WAAW,IAAG,KAAK,WAAW,EACnE,CAACA,EAAQ,IAAI,QAAQ,GAAK,CAACA,EAAQ,IAAI,UAAU,GAAK,CAACA,EAAQ,IAAI,UAAU,EAAG,OACpF,IAAMC,EAAQ,KAAK,WAAW,cAAc,OAAO,EAC9CA,IACD,KAAK,QAAU,KAAK,SAAUA,EAAM,MAAM,EACzCA,EAAM,KAAK,CAAC,EAAE,UAAY,CAA2C,CAAC,EAC7E,CAEA,SAAU,CACR,KAAK,OAAS,CAAC,KAAK,MACtB,CAEA,aAAa,EAAU,CACrB,KAAK,UAAa,EAAE,OAA2B,iBAAiB,CAAE,QAAS,EAAK,CAAC,CAAC,CAAC,OAAS,CAC9F,CAEA,aAAa,EAAU,CACrB,KAAK,OAAU,EAAE,OAA2B,iBAAiB,CAAE,QAAS,EAAK,CAAC,EAC9E,KAAK,UAAY,KAAK,OAAO,OAAS,EACtC,KAAK,WAAW,CAClB,CAGA,YAAa,CACX,IAAK,IAAMC,KAAM,KAAK,QAAU,CAAC,EAAO,WAAYA,IAAI,EAAG,OAAS,KAAK,OAC3E,CAEA,cAAe,CAyBb,OAxBI,KAAK,UAAkBC,EAGvB,KAAK,SACA,CAAI;;eAEF,KAAK,SAAS;kBACX,KAAK,QAAUA,EAAQ;oBACrB,CAAC,KAAK,UAAY,CAAC,KAAK,OAAO;;;;;;;iBAOlC,GAAK;iBASX,KAAK,OACR,CAAI,2BAA2B,KAAK,OAAO,0DAC3CA,CACN,CAEA,QAAS,CACP,IAAMC,EAAS,KAAK,UAAY,CAAC,KAAK,WAAa,CAAC,KAAK,SACzD,MAAO,EAAI;6BACc,KAAK,UAAY,YAAc,GAAG;;;cAGjD,KAAK,aAAa,EAAE;6CACW,KAAK,aAAa;;cAEjDA,EACE,CAAI;;;;;;2BAMO,KAAK,OAAS,KAAK,UAAY,KAAK,WAAW;2BAC/C,KAAK,QAAQ;mBACrB,KAAK,OACJ,CAAI,0CACJ,CAAI,4CAA4C,cACpDD,EAAQ;;;;gBAIR,KAAK,QAAU,CAAI,sBAAsB,KAAK,QAAQ,MAAQA,EAAQ;gBACtE,KAAK,QAAU,CAAI,uBAAuB,KAAK,QAAQ,OAASA,EAAQ;gBACxE,KAAK,KAAO,CAAI,mBAAmB,KAAK,KAAK,MAAQA,EAAQ;;;;;0CAKnC,CAAC,KAAK,UAAU;;6CAEb,KAAK,aAAa;;;;KAK7D,CACF,EAhIGZ,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAZ,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDF,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAc,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAZ,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzCF,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,CAAA,EAAAZ,EAAA,UAAA,aAAA,IAAA,EAAA,EAEnDF,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,CAAC,CAAA,EAAAZ,EAAA,UAAA,YAAA,IAAA,EAAA,EAElDF,EAAA,CAAAe,EAAM,CAAA,EAAAb,EAAA,UAAA,WAAA,IAAA,EAAA,EAENF,EAAA,CAAAe,EAAM,CAAA,EAAAb,EAAA,UAAA,YAAA,IAAA,EAAA,EAENF,EAAA,CAAAe,EAAM,CAAA,EAAAb,EAAA,UAAA,YAAA,IAAA,EAAA,EAxBR,EAAAF,EAAA,CAAAgB,EAAc,SAAS,CAAA,EAAAd,CAAA,E"}
|
|
@@ -6,7 +6,7 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
6
6
|
<div class="card">
|
|
7
7
|
<div class="intro">
|
|
8
8
|
<div class="lockup"><slot name="lockup"></slot></div>
|
|
9
|
-
|
|
9
|
+
${this.heading?a`<bd-h as="${this.as}" visual-level="h2" color="on-brand" class="heading"><span class="text">${this.heading}</span></bd-h>`:o}
|
|
10
10
|
</div>
|
|
11
11
|
<div class="detail">
|
|
12
12
|
${this.quote?a`<figure class="quote">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner-banner.js","names":["_decorate","__decorate","PartnerBanner","LitElement","_args","ensembleCSS","partnerBannerCSS","el","nothing","property","defineElement"],"sources":["../../../../src/components/partner-banner/partner-banner.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { partnerBannerCSS } from \"./partner-banner.css.ts\";\n\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * A partnership band: a full-bleed photo with a brand card that rises over\n * its lower edge, holding the partner lockup, a headline, a quote with its\n * attribution, a lead and two CTAs. The homepage's Ferrari section; drawn in\n * the foundation Figma file as Partner banner.\n *\n * Not bd-cta-banner, which has no image, and not bd-spotlight-section, which\n * sets its picture beside the copy rather than behind it.\n *\n * Slots: `photo` (an <img> or <picture>, cover-fitted), `lockup` (the partner\n * mark, drawn in the brand's ink), `actions` (white and outline-white\n * bd-button-links). Below md the card stops overlapping and becomes a solid\n * band under the photo, edge to edge, with the CTAs stacked at its full\n * width, as the phone frame draws them. From md they sit in a row, and one\n * that wraps grows to the row's width rather than keeping its own.\n */\n@defineElement(\"bd-partner-banner\")\nexport class PartnerBanner extends LitElement {\n static styles = [ensembleCSS, partnerBannerCSS];\n\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n quote = \"\";\n @property({ type: String })\n attribution = \"\";\n @property({ type: String })\n lead = \"\";\n @property({ type: String })\n as: HeadingTag = \"h2\";\n\n /* A bd-button-link fills its own box only through its fullwidth attribute,\n so the banner sets it on every CTA at every width and leaves the box's\n width to partner-banner.css.ts: the column's width on a phone, and from\n md the label's width until the row wraps, then the row's. That decides on\n the rendered labels, so a longer translation wraps and grows where the\n English fits on one line -- no breakpoint could know where that is. */\n _onActionsSlot(e: Event) {\n for (const el of (e.target as HTMLSlotElement).assignedElements({ flatten: true })) {\n if (\"fullWidth\" in el) el.setAttribute(\"fullwidth\", \"\");\n }\n }\n\n render() {\n return html`\n <section class=\"root\">\n <div class=\"photo\"><slot name=\"photo\"></slot></div>\n <div class=\"band\">\n <div class=\"bd-ensemble column\">\n <div class=\"card\">\n <div class=\"intro\">\n <div class=\"lockup\"><slot name=\"lockup\"></slot></div>\n
|
|
1
|
+
{"version":3,"file":"partner-banner.js","names":["_decorate","__decorate","PartnerBanner","LitElement","_args","ensembleCSS","partnerBannerCSS","el","nothing","property","defineElement"],"sources":["../../../../src/components/partner-banner/partner-banner.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { partnerBannerCSS } from \"./partner-banner.css.ts\";\n\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * A partnership band: a full-bleed photo with a brand card that rises over\n * its lower edge, holding the partner lockup, a headline, a quote with its\n * attribution, a lead and two CTAs. The homepage's Ferrari section; drawn in\n * the foundation Figma file as Partner banner.\n *\n * Not bd-cta-banner, which has no image, and not bd-spotlight-section, which\n * sets its picture beside the copy rather than behind it.\n *\n * Slots: `photo` (an <img> or <picture>, cover-fitted), `lockup` (the partner\n * mark, drawn in the brand's ink), `actions` (white and outline-white\n * bd-button-links). Below md the card stops overlapping and becomes a solid\n * band under the photo, edge to edge, with the CTAs stacked at its full\n * width, as the phone frame draws them. From md they sit in a row, and one\n * that wraps grows to the row's width rather than keeping its own.\n */\n@defineElement(\"bd-partner-banner\")\nexport class PartnerBanner extends LitElement {\n static styles = [ensembleCSS, partnerBannerCSS];\n\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n quote = \"\";\n @property({ type: String })\n attribution = \"\";\n @property({ type: String })\n lead = \"\";\n @property({ type: String })\n as: HeadingTag = \"h2\";\n\n /* A bd-button-link fills its own box only through its fullwidth attribute,\n so the banner sets it on every CTA at every width and leaves the box's\n width to partner-banner.css.ts: the column's width on a phone, and from\n md the label's width until the row wraps, then the row's. That decides on\n the rendered labels, so a longer translation wraps and grows where the\n English fits on one line -- no breakpoint could know where that is. */\n _onActionsSlot(e: Event) {\n for (const el of (e.target as HTMLSlotElement).assignedElements({ flatten: true })) {\n if (\"fullWidth\" in el) el.setAttribute(\"fullwidth\", \"\");\n }\n }\n\n render() {\n return html`\n <section class=\"root\">\n <div class=\"photo\"><slot name=\"photo\"></slot></div>\n <div class=\"band\">\n <div class=\"bd-ensemble column\">\n <div class=\"card\">\n <div class=\"intro\">\n <div class=\"lockup\"><slot name=\"lockup\"></slot></div>\n ${this.heading\n ? html`<bd-h as=\"${this.as}\" visual-level=\"h2\" color=\"on-brand\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>`\n : nothing}\n </div>\n <div class=\"detail\">\n ${this.quote\n ? html`<figure class=\"quote\">\n <blockquote>${this.quote}</blockquote>\n ${this.attribution ? html`<figcaption>${this.attribution}</figcaption>` : nothing}\n </figure>`\n : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\" @slotchange=${this._onActionsSlot}></slot></div>\n </div>\n </div>\n </div>\n </div>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-partner-banner\": PartnerBanner;\n }\n}\n"],"mappings":"A,2ZA4BO,IAAME,EAAN,cAA4BC,CAAW,C,8BAIlC,KAAA,QAAA,GAEF,KAAA,MAAA,GAEM,KAAA,YAAA,GAEP,KAAA,KAAA,GAEU,KAAA,GAAA,I,QAXD,KAAA,OAAA,CAACE,EAAaC,CAAgB,C,CAmB9C,eAAe,EAAU,CACvB,IAAK,IAAMC,KAAO,EAAE,OAA2B,iBAAiB,CAAE,QAAS,EAAK,CAAC,EAC3E,cAAeA,GAAIA,EAAG,aAAa,YAAa,EAAE,CAE1D,CAEA,QAAS,CACP,MAAO,EAAI;;;;;;;;kBAQG,KAAK,QACH,CAAI,aAAa,KAAK,GAAG,0EAA0E,KAAK,QAAQ,gBAChHC,EAAQ;;;kBAGV,KAAK,MACH,CAAI;oCACY,KAAK,MAAM;wBACvB,KAAK,YAAc,CAAI,eAAe,KAAK,YAAY,eAAiBA,EAAQ;+BAEpFA,EAAQ;kBACV,KAAK,KAAO,CAAI,mBAAmB,KAAK,KAAK,MAAQA,EAAQ;wEACP,KAAK,eAAe;;;;;;KAO1F,CACF,EApDGR,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,KAAA,IAAA,EAAA,EAZ3B,EAAAF,EAAA,CAAAU,EAAc,mBAAmB,CAAA,EAAAR,CAAA,E"}
|
|
@@ -2,7 +2,7 @@ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/
|
|
|
2
2
|
<header class="bd-ensemble root">
|
|
3
3
|
${this.eyebrow?o`<bd-p variant="eyebrow" class="eyebrow"><span class="text">${this.eyebrow}</span></bd-p>`:s}
|
|
4
4
|
<div class="row">
|
|
5
|
-
|
|
5
|
+
${this.heading?o`<bd-h as="${this.as}" visual-level="h2" class="heading"><span class="text">${this.heading}</span></bd-h>`:s}
|
|
6
6
|
<div class="lead" ?hidden=${!e}>
|
|
7
7
|
<slot name="lead" @slotchange=${this._onLeadSlot}><span class="text">${this.lead}</span></slot>
|
|
8
8
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","ensembleCSS","sectionHeaderCSS","changed","resolveEnum","n","showLead","nothing","property","state","defineElement"],"sources":["../../../../src/components/section-header/section-header.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { sectionHeaderCSS } from \"./section-header.css.ts\";\n\nconst LAYOUTS = [\"stacked\", \"split\", \"centered\"] as const;\n\ntype Layout = typeof LAYOUTS[number];\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The header that opens a page section: an eyebrow, the section's h2 and a\n * lead. The homepage opens five sections with it -- AI, Why trust, Proven,\n * Insights and the solution splitter -- where each module used to spell its\n * own (bd-overview, bd-bento-grid, bd-trust-panel). Drawn in the foundation\n * Figma file as Section header.\n *\n * layout=\"split\" puts the headline and lead side by side from lg; below lg,\n * and in \"stacked\", everything stacks. layout=\"centered\" centres the three on\n * a narrower measure. Leave eyebrow and lead out for a title-only header.\n *\n * The lead is an attribute for plain copy, or the `lead` slot when it carries\n * a link -- `<bd-link inline underline>`, since colour alone measures 2.91:1\n * against the body text and fails WCAG 1.4.1. Slotted copy takes the lead's\n * role from here, so the page writes words, not typography.\n */\n@defineElement(\"bd-section-header\")\nexport class SectionHeader extends LitElement {\n static styles = [ensembleCSS, sectionHeaderCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n // a page section's title: the outline is the page's, so it can say otherwise\n @property({ type: String })\n as: HeadingTag = \"h2\";\n @property({ type: String, reflect: true })\n layout: Layout = \"stacked\";\n @state()\n _hasLead = false;\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"layout\")) {\n this.layout = resolveEnum(this.layout, { allowed: LAYOUTS, fallback: \"stacked\" });\n }\n }\n\n _onLeadSlot(e: Event) {\n this._hasLead = (e.target as HTMLSlotElement).assignedNodes({ flatten: true })\n .some(n => n.nodeType === Node.ELEMENT_NODE || n.textContent!.trim());\n }\n\n render() {\n const showLead = this.lead || this._hasLead;\n return html`\n <header class=\"bd-ensemble root\">\n ${this.eyebrow\n ? html`<bd-p variant=\"eyebrow\" class=\"eyebrow\"><span class=\"text\">${this.eyebrow}</span></bd-p>`\n : nothing}\n <div class=\"row\">\n
|
|
1
|
+
{"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","ensembleCSS","sectionHeaderCSS","changed","resolveEnum","n","showLead","nothing","property","state","defineElement"],"sources":["../../../../src/components/section-header/section-header.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { sectionHeaderCSS } from \"./section-header.css.ts\";\n\nconst LAYOUTS = [\"stacked\", \"split\", \"centered\"] as const;\n\ntype Layout = typeof LAYOUTS[number];\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The header that opens a page section: an eyebrow, the section's h2 and a\n * lead. The homepage opens five sections with it -- AI, Why trust, Proven,\n * Insights and the solution splitter -- where each module used to spell its\n * own (bd-overview, bd-bento-grid, bd-trust-panel). Drawn in the foundation\n * Figma file as Section header.\n *\n * layout=\"split\" puts the headline and lead side by side from lg; below lg,\n * and in \"stacked\", everything stacks. layout=\"centered\" centres the three on\n * a narrower measure. Leave eyebrow and lead out for a title-only header.\n *\n * The lead is an attribute for plain copy, or the `lead` slot when it carries\n * a link -- `<bd-link inline underline>`, since colour alone measures 2.91:1\n * against the body text and fails WCAG 1.4.1. Slotted copy takes the lead's\n * role from here, so the page writes words, not typography.\n */\n@defineElement(\"bd-section-header\")\nexport class SectionHeader extends LitElement {\n static styles = [ensembleCSS, sectionHeaderCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n // a page section's title: the outline is the page's, so it can say otherwise\n @property({ type: String })\n as: HeadingTag = \"h2\";\n @property({ type: String, reflect: true })\n layout: Layout = \"stacked\";\n @state()\n _hasLead = false;\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"layout\")) {\n this.layout = resolveEnum(this.layout, { allowed: LAYOUTS, fallback: \"stacked\" });\n }\n }\n\n _onLeadSlot(e: Event) {\n this._hasLead = (e.target as HTMLSlotElement).assignedNodes({ flatten: true })\n .some(n => n.nodeType === Node.ELEMENT_NODE || n.textContent!.trim());\n }\n\n render() {\n const showLead = this.lead || this._hasLead;\n return html`\n <header class=\"bd-ensemble root\">\n ${this.eyebrow\n ? html`<bd-p variant=\"eyebrow\" class=\"eyebrow\"><span class=\"text\">${this.eyebrow}</span></bd-p>`\n : nothing}\n <div class=\"row\">\n ${this.heading\n ? html`<bd-h as=\"${this.as}\" visual-level=\"h2\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>`\n : nothing}\n <div class=\"lead\" ?hidden=${!showLead}>\n <slot name=\"lead\" @slotchange=${this._onLeadSlot}><span class=\"text\">${this.lead}</span></slot>\n </div>\n </div>\n </header>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section-header\": SectionHeader;\n }\n}\n"],"mappings":"A,mgBAWA,IAAME,EAAU,CAAC,UAAW,QAAS,UAAU,EAsBlCC,EAAN,cAA4BC,CAAW,C,8BAIlC,KAAA,QAAA,GAEA,KAAA,QAAA,GAEH,KAAA,KAAA,GAGU,KAAA,GAAA,KAEA,KAAA,OAAA,UAEN,KAAA,SAAA,E,QAdK,KAAA,OAAA,CAACE,EAAaC,CAAgB,C,CAgB9C,WAAW,EAA+B,CACpCC,EAAQ,IAAI,QAAQ,IACtB,KAAK,OAASC,EAAY,KAAK,OAAQ,CAAE,QAASP,EAAS,SAAU,SAAU,CAAC,EAEpF,CAEA,YAAY,EAAU,CACpB,KAAK,SAAY,EAAE,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAC3E,KAAK,GAAKQ,EAAE,WAAa,KAAK,cAAgBA,EAAE,YAAa,KAAK,CAAC,CACxE,CAEA,QAAS,CACP,IAAMC,EAAW,KAAK,MAAQ,KAAK,SACnC,MAAO,EAAI;;UAEL,KAAK,QACH,CAAI,8DAA8D,KAAK,QAAQ,gBAC/EC,EAAQ;;YAER,KAAK,QACH,CAAI,aAAa,KAAK,GAAG,yDAAyD,KAAK,QAAQ,gBAC/FA,EAAQ;sCACgB,CAACD,EAAS;4CACJ,KAAK,YAAY,sBAAsB,KAAK,KAAK;;;;KAK3F,CACF,EA3CGX,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,OAAA,IAAA,EAAA,EAGzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,KAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAExCH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,WAAA,IAAA,EAAA,EAfR,EAAAH,EAAA,CAAAe,EAAc,mBAAmB,CAAA,EAAAZ,CAAA,E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Design system based on Web Components.",
|
|
5
5
|
"author": "Iordache Matei Cezar <miordache@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
@@ -432,5 +432,5 @@
|
|
|
432
432
|
"volta": {
|
|
433
433
|
"node": "24.22.1"
|
|
434
434
|
},
|
|
435
|
-
"gitHead": "
|
|
435
|
+
"gitHead": "0e2fc0c422241bd7e904e8376c3e92c2fa371263"
|
|
436
436
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 1,
|
|
3
3
|
"package": "@repobit/dex-system-design",
|
|
4
|
-
"packageVersion": "3.1.
|
|
4
|
+
"packageVersion": "3.1.1",
|
|
5
5
|
"generatedFrom": [
|
|
6
6
|
"package.json exports",
|
|
7
7
|
"Lit reactive properties (static properties or @property/@state)",
|
|
@@ -1910,6 +1910,13 @@
|
|
|
1910
1910
|
"attributeName": "min-col-width",
|
|
1911
1911
|
"default": 0,
|
|
1912
1912
|
"description": "The narrowest a column may be, in px at the default text size (laid out in rem, so it grows with the reader's text). Set, each step's cols is the most columns there will be, and the grid takes fewer where that many would not fit. Unset (0), cols is the count."
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"name": "itemRows",
|
|
1916
|
+
"type": "number",
|
|
1917
|
+
"attributeName": "item-rows",
|
|
1918
|
+
"default": 0,
|
|
1919
|
+
"description": "Rows each item shares with the items beside it. Set, every item is a subgrid of that many of the grid's rows, so the same parts of items side by side line up however their text wraps (bd-audience-card takes 4). Unset (0), every item is one cell."
|
|
1913
1920
|
}
|
|
1914
1921
|
],
|
|
1915
1922
|
"notes": [
|