@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 +1 @@
1
- {"version":3,"file":"post-card.js","names":["_decorate","__decorate","html$1","HEADING_TAGS","TAGS","PostCard","LitElement","_args","tokens","postCardCSS","changed","isOneOf","text","tag","nothing","property","defineElement"],"sources":["../../../../src/components/post-card/post-card.ts"],"sourcesContent":["import { LitElement, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/badge/badge.ts\";\nimport \"#components/icons/arrow-icon.ts\";\nimport { postCardCSS } from \"./post-card.css.ts\";\n\n/* Every level, as bd-audience-card, bd-partner-banner and\n bd-awards-spotlight take: the outline is the page's to compose. This took\n h2 to h5, and h1 or h6 rendered an h3 without a word. */\nconst HEADING_TAGS = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\ntype HeadingTag = typeof HEADING_TAGS[number];\nconst TAGS = {\n h1: literal`h1`, h2: literal`h2`, h3: literal`h3`, h4: literal`h4`, h5: literal`h5`, h6: literal`h6`\n} as const satisfies Record<HeadingTag, unknown>;\n\n/**\n * An article card for a feed of posts: a cover with a category badge laid\n * over it, the title and a \"Read more\" with an arrow. The homepage's Latest\n * insights; drawn in the foundation Figma file as Post card.\n *\n * One link per card. The title is the link and its box is stretched over the\n * whole card, so a click anywhere follows it; \"Read more\" is the visual cue\n * and is hidden from a screen reader, which would otherwise hear the same\n * destination twice per card, three cards a row.\n *\n * Not blog-related-articles, which lives in the blog sub-system outside the\n * token system and has no \"Read more\" and no row form. Between md and lg\n * the card is a row, the cover on the left.\n */\n@defineElement(\"bd-post-card\")\nexport class PostCard extends LitElement {\n static styles = [tokens, postCardCSS];\n\n @property({ type: String })\n href = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n badge = \"\";\n @property({ type: String })\n image = \"\";\n // the cover illustrates the title beside it, so it is decorative by default\n @property({ type: String, attribute: \"image-alt\" })\n imageAlt = \"\";\n @property({ type: String, attribute: \"read-more\" })\n readMore = \"Read more\";\n @property({ type: String })\n as: HeadingTag = \"h3\";\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"as\") && !isOneOf(HEADING_TAGS, this.as)) this.as = \"h3\";\n }\n\n _renderHeading() {\n const text = this.href\n ? html`<a class=\"link\" href=\"${this.href}\">${this.heading}</a>`\n : this.heading;\n const tag = TAGS[this.as];\n return html`<${tag} class=\"heading\">${text}</${tag}>`;\n }\n\n render() {\n return html`\n <article class=\"card\">\n <div class=\"cover\">\n <slot name=\"image\">\n ${this.image ? html`<img src=\"${this.image}\" alt=\"${this.imageAlt}\" loading=\"lazy\">` : nothing}\n </slot>\n ${this.badge\n ? html`<bd-badge class=\"badge\" tone=\"info\" variant=\"shade\" size=\"sm\">${this.badge}</bd-badge>`\n : nothing}\n </div>\n <div class=\"body\">\n ${this._renderHeading()}\n ${this.href\n ? html`<span class=\"more\" aria-hidden=\"true\">${this.readMore}<bd-arrow-icon size=\"sm\"></bd-arrow-icon></span>`\n : nothing}\n </div>\n </article>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-post-card\": PostCard;\n }\n}\n"],"mappings":"A,yeAaA,IAAMG,EAAe,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAElDC,EAAO,CACX,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,IAClG,EAiBaC,EAAN,cAAuBC,CAAW,C,8BAIhC,KAAA,KAAA,GAEG,KAAA,QAAA,GAEF,KAAA,MAAA,GAEA,KAAA,MAAA,GAGG,KAAA,SAAA,GAEA,KAAA,SAAA,YAEM,KAAA,GAAA,I,QAhBD,KAAA,OAAA,CAACE,EAAQC,CAAW,C,CAkBpC,WAAW,EAA+B,CACpCC,EAAQ,IAAI,IAAI,GAAK,CAACC,EAAQR,EAAc,KAAK,EAAE,IAAG,KAAK,GAAK,KACtE,CAEA,gBAAiB,CACf,IAAMS,EAAO,KAAK,KACd,CAAI,yBAAyB,KAAK,KAAK,IAAI,KAAK,QAAQ,MACxD,KAAK,QACHC,EAAMT,EAAK,KAAK,IACtB,MAAO,EAAI,IAAIS,EAAI,mBAAmBD,EAAK,IAAIC,EAAI,EACrD,CAEA,QAAS,CACP,MAAO,EAAI;;;;cAID,KAAK,MAAQ,CAAI,aAAa,KAAK,MAAM,SAAS,KAAK,SAAS,mBAAqBC,EAAQ;;YAE/F,KAAK,MACH,CAAI,iEAAiE,KAAK,MAAM,aAChFA,EAAQ;;;YAGV,KAAK,eAAe,EAAE;YACtB,KAAK,KACH,CAAI,yCAAyC,KAAK,SAAS,kDAC3DA,EAAQ;;;KAIpB,CACF,EAhDGd,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAe,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,KAAA,IAAA,EAAA,EAjB3B,EAAAL,EAAA,CAAAgB,EAAc,cAAc,CAAA,EAAAX,CAAA,E"}
1
+ {"version":3,"file":"post-card.js","names":["_decorate","__decorate","html$1","HEADING_TAGS","TAGS","PostCard","LitElement","_args","postCardCSS","changed","isOneOf","text","tag","nothing","property","defineElement"],"sources":["../../../../src/components/post-card/post-card.ts"],"sourcesContent":["import { LitElement, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/badge/badge.ts\";\nimport \"#components/icons/arrow-icon.ts\";\nimport { postCardCSS } from \"./post-card.css.ts\";\n\n/* Every level, as bd-audience-card, bd-partner-banner and\n bd-awards-spotlight take: the outline is the page's to compose. This took\n h2 to h5, and h1 or h6 rendered an h3 without a word. */\nconst HEADING_TAGS = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\ntype HeadingTag = typeof HEADING_TAGS[number];\nconst TAGS = {\n h1: literal`h1`, h2: literal`h2`, h3: literal`h3`, h4: literal`h4`, h5: literal`h5`, h6: literal`h6`\n} as const satisfies Record<HeadingTag, unknown>;\n\n/**\n * An article card for a feed of posts: a cover with a category badge laid\n * over it, the title and a \"Read more\" with an arrow. The homepage's Latest\n * insights; drawn in the foundation Figma file as Post card.\n *\n * One link per card. The title is the link and its box is stretched over the\n * whole card, so a click anywhere follows it; \"Read more\" is the visual cue\n * and is hidden from a screen reader, which would otherwise hear the same\n * destination twice per card, three cards a row.\n *\n * Not blog-related-articles, which lives in the blog sub-system outside the\n * token system and has no \"Read more\" and no row form. Between md and lg\n * the card is a row, the cover on the left.\n */\n@defineElement(\"bd-post-card\")\nexport class PostCard extends LitElement {\n static styles = [postCardCSS];\n\n @property({ type: String })\n href = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n badge = \"\";\n @property({ type: String })\n image = \"\";\n // the cover illustrates the title beside it, so it is decorative by default\n @property({ type: String, attribute: \"image-alt\" })\n imageAlt = \"\";\n @property({ type: String, attribute: \"read-more\" })\n readMore = \"Read more\";\n @property({ type: String })\n as: HeadingTag = \"h3\";\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"as\") && !isOneOf(HEADING_TAGS, this.as)) this.as = \"h3\";\n }\n\n _renderHeading() {\n const text = this.href\n ? html`<a class=\"link\" href=\"${this.href}\">${this.heading}</a>`\n : this.heading;\n const tag = TAGS[this.as];\n return html`<${tag} class=\"heading\">${text}</${tag}>`;\n }\n\n render() {\n return html`\n <article class=\"card\">\n <div class=\"cover\">\n <slot name=\"image\">\n ${this.image ? html`<img src=\"${this.image}\" alt=\"${this.imageAlt}\" loading=\"lazy\">` : nothing}\n </slot>\n ${this.badge\n ? html`<bd-badge class=\"badge\" tone=\"info\" variant=\"shade\" size=\"sm\">${this.badge}</bd-badge>`\n : nothing}\n </div>\n <div class=\"body\">\n ${this._renderHeading()}\n ${this.href\n ? html`<span class=\"more\" aria-hidden=\"true\">${this.readMore}<bd-arrow-icon size=\"sm\"></bd-arrow-icon></span>`\n : nothing}\n </div>\n </article>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-post-card\": PostCard;\n }\n}\n"],"mappings":"A,wdAcA,IAAMG,EAAe,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAElDC,EAAO,CACX,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,IAClG,EAiBaC,EAAN,cAAuBC,CAAW,C,8BAIhC,KAAA,KAAA,GAEG,KAAA,QAAA,GAEF,KAAA,MAAA,GAEA,KAAA,MAAA,GAGG,KAAA,SAAA,GAEA,KAAA,SAAA,YAEM,KAAA,GAAA,I,QAhBD,KAAA,OAAA,CAACE,CAAW,C,CAkB5B,WAAW,EAA+B,CACpCC,EAAQ,IAAI,IAAI,GAAK,CAACC,EAAQP,EAAc,KAAK,EAAE,IAAG,KAAK,GAAK,KACtE,CAEA,gBAAiB,CACf,IAAMQ,EAAO,KAAK,KACd,CAAI,yBAAyB,KAAK,KAAK,IAAI,KAAK,QAAQ,MACxD,KAAK,QACHC,EAAMR,EAAK,KAAK,IACtB,MAAO,EAAI,IAAIQ,EAAI,mBAAmBD,EAAK,IAAIC,EAAI,EACrD,CAEA,QAAS,CACP,MAAO,EAAI;;;;cAID,KAAK,MAAQ,CAAI,aAAa,KAAK,MAAM,SAAS,KAAK,SAAS,mBAAqBC,EAAQ;;YAE/F,KAAK,MACH,CAAI,iEAAiE,KAAK,MAAM,aAChFA,EAAQ;;;YAGV,KAAK,eAAe,EAAE;YACtB,KAAK,KACH,CAAI,yCAAyC,KAAK,SAAS,kDAC3DA,EAAQ;;;KAIpB,CACF,EAhDGb,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,KAAA,IAAA,EAAA,EAjB3B,EAAAL,EAAA,CAAAe,EAAc,cAAc,CAAA,EAAAV,CAAA,E"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement, nothing, type TemplateResult } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "../icons/close-icon.js";
4
5
  import "../icons/globe-icon.js";
@@ -1,19 +1,19 @@
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"../icons/close-icon.js";import"../icons/globe-icon.js";import"../icons/guide-icon.js";import i from"./process-steps.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.steps=[]}static{this.styles=[t,r,i]}_renderIcon(e){return e?typeof e==`string`?o`<img src="${e}" alt="" class="bd-processsteps-icon-img" />`:e:s}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"../icons/close-icon.js";import"../icons/globe-icon.js";import"../icons/guide-icon.js";import r from"./process-steps.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.steps=[]}static{this.styles=[n,r]}_renderIcon(e){return e?typeof e==`string`?a`<img src="${e}" alt="" class="bd-processsteps-icon-img" />`:e:o}render(){return a`
2
2
  <div class="bd-ensemble bd-processsteps-container">
3
- ${this.title?o`
3
+ ${this.title?a`
4
4
  <bd-h as="h2" color="inverse" class="bd-processsteps-title">
5
5
  <slot name="title">${this.title}</slot>
6
6
  </bd-h>
7
- `:s}
7
+ `:o}
8
8
 
9
- ${this.description?o`
9
+ ${this.description?a`
10
10
  <bd-p variant="regular" class="bd-processsteps-description">
11
11
  <slot name="description">${this.description}</slot>
12
12
  </bd-p>
13
- `:s}
13
+ `:o}
14
14
 
15
15
  <div class="bd-processsteps-grid">
16
- ${this.steps.map(e=>o`
16
+ ${this.steps.map(e=>a`
17
17
  <div class="bd-processsteps-step">
18
18
  <div class="bd-processsteps-divider"></div>
19
19
  <div class="bd-processsteps-icon-wrap">${this._renderIcon(e.icon)}</div>
@@ -25,5 +25,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
25
25
 
26
26
  <slot name="steps"></slot>
27
27
  </div>
28
- `}};n([c({type:String})],l.prototype,`title`,void 0),n([c({type:String})],l.prototype,`description`,void 0),n([c({type:Array})],l.prototype,`steps`,void 0),l=n([e(`bd-process-steps`)],l);
28
+ `}};t([s({type:String})],c.prototype,`title`,void 0),t([s({type:String})],c.prototype,`description`,void 0),t([s({type:Array})],c.prototype,`steps`,void 0),c=t([e(`bd-process-steps`)],c);
29
29
  //# sourceMappingURL=process-steps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-steps.js","names":["processStepsCSS","_decorate","__decorate","process_steps_css_default","ProcessSteps","LitElement","_args","tokens","ensembleCSS","icon","nothing","step","property","defineElement"],"sources":["../../../../src/components/process-steps/process-steps.ts"],"sourcesContent":["import { LitElement, html, nothing, type TemplateResult } 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/icons/close-icon.ts\";\nimport \"#components/icons/globe-icon.ts\";\nimport \"#components/icons/guide-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport processStepsCSS from \"./process-steps.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface ProcessStep {\n icon? : TemplateResult | string;\n title : string;\n description: string;\n}\n\n@defineElement(\"bd-process-steps\")\nclass ProcessSteps extends LitElement {\n static styles = [tokens, ensembleCSS, processStepsCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n steps: ProcessStep[] = []; // [{ icon: TemplateResult|String, title: String, description: String }]\n\n _renderIcon(icon: ProcessStep[\"icon\"]) {\n if (!icon) return nothing;\n if (typeof icon === \"string\") {\n return html`<img src=\"${icon}\" alt=\"\" class=\"bd-processsteps-icon-img\" />`;\n }\n return icon;\n }\n\n /* color=\"inverse\" on both headings, because this module paints its own dark\n surface: process-steps.css.ts fills the section with\n linear-gradient(160deg, --color-neutral-800, #0b1626) and sets\n color: --color-text-inverse on the container.\n\n That container colour never reached the headings. bd-h sets its own colour\n inside its shadow root, so an inherited value cannot win: measured on the\n dark gradient, every bd-h rendered rgb(21, 23, 25) -- near-black ink on a\n near-black surface, about 1.0:1 -- while bd-p beside it correctly used\n --color-text-muted-inverse at rgb(166, 173, 180) and stayed readable. The\n section title and all three step titles were effectively invisible; it is\n visible in a screenshot and was measured to confirm it.\n\n bd-h already exposes the colour role, and footer-links-group does exactly\n this on the footer's dark surface, so this is the module selecting the\n right configuration for the surface it chose -- not a change to bd-h. */\n render() {\n return html`\n <div class=\"bd-ensemble bd-processsteps-container\">\n ${this.title\n ? html`\n <bd-h as=\"h2\" color=\"inverse\" class=\"bd-processsteps-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `\n : nothing}\n\n ${this.description\n ? html`\n <bd-p variant=\"regular\" class=\"bd-processsteps-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-processsteps-grid\">\n ${this.steps.map(\n (step) => html`\n <div class=\"bd-processsteps-step\">\n <div class=\"bd-processsteps-divider\"></div>\n <div class=\"bd-processsteps-icon-wrap\">${this._renderIcon(step.icon)}</div>\n <bd-h as=\"h4\" color=\"inverse\" class=\"bd-processsteps-step-title\">${step.title}</bd-h>\n <bd-p variant=\"regular\" class=\"bd-processsteps-step-description\">${step.description}</bd-p>\n </div>\n `\n )}\n </div>\n\n <slot name=\"steps\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-process-steps\": ProcessSteps;\n }\n}"],"mappings":"A,shBAkBA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEM,KAAA,YAAA,GAES,KAAA,MAAA,CAAC,C,QAPR,KAAA,OAAA,CAACE,EAAQC,EAAaR,CAAe,C,CASrD,YAAY,EAA2B,CAKrC,OAJKS,EACD,OAAOA,GAAS,SACX,CAAI,aAAaA,EAAK,8CAExBA,EAJWC,CAKpB,CAkBA,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCA,EAAQ;;UAEV,KAAK,YACH,CAAI;;2CAE2B,KAAK,YAAY;;cAGhDA,EAAQ;;;YAGR,KAAK,MAAM,IACV,GAAS,CAAI;;;yDAG+B,KAAK,YAAYC,EAAK,IAAI,EAAE;mFACFA,EAAK,MAAM;mFACXA,EAAK,YAAY;;aAG1F,EAAE;;;;;KAMV,CACF,EAnEGV,EAAA,CAAAW,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAW,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAW,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAR,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAY,EAAc,kBAAkB,CAAA,EAAAT,CAAA"}
1
+ {"version":3,"file":"process-steps.js","names":["processStepsCSS","_decorate","__decorate","process_steps_css_default","ProcessSteps","LitElement","_args","ensembleCSS","icon","nothing","step","property","defineElement"],"sources":["../../../../src/components/process-steps/process-steps.ts"],"sourcesContent":["import { LitElement, html, nothing, type TemplateResult } 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/icons/close-icon.ts\";\nimport \"#components/icons/globe-icon.ts\";\nimport \"#components/icons/guide-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport processStepsCSS from \"./process-steps.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface ProcessStep {\n icon? : TemplateResult | string;\n title : string;\n description: string;\n}\n\n@defineElement(\"bd-process-steps\")\nclass ProcessSteps extends LitElement {\n static styles = [ensembleCSS, processStepsCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n steps: ProcessStep[] = []; // [{ icon: TemplateResult|String, title: String, description: String }]\n\n _renderIcon(icon: ProcessStep[\"icon\"]) {\n if (!icon) return nothing;\n if (typeof icon === \"string\") {\n return html`<img src=\"${icon}\" alt=\"\" class=\"bd-processsteps-icon-img\" />`;\n }\n return icon;\n }\n\n /* color=\"inverse\" on both headings, because this module paints its own dark\n surface: process-steps.css.ts fills the section with\n linear-gradient(160deg, --color-neutral-800, #0b1626) and sets\n color: --color-text-inverse on the container.\n\n That container colour never reached the headings. bd-h sets its own colour\n inside its shadow root, so an inherited value cannot win: measured on the\n dark gradient, every bd-h rendered rgb(21, 23, 25) -- near-black ink on a\n near-black surface, about 1.0:1 -- while bd-p beside it correctly used\n --color-text-muted-inverse at rgb(166, 173, 180) and stayed readable. The\n section title and all three step titles were effectively invisible; it is\n visible in a screenshot and was measured to confirm it.\n\n bd-h already exposes the colour role, and footer-links-group does exactly\n this on the footer's dark surface, so this is the module selecting the\n right configuration for the surface it chose -- not a change to bd-h. */\n render() {\n return html`\n <div class=\"bd-ensemble bd-processsteps-container\">\n ${this.title\n ? html`\n <bd-h as=\"h2\" color=\"inverse\" class=\"bd-processsteps-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `\n : nothing}\n\n ${this.description\n ? html`\n <bd-p variant=\"regular\" class=\"bd-processsteps-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-processsteps-grid\">\n ${this.steps.map(\n (step) => html`\n <div class=\"bd-processsteps-step\">\n <div class=\"bd-processsteps-divider\"></div>\n <div class=\"bd-processsteps-icon-wrap\">${this._renderIcon(step.icon)}</div>\n <bd-h as=\"h4\" color=\"inverse\" class=\"bd-processsteps-step-title\">${step.title}</bd-h>\n <bd-p variant=\"regular\" class=\"bd-processsteps-step-description\">${step.description}</bd-p>\n </div>\n `\n )}\n </div>\n\n <slot name=\"steps\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-process-steps\": ProcessSteps;\n }\n}"],"mappings":"A,qgBAmBA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEM,KAAA,YAAA,GAES,KAAA,MAAA,CAAC,C,QAPR,KAAA,OAAA,CAACE,EAAaP,CAAe,C,CAS7C,YAAY,EAA2B,CAKrC,OAJKQ,EACD,OAAOA,GAAS,SACX,CAAI,aAAaA,EAAK,8CAExBA,EAJWC,CAKpB,CAkBA,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCA,EAAQ;;UAEV,KAAK,YACH,CAAI;;2CAE2B,KAAK,YAAY;;cAGhDA,EAAQ;;;YAGR,KAAK,MAAM,IACV,GAAS,CAAI;;;yDAG+B,KAAK,YAAYC,EAAK,IAAI,EAAE;mFACFA,EAAK,MAAM;mFACXA,EAAK,YAAY;;aAG1F,EAAE;;;;;KAMV,CACF,EAnEGT,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,kBAAkB,CAAA,EAAAR,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../paragraph/paragraph.js";
3
4
  import "../divider/divider-horizontal.js";
4
5
  interface QuickAnswerItem {
@@ -1,10 +1,10 @@
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"../paragraph/paragraph.js";import"../divider/divider-horizontal.js";import r from"./quick-answer.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.label=`Quick answer`,this.text=``,this.items=[]}static{this.styles=[t,r]}render(){return a`
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"../paragraph/paragraph.js";import"../divider/divider-horizontal.js";import n from"./quick-answer.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends r{constructor(...e){super(...e),this.label=`Quick answer`,this.text=``,this.items=[]}static{this.styles=[n]}render(){return i`
2
2
  <div class="bd-quickanswer-container">
3
- ${this.label?a`
3
+ ${this.label?i`
4
4
  <bd-p variant="regular" font-weight="medium" class="bd-quickanswer-label">
5
5
  <slot name="label">${this.label}</slot>
6
6
  </bd-p>
7
- `:o}
7
+ `:a}
8
8
 
9
9
  <bd-p variant="large" class="bd-quickanswer-text">
10
10
  <slot name="text">${this.text}</slot>
@@ -12,21 +12,21 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
12
12
 
13
13
  <slot></slot>
14
14
 
15
- ${this.items&&this.items.length?a`
15
+ ${this.items&&this.items.length?i`
16
16
  <bd-divider-horizontal
17
17
  class="bd-quickanswer-divider"
18
18
  color="brand-subtle"
19
19
  opacity="1"
20
20
  ></bd-divider-horizontal>
21
21
  <div class="bd-quickanswer-meta">
22
- ${this.items.map(e=>a`
22
+ ${this.items.map(e=>i`
23
23
  <span class="bd-quickanswer-meta-item">
24
24
  <span class="bd-quickanswer-meta-label">${e.label}</span>
25
25
  <span class="bd-quickanswer-meta-value">${e.value}</span>
26
26
  </span>
27
27
  `)}
28
28
  </div>
29
- `:o}
29
+ `:a}
30
30
  </div>
31
- `}};n([s({type:String})],c.prototype,`label`,void 0),n([s({type:String})],c.prototype,`text`,void 0),n([s({type:Array})],c.prototype,`items`,void 0),c=n([e(`bd-quick-answer`)],c);
31
+ `}};t([o({type:String})],s.prototype,`label`,void 0),t([o({type:String})],s.prototype,`text`,void 0),t([o({type:Array})],s.prototype,`items`,void 0),s=t([e(`bd-quick-answer`)],s);
32
32
  //# sourceMappingURL=quick-answer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quick-answer.js","names":["quickAnswerCSS","_decorate","__decorate","quick_answer_css_default","QuickAnswer","LitElement","_args","tokens","nothing","item","property","defineElement"],"sources":["../../../../src/components/quick-answer/quick-answer.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/paragraph/paragraph.ts\";\nimport quickAnswerCSS from \"./quick-answer.css.ts\";\nimport \"#components/divider/divider-horizontal.ts\";\n\ninterface QuickAnswerItem {\n label: string;\n value: string;\n}\n\n@defineElement(\"bd-quick-answer\")\nclass QuickAnswer extends LitElement {\n static styles = [tokens, quickAnswerCSS];\n\n @property({ type: String })\n label = \"Quick answer\";\n @property({ type: String })\n text = \"\";\n @property({ type: Array })\n items: QuickAnswerItem[] = []; // [{ label: String, value: String }]\n\n render() {\n return html`\n <div class=\"bd-quickanswer-container\">\n ${this.label\n ? html`\n <bd-p variant=\"regular\" font-weight=\"medium\" class=\"bd-quickanswer-label\">\n <slot name=\"label\">${this.label}</slot>\n </bd-p>\n `\n : nothing}\n\n <bd-p variant=\"large\" class=\"bd-quickanswer-text\">\n <slot name=\"text\">${this.text}</slot>\n </bd-p>\n\n <slot></slot>\n\n ${this.items && this.items.length\n ? html`\n <bd-divider-horizontal\n class=\"bd-quickanswer-divider\"\n color=\"brand-subtle\"\n opacity=\"1\"\n ></bd-divider-horizontal>\n <div class=\"bd-quickanswer-meta\">\n ${this.items.map(\n (item) => html`\n <span class=\"bd-quickanswer-meta-item\">\n <span class=\"bd-quickanswer-meta-label\">${item.label}</span>\n <span class=\"bd-quickanswer-meta-value\">${item.value}</span>\n </span>\n `\n )}\n </div>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-quick-answer\": QuickAnswer;\n }\n}"],"mappings":"A,2YAaA,IACMI,EADN,cAC0BC,CAAW,C,8BAI3B,KAAA,MAAA,eAED,KAAA,KAAA,GAEoB,KAAA,MAAA,CAAC,C,QAPZ,KAAA,OAAA,CAACE,EAAQP,CAAc,C,CASvC,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCQ,EAAQ;;;8BAGU,KAAK,KAAK;;;;;UAK9B,KAAK,OAAS,KAAK,MAAM,OACvB,CAAI;;;;;;;kBAOE,KAAK,MAAM,IACV,GAAS,CAAI;;gEAEgCC,EAAK,MAAM;gEACXA,EAAK,MAAM;;mBAG3D,EAAE;;cAGND,EAAQ;;KAGlB,CACF,EA9CGP,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,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAS,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAU,EAAc,iBAAiB,CAAA,EAAAP,CAAA"}
1
+ {"version":3,"file":"quick-answer.js","names":["quickAnswerCSS","_decorate","__decorate","quick_answer_css_default","QuickAnswer","LitElement","_args","nothing","item","property","defineElement"],"sources":["../../../../src/components/quick-answer/quick-answer.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/paragraph/paragraph.ts\";\nimport quickAnswerCSS from \"./quick-answer.css.ts\";\nimport \"#components/divider/divider-horizontal.ts\";\n\ninterface QuickAnswerItem {\n label: string;\n value: string;\n}\n\n@defineElement(\"bd-quick-answer\")\nclass QuickAnswer extends LitElement {\n static styles = [quickAnswerCSS];\n\n @property({ type: String })\n label = \"Quick answer\";\n @property({ type: String })\n text = \"\";\n @property({ type: Array })\n items: QuickAnswerItem[] = []; // [{ label: String, value: String }]\n\n render() {\n return html`\n <div class=\"bd-quickanswer-container\">\n ${this.label\n ? html`\n <bd-p variant=\"regular\" font-weight=\"medium\" class=\"bd-quickanswer-label\">\n <slot name=\"label\">${this.label}</slot>\n </bd-p>\n `\n : nothing}\n\n <bd-p variant=\"large\" class=\"bd-quickanswer-text\">\n <slot name=\"text\">${this.text}</slot>\n </bd-p>\n\n <slot></slot>\n\n ${this.items && this.items.length\n ? html`\n <bd-divider-horizontal\n class=\"bd-quickanswer-divider\"\n color=\"brand-subtle\"\n opacity=\"1\"\n ></bd-divider-horizontal>\n <div class=\"bd-quickanswer-meta\">\n ${this.items.map(\n (item) => html`\n <span class=\"bd-quickanswer-meta-item\">\n <span class=\"bd-quickanswer-meta-label\">${item.label}</span>\n <span class=\"bd-quickanswer-meta-value\">${item.value}</span>\n </span>\n `\n )}\n </div>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-quick-answer\": QuickAnswer;\n }\n}"],"mappings":"A,0XAcA,IACMI,EADN,cAC0BC,CAAW,C,8BAI3B,KAAA,MAAA,eAED,KAAA,KAAA,GAEoB,KAAA,MAAA,CAAC,C,QAPZ,KAAA,OAAA,CAACL,CAAc,C,CAS/B,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCO,EAAQ;;;8BAGU,KAAK,KAAK;;;;;UAK9B,KAAK,OAAS,KAAK,MAAM,OACvB,CAAI;;;;;;;kBAOE,KAAK,MAAM,IACV,GAAS,CAAI;;gEAEgCC,EAAK,MAAM;gEACXA,EAAK,MAAM;;mBAG3D,EAAE;;cAGND,EAAQ;;KAGlB,CACF,EA9CGN,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAQ,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAS,EAAc,iBAAiB,CAAA,EAAAN,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "./review.js";
4
5
  declare class BdReviewGrid extends LitElement {
@@ -1,6 +1,6 @@
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 i from"./review-grid.css.js";import"./review.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=class extends a{constructor(...e){super(...e),this.title=``,this._columns=3}static{this.styles=[t,r,i]}get _items(){return[...this.children].filter(e=>e.tagName===`BD-REVIEW`)}_onSlotChange(){let e=this._items.length;this._columns=e<=0?1:Math.min(e,3)}render(){let e=this._columns===1;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 r from"./review-grid.css.js";import"./review.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends i{constructor(...e){super(...e),this.title=``,this._columns=3}static{this.styles=[n,r]}get _items(){return[...this.children].filter(e=>e.tagName===`BD-REVIEW`)}_onSlotChange(){let e=this._items.length;this._columns=e<=0?1:Math.min(e,3)}render(){let e=this._columns===1;return a`
2
2
  <div class="bd-ensemble">
3
- ${this.title?o`<bd-h as="h2" class="bd-reviewgrid-title"><slot name="title">${this.title}</slot></bd-h>`:s}
3
+ ${this.title?a`<bd-h as="h2" class="bd-reviewgrid-title"><slot name="title">${this.title}</slot></bd-h>`:o}
4
4
 
5
5
  <div
6
6
  class="bd-reviewgrid-grid ${e?`bd-reviewgrid-grid--single`:``}"
@@ -10,5 +10,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
10
10
  <slot @slotchange=${this._onSlotChange}></slot>
11
11
  </div>
12
12
  </div>
13
- `}};n([c({type:String})],u.prototype,`title`,void 0),n([l()],u.prototype,`_columns`,void 0),u=n([e(`bd-review-grid`)],u);
13
+ `}};t([s({type:String})],l.prototype,`title`,void 0),t([c()],l.prototype,`_columns`,void 0),l=t([e(`bd-review-grid`)],l);
14
14
  //# sourceMappingURL=review-grid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-grid.js","names":["reviewGridCSS","_decorate","__decorate","review_grid_css_default","BdReviewGrid","LitElement","_args","tokens","ensembleCSS","el","count","singleCard","nothing","property","state","defineElement"],"sources":["../../../../src/components/review/review-grid.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport reviewGridCSS from \"./review-grid.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport \"./review.ts\";\n\n\n@defineElement(\"bd-review-grid\")\nclass BdReviewGrid extends LitElement {\n static styles = [tokens, ensembleCSS, reviewGridCSS];\n\n @property({ type: String })\n title = \"\";\n @state()\n _columns = 3;\n\n get _items() {\n return [...this.children].filter((el) => el.tagName === \"BD-REVIEW\");\n }\n\n /* The grid is a list (role=\"list\" below), and each bd-review in it says it\n is one of its items itself (review.ts). */\n _onSlotChange() {\n const count = this._items.length;\n this._columns = count <= 0 ? 1 : Math.min(count, 3);\n }\n\n render() {\n const singleCard = this._columns === 1;\n\n return html`\n <div class=\"bd-ensemble\">\n ${this.title\n ? html`<bd-h as=\"h2\" class=\"bd-reviewgrid-title\"><slot name=\"title\">${this.title}</slot></bd-h>`\n : nothing}\n\n <div\n class=\"bd-reviewgrid-grid ${singleCard ? \"bd-reviewgrid-grid--single\" : \"\"}\"\n style=\"--bd-review-columns: ${this._columns};\"\n role=\"list\"\n >\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review-grid\": BdReviewGrid;\n }\n}"],"mappings":"A,obAUA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEG,KAAA,SAAA,C,QALK,KAAA,OAAA,CAACE,EAAQC,EAAaR,CAAa,C,CAOnD,IAAI,QAAS,CACX,MAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,OAAQ,GAAOS,EAAG,UAAY,WAAW,CACrE,CAIA,eAAgB,CACd,IAAMC,EAAQ,KAAK,OAAO,OAC1B,KAAK,SAAWA,GAAS,EAAI,EAAI,KAAK,IAAIA,EAAO,CAAC,CACpD,CAEA,QAAS,CACP,IAAMC,EAAa,KAAK,WAAa,EAErC,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI,gEAAgE,KAAK,MAAM,gBAC/EC,EAAQ;;;sCAGkBD,EAAa,6BAA+B,GAAG;wCAC7C,KAAK,SAAS;;;8BAGxB,KAAK,cAAc;;;KAI/C,CACF,EAnCGV,EAAA,CAAAY,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,WAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAc,EAAc,gBAAgB,CAAA,EAAAX,CAAA"}
1
+ {"version":3,"file":"review-grid.js","names":["reviewGridCSS","_decorate","__decorate","review_grid_css_default","BdReviewGrid","LitElement","_args","ensembleCSS","el","count","singleCard","nothing","property","state","defineElement"],"sources":["../../../../src/components/review/review-grid.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport reviewGridCSS from \"./review-grid.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport \"./review.ts\";\n\n\n@defineElement(\"bd-review-grid\")\nclass BdReviewGrid extends LitElement {\n static styles = [ensembleCSS, reviewGridCSS];\n\n @property({ type: String })\n title = \"\";\n @state()\n _columns = 3;\n\n get _items() {\n return [...this.children].filter((el) => el.tagName === \"BD-REVIEW\");\n }\n\n /* The grid is a list (role=\"list\" below), and each bd-review in it says it\n is one of its items itself (review.ts). */\n _onSlotChange() {\n const count = this._items.length;\n this._columns = count <= 0 ? 1 : Math.min(count, 3);\n }\n\n render() {\n const singleCard = this._columns === 1;\n\n return html`\n <div class=\"bd-ensemble\">\n ${this.title\n ? html`<bd-h as=\"h2\" class=\"bd-reviewgrid-title\"><slot name=\"title\">${this.title}</slot></bd-h>`\n : nothing}\n\n <div\n class=\"bd-reviewgrid-grid ${singleCard ? \"bd-reviewgrid-grid--single\" : \"\"}\"\n style=\"--bd-review-columns: ${this._columns};\"\n role=\"list\"\n >\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review-grid\": BdReviewGrid;\n }\n}"],"mappings":"A,maAWA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEG,KAAA,SAAA,C,QALK,KAAA,OAAA,CAACE,EAAaP,CAAa,C,CAO3C,IAAI,QAAS,CACX,MAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,OAAQ,GAAOQ,EAAG,UAAY,WAAW,CACrE,CAIA,eAAgB,CACd,IAAMC,EAAQ,KAAK,OAAO,OAC1B,KAAK,SAAWA,GAAS,EAAI,EAAI,KAAK,IAAIA,EAAO,CAAC,CACpD,CAEA,QAAS,CACP,IAAMC,EAAa,KAAK,WAAa,EAErC,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI,gEAAgE,KAAK,MAAM,gBAC/EC,EAAQ;;;sCAGkBD,EAAa,6BAA+B,GAAG;wCAC7C,KAAK,SAAS;;;8BAGxB,KAAK,cAAc;;;KAI/C,CACF,EAnCGT,EAAA,CAAAW,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAY,EAAM,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAa,EAAc,gBAAgB,CAAA,EAAAV,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../icons/quote-icon.js";
3
4
  import "../paragraph/paragraph.js";
4
5
  type Variant = "tint" | "neutral";
@@ -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"../paragraph/paragraph.js";import"../icons/quote-icon.js";import r from"./review.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends i{static{this.styles=[t,r]}constructor(){super(),this.variant=`tint`,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._internals.role=this.parentElement?.localName===`bd-review-grid`?`listitem`:null}render(){return a`
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"../paragraph/paragraph.js";import"../icons/quote-icon.js";import n from"./review.css.js";import{LitElement as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=class extends r{static{this.styles=[n]}constructor(){super(),this.variant=`tint`,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._internals.role=this.parentElement?.localName===`bd-review-grid`?`listitem`:null}render(){return i`
2
2
  <div class="bd-review-card">
3
3
  <bd-quote-icon class="bd-review-mark" size="xl"></bd-quote-icon>
4
4
 
@@ -11,5 +11,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
11
11
  <span class="bd-review-date"><slot name="date"></slot></span>
12
12
  </div>
13
13
  </div>
14
- `}};n([o({type:String,reflect:!0})],s.prototype,`variant`,void 0),s=n([e(`bd-review`)],s);
14
+ `}};t([a({type:String,reflect:!0})],o.prototype,`variant`,void 0),o=t([e(`bd-review`)],o);
15
15
  //# sourceMappingURL=review.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"review.js","names":["reviewCSS","_decorate","__decorate","review_css_default","BdReview","LitElement","tokens","property","defineElement"],"sources":["../../../../src/components/review/review.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/icons/quote-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport reviewCSS from \"./review.css.ts\";\n\ntype Variant = \"tint\" | \"neutral\";\n\n/**\n * A single testimonial/review card. Everything is slotted rather than\n * passed as props, so callers can put arbitrary markup (a bd-p, a link,\n * bold text) in any of the three slots:\n *\n * <bd-review variant=\"tint\">\n * <span slot=\"quote\">If you're looking to buy a security suite...</span>\n * <span slot=\"source\">PCMag</span>\n * <span slot=\"date\">February 3, 2026</span>\n * </bd-review>\n *\n * `variant` is the only prop, since it's an appearance switch (background\n * colour), not content:\n * \"tint\" — the brand's lightest wash (--status-brand-surface), so it\n * follows the business line's brand\n * \"neutral\" — a container ground (--color-surface-container)\n */\n\n@defineElement(\"bd-review\")\nclass BdReview extends LitElement {\n static styles = [tokens, reviewCSS];\n\n @property({ type: String, reflect: true })\n variant: Variant = \"tint\"; // \"tint\" | \"neutral\"\n\n _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n /* In a bd-review-grid, a review is one item of the grid's list -- a list\n whose children are not list items is announced as an empty list, or not\n at all (axe: aria-required-children). The role is the element's own,\n through ElementInternals, as bd-breadcrumb-item's is: the grid used to\n write role=\"listitem\" onto the page's markup, where it stayed after the\n review left the list. A role the page writes on the element still wins,\n and outside a grid a review is no item of anything. */\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = this.parentElement?.localName === \"bd-review-grid\" ? \"listitem\" : null;\n }\n\n render() {\n return html`\n <div class=\"bd-review-card\">\n <bd-quote-icon class=\"bd-review-mark\" size=\"xl\"></bd-quote-icon>\n\n <bd-p variant=\"regular\" class=\"bd-review-quote\">\n <slot name=\"quote\"></slot>\n </bd-p>\n\n <div class=\"bd-review-meta\">\n <bd-p variant=\"small\" font-weight=\"bold\" class=\"bd-review-source\"><slot name=\"source\"></slot></bd-p>\n <span class=\"bd-review-date\"><slot name=\"date\"></slot></span>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review\": BdReview;\n }\n}"],"mappings":"A,8WA4BA,IACMI,EADN,cACuBC,CAAW,C,OAChB,KAAA,OAAA,CAACC,EAAQN,CAAS,C,CAOlC,aAAc,CACZ,MAAM,EALW,KAAA,QAAA,OAMjB,KAAK,WAAa,KAAK,gBAAgB,CACzC,CASA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,WAAW,KAAO,KAAK,eAAe,YAAc,iBAAmB,WAAa,IAC3F,CAEA,QAAS,CACP,MAAO,EAAI;;;;;;;;;;;;;KAcb,CACF,EAtCGC,EAAA,CAAAM,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAH,EAAA,UAAA,UAAA,IAAA,EAAA,EAJ1C,EAAAH,EAAA,CAAAO,EAAc,WAAW,CAAA,EAAAJ,CAAA"}
1
+ {"version":3,"file":"review.js","names":["reviewCSS","_decorate","__decorate","review_css_default","BdReview","LitElement","property","defineElement"],"sources":["../../../../src/components/review/review.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/icons/quote-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport reviewCSS from \"./review.css.ts\";\n\ntype Variant = \"tint\" | \"neutral\";\n\n/**\n * A single testimonial/review card. Everything is slotted rather than\n * passed as props, so callers can put arbitrary markup (a bd-p, a link,\n * bold text) in any of the three slots:\n *\n * <bd-review variant=\"tint\">\n * <span slot=\"quote\">If you're looking to buy a security suite...</span>\n * <span slot=\"source\">PCMag</span>\n * <span slot=\"date\">February 3, 2026</span>\n * </bd-review>\n *\n * `variant` is the only prop, since it's an appearance switch (background\n * colour), not content:\n * \"tint\" — the brand's lightest wash (--status-brand-surface), so it\n * follows the business line's brand\n * \"neutral\" — a container ground (--color-surface-container)\n */\n\n@defineElement(\"bd-review\")\nclass BdReview extends LitElement {\n static styles = [reviewCSS];\n\n @property({ type: String, reflect: true })\n variant: Variant = \"tint\"; // \"tint\" | \"neutral\"\n\n _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n /* In a bd-review-grid, a review is one item of the grid's list -- a list\n whose children are not list items is announced as an empty list, or not\n at all (axe: aria-required-children). The role is the element's own,\n through ElementInternals, as bd-breadcrumb-item's is: the grid used to\n write role=\"listitem\" onto the page's markup, where it stayed after the\n review left the list. A role the page writes on the element still wins,\n and outside a grid a review is no item of anything. */\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = this.parentElement?.localName === \"bd-review-grid\" ? \"listitem\" : null;\n }\n\n render() {\n return html`\n <div class=\"bd-review-card\">\n <bd-quote-icon class=\"bd-review-mark\" size=\"xl\"></bd-quote-icon>\n\n <bd-p variant=\"regular\" class=\"bd-review-quote\">\n <slot name=\"quote\"></slot>\n </bd-p>\n\n <div class=\"bd-review-meta\">\n <bd-p variant=\"small\" font-weight=\"bold\" class=\"bd-review-source\"><slot name=\"source\"></slot></bd-p>\n <span class=\"bd-review-date\"><slot name=\"date\"></slot></span>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review\": BdReview;\n }\n}"],"mappings":"A,6VA6BA,IACMI,EADN,cACuBC,CAAW,C,OAChB,KAAA,OAAA,CAACL,CAAS,C,CAO1B,aAAc,CACZ,MAAM,EALW,KAAA,QAAA,OAMjB,KAAK,WAAa,KAAK,gBAAgB,CACzC,CASA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,WAAW,KAAO,KAAK,eAAe,YAAc,iBAAmB,WAAa,IAC3F,CAEA,QAAS,CACP,MAAO,EAAI;;;;;;;;;;;;;KAcb,CACF,EAtCGC,EAAA,CAAAK,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAF,EAAA,UAAA,UAAA,IAAA,EAAA,EAJ1C,EAAAH,EAAA,CAAAM,EAAc,WAAW,CAAA,EAAAH,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type PropertyValues } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "../paragraph/paragraph.js";
4
5
  declare const LAYOUTS: readonly ["stacked", "split", "centered"];
@@ -1,6 +1,6 @@
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{resolveEnum as r}from"../shared/prop-vocabulary.js";import"../paragraph/paragraph.js";import{ensembleCSS as i}from"../shared/ensemble.css.js";import{sectionHeaderCSS as a}from"./section-header.css.js";import{LitElement as o,html as s,nothing as c}from"lit";import{property as l,state as u}from"lit/decorators.js";var d=[`stacked`,`split`,`centered`],f=class extends o{constructor(...e){super(...e),this.eyebrow=``,this.heading=``,this.lead=``,this.as=`h2`,this.layout=`stacked`,this._hasLead=!1}static{this.styles=[t,i,a]}willUpdate(e){e.has(`layout`)&&(this.layout=r(this.layout,{allowed:d,fallback:`stacked`}))}_onLeadSlot(e){this._hasLead=e.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.textContent.trim())}render(){let e=this.lead||this._hasLead;return 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{resolveEnum as n}from"../shared/prop-vocabulary.js";import"../paragraph/paragraph.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import{sectionHeaderCSS as i}from"./section-header.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=[`stacked`,`split`,`centered`],d=class extends a{constructor(...e){super(...e),this.eyebrow=``,this.heading=``,this.lead=``,this.as=`h2`,this.layout=`stacked`,this._hasLead=!1}static{this.styles=[r,i]}willUpdate(e){e.has(`layout`)&&(this.layout=n(this.layout,{allowed:u,fallback:`stacked`}))}_onLeadSlot(e){this._hasLead=e.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.textContent.trim())}render(){let e=this.lead||this._hasLead;return o`
2
2
  <header class="bd-ensemble root">
3
- ${this.eyebrow?s`<bd-p variant="eyebrow" class="eyebrow"><span class="text">${this.eyebrow}</span></bd-p>`:c}
3
+ ${this.eyebrow?o`<bd-p variant="eyebrow" class="eyebrow"><span class="text">${this.eyebrow}</span></bd-p>`:s}
4
4
  <div class="row">
5
5
  <bd-h as="${this.as}" visual-level="h2" class="heading"><span class="text">${this.heading}</span></bd-h>
6
6
  <div class="lead" ?hidden=${!e}>
@@ -8,5 +8,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
8
8
  </div>
9
9
  </div>
10
10
  </header>
11
- `}};n([l({type:String})],f.prototype,`eyebrow`,void 0),n([l({type:String})],f.prototype,`heading`,void 0),n([l({type:String})],f.prototype,`lead`,void 0),n([l({type:String})],f.prototype,`as`,void 0),n([l({type:String,reflect:!0})],f.prototype,`layout`,void 0),n([u()],f.prototype,`_hasLead`,void 0),f=n([e(`bd-section-header`)],f);export{f as SectionHeader};
11
+ `}};t([c({type:String})],d.prototype,`eyebrow`,void 0),t([c({type:String})],d.prototype,`heading`,void 0),t([c({type:String})],d.prototype,`lead`,void 0),t([c({type:String})],d.prototype,`as`,void 0),t([c({type:String,reflect:!0})],d.prototype,`layout`,void 0),t([l()],d.prototype,`_hasLead`,void 0),d=t([e(`bd-section-header`)],d);export{d as SectionHeader};
12
12
  //# sourceMappingURL=section-header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","tokens","ensembleCSS","sectionHeaderCSS","changed","resolveEnum","n","showLead","nothing","property","state","defineElement"],"sources":["../../../../src/components/section-header/section-header.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { sectionHeaderCSS } from \"./section-header.css.ts\";\n\nconst LAYOUTS = [\"stacked\", \"split\", \"centered\"] as const;\n\ntype Layout = typeof LAYOUTS[number];\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The header that opens a page section: an eyebrow, the section's h2 and a\n * lead. The homepage opens five sections with it -- AI, Why trust, Proven,\n * Insights and the solution splitter -- where each module used to spell its\n * own (bd-overview, bd-bento-grid, bd-trust-panel). Drawn in the foundation\n * Figma file as Section header.\n *\n * layout=\"split\" puts the headline and lead side by side from lg; below lg,\n * and in \"stacked\", everything stacks. layout=\"centered\" centres the three on\n * a narrower measure. Leave eyebrow and lead out for a title-only header.\n *\n * The lead is an attribute for plain copy, or the `lead` slot when it carries\n * a link -- `<bd-link inline underline>`, since colour alone measures 2.91:1\n * against the body text and fails WCAG 1.4.1. Slotted copy takes the lead's\n * role from here, so the page writes words, not typography.\n */\n@defineElement(\"bd-section-header\")\nexport class SectionHeader extends LitElement {\n static styles = [tokens, ensembleCSS, sectionHeaderCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n // a page section's title: the outline is the page's, so it can say otherwise\n @property({ type: String })\n as: HeadingTag = \"h2\";\n @property({ type: String, reflect: true })\n layout: Layout = \"stacked\";\n @state()\n _hasLead = false;\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"layout\")) {\n this.layout = resolveEnum(this.layout, { allowed: LAYOUTS, fallback: \"stacked\" });\n }\n }\n\n _onLeadSlot(e: Event) {\n this._hasLead = (e.target as HTMLSlotElement).assignedNodes({ flatten: true })\n .some(n => n.nodeType === Node.ELEMENT_NODE || n.textContent!.trim());\n }\n\n render() {\n const showLead = this.lead || this._hasLead;\n return html`\n <header class=\"bd-ensemble root\">\n ${this.eyebrow\n ? html`<bd-p variant=\"eyebrow\" class=\"eyebrow\"><span class=\"text\">${this.eyebrow}</span></bd-p>`\n : nothing}\n <div class=\"row\">\n <bd-h as=\"${this.as}\" visual-level=\"h2\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>\n <div class=\"lead\" ?hidden=${!showLead}>\n <slot name=\"lead\" @slotchange=${this._onLeadSlot}><span class=\"text\">${this.lead}</span></slot>\n </div>\n </div>\n </header>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section-header\": SectionHeader;\n }\n}\n"],"mappings":"A,ohBAUA,IAAME,EAAU,CAAC,UAAW,QAAS,UAAU,EAsBlCC,EAAN,cAA4BC,CAAW,C,8BAIlC,KAAA,QAAA,GAEA,KAAA,QAAA,GAEH,KAAA,KAAA,GAGU,KAAA,GAAA,KAEA,KAAA,OAAA,UAEN,KAAA,SAAA,E,QAdK,KAAA,OAAA,CAACE,EAAQC,EAAaC,CAAgB,C,CAgBtD,WAAW,EAA+B,CACpCC,EAAQ,IAAI,QAAQ,IACtB,KAAK,OAASC,EAAY,KAAK,OAAQ,CAAE,QAASR,EAAS,SAAU,SAAU,CAAC,EAEpF,CAEA,YAAY,EAAU,CACpB,KAAK,SAAY,EAAE,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAC3E,KAAK,GAAKS,EAAE,WAAa,KAAK,cAAgBA,EAAE,YAAa,KAAK,CAAC,CACxE,CAEA,QAAS,CACP,IAAMC,EAAW,KAAK,MAAQ,KAAK,SACnC,MAAO,EAAI;;UAEL,KAAK,QACH,CAAI,8DAA8D,KAAK,QAAQ,gBAC/EC,EAAQ;;sBAEE,KAAK,GAAG,yDAAyD,KAAK,QAAQ;sCAC9D,CAACD,EAAS;4CACJ,KAAK,YAAY,sBAAsB,KAAK,KAAK;;;;KAK3F,CACF,EAzCGZ,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAX,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAX,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAX,EAAA,UAAA,OAAA,IAAA,EAAA,EAGzBH,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAX,EAAA,UAAA,KAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAX,EAAA,UAAA,SAAA,IAAA,EAAA,EAExCH,EAAA,CAAAe,EAAM,CAAA,EAAAZ,EAAA,UAAA,WAAA,IAAA,EAAA,EAfR,EAAAH,EAAA,CAAAgB,EAAc,mBAAmB,CAAA,EAAAb,CAAA,E"}
1
+ {"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","ensembleCSS","sectionHeaderCSS","changed","resolveEnum","n","showLead","nothing","property","state","defineElement"],"sources":["../../../../src/components/section-header/section-header.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { sectionHeaderCSS } from \"./section-header.css.ts\";\n\nconst LAYOUTS = [\"stacked\", \"split\", \"centered\"] as const;\n\ntype Layout = typeof LAYOUTS[number];\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The header that opens a page section: an eyebrow, the section's h2 and a\n * lead. The homepage opens five sections with it -- AI, Why trust, Proven,\n * Insights and the solution splitter -- where each module used to spell its\n * own (bd-overview, bd-bento-grid, bd-trust-panel). Drawn in the foundation\n * Figma file as Section header.\n *\n * layout=\"split\" puts the headline and lead side by side from lg; below lg,\n * and in \"stacked\", everything stacks. layout=\"centered\" centres the three on\n * a narrower measure. Leave eyebrow and lead out for a title-only header.\n *\n * The lead is an attribute for plain copy, or the `lead` slot when it carries\n * a link -- `<bd-link inline underline>`, since colour alone measures 2.91:1\n * against the body text and fails WCAG 1.4.1. Slotted copy takes the lead's\n * role from here, so the page writes words, not typography.\n */\n@defineElement(\"bd-section-header\")\nexport class SectionHeader extends LitElement {\n static styles = [ensembleCSS, sectionHeaderCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n // a page section's title: the outline is the page's, so it can say otherwise\n @property({ type: String })\n as: HeadingTag = \"h2\";\n @property({ type: String, reflect: true })\n layout: Layout = \"stacked\";\n @state()\n _hasLead = false;\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"layout\")) {\n this.layout = resolveEnum(this.layout, { allowed: LAYOUTS, fallback: \"stacked\" });\n }\n }\n\n _onLeadSlot(e: Event) {\n this._hasLead = (e.target as HTMLSlotElement).assignedNodes({ flatten: true })\n .some(n => n.nodeType === Node.ELEMENT_NODE || n.textContent!.trim());\n }\n\n render() {\n const showLead = this.lead || this._hasLead;\n return html`\n <header class=\"bd-ensemble root\">\n ${this.eyebrow\n ? html`<bd-p variant=\"eyebrow\" class=\"eyebrow\"><span class=\"text\">${this.eyebrow}</span></bd-p>`\n : nothing}\n <div class=\"row\">\n <bd-h as=\"${this.as}\" visual-level=\"h2\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>\n <div class=\"lead\" ?hidden=${!showLead}>\n <slot name=\"lead\" @slotchange=${this._onLeadSlot}><span class=\"text\">${this.lead}</span></slot>\n </div>\n </div>\n </header>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section-header\": SectionHeader;\n }\n}\n"],"mappings":"A,mgBAWA,IAAME,EAAU,CAAC,UAAW,QAAS,UAAU,EAsBlCC,EAAN,cAA4BC,CAAW,C,8BAIlC,KAAA,QAAA,GAEA,KAAA,QAAA,GAEH,KAAA,KAAA,GAGU,KAAA,GAAA,KAEA,KAAA,OAAA,UAEN,KAAA,SAAA,E,QAdK,KAAA,OAAA,CAACE,EAAaC,CAAgB,C,CAgB9C,WAAW,EAA+B,CACpCC,EAAQ,IAAI,QAAQ,IACtB,KAAK,OAASC,EAAY,KAAK,OAAQ,CAAE,QAASP,EAAS,SAAU,SAAU,CAAC,EAEpF,CAEA,YAAY,EAAU,CACpB,KAAK,SAAY,EAAE,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAC3E,KAAK,GAAKQ,EAAE,WAAa,KAAK,cAAgBA,EAAE,YAAa,KAAK,CAAC,CACxE,CAEA,QAAS,CACP,IAAMC,EAAW,KAAK,MAAQ,KAAK,SACnC,MAAO,EAAI;;UAEL,KAAK,QACH,CAAI,8DAA8D,KAAK,QAAQ,gBAC/EC,EAAQ;;sBAEE,KAAK,GAAG,yDAAyD,KAAK,QAAQ;sCAC9D,CAACD,EAAS;4CACJ,KAAK,YAAY,sBAAsB,KAAK,KAAK;;;;KAK3F,CACF,EAzCGX,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,OAAA,IAAA,EAAA,EAGzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,KAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAExCH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,WAAA,IAAA,EAAA,EAfR,EAAAH,EAAA,CAAAe,EAAc,mBAAmB,CAAA,EAAAZ,CAAA,E"}
@@ -0,0 +1,50 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from "lit";
2
+ type Observer = ResizeObserver | IntersectionObserver | MutationObserver;
3
+ /**
4
+ * A Resize-, Intersection- or MutationObserver a component keeps for as long
5
+ * as it is connected.
6
+ *
7
+ * Every component that observed something wrote the same three steps by hand
8
+ * -- observe once the shadow root has rendered, disconnect on disconnect,
9
+ * observe again on reconnect -- and the third was the one that went missing.
10
+ * firstUpdated runs once in an element's life, so an observer started there
11
+ * and disconnected in disconnectedCallback was gone for good the first time
12
+ * the element moved: a page decorating a block, a framework reordering a
13
+ * list, replaceChildren. bd-carousel-section stopped counting its stops,
14
+ * bd-card-section stopped aligning its rows, bd-anchor-nav's indicator
15
+ * stopped following its links and bd-stat-highlight never rolled, showing
16
+ * zeros. tooltip, light-carousel and logo-marquee had each fixed it on their
17
+ * own. This is the steps once, as MediaQueryController is for a media query.
18
+ *
19
+ * The component builds the observer -- what a delivery means stays its own
20
+ * -- and says what to observe. `observe` is called with the observer on the
21
+ * first update, once the shadow root exists, and again on every reconnect;
22
+ * it may observe nothing when what it looks for is not rendered. A component
23
+ * that is done for good calls stop(): bd-stat-highlight, once its figure has
24
+ * rolled.
25
+ *
26
+ * new ObserverController(this,
27
+ * () => new ResizeObserver(() => this._measure()),
28
+ * observer => observer.observe(this._track));
29
+ */
30
+ export declare class ObserverController<O extends Observer> implements ReactiveController {
31
+ private readonly _host;
32
+ private readonly _create;
33
+ private readonly _observe;
34
+ private _observer?;
35
+ private _attached;
36
+ private _stopped;
37
+ constructor(host: ReactiveControllerHost & {
38
+ hasUpdated: boolean;
39
+ }, create: () => O, observe: (observer: O) => void);
40
+ /** The observer, once it has been made. */
41
+ get observer(): O | undefined;
42
+ hostConnected(): void;
43
+ hostUpdated(): void;
44
+ hostDisconnected(): void;
45
+ /** Disconnects for good: no later connect observes again. */
46
+ stop(): void;
47
+ private _attach;
48
+ private _detach;
49
+ }
50
+ export {};
@@ -0,0 +1,2 @@
1
+ var e=class{constructor(e,t,n){this._attached=!1,this._stopped=!1,this._host=e,this._create=t,this._observe=n,e.addController(this)}get observer(){return this._observer}hostConnected(){this._host.hasUpdated&&this._attach()}hostUpdated(){this._attach()}hostDisconnected(){this._detach()}stop(){this._stopped=!0,this._detach()}_attach(){this._attached||this._stopped||(this._observer??=this._create(),this._attached=!0,this._observe(this._observer))}_detach(){this._observer?.disconnect(),this._attached=!1}};export{e as ObserverController};
2
+ //# sourceMappingURL=controller.observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.observer.js","names":["ObserverController","host","create","observe"],"sources":["../../../../src/components/shared/controller.observer.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\ntype Observer = ResizeObserver | IntersectionObserver | MutationObserver;\n\n/**\n * A Resize-, Intersection- or MutationObserver a component keeps for as long\n * as it is connected.\n *\n * Every component that observed something wrote the same three steps by hand\n * -- observe once the shadow root has rendered, disconnect on disconnect,\n * observe again on reconnect -- and the third was the one that went missing.\n * firstUpdated runs once in an element's life, so an observer started there\n * and disconnected in disconnectedCallback was gone for good the first time\n * the element moved: a page decorating a block, a framework reordering a\n * list, replaceChildren. bd-carousel-section stopped counting its stops,\n * bd-card-section stopped aligning its rows, bd-anchor-nav's indicator\n * stopped following its links and bd-stat-highlight never rolled, showing\n * zeros. tooltip, light-carousel and logo-marquee had each fixed it on their\n * own. This is the steps once, as MediaQueryController is for a media query.\n *\n * The component builds the observer -- what a delivery means stays its own\n * -- and says what to observe. `observe` is called with the observer on the\n * first update, once the shadow root exists, and again on every reconnect;\n * it may observe nothing when what it looks for is not rendered. A component\n * that is done for good calls stop(): bd-stat-highlight, once its figure has\n * rolled.\n *\n * new ObserverController(this,\n * () => new ResizeObserver(() => this._measure()),\n * observer => observer.observe(this._track));\n */\nexport class ObserverController<O extends Observer> implements ReactiveController {\n private readonly _host : ReactiveControllerHost & { hasUpdated: boolean };\n private readonly _create : () => O;\n private readonly _observe: (observer: O) => void;\n private _observer? : O;\n private _attached = false;\n private _stopped = false;\n\n constructor(host: ReactiveControllerHost & { hasUpdated: boolean }, create: () => O, observe: (observer: O) => void) {\n this._host = host;\n this._create = create;\n this._observe = observe;\n host.addController(this);\n }\n\n /** The observer, once it has been made. */\n get observer() {\n return this._observer;\n }\n\n /* A reconnect: the shadow root is already there. A first connection waits\n for hostUpdated, because nothing is rendered yet. */\n hostConnected() {\n if (this._host.hasUpdated) this._attach();\n }\n\n /* Runs before the host's own firstUpdated, so `observe` finds what it looks\n for through the render root, not through a field firstUpdated sets. */\n hostUpdated() {\n this._attach();\n }\n\n hostDisconnected() {\n this._detach();\n }\n\n /** Disconnects for good: no later connect observes again. */\n stop() {\n this._stopped = true;\n this._detach();\n }\n\n private _attach() {\n if (this._attached || this._stopped) return;\n this._observer ??= this._create();\n this._attached = true;\n this._observe(this._observer);\n }\n\n private _detach() {\n this._observer?.disconnect();\n this._attached = false;\n }\n}\n"],"mappings":"AA+BA,IAAaA,EAAb,KAAkF,CAQhF,YAAY,EAAwD,EAAiB,EAAgC,CAHjG,KAAA,UAAA,GACD,KAAA,SAAA,GAGjB,KAAK,MAAQC,EACb,KAAK,QAAUC,EACf,KAAK,SAAWC,EAChBF,EAAK,cAAc,IAAI,CACzB,CAGA,IAAI,UAAW,CACb,OAAO,KAAK,SACd,CAIA,eAAgB,CACV,KAAK,MAAM,YAAY,KAAK,QAAQ,CAC1C,CAIA,aAAc,CACZ,KAAK,QAAQ,CACf,CAEA,kBAAmB,CACjB,KAAK,QAAQ,CACf,CAGA,MAAO,CACL,KAAK,SAAW,GAChB,KAAK,QAAQ,CACf,CAEA,SAAkB,CACZ,KAAK,WAAa,KAAK,WAC3B,KAAK,YAAc,KAAK,QAAQ,EAChC,KAAK,UAAY,GACjB,KAAK,SAAS,KAAK,SAAS,EAC9B,CAEA,SAAkB,CAChB,KAAK,WAAW,WAAW,EAC3B,KAAK,UAAY,EACnB,CACF,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
  type SlotState = "_hasLeftIcon" | "_hasLeftButtons" | "_hasRightIcon" | "_hasRightButtons";
@@ -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"../paragraph/paragraph.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import i from"./spotlight-section.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=class extends a{constructor(...e){super(...e),this.title=``,this.description=``,this._hasLeftIcon=!1,this._hasLeftButtons=!1,this._hasRightIcon=!1,this._hasRightButtons=!1}static{this.styles=[t,r,i]}_onSlotChange(e,t){let n=t.target.assignedNodes({flatten:!0}).length>0;this[e]!==n&&(this[e]=n)}render(){let e=this._hasLeftIcon;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"./spotlight-section.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends i{constructor(...e){super(...e),this.title=``,this.description=``,this._hasLeftIcon=!1,this._hasLeftButtons=!1,this._hasRightIcon=!1,this._hasRightButtons=!1}static{this.styles=[n,r]}_onSlotChange(e,t){let n=t.target.assignedNodes({flatten:!0}).length>0;this[e]!==n&&(this[e]=n)}render(){let e=this._hasLeftIcon;return a`
2
2
  <div class="bd-ensemble">
3
3
  <div class="bd-spotlightsection-container">
4
4
  <div class="bd-spotlightsection-left">
@@ -6,11 +6,11 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
6
6
  <slot name="left-icon" @slotchange=${e=>this._onSlotChange(`_hasLeftIcon`,e)}></slot>
7
7
  </div>
8
8
 
9
- ${e?o`
9
+ ${e?a`
10
10
  <bd-p variant="large" color="on-brand" class="bd-spotlightsection-title bd-spotlightsection-title--small">
11
11
  <slot name="title">${this.title}</slot>
12
12
  </bd-p>
13
- `:o`
13
+ `:a`
14
14
  <bd-h as="h2" fontWeight="normal" class="bd-spotlightsection-title">
15
15
  <slot name="title">${this.title}</slot>
16
16
  </bd-h>
@@ -26,15 +26,15 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
26
26
  <slot name="icon" @slotchange=${e=>this._onSlotChange(`_hasRightIcon`,e)}></slot>
27
27
  </div>
28
28
 
29
- ${this.description?e?o`
29
+ ${this.description?e?a`
30
30
  <bd-h as="h2" fontWeight="normal" color="on-brand" class="bd-spotlightsection-description bd-spotlightsection-description--large">
31
31
  <slot name="description">${this.description}</slot>
32
32
  </bd-h>
33
- `:o`
33
+ `:a`
34
34
  <bd-p variant="large" color="on-brand" class="bd-spotlightsection-description">
35
35
  <slot name="description">${this.description}</slot>
36
36
  </bd-p>
37
- `:s}
37
+ `:o}
38
38
 
39
39
  <div class="bd-spotlightsection-buttons" ?hidden=${!this._hasRightButtons}>
40
40
  <slot name="right-buttons" @slotchange=${e=>this._onSlotChange(`_hasRightButtons`,e)}></slot>
@@ -42,5 +42,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
42
42
  </div>
43
43
  </div>
44
44
  </div>
45
- `}};n([c({type:String})],u.prototype,`title`,void 0),n([c({type:String})],u.prototype,`description`,void 0),n([l()],u.prototype,`_hasLeftIcon`,void 0),n([l()],u.prototype,`_hasLeftButtons`,void 0),n([l()],u.prototype,`_hasRightIcon`,void 0),n([l()],u.prototype,`_hasRightButtons`,void 0),u=n([e(`bd-spotlight-section`)],u);
45
+ `}};t([s({type:String})],l.prototype,`title`,void 0),t([s({type:String})],l.prototype,`description`,void 0),t([c()],l.prototype,`_hasLeftIcon`,void 0),t([c()],l.prototype,`_hasLeftButtons`,void 0),t([c()],l.prototype,`_hasRightIcon`,void 0),t([c()],l.prototype,`_hasRightButtons`,void 0),l=t([e(`bd-spotlight-section`)],l);
46
46
  //# sourceMappingURL=spotlight-section.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-section.js","names":["spotlightSectionCSS","_decorate","__decorate","spotlight_section_css_default","BdSpotlightSection","LitElement","_args","tokens","ensembleCSS","hasContent","event","stateKey","flipped","nothing","property","state","defineElement"],"sources":["../../../../src/components/spotlight-section/spotlight-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } 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 spotlightSectionCSS from \"./spotlight-section.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n\ntype SlotState = \"_hasLeftIcon\" | \"_hasLeftButtons\" | \"_hasRightIcon\" | \"_hasRightButtons\";\n\n@defineElement(\"bd-spotlight-section\")\nclass BdSpotlightSection extends LitElement {\n static styles = [tokens, ensembleCSS, spotlightSectionCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @state()\n _hasLeftIcon = false;\n @state()\n _hasLeftButtons = false;\n @state()\n _hasRightIcon = false;\n @state()\n _hasRightButtons = false;\n\n\n _onSlotChange(stateKey: SlotState, event: Event) {\n const hasContent = (event.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n if (this[stateKey] !== hasContent) this[stateKey] = hasContent;\n }\n\n render() {\n\n const flipped = this._hasLeftIcon;\n\n return html`\n <div class=\"bd-ensemble\">\n <div class=\"bd-spotlightsection-container\">\n <div class=\"bd-spotlightsection-left\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasLeftIcon}>\n <slot name=\"left-icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftIcon\", e)}></slot>\n </div>\n\n ${flipped\n ? html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-title bd-spotlightsection-title--small\">\n <slot name=\"title\">${this.title}</slot>\n </bd-p>\n `\n : html`\n <bd-h as=\"h2\" fontWeight=\"normal\" class=\"bd-spotlightsection-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasLeftButtons}>\n <slot name=\"left-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftButtons\", e)}></slot>\n </div>\n </div>\n\n <div class=\"bd-spotlightsection-side\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasRightIcon}>\n <slot name=\"icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightIcon\", e)}></slot>\n </div>\n\n ${this.description\n ? flipped\n ? html`\n <bd-h as=\"h2\" fontWeight=\"normal\" color=\"on-brand\" class=\"bd-spotlightsection-description bd-spotlightsection-description--large\">\n <slot name=\"description\">${this.description}</slot>\n </bd-h>\n `\n : html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasRightButtons}>\n <slot name=\"right-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightButtons\", e)}></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-spotlight-section\": BdSpotlightSection;\n }\n}"],"mappings":"A,wcAYA,IACMI,EADN,cACiCC,CAAW,C,8BAIlC,KAAA,MAAA,GAEM,KAAA,YAAA,GAEC,KAAA,aAAA,GAEG,KAAA,gBAAA,GAEF,KAAA,cAAA,GAEG,KAAA,iBAAA,E,QAbH,KAAA,OAAA,CAACE,EAAQC,EAAaR,CAAmB,C,CAgBzD,cAAc,EAAqB,EAAc,CAC/C,IAAMS,EAAcC,EAAM,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAAC,OAAS,EAC3F,KAAKC,KAAcF,IAAY,KAAKE,GAAYF,EACtD,CAEA,QAAS,CAEP,IAAMG,EAAU,KAAK,aAErB,MAAO,EAAI;;;;4DAI6C,CAAC,KAAK,aAAa;mDAC3B,GAAa,KAAK,cAAc,eAAgB,CAAC,EAAE;;;cAGzFA,EACE,CAAI;;yCAEqB,KAAK,MAAM;;kBAGpC,CAAI;;yCAEqB,KAAK,MAAM;;kBAElC;;+DAE6C,CAAC,KAAK,gBAAgB;sDAC9B,GAAa,KAAK,cAAc,kBAAmB,CAAC,EAAE;;;;;4DAKjD,CAAC,KAAK,cAAc;8CACjC,GAAa,KAAK,cAAc,gBAAiB,CAAC,EAAE;;;cAGrF,KAAK,YACHA,EACE,CAAI;;iDAE2B,KAAK,YAAY;;oBAGhD,CAAI;;iDAE2B,KAAK,YAAY;;oBAGlDC,EAAQ;;+DAEuC,CAAC,KAAK,iBAAiB;uDAC9B,GAAa,KAAK,cAAc,mBAAoB,CAAC,EAAE;;;;;KAM7G,CACF,EA3EGZ,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,eAAA,IAAA,EAAA,EAENH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,kBAAA,IAAA,EAAA,EAENH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,gBAAA,IAAA,EAAA,EAENH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,mBAAA,IAAA,EAAA,EAdR,EAAAH,EAAA,CAAAe,EAAc,sBAAsB,CAAA,EAAAZ,CAAA"}
1
+ {"version":3,"file":"spotlight-section.js","names":["spotlightSectionCSS","_decorate","__decorate","spotlight_section_css_default","BdSpotlightSection","LitElement","_args","ensembleCSS","hasContent","event","stateKey","flipped","nothing","property","state","defineElement"],"sources":["../../../../src/components/spotlight-section/spotlight-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport spotlightSectionCSS from \"./spotlight-section.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n\ntype SlotState = \"_hasLeftIcon\" | \"_hasLeftButtons\" | \"_hasRightIcon\" | \"_hasRightButtons\";\n\n@defineElement(\"bd-spotlight-section\")\nclass BdSpotlightSection extends LitElement {\n static styles = [ensembleCSS, spotlightSectionCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @state()\n _hasLeftIcon = false;\n @state()\n _hasLeftButtons = false;\n @state()\n _hasRightIcon = false;\n @state()\n _hasRightButtons = false;\n\n\n _onSlotChange(stateKey: SlotState, event: Event) {\n const hasContent = (event.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n if (this[stateKey] !== hasContent) this[stateKey] = hasContent;\n }\n\n render() {\n\n const flipped = this._hasLeftIcon;\n\n return html`\n <div class=\"bd-ensemble\">\n <div class=\"bd-spotlightsection-container\">\n <div class=\"bd-spotlightsection-left\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasLeftIcon}>\n <slot name=\"left-icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftIcon\", e)}></slot>\n </div>\n\n ${flipped\n ? html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-title bd-spotlightsection-title--small\">\n <slot name=\"title\">${this.title}</slot>\n </bd-p>\n `\n : html`\n <bd-h as=\"h2\" fontWeight=\"normal\" class=\"bd-spotlightsection-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasLeftButtons}>\n <slot name=\"left-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftButtons\", e)}></slot>\n </div>\n </div>\n\n <div class=\"bd-spotlightsection-side\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasRightIcon}>\n <slot name=\"icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightIcon\", e)}></slot>\n </div>\n\n ${this.description\n ? flipped\n ? html`\n <bd-h as=\"h2\" fontWeight=\"normal\" color=\"on-brand\" class=\"bd-spotlightsection-description bd-spotlightsection-description--large\">\n <slot name=\"description\">${this.description}</slot>\n </bd-h>\n `\n : html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasRightButtons}>\n <slot name=\"right-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightButtons\", e)}></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-spotlight-section\": BdSpotlightSection;\n }\n}"],"mappings":"A,ubAaA,IACMI,EADN,cACiCC,CAAW,C,8BAIlC,KAAA,MAAA,GAEM,KAAA,YAAA,GAEC,KAAA,aAAA,GAEG,KAAA,gBAAA,GAEF,KAAA,cAAA,GAEG,KAAA,iBAAA,E,QAbH,KAAA,OAAA,CAACE,EAAaP,CAAmB,C,CAgBjD,cAAc,EAAqB,EAAc,CAC/C,IAAMQ,EAAcC,EAAM,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAAC,OAAS,EAC3F,KAAKC,KAAcF,IAAY,KAAKE,GAAYF,EACtD,CAEA,QAAS,CAEP,IAAMG,EAAU,KAAK,aAErB,MAAO,EAAI;;;;4DAI6C,CAAC,KAAK,aAAa;mDAC3B,GAAa,KAAK,cAAc,eAAgB,CAAC,EAAE;;;cAGzFA,EACE,CAAI;;yCAEqB,KAAK,MAAM;;kBAGpC,CAAI;;yCAEqB,KAAK,MAAM;;kBAElC;;+DAE6C,CAAC,KAAK,gBAAgB;sDAC9B,GAAa,KAAK,cAAc,kBAAmB,CAAC,EAAE;;;;;4DAKjD,CAAC,KAAK,cAAc;8CACjC,GAAa,KAAK,cAAc,gBAAiB,CAAC,EAAE;;;cAGrF,KAAK,YACHA,EACE,CAAI;;iDAE2B,KAAK,YAAY;;oBAGhD,CAAI;;iDAE2B,KAAK,YAAY;;oBAGlDC,EAAQ;;+DAEuC,CAAC,KAAK,iBAAiB;uDAC9B,GAAa,KAAK,cAAc,mBAAoB,CAAC,EAAE;;;;;KAM7G,CACF,EA3EGX,EAAA,CAAAY,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAY,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,eAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,kBAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,gBAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,mBAAA,IAAA,EAAA,EAdR,EAAAH,EAAA,CAAAc,EAAc,sBAAsB,CAAA,EAAAX,CAAA"}
@@ -1,4 +1,6 @@
1
1
  import { LitElement, nothing } from "lit";
2
+ import { ObserverController } from "../shared/controller.observer.js";
3
+ import "../../tokens/tokens.js";
2
4
  /**
3
5
  * The one oversized figure a section leads with -- the Why-trust "$1.5B+".
4
6
  * The digits roll up into place the first time the figure comes into view;
@@ -15,13 +17,11 @@ export declare class StatHighlight extends LitElement {
15
17
  value: string;
16
18
  label: string;
17
19
  _rolled: boolean;
18
- _observer: IntersectionObserver | null;
19
20
  static styles: import("lit").CSSResult[];
20
- constructor();
21
- firstUpdated(): void;
22
- disconnectedCallback(): void;
21
+ _inView: ObserverController<IntersectionObserver>;
22
+ willUpdate(): void;
23
23
  _renderChar(ch: string, i: number): import("lit-html").TemplateResult<1>;
24
- render(): import("lit-html").TemplateResult<1> | typeof nothing;
24
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
25
25
  }
26
26
  declare global {
27
27
  interface HTMLElementTagNameMap {
@@ -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{statHighlightCSS as r}from"./stat.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=`0123456789`,u=class extends i{static{this.styles=[t,r]}constructor(){super(),this.value=``,this.label=``,this._rolled=!1,this._observer=null}firstUpdated(){window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches?this._rolled=!0:(this._observer=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(this._rolled=!0,this._observer.disconnect())},{threshold:.5}),this._observer.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this._observer?.disconnect()}_renderChar(e,t){let n=l.indexOf(e);return n<0?a`<span class="char">${e}</span>`:a`<span class="char digit" style="--bd-stat-digit: ${this._rolled?n:0}; --bd-stat-order: ${t};">
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{ObserverController as n}from"../shared/controller.observer.js";import"../shared/controller.media-query.js";import{statHighlightCSS as r}from"./stat.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=`0123456789`,u=class extends i{constructor(...e){super(...e),this.value=``,this.label=``,this._rolled=!1,this._inView=new n(this,()=>new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(this._rolled=!0,this._inView.stop())},{threshold:.5}),e=>e.observe(this))}static{this.styles=[r]}willUpdate(){this.hasUpdated||this._rolled||!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||(this._rolled=!0,this._inView.stop())}_renderChar(e,t){let n=l.indexOf(e);return n<0?a`<span class="char">${e}</span>`:a`<span class="char digit" style="--bd-stat-digit: ${this._rolled?n:0}; --bd-stat-order: ${t};">
2
2
  <span class="reel">${[...l].map(e=>a`<span>${e}</span>`)}</span>
3
3
  </span>`}render(){return this.value?a`
4
4
  <p class="highlight" role="img" aria-label="${this.label||this.value}">
5
5
  <span class="chars" aria-hidden="true">${[...this.value].map((e,t)=>this._renderChar(e,t))}</span>
6
6
  </p>
7
- `:o}};n([s({type:String})],u.prototype,`value`,void 0),n([s({type:String})],u.prototype,`label`,void 0),n([c()],u.prototype,`_rolled`,void 0),u=n([e(`bd-stat-highlight`)],u);export{u as StatHighlight};
7
+ `:o}};t([s({type:String})],u.prototype,`value`,void 0),t([s({type:String})],u.prototype,`label`,void 0),t([c()],u.prototype,`_rolled`,void 0),u=t([e(`bd-stat-highlight`)],u);export{u as StatHighlight};
8
8
  //# sourceMappingURL=stat-highlight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stat-highlight.js","names":["_decorate","__decorate","DIGITS","StatHighlight","LitElement","tokens","statHighlightCSS","entries","digit","ch","i","d","nothing","property","state","defineElement"],"sources":["../../../../src/components/stat/stat-highlight.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport { statHighlightCSS } from \"./stat.css.ts\";\n\nconst DIGITS = \"0123456789\";\n\n/**\n * The one oversized figure a section leads with -- the Why-trust \"$1.5B+\".\n * The digits roll up into place the first time the figure comes into view;\n * everything that is not a digit ($, ., B, +) stands still.\n *\n * Split into one box per character so each digit can roll, which leaves a\n * screen reader nothing sensible to read -- so the visible characters are\n * hidden from it and `label` is the figure's full name (\"$1.5 billion plus\").\n * Without a label the value itself is used.\n *\n * Under prefers-reduced-motion the digits are already in place; nothing moves.\n */\n@defineElement(\"bd-stat-highlight\")\nexport class StatHighlight extends LitElement {\n @property({ type: String })\n value = \"\";\n @property({ type: String })\n label = \"\";\n @state()\n _rolled = false;\n\n _observer: IntersectionObserver | null;\n\n static styles = [tokens, statHighlightCSS];\n\n constructor() {\n super();\n this._observer = null;\n }\n\n firstUpdated() {\n const still = window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;\n if (still) {\n this._rolled = true;\n return;\n }\n this._observer = new IntersectionObserver(entries => {\n if (entries.some(e => e.isIntersecting)) {\n this._rolled = true;\n this._observer!.disconnect();\n }\n }, { threshold: 0.5 });\n this._observer.observe(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._observer?.disconnect();\n }\n\n _renderChar(ch: string, i: number) {\n const digit = DIGITS.indexOf(ch);\n if (digit < 0) return html`<span class=\"char\">${ch}</span>`;\n // each digit rolls a little later than the one before it\n return html`<span class=\"char digit\" style=\"--bd-stat-digit: ${this._rolled ? digit : 0}; --bd-stat-order: ${i};\">\n <span class=\"reel\">${[...DIGITS].map(d => html`<span>${d}</span>`)}</span>\n </span>`;\n }\n\n render() {\n if (!this.value) return nothing;\n return html`\n <p class=\"highlight\" role=\"img\" aria-label=\"${this.label || this.value}\">\n <span class=\"chars\" aria-hidden=\"true\">${[...this.value].map((ch, i) => this._renderChar(ch, i))}</span>\n </p>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-stat-highlight\": StatHighlight;\n }\n}\n"],"mappings":"A,uVAMA,IAAME,EAAS,aAeFC,EAAN,cAA4BC,CAAW,C,OAU5B,KAAA,OAAA,CAACC,EAAQC,CAAgB,C,CAEzC,aAAc,CACZ,MAAM,EAXA,KAAA,MAAA,GAEA,KAAA,MAAA,GAEE,KAAA,QAAA,GAQR,KAAK,UAAY,IACnB,CAEA,cAAe,CACC,OAAO,aAAa,kCAAkC,CAAC,CAAC,QAEpE,KAAK,QAAU,IAGjB,KAAK,UAAY,IAAI,qBAAqB,GAAW,CAC/CC,EAAQ,KAAK,GAAK,EAAE,cAAc,IACpC,KAAK,QAAU,GACf,KAAK,UAAW,WAAW,EAE/B,EAAG,CAAE,UAAW,EAAI,CAAC,EACrB,KAAK,UAAU,QAAQ,IAAI,EAC7B,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,KAAK,WAAW,WAAW,CAC7B,CAEA,YAAY,EAAY,EAAW,CACjC,IAAMC,EAAQN,EAAO,QAAQO,CAAE,EAG/B,OAFID,EAAQ,EAAU,CAAI,sBAAsBC,EAAG,SAE5C,CAAI,oDAAoD,KAAK,QAAUD,EAAQ,EAAE,qBAAqBE,EAAE;2BACxF,CAAC,GAAGR,CAAM,CAAC,CAAC,IAAI,GAAK,CAAI,SAASS,EAAE,QAAQ,EAAE;YAEvE,CAEA,QAAS,CAEP,OADK,KAAK,MACH,CAAI;oDACqC,KAAK,OAAS,KAAK,MAAM;iDAC5B,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,KAAK,EAAI,IAAM,KAAK,YAAYF,EAAIC,CAAC,CAAC,EAAE;;MAH7EE,CAM1B,CACF,EArDGZ,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,UAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAe,EAAc,mBAAmB,CAAA,EAAAZ,CAAA,E"}
1
+ {"version":3,"file":"stat-highlight.js","names":["_decorate","__decorate","DIGITS","StatHighlight","LitElement","_args","ObserverController","entries","observer","statHighlightCSS","digit","ch","i","d","nothing","property","state","defineElement"],"sources":["../../../../src/components/stat/stat-highlight.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { ObserverController } from \"#shared/controller.observer.ts\";\nimport { REDUCED_MOTION } from \"#shared/controller.media-query.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport { statHighlightCSS } from \"./stat.css.ts\";\n\nconst DIGITS = \"0123456789\";\n\n/**\n * The one oversized figure a section leads with -- the Why-trust \"$1.5B+\".\n * The digits roll up into place the first time the figure comes into view;\n * everything that is not a digit ($, ., B, +) stands still.\n *\n * Split into one box per character so each digit can roll, which leaves a\n * screen reader nothing sensible to read -- so the visible characters are\n * hidden from it and `label` is the figure's full name (\"$1.5 billion plus\").\n * Without a label the value itself is used.\n *\n * Under prefers-reduced-motion the digits are already in place; nothing moves.\n */\n@defineElement(\"bd-stat-highlight\")\nexport class StatHighlight extends LitElement {\n @property({ type: String })\n value = \"\";\n @property({ type: String })\n label = \"\";\n @state()\n _rolled = false;\n\n static styles = [statHighlightCSS];\n\n /* Watches for the figure coming into view, and stops for good once it has\n rolled. It used to start in firstUpdated and stop on disconnect, so a\n figure moved before it was seen never watched again and showed zeros. */\n _inView = new ObserverController(this,\n () => new IntersectionObserver(entries => {\n if (!entries.some(e => e.isIntersecting)) return;\n this._rolled = true;\n this._inView.stop();\n }, { threshold: 0.5 }),\n observer => observer.observe(this));\n\n /* Under reduced motion the digits start in place, decided before the first\n render rather than after it, so there is no second render and nothing to\n watch. */\n willUpdate() {\n if (this.hasUpdated || this._rolled || !window.matchMedia?.(REDUCED_MOTION).matches) return;\n this._rolled = true;\n this._inView.stop();\n }\n\n _renderChar(ch: string, i: number) {\n const digit = DIGITS.indexOf(ch);\n if (digit < 0) return html`<span class=\"char\">${ch}</span>`;\n // each digit rolls a little later than the one before it\n return html`<span class=\"char digit\" style=\"--bd-stat-digit: ${this._rolled ? digit : 0}; --bd-stat-order: ${i};\">\n <span class=\"reel\">${[...DIGITS].map(d => html`<span>${d}</span>`)}</span>\n </span>`;\n }\n\n render() {\n if (!this.value) return nothing;\n return html`\n <p class=\"highlight\" role=\"img\" aria-label=\"${this.label || this.value}\">\n <span class=\"chars\" aria-hidden=\"true\">${[...this.value].map((ch, i) => this._renderChar(ch, i))}</span>\n </p>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-stat-highlight\": StatHighlight;\n }\n}\n"],"mappings":"A,wbASA,IAAME,EAAS,aAeFC,EAAN,cAA4BC,CAAW,C,8BAEpC,KAAA,MAAA,GAEA,KAAA,MAAA,GAEE,KAAA,QAAA,GAOA,KAAA,QAAA,IAAIE,EAAmB,SACzB,IAAI,qBAAqB,GAAW,CACnCC,EAAQ,KAAK,GAAK,EAAE,cAAc,IACvC,KAAK,QAAU,GACf,KAAK,QAAQ,KAAK,EACpB,EAAG,CAAE,UAAW,EAAI,CAAC,EACrB,GAAYC,EAAS,QAAQ,IAAI,CAAC,C,QAXpB,KAAA,OAAA,CAACC,CAAgB,C,CAgBjC,YAAa,CACP,KAAK,YAAc,KAAK,SAAW,CAAC,OAAO,aAAA,kCAA2B,CAAC,CAAC,UAC5E,KAAK,QAAU,GACf,KAAK,QAAQ,KAAK,EACpB,CAEA,YAAY,EAAY,EAAW,CACjC,IAAMC,EAAQR,EAAO,QAAQS,CAAE,EAG/B,OAFID,EAAQ,EAAU,CAAI,sBAAsBC,EAAG,SAE5C,CAAI,oDAAoD,KAAK,QAAUD,EAAQ,EAAE,qBAAqBE,EAAE;2BACxF,CAAC,GAAGV,CAAM,CAAC,CAAC,IAAI,GAAK,CAAI,SAASW,EAAE,QAAQ,EAAE;YAEvE,CAEA,QAAS,CAEP,OADK,KAAK,MACH,CAAI;oDACqC,KAAK,OAAS,KAAK,MAAM;iDAC5B,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,KAAK,EAAI,IAAM,KAAK,YAAYF,EAAIC,CAAC,CAAC,EAAE;;MAH7EE,CAM1B,CACF,EA9CGd,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAe,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAZ,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAgB,EAAM,CAAA,EAAAb,EAAA,UAAA,UAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAiB,EAAc,mBAAmB,CAAA,EAAAd,CAAA,E"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  /**
3
4
  * One figure from the Why-trust stat grid: a display value over a short
4
5
  * caption, on surface/info. The caption is pinned to the tile's foot so a row