@repobit/dex-system-design 3.0.3 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +25 -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.css.js +1 -1
  10. package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
  11. package/dist/src/components/audience-card/audience-card.d.ts +1 -0
  12. package/dist/src/components/audience-card/audience-card.js +8 -8
  13. package/dist/src/components/audience-card/audience-card.js.map +1 -1
  14. package/dist/src/components/awards/awards-flex.d.ts +3 -2
  15. package/dist/src/components/awards/awards-flex.js +16 -16
  16. package/dist/src/components/awards/awards-flex.js.map +1 -1
  17. package/dist/src/components/awards/awards-spotlight.d.ts +2 -1
  18. package/dist/src/components/awards/awards-spotlight.js +8 -8
  19. package/dist/src/components/awards/awards-spotlight.js.map +1 -1
  20. package/dist/src/components/awards/awards.d.ts +1 -1
  21. package/dist/src/components/bento-grid/bento-grid.d.ts +1 -0
  22. package/dist/src/components/bento-grid/bento-grid.js +10 -10
  23. package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
  24. package/dist/src/components/bento-grid/bento-item.css.js +1 -1
  25. package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
  26. package/dist/src/components/bento-grid/bento-item.d.ts +1 -0
  27. package/dist/src/components/bento-grid/bento-item.js +9 -9
  28. package/dist/src/components/bento-grid/bento-item.js.map +1 -1
  29. package/dist/src/components/button/button.d.ts +1 -1
  30. package/dist/src/components/cards/card.d.ts +2 -2
  31. package/dist/src/components/cards/card.js +11 -11
  32. package/dist/src/components/cards/card.js.map +1 -1
  33. package/dist/src/components/carousel/carousel.d.ts +2 -2
  34. package/dist/src/components/carousel/carousel.js +6 -6
  35. package/dist/src/components/carousel/carousel.js.map +1 -1
  36. package/dist/src/components/comparison-panel/comparison-panel.d.ts +1 -0
  37. package/dist/src/components/comparison-panel/comparison-panel.js +12 -12
  38. package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
  39. package/dist/src/components/compatibility-table/compatibility-table.d.ts +1 -0
  40. package/dist/src/components/compatibility-table/compatibility-table.js +14 -14
  41. package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
  42. package/dist/src/components/cta-banner/cta-banner.d.ts +1 -0
  43. package/dist/src/components/cta-banner/cta-banner.js +8 -8
  44. package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
  45. package/dist/src/components/grid/grid.css.js +1 -1
  46. package/dist/src/components/grid/grid.css.js.map +1 -1
  47. package/dist/src/components/grid/grid.d.ts +1 -0
  48. package/dist/src/components/grid/grid.js +4 -3
  49. package/dist/src/components/grid/grid.js.map +1 -1
  50. package/dist/src/components/header/header-code.d.ts +3 -2
  51. package/dist/src/components/header/header-code.js +13 -13
  52. package/dist/src/components/header/header-code.js.map +1 -1
  53. package/dist/src/components/heading/heading.d.ts +1 -1
  54. package/dist/src/components/heading/heading.js +5 -1
  55. package/dist/src/components/heading/heading.js.map +1 -1
  56. package/dist/src/components/hero/hero.d.ts +2 -1
  57. package/dist/src/components/hero/hero.js +9 -9
  58. package/dist/src/components/hero/hero.js.map +1 -1
  59. package/dist/src/components/install-options/install-options.d.ts +3 -2
  60. package/dist/src/components/install-options/install-options.js +17 -17
  61. package/dist/src/components/install-options/install-options.js.map +1 -1
  62. package/dist/src/components/link/link.d.ts +1 -1
  63. package/dist/src/components/list/list-item/list-item.d.ts +1 -1
  64. package/dist/src/components/logo-marquee/logo-marquee.d.ts +1 -0
  65. package/dist/src/components/logo-marquee/logo-marquee.js +5 -5
  66. package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
  67. package/dist/src/components/motion-art/motion-art.js +1 -1
  68. package/dist/src/components/motion-art/motion-art.js.map +1 -1
  69. package/dist/src/components/overview/overview.d.ts +1 -0
  70. package/dist/src/components/overview/overview.js +7 -7
  71. package/dist/src/components/overview/overview.js.map +1 -1
  72. package/dist/src/components/page-switcher/page-switcher.d.ts +1 -0
  73. package/dist/src/components/page-switcher/page-switcher.js +5 -5
  74. package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
  75. package/dist/src/components/pagination-dots/pagination-dots.d.ts +1 -1
  76. package/dist/src/components/partner-banner/partner-banner.d.ts +1 -0
  77. package/dist/src/components/partner-banner/partner-banner.js +7 -7
  78. package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
  79. package/dist/src/components/post-card/post-card.d.ts +1 -0
  80. package/dist/src/components/post-card/post-card.js +5 -5
  81. package/dist/src/components/post-card/post-card.js.map +1 -1
  82. package/dist/src/components/process-steps/process-steps.d.ts +1 -0
  83. package/dist/src/components/process-steps/process-steps.js +7 -7
  84. package/dist/src/components/process-steps/process-steps.js.map +1 -1
  85. package/dist/src/components/quick-answer/quick-answer.d.ts +1 -0
  86. package/dist/src/components/quick-answer/quick-answer.js +7 -7
  87. package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
  88. package/dist/src/components/review/review-grid.d.ts +1 -0
  89. package/dist/src/components/review/review-grid.js +3 -3
  90. package/dist/src/components/review/review-grid.js.map +1 -1
  91. package/dist/src/components/review/review.d.ts +1 -0
  92. package/dist/src/components/review/review.js +2 -2
  93. package/dist/src/components/review/review.js.map +1 -1
  94. package/dist/src/components/section-header/section-header.d.ts +1 -0
  95. package/dist/src/components/section-header/section-header.js +4 -4
  96. package/dist/src/components/section-header/section-header.js.map +1 -1
  97. package/dist/src/components/shared/controller.observer.d.ts +50 -0
  98. package/dist/src/components/shared/controller.observer.js +2 -0
  99. package/dist/src/components/shared/controller.observer.js.map +1 -0
  100. package/dist/src/components/spotlight-section/spotlight-section.d.ts +1 -0
  101. package/dist/src/components/spotlight-section/spotlight-section.js +7 -7
  102. package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
  103. package/dist/src/components/stat/stat-highlight.d.ts +5 -5
  104. package/dist/src/components/stat/stat-highlight.js +2 -2
  105. package/dist/src/components/stat/stat-highlight.js.map +1 -1
  106. package/dist/src/components/stat/stat-tile.d.ts +1 -0
  107. package/dist/src/components/stat/stat-tile.js +5 -5
  108. package/dist/src/components/stat/stat-tile.js.map +1 -1
  109. package/dist/src/components/terminal/terminal-cursor.d.ts +1 -0
  110. package/dist/src/components/terminal/terminal-cursor.js +1 -1
  111. package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
  112. package/dist/src/components/terminal/terminal-message.d.ts +4 -3
  113. package/dist/src/components/terminal/terminal-message.js +25 -25
  114. package/dist/src/components/terminal/terminal-message.js.map +1 -1
  115. package/dist/src/components/tooltip/tooltip.js +1 -1
  116. package/dist/src/components/tooltip/tooltip.js.map +1 -1
  117. package/dist/src/components/trust-panel/trust-panel.d.ts +1 -0
  118. package/dist/src/components/trust-panel/trust-panel.js +19 -19
  119. package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
  120. package/dist/src/loader/create-loader.d.ts +13 -0
  121. package/dist/src/loader/create-loader.js +2 -0
  122. package/dist/src/loader/create-loader.js.map +1 -0
  123. package/dist/src/loader/loader.d.ts +44 -0
  124. package/dist/src/loader/loader.js +2 -0
  125. package/dist/src/loader/loader.js.map +1 -0
  126. package/dist/src/loader/registry.d.ts +2 -0
  127. package/dist/src/loader/registry.js +2 -0
  128. package/dist/src/loader/registry.js.map +1 -0
  129. package/dist/src/tokens/tokens.js +1 -1
  130. package/dist/src/tokens/tokens.js.map +1 -1
  131. package/package.json +12 -4
  132. package/schemas/component-manifest.json +8 -1
  133. package/dist/src/tokens/dark-derivation.d.ts +0 -70
  134. package/dist/src/tokens/dark-derivation.js +0 -2
  135. package/dist/src/tokens/dark-derivation.js.map +0 -1
  136. package/dist/src/tokens/dark-findings.d.ts +0 -59
  137. package/dist/src/tokens/dark-findings.js +0 -2
  138. package/dist/src/tokens/dark-findings.js.map +0 -1
  139. package/dist/src/tokens/story-chrome.d.ts +0 -72
  140. package/dist/src/tokens/story-chrome.js +0 -292
  141. package/dist/src/tokens/story-chrome.js.map +0 -1
  142. package/dist/src/tokens/token-map.d.ts +0 -114
  143. package/dist/src/tokens/token-map.js +0 -2
  144. package/dist/src/tokens/token-map.js.map +0 -1
  145. package/dist/src/tokens/token-purposes.d.ts +0 -63
  146. package/dist/src/tokens/token-purposes.js +0 -2
  147. package/dist/src/tokens/token-purposes.js.map +0 -1
  148. package/dist/src/tokens/type-ceiling-words.d.ts +0 -96
  149. package/dist/src/tokens/type-ceiling-words.js +0 -2
  150. package/dist/src/tokens/type-ceiling-words.js.map +0 -1
@@ -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-spot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,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
@@ -1,7 +1,7 @@
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{statTileCSS as r}from"./stat.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.value=``,this.caption=``,this.label=``}static{this.styles=[t,r]}render(){return a`
2
- <div class="tile" role="group" aria-label="${this.label?`${this.label} ${this.caption}`.trim():o}">
3
- <p class="value" aria-hidden="${this.label?`true`:o}">${this.value}</p>
4
- ${this.caption?a`<p class="caption" aria-hidden="${this.label?`true`:o}">${this.caption}</p>`: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{statTileCSS as n}from"./stat.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.value=``,this.caption=``,this.label=``}static{this.styles=[n]}render(){return i`
2
+ <div class="tile" role="group" aria-label="${this.label?`${this.label} ${this.caption}`.trim():a}">
3
+ <p class="value" aria-hidden="${this.label?`true`:a}">${this.value}</p>
4
+ ${this.caption?i`<p class="caption" aria-hidden="${this.label?`true`:a}">${this.caption}</p>`:a}
5
5
  </div>
6
- `}};n([s({type:String})],c.prototype,`value`,void 0),n([s({type:String})],c.prototype,`caption`,void 0),n([s({type:String})],c.prototype,`label`,void 0),c=n([e(`bd-stat-tile`)],c);export{c as StatTile};
6
+ `}};t([o({type:String})],s.prototype,`value`,void 0),t([o({type:String})],s.prototype,`caption`,void 0),t([o({type:String})],s.prototype,`label`,void 0),s=t([e(`bd-stat-tile`)],s);export{s as StatTile};
7
7
  //# sourceMappingURL=stat-tile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stat-tile.js","names":["_decorate","__decorate","StatTile","LitElement","_args","tokens","statTileCSS","nothing","property","defineElement"],"sources":["../../../../src/components/stat/stat-tile.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 { statTileCSS } from \"./stat.css.ts\";\n\n/**\n * One figure from the Why-trust stat grid: a display value over a short\n * caption, on surface/info. The caption is pinned to the tile's foot so a row\n * of tiles lines its captions up, whatever each value's length. Drawn in the\n * foundation Figma file as Stat tile.\n *\n * The value and caption are read as one statement -- \"580+ patents filed\" --\n * so the tile is a group named by both, and `label` can spell the value out\n * where its short form reads badly aloud (\"50 billion plus\").\n */\n@defineElement(\"bd-stat-tile\")\nexport class StatTile extends LitElement {\n @property({ type: String })\n value = \"\";\n @property({ type: String })\n caption = \"\";\n @property({ type: String })\n label = \"\";\n\n static styles = [tokens, statTileCSS];\n\n render() {\n return html`\n <div class=\"tile\" role=\"group\" aria-label=\"${this.label ? `${this.label} ${this.caption}`.trim() : nothing}\">\n <p class=\"value\" aria-hidden=\"${this.label ? \"true\" : nothing}\">${this.value}</p>\n ${this.caption\n ? html`<p class=\"caption\" aria-hidden=\"${this.label ? \"true\" : nothing}\">${this.caption}</p>`\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-stat-tile\": StatTile;\n }\n}\n"],"mappings":"A,uUAiBO,IAAME,EAAN,cAAuBC,CAAW,C,8BAE/B,KAAA,MAAA,GAEE,KAAA,QAAA,GAEF,KAAA,MAAA,E,QAEQ,KAAA,OAAA,CAACE,EAAQC,CAAW,C,CAEpC,QAAS,CACP,MAAO,EAAI;mDACoC,KAAK,MAAQ,GAAG,KAAK,MAAM,GAAG,KAAK,UAAU,KAAK,EAAIC,EAAQ;wCACzE,KAAK,MAAQ,OAASA,EAAQ,IAAI,KAAK,MAAM;UAC3E,KAAK,QACH,CAAI,mCAAmC,KAAK,MAAQ,OAASA,EAAQ,IAAI,KAAK,QAAQ,MACtFA,EAAQ;;KAGlB,CACF,EAnBGP,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAN,EAAA,UAAA,QAAA,IAAA,EAAA,EAN3B,EAAAF,EAAA,CAAAS,EAAc,cAAc,CAAA,EAAAP,CAAA,E"}
1
+ {"version":3,"file":"stat-tile.js","names":["_decorate","__decorate","StatTile","LitElement","_args","statTileCSS","nothing","property","defineElement"],"sources":["../../../../src/components/stat/stat-tile.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 { statTileCSS } from \"./stat.css.ts\";\n\n/**\n * One figure from the Why-trust stat grid: a display value over a short\n * caption, on surface/info. The caption is pinned to the tile's foot so a row\n * of tiles lines its captions up, whatever each value's length. Drawn in the\n * foundation Figma file as Stat tile.\n *\n * The value and caption are read as one statement -- \"580+ patents filed\" --\n * so the tile is a group named by both, and `label` can spell the value out\n * where its short form reads badly aloud (\"50 billion plus\").\n */\n@defineElement(\"bd-stat-tile\")\nexport class StatTile extends LitElement {\n @property({ type: String })\n value = \"\";\n @property({ type: String })\n caption = \"\";\n @property({ type: String })\n label = \"\";\n\n static styles = [statTileCSS];\n\n render() {\n return html`\n <div class=\"tile\" role=\"group\" aria-label=\"${this.label ? `${this.label} ${this.caption}`.trim() : nothing}\">\n <p class=\"value\" aria-hidden=\"${this.label ? \"true\" : nothing}\">${this.value}</p>\n ${this.caption\n ? html`<p class=\"caption\" aria-hidden=\"${this.label ? \"true\" : nothing}\">${this.caption}</p>`\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-stat-tile\": StatTile;\n }\n}\n"],"mappings":"A,sTAkBO,IAAME,EAAN,cAAuBC,CAAW,C,8BAE/B,KAAA,MAAA,GAEE,KAAA,QAAA,GAEF,KAAA,MAAA,E,QAEQ,KAAA,OAAA,CAACE,CAAW,C,CAE5B,QAAS,CACP,MAAO,EAAI;mDACoC,KAAK,MAAQ,GAAG,KAAK,MAAM,GAAG,KAAK,UAAU,KAAK,EAAIC,EAAQ;wCACzE,KAAK,MAAQ,OAASA,EAAQ,IAAI,KAAK,MAAM;UAC3E,KAAK,QACH,CAAI,mCAAmC,KAAK,MAAQ,OAASA,EAAQ,IAAI,KAAK,QAAQ,MACtFA,EAAQ;;KAGlB,CACF,EAnBGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBF,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAN3B,EAAAF,EAAA,CAAAQ,EAAc,cAAc,CAAA,EAAAN,CAAA,E"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  declare class TerminalCursor extends LitElement {
3
4
  static styles: import("lit").CSSResult[];
4
5
  color: string;
@@ -1,2 +1,2 @@
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{LitElement as r,css as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends r{constructor(...e){super(...e),this.color=``}static{this.styles=[t,i`:host{vertical-align:middle;width:8px;height:16px;display:inline-block}.bd-terminal-cursor{background:var(--bd-terminal-cursor-color,var(--color-brand-400));width:100%;height:100%;animation:1s step-end infinite bd-terminal-cursor-blink;display:block}@keyframes bd-terminal-cursor-blink{0%,50%{opacity:1}50.01%,to{opacity:0}}@media (prefers-reduced-motion:reduce){.bd-terminal-cursor{animation:none}}`]}render(){let e=this.color?`background: ${this.color};`:``;return a`<span class="bd-terminal-cursor" style="${e}"></span>`}};n([o({type:String})],s.prototype,`color`,void 0),s=n([e(`bd-terminal-cursor`)],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{LitElement as n,css as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=class extends n{constructor(...e){super(...e),this.color=``}static{this.styles=[r`:host{vertical-align:middle;width:8px;height:16px;display:inline-block}.bd-terminal-cursor{background:var(--bd-terminal-cursor-color,var(--color-brand-400));width:100%;height:100%;animation:1s step-end infinite bd-terminal-cursor-blink;display:block}@keyframes bd-terminal-cursor-blink{0%,50%{opacity:1}50.01%,to{opacity:0}}@media (prefers-reduced-motion:reduce){.bd-terminal-cursor{animation:none}}`]}render(){let e=this.color?`background: ${this.color};`:``;return i`<span class="bd-terminal-cursor" style="${e}"></span>`}};t([a({type:String})],o.prototype,`color`,void 0),o=t([e(`bd-terminal-cursor`)],o);
2
2
  //# sourceMappingURL=terminal-cursor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-cursor.js","names":["_decorate","__decorate","TerminalCursor","LitElement","_args","tokens","style","property","defineElement"],"sources":["../../../../src/components/terminal/terminal-cursor.ts"],"sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\n\n@defineElement(\"bd-terminal-cursor\")\nclass TerminalCursor extends LitElement {\n static styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n width: 8px;\n height: 16px;\n vertical-align: middle;\n }\n\n .bd-terminal-cursor {\n width: 100%;\n height: 100%;\n background: var(--bd-terminal-cursor-color, var(--color-brand-400));\n animation: bd-terminal-cursor-blink 1s steps(1) infinite;\n display: block;\n }\n\n @keyframes bd-terminal-cursor-blink {\n 0%, 50% {\n opacity: 1;\n }\n 50.01%, 100% {\n opacity: 0;\n }\n }\n\n /* A cursor that blinks for as long as the page is open is exactly the\n motion the setting exists for, and this one had no guard: every\n other animated element in the package stops or softens under\n prefers-reduced-motion. Here it stops, and the cursor stays shown --\n a steady block still says \"this is where the terminal is\". */\n @media (prefers-reduced-motion: reduce) {\n .bd-terminal-cursor {\n animation: none;\n }\n }\n `\n ];\n\n @property({ type: String })\n color = \"\";\n\n render() {\n const style = this.color ? `background: ${this.color};` : \"\";\n return html`<span class=\"bd-terminal-cursor\" style=\"${style}\"></span>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-terminal-cursor\": TerminalCursor;\n }\n}\n"],"mappings":"A,uRAKA,IACME,EADN,cAC6BC,CAAW,C,8BA0C9B,KAAA,MAAA,E,QAzCQ,KAAA,OAAA,CACdE,EACA,CAAG,iZAoCL,C,CAKA,QAAS,CACP,IAAMC,EAAQ,KAAK,MAAQ,eAAe,KAAK,MAAM,GAAK,GAC1D,MAAO,EAAI,2CAA2CA,EAAM,UAC9D,CACF,EAPGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EA1C3B,EAAAF,EAAA,CAAAQ,EAAc,oBAAoB,CAAA,EAAAN,CAAA"}
1
+ {"version":3,"file":"terminal-cursor.js","names":["_decorate","__decorate","TerminalCursor","LitElement","_args","style","property","defineElement"],"sources":["../../../../src/components/terminal/terminal-cursor.ts"],"sourcesContent":["import { LitElement, css, 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\";\n\n@defineElement(\"bd-terminal-cursor\")\nclass TerminalCursor extends LitElement {\n static styles = [\n css`\n :host {\n display: inline-block;\n width: 8px;\n height: 16px;\n vertical-align: middle;\n }\n\n .bd-terminal-cursor {\n width: 100%;\n height: 100%;\n background: var(--bd-terminal-cursor-color, var(--color-brand-400));\n animation: bd-terminal-cursor-blink 1s steps(1) infinite;\n display: block;\n }\n\n @keyframes bd-terminal-cursor-blink {\n 0%, 50% {\n opacity: 1;\n }\n 50.01%, 100% {\n opacity: 0;\n }\n }\n\n /* A cursor that blinks for as long as the page is open is exactly the\n motion the setting exists for, and this one had no guard: every\n other animated element in the package stops or softens under\n prefers-reduced-motion. Here it stops, and the cursor stays shown --\n a steady block still says \"this is where the terminal is\". */\n @media (prefers-reduced-motion: reduce) {\n .bd-terminal-cursor {\n animation: none;\n }\n }\n `\n ];\n\n @property({ type: String })\n color = \"\";\n\n render() {\n const style = this.color ? `background: ${this.color};` : \"\";\n return html`<span class=\"bd-terminal-cursor\" style=\"${style}\"></span>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-terminal-cursor\": TerminalCursor;\n }\n}\n"],"mappings":"A,sQAMA,IACME,EADN,cAC6BC,CAAW,C,8BAyC9B,KAAA,MAAA,E,QAxCQ,KAAA,OAAA,CACd,CAAG,iZAoCL,C,CAKA,QAAS,CACP,IAAME,EAAQ,KAAK,MAAQ,eAAe,KAAK,MAAM,GAAK,GAC1D,MAAO,EAAI,2CAA2CA,EAAM,UAC9D,CACF,EAPGL,EAAA,CAAAM,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAzC3B,EAAAF,EAAA,CAAAO,EAAc,oBAAoB,CAAA,EAAAL,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement, nothing } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "../list/list-item/list-item.js";
4
5
  import "../list/list.js";
@@ -30,9 +31,9 @@ declare class TerminalMessage extends LitElement {
30
31
  lines: TerminalLine[];
31
32
  caption: string;
32
33
  variant: Variant;
33
- _renderTitlebar(): import("lit-html").TemplateResult<1> | typeof nothing;
34
- _renderHint(): import("lit-html").TemplateResult<1> | typeof nothing;
35
- _renderLines(): import("lit-html").TemplateResult<1> | typeof nothing;
34
+ _renderTitlebar(): typeof nothing | import("lit-html").TemplateResult<1>;
35
+ _renderHint(): typeof nothing | import("lit-html").TemplateResult<1>;
36
+ _renderLines(): typeof nothing | import("lit-html").TemplateResult<1>;
36
37
  render(): import("lit-html").TemplateResult<1>;
37
38
  }
38
39
  declare global {
@@ -1,68 +1,68 @@
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"../list/list-item/list-item.js";import"../list/list.js";import"./terminal-cursor.js";import r from"./terminal-message.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.showTitlebar=!1,this.panelLabel=``,this.dimText=``,this.greeting=``,this.icon=``,this.intro=``,this.items=[],this.footer=``,this.footerBold=``,this.showCursor=!1,this.hint=``,this.lines=[],this.caption=``,this.variant=`default`}static{this.styles=[t,r]}_renderTitlebar(){return this.variant===`flush`||!this.showTitlebar?o: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"../heading/heading.js";import"../paragraph/paragraph.js";import"../list/list-item/list-item.js";import"../list/list.js";import"./terminal-cursor.js";import n from"./terminal-message.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.showTitlebar=!1,this.panelLabel=``,this.dimText=``,this.greeting=``,this.icon=``,this.intro=``,this.items=[],this.footer=``,this.footerBold=``,this.showCursor=!1,this.hint=``,this.lines=[],this.caption=``,this.variant=`default`}static{this.styles=[n]}_renderTitlebar(){return this.variant===`flush`||!this.showTitlebar?a:i`
2
2
  <div class="bd-terminalmsg-titlebar">
3
3
  <span class="bd-terminalmsg-dot bd-terminalmsg-dot--red"></span>
4
4
  <span class="bd-terminalmsg-dot bd-terminalmsg-dot--yellow"></span>
5
5
  <span class="bd-terminalmsg-dot bd-terminalmsg-dot--green"></span>
6
6
  </div>
7
- `}_renderHint(){if(!this.hint)return o;let e=this.hint.split(/(\[[^\]]+\])/g);return a`
7
+ `}_renderHint(){if(!this.hint)return a;let e=this.hint.split(/(\[[^\]]+\])/g);return i`
8
8
  <span class="bd-terminalmsg-hint">
9
- ${e.map(e=>/^\[[^\]]+\]$/.test(e)?a`<strong class="bd-terminalmsg-hint-key">${e}</strong>`:e)}
9
+ ${e.map(e=>/^\[[^\]]+\]$/.test(e)?i`<strong class="bd-terminalmsg-hint-key">${e}</strong>`:e)}
10
10
  </span>
11
- `}_renderLines(){return!this.lines||!this.lines.length?o:a`
11
+ `}_renderLines(){return!this.lines||!this.lines.length?a:i`
12
12
  <div class="bd-terminalmsg-lines">
13
- ${this.lines.map(({type:e,text:t,label:n,badge:r,badgeColor:i,live:s})=>{switch(e){case`sep`:return a`<hr class="bd-terminalmsg-l-sep" />`;case`space`:return a`<div class="bd-terminalmsg-l-space" aria-hidden="true">&nbsp;</div>`;case`cmd`:return a`<div class="bd-terminalmsg-l-cmd">${t}</div>`;case`ok`:return a`<div class="bd-terminalmsg-l-ok">${t}</div>`;case`ask`:return a`<div class="bd-terminalmsg-l-ask">${t}</div>`;case`strong`:return a`<div class="bd-terminalmsg-l-strong">${t}</div>`;case`dim`:return a`<div class="bd-terminalmsg-l-dim">${t}</div>`;case`title`:return a`
13
+ ${this.lines.map(({type:e,text:t,label:n,badge:r,badgeColor:o,live:s})=>{switch(e){case`sep`:return i`<hr class="bd-terminalmsg-l-sep" />`;case`space`:return i`<div class="bd-terminalmsg-l-space" aria-hidden="true">&nbsp;</div>`;case`cmd`:return i`<div class="bd-terminalmsg-l-cmd">${t}</div>`;case`ok`:return i`<div class="bd-terminalmsg-l-ok">${t}</div>`;case`ask`:return i`<div class="bd-terminalmsg-l-ask">${t}</div>`;case`strong`:return i`<div class="bd-terminalmsg-l-strong">${t}</div>`;case`dim`:return i`<div class="bd-terminalmsg-l-dim">${t}</div>`;case`title`:return i`
14
14
  <div class="bd-terminalmsg-l-title">
15
15
  <span>${t}</span>
16
- ${s?a`<span class="bd-terminalmsg-live"><span class="bd-terminalmsg-live-dot"></span>LIVE</span>`:o}
16
+ ${s?i`<span class="bd-terminalmsg-live"><span class="bd-terminalmsg-live-dot"></span>LIVE</span>`:a}
17
17
  </div>
18
- `;case`row`:return a`
18
+ `;case`row`:return i`
19
19
  <div class="bd-terminalmsg-l-row">
20
20
  <span class="bd-terminalmsg-l-row-label">${n}</span>
21
21
  <span class="bd-terminalmsg-l-row-text">${t}</span>
22
- ${r?a`<span class="bd-terminalmsg-badge bd-terminalmsg-badge--${i||`neutral`}">${r}</span>`:o}
22
+ ${r?i`<span class="bd-terminalmsg-badge bd-terminalmsg-badge--${o||`neutral`}">${r}</span>`:a}
23
23
  </div>
24
- `;default:return a`<div class="bd-terminalmsg-l-dim">${t}</div>`}})}
24
+ `;default:return i`<div class="bd-terminalmsg-l-dim">${t}</div>`}})}
25
25
  </div>
26
- `}render(){return a`
26
+ `}render(){return i`
27
27
  ${this._renderTitlebar()}
28
28
 
29
29
  <div class="bd-terminalmsg-panel">
30
- ${this.panelLabel?a`<span class="bd-terminalmsg-panel-label">${this.panelLabel}</span>`:o}
30
+ ${this.panelLabel?i`<span class="bd-terminalmsg-panel-label">${this.panelLabel}</span>`:a}
31
31
 
32
32
  <div class="bd-terminalmsg-body">
33
33
  ${this._renderLines()}
34
34
 
35
- ${this.dimText?a`<bd-p variant="small" font-family="mono" paddingBottom="12" class="bd-terminalmsg-dim">${this.dimText}</bd-p>`:o}
35
+ ${this.dimText?i`<bd-p variant="small" font-family="mono" paddingBottom="12" class="bd-terminalmsg-dim">${this.dimText}</bd-p>`:a}
36
36
 
37
- ${this.greeting?a`
37
+ ${this.greeting?i`
38
38
  <bd-p variant="regular" font-family="mono" paddingBottom="12" class="bd-terminalmsg-greeting">
39
- ${this.icon?a`${this.icon} `:o}
39
+ ${this.icon?i`${this.icon} `:a}
40
40
  <span class="bd-terminalmsg-greeting-text">${this.greeting}</span>
41
41
  </bd-p>
42
- `:o}
42
+ `:a}
43
43
 
44
- ${this.intro?a`<bd-p variant="regular" font-family="mono" paddingBottom="12" class="bd-terminalmsg-intro">${this.intro}</bd-p>`:o}
44
+ ${this.intro?i`<bd-p variant="regular" font-family="mono" paddingBottom="12" class="bd-terminalmsg-intro">${this.intro}</bd-p>`:a}
45
45
 
46
- ${this.items&&this.items.length?a`
46
+ ${this.items&&this.items.length?i`
47
47
  <bd-list class="bd-terminalmsg-list">
48
- ${this.items.map(e=>a`<bd-li variant="bullet" size="sm" color="inverse">${e}</bd-li>`)}
48
+ ${this.items.map(e=>i`<bd-li variant="bullet" size="sm" color="inverse">${e}</bd-li>`)}
49
49
  </bd-list>
50
- `:o}
50
+ `:a}
51
51
 
52
- ${this.footer||this.footerBold?a`
52
+ ${this.footer||this.footerBold?i`
53
53
  <bd-p variant="regular" font-family="mono" class="bd-terminalmsg-footer">
54
- ${this.footerBold?a`<strong>${this.footerBold}</strong> `:o}
54
+ ${this.footerBold?i`<strong>${this.footerBold}</strong> `:a}
55
55
  ${this.footer}
56
- ${this.showCursor?a`<bd-terminal-cursor></bd-terminal-cursor>`:o}
56
+ ${this.showCursor?i`<bd-terminal-cursor></bd-terminal-cursor>`:a}
57
57
  </bd-p>
58
- `:o}
58
+ `:a}
59
59
 
60
60
  <slot></slot>
61
61
 
62
- ${this.caption?a`<div class="bd-terminalmsg-caption">${this.caption}</div>`:o}
62
+ ${this.caption?i`<div class="bd-terminalmsg-caption">${this.caption}</div>`:a}
63
63
  </div>
64
64
 
65
65
  ${this._renderHint()}
66
66
  </div>
67
- `}};n([s({type:Boolean,attribute:`show-titlebar`})],c.prototype,`showTitlebar`,void 0),n([s({type:String,attribute:`panel-label`})],c.prototype,`panelLabel`,void 0),n([s({type:String,attribute:`dim-text`})],c.prototype,`dimText`,void 0),n([s({type:String})],c.prototype,`greeting`,void 0),n([s({type:String})],c.prototype,`icon`,void 0),n([s({type:String})],c.prototype,`intro`,void 0),n([s({type:Array})],c.prototype,`items`,void 0),n([s({type:String})],c.prototype,`footer`,void 0),n([s({type:String,attribute:`footer-bold`})],c.prototype,`footerBold`,void 0),n([s({type:Boolean,attribute:`show-cursor`})],c.prototype,`showCursor`,void 0),n([s({type:String})],c.prototype,`hint`,void 0),n([s({type:Array})],c.prototype,`lines`,void 0),n([s({type:String})],c.prototype,`caption`,void 0),n([s({type:String,reflect:!0})],c.prototype,`variant`,void 0),c=n([e(`bd-terminal-message`)],c);
67
+ `}};t([o({type:Boolean,attribute:`show-titlebar`})],s.prototype,`showTitlebar`,void 0),t([o({type:String,attribute:`panel-label`})],s.prototype,`panelLabel`,void 0),t([o({type:String,attribute:`dim-text`})],s.prototype,`dimText`,void 0),t([o({type:String})],s.prototype,`greeting`,void 0),t([o({type:String})],s.prototype,`icon`,void 0),t([o({type:String})],s.prototype,`intro`,void 0),t([o({type:Array})],s.prototype,`items`,void 0),t([o({type:String})],s.prototype,`footer`,void 0),t([o({type:String,attribute:`footer-bold`})],s.prototype,`footerBold`,void 0),t([o({type:Boolean,attribute:`show-cursor`})],s.prototype,`showCursor`,void 0),t([o({type:String})],s.prototype,`hint`,void 0),t([o({type:Array})],s.prototype,`lines`,void 0),t([o({type:String})],s.prototype,`caption`,void 0),t([o({type:String,reflect:!0})],s.prototype,`variant`,void 0),s=t([e(`bd-terminal-message`)],s);
68
68
  //# sourceMappingURL=terminal-message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-message.js","names":["terminalMessageCSS","_decorate","__decorate","terminal_message_css_default","TerminalMessage","LitElement","_args","tokens","nothing","parts","part","type","text","live","label","badge","badgeColor","item","property","defineElement"],"sources":["../../../../src/components/terminal/terminal-message.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { tokens } from \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/list/list-item/list-item.ts\";\nimport \"#components/list/list.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport \"./terminal-cursor.ts\";\nimport terminalMessageCSS from \"./terminal-message.css.ts\";\n\ntype Variant = \"default\" | \"flush\";\ntype LineType = \"sep\" | \"space\" | \"cmd\" | \"ok\" | \"ask\" | \"strong\" | \"dim\" | \"title\" | \"row\";\n\ninterface TerminalLine {\n type? : LineType;\n text? : string;\n label? : string;\n badge? : string;\n badgeColor?: string;\n live? : boolean;\n}\n\n@defineElement(\"bd-terminal-message\")\nclass TerminalMessage extends LitElement {\n static styles = [tokens, terminalMessageCSS];\n\n @property({ type: Boolean, attribute: \"show-titlebar\" })\n showTitlebar = false;\n @property({ type: String, attribute: \"panel-label\" })\n panelLabel = \"\";\n @property({ type: String, attribute: \"dim-text\" })\n dimText = \"\";\n @property({ type: String })\n greeting = \"\";\n @property({ type: String })\n icon = \"\";\n @property({ type: String })\n intro = \"\";\n @property({ type: Array })\n items: string[] = [];\n @property({ type: String })\n footer = \"\";\n @property({ type: String, attribute: \"footer-bold\" })\n footerBold = \"\";\n @property({ type: Boolean, attribute: \"show-cursor\" })\n showCursor = false;\n @property({ type: String })\n hint = \"\";\n @property({ type: Array })\n lines: TerminalLine[] = [];\n @property({ type: String })\n caption = \"\";\n // \"default\" (existing look: optional titlebar dots, bordered panel,\n // standard host padding) | \"flush\" — used where the terminal sits over\n // decorative rings/a 3D scene (e.g. the VPN hero): hides the titlebar\n // dots regardless of show-titlebar, drops the inner panel's own\n // border (the host's outer box already reads as the terminal's edge),\n // gives each \"row\" line a hairline top border instead, and tightens\n // the host's own padding.\n @property({ type: String, reflect: true })\n variant: Variant = \"default\";\n\n _renderTitlebar() {\n if (this.variant === \"flush\") return nothing;\n if (!this.showTitlebar) return nothing;\n return html`\n <div class=\"bd-terminalmsg-titlebar\">\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--red\"></span>\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--yellow\"></span>\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--green\"></span>\n </div>\n `;\n }\n\n _renderHint() {\n if (!this.hint) return nothing;\n\n const parts = this.hint.split(/(\\[[^\\]]+\\])/g);\n\n return html`\n <span class=\"bd-terminalmsg-hint\">\n ${parts.map((part) =>\n /^\\[[^\\]]+\\]$/.test(part)\n ? html`<strong class=\"bd-terminalmsg-hint-key\">${part}</strong>`\n : part\n )}\n </span>\n `;\n }\n\n _renderLines() {\n if (!this.lines || !this.lines.length) return nothing;\n\n return html`\n <div class=\"bd-terminalmsg-lines\">\n ${this.lines.map(({ type, text, label, badge, badgeColor, live }) => {\n switch (type) {\n case \"sep\":\n return html`<hr class=\"bd-terminalmsg-l-sep\" />`;\n case \"space\":\n return html`<div class=\"bd-terminalmsg-l-space\" aria-hidden=\"true\">&nbsp;</div>`;\n case \"cmd\":\n return html`<div class=\"bd-terminalmsg-l-cmd\">${text}</div>`;\n case \"ok\":\n return html`<div class=\"bd-terminalmsg-l-ok\">${text}</div>`;\n case \"ask\":\n return html`<div class=\"bd-terminalmsg-l-ask\">${text}</div>`;\n case \"strong\":\n return html`<div class=\"bd-terminalmsg-l-strong\">${text}</div>`;\n case \"dim\":\n return html`<div class=\"bd-terminalmsg-l-dim\">${text}</div>`;\n case \"title\":\n return html`\n <div class=\"bd-terminalmsg-l-title\">\n <span>${text}</span>\n ${live\n ? html`<span class=\"bd-terminalmsg-live\"><span class=\"bd-terminalmsg-live-dot\"></span>LIVE</span>`\n : nothing}\n </div>\n `;\n case \"row\":\n return html`\n <div class=\"bd-terminalmsg-l-row\">\n <span class=\"bd-terminalmsg-l-row-label\">${label}</span>\n <span class=\"bd-terminalmsg-l-row-text\">${text}</span>\n ${badge\n ? html`<span class=\"bd-terminalmsg-badge bd-terminalmsg-badge--${badgeColor || \"neutral\"}\">${badge}</span>`\n : nothing}\n </div>\n `;\n default:\n return html`<div class=\"bd-terminalmsg-l-dim\">${text}</div>`;\n }\n })}\n </div>\n `;\n }\n\n render() {\n return html`\n ${this._renderTitlebar()}\n\n <div class=\"bd-terminalmsg-panel\">\n ${this.panelLabel\n ? html`<span class=\"bd-terminalmsg-panel-label\">${this.panelLabel}</span>`\n : nothing}\n\n <div class=\"bd-terminalmsg-body\">\n ${this._renderLines()}\n\n ${this.dimText\n ? html`<bd-p variant=\"small\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-dim\">${this.dimText}</bd-p>`\n : nothing}\n\n ${this.greeting\n ? html`\n <bd-p variant=\"regular\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-greeting\">\n ${this.icon ? html`${this.icon} ` : nothing}\n <span class=\"bd-terminalmsg-greeting-text\">${this.greeting}</span>\n </bd-p>\n `\n : nothing}\n\n ${this.intro\n ? html`<bd-p variant=\"regular\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-intro\">${this.intro}</bd-p>`\n : nothing}\n\n ${this.items && this.items.length\n ? html`\n <bd-list class=\"bd-terminalmsg-list\">\n ${this.items.map((item) => html`<bd-li variant=\"bullet\" size=\"sm\" color=\"inverse\">${item}</bd-li>`)}\n </bd-list>\n `\n : nothing}\n\n ${this.footer || this.footerBold\n ? html`\n <bd-p variant=\"regular\" font-family=\"mono\" class=\"bd-terminalmsg-footer\">\n ${this.footerBold\n ? html`<strong>${this.footerBold}</strong> `\n : nothing}\n ${this.footer}\n ${this.showCursor\n ? html`<bd-terminal-cursor></bd-terminal-cursor>`\n : nothing}\n </bd-p>\n `\n : nothing}\n\n <slot></slot>\n\n ${this.caption\n ? html`<div class=\"bd-terminalmsg-caption\">${this.caption}</div>`\n : nothing}\n </div>\n\n ${this._renderHint()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-terminal-message\": TerminalMessage;\n }\n}\n"],"mappings":"A,geAuBA,IACMI,EADN,cAC8BC,CAA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","LitElement","_args","nothing","parts","part","type","text","live","label","badge","badgeColor","item","property","defineElement"],"sources":["../../../../src/components/terminal/terminal-message.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/heading/heading.ts\";\nimport \"#components/list/list-item/list-item.ts\";\nimport \"#components/list/list.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport \"./terminal-cursor.ts\";\nimport terminalMessageCSS from \"./terminal-message.css.ts\";\n\ntype Variant = \"default\" | \"flush\";\ntype LineType = \"sep\" | \"space\" | \"cmd\" | \"ok\" | \"ask\" | \"strong\" | \"dim\" | \"title\" | \"row\";\n\ninterface TerminalLine {\n type? : LineType;\n text? : string;\n label? : string;\n badge? : string;\n badgeColor?: string;\n live? : boolean;\n}\n\n@defineElement(\"bd-terminal-message\")\nclass TerminalMessage extends LitElement {\n static styles = [terminalMessageCSS];\n\n @property({ type: Boolean, attribute: \"show-titlebar\" })\n showTitlebar = false;\n @property({ type: String, attribute: \"panel-label\" })\n panelLabel = \"\";\n @property({ type: String, attribute: \"dim-text\" })\n dimText = \"\";\n @property({ type: String })\n greeting = \"\";\n @property({ type: String })\n icon = \"\";\n @property({ type: String })\n intro = \"\";\n @property({ type: Array })\n items: string[] = [];\n @property({ type: String })\n footer = \"\";\n @property({ type: String, attribute: \"footer-bold\" })\n footerBold = \"\";\n @property({ type: Boolean, attribute: \"show-cursor\" })\n showCursor = false;\n @property({ type: String })\n hint = \"\";\n @property({ type: Array })\n lines: TerminalLine[] = [];\n @property({ type: String })\n caption = \"\";\n // \"default\" (existing look: optional titlebar dots, bordered panel,\n // standard host padding) | \"flush\" — used where the terminal sits over\n // decorative rings/a 3D scene (e.g. the VPN hero): hides the titlebar\n // dots regardless of show-titlebar, drops the inner panel's own\n // border (the host's outer box already reads as the terminal's edge),\n // gives each \"row\" line a hairline top border instead, and tightens\n // the host's own padding.\n @property({ type: String, reflect: true })\n variant: Variant = \"default\";\n\n _renderTitlebar() {\n if (this.variant === \"flush\") return nothing;\n if (!this.showTitlebar) return nothing;\n return html`\n <div class=\"bd-terminalmsg-titlebar\">\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--red\"></span>\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--yellow\"></span>\n <span class=\"bd-terminalmsg-dot bd-terminalmsg-dot--green\"></span>\n </div>\n `;\n }\n\n _renderHint() {\n if (!this.hint) return nothing;\n\n const parts = this.hint.split(/(\\[[^\\]]+\\])/g);\n\n return html`\n <span class=\"bd-terminalmsg-hint\">\n ${parts.map((part) =>\n /^\\[[^\\]]+\\]$/.test(part)\n ? html`<strong class=\"bd-terminalmsg-hint-key\">${part}</strong>`\n : part\n )}\n </span>\n `;\n }\n\n _renderLines() {\n if (!this.lines || !this.lines.length) return nothing;\n\n return html`\n <div class=\"bd-terminalmsg-lines\">\n ${this.lines.map(({ type, text, label, badge, badgeColor, live }) => {\n switch (type) {\n case \"sep\":\n return html`<hr class=\"bd-terminalmsg-l-sep\" />`;\n case \"space\":\n return html`<div class=\"bd-terminalmsg-l-space\" aria-hidden=\"true\">&nbsp;</div>`;\n case \"cmd\":\n return html`<div class=\"bd-terminalmsg-l-cmd\">${text}</div>`;\n case \"ok\":\n return html`<div class=\"bd-terminalmsg-l-ok\">${text}</div>`;\n case \"ask\":\n return html`<div class=\"bd-terminalmsg-l-ask\">${text}</div>`;\n case \"strong\":\n return html`<div class=\"bd-terminalmsg-l-strong\">${text}</div>`;\n case \"dim\":\n return html`<div class=\"bd-terminalmsg-l-dim\">${text}</div>`;\n case \"title\":\n return html`\n <div class=\"bd-terminalmsg-l-title\">\n <span>${text}</span>\n ${live\n ? html`<span class=\"bd-terminalmsg-live\"><span class=\"bd-terminalmsg-live-dot\"></span>LIVE</span>`\n : nothing}\n </div>\n `;\n case \"row\":\n return html`\n <div class=\"bd-terminalmsg-l-row\">\n <span class=\"bd-terminalmsg-l-row-label\">${label}</span>\n <span class=\"bd-terminalmsg-l-row-text\">${text}</span>\n ${badge\n ? html`<span class=\"bd-terminalmsg-badge bd-terminalmsg-badge--${badgeColor || \"neutral\"}\">${badge}</span>`\n : nothing}\n </div>\n `;\n default:\n return html`<div class=\"bd-terminalmsg-l-dim\">${text}</div>`;\n }\n })}\n </div>\n `;\n }\n\n render() {\n return html`\n ${this._renderTitlebar()}\n\n <div class=\"bd-terminalmsg-panel\">\n ${this.panelLabel\n ? html`<span class=\"bd-terminalmsg-panel-label\">${this.panelLabel}</span>`\n : nothing}\n\n <div class=\"bd-terminalmsg-body\">\n ${this._renderLines()}\n\n ${this.dimText\n ? html`<bd-p variant=\"small\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-dim\">${this.dimText}</bd-p>`\n : nothing}\n\n ${this.greeting\n ? html`\n <bd-p variant=\"regular\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-greeting\">\n ${this.icon ? html`${this.icon} ` : nothing}\n <span class=\"bd-terminalmsg-greeting-text\">${this.greeting}</span>\n </bd-p>\n `\n : nothing}\n\n ${this.intro\n ? html`<bd-p variant=\"regular\" font-family=\"mono\" paddingBottom=\"12\" class=\"bd-terminalmsg-intro\">${this.intro}</bd-p>`\n : nothing}\n\n ${this.items && this.items.length\n ? html`\n <bd-list class=\"bd-terminalmsg-list\">\n ${this.items.map((item) => html`<bd-li variant=\"bullet\" size=\"sm\" color=\"inverse\">${item}</bd-li>`)}\n </bd-list>\n `\n : nothing}\n\n ${this.footer || this.footerBold\n ? html`\n <bd-p variant=\"regular\" font-family=\"mono\" class=\"bd-terminalmsg-footer\">\n ${this.footerBold\n ? html`<strong>${this.footerBold}</strong> `\n : nothing}\n ${this.footer}\n ${this.showCursor\n ? html`<bd-terminal-cursor></bd-terminal-cursor>`\n : nothing}\n </bd-p>\n `\n : nothing}\n\n <slot></slot>\n\n ${this.caption\n ? html`<div class=\"bd-terminalmsg-caption\">${this.caption}</div>`\n : nothing}\n </div>\n\n ${this._renderHint()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-terminal-message\": TerminalMessage;\n }\n}\n"],"mappings":"A,+cAwBA,IACMI,EADN,cAC8BC,CAAW,C,8BAIxB,KAAA,aAAA,GAEF,KAAA,WAAA,GAEH,KAAA,QAAA,GAEC,KAAA,SAAA,GAEJ,KAAA,KAAA,GAEC,KAAA,MAAA,GAEU,KAAA,MAAA,CAAC,EAEV,KAAA,OAAA,GAEI,KAAA,WAAA,GAEA,KAAA,WAAA,GAEN,KAAA,KAAA,GAEiB,KAAA,MAAA,CAAC,EAEf,KAAA,QAAA,GASS,KAAA,QAAA,S,QApCH,KAAA,OAAA,CAACL,CAAkB,C,CAsCnC,iBAAkB,CAGhB,OAFI,KAAK,UAAY,SACjB,CAAC,KAAK,aAAqBO,EACxB,CAAI;;;;;;KAOb,CAEA,aAAc,CACZ,GAAI,CAAC,KAAK,KAAM,OAAOA,EAEvB,IAAMC,EAAQ,KAAK,KAAK,MAAM,eAAe,EAE7C,MAAO,EAAI;;UAELA,EAAM,IAAK,GACX,eAAe,KAAKC,CAAI,EACpB,CAAI,2CAA2CA,EAAK,WACpDA,CACN,EAAE;;KAGR,CAEA,cAAe,CAGb,MAFI,CAAC,KAAK,OAAS,CAAC,KAAK,MAAM,OAAeF,EAEvC,CAAI;;UAEL,KAAK,MAAM,KAAK,CAAE,OAAM,OAAM,QAAO,QAAO,aAAY,UAAW,CACnE,OAAQG,EAAR,CACE,IAAK,MACH,MAAO,EAAI,sCACb,IAAK,QACH,MAAO,EAAI,sEACb,IAAK,MACH,MAAO,EAAI,qCAAqCC,EAAK,QACvD,IAAK,KACH,MAAO,EAAI,oCAAoCA,EAAK,QACtD,IAAK,MACH,MAAO,EAAI,qCAAqCA,EAAK,QACvD,IAAK,SACH,MAAO,EAAI,wCAAwCA,EAAK,QAC1D,IAAK,MACH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AK,CAAC,CAAA,EAAAb,EAAA,UAAA,UAAA,IAAA,EAAA,EArC1C,EAAAH,EAAA,CAAAiB,EAAc,qBAAqB,CAAA,EAAAd,CAAA"}
@@ -1,4 +1,4 @@
1
- import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import n from"./tooltip.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o,state as s}from"lit/decorators.js";var c=0,l=class extends r{constructor(...e){super(...e),this.text=``,this._dismissed=!1}static{this.styles=[n]}_margin(){let e=getComputedStyle(this).getPropertyValue(`--spacing-16`),t=parseFloat(e);return Number.isFinite(t)?e.includes(`rem`)?t*16:t:16}_place(){let e=this.renderRoot?.querySelector(`.bubble`);if(!e)return;e.style.setProperty(`--bd-tooltip-shift`,`0px`);let t=e.getBoundingClientRect();if(t.width===0)return;let n=this._margin(),r=n-t.left,i=window.innerWidth-n-t.right,a=r>i?r:Math.min(Math.max(0,r),i);e.style.setProperty(`--bd-tooltip-shift`,`${Math.round(a)}px`)}firstUpdated(){this._place(),this._observe()}get _showing(){return!this._dismissed&&(this.matches(`:hover`)||this.matches(`:focus-within`))}_observe(){if(typeof ResizeObserver>`u`||this._ro)return;this._ro=new ResizeObserver(()=>this._place()),this._ro.observe(this);let e=this.renderRoot?.querySelector(`.bubble`);e&&this._ro.observe(e)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._observe(),this._onShow=()=>this._place(),this.addEventListener(`mouseenter`,this._onShow),this.addEventListener(`focusin`,this._onShow),window.addEventListener(`resize`,this._onShow),this._onKeydown=e=>{e.key===`Escape`&&!e.defaultPrevented&&this._showing&&(e.preventDefault(),this._dismissed=!0)},this._onLeave=e=>{if(!this._dismissed)return;let t=e.type===`mouseleave`||!this.matches(`:hover`),n=e.type===`focusout`?!this.contains(e.relatedTarget)&&!this.shadowRoot.contains(e.relatedTarget):!this.matches(`:focus-within`);t&&n&&(this._dismissed=!1)},document.addEventListener(`keydown`,this._onKeydown,!0),this.addEventListener(`mouseleave`,this._onLeave),this.addEventListener(`focusout`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`mouseenter`,this._onShow),this.removeEventListener(`focusin`,this._onShow),window.removeEventListener(`resize`,this._onShow),document.removeEventListener(`keydown`,this._onKeydown,!0),this.removeEventListener(`mouseleave`,this._onLeave),this.removeEventListener(`focusout`,this._onLeave),this._ro?.disconnect(),this._ro=void 0,super.disconnectedCallback()}_describe(){this._undescribe();let e=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];if(e&&this.text){if(e.localName.includes(`-`)&&!customElements.get(e.localName))customElements.whenDefined(e.localName).then(()=>this._describe());else{if(`description`in e&&e.localName.includes(`-`))e.description=this.text,this._described={trigger:e,kind:`property`};else if(!e.localName.includes(`-`)){let t=document.createElement(`span`);t.id=`bd-tooltip-description-${++c}`,t.slot=`description`,t.hidden=!0,t.textContent=this.text,this.append(t);let n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);e.setAttribute(`aria-describedby`,[...n,t.id].join(` `)),this._described={trigger:e,kind:`idref`,node:t}}this.requestUpdate()}}}_undescribe(){let e=this._described;if(e){if(e.kind===`property`)e.trigger.description=``;else{let t=(e.trigger.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(t=>t&&t!==e.node.id);t.length?e.trigger.setAttribute(`aria-describedby`,t.join(` `)):e.trigger.removeAttribute(`aria-describedby`),e.node.remove()}this._described=null,this.requestUpdate()}}updated(e){e.has(`text`)&&this.hasUpdated&&this._describe()}render(){return i`
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import n from"./tooltip.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o,state as s}from"lit/decorators.js";var c=0,l=class extends r{constructor(...e){super(...e),this.text=``,this._dismissed=!1}static{this.styles=[n]}_margin(){let e=getComputedStyle(this).getPropertyValue(`--spacing-16`),t=parseFloat(e),n=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.isFinite(t)?e.includes(`rem`)?t*n:t:16}_place(){let e=this.renderRoot?.querySelector(`.bubble`);if(!e)return;e.style.setProperty(`--bd-tooltip-shift`,`0px`);let t=e.getBoundingClientRect();if(t.width===0)return;let n=this._margin(),r=n-t.left,i=window.innerWidth-n-t.right,a=r>i?r:Math.min(Math.max(0,r),i);e.style.setProperty(`--bd-tooltip-shift`,`${Math.round(a)}px`)}firstUpdated(){this._place(),this._observe()}get _showing(){return!this._dismissed&&(this.matches(`:hover`)||this.matches(`:focus-within`))}_observe(){if(typeof ResizeObserver>`u`||this._ro)return;this._ro=new ResizeObserver(()=>this._place()),this._ro.observe(this);let e=this.renderRoot?.querySelector(`.bubble`);e&&this._ro.observe(e)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._observe(),this._onShow=()=>this._place(),this.addEventListener(`mouseenter`,this._onShow),this.addEventListener(`focusin`,this._onShow),window.addEventListener(`resize`,this._onShow),this._onKeydown=e=>{e.key===`Escape`&&!e.defaultPrevented&&this._showing&&(e.preventDefault(),this._dismissed=!0)},this._onLeave=e=>{if(!this._dismissed)return;let t=e.type===`mouseleave`||!this.matches(`:hover`),n=e.type===`focusout`?!this.contains(e.relatedTarget)&&!this.shadowRoot.contains(e.relatedTarget):!this.matches(`:focus-within`);t&&n&&(this._dismissed=!1)},document.addEventListener(`keydown`,this._onKeydown,!0),this.addEventListener(`mouseleave`,this._onLeave),this.addEventListener(`focusout`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`mouseenter`,this._onShow),this.removeEventListener(`focusin`,this._onShow),window.removeEventListener(`resize`,this._onShow),document.removeEventListener(`keydown`,this._onKeydown,!0),this.removeEventListener(`mouseleave`,this._onLeave),this.removeEventListener(`focusout`,this._onLeave),this._ro?.disconnect(),this._ro=void 0,super.disconnectedCallback()}_describe(){this._undescribe();let e=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];if(e&&this.text){if(e.localName.includes(`-`)&&!customElements.get(e.localName))customElements.whenDefined(e.localName).then(()=>this._describe());else{if(`description`in e&&e.localName.includes(`-`))e.description=this.text,this._described={trigger:e,kind:`property`};else if(!e.localName.includes(`-`)){let t=document.createElement(`span`);t.id=`bd-tooltip-description-${++c}`,t.slot=`description`,t.hidden=!0,t.textContent=this.text,this.append(t);let n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);e.setAttribute(`aria-describedby`,[...n,t.id].join(` `)),this._described={trigger:e,kind:`idref`,node:t}}this.requestUpdate()}}}_undescribe(){let e=this._described;if(e){if(e.kind===`property`)e.trigger.description=``;else{let t=(e.trigger.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(t=>t&&t!==e.node.id);t.length?e.trigger.setAttribute(`aria-describedby`,t.join(` `)):e.trigger.removeAttribute(`aria-describedby`),e.node.remove()}this._described=null,this.requestUpdate()}}updated(e){e.has(`text`)&&this.hasUpdated&&this._describe()}render(){return i`
2
2
  <slot @slotchange=${()=>this._describe()}></slot>
3
3
  <!-- the trigger's description: hidden, but slotted, because a node
4
4
  assigned to no slot is not in the flat tree and Chrome then drops
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","names":["_decorate","__decorate","tooltipCSS","descriptionIds","BdTooltip","LitElement","_args","raw","px","bubble","box","margin","minShift","maxShift","shift","pointerGone","focusGone","trigger","node","ids","d","changed","nothing","property","state","defineElement"],"sources":["../../../../src/components/tooltip/tooltip.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 { tooltipCSS } from './tooltip.css.ts';\n\nlet descriptionIds = 0;\n\ntype Described =\n | { trigger: Element & { description: unknown }; kind: 'property' }\n | { trigger: Element; kind: 'idref'; node: HTMLSpanElement };\n\n@defineElement('bd-tooltip')\nexport class BdTooltip extends LitElement {\n static styles = [tooltipCSS];\n\n @property({ type: String })\n text = '';\n /* Set by Escape and cleared once neither the pointer nor focus is on the\n tooltip any more, so the next hover or focus shows it again. */\n @state()\n _dismissed = false;\n\n _ro? : ResizeObserver;\n _onShow! : () => void;\n _onKeydown!: (e: KeyboardEvent) => void;\n _onLeave! : (e: MouseEvent | FocusEvent) => void;\n _described?: Described | null;\n\n /* The bubble is centred on its trigger and is wider than it, so near a\n viewport edge part of it lands outside the page. No CSS can fix that --\n the browser cannot be asked \"where is my trigger\" from a stylesheet -- so\n the shift is measured here and handed back to CSS as a custom property.\n\n Deliberately additive: --bd-tooltip-shift defaults to 0 in the stylesheet,\n so a tooltip in a document where this never runs renders exactly as it did\n before. getBoundingClientRect and ResizeObserver are both already used by\n five components in this package; this is the same pattern, not a new one. */\n /**\n * The margin the bubble keeps from each viewport edge, read from the same\n * token the stylesheet subtracts. The cap there is `100vw - --spacing-32`,\n * which is that margin on each side, and the two numbers have to agree: the\n * previous version clamped to a hard-coded 8 while the stylesheet reserved\n * 16, so placement aimed at a boundary the width contract had not left room\n * for.\n */\n _margin() {\n const raw = getComputedStyle(this).getPropertyValue('--spacing-16');\n const px = parseFloat(raw);\n /* Tokens are installed in document scope and always resolve; the fallback\n is for a disconnected element, where getComputedStyle returns nothing. */\n return Number.isFinite(px) ? (raw.includes('rem') ? px * 16 : px) : 16;\n }\n\n /* The bubble is centred on its trigger and is wider than it, so near a\n viewport edge part of it lands outside the page. No CSS can fix that --\n the browser cannot be asked \"where is my trigger\" from a stylesheet -- so\n the shift is measured here and handed back to CSS as a custom property.\n\n Deliberately additive: --bd-tooltip-shift defaults to 0 in the stylesheet,\n so a tooltip in a document where this never runs renders exactly as it did\n before.\n\n Both edges, not one. The previous version corrected whichever edge it\n found outside first and stopped -- an `if` on the left and an `else if` on\n the right -- which is only sound while the bubble is narrower than the\n space between the margins. It was not: the border box ran 16px past its\n own cap, so pushing the left edge in pushed the right edge out and the\n `else if` never ran to notice.\n\n Now the two constraints are solved together. For a shift s the bubble\n lands at [left + s, right + s], and staying inside the margins means\n\n s >= M - left and s <= V - M - right\n\n so the centred position s = 0 is clamped into [minShift, maxShift]. With\n box-sizing: border-box the bubble is at most V - 2M wide, which is exactly\n the condition for that interval to be non-empty -- the width contract is\n what makes the placement solvable, which is why the box model had to be\n fixed first. */\n _place() {\n const bubble = this.renderRoot?.querySelector<HTMLElement>('.bubble');\n if (!bubble) return;\n bubble.style.setProperty('--bd-tooltip-shift', '0px');\n const box = bubble.getBoundingClientRect();\n if (box.width === 0) return;\n\n const margin = this._margin();\n const minShift = margin - box.left;\n const maxShift = window.innerWidth - margin - box.right;\n\n /* minShift > maxShift means the bubble is wider than the space between the\n margins, which the width cap should prevent. If a consuming page has\n overridden that cap, the left edge wins: the start of the text stays\n readable rather than the end of it. */\n const shift = minShift > maxShift\n ? minShift\n : Math.min(Math.max(0, minShift), maxShift);\n\n bubble.style.setProperty('--bd-tooltip-shift', `${Math.round(shift)}px`);\n }\n\n /* Placement runs once the bubble has a box, not only when it is revealed.\n The bubble is laid out at all times -- opacity: 0 hides it and\n pointer-events: none takes it out of the way, but neither takes it out of\n flow -- so an unplaced bubble on a trigger near the right edge widened the\n document: measured at 1440, the right-edge bubble in Atoms/Tooltip \"At the\n viewport edges\" ended at x=1622.5 and the page scrollWidth was 1623, a\n 183px horizontal scrollbar produced by something invisible.\n\n This is not the placement-on-first-update that P7F tried and reverted.\n That call ran the single-edge algorithm above on a content-box bubble, and\n it moved the overflow rather than removing it -- 183px at the right edge\n became 61px on Long Text at 320. Running it here is only correct because\n the width contract and the clamp were fixed first; the ordering is the\n fix, not the call site.\n\n One pass here is not enough on its own, and the observer below is why.\n Measured: this call alone left Long Text at 320 with shift 80px and 53px\n of overflow, where placing again after everything had settled produced\n shift 11px and none. The arithmetic was right both times -- the geometry\n was not final the first time. */\n firstUpdated() {\n this._place();\n /* The trigger is slotted light DOM and is usually a custom element of its\n own, so it upgrades and takes its real width AFTER this tooltip has\n rendered: the bubble is centred on a reference that has not finished\n existing. Observing both boxes covers that, and the font swap and any\n later content change with it, rather than guessing a delay.\n\n Both boxes, because they move for different reasons: the host changes\n when the trigger resizes, the bubble when its own text reflows.\n ResizeObserver fires once on observe, which is the settled first pass. */\n this._observe();\n }\n\n /* ESCAPE. WCAG 1.4.13 asks that content shown on hover or focus can be\n dismissed without moving the pointer or focus. The pointer may be over the\n trigger while focus is anywhere on the page, so the key is heard on the\n document, and only acted on while this bubble is actually showing.\n\n Capture phase, and the event is marked handled with preventDefault rather\n than stopped: a tooltip is the innermost thing that can be open, so its\n Escape should not also close a native <dialog> it sits in, and a dialog's\n cancel is exactly what preventDefault on that keydown withholds.\n Propagation is left alone, as bd-modal leaves it, so a page that wants to\n hear the key still does. */\n get _showing() {\n return !this._dismissed && (this.matches(':hover') || this.matches(':focus-within'));\n }\n\n /* Started on first render and again on every reconnect. It used to start\n only in firstUpdated, and disconnectedCallback tears it down, so a tooltip\n moved in the DOM -- removed and re-inserted, which a framework reordering\n a list does -- came back with no observer and never re-placed itself when\n its trigger or text changed size. */\n _observe() {\n if (typeof ResizeObserver === 'undefined' || this._ro) return;\n this._ro = new ResizeObserver(() => this._place());\n this._ro.observe(this);\n const bubble = this.renderRoot?.querySelector('.bubble');\n if (bubble) this._ro.observe(bubble);\n }\n\n connectedCallback() {\n super.connectedCallback();\n // a first connection is handled by firstUpdated, once the bubble exists\n if (this.hasUpdated) this._observe();\n this._onShow = () => this._place();\n /* Both reveals the stylesheet already honours, and resize because the\n measurement is only true for the width it was taken at. */\n this.addEventListener('mouseenter', this._onShow);\n this.addEventListener('focusin', this._onShow);\n window.addEventListener('resize', this._onShow);\n\n this._onKeydown = e => {\n if (e.key !== 'Escape' || e.defaultPrevented || !this._showing) return;\n e.preventDefault();\n this._dismissed = true;\n };\n /* Back to normal once the pointer and focus have both gone: a pointer\n leaving while focus stays inside keeps it dismissed, and the reverse. */\n this._onLeave = e => {\n if (!this._dismissed) return;\n const pointerGone = e.type === 'mouseleave' || !this.matches(':hover');\n const focusGone = e.type === 'focusout'\n ? !this.contains(e.relatedTarget as Node | null) && !this.shadowRoot!.contains(e.relatedTarget as Node | null)\n : !this.matches(':focus-within');\n if (pointerGone && focusGone) this._dismissed = false;\n };\n document.addEventListener('keydown', this._onKeydown, true);\n this.addEventListener('mouseleave', this._onLeave);\n this.addEventListener('focusout', this._onLeave);\n }\n\n disconnectedCallback() {\n this.removeEventListener('mouseenter', this._onShow);\n this.removeEventListener('focusin', this._onShow);\n window.removeEventListener('resize', this._onShow);\n document.removeEventListener('keydown', this._onKeydown, true);\n this.removeEventListener('mouseleave', this._onLeave);\n this.removeEventListener('focusout', this._onLeave);\n this._ro?.disconnect();\n this._ro = undefined;\n super.disconnectedCallback();\n }\n\n /* DESCRIBING THE TRIGGER.\n The bubble had role=\"tooltip\" and nothing pointed at it, so a screen\n reader landing on the trigger heard its name and not the tooltip, and\n the bubble's text sat in the page as a stray line. It cannot be pointed\n at directly: the bubble is in this shadow root and the trigger is not,\n and an id reference never crosses that boundary. So the trigger is\n described from its own side:\n\n a native control aria-describedby names a hidden copy of the text,\n kept as a child of this element in a hidden slot --\n the same tree as the trigger, so the reference\n resolves\n bd-button, the text goes to its description property, which\n bd-button-link, wires aria-describedby inside its own shadow root,\n bd-link where its real control is\n\n Once described, the bubble is hidden from assistive technology so the\n text is not read twice. Any other custom element as trigger keeps the\n bubble exposed and goes undescribed -- its control is out of reach. */\n _describe() {\n this._undescribe();\n const slot = this.shadowRoot?.querySelector('slot');\n const trigger = slot?.assignedElements()[0];\n if (!trigger || !this.text) return;\n\n // a custom element that has not upgraded yet has no description to set:\n // come back once it has\n if (trigger.localName.includes('-') && !customElements.get(trigger.localName)) {\n customElements.whenDefined(trigger.localName).then(() => this._describe());\n return;\n }\n\n if ('description' in trigger && trigger.localName.includes('-')) {\n trigger.description = this.text;\n this._described = { trigger, kind: 'property' };\n } else if (!trigger.localName.includes('-')) {\n const node = document.createElement('span');\n node.id = `bd-tooltip-description-${++descriptionIds}`;\n node.slot = 'description';\n node.hidden = true;\n node.textContent = this.text;\n this.append(node);\n const ids = (trigger.getAttribute('aria-describedby') || '').split(/\\s+/).filter(Boolean);\n trigger.setAttribute('aria-describedby', [...ids, node.id].join(' '));\n this._described = { trigger, kind: 'idref', node };\n }\n this.requestUpdate();\n }\n\n _undescribe() {\n const d = this._described;\n if (!d) return;\n if (d.kind === 'property') {\n d.trigger.description = '';\n } else {\n const ids = (d.trigger.getAttribute('aria-describedby') || '').split(/\\s+/).filter(t => t && t !== d.node.id);\n if (ids.length) d.trigger.setAttribute('aria-describedby', ids.join(' '));\n else d.trigger.removeAttribute('aria-describedby');\n d.node.remove();\n }\n this._described = null;\n this.requestUpdate();\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has('text') && this.hasUpdated) this._describe();\n }\n\n render() {\n return html`\n <slot @slotchange=${() => this._describe()}></slot>\n <!-- the trigger's description: hidden, but slotted, because a node\n assigned to no slot is not in the flat tree and Chrome then drops\n an aria-describedby that points at it -->\n <span hidden><slot name=\"description\"></slot></span>\n <span\n class=\"bubble ${this._dismissed ? 'bubble--dismissed' : ''}\"\n role=\"tooltip\"\n aria-hidden=\"${this._described ? 'true' : nothing}\"\n >${this.text}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-tooltip': BdTooltip;\n }\n}\n"],"mappings":"A,qTAOA,IAAIG,EAAiB,EAORC,EAAN,cAAwBC,CAAW,C,8BAIjC,KAAA,KAAA,GAIM,KAAA,WAAA,E,QAPG,KAAA,OAAA,CAACH,CAAU,C,CAgC3B,SAAU,CACR,IAAMK,EAAM,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,cAAc,EAC5DC,EAAK,WAAWD,CAAG,EAGzB,OAAO,OAAO,SAASC,CAAE,EAAKD,EAAI,SAAS,KAAK,EAAIC,EAAK,GAAKA,EAAM,EACtE,CA4BA,QAAS,CACP,IAAMC,EAAS,KAAK,YAAY,cAA2B,SAAS,EACpE,G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descriptionIds","BdTooltip","LitElement","_args","raw","px","rem","bubble","box","margin","minShift","maxShift","shift","pointerGone","focusGone","trigger","node","ids","d","changed","nothing","property","state","defineElement"],"sources":["../../../../src/components/tooltip/tooltip.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 { tooltipCSS } from './tooltip.css.ts';\n\nlet descriptionIds = 0;\n\ntype Described =\n | { trigger: Element & { description: unknown }; kind: 'property' }\n | { trigger: Element; kind: 'idref'; node: HTMLSpanElement };\n\n@defineElement('bd-tooltip')\nexport class BdTooltip extends LitElement {\n static styles = [tooltipCSS];\n\n @property({ type: String })\n text = '';\n /* Set by Escape and cleared once neither the pointer nor focus is on the\n tooltip any more, so the next hover or focus shows it again. */\n @state()\n _dismissed = false;\n\n _ro? : ResizeObserver;\n _onShow! : () => void;\n _onKeydown!: (e: KeyboardEvent) => void;\n _onLeave! : (e: MouseEvent | FocusEvent) => void;\n _described?: Described | null;\n\n /* The bubble is centred on its trigger and is wider than it, so near a\n viewport edge part of it lands outside the page. No CSS can fix that --\n the browser cannot be asked \"where is my trigger\" from a stylesheet -- so\n the shift is measured here and handed back to CSS as a custom property.\n\n Deliberately additive: --bd-tooltip-shift defaults to 0 in the stylesheet,\n so a tooltip in a document where this never runs renders exactly as it did\n before. getBoundingClientRect and ResizeObserver are both already used by\n five components in this package; this is the same pattern, not a new one. */\n /**\n * The margin the bubble keeps from each viewport edge, read from the same\n * token the stylesheet subtracts. The cap there is `100vw - --spacing-32`,\n * which is that margin on each side, and the two numbers have to agree: the\n * previous version clamped to a hard-coded 8 while the stylesheet reserved\n * 16, so placement aimed at a boundary the width contract had not left room\n * for.\n */\n _margin() {\n const raw = getComputedStyle(this).getPropertyValue('--spacing-16');\n const px = parseFloat(raw);\n /* A custom property reads back as written, 1rem, so the rem is turned into\n pixels at the root's own size -- the one the stylesheet's cap resolves\n at. It was multiplied by 16, which is right only at the default size:\n a reader at 24px got a 24px cap and a 16px clamp. */\n const rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;\n /* Tokens are installed in document scope and always resolve; the fallback\n is for a disconnected element, where getComputedStyle returns nothing. */\n return Number.isFinite(px) ? (raw.includes('rem') ? px * rem : px) : 16;\n }\n\n /* The bubble is centred on its trigger and is wider than it, so near a\n viewport edge part of it lands outside the page. No CSS can fix that --\n the browser cannot be asked \"where is my trigger\" from a stylesheet -- so\n the shift is measured here and handed back to CSS as a custom property.\n\n Deliberately additive: --bd-tooltip-shift defaults to 0 in the stylesheet,\n so a tooltip in a document where this never runs renders exactly as it did\n before.\n\n Both edges, not one. The previous version corrected whichever edge it\n found outside first and stopped -- an `if` on the left and an `else if` on\n the right -- which is only sound while the bubble is narrower than the\n space between the margins. It was not: the border box ran 16px past its\n own cap, so pushing the left edge in pushed the right edge out and the\n `else if` never ran to notice.\n\n Now the two constraints are solved together. For a shift s the bubble\n lands at [left + s, right + s], and staying inside the margins means\n\n s >= M - left and s <= V - M - right\n\n so the centred position s = 0 is clamped into [minShift, maxShift]. With\n box-sizing: border-box the bubble is at most V - 2M wide, which is exactly\n the condition for that interval to be non-empty -- the width contract is\n what makes the placement solvable, which is why the box model had to be\n fixed first. */\n _place() {\n const bubble = this.renderRoot?.querySelector<HTMLElement>('.bubble');\n if (!bubble) return;\n bubble.style.setProperty('--bd-tooltip-shift', '0px');\n const box = bubble.getBoundingClientRect();\n if (box.width === 0) return;\n\n const margin = this._margin();\n const minShift = margin - box.left;\n const maxShift = window.innerWidth - margin - box.right;\n\n /* minShift > maxShift means the bubble is wider than the space between the\n margins, which the width cap should prevent. If a consuming page has\n overridden that cap, the left edge wins: the start of the text stays\n readable rather than the end of it. */\n const shift = minShift > maxShift\n ? minShift\n : Math.min(Math.max(0, minShift), maxShift);\n\n bubble.style.setProperty('--bd-tooltip-shift', `${Math.round(shift)}px`);\n }\n\n /* Placement runs once the bubble has a box, not only when it is revealed.\n The bubble is laid out at all times -- opacity: 0 hides it and\n pointer-events: none takes it out of the way, but neither takes it out of\n flow -- so an unplaced bubble on a trigger near the right edge widened the\n document: measured at 1440, the right-edge bubble in Atoms/Tooltip \"At the\n viewport edges\" ended at x=1622.5 and the page scrollWidth was 1623, a\n 183px horizontal scrollbar produced by something invisible.\n\n This is not the placement-on-first-update that P7F tried and reverted.\n That call ran the single-edge algorithm above on a content-box bubble, and\n it moved the overflow rather than removing it -- 183px at the right edge\n became 61px on Long Text at 320. Running it here is only correct because\n the width contract and the clamp were fixed first; the ordering is the\n fix, not the call site.\n\n One pass here is not enough on its own, and the observer below is why.\n Measured: this call alone left Long Text at 320 with shift 80px and 53px\n of overflow, where placing again after everything had settled produced\n shift 11px and none. The arithmetic was right both times -- the geometry\n was not final the first time. */\n firstUpdated() {\n this._place();\n /* The trigger is slotted light DOM and is usually a custom element of its\n own, so it upgrades and takes its real width AFTER this tooltip has\n rendered: the bubble is centred on a reference that has not finished\n existing. Observing both boxes covers that, and the font swap and any\n later content change with it, rather than guessing a delay.\n\n Both boxes, because they move for different reasons: the host changes\n when the trigger resizes, the bubble when its own text reflows.\n ResizeObserver fires once on observe, which is the settled first pass. */\n this._observe();\n }\n\n /* ESCAPE. WCAG 1.4.13 asks that content shown on hover or focus can be\n dismissed without moving the pointer or focus. The pointer may be over the\n trigger while focus is anywhere on the page, so the key is heard on the\n document, and only acted on while this bubble is actually showing.\n\n Capture phase, and the event is marked handled with preventDefault rather\n than stopped: a tooltip is the innermost thing that can be open, so its\n Escape should not also close a native <dialog> it sits in, and a dialog's\n cancel is exactly what preventDefault on that keydown withholds.\n Propagation is left alone, as bd-modal leaves it, so a page that wants to\n hear the key still does. */\n get _showing() {\n return !this._dismissed && (this.matches(':hover') || this.matches(':focus-within'));\n }\n\n /* Started on first render and again on every reconnect. It used to start\n only in firstUpdated, and disconnectedCallback tears it down, so a tooltip\n moved in the DOM -- removed and re-inserted, which a framework reordering\n a list does -- came back with no observer and never re-placed itself when\n its trigger or text changed size. */\n _observe() {\n if (typeof ResizeObserver === 'undefined' || this._ro) return;\n this._ro = new ResizeObserver(() => this._place());\n this._ro.observe(this);\n const bubble = this.renderRoot?.querySelector('.bubble');\n if (bubble) this._ro.observe(bubble);\n }\n\n connectedCallback() {\n super.connectedCallback();\n // a first connection is handled by firstUpdated, once the bubble exists\n if (this.hasUpdated) this._observe();\n this._onShow = () => this._place();\n /* Both reveals the stylesheet already honours, and resize because the\n measurement is only true for the width it was taken at. */\n this.addEventListener('mouseenter', this._onShow);\n this.addEventListener('focusin', this._onShow);\n window.addEventListener('resize', this._onShow);\n\n this._onKeydown = e => {\n if (e.key !== 'Escape' || e.defaultPrevented || !this._showing) return;\n e.preventDefault();\n this._dismissed = true;\n };\n /* Back to normal once the pointer and focus have both gone: a pointer\n leaving while focus stays inside keeps it dismissed, and the reverse. */\n this._onLeave = e => {\n if (!this._dismissed) return;\n const pointerGone = e.type === 'mouseleave' || !this.matches(':hover');\n const focusGone = e.type === 'focusout'\n ? !this.contains(e.relatedTarget as Node | null) && !this.shadowRoot!.contains(e.relatedTarget as Node | null)\n : !this.matches(':focus-within');\n if (pointerGone && focusGone) this._dismissed = false;\n };\n document.addEventListener('keydown', this._onKeydown, true);\n this.addEventListener('mouseleave', this._onLeave);\n this.addEventListener('focusout', this._onLeave);\n }\n\n disconnectedCallback() {\n this.removeEventListener('mouseenter', this._onShow);\n this.removeEventListener('focusin', this._onShow);\n window.removeEventListener('resize', this._onShow);\n document.removeEventListener('keydown', this._onKeydown, true);\n this.removeEventListener('mouseleave', this._onLeave);\n this.removeEventListener('focusout', this._onLeave);\n this._ro?.disconnect();\n this._ro = undefined;\n super.disconnectedCallback();\n }\n\n /* DESCRIBING THE TRIGGER.\n The bubble had role=\"tooltip\" and nothing pointed at it, so a screen\n reader landing on the trigger heard its name and not the tooltip, and\n the bubble's text sat in the page as a stray line. It cannot be pointed\n at directly: the bubble is in this shadow root and the trigger is not,\n and an id reference never crosses that boundary. So the trigger is\n described from its own side:\n\n a native control aria-describedby names a hidden copy of the text,\n kept as a child of this element in a hidden slot --\n the same tree as the trigger, so the reference\n resolves\n bd-button, the text goes to its description property, which\n bd-button-link, wires aria-describedby inside its own shadow root,\n bd-link where its real control is\n\n Once described, the bubble is hidden from assistive technology so the\n text is not read twice. Any other custom element as trigger keeps the\n bubble exposed and goes undescribed -- its control is out of reach. */\n _describe() {\n this._undescribe();\n const slot = this.shadowRoot?.querySelector('slot');\n const trigger = slot?.assignedElements()[0];\n if (!trigger || !this.text) return;\n\n // a custom element that has not upgraded yet has no description to set:\n // come back once it has\n if (trigger.localName.includes('-') && !customElements.get(trigger.localName)) {\n customElements.whenDefined(trigger.localName).then(() => this._describe());\n return;\n }\n\n if ('description' in trigger && trigger.localName.includes('-')) {\n trigger.description = this.text;\n this._described = { trigger, kind: 'property' };\n } else if (!trigger.localName.includes('-')) {\n const node = document.createElement('span');\n node.id = `bd-tooltip-description-${++descriptionIds}`;\n node.slot = 'description';\n node.hidden = true;\n node.textContent = this.text;\n this.append(node);\n const ids = (trigger.getAttribute('aria-describedby') || '').split(/\\s+/).filter(Boolean);\n trigger.setAttribute('aria-describedby', [...ids, node.id].join(' '));\n this._described = { trigger, kind: 'idref', node };\n }\n this.requestUpdate();\n }\n\n _undescribe() {\n const d = this._described;\n if (!d) return;\n if (d.kind === 'property') {\n d.trigger.description = '';\n } else {\n const ids = (d.trigger.getAttribute('aria-describedby') || '').split(/\\s+/).filter(t => t && t !== d.node.id);\n if (ids.length) d.trigger.setAttribute('aria-describedby', ids.join(' '));\n else d.trigger.removeAttribute('aria-describedby');\n d.node.remove();\n }\n this._described = null;\n this.requestUpdate();\n }\n\n updated(changed: PropertyValues<this>) {\n if (changed.has('text') && this.hasUpdated) this._describe();\n }\n\n render() {\n return html`\n <slot @slotchange=${() => this._describe()}></slot>\n <!-- the trigger's description: hidden, but slotted, because a node\n assigned to no slot is not in the flat tree and Chrome then drops\n an aria-describedby that points at it -->\n <span hidden><slot name=\"description\"></slot></span>\n <span\n class=\"bubble ${this._dismissed ? 'bubble--dismissed' : ''}\"\n role=\"tooltip\"\n aria-hidden=\"${this._described ? 'true' : nothing}\"\n >${this.text}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bd-tooltip': BdTooltip;\n }\n}\n"],"mappings":"A,qTAOA,IAAIG,EAAiB,EAORC,EAAN,cAAwBC,CAAW,C,8BAIjC,KAAA,KAAA,GAIM,KAAA,WAAA,E,QAPG,KAAA,OAAA,CAACH,CAAU,C,CAgC3B,SAAU,CACR,IAAMK,EAAM,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,cAAc,EAC5DC,EAAK,WAAWD,CAAG,EAKnBE,EAAM,WAAW,iBAAiB,SAAS,eAAe,CAAC,CAAC,QAAQ,GAAK,GAG/E,OAAO,OAAO,SAASD,CAAE,EAAKD,EAAI,SAAS,KAAK,EAAIC,EAAKC,EAAMD,EAAM,EACvE,CA4BA,QAAS,CACP,IAAME,EAAS,KAAK,YAAY,cAA2B,SAAS,EACpE,GAAI,CAACA,EAAQ,OACbA,EAAO,MAAM,YAAY,qBAAsB,KAAK,EACpD,IAAMC,EAAMD,EAAO,sBAAsB,EACzC,GAAIC,EAAI,QAAU,EAAG,OAErB,IAAMC,EAAS,KAAK,QAAQ,EACtBC,EAAWD,EAASD,EAAI,KACxBG,EAAW,OAAO,WAAaF,EAASD,EAAI,MAM5CI,EAAQF,EAAWC,EACrBD,EACA,KAAK,IAAI,KAAK,IAAI,EAAGA,CAAQ,EAAGC,CAAQ,EAE5CJ,EAAO,MAAM,YAAY,qBAAsB,GAAG,KAAK,MAAMK,CAAK,EAAE,GAAG,CACzE,CAsBA,cAAe,CACb,KAAK,OAAO,EAUZ,KAAK,SAAS,CAChB,CAaA,IAAI,UAAW,CACb,MAAO,CAAC,KAAK,aAAe,KAAK,QAAQ,QAAQ,GAAK,KAAK,QAAQ,eAAe,EACp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,QAAQ,aAAa,mBAAoBD,EAAI,KAAK,GAAG,CAAC,EACnEC,EAAE,QAAQ,gBAAgB,kBAAkB,EACjDA,EAAE,KAAK,OAAO,CAChB,CACA,KAAK,WAAa,KAClB,KAAK,cAAc,CAFnB,CAGF,CAEA,QAAQ,EAA+B,CACjCC,EAAQ,IAAI,MAAM,GAAK,KAAK,YAAY,KAAK,UAAU,CAC7D,CAEA,QAAS,CACP,MAAO,EAAI;8BACiB,KAAK,UAAU,EAAE;;;;;;wBAMzB,KAAK,WAAa,oBAAsB,GAAG;;uBAE5C,KAAK,WAAa,OAASC,EAAQ;SACjD,KAAK,KAAK;KAEjB,CACF,EAtRGvB,EAAA,CAAAwB,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAApB,EAAA,UAAA,OAAA,IAAA,EAAA,EAIzBJ,EAAA,CAAAyB,EAAM,CAAA,EAAArB,EAAA,UAAA,aAAA,IAAA,EAAA,EARR,EAAAJ,EAAA,CAAA0B,EAAc,YAAY,CAAA,EAAAtB,CAAA,E"}
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../../tokens/tokens.js";
2
3
  import "../heading/heading.js";
3
4
  import "../link/link.js";
4
5
  import "../paragraph/paragraph.js";