@repobit/dex-system-design 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +35 -0
  3. package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +1 -0
  4. package/dist/src/components/agent-endpoints/agent-endpoints.js +12 -12
  5. package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
  6. package/dist/src/components/anchor/anchor-nav.d.ts +2 -1
  7. package/dist/src/components/anchor/anchor-nav.js +10 -10
  8. package/dist/src/components/anchor/anchor-nav.js.map +1 -1
  9. package/dist/src/components/audience-card/audience-card.d.ts +1 -0
  10. package/dist/src/components/audience-card/audience-card.js +7 -7
  11. package/dist/src/components/audience-card/audience-card.js.map +1 -1
  12. package/dist/src/components/awards/awards-flex.d.ts +3 -2
  13. package/dist/src/components/awards/awards-flex.js +16 -16
  14. package/dist/src/components/awards/awards-flex.js.map +1 -1
  15. package/dist/src/components/awards/awards-spotlight.d.ts +2 -1
  16. package/dist/src/components/awards/awards-spotlight.js +8 -8
  17. package/dist/src/components/awards/awards-spotlight.js.map +1 -1
  18. package/dist/src/components/awards/awards.d.ts +1 -1
  19. package/dist/src/components/bento-grid/bento-grid.d.ts +1 -0
  20. package/dist/src/components/bento-grid/bento-grid.js +10 -10
  21. package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
  22. package/dist/src/components/bento-grid/bento-item.d.ts +1 -0
  23. package/dist/src/components/bento-grid/bento-item.js +9 -9
  24. package/dist/src/components/bento-grid/bento-item.js.map +1 -1
  25. package/dist/src/components/button/button.d.ts +1 -1
  26. package/dist/src/components/cards/card.d.ts +2 -2
  27. package/dist/src/components/cards/card.js +11 -11
  28. package/dist/src/components/cards/card.js.map +1 -1
  29. package/dist/src/components/carousel/carousel.d.ts +2 -2
  30. package/dist/src/components/carousel/carousel.js +6 -6
  31. package/dist/src/components/carousel/carousel.js.map +1 -1
  32. package/dist/src/components/comparison-panel/comparison-panel.d.ts +1 -0
  33. package/dist/src/components/comparison-panel/comparison-panel.js +12 -12
  34. package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
  35. package/dist/src/components/compatibility-table/compatibility-table.d.ts +1 -0
  36. package/dist/src/components/compatibility-table/compatibility-table.js +14 -14
  37. package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
  38. package/dist/src/components/cta-banner/cta-banner.d.ts +1 -0
  39. package/dist/src/components/cta-banner/cta-banner.js +8 -8
  40. package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
  41. package/dist/src/components/header/header-code.d.ts +3 -2
  42. package/dist/src/components/header/header-code.js +13 -13
  43. package/dist/src/components/header/header-code.js.map +1 -1
  44. package/dist/src/components/heading/heading.d.ts +1 -1
  45. package/dist/src/components/heading/heading.js +5 -1
  46. package/dist/src/components/heading/heading.js.map +1 -1
  47. package/dist/src/components/hero/hero.d.ts +2 -1
  48. package/dist/src/components/hero/hero.js +8 -8
  49. package/dist/src/components/hero/hero.js.map +1 -1
  50. package/dist/src/components/install-options/install-options.d.ts +3 -2
  51. package/dist/src/components/install-options/install-options.js +17 -17
  52. package/dist/src/components/install-options/install-options.js.map +1 -1
  53. package/dist/src/components/link/link.d.ts +1 -1
  54. package/dist/src/components/list/list-item/list-item.d.ts +1 -1
  55. package/dist/src/components/logo-marquee/logo-marquee.d.ts +1 -0
  56. package/dist/src/components/logo-marquee/logo-marquee.js +5 -5
  57. package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
  58. package/dist/src/components/motion-art/motion-art.js +1 -1
  59. package/dist/src/components/motion-art/motion-art.js.map +1 -1
  60. package/dist/src/components/overview/overview.d.ts +1 -0
  61. package/dist/src/components/overview/overview.js +7 -7
  62. package/dist/src/components/overview/overview.js.map +1 -1
  63. package/dist/src/components/page-switcher/page-switcher.d.ts +1 -0
  64. package/dist/src/components/page-switcher/page-switcher.js +5 -5
  65. package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
  66. package/dist/src/components/pagination-dots/pagination-dots.d.ts +1 -1
  67. package/dist/src/components/partner-banner/partner-banner.d.ts +1 -0
  68. package/dist/src/components/partner-banner/partner-banner.js +6 -6
  69. package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
  70. package/dist/src/components/post-card/post-card.d.ts +1 -0
  71. package/dist/src/components/post-card/post-card.js +5 -5
  72. package/dist/src/components/post-card/post-card.js.map +1 -1
  73. package/dist/src/components/process-steps/process-steps.d.ts +1 -0
  74. package/dist/src/components/process-steps/process-steps.js +7 -7
  75. package/dist/src/components/process-steps/process-steps.js.map +1 -1
  76. package/dist/src/components/quick-answer/quick-answer.d.ts +1 -0
  77. package/dist/src/components/quick-answer/quick-answer.js +7 -7
  78. package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
  79. package/dist/src/components/review/review-grid.d.ts +1 -0
  80. package/dist/src/components/review/review-grid.js +3 -3
  81. package/dist/src/components/review/review-grid.js.map +1 -1
  82. package/dist/src/components/review/review.d.ts +1 -0
  83. package/dist/src/components/review/review.js +2 -2
  84. package/dist/src/components/review/review.js.map +1 -1
  85. package/dist/src/components/section-header/section-header.d.ts +1 -0
  86. package/dist/src/components/section-header/section-header.js +3 -3
  87. package/dist/src/components/section-header/section-header.js.map +1 -1
  88. package/dist/src/components/shared/controller.observer.d.ts +50 -0
  89. package/dist/src/components/shared/controller.observer.js +2 -0
  90. package/dist/src/components/shared/controller.observer.js.map +1 -0
  91. package/dist/src/components/spotlight-section/spotlight-section.d.ts +1 -0
  92. package/dist/src/components/spotlight-section/spotlight-section.js +7 -7
  93. package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
  94. package/dist/src/components/stat/stat-highlight.d.ts +5 -5
  95. package/dist/src/components/stat/stat-highlight.js +2 -2
  96. package/dist/src/components/stat/stat-highlight.js.map +1 -1
  97. package/dist/src/components/stat/stat-tile.d.ts +1 -0
  98. package/dist/src/components/stat/stat-tile.js +5 -5
  99. package/dist/src/components/stat/stat-tile.js.map +1 -1
  100. package/dist/src/components/terminal/terminal-cursor.d.ts +1 -0
  101. package/dist/src/components/terminal/terminal-cursor.js +1 -1
  102. package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
  103. package/dist/src/components/terminal/terminal-message.d.ts +4 -3
  104. package/dist/src/components/terminal/terminal-message.js +25 -25
  105. package/dist/src/components/terminal/terminal-message.js.map +1 -1
  106. package/dist/src/components/tooltip/tooltip.js +1 -1
  107. package/dist/src/components/tooltip/tooltip.js.map +1 -1
  108. package/dist/src/components/trust-panel/trust-panel.d.ts +1 -0
  109. package/dist/src/components/trust-panel/trust-panel.js +19 -19
  110. package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
  111. package/dist/src/loader/create-loader.d.ts +13 -0
  112. package/dist/src/loader/create-loader.js +2 -0
  113. package/dist/src/loader/create-loader.js.map +1 -0
  114. package/dist/src/loader/loader.d.ts +44 -0
  115. package/dist/src/loader/loader.js +2 -0
  116. package/dist/src/loader/loader.js.map +1 -0
  117. package/dist/src/loader/registry.d.ts +2 -0
  118. package/dist/src/loader/registry.js +2 -0
  119. package/dist/src/loader/registry.js.map +1 -0
  120. package/dist/src/tokens/tokens.js +1 -1
  121. package/dist/src/tokens/tokens.js.map +1 -1
  122. package/package.json +12 -4
  123. package/schemas/component-manifest.json +1 -1
  124. package/dist/src/tokens/dark-derivation.d.ts +0 -70
  125. package/dist/src/tokens/dark-derivation.js +0 -2
  126. package/dist/src/tokens/dark-derivation.js.map +0 -1
  127. package/dist/src/tokens/dark-findings.d.ts +0 -59
  128. package/dist/src/tokens/dark-findings.js +0 -2
  129. package/dist/src/tokens/dark-findings.js.map +0 -1
  130. package/dist/src/tokens/story-chrome.d.ts +0 -72
  131. package/dist/src/tokens/story-chrome.js +0 -292
  132. package/dist/src/tokens/story-chrome.js.map +0 -1
  133. package/dist/src/tokens/token-map.d.ts +0 -114
  134. package/dist/src/tokens/token-map.js +0 -2
  135. package/dist/src/tokens/token-map.js.map +0 -1
  136. package/dist/src/tokens/token-purposes.d.ts +0 -63
  137. package/dist/src/tokens/token-purposes.js +0 -2
  138. package/dist/src/tokens/token-purposes.js.map +0 -1
  139. package/dist/src/tokens/type-ceiling-words.d.ts +0 -96
  140. package/dist/src/tokens/type-ceiling-words.js +0 -2
  141. package/dist/src/tokens/type-ceiling-words.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../link/link.js";import{Announcer as i}from"../shared/announcer.js";import a from"./install-options.css.js";import{LitElement as o,html as s,nothing as c}from"lit";import{property as l}from"lit/decorators.js";var u=class extends o{static{this.styles=[t,r,a]}constructor(){super(),this.eyebrow=``,this.title=``,this.description=``,this.worksIn=[],this.cards=[],this.promptPanel=!1,this.promptLabel=``,this._announcer=new i(this)}async _copy(e,t){if(!(`copied`in t.dataset)){t.dataset.copied=``;try{await navigator.clipboard.writeText(e);let n=t.textContent;t.textContent=`Copied`,this._announcer.say(`Copied`),setTimeout(()=>{t.textContent=n,delete t.dataset.copied},1500)}catch{delete t.dataset.copied}}}async _copyPromptSlot(e){let t=((this.renderRoot?.querySelector(`slot[name="prompt"]`))?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent||``).join(``).trim();t&&this._copy(t,e)}_renderWorksIn(){return this.worksIn.length?s`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import"../link/link.js";import{Announcer as r}from"../shared/announcer.js";import i from"./install-options.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends a{static{this.styles=[n,i]}constructor(){super(),this.eyebrow=``,this.title=``,this.description=``,this.worksIn=[],this.cards=[],this.promptPanel=!1,this.promptLabel=``,this._announcer=new r(this)}async _copy(e,t){if(!(`copied`in t.dataset)){t.dataset.copied=``;try{await navigator.clipboard.writeText(e);let n=t.textContent;t.textContent=`Copied`,this._announcer.say(`Copied`),setTimeout(()=>{t.textContent=n,delete t.dataset.copied},1500)}catch{delete t.dataset.copied}}}async _copyPromptSlot(e){let t=((this.renderRoot?.querySelector(`slot[name="prompt"]`))?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent||``).join(``).trim();t&&this._copy(t,e)}_renderWorksIn(){return this.worksIn.length?o`
2
2
  <div class="bd-installoptions-worksin">
3
3
  <span class="bd-installoptions-worksin-label">Works in</span>
4
4
  <div class="bd-installoptions-pills">
5
- ${this.worksIn.map(({label:e,initial:t,color:n})=>s`
5
+ ${this.worksIn.map(({label:e,initial:t,color:n})=>o`
6
6
  <span class="bd-installoptions-pill">
7
7
  <span
8
8
  class="bd-installoptions-pill-icon"
@@ -14,16 +14,16 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
14
14
  `)}
15
15
  </div>
16
16
  </div>
17
- `:c}_renderCard(e,t){let n=`bd-installoptions-card-title-${t}`;return s`
17
+ `:s}_renderCard(e,t){let n=`bd-installoptions-card-title-${t}`;return o`
18
18
  <div class="bd-installoptions-card">
19
19
  <div class="bd-installoptions-card-head">
20
20
  <bd-h as="h3" id=${n} class="bd-installoptions-card-title">${e.title}</bd-h>
21
- ${e.badge?s`<span class="bd-installoptions-badge">${e.badge}</span>`:c}
21
+ ${e.badge?o`<span class="bd-installoptions-badge">${e.badge}</span>`:s}
22
22
  </div>
23
23
 
24
- ${e.description?s`<bd-p variant="small" class="bd-installoptions-card-description">${e.description}</bd-p>`:c}
24
+ ${e.description?o`<bd-p variant="small" class="bd-installoptions-card-description">${e.description}</bd-p>`:s}
25
25
 
26
- ${e.code?s`
26
+ ${e.code?o`
27
27
  <div class="bd-installoptions-code">
28
28
  <pre class="bd-installoptions-code-text">${e.code}</pre>
29
29
  <button
@@ -33,15 +33,15 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
33
33
  @click=${t=>this._copy(e.code,t.currentTarget)}
34
34
  >Copy</button>
35
35
  </div>
36
- `:c}
36
+ `:s}
37
37
 
38
- ${e.linkLabel?s`
38
+ ${e.linkLabel?o`
39
39
  <bd-link href=${e.linkHref||`#`} variant="primary" class="bd-installoptions-card-link">
40
40
  ${e.linkLabel} →
41
41
  </bd-link>
42
- `:c}
42
+ `:s}
43
43
  </div>
44
- `}_renderPromptPanel(){return this.promptPanel?s`
44
+ `}_renderPromptPanel(){return this.promptPanel?o`
45
45
  <div class="bd-installoptions-promptpanel">
46
46
  <bd-h as="h2" id="bd-installoptions-prompt-title" class="bd-installoptions-prompt-title">
47
47
  <slot name="prompt-title"></slot>
@@ -51,7 +51,7 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
51
51
  <slot name="prompt-description"></slot>
52
52
  </bd-p>
53
53
 
54
- ${this.promptLabel?s`<span class="bd-installoptions-prompt-label">${this.promptLabel}</span>`:c}
54
+ ${this.promptLabel?o`<span class="bd-installoptions-prompt-label">${this.promptLabel}</span>`:s}
55
55
 
56
56
  <div class="bd-installoptions-prompt-code">
57
57
  <div class="bd-installoptions-prompt-code-text">
@@ -73,14 +73,14 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
73
73
  <slot name="prompt-footer"></slot>
74
74
  </bd-p>
75
75
  </div>
76
- `:c}render(){return s`
76
+ `:s}render(){return o`
77
77
  <div class="bd-installoptions-container">
78
78
  <div class="bd-ensemble">
79
- ${this.eyebrow?s`<bd-p variant="regular" class="bd-installoptions-eyebrow">${this.eyebrow}</bd-p>`:c}
79
+ ${this.eyebrow?o`<bd-p variant="regular" class="bd-installoptions-eyebrow">${this.eyebrow}</bd-p>`:s}
80
80
 
81
81
  <bd-h as="h2" class="bd-installoptions-title">${this.title}</bd-h>
82
82
 
83
- ${this.description?s`<bd-p variant="regular" class="bd-installoptions-description">${this.description}</bd-p>`:c}
83
+ ${this.description?o`<bd-p variant="regular" class="bd-installoptions-description">${this.description}</bd-p>`:s}
84
84
 
85
85
  ${this._renderWorksIn()}
86
86
 
@@ -95,15 +95,15 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
95
95
  <slot></slot>
96
96
  </div>
97
97
 
98
- ${this.cards.length?s`
98
+ ${this.cards.length?o`
99
99
  <div class="bd-installoptions-grid">
100
100
  ${this.cards.map((e,t)=>this._renderCard(e,t))}
101
101
  </div>
102
- `:c}
102
+ `:s}
103
103
 
104
104
  ${this._renderPromptPanel()}
105
105
  </div>
106
106
  <span class="bd-installoptions-status" role="status">${this._announcer.status}</span>
107
107
  </div>
108
- `}};n([l({type:String})],u.prototype,`eyebrow`,void 0),n([l({type:String})],u.prototype,`title`,void 0),n([l({type:String})],u.prototype,`description`,void 0),n([l({type:Array})],u.prototype,`worksIn`,void 0),n([l({type:Array})],u.prototype,`cards`,void 0),n([l({type:Boolean,reflect:!0,attribute:`prompt-panel`})],u.prototype,`promptPanel`,void 0),n([l({type:String,attribute:`prompt-label`})],u.prototype,`promptLabel`,void 0),u=n([e(`bd-install-options`)],u);
108
+ `}};t([c({type:String})],l.prototype,`eyebrow`,void 0),t([c({type:String})],l.prototype,`title`,void 0),t([c({type:String})],l.prototype,`description`,void 0),t([c({type:Array})],l.prototype,`worksIn`,void 0),t([c({type:Array})],l.prototype,`cards`,void 0),t([c({type:Boolean,reflect:!0,attribute:`prompt-panel`})],l.prototype,`promptPanel`,void 0),t([c({type:String,attribute:`prompt-label`})],l.prototype,`promptLabel`,void 0),l=t([e(`bd-install-options`)],l);
109
109
  //# sourceMappingURL=install-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"install-options.js","names":["installOptionsCSS","_decorate","__decorate","install_options_css_default","BdInstallOptions","LitElement","tokens","ensembleCSS","Announcer","btn","text","original","n","color","initial","label","nothing","titleId","index","card","e","property","defineElement"],"sources":["../../../../src/components/install-options/install-options.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/link/link.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport installOptionsCSS from \"./install-options.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { Announcer } from \"#shared/announcer.ts\";\n\ninterface WorksIn {\n label? : string;\n initial?: string;\n color? : string;\n}\n\ninterface InstallCard {\n title : string;\n badge? : string;\n description?: string;\n code? : string;\n linkLabel? : string;\n linkHref? : string;\n}\n\n@defineElement(\"bd-install-options\")\nclass BdInstallOptions extends LitElement {\n static styles = [tokens, ensembleCSS, installOptionsCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n worksIn: WorksIn[] = []; // [{ label, initial, color }]\n @property({ type: Array })\n cards: InstallCard[] = []; // [{ title, badge, description, code, linkLabel, linkHref }]\n\n // \"Then just ask\" sub-panel — rendered only when this is set, so a\n // consumer of bd-install-options who doesn't need it gets nothing extra.\n @property({ type: Boolean, reflect: true, attribute: \"prompt-panel\" })\n promptPanel = false;\n @property({ type: String, attribute: \"prompt-label\" })\n promptLabel = \"\"; // small mono label above the prompt block\n\n _announcer: Announcer;\n\n constructor() {\n super();\n /* \"Copied\" is said, not only shown. The button's own text changes too,\n but a screen reader does not reliably read a focused button's new name,\n so the message goes through the live region (shared/announcer.ts). */\n this._announcer = new Announcer(this);\n }\n\n /* The button says \"Copied\" for 1.5s and ignores presses meanwhile. It is not\n disabled for it: disabling the focused button threw keyboard focus back to\n the top of the page, mid-card.\n\n The flag is data-copied, present or absent: its value is \"\", which reads\n as false, so asking for its value let a second press through, and that\n press took \"Copied\" as the text to restore. It is set before the\n clipboard is awaited, so two presses in quick succession cannot both\n start a copy. */\n async _copy(text: string, btn: HTMLElement) {\n if (\"copied\" in btn.dataset) return;\n btn.dataset.copied = \"\";\n try {\n await navigator.clipboard.writeText(text);\n const original = btn.textContent;\n btn.textContent = \"Copied\";\n this._announcer.say(\"Copied\");\n setTimeout(() => {\n btn.textContent = original;\n delete btn.dataset.copied;\n }, 1500);\n } catch {\n // clipboard permission denied or unavailable — button stays as \"Copy\"\n delete btn.dataset.copied;\n }\n }\n\n async _copyPromptSlot(btn: HTMLElement) {\n const slot = this.renderRoot?.querySelector<HTMLSlotElement>('slot[name=\"prompt\"]');\n const nodes = slot?.assignedNodes({ flatten: true }) || [];\n const text = nodes.map((n) => n.textContent || \"\").join(\"\")\n .trim();\n if (!text) return;\n this._copy(text, btn);\n }\n\n _renderWorksIn() {\n if (!this.worksIn.length) return nothing;\n return html`\n <div class=\"bd-installoptions-worksin\">\n <span class=\"bd-installoptions-worksin-label\">Works in</span>\n <div class=\"bd-installoptions-pills\">\n ${this.worksIn.map(\n ({ label, initial, color }) => html`\n <span class=\"bd-installoptions-pill\">\n <span\n class=\"bd-installoptions-pill-icon\"\n style=\"background:${color || \"var(--color-neutral-800)\"}\"\n aria-hidden=\"true\"\n >${initial || label?.[0] || \"?\"}</span>\n ${label}\n </span>\n `\n )}\n </div>\n </div>\n `;\n }\n\n /* Every card's button says \"Copy\", so each is described by its card's\n title: a screen reader reading the buttons on their own hears which\n command each one copies. */\n _renderCard(card: InstallCard, index: number) {\n const titleId = `bd-installoptions-card-title-${index}`;\n return html`\n <div class=\"bd-installoptions-card\">\n <div class=\"bd-installoptions-card-head\">\n <bd-h as=\"h3\" id=${titleId} class=\"bd-installoptions-card-title\">${card.title}</bd-h>\n ${card.badge\n ? html`<span class=\"bd-installoptions-badge\">${card.badge}</span>`\n : nothing}\n </div>\n\n ${card.description\n ? html`<bd-p variant=\"small\" class=\"bd-installoptions-card-description\">${card.description}</bd-p>`\n : nothing}\n\n ${card.code\n ? html`\n <div class=\"bd-installoptions-code\">\n <pre class=\"bd-installoptions-code-text\">${card.code}</pre>\n <button\n type=\"button\"\n class=\"bd-installoptions-copy\"\n aria-describedby=${titleId}\n @click=${(e: MouseEvent) => this._copy(card.code!, e.currentTarget as HTMLButtonElement)}\n >Copy</button>\n </div>\n `\n : nothing}\n\n ${card.linkLabel\n ? html`\n <bd-link href=${card.linkHref || \"#\"} variant=\"primary\" class=\"bd-installoptions-card-link\">\n ${card.linkLabel} →\n </bd-link>\n `\n : nothing}\n </div>\n `;\n }\n\n _renderPromptPanel() {\n if (!this.promptPanel) return nothing;\n\n return html`\n <div class=\"bd-installoptions-promptpanel\">\n <bd-h as=\"h2\" id=\"bd-installoptions-prompt-title\" class=\"bd-installoptions-prompt-title\">\n <slot name=\"prompt-title\"></slot>\n </bd-h>\n\n <bd-p variant=\"regular\" class=\"bd-installoptions-prompt-description\">\n <slot name=\"prompt-description\"></slot>\n </bd-p>\n\n ${this.promptLabel\n ? html`<span class=\"bd-installoptions-prompt-label\">${this.promptLabel}</span>`\n : nothing}\n\n <div class=\"bd-installoptions-prompt-code\">\n <div class=\"bd-installoptions-prompt-code-text\">\n <slot name=\"prompt\"></slot>\n </div>\n <button\n type=\"button\"\n class=\"bd-installoptions-copy bd-installoptions-copy--prompt\"\n aria-describedby=\"bd-installoptions-prompt-title\"\n @click=${(e: MouseEvent) => this._copyPromptSlot(e.currentTarget as HTMLButtonElement)}\n >Copy</button>\n </div>\n\n <div class=\"bd-installoptions-prompt-note\">\n <slot name=\"prompt-note\"></slot>\n </div>\n\n <bd-p variant=\"regular\" class=\"bd-installoptions-prompt-footer\">\n <slot name=\"prompt-footer\"></slot>\n </bd-p>\n </div>\n `;\n }\n\n render() {\n return html`\n <div class=\"bd-installoptions-container\">\n <div class=\"bd-ensemble\">\n ${this.eyebrow\n ? html`<bd-p variant=\"regular\" class=\"bd-installoptions-eyebrow\">${this.eyebrow}</bd-p>`\n : nothing}\n\n <bd-h as=\"h2\" class=\"bd-installoptions-title\">${this.title}</bd-h>\n\n ${this.description\n ? html`<bd-p variant=\"regular\" class=\"bd-installoptions-description\">${this.description}</bd-p>`\n : nothing}\n\n ${this._renderWorksIn()}\n\n <!--\n Slot generic (fara nume) -- pentru orice continut care nu se\n potriveste cu grid-ul fix de carduri (ex: un tabel, o casuta\n checklist, o nota de avertizare). Cardurile ramase implicite\n (this.cards) tot se randeaza mai jos daca sunt pasate; cele doua\n pot coexista sau poti folosi doar unul din ele.\n -->\n <div class=\"bd-installoptions-body\">\n <slot></slot>\n </div>\n\n ${this.cards.length\n ? html`\n <div class=\"bd-installoptions-grid\">\n ${this.cards.map((card, index) => this._renderCard(card, index))}\n </div>\n `\n : nothing}\n\n ${this._renderPromptPanel()}\n </div>\n <span class=\"bd-installoptions-status\" role=\"status\">${this._announcer.status}</span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-install-options\": BdInstallOptions;\n }\n}\n"],"mappings":"A,sgBA0BA,IACMI,EADN,cAC+BC,CAAW,C,OACxB,KAAA,OAAA,CAACC,EAAQC,EAAaP,CAAiB,C,CAsBvD,aAAc,CACZ,MAAM,EApBE,KAAA,QAAA,GAEF,KAAA,MAAA,GAEM,KAAA,YAAA,GAEO,KAAA,QAAA,CAAC,EAEC,KAAA,MAAA,CAAC,EAKV,KAAA,YAAA,GAEA,KAAA,YAAA,GASZ,KAAK,WAAa,IAAIQ,EAAU,IAAI,CACtC,CAWA,MAAM,MAAM,EAAc,EAAkB,CAC1C,GAAI,aAAYC,EAAI,SACpB,GAAI,QAAQ,OAAS,GACrB,GAAI,CACF,MAAM,UAAU,UAAU,UAAUC,CAAI,EACxC,IAAMC,EAAWF,EAAI,YACrB,EAAI,YAAc,SAClB,KAAK,WAAW,IAAI,QAAQ,EAC5B,eAAiB,CACf,EAAI,YAAcE,EAClB,OAAOF,EAAI,QAAQ,MACrB,EAAG,IAAI,CACT,MAAQ,CAEN,OAAOA,EAAI,QAAQ,MACrB,CAbqB,CAcvB,CAEA,MAAM,gBAAgB,EAA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AEoC,KAAK,MAAM;;YAEzD,KAAK,YACH,CAAI,iEAAiE,KAAK,YAAY,SACtFA,EAAQ;;YAEV,KAAK,eAAe,EAAE;;;;;;;;;;;;;YAatB,KAAK,MAAM,OACT,CAAI;;oBAEE,KAAK,MAAM,KAAK,EAAM,IAAU,KAAK,YAAYG,EAAMD,CAAK,CAAC,EAAE;;gBAGrEF,EAAQ;;YAEV,KAAK,mBAAmB,EAAE;;+DAEyB,KAAK,WAAW,OAAO;;KAGpF,CACF,EAnNGf,EAAA,CAAAoB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAjB,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAoB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAjB,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAoB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAjB,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAoB,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAjB,EAAA,UAAA,UAAA,IAAA,EAAA,EAExBH,EAAA,CAAAoB,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAjB,EAAA,UAAA,QAAA,IAAA,EAAA,EAKxBH,EAAA,CAAAoB,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,cAAe,CAAC,CAAA,EAAAjB,EAAA,UAAA,cAAA,IAAA,EAAA,EAEpEH,EAAA,CAAAoB,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,CAAA,EAAAjB,EAAA,UAAA,cAAA,IAAA,EAAA,EAnBtD,EAAAH,EAAA,CAAAqB,EAAc,oBAAoB,CAAA,EAAAlB,CAAA"}
1
+ {"version":3,"file":"install-options.js","names":["installOptionsCSS","_decorate","__decorate","install_options_css_default","BdInstallOptions","LitElement","ensembleCSS","Announcer","btn","text","original","n","color","initial","label","nothing","titleId","index","card","e","property","defineElement"],"sources":["../../../../src/components/install-options/install-options.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 \"#components/link/link.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport installOptionsCSS from \"./install-options.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { Announcer } from \"#shared/announcer.ts\";\n\ninterface WorksIn {\n label? : string;\n initial?: string;\n color? : string;\n}\n\ninterface InstallCard {\n title : string;\n badge? : string;\n description?: string;\n code? : string;\n linkLabel? : string;\n linkHref? : string;\n}\n\n@defineElement(\"bd-install-options\")\nclass BdInstallOptions extends LitElement {\n static styles = [ensembleCSS, installOptionsCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n worksIn: WorksIn[] = []; // [{ label, initial, color }]\n @property({ type: Array })\n cards: InstallCard[] = []; // [{ title, badge, description, code, linkLabel, linkHref }]\n\n // \"Then just ask\" sub-panel — rendered only when this is set, so a\n // consumer of bd-install-options who doesn't need it gets nothing extra.\n @property({ type: Boolean, reflect: true, attribute: \"prompt-panel\" })\n promptPanel = false;\n @property({ type: String, attribute: \"prompt-label\" })\n promptLabel = \"\"; // small mono label above the prompt block\n\n _announcer: Announcer;\n\n constructor() {\n super();\n /* \"Copied\" is said, not only shown. The button's own text changes too,\n but a screen reader does not reliably read a focused button's new name,\n so the message goes through the live region (shared/announcer.ts). */\n this._announcer = new Announcer(this);\n }\n\n /* The button says \"Copied\" for 1.5s and ignores presses meanwhile. It is not\n disabled for it: disabling the focused button threw keyboard focus back to\n the top of the page, mid-card.\n\n The flag is data-copied, present or absent: its value is \"\", which reads\n as false, so asking for its value let a second press through, and that\n press took \"Copied\" as the text to restore. It is set before the\n clipboard is awaited, so two presses in quick succession cannot both\n start a copy. */\n async _copy(text: string, btn: HTMLElement) {\n if (\"copied\" in btn.dataset) return;\n btn.dataset.copied = \"\";\n try {\n await navigator.clipboard.writeText(text);\n const original = btn.textContent;\n btn.textContent = \"Copied\";\n this._announcer.say(\"Copied\");\n setTimeout(() => {\n btn.textContent = original;\n delete btn.dataset.copied;\n }, 1500);\n } catch {\n // clipboard permission denied or unavailable — button stays as \"Copy\"\n delete btn.dataset.copied;\n }\n }\n\n async _copyPromptSlot(btn: HTMLElement) {\n const slot = this.renderRoot?.querySelector<HTMLSlotElement>('slot[name=\"prompt\"]');\n const nodes = slot?.assignedNodes({ flatten: true }) || [];\n const text = nodes.map((n) => n.textContent || \"\").join(\"\")\n .trim();\n if (!text) return;\n this._copy(text, btn);\n }\n\n _renderWorksIn() {\n if (!this.worksIn.length) return nothing;\n return html`\n <div class=\"bd-installoptions-worksin\">\n <span class=\"bd-installoptions-worksin-label\">Works in</span>\n <div class=\"bd-installoptions-pills\">\n ${this.worksIn.map(\n ({ label, initial, color }) => html`\n <span class=\"bd-installoptions-pill\">\n <span\n class=\"bd-installoptions-pill-icon\"\n style=\"background:${color || \"var(--color-neutral-800)\"}\"\n aria-hidden=\"true\"\n >${initial || label?.[0] || \"?\"}</span>\n ${label}\n </span>\n `\n )}\n </div>\n </div>\n `;\n }\n\n /* Every card's button says \"Copy\", so each is described by its card's\n title: a screen reader reading the buttons on their own hears which\n command each one copies. */\n _renderCard(card: InstallCard, index: number) {\n const titleId = `bd-installoptions-card-title-${index}`;\n return html`\n <div class=\"bd-installoptions-card\">\n <div class=\"bd-installoptions-card-head\">\n <bd-h as=\"h3\" id=${titleId} class=\"bd-installoptions-card-title\">${card.title}</bd-h>\n ${card.badge\n ? html`<span class=\"bd-installoptions-badge\">${card.badge}</span>`\n : nothing}\n </div>\n\n ${card.description\n ? html`<bd-p variant=\"small\" class=\"bd-installoptions-card-description\">${card.description}</bd-p>`\n : nothing}\n\n ${card.code\n ? html`\n <div class=\"bd-installoptions-code\">\n <pre class=\"bd-installoptions-code-text\">${card.code}</pre>\n <button\n type=\"button\"\n class=\"bd-installoptions-copy\"\n aria-describedby=${titleId}\n @click=${(e: MouseEvent) => this._copy(card.code!, e.currentTarget as HTMLButtonElement)}\n >Copy</button>\n </div>\n `\n : nothing}\n\n ${card.linkLabel\n ? html`\n <bd-link href=${card.linkHref || \"#\"} variant=\"primary\" class=\"bd-installoptions-card-link\">\n ${card.linkLabel} →\n </bd-link>\n `\n : nothing}\n </div>\n `;\n }\n\n _renderPromptPanel() {\n if (!this.promptPanel) return nothing;\n\n return html`\n <div class=\"bd-installoptions-promptpanel\">\n <bd-h as=\"h2\" id=\"bd-installoptions-prompt-title\" class=\"bd-installoptions-prompt-title\">\n <slot name=\"prompt-title\"></slot>\n </bd-h>\n\n <bd-p variant=\"regular\" class=\"bd-installoptions-prompt-description\">\n <slot name=\"prompt-description\"></slot>\n </bd-p>\n\n ${this.promptLabel\n ? html`<span class=\"bd-installoptions-prompt-label\">${this.promptLabel}</span>`\n : nothing}\n\n <div class=\"bd-installoptions-prompt-code\">\n <div class=\"bd-installoptions-prompt-code-text\">\n <slot name=\"prompt\"></slot>\n </div>\n <button\n type=\"button\"\n class=\"bd-installoptions-copy bd-installoptions-copy--prompt\"\n aria-describedby=\"bd-installoptions-prompt-title\"\n @click=${(e: MouseEvent) => this._copyPromptSlot(e.currentTarget as HTMLButtonElement)}\n >Copy</button>\n </div>\n\n <div class=\"bd-installoptions-prompt-note\">\n <slot name=\"prompt-note\"></slot>\n </div>\n\n <bd-p variant=\"regular\" class=\"bd-installoptions-prompt-footer\">\n <slot name=\"prompt-footer\"></slot>\n </bd-p>\n </div>\n `;\n }\n\n render() {\n return html`\n <div class=\"bd-installoptions-container\">\n <div class=\"bd-ensemble\">\n ${this.eyebrow\n ? html`<bd-p variant=\"regular\" class=\"bd-installoptions-eyebrow\">${this.eyebrow}</bd-p>`\n : nothing}\n\n <bd-h as=\"h2\" class=\"bd-installoptions-title\">${this.title}</bd-h>\n\n ${this.description\n ? html`<bd-p variant=\"regular\" class=\"bd-installoptions-description\">${this.description}</bd-p>`\n : nothing}\n\n ${this._renderWorksIn()}\n\n <!--\n Slot generic (fara nume) -- pentru orice continut care nu se\n potriveste cu grid-ul fix de carduri (ex: un tabel, o casuta\n checklist, o nota de avertizare). Cardurile ramase implicite\n (this.cards) tot se randeaza mai jos daca sunt pasate; cele doua\n pot coexista sau poti folosi doar unul din ele.\n -->\n <div class=\"bd-installoptions-body\">\n <slot></slot>\n </div>\n\n ${this.cards.length\n ? html`\n <div class=\"bd-installoptions-grid\">\n ${this.cards.map((card, index) => this._renderCard(card, index))}\n </div>\n `\n : nothing}\n\n ${this._renderPromptPanel()}\n </div>\n <span class=\"bd-installoptions-status\" role=\"status\">${this._announcer.status}</span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-install-options\": BdInstallOptions;\n }\n}\n"],"mappings":"A,qfA2BA,IACMI,EADN,cAC+BC,CAAW,C,OACxB,KAAA,OAAA,CAACC,EAAaN,CAAiB,C,CAsB/C,aAAc,CACZ,MAAM,EApBE,KAAA,QAAA,GAEF,KAAA,MAAA,GAEM,KAAA,YAAA,GAEO,KAAA,QAAA,CAAC,EAEC,KAAA,MAAA,CAAC,EAKV,KAAA,YAAA,GAEA,KAAA,YAAA,GASZ,KAAK,WAAa,IAAIO,EAAU,IAAI,CACtC,CAWA,MAAM,MAAM,EAAc,EAAkB,CAC1C,GAAI,aAAYC,EAAI,SACpB,GAAI,QAAQ,OAAS,GACrB,GAAI,CACF,MAAM,UAAU,UAAU,UAAUC,CAAI,EACxC,IAAMC,EAAWF,EAAI,YACrB,EAAI,YAAc,SAClB,KAAK,WAAW,IAAI,QAAQ,EAC5B,eAAiB,CACf,EAAI,YAAcE,EAClB,OAAOF,EAAI,QAAQ,MACrB,EAAG,IAAI,CACT,MAAQ,CAEN,OAAOA,EAAI,QAAQ,MACrB,CAbqB,C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AK,QAAQ,SAC9EA,EAAQ;;0DAEoC,KAAK,MAAM;;YAEzD,KAAK,YACH,CAAI,iEAAiE,KAAK,YAAY,SACtFA,EAAQ;;YAEV,KAAK,eAAe,EAAE;;;;;;;;;;;;;YAatB,KAAK,MAAM,OACT,CAAI;;oBAEE,KAAK,MAAM,KAAK,EAAM,IAAU,KAAK,YAAYG,EAAMD,CAAK,CAAC,EAAE;;gBAGrEF,EAAQ;;YAEV,KAAK,mBAAmB,EAAE;;+DAEyB,KAAK,WAAW,OAAO;;KAGpF,CACF,EAnNGd,EAAA,CAAAmB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAhB,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAmB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAhB,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAmB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAhB,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAmB,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAhB,EAAA,UAAA,UAAA,IAAA,EAAA,EAExBH,EAAA,CAAAmB,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAhB,EAAA,UAAA,QAAA,IAAA,EAAA,EAKxBH,EAAA,CAAAmB,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,cAAe,CAAC,CAAA,EAAAhB,EAAA,UAAA,cAAA,IAAA,EAAA,EAEpEH,EAAA,CAAAmB,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,CAAA,EAAAhB,EAAA,UAAA,cAAA,IAAA,EAAA,EAnBtD,EAAAH,EAAA,CAAAoB,EAAc,oBAAoB,CAAA,EAAAjB,CAAA"}
@@ -35,7 +35,7 @@ declare class BdLink extends LitElement {
35
35
  * is drawn in currentColor, so it takes the link's ink in every variant,
36
36
  * state and surface without a rule of its own.
37
37
  */
38
- get _arrow(): import("lit-html").TemplateResult<1> | typeof nothing;
38
+ get _arrow(): typeof nothing | import("lit-html").TemplateResult<1>;
39
39
  /**
40
40
  * font-size is a type-scale step and color is a semantic role; both are
41
41
  * resolved to token references by shared/token-scales.ts, and anything off
@@ -22,7 +22,7 @@ export declare class BdListItem extends LitElement {
22
22
  disconnectedCallback(): void;
23
23
  updated(changed: PropertyValues<this>): void;
24
24
  render(): import("lit-html").TemplateResult<1>;
25
- _renderMarker(): import("lit-html").TemplateResult<1> | typeof nothing;
25
+ _renderMarker(): typeof nothing | import("lit-html").TemplateResult<1>;
26
26
  static styles: import("lit").CSSResult[];
27
27
  }
28
28
  declare global {
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type PropertyValues } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../button/button.js";
3
4
  import "../icons/pause-icon.js";
4
5
  import "../icons/play-icon.js";
@@ -1,13 +1,13 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import{spacing as n}from"../shared/token-scales.js";import r from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as i}from"../shared/ensemble.css.js";import"../button/button.js";import"../icons/pause-icon.js";import"../icons/play-icon.js";import{logoMarqueeCSS as a}from"./logo-marquee.css.js";import{LitElement as o,html as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=class extends o{static{this.styles=[t,i,a]}constructor(){super(),this.label=``,this.duration=35,this.gap=`48`,this.paused=!1,this.pauseLabel=`Pause the moving logos`,this.playLabel=`Play the moving logos`,this._copies=1,this._frame=0,this._resize=new ResizeObserver(()=>{cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._measure())})}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._observe()}disconnectedCallback(){super.disconnectedCallback(),this._resize.disconnect(),cancelAnimationFrame(this._frame)}firstUpdated(){this._observe()}_observe(){this._resize.observe(this.renderRoot.querySelector(`.viewport`)),this._resize.observe(this.renderRoot.querySelector(`.group`))}_measure(){let e=this.renderRoot.querySelector(`.viewport`),t=this.renderRoot.querySelector(`.group`);if(!e||!t||!t.offsetWidth)return;let n=Math.max(1,Math.ceil(e.offsetWidth/t.offsetWidth));n!==this._copies&&(this._copies=n)}_onSlotChange(){this._fillCopies(),this._measure()}_fillCopies(){let e=this.renderRoot.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0});for(let e of this.renderRoot.querySelectorAll(`.copy`))e.replaceChildren(...t.map(e=>e.cloneNode(!0)))}updated(e){e.has(`_copies`)&&this._fillCopies()}_toggle(){this.paused=!this.paused}render(){let e=Array.from({length:this._copies});return s`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{spacing as t}from"../shared/token-scales.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../button/button.js";import"../icons/pause-icon.js";import"../icons/play-icon.js";import{logoMarqueeCSS as i}from"./logo-marquee.css.js";import{LitElement as a,html as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends a{static{this.styles=[r,i]}constructor(){super(),this.label=``,this.duration=35,this.gap=`48`,this.paused=!1,this.pauseLabel=`Pause the moving logos`,this.playLabel=`Play the moving logos`,this._copies=1,this._frame=0,this._resize=new ResizeObserver(()=>{cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._measure())})}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._observe()}disconnectedCallback(){super.disconnectedCallback(),this._resize.disconnect(),cancelAnimationFrame(this._frame)}firstUpdated(){this._observe()}_observe(){this._resize.observe(this.renderRoot.querySelector(`.viewport`)),this._resize.observe(this.renderRoot.querySelector(`.group`))}_measure(){let e=this.renderRoot.querySelector(`.viewport`),t=this.renderRoot.querySelector(`.group`);if(!e||!t||!t.offsetWidth)return;let n=Math.max(1,Math.ceil(e.offsetWidth/t.offsetWidth));n!==this._copies&&(this._copies=n)}_onSlotChange(){this._fillCopies(),this._measure()}_fillCopies(){let e=this.renderRoot.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0});for(let e of this.renderRoot.querySelectorAll(`.copy`))e.replaceChildren(...t.map(e=>e.cloneNode(!0)))}updated(e){e.has(`_copies`)&&this._fillCopies()}_toggle(){this.paused=!this.paused}render(){let e=Array.from({length:this._copies});return o`
2
2
  <section
3
3
  class="bd-ensemble root"
4
4
  aria-label="${this.label}"
5
- style="--bd-logo-marquee-gap: ${n(this.gap)||`var(--spacing-48)`}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies+1};"
5
+ style="--bd-logo-marquee-gap: ${t(this.gap)||`var(--spacing-48)`}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies+1};"
6
6
  >
7
7
  <div class="viewport">
8
8
  <div class="track">
9
9
  <div class="group"><slot @slotchange=${this._onSlotChange}></slot></div>
10
- ${e.map(()=>s`<div class="group copy" aria-hidden="true" inert></div>`)}
10
+ ${e.map(()=>o`<div class="group copy" aria-hidden="true" inert></div>`)}
11
11
  </div>
12
12
  </div>
13
13
  <bd-button
@@ -17,7 +17,7 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
17
17
  icon-only
18
18
  label="${this.paused?this.playLabel:this.pauseLabel}"
19
19
  @click=${this._toggle}
20
- >${this.paused?s`<bd-play-icon size="sm"></bd-play-icon>`:s`<bd-pause-icon size="sm"></bd-pause-icon>`}</bd-button>
20
+ >${this.paused?o`<bd-play-icon size="sm"></bd-play-icon>`:o`<bd-pause-icon size="sm"></bd-pause-icon>`}</bd-button>
21
21
  </section>
22
- `}};r([c({type:String})],u.prototype,`label`,void 0),r([c({type:Number})],u.prototype,`duration`,void 0),r([c({type:String})],u.prototype,`gap`,void 0),r([c({type:Boolean,reflect:!0})],u.prototype,`paused`,void 0),r([c({type:String,attribute:`pause-label`})],u.prototype,`pauseLabel`,void 0),r([c({type:String,attribute:`play-label`})],u.prototype,`playLabel`,void 0),r([l()],u.prototype,`_copies`,void 0),u=r([e(`bd-logo-marquee`)],u);export{u as LogoMarquee};
22
+ `}};n([s({type:String})],l.prototype,`label`,void 0),n([s({type:Number})],l.prototype,`duration`,void 0),n([s({type:String})],l.prototype,`gap`,void 0),n([s({type:Boolean,reflect:!0})],l.prototype,`paused`,void 0),n([s({type:String,attribute:`pause-label`})],l.prototype,`pauseLabel`,void 0),n([s({type:String,attribute:`play-label`})],l.prototype,`playLabel`,void 0),n([c()],l.prototype,`_copies`,void 0),l=n([e(`bd-logo-marquee`)],l);export{l as LogoMarquee};
23
23
  //# sourceMappingURL=logo-marquee.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logo-marquee.js","names":["_decorate","__decorate","LogoMarquee","LitElement","tokens","ensembleCSS","logoMarqueeCSS","viewport","group","copies","slot","items","copy","item","changed","spacing","property","state","defineElement"],"sources":["../../../../src/components/logo-marquee/logo-marquee.ts"],"sourcesContent":["import { LitElement, html, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#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 { spacing } from \"#shared/token-scales.ts\";\nimport { logoMarqueeCSS } from \"./logo-marquee.css.ts\";\n\n/**\n * A row of logos sliding sideways behind an edge fade: the homepage's trusted\n * line (\"#1 most awarded\" and the partner marks) and the award strip under\n * Proven. Drawn in the foundation Figma file as Logo marquee.\n *\n * The logos are the page's: slot them as they are (an <img> with its width\n * and height, an icon, a label). To loop without a seam the row has to be\n * longer than the window, so this element clones the slotted set into its\n * own shadow root as many times as the width needs and moves the whole track\n * by one copy -- the jump back is then exactly one repeat, and invisible. The\n * copies are aria-hidden and inert: a screen reader reads the set once.\n *\n * It moves on its own for longer than five seconds, so it has a pause button\n * (WCAG 2.2.2): holding it on hover or focus was not enough, because the\n * logos are usually images and nothing in the row takes focus. The button\n * sets `paused`, which a page can also set. The pointer or focus on the row\n * still holds it. Under prefers-reduced-motion it never moves -- the set\n * wraps in place instead, so nothing is hidden behind the fade -- and the\n * button goes with the motion.\n */\n@defineElement(\"bd-logo-marquee\")\nexport class LogoMarquee extends LitElement {\n @property({ type: String })\n label = \"\";\n // seconds for one copy to pass: 35 for the partners and the awards alike\n @property({ type: Number })\n duration = 35;\n // a step on the spacing scale, between two logos\n @property({ type: String })\n gap = \"48\";\n @property({ type: Boolean, reflect: true })\n paused = false;\n @property({ type: String, attribute: \"pause-label\" })\n pauseLabel = \"Pause the moving logos\";\n @property({ type: String, attribute: \"play-label\" })\n playLabel = \"Play the moving logos\";\n // copies of the set after the original; at least one, or there is no loop\n @state()\n _copies = 1;\n\n _resize: ResizeObserver;\n _frame = 0;\n\n static styles = [tokens, ensembleCSS, logoMarqueeCSS];\n\n /* A resize is measured on the next frame, not inside the observer's\n delivery. A new copy count re-renders the track, and in WebKit that\n resizes a box this observer watches while the delivery is still running:\n Safari reported \"ResizeObserver loop completed with undelivered\n notifications\" on every homepage load. Measured a frame later, the new\n size is an ordinary delivery of its own. */\n constructor() {\n super();\n this._resize = new ResizeObserver(() => {\n cancelAnimationFrame(this._frame);\n this._frame = requestAnimationFrame(() => this._measure());\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.hasUpdated) this._observe();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._resize.disconnect();\n cancelAnimationFrame(this._frame);\n }\n\n firstUpdated() {\n this._observe();\n }\n\n _observe() {\n this._resize.observe(this.renderRoot.querySelector(\".viewport\")!);\n this._resize.observe(this.renderRoot.querySelector(\".group\")!);\n }\n\n /* One copy must cover the window on its own while the original slides out,\n so a set narrower than the window takes more than one. */\n _measure() {\n const viewport = this.renderRoot.querySelector<HTMLElement>(\".viewport\");\n const group = this.renderRoot.querySelector<HTMLElement>(\".group\");\n if (!viewport || !group || !group.offsetWidth) return;\n const copies = Math.max(1, Math.ceil(viewport.offsetWidth / group.offsetWidth));\n if (copies !== this._copies) this._copies = copies;\n }\n\n _onSlotChange() {\n this._fillCopies();\n this._measure();\n }\n\n _fillCopies() {\n const slot = this.renderRoot.querySelector(\"slot\");\n if (!slot) return;\n const items = slot.assignedElements({ flatten: true });\n for (const copy of this.renderRoot.querySelectorAll(\".copy\")) {\n copy.replaceChildren(...items.map(item => item.cloneNode(true)));\n }\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has(\"_copies\")) this._fillCopies();\n }\n\n _toggle() {\n this.paused = !this.paused;\n }\n\n render() {\n const copies = Array.from({ length: this._copies });\n return html`\n <section\n class=\"bd-ensemble root\"\n aria-label=\"${this.label}\"\n style=\"--bd-logo-marquee-gap: ${spacing(this.gap) || \"var(--spacing-48)\"}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies + 1};\"\n >\n <div class=\"viewport\">\n <div class=\"track\">\n <div class=\"group\"><slot @slotchange=${this._onSlotChange}></slot></div>\n ${copies.map(() => html`<div class=\"group copy\" aria-hidden=\"true\" inert></div>`)}\n </div>\n </div>\n <bd-button\n class=\"toggle\"\n variant=\"ghost\"\n size=\"sm\"\n icon-only\n label=\"${this.paused ? this.playLabel : this.pauseLabel}\"\n @click=${this._toggle}\n >${this.paused\n ? html`<bd-play-icon size=\"sm\"></bd-play-icon>`\n : html`<bd-pause-icon size=\"sm\"></bd-pause-icon>`}</bd-button>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-logo-marquee\": LogoMarquee;\n }\n}\n"],"mappings":"A,qhBAgCO,IAAME,EAAN,cAA0BC,CAAW,C,OAsB1B,KAAA,OAAA,CAACC,EAAQC,EAAaC,CAAc,C,CAQpD,aAAc,CACZ,MAAM,EA7BA,KAAA,MAAA,GAGG,KAAA,SAAA,GAGL,KAAA,IAAA,KAEG,KAAA,OAAA,GAEI,KAAA,WAAA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MarqueeCSS","viewport","group","copies","slot","items","copy","item","changed","spacing","property","state","defineElement"],"sources":["../../../../src/components/logo-marquee/logo-marquee.ts"],"sourcesContent":["import { LitElement, html, 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/button/button.ts\";\nimport \"#components/icons/pause-icon.ts\";\nimport \"#components/icons/play-icon.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { spacing } from \"#shared/token-scales.ts\";\nimport { logoMarqueeCSS } from \"./logo-marquee.css.ts\";\n\n/**\n * A row of logos sliding sideways behind an edge fade: the homepage's trusted\n * line (\"#1 most awarded\" and the partner marks) and the award strip under\n * Proven. Drawn in the foundation Figma file as Logo marquee.\n *\n * The logos are the page's: slot them as they are (an <img> with its width\n * and height, an icon, a label). To loop without a seam the row has to be\n * longer than the window, so this element clones the slotted set into its\n * own shadow root as many times as the width needs and moves the whole track\n * by one copy -- the jump back is then exactly one repeat, and invisible. The\n * copies are aria-hidden and inert: a screen reader reads the set once.\n *\n * It moves on its own for longer than five seconds, so it has a pause button\n * (WCAG 2.2.2): holding it on hover or focus was not enough, because the\n * logos are usually images and nothing in the row takes focus. The button\n * sets `paused`, which a page can also set. The pointer or focus on the row\n * still holds it. Under prefers-reduced-motion it never moves -- the set\n * wraps in place instead, so nothing is hidden behind the fade -- and the\n * button goes with the motion.\n */\n@defineElement(\"bd-logo-marquee\")\nexport class LogoMarquee extends LitElement {\n @property({ type: String })\n label = \"\";\n // seconds for one copy to pass: 35 for the partners and the awards alike\n @property({ type: Number })\n duration = 35;\n // a step on the spacing scale, between two logos\n @property({ type: String })\n gap = \"48\";\n @property({ type: Boolean, reflect: true })\n paused = false;\n @property({ type: String, attribute: \"pause-label\" })\n pauseLabel = \"Pause the moving logos\";\n @property({ type: String, attribute: \"play-label\" })\n playLabel = \"Play the moving logos\";\n // copies of the set after the original; at least one, or there is no loop\n @state()\n _copies = 1;\n\n _resize: ResizeObserver;\n _frame = 0;\n\n static styles = [ensembleCSS, logoMarqueeCSS];\n\n /* A resize is measured on the next frame, not inside the observer's\n delivery. A new copy count re-renders the track, and in WebKit that\n resizes a box this observer watches while the delivery is still running:\n Safari reported \"ResizeObserver loop completed with undelivered\n notifications\" on every homepage load. Measured a frame later, the new\n size is an ordinary delivery of its own. */\n constructor() {\n super();\n this._resize = new ResizeObserver(() => {\n cancelAnimationFrame(this._frame);\n this._frame = requestAnimationFrame(() => this._measure());\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.hasUpdated) this._observe();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._resize.disconnect();\n cancelAnimationFrame(this._frame);\n }\n\n firstUpdated() {\n this._observe();\n }\n\n _observe() {\n this._resize.observe(this.renderRoot.querySelector(\".viewport\")!);\n this._resize.observe(this.renderRoot.querySelector(\".group\")!);\n }\n\n /* One copy must cover the window on its own while the original slides out,\n so a set narrower than the window takes more than one. */\n _measure() {\n const viewport = this.renderRoot.querySelector<HTMLElement>(\".viewport\");\n const group = this.renderRoot.querySelector<HTMLElement>(\".group\");\n if (!viewport || !group || !group.offsetWidth) return;\n const copies = Math.max(1, Math.ceil(viewport.offsetWidth / group.offsetWidth));\n if (copies !== this._copies) this._copies = copies;\n }\n\n _onSlotChange() {\n this._fillCopies();\n this._measure();\n }\n\n _fillCopies() {\n const slot = this.renderRoot.querySelector(\"slot\");\n if (!slot) return;\n const items = slot.assignedElements({ flatten: true });\n for (const copy of this.renderRoot.querySelectorAll(\".copy\")) {\n copy.replaceChildren(...items.map(item => item.cloneNode(true)));\n }\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has(\"_copies\")) this._fillCopies();\n }\n\n _toggle() {\n this.paused = !this.paused;\n }\n\n render() {\n const copies = Array.from({ length: this._copies });\n return html`\n <section\n class=\"bd-ensemble root\"\n aria-label=\"${this.label}\"\n style=\"--bd-logo-marquee-gap: ${spacing(this.gap) || \"var(--spacing-48)\"}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies + 1};\"\n >\n <div class=\"viewport\">\n <div class=\"track\">\n <div class=\"group\"><slot @slotchange=${this._onSlotChange}></slot></div>\n ${copies.map(() => html`<div class=\"group copy\" aria-hidden=\"true\" inert></div>`)}\n </div>\n </div>\n <bd-button\n class=\"toggle\"\n variant=\"ghost\"\n size=\"sm\"\n icon-only\n label=\"${this.paused ? this.playLabel : this.pauseLabel}\"\n @click=${this._toggle}\n >${this.paused\n ? html`<bd-play-icon size=\"sm\"></bd-play-icon>`\n : html`<bd-pause-icon size=\"sm\"></bd-pause-icon>`}</bd-button>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-logo-marquee\": LogoMarquee;\n }\n}\n"],"mappings":"A,ogBAiCO,IAAME,EAAN,cAA0BC,CAAW,C,OAsB1B,KAAA,OAAA,CAACC,EAAaC,CAAc,C,CAQ5C,aAAc,CACZ,MAAM,EA7BA,KAAA,MAAA,GAGG,KAAA,SAAA,GAGL,KAAA,IAAA,KAEG,KAAA,OAAA,GAEI,KAAA,WAAA,yBAED,KAAA,UAAA,wBAGF,KAAA,QAAA,EAGD,KAAA,OAAA,EAYP,KAAK,QAAU,IAAI,mBAAqB,CACtC,qBAAqB,KAAK,MAAM,EAChC,KAAK,OAAS,0BAA4B,KAAK,SAAS,CAAC,CAC3D,CAAC,CACH,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACpB,KAAK,YAAY,KAAK,SAAS,CACrC,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,KAAK,QAAQ,WAAW,EACxB,qBAAqB,KAAK,MAAM,CAClC,CAEA,cAAe,CACb,KAAK,SAAS,CAChB,CAEA,UAAW,CACT,KAAK,QAAQ,QAAQ,KAAK,WAAW,cAAc,WAAW,CAAE,EAChE,KAAK,QAAQ,QAAQ,KAAK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AAA,QAAA,IAAA,EAAA,EAGzBF,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAb,EAAA,UAAA,WAAA,IAAA,EAAA,EAGzBF,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAb,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAe,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAb,EAAA,UAAA,SAAA,IAAA,EAAA,EAEzCF,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,CAAA,EAAAb,EAAA,UAAA,aAAA,IAAA,EAAA,EAEnDF,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,CAAC,CAAA,EAAAb,EAAA,UAAA,YAAA,IAAA,EAAA,EAGlDF,EAAA,CAAAgB,EAAM,CAAA,EAAAd,EAAA,UAAA,UAAA,IAAA,EAAA,EAjBR,EAAAF,EAAA,CAAAiB,EAAc,iBAAiB,CAAA,EAAAf,CAAA,E"}
@@ -1,2 +1,2 @@
1
- import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{BdHero as n}from"/home/runner/work/dex-core/dex-core/packages/dex-system-design/src/vendor/motion-art/motion-art-element.js";var r=`var(--color-surface-brand)`,i=/* @__PURE__ */ new WeakMap;function a(e,t){let n=i.get(e);return n||i.set(e,n=/* @__PURE__ */ new Map),n.has(t)||n.set(t,{...e,substrate:t}),n.get(t)}var o=class extends n{constructor(){super(),this.substrate=!1,this._generatedGround=this.palette.substrate}connectedCallback(){if(super.connectedCallback(),!this.labelFont){let e=getComputedStyle(this).getPropertyValue(`--typography-fontFamily-sans`).trim();e&&(this.labelFont=e)}this._sized=new Promise(e=>{this._resolveSized=e;let t=new ResizeObserver(()=>{t.disconnect(),e()});t.observe(this)})}disconnectedCallback(){this._resolveSized?.(),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),this.palette?.substrate===this._generatedGround&&(this.palette=a(this.palette,r))}runClock(){let e=this.palette;if(e?.substrate===r){let t=getComputedStyle(this).getPropertyValue(`--color-surface-brand`).trim();this.palette=a(e,t||this._generatedGround)}try{super.runClock()}finally{this.palette=e}}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._sized,await super.getUpdateComplete()&&e}};o=t([e(`bd-motion-art`)],o);export{o as MotionArt};
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{BdHero as n}from"../../vendor/motion-art/motion-art-element.js";var r=`var(--color-surface-brand)`,i=/* @__PURE__ */ new WeakMap;function a(e,t){let n=i.get(e);return n||i.set(e,n=/* @__PURE__ */ new Map),n.has(t)||n.set(t,{...e,substrate:t}),n.get(t)}var o=class extends n{constructor(){super(),this.substrate=!1,this._generatedGround=this.palette.substrate}connectedCallback(){if(super.connectedCallback(),!this.labelFont){let e=getComputedStyle(this).getPropertyValue(`--typography-fontFamily-sans`).trim();e&&(this.labelFont=e)}this._sized=new Promise(e=>{this._resolveSized=e;let t=new ResizeObserver(()=>{t.disconnect(),e()});t.observe(this)})}disconnectedCallback(){this._resolveSized?.(),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),this.palette?.substrate===this._generatedGround&&(this.palette=a(this.palette,r))}runClock(){let e=this.palette;if(e?.substrate===r){let t=getComputedStyle(this).getPropertyValue(`--color-surface-brand`).trim();this.palette=a(e,t||this._generatedGround)}try{super.runClock()}finally{this.palette=e}}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._sized,await super.getUpdateComplete()&&e}};o=t([e(`bd-motion-art`)],o);export{o as MotionArt};
2
2
  //# sourceMappingURL=motion-art.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"motion-art.js","names":["MotionArtElement","_decorate","__decorate","BRAND_GROUND","grounded","onGround","byGround","palette","ground","MotionArt","BdHero","sans","resolve","first","changed","defineElement"],"sources":["../../../../src/components/motion-art/motion-art.ts"],"sourcesContent":["import type { PropertyValues } from \"lit\";\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 { BdHero as MotionArtElement, type MotionArtPalette } from \"#vendor/motion-art/motion-art-element.js\";\n\nconst BRAND_GROUND = \"var(--color-surface-brand)\";\n\n/* Each palette made once per ground and then reused: the generated element\n restarts its clock whenever its palette is a different object. */\nconst grounded = new WeakMap<MotionArtPalette, Map<string | undefined, MotionArtPalette>>();\nfunction onGround(palette: MotionArtPalette, ground: string | undefined) {\n let byGround = grounded.get(palette);\n if (!byGround) grounded.set(palette, byGround = new Map());\n if (!byGround.has(ground)) byGround.set(ground, { ...palette, substrate: ground });\n return byGround.get(ground)!;\n}\n\n/**\n * The homepage's animated illustrations, one canvas each, square:\n * brand-surface the B on a glass sphere of network (bd-hero, media slot)\n * mesh-globe a turning globe with three badges (consumer AI card)\n * layer-stack four platform layers with captions (enterprise AI card)\n * geo-core a geodesic cage round a core (Labs AI card)\n *\n * The element is generated outside this package and vendored as is; see\n * src/vendor/motion-art/README.md. The generated class is still called BdHero;\n * this module imports it as MotionArtElement and registers it under the\n * package's own name, because bd-hero is the homepage band.\n *\n * Three things differ from the generated element:\n * - no substrate: it draws on a transparent canvas, so the ground is the\n * component's own --color-surface-brand and a partner brand shows through;\n * - the brand tones' ground colour is that token too, where the generated\n * element paints its own blue -- see willUpdate();\n * - the pill and badge type is the foundation's sans, read from the token.\n *\n * It draws only while on screen, holds a still frame under\n * prefers-reduced-motion, and stops on `paused`. It draws no control of its\n * own, and the hero and the brand bento card that hold it add none.\n */\n@defineElement(\"bd-motion-art\")\nexport class MotionArt extends MotionArtElement {\n _generatedGround: string | undefined;\n _sized? : Promise<void>;\n _resolveSized? : () => void;\n\n constructor() {\n super();\n this.substrate = false;\n // The generated element starts on its brand tone, so this is the blue it is drawn on.\n this._generatedGround = this.palette.substrate;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.labelFont) {\n const sans = getComputedStyle(this).getPropertyValue(\"--typography-fontFamily-sans\")\n .trim();\n if (sans) this.labelFont = sans;\n }\n /* The art takes its size from its first ResizeObserver delivery, and until\n then has no tile and draws nothing. That delivery comes a frame after\n connect, after the generated element's own observer, which it follows\n because observers deliver in the order they were created. */\n this._sized = new Promise<void>(resolve => {\n this._resolveSized = resolve;\n const first = new ResizeObserver(() => { first.disconnect(); resolve(); });\n first.observe(this);\n });\n }\n\n disconnectedCallback() {\n // Removed before its first delivery: nothing is coming, so nobody waits.\n this._resolveSized?.();\n super.disconnectedCallback();\n }\n\n /* The brand and solid tones were drawn on that blue and paint with it\n wherever the ground should show through: the caption and badge type,\n knocked out of a white pill, and the faces the canvas hides behind\n others. Here the ground is --color-surface-brand, so they take that,\n through the custom property itself so the type follows the brand. */\n willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (this.palette?.substrate === this._generatedGround) this.palette = onGround(this.palette, BRAND_GROUND);\n }\n\n /* A canvas takes no var(): the clock gets the colour the property resolves\n to when it starts, and keeps it until the next update starts another. */\n runClock() {\n const palette = this.palette;\n if (palette?.substrate === BRAND_GROUND) {\n const ground = getComputedStyle(this).getPropertyValue(\"--color-surface-brand\")\n .trim();\n this.palette = onGround(palette, ground || this._generatedGround);\n }\n try {\n super.runClock();\n } finally {\n this.palette = palette;\n }\n }\n\n /* updateComplete covers the sizing, so `await el.updateComplete` means the\n art is drawn at its size -- the delivery sets the tile, which is one more\n update. */\n async getUpdateComplete() {\n const first = await super.getUpdateComplete();\n await this._sized;\n return (await super.getUpdateComplete()) && first;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-motion-art\": MotionArt;\n }\n}\n"],"mappings":"A,ySAMA,IAAMG,EAAe,6BAIfC,kBAAW,IAAI,QACrB,SAASC,EAAS,EAA2B,EAA4B,CACvE,IAAIC,EAAWF,EAAS,IAAIG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M,MAAM,kBAAkB,GAAMA,CAC9C,CACF,EAvEC,EAAAZ,EAAA,CAAAc,EAAc,eAAe,CAAA,EAAAN,CAAA,E"}
1
+ {"version":3,"file":"motion-art.js","names":["MotionArtElement","_decorate","__decorate","BRAND_GROUND","grounded","onGround","byGround","palette","ground","MotionArt","BdHero","sans","resolve","first","changed","defineElement"],"sources":["../../../../src/components/motion-art/motion-art.ts"],"sourcesContent":["import type { PropertyValues } from \"lit\";\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 { BdHero as MotionArtElement, type MotionArtPalette } from \"#vendor/motion-art/motion-art-element.js\";\n\nconst BRAND_GROUND = \"var(--color-surface-brand)\";\n\n/* Each palette made once per ground and then reused: the generated element\n restarts its clock whenever its palette is a different object. */\nconst grounded = new WeakMap<MotionArtPalette, Map<string | undefined, MotionArtPalette>>();\nfunction onGround(palette: MotionArtPalette, ground: string | undefined) {\n let byGround = grounded.get(palette);\n if (!byGround) grounded.set(palette, byGround = new Map());\n if (!byGround.has(ground)) byGround.set(ground, { ...palette, substrate: ground });\n return byGround.get(ground)!;\n}\n\n/**\n * The homepage's animated illustrations, one canvas each, square:\n * brand-surface the B on a glass sphere of network (bd-hero, media slot)\n * mesh-globe a turning globe with three badges (consumer AI card)\n * layer-stack four platform layers with captions (enterprise AI card)\n * geo-core a geodesic cage round a core (Labs AI card)\n *\n * The element is generated outside this package and vendored as is; see\n * src/vendor/motion-art/README.md. The generated class is still called BdHero;\n * this module imports it as MotionArtElement and registers it under the\n * package's own name, because bd-hero is the homepage band.\n *\n * Three things differ from the generated element:\n * - no substrate: it draws on a transparent canvas, so the ground is the\n * component's own --color-surface-brand and a partner brand shows through;\n * - the brand tones' ground colour is that token too, where the generated\n * element paints its own blue -- see willUpdate();\n * - the pill and badge type is the foundation's sans, read from the token.\n *\n * It draws only while on screen, holds a still frame under\n * prefers-reduced-motion, and stops on `paused`. It draws no control of its\n * own, and the hero and the brand bento card that hold it add none.\n */\n@defineElement(\"bd-motion-art\")\nexport class MotionArt extends MotionArtElement {\n _generatedGround: string | undefined;\n _sized? : Promise<void>;\n _resolveSized? : () => void;\n\n constructor() {\n super();\n this.substrate = false;\n // The generated element starts on its brand tone, so this is the blue it is drawn on.\n this._generatedGround = this.palette.substrate;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.labelFont) {\n const sans = getComputedStyle(this).getPropertyValue(\"--typography-fontFamily-sans\")\n .trim();\n if (sans) this.labelFont = sans;\n }\n /* The art takes its size from its first ResizeObserver delivery, and until\n then has no tile and draws nothing. That delivery comes a frame after\n connect, after the generated element's own observer, which it follows\n because observers deliver in the order they were created. */\n this._sized = new Promise<void>(resolve => {\n this._resolveSized = resolve;\n const first = new ResizeObserver(() => { first.disconnect(); resolve(); });\n first.observe(this);\n });\n }\n\n disconnectedCallback() {\n // Removed before its first delivery: nothing is coming, so nobody waits.\n this._resolveSized?.();\n super.disconnectedCallback();\n }\n\n /* The brand and solid tones were drawn on that blue and paint with it\n wherever the ground should show through: the caption and badge type,\n knocked out of a white pill, and the faces the canvas hides behind\n others. Here the ground is --color-surface-brand, so they take that,\n through the custom property itself so the type follows the brand. */\n willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (this.palette?.substrate === this._generatedGround) this.palette = onGround(this.palette, BRAND_GROUND);\n }\n\n /* A canvas takes no var(): the clock gets the colour the property resolves\n to when it starts, and keeps it until the next update starts another. */\n runClock() {\n const palette = this.palette;\n if (palette?.substrate === BRAND_GROUND) {\n const ground = getComputedStyle(this).getPropertyValue(\"--color-surface-brand\")\n .trim();\n this.palette = onGround(palette, ground || this._generatedGround);\n }\n try {\n super.runClock();\n } finally {\n this.palette = palette;\n }\n }\n\n /* updateComplete covers the sizing, so `await el.updateComplete` means the\n art is drawn at its size -- the delivery sets the tile, which is one more\n update. */\n async getUpdateComplete() {\n const first = await super.getUpdateComplete();\n await this._sized;\n return (await super.getUpdate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EAASE,EAASC,GAAU,KAAK,gBAAgB,CAClE,CACA,GAAI,CACF,MAAM,SAAS,CACjB,QAAU,CACR,KAAK,QAAUD,CACjB,CACF,CAKA,MAAM,mBAAoB,CACxB,IAAMM,EAAQ,MAAM,MAAM,kBAAkB,EAE5C,OADA,MAAM,KAAK,OACH,MAAM,MAAM,kBAAkB,GAAMA,CAC9C,CACF,EAvEC,EAAAZ,EAAA,CAAAc,EAAc,eAAe,CAAA,EAAAN,CAAA,E"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "../paragraph/paragraph.js";
4
5
  interface OverviewFact {
@@ -1,23 +1,23 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import i from"./overview.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends a{constructor(...e){super(...e),this.title=``,this.description=``,this.facts=[]}static{this.styles=[t,r,i]}render(){return o`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import r from"./overview.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends i{constructor(...e){super(...e),this.title=``,this.description=``,this.facts=[]}static{this.styles=[n,r]}render(){return a`
2
2
  <div class="bd-ensemble bd-infopanel-container">
3
- ${this.title?o`
3
+ ${this.title?a`
4
4
  <bd-h as="h2" class="bd-infopanel-title">
5
5
  <slot name="title">${this.title}</slot>
6
6
  </bd-h>
7
- `:s}
7
+ `:o}
8
8
 
9
9
  <div class="bd-infopanel-left">
10
- ${this.description?o`
10
+ ${this.description?a`
11
11
  <bd-p variant="large" class="bd-infopanel-description">
12
12
  <slot name="description">${this.description}</slot>
13
13
  </bd-p>
14
- `:s}
14
+ `:o}
15
15
 
16
16
  <slot></slot>
17
17
  </div>
18
18
 
19
19
  <div class="bd-infopanel-right">
20
- ${this.facts.map(e=>o`
20
+ ${this.facts.map(e=>a`
21
21
  <div class="bd-infopanel-row">
22
22
  <div class="bd-infopanel-divider"></div>
23
23
  <bd-p variant="xsmall" class="bd-infopanel-label">${e.label}</bd-p>
@@ -27,5 +27,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
27
27
  <slot name="facts"></slot>
28
28
  </div>
29
29
  </div>
30
- `}};n([c({type:String})],l.prototype,`title`,void 0),n([c({type:String})],l.prototype,`description`,void 0),n([c({type:Array})],l.prototype,`facts`,void 0),l=n([e(`bd-overview`)],l);
30
+ `}};t([s({type:String})],c.prototype,`title`,void 0),t([s({type:String})],c.prototype,`description`,void 0),t([s({type:Array})],c.prototype,`facts`,void 0),c=t([e(`bd-overview`)],c);
31
31
  //# sourceMappingURL=overview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"overview.js","names":["infoPanelCSS","_decorate","__decorate","overview_css_default","Overview","LitElement","_args","tokens","ensembleCSS","nothing","fact","property","defineElement"],"sources":["../../../../src/components/overview/overview.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport infoPanelCSS from \"./overview.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface OverviewFact {\n label: string;\n value: string;\n}\n\n@defineElement(\"bd-overview\")\nclass Overview extends LitElement {\n static styles = [tokens, ensembleCSS, infoPanelCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n facts: OverviewFact[] = []; // [{ label: String, value: String }]\n\n render() {\n return html`\n <div class=\"bd-ensemble bd-infopanel-container\">\n ${this.title\n ? html`\n <bd-h as=\"h2\" class=\"bd-infopanel-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `\n : nothing}\n\n <div class=\"bd-infopanel-left\">\n ${this.description\n ? html`\n <bd-p variant=\"large\" class=\"bd-infopanel-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <slot></slot>\n </div>\n\n <div class=\"bd-infopanel-right\">\n ${this.facts.map(\n (fact) => html`\n <div class=\"bd-infopanel-row\">\n <div class=\"bd-infopanel-divider\"></div>\n <bd-p variant=\"xsmall\" class=\"bd-infopanel-label\">${fact.label}</bd-p>\n <bd-p variant=\"regular\" class=\"bd-infopanel-value\">${fact.value}</bd-p>\n </div>\n `\n )}\n <slot name=\"facts\"></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-overview\": Overview;\n }\n}"],"mappings":"A,obAcA,IACMI,EADN,cACuBC,CAAW,C,8BAIxB,KAAA,MAAA,GAEM,KAAA,YAAA,GAEU,KAAA,MAAA,CAAC,C,QAPT,KAAA,OAAA,CAACE,EAAQC,EAAaR,CAAY,C,CASlD,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCS,EAAQ;;;YAGR,KAAK,YACH,CAAI;;6CAE2B,KAAK,YAAY;;gBAGhDA,EAAQ;;;;;;YAMV,KAAK,MAAM,IACV,GAAS,CAAI;;;oEAG0CC,EAAK,MAAM;qEACVA,EAAK,MAAM;;aAGtE,EAAE;;;;KAKV,CACF,EA7CGT,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAU,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAW,EAAc,aAAa,CAAA,EAAAR,CAAA"}
1
+ {"version":3,"file":"overview.js","names":["infoPanelCSS","_decorate","__decorate","overview_css_default","Overview","LitElement","_args","ensembleCSS","nothing","fact","property","defineElement"],"sources":["../../../../src/components/overview/overview.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 \"#components/paragraph/paragraph.ts\";\nimport infoPanelCSS from \"./overview.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface OverviewFact {\n label: string;\n value: string;\n}\n\n@defineElement(\"bd-overview\")\nclass Overview extends LitElement {\n static styles = [ensembleCSS, infoPanelCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n facts: OverviewFact[] = []; // [{ label: String, value: String }]\n\n render() {\n return html`\n <div class=\"bd-ensemble bd-infopanel-container\">\n ${this.title\n ? html`\n <bd-h as=\"h2\" class=\"bd-infopanel-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `\n : nothing}\n\n <div class=\"bd-infopanel-left\">\n ${this.description\n ? html`\n <bd-p variant=\"large\" class=\"bd-infopanel-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <slot></slot>\n </div>\n\n <div class=\"bd-infopanel-right\">\n ${this.facts.map(\n (fact) => html`\n <div class=\"bd-infopanel-row\">\n <div class=\"bd-infopanel-divider\"></div>\n <bd-p variant=\"xsmall\" class=\"bd-infopanel-label\">${fact.label}</bd-p>\n <bd-p variant=\"regular\" class=\"bd-infopanel-value\">${fact.value}</bd-p>\n </div>\n `\n )}\n <slot name=\"facts\"></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-overview\": Overview;\n }\n}"],"mappings":"A,maAeA,IACMI,EADN,cACuBC,CAAW,C,8BAIxB,KAAA,MAAA,GAEM,KAAA,YAAA,GAEU,KAAA,MAAA,CAAC,C,QAPT,KAAA,OAAA,CAACE,EAAaP,CAAY,C,CAS1C,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCQ,EAAQ;;;YAGR,KAAK,YACH,CAAI;;6CAE2B,KAAK,YAAY;;gBAGhDA,EAAQ;;;;;;YAMV,KAAK,MAAM,IACV,GAAS,CAAI;;;oEAG0CC,EAAK,MAAM;qEACVA,EAAK,MAAM;;aAGtE,EAAE;;;;KAKV,CACF,EA7CGR,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAS,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAS,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAU,EAAc,aAAa,CAAA,EAAAP,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../icons/bd-ai-icon.js";
3
4
  import "../link/link.js";
4
5
  interface PageSwitcherItem {
@@ -1,18 +1,18 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../link/link.js";import"../icons/bd-ai-icon.js";import{pageSwitcherStyles as i}from"./page-switcher.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends a{constructor(...e){super(...e),this.items=[]}static{this.styles=[t,r,i]}render(){return o`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import"../link/link.js";import"../icons/bd-ai-icon.js";import{pageSwitcherStyles as r}from"./page-switcher.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends i{constructor(...e){super(...e),this.items=[]}static{this.styles=[n,r]}render(){return a`
2
2
  <div class="bd-ensemble inner">
3
3
  <bd-ai-icon class="logo" width="200" height="24"></bd-ai-icon>
4
4
 
5
5
  <nav aria-label="Product navigation">
6
- ${this.items.map(({title:e,href:t,active:n})=>o`
6
+ ${this.items.map(({title:e,href:t,active:n})=>a`
7
7
  <bd-link
8
8
  href=${t}
9
9
  variant="primary"
10
10
  no-underline
11
- current=${n?`page`:s}
11
+ current=${n?`page`:o}
12
12
  class="page-link"
13
- >${e||s}</bd-link>
13
+ >${e||o}</bd-link>
14
14
  `)}
15
15
  </nav>
16
16
  </div>
17
- `}};n([c({type:Array})],l.prototype,`items`,void 0),l=n([e(`bd-page-switcher`)],l);
17
+ `}};t([s({type:Array})],c.prototype,`items`,void 0),c=t([e(`bd-page-switcher`)],c);
18
18
  //# sourceMappingURL=page-switcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-switcher.js","names":["_decorate","__decorate","BdPageSwitcher","LitElement","_args","tokens","ensembleCSS","pageSwitcherStyles","href","active","nothing","title","property","defineElement"],"sources":["../../../../src/components/page-switcher/page-switcher.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/icons/bd-ai-icon.ts\";\nimport \"#components/link/link.ts\";\nimport { pageSwitcherStyles } from \"./page-switcher.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface PageSwitcherItem {\n title? : string;\n href : string;\n active?: boolean;\n}\n\n/**\n * The product-level page navigation: a brand mark and one link per page, with\n * the page you are on marked.\n *\n * Two notes on the markup below, both measured rather than assumed.\n *\n * The ink is Position 2 of the wayfinding family review: colour means\n * AVAILABLE and neutral means current. Every item is variant=\"primary\", so a\n * resting item is --color-text-brand and hovers to --color-action-primary-active;\n * the current one carries `current`, which drops it to --color-text-primary at\n * weight 700 and takes the 3px indicator. bd-link's current-and-hovered rule\n * keeps it there under the pointer.\n *\n * The variant is no longer switched per item. It used to be primary for the\n * current one and secondary for the rest, which made the current item the only\n * blue one -- the inverse of what the indicator says -- and left the resting\n * items on the muted ramp. One variant plus `current` is the same information\n * with one fewer thing to keep in step.\n *\n * `current` is `page`, not the generic `true`. These items are pages; the\n * anchor nav's items are positions inside one page and say `location`. Both are\n * current-location markers and they are not the same claim. bd-link puts it on\n * its <a> as aria-current; written here as aria-current, on the bd-link\n * element, it was never announced -- the <a> is in bd-link's shadow root. The\n * look, the indicator below included, keys on the same attribute, so the item\n * cannot be drawn current without being announced so.\n */\n@defineElement(\"bd-page-switcher\")\nclass BdPageSwitcher extends LitElement {\n static styles = [tokens, ensembleCSS, pageSwitcherStyles];\n\n @property({ type: Array })\n items: PageSwitcherItem[] = []; // [{ title, href, active }]\n\n render() {\n return html`\n <div class=\"bd-ensemble inner\">\n <bd-ai-icon class=\"logo\" width=\"200\" height=\"24\"></bd-ai-icon>\n\n <nav aria-label=\"Product navigation\">\n ${this.items.map(({ title, href, active }) => html`\n <bd-link\n href=${href}\n variant=\"primary\"\n no-underline\n current=${active ? \"page\" : nothing}\n class=\"page-link\"\n >${title || nothing}</bd-link>\n `)}\n </nav>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-page-switcher\": BdPageSwitcher;\n }\n}"],"mappings":"A,scA0CA,IACME,EADN,cAC6BC,CAAW,C,8BAIV,KAAA,MAAA,CAAC,C,QAHb,KAAA,OAAA,CAACE,EAAQC,EAAaC,CAAkB,C,CAKxD,QAAS,CACP,MAAO,EAAI;;;;;YAKH,KAAK,MAAM,KAAK,CAAE,QAAO,OAAM,YAAa,CAAI;;qBAEvCC,EAAK;;;wBAGFC,EAAS,OAASC,EAAQ;;eAEnCC,GAASD,EAAQ;WACrB,EAAE;;;KAIX,CACF,EAtBGV,EAAA,CAAAY,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAJ1B,EAAAF,EAAA,CAAAa,EAAc,kBAAkB,CAAA,EAAAX,CAAA"}
1
+ {"version":3,"file":"page-switcher.js","names":["_decorate","__decorate","BdPageSwitcher","LitElement","_args","ensembleCSS","pageSwitcherStyles","href","active","nothing","title","property","defineElement"],"sources":["../../../../src/components/page-switcher/page-switcher.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/icons/bd-ai-icon.ts\";\nimport \"#components/link/link.ts\";\nimport { pageSwitcherStyles } from \"./page-switcher.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface PageSwitcherItem {\n title? : string;\n href : string;\n active?: boolean;\n}\n\n/**\n * The product-level page navigation: a brand mark and one link per page, with\n * the page you are on marked.\n *\n * Two notes on the markup below, both measured rather than assumed.\n *\n * The ink is Position 2 of the wayfinding family review: colour means\n * AVAILABLE and neutral means current. Every item is variant=\"primary\", so a\n * resting item is --color-text-brand and hovers to --color-action-primary-active;\n * the current one carries `current`, which drops it to --color-text-primary at\n * weight 700 and takes the 3px indicator. bd-link's current-and-hovered rule\n * keeps it there under the pointer.\n *\n * The variant is no longer switched per item. It used to be primary for the\n * current one and secondary for the rest, which made the current item the only\n * blue one -- the inverse of what the indicator says -- and left the resting\n * items on the muted ramp. One variant plus `current` is the same information\n * with one fewer thing to keep in step.\n *\n * `current` is `page`, not the generic `true`. These items are pages; the\n * anchor nav's items are positions inside one page and say `location`. Both are\n * current-location markers and they are not the same claim. bd-link puts it on\n * its <a> as aria-current; written here as aria-current, on the bd-link\n * element, it was never announced -- the <a> is in bd-link's shadow root. The\n * look, the indicator below included, keys on the same attribute, so the item\n * cannot be drawn current without being announced so.\n */\n@defineElement(\"bd-page-switcher\")\nclass BdPageSwitcher extends LitElement {\n static styles = [ensembleCSS, pageSwitcherStyles];\n\n @property({ type: Array })\n items: PageSwitcherItem[] = []; // [{ title, href, active }]\n\n render() {\n return html`\n <div class=\"bd-ensemble inner\">\n <bd-ai-icon class=\"logo\" width=\"200\" height=\"24\"></bd-ai-icon>\n\n <nav aria-label=\"Product navigation\">\n ${this.items.map(({ title, href, active }) => html`\n <bd-link\n href=${href}\n variant=\"primary\"\n no-underline\n current=${active ? \"page\" : nothing}\n class=\"page-link\"\n >${title || nothing}</bd-link>\n `)}\n </nav>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-page-switcher\": BdPageSwitcher;\n }\n}"],"mappings":"A,qbA2CA,IACME,EADN,cAC6BC,CAAW,C,8BAIV,KAAA,MAAA,CAAC,C,QAHb,KAAA,OAAA,CAACE,EAAaC,CAAkB,C,CAKhD,QAAS,CACP,MAAO,EAAI;;;;;YAKH,KAAK,MAAM,KAAK,CAAE,QAAO,OAAM,YAAa,CAAI;;qBAEvCC,EAAK;;;wBAGFC,EAAS,OAASC,EAAQ;;eAEnCC,GAASD,EAAQ;WACrB,EAAE;;;KAIX,CACF,EAtBGT,EAAA,CAAAW,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAJ1B,EAAAF,EAAA,CAAAY,EAAc,kBAAkB,CAAA,EAAAV,CAAA"}
@@ -27,7 +27,7 @@ declare class BdPaginationDots extends LitElement {
27
27
  _announcePlayState(): void;
28
28
  _select(n: number): void;
29
29
  _pick(n: number): void;
30
- render(): import("lit-html").TemplateResult<1> | typeof nothing;
30
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
31
31
  }
32
32
  declare global {
33
33
  interface HTMLElementTagNameMap {
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  type HeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
5
  /**
@@ -1,4 +1,4 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import{partnerBannerCSS as i}from"./partner-banner.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends a{constructor(...e){super(...e),this.heading=``,this.quote=``,this.attribution=``,this.lead=``,this.as=`h2`}static{this.styles=[t,r,i]}_onActionsSlot(e){for(let t of e.target.assignedElements({flatten:!0}))`fullWidth`in t&&t.setAttribute(`fullwidth`,``)}render(){return o`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import{partnerBannerCSS as r}from"./partner-banner.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends i{constructor(...e){super(...e),this.heading=``,this.quote=``,this.attribution=``,this.lead=``,this.as=`h2`}static{this.styles=[n,r]}_onActionsSlot(e){for(let t of e.target.assignedElements({flatten:!0}))`fullWidth`in t&&t.setAttribute(`fullwidth`,``)}render(){return a`
2
2
  <section class="root">
3
3
  <div class="photo"><slot name="photo"></slot></div>
4
4
  <div class="band">
@@ -9,16 +9,16 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
9
9
  <bd-h as="${this.as}" visual-level="h2" color="on-brand" class="heading"><span class="text">${this.heading}</span></bd-h>
10
10
  </div>
11
11
  <div class="detail">
12
- ${this.quote?o`<figure class="quote">
12
+ ${this.quote?a`<figure class="quote">
13
13
  <blockquote>${this.quote}</blockquote>
14
- ${this.attribution?o`<figcaption>${this.attribution}</figcaption>`:s}
15
- </figure>`:s}
16
- ${this.lead?o`<p class="lead">${this.lead}</p>`:s}
14
+ ${this.attribution?a`<figcaption>${this.attribution}</figcaption>`:o}
15
+ </figure>`:o}
16
+ ${this.lead?a`<p class="lead">${this.lead}</p>`:o}
17
17
  <div class="actions"><slot name="actions" @slotchange=${this._onActionsSlot}></slot></div>
18
18
  </div>
19
19
  </div>
20
20
  </div>
21
21
  </div>
22
22
  </section>
23
- `}};n([c({type:String})],l.prototype,`heading`,void 0),n([c({type:String})],l.prototype,`quote`,void 0),n([c({type:String})],l.prototype,`attribution`,void 0),n([c({type:String})],l.prototype,`lead`,void 0),n([c({type:String})],l.prototype,`as`,void 0),l=n([e(`bd-partner-banner`)],l);export{l as PartnerBanner};
23
+ `}};t([s({type:String})],c.prototype,`heading`,void 0),t([s({type:String})],c.prototype,`quote`,void 0),t([s({type:String})],c.prototype,`attribution`,void 0),t([s({type:String})],c.prototype,`lead`,void 0),t([s({type:String})],c.prototype,`as`,void 0),c=t([e(`bd-partner-banner`)],c);export{c as PartnerBanner};
24
24
  //# sourceMappingURL=partner-banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"partner-banner.js","names":["_decorate","__decorate","PartnerBanner","LitElement","_args","tokens","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\";\nimport { tokens } from \"#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 = [tokens, 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 <bd-h as=\"${this.as}\" visual-level=\"h2\" color=\"on-brand\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>\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,4aA2BO,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,EAAQC,EAAaC,CAAgB,C,CAmBtD,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;;;;;;;;4BAQa,KAAK,GAAG,0EAA0E,KAAK,QAAQ;;;kBAGzG,KAAK,MACH,CAAI;oCACY,KAAK,MAAM;wBACvB,KAAK,YAAc,CAAI,eAAe,KAAK,YAAY,eAAiBC,EAAQ;+BAEpFA,EAAQ;kBACV,KAAK,KAAO,CAAI,mBAAmB,KAAK,KAAK,MAAQA,EAAQ;wEACP,KAAK,eAAe;;;;;;KAO1F,CACF,EAlDGT,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,KAAA,IAAA,EAAA,EAZ3B,EAAAF,EAAA,CAAAW,EAAc,mBAAmB,CAAA,EAAAT,CAAA,E"}
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 <bd-h as=\"${this.as}\" visual-level=\"h2\" color=\"on-brand\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>\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;;;;;;;;4BAQa,KAAK,GAAG,0EAA0E,KAAK,QAAQ;;;kBAGzG,KAAK,MACH,CAAI;oCACY,KAAK,MAAM;wBACvB,KAAK,YAAc,CAAI,eAAe,KAAK,YAAY,eAAiBC,EAAQ;+BAEpFA,EAAQ;kBACV,KAAK,KAAO,CAAI,mBAAmB,KAAK,KAAK,MAAQA,EAAQ;wEACP,KAAK,eAAe;;;;;;KAO1F,CACF,EAlDGR,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"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type PropertyValues } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../badge/badge.js";
3
4
  import "../icons/arrow-icon.js";
4
5
  declare const HEADING_TAGS: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
@@ -1,15 +1,15 @@
1
- import{defineElement as e}from"../shared/define-element.js";import{tokens as t}from"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{isOneOf as r}from"../shared/prop-vocabulary.js";import"../icons/arrow-icon.js";import"../badge/badge.js";import{postCardCSS as i}from"./post-card.css.js";import{LitElement as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";import{html as c,literal as l}from"lit/static-html.js";var u=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],d={h1:l`h1`,h2:l`h2`,h3:l`h3`,h4:l`h4`,h5:l`h5`,h6:l`h6`},f=class extends a{constructor(...e){super(...e),this.href=``,this.heading=``,this.badge=``,this.image=``,this.imageAlt=``,this.readMore=`Read more`,this.as=`h3`}static{this.styles=[t,i]}willUpdate(e){e.has(`as`)&&!r(u,this.as)&&(this.as=`h3`)}_renderHeading(){let e=this.href?c`<a class="link" href="${this.href}">${this.heading}</a>`:this.heading,t=d[this.as];return c`<${t} class="heading">${e}</${t}>`}render(){return c`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{isOneOf as n}from"../shared/prop-vocabulary.js";import"../icons/arrow-icon.js";import"../badge/badge.js";import{postCardCSS as r}from"./post-card.css.js";import{LitElement as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";import{html as s,literal as c}from"lit/static-html.js";var l=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],u={h1:c`h1`,h2:c`h2`,h3:c`h3`,h4:c`h4`,h5:c`h5`,h6:c`h6`},d=class extends i{constructor(...e){super(...e),this.href=``,this.heading=``,this.badge=``,this.image=``,this.imageAlt=``,this.readMore=`Read more`,this.as=`h3`}static{this.styles=[r]}willUpdate(e){e.has(`as`)&&!n(l,this.as)&&(this.as=`h3`)}_renderHeading(){let e=this.href?s`<a class="link" href="${this.href}">${this.heading}</a>`:this.heading,t=u[this.as];return s`<${t} class="heading">${e}</${t}>`}render(){return s`
2
2
  <article class="card">
3
3
  <div class="cover">
4
4
  <slot name="image">
5
- ${this.image?c`<img src="${this.image}" alt="${this.imageAlt}" loading="lazy">`:o}
5
+ ${this.image?s`<img src="${this.image}" alt="${this.imageAlt}" loading="lazy">`:a}
6
6
  </slot>
7
- ${this.badge?c`<bd-badge class="badge" tone="info" variant="shade" size="sm">${this.badge}</bd-badge>`:o}
7
+ ${this.badge?s`<bd-badge class="badge" tone="info" variant="shade" size="sm">${this.badge}</bd-badge>`:a}
8
8
  </div>
9
9
  <div class="body">
10
10
  ${this._renderHeading()}
11
- ${this.href?c`<span class="more" aria-hidden="true">${this.readMore}<bd-arrow-icon size="sm"></bd-arrow-icon></span>`:o}
11
+ ${this.href?s`<span class="more" aria-hidden="true">${this.readMore}<bd-arrow-icon size="sm"></bd-arrow-icon></span>`:a}
12
12
  </div>
13
13
  </article>
14
- `}};n([s({type:String})],f.prototype,`href`,void 0),n([s({type:String})],f.prototype,`heading`,void 0),n([s({type:String})],f.prototype,`badge`,void 0),n([s({type:String})],f.prototype,`image`,void 0),n([s({type:String,attribute:`image-alt`})],f.prototype,`imageAlt`,void 0),n([s({type:String,attribute:`read-more`})],f.prototype,`readMore`,void 0),n([s({type:String})],f.prototype,`as`,void 0),f=n([e(`bd-post-card`)],f);export{f as PostCard};
14
+ `}};t([o({type:String})],d.prototype,`href`,void 0),t([o({type:String})],d.prototype,`heading`,void 0),t([o({type:String})],d.prototype,`badge`,void 0),t([o({type:String})],d.prototype,`image`,void 0),t([o({type:String,attribute:`image-alt`})],d.prototype,`imageAlt`,void 0),t([o({type:String,attribute:`read-more`})],d.prototype,`readMore`,void 0),t([o({type:String})],d.prototype,`as`,void 0),d=t([e(`bd-post-card`)],d);export{d as PostCard};
15
15
  //# sourceMappingURL=post-card.js.map