@repobit/dex-system-design 3.0.1 → 3.0.2

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 (656) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/src/_bundled/oxc-project_runtime/helpers/esm/decorate.js +1 -0
  3. package/dist/src/components/accordion/accordion-bg.css.js +1 -288
  4. package/dist/src/components/accordion/accordion-bg.css.js.map +1 -1
  5. package/dist/src/components/accordion/accordion-bg.d.ts +5 -5
  6. package/dist/src/components/accordion/accordion-bg.js +15 -210
  7. package/dist/src/components/accordion/accordion-bg.js.map +1 -1
  8. package/dist/src/components/accordion/accordion-keyboard.js +1 -89
  9. package/dist/src/components/accordion/accordion-keyboard.js.map +1 -1
  10. package/dist/src/components/accordion/accordion-panel.js +1 -22
  11. package/dist/src/components/accordion/accordion-panel.js.map +1 -1
  12. package/dist/src/components/accordion/accordion.css.js +1 -380
  13. package/dist/src/components/accordion/accordion.css.js.map +1 -1
  14. package/dist/src/components/accordion/accordion.d.ts +7 -7
  15. package/dist/src/components/accordion/accordion.js +16 -138
  16. package/dist/src/components/accordion/accordion.js.map +1 -1
  17. package/dist/src/components/agent-endpoints/agent-endpoints.css.js +1 -88
  18. package/dist/src/components/agent-endpoints/agent-endpoints.css.js.map +1 -1
  19. package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +4 -4
  20. package/dist/src/components/agent-endpoints/agent-endpoints.js +17 -76
  21. package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
  22. package/dist/src/components/alert/alert.css.js +1 -217
  23. package/dist/src/components/alert/alert.css.js.map +1 -1
  24. package/dist/src/components/alert/alert.d.ts +4 -4
  25. package/dist/src/components/alert/alert.js +6 -110
  26. package/dist/src/components/alert/alert.js.map +1 -1
  27. package/dist/src/components/anchor/anchor-nav.css.js +1 -546
  28. package/dist/src/components/anchor/anchor-nav.css.js.map +1 -1
  29. package/dist/src/components/anchor/anchor-nav.d.ts +4 -4
  30. package/dist/src/components/anchor/anchor-nav.js +23 -567
  31. package/dist/src/components/anchor/anchor-nav.js.map +1 -1
  32. package/dist/src/components/annotation/annotation.css.js +1 -64
  33. package/dist/src/components/annotation/annotation.css.js.map +1 -1
  34. package/dist/src/components/annotation/annotation.d.ts +2 -2
  35. package/dist/src/components/annotation/annotation.js +7 -72
  36. package/dist/src/components/annotation/annotation.js.map +1 -1
  37. package/dist/src/components/audience-card/audience-card.css.js +1 -122
  38. package/dist/src/components/audience-card/audience-card.css.js.map +1 -1
  39. package/dist/src/components/audience-card/audience-card.d.ts +2 -2
  40. package/dist/src/components/audience-card/audience-card.js +8 -83
  41. package/dist/src/components/audience-card/audience-card.js.map +1 -1
  42. package/dist/src/components/avatar/avatar.css.js +1 -65
  43. package/dist/src/components/avatar/avatar.css.js.map +1 -1
  44. package/dist/src/components/avatar/avatar.d.ts +3 -3
  45. package/dist/src/components/avatar/avatar.js +6 -76
  46. package/dist/src/components/avatar/avatar.js.map +1 -1
  47. package/dist/src/components/awards/awards-flex.css.js +1 -273
  48. package/dist/src/components/awards/awards-flex.css.js.map +1 -1
  49. package/dist/src/components/awards/awards-flex.d.ts +12 -12
  50. package/dist/src/components/awards/awards-flex.js +33 -264
  51. package/dist/src/components/awards/awards-flex.js.map +1 -1
  52. package/dist/src/components/awards/awards-spotlight.css.js +1 -161
  53. package/dist/src/components/awards/awards-spotlight.css.js.map +1 -1
  54. package/dist/src/components/awards/awards-spotlight.d.ts +4 -4
  55. package/dist/src/components/awards/awards-spotlight.js +24 -140
  56. package/dist/src/components/awards/awards-spotlight.js.map +1 -1
  57. package/dist/src/components/awards/awards.css.js +1 -401
  58. package/dist/src/components/awards/awards.css.js.map +1 -1
  59. package/dist/src/components/awards/awards.d.ts +13 -13
  60. package/dist/src/components/awards/awards.js +26 -179
  61. package/dist/src/components/awards/awards.js.map +1 -1
  62. package/dist/src/components/awards/scroll-slides.js +1 -131
  63. package/dist/src/components/awards/scroll-slides.js.map +1 -1
  64. package/dist/src/components/back/back.css.js +1 -91
  65. package/dist/src/components/back/back.css.js.map +1 -1
  66. package/dist/src/components/back/back.d.ts +1 -1
  67. package/dist/src/components/back/back.js +8 -71
  68. package/dist/src/components/back/back.js.map +1 -1
  69. package/dist/src/components/badge/badge.css.js +1 -204
  70. package/dist/src/components/badge/badge.css.js.map +1 -1
  71. package/dist/src/components/badge/badge.d.ts +4 -4
  72. package/dist/src/components/badge/badge.js +2 -117
  73. package/dist/src/components/badge/badge.js.map +1 -1
  74. package/dist/src/components/bento-grid/bento-grid.css.js +16 -150
  75. package/dist/src/components/bento-grid/bento-grid.css.js.map +1 -1
  76. package/dist/src/components/bento-grid/bento-grid.d.ts +3 -3
  77. package/dist/src/components/bento-grid/bento-grid.js +10 -189
  78. package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
  79. package/dist/src/components/bento-grid/bento-item.css.js +1 -338
  80. package/dist/src/components/bento-grid/bento-item.css.js.map +1 -1
  81. package/dist/src/components/bento-grid/bento-item.d.ts +3 -3
  82. package/dist/src/components/bento-grid/bento-item.js +10 -94
  83. package/dist/src/components/bento-grid/bento-item.js.map +1 -1
  84. package/dist/src/components/blockquote/blockquote.css.js +1 -54
  85. package/dist/src/components/blockquote/blockquote.css.js.map +1 -1
  86. package/dist/src/components/blockquote/blockquote.d.ts +2 -2
  87. package/dist/src/components/blockquote/blockquote.js +1 -44
  88. package/dist/src/components/blockquote/blockquote.js.map +1 -1
  89. package/dist/src/components/breadcrumb/breadcrumb.css.js +1 -168
  90. package/dist/src/components/breadcrumb/breadcrumb.css.js.map +1 -1
  91. package/dist/src/components/breadcrumb/breadcrumb.d.ts +5 -5
  92. package/dist/src/components/breadcrumb/breadcrumb.js +9 -166
  93. package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
  94. package/dist/src/components/button/button.css.js +1 -843
  95. package/dist/src/components/button/button.css.js.map +1 -1
  96. package/dist/src/components/button/button.d.ts +5 -5
  97. package/dist/src/components/button/button.js +18 -420
  98. package/dist/src/components/button/button.js.map +1 -1
  99. package/dist/src/components/caption/caption.css.js +1 -29
  100. package/dist/src/components/caption/caption.css.js.map +1 -1
  101. package/dist/src/components/caption/caption.d.ts +3 -3
  102. package/dist/src/components/caption/caption.js +2 -36
  103. package/dist/src/components/caption/caption.js.map +1 -1
  104. package/dist/src/components/card-features/card-features.css.js +1 -120
  105. package/dist/src/components/card-features/card-features.css.js.map +1 -1
  106. package/dist/src/components/card-features/card-features.d.ts +3 -3
  107. package/dist/src/components/card-features/card-features.js +12 -145
  108. package/dist/src/components/card-features/card-features.js.map +1 -1
  109. package/dist/src/components/cards/card.css.js +1 -369
  110. package/dist/src/components/cards/card.css.js.map +1 -1
  111. package/dist/src/components/cards/card.d.ts +3 -3
  112. package/dist/src/components/cards/card.js +21 -312
  113. package/dist/src/components/cards/card.js.map +1 -1
  114. package/dist/src/components/carousel/carousel.css.js +1 -261
  115. package/dist/src/components/carousel/carousel.css.js.map +1 -1
  116. package/dist/src/components/carousel/carousel.d.ts +5 -5
  117. package/dist/src/components/carousel/carousel.js +13 -297
  118. package/dist/src/components/carousel/carousel.js.map +1 -1
  119. package/dist/src/components/checkbox/checkbox.css.js +1 -173
  120. package/dist/src/components/checkbox/checkbox.css.js.map +1 -1
  121. package/dist/src/components/checkbox/checkbox.d.ts +2 -2
  122. package/dist/src/components/checkbox/checkbox.js +5 -138
  123. package/dist/src/components/checkbox/checkbox.js.map +1 -1
  124. package/dist/src/components/code/code.css.js +1 -73
  125. package/dist/src/components/code/code.css.js.map +1 -1
  126. package/dist/src/components/code/code.d.ts +2 -2
  127. package/dist/src/components/code/code.js +4 -87
  128. package/dist/src/components/code/code.js.map +1 -1
  129. package/dist/src/components/compare/compare.css.js +1 -478
  130. package/dist/src/components/compare/compare.css.js.map +1 -1
  131. package/dist/src/components/compare/compare.d.ts +5 -5
  132. package/dist/src/components/compare/compare.js +23 -476
  133. package/dist/src/components/compare/compare.js.map +1 -1
  134. package/dist/src/components/comparison-panel/comparison-panel.css.js +1 -141
  135. package/dist/src/components/comparison-panel/comparison-panel.css.js.map +1 -1
  136. package/dist/src/components/comparison-panel/comparison-panel.d.ts +2 -2
  137. package/dist/src/components/comparison-panel/comparison-panel.js +18 -86
  138. package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
  139. package/dist/src/components/compatibility-table/compatibility-table.css.js +1 -391
  140. package/dist/src/components/compatibility-table/compatibility-table.css.js.map +1 -1
  141. package/dist/src/components/compatibility-table/compatibility-table.d.ts +2 -2
  142. package/dist/src/components/compatibility-table/compatibility-table.js +26 -136
  143. package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
  144. package/dist/src/components/cta-banner/cta-banner.css.js +1 -97
  145. package/dist/src/components/cta-banner/cta-banner.css.js.map +1 -1
  146. package/dist/src/components/cta-banner/cta-banner.d.ts +2 -2
  147. package/dist/src/components/cta-banner/cta-banner.js +8 -51
  148. package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
  149. package/dist/src/components/display/display.css.js +1 -95
  150. package/dist/src/components/display/display.css.js.map +1 -1
  151. package/dist/src/components/display/display.d.ts +2 -2
  152. package/dist/src/components/display/display.js +3 -84
  153. package/dist/src/components/display/display.js.map +1 -1
  154. package/dist/src/components/divider/divider-horizontal.d.ts +2 -2
  155. package/dist/src/components/divider/divider-horizontal.js +4 -63
  156. package/dist/src/components/divider/divider-horizontal.js.map +1 -1
  157. package/dist/src/components/divider/divider-vertical.d.ts +2 -2
  158. package/dist/src/components/divider/divider-vertical.js +6 -61
  159. package/dist/src/components/divider/divider-vertical.js.map +1 -1
  160. package/dist/src/components/divider/divider.css.js +1 -20
  161. package/dist/src/components/divider/divider.css.js.map +1 -1
  162. package/dist/src/components/dropdown/dropdown.css.js +1 -121
  163. package/dist/src/components/dropdown/dropdown.css.js.map +1 -1
  164. package/dist/src/components/dropdown/dropdown.d.ts +5 -5
  165. package/dist/src/components/dropdown/dropdown.js +17 -283
  166. package/dist/src/components/dropdown/dropdown.js.map +1 -1
  167. package/dist/src/components/features/features.css.js +1 -123
  168. package/dist/src/components/features/features.css.js.map +1 -1
  169. package/dist/src/components/features/features.d.ts +5 -5
  170. package/dist/src/components/features/features.js +11 -71
  171. package/dist/src/components/features/features.js.map +1 -1
  172. package/dist/src/components/features-tab/features-tab.css.js +1 -100
  173. package/dist/src/components/features-tab/features-tab.css.js.map +1 -1
  174. package/dist/src/components/features-tab/features-tab.d.ts +5 -5
  175. package/dist/src/components/features-tab/features-tab.js +9 -70
  176. package/dist/src/components/features-tab/features-tab.js.map +1 -1
  177. package/dist/src/components/fieldset/fieldset.css.js +1 -28
  178. package/dist/src/components/fieldset/fieldset.css.js.map +1 -1
  179. package/dist/src/components/fieldset/fieldset.d.ts +2 -2
  180. package/dist/src/components/fieldset/fieldset.js +3 -31
  181. package/dist/src/components/fieldset/fieldset.js.map +1 -1
  182. package/dist/src/components/footer/footer-images.js +5 -27
  183. package/dist/src/components/footer/footer-images.js.map +1 -1
  184. package/dist/src/components/footer/footer-links-group.css.js +1 -33
  185. package/dist/src/components/footer/footer-links-group.css.js.map +1 -1
  186. package/dist/src/components/footer/footer-links-group.d.ts +3 -3
  187. package/dist/src/components/footer/footer-links-group.js +3 -32
  188. package/dist/src/components/footer/footer-links-group.js.map +1 -1
  189. package/dist/src/components/footer/footer-locale.js +1 -45
  190. package/dist/src/components/footer/footer-locale.js.map +1 -1
  191. package/dist/src/components/footer/footer-lp.d.ts +7 -7
  192. package/dist/src/components/footer/footer-lp.js +8 -121
  193. package/dist/src/components/footer/footer-lp.js.map +1 -1
  194. package/dist/src/components/footer/footer-nav-menu.css.js +1 -61
  195. package/dist/src/components/footer/footer-nav-menu.css.js.map +1 -1
  196. package/dist/src/components/footer/footer-nav-menu.d.ts +3 -3
  197. package/dist/src/components/footer/footer-nav-menu.js +3 -47
  198. package/dist/src/components/footer/footer-nav-menu.js.map +1 -1
  199. package/dist/src/components/footer/footer.css.js +1 -664
  200. package/dist/src/components/footer/footer.css.js.map +1 -1
  201. package/dist/src/components/footer/footer.d.ts +13 -13
  202. package/dist/src/components/footer/footer.js +20 -305
  203. package/dist/src/components/footer/footer.js.map +1 -1
  204. package/dist/src/components/footer/localeMap.js +1 -1
  205. package/dist/src/components/footer/localeMap.js.map +1 -1
  206. package/dist/src/components/grid/grid.css.js +1 -78
  207. package/dist/src/components/grid/grid.css.js.map +1 -1
  208. package/dist/src/components/grid/grid.d.ts +2 -2
  209. package/dist/src/components/grid/grid.js +9 -126
  210. package/dist/src/components/grid/grid.js.map +1 -1
  211. package/dist/src/components/header/header-code.css.js +1 -369
  212. package/dist/src/components/header/header-code.css.js.map +1 -1
  213. package/dist/src/components/header/header-code.d.ts +4 -4
  214. package/dist/src/components/header/header-code.js +15 -163
  215. package/dist/src/components/header/header-code.js.map +1 -1
  216. package/dist/src/components/header/header.css.js +1 -757
  217. package/dist/src/components/header/header.css.js.map +1 -1
  218. package/dist/src/components/header/header.d.ts +7 -7
  219. package/dist/src/components/header/header.js +4 -212
  220. package/dist/src/components/header/header.js.map +1 -1
  221. package/dist/src/components/heading/heading.css.js +1 -89
  222. package/dist/src/components/heading/heading.css.js.map +1 -1
  223. package/dist/src/components/heading/heading.d.ts +2 -2
  224. package/dist/src/components/heading/heading.js +1 -108
  225. package/dist/src/components/heading/heading.js.map +1 -1
  226. package/dist/src/components/help-text/help-text.css.js +1 -19
  227. package/dist/src/components/help-text/help-text.css.js.map +1 -1
  228. package/dist/src/components/help-text/help-text.d.ts +2 -2
  229. package/dist/src/components/help-text/help-text.js +3 -31
  230. package/dist/src/components/help-text/help-text.js.map +1 -1
  231. package/dist/src/components/hero/hero.css.js +1 -362
  232. package/dist/src/components/hero/hero.css.js.map +1 -1
  233. package/dist/src/components/hero/hero.d.ts +3 -3
  234. package/dist/src/components/hero/hero.js +12 -164
  235. package/dist/src/components/hero/hero.js.map +1 -1
  236. package/dist/src/components/highlight/highlight.css.js +1 -175
  237. package/dist/src/components/highlight/highlight.css.js.map +1 -1
  238. package/dist/src/components/highlight/highlight.d.ts +3 -3
  239. package/dist/src/components/highlight/highlight.js +4 -115
  240. package/dist/src/components/highlight/highlight.js.map +1 -1
  241. package/dist/src/components/icons/analysis-icon.d.ts +1 -1
  242. package/dist/src/components/icons/analysis-icon.js +2 -20
  243. package/dist/src/components/icons/analysis-icon.js.map +1 -1
  244. package/dist/src/components/icons/arrow-down-icon.d.ts +1 -1
  245. package/dist/src/components/icons/arrow-down-icon.js +2 -20
  246. package/dist/src/components/icons/arrow-down-icon.js.map +1 -1
  247. package/dist/src/components/icons/arrow-icon.d.ts +1 -1
  248. package/dist/src/components/icons/arrow-icon.js +2 -48
  249. package/dist/src/components/icons/arrow-icon.js.map +1 -1
  250. package/dist/src/components/icons/arrow-right-icon.d.ts +1 -1
  251. package/dist/src/components/icons/arrow-right-icon.js +2 -45
  252. package/dist/src/components/icons/arrow-right-icon.js.map +1 -1
  253. package/dist/src/components/icons/arrow-up-icon.d.ts +1 -1
  254. package/dist/src/components/icons/arrow-up-icon.js +2 -33
  255. package/dist/src/components/icons/arrow-up-icon.js.map +1 -1
  256. package/dist/src/components/icons/av-comparatives-icon.js +2 -31
  257. package/dist/src/components/icons/av-comparatives-icon.js.map +1 -1
  258. package/dist/src/components/icons/bd-ai-icon.js +2 -31
  259. package/dist/src/components/icons/bd-ai-icon.js.map +1 -1
  260. package/dist/src/components/icons/best-brands-icon.js +2 -31
  261. package/dist/src/components/icons/best-brands-icon.js.map +1 -1
  262. package/dist/src/components/icons/brand-signature-icon.d.ts +1 -1
  263. package/dist/src/components/icons/brand-signature-icon.js +2 -46
  264. package/dist/src/components/icons/brand-signature-icon.js.map +1 -1
  265. package/dist/src/components/icons/check-icon.d.ts +1 -1
  266. package/dist/src/components/icons/check-icon.js +2 -31
  267. package/dist/src/components/icons/check-icon.js.map +1 -1
  268. package/dist/src/components/icons/circle-info-icon.d.ts +1 -1
  269. package/dist/src/components/icons/circle-info-icon.js +2 -35
  270. package/dist/src/components/icons/circle-info-icon.js.map +1 -1
  271. package/dist/src/components/icons/close-icon.d.ts +1 -1
  272. package/dist/src/components/icons/close-icon.js +2 -20
  273. package/dist/src/components/icons/close-icon.js.map +1 -1
  274. package/dist/src/components/icons/enterprise-icon.d.ts +1 -1
  275. package/dist/src/components/icons/enterprise-icon.js +2 -22
  276. package/dist/src/components/icons/enterprise-icon.js.map +1 -1
  277. package/dist/src/components/icons/family-icon.d.ts +1 -1
  278. package/dist/src/components/icons/family-icon.js +2 -20
  279. package/dist/src/components/icons/family-icon.js.map +1 -1
  280. package/dist/src/components/icons/globe-icon.d.ts +1 -1
  281. package/dist/src/components/icons/globe-icon.js +2 -20
  282. package/dist/src/components/icons/globe-icon.js.map +1 -1
  283. package/dist/src/components/icons/guide-icon.d.ts +1 -1
  284. package/dist/src/components/icons/guide-icon.js +2 -20
  285. package/dist/src/components/icons/guide-icon.js.map +1 -1
  286. package/dist/src/components/icons/home-icon.d.ts +1 -1
  287. package/dist/src/components/icons/home-icon.js +2 -22
  288. package/dist/src/components/icons/home-icon.js.map +1 -1
  289. package/dist/src/components/icons/icon-element.js +1 -162
  290. package/dist/src/components/icons/icon-element.js.map +1 -1
  291. package/dist/src/components/icons/icons.d.ts +23 -23
  292. package/dist/src/components/icons/icons.js +1 -42
  293. package/dist/src/components/icons/individual-icon.d.ts +1 -1
  294. package/dist/src/components/icons/individual-icon.js +2 -20
  295. package/dist/src/components/icons/individual-icon.js.map +1 -1
  296. package/dist/src/components/icons/laurel-icon.d.ts +1 -1
  297. package/dist/src/components/icons/laurel-icon.js +2 -24
  298. package/dist/src/components/icons/laurel-icon.js.map +1 -1
  299. package/dist/src/components/icons/machine-learning-icon.d.ts +1 -1
  300. package/dist/src/components/icons/machine-learning-icon.js +2 -20
  301. package/dist/src/components/icons/machine-learning-icon.js.map +1 -1
  302. package/dist/src/components/icons/marks.d.ts +9 -9
  303. package/dist/src/components/icons/marks.js +1 -41
  304. package/dist/src/components/icons/minus-icon.d.ts +1 -1
  305. package/dist/src/components/icons/minus-icon.js +2 -19
  306. package/dist/src/components/icons/minus-icon.js.map +1 -1
  307. package/dist/src/components/icons/missing-icon.d.ts +1 -1
  308. package/dist/src/components/icons/missing-icon.js +3 -53
  309. package/dist/src/components/icons/missing-icon.js.map +1 -1
  310. package/dist/src/components/icons/pause-icon.d.ts +1 -1
  311. package/dist/src/components/icons/pause-icon.js +2 -22
  312. package/dist/src/components/icons/pause-icon.js.map +1 -1
  313. package/dist/src/components/icons/pc-mag-2024-icon.js +2 -31
  314. package/dist/src/components/icons/pc-mag-2024-icon.js.map +1 -1
  315. package/dist/src/components/icons/pc-mag-business-icon.js +2 -31
  316. package/dist/src/components/icons/pc-mag-business-icon.js.map +1 -1
  317. package/dist/src/components/icons/pc-mag-icon.js +2 -31
  318. package/dist/src/components/icons/pc-mag-icon.js.map +1 -1
  319. package/dist/src/components/icons/pc-mag-readers-icon.js +2 -30
  320. package/dist/src/components/icons/pc-mag-readers-icon.js.map +1 -1
  321. package/dist/src/components/icons/play-icon.d.ts +1 -1
  322. package/dist/src/components/icons/play-icon.js +2 -22
  323. package/dist/src/components/icons/play-icon.js.map +1 -1
  324. package/dist/src/components/icons/plus-icon.d.ts +1 -1
  325. package/dist/src/components/icons/plus-icon.js +2 -19
  326. package/dist/src/components/icons/plus-icon.js.map +1 -1
  327. package/dist/src/components/icons/quote-icon.d.ts +1 -1
  328. package/dist/src/components/icons/quote-icon.js +2 -30
  329. package/dist/src/components/icons/quote-icon.js.map +1 -1
  330. package/dist/src/components/icons/small-business-icon.d.ts +1 -1
  331. package/dist/src/components/icons/small-business-icon.js +2 -22
  332. package/dist/src/components/icons/small-business-icon.js.map +1 -1
  333. package/dist/src/components/icons/top-product-icon.js +2 -31
  334. package/dist/src/components/icons/top-product-icon.js.map +1 -1
  335. package/dist/src/components/image/image.css.js +1 -106
  336. package/dist/src/components/image/image.css.js.map +1 -1
  337. package/dist/src/components/image/image.d.ts +2 -2
  338. package/dist/src/components/image/image.js +10 -115
  339. package/dist/src/components/image/image.js.map +1 -1
  340. package/dist/src/components/input/input-clipboard.css.js +1 -93
  341. package/dist/src/components/input/input-clipboard.css.js.map +1 -1
  342. package/dist/src/components/input/input-clipboard.d.ts +5 -5
  343. package/dist/src/components/input/input-clipboard.js +20 -257
  344. package/dist/src/components/input/input-clipboard.js.map +1 -1
  345. package/dist/src/components/input/input.css.js +1 -9
  346. package/dist/src/components/input/input.css.js.map +1 -1
  347. package/dist/src/components/input/input.d.ts +4 -4
  348. package/dist/src/components/input/input.js +19 -202
  349. package/dist/src/components/input/input.js.map +1 -1
  350. package/dist/src/components/install-options/install-options.css.js +1 -308
  351. package/dist/src/components/install-options/install-options.css.js.map +1 -1
  352. package/dist/src/components/install-options/install-options.d.ts +4 -4
  353. package/dist/src/components/install-options/install-options.js +28 -159
  354. package/dist/src/components/install-options/install-options.js.map +1 -1
  355. package/dist/src/components/label/label.css.js +1 -33
  356. package/dist/src/components/label/label.css.js.map +1 -1
  357. package/dist/src/components/label/label.d.ts +3 -3
  358. package/dist/src/components/label/label.js +3 -135
  359. package/dist/src/components/label/label.js.map +1 -1
  360. package/dist/src/components/light-carousel/light-carousel.css.js +1 -270
  361. package/dist/src/components/light-carousel/light-carousel.css.js.map +1 -1
  362. package/dist/src/components/light-carousel/light-carousel.d.ts +3 -3
  363. package/dist/src/components/light-carousel/light-carousel.js +16 -181
  364. package/dist/src/components/light-carousel/light-carousel.js.map +1 -1
  365. package/dist/src/components/link/link.css.js +1 -288
  366. package/dist/src/components/link/link.css.js.map +1 -1
  367. package/dist/src/components/link/link.d.ts +3 -3
  368. package/dist/src/components/link/link.js +6 -233
  369. package/dist/src/components/link/link.js.map +1 -1
  370. package/dist/src/components/list/list-item/list-item.css.js +1 -167
  371. package/dist/src/components/list/list-item/list-item.css.js.map +1 -1
  372. package/dist/src/components/list/list-item/list-item.d.ts +3 -3
  373. package/dist/src/components/list/list-item/list-item.js +3 -122
  374. package/dist/src/components/list/list-item/list-item.js.map +1 -1
  375. package/dist/src/components/list/list.css.js +1 -180
  376. package/dist/src/components/list/list.css.js.map +1 -1
  377. package/dist/src/components/list/list.d.ts +1 -1
  378. package/dist/src/components/list/list.js +5 -82
  379. package/dist/src/components/list/list.js.map +1 -1
  380. package/dist/src/components/logo-marquee/logo-marquee.css.js +1 -93
  381. package/dist/src/components/logo-marquee/logo-marquee.css.js.map +1 -1
  382. package/dist/src/components/logo-marquee/logo-marquee.d.ts +3 -3
  383. package/dist/src/components/logo-marquee/logo-marquee.js +6 -147
  384. package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
  385. package/dist/src/components/modal/modal.css.js +1 -203
  386. package/dist/src/components/modal/modal.css.js.map +1 -1
  387. package/dist/src/components/modal/modal.d.ts +3 -3
  388. package/dist/src/components/modal/modal.js +3 -131
  389. package/dist/src/components/modal/modal.js.map +1 -1
  390. package/dist/src/components/motion-art/motion-art.d.ts +1 -1
  391. package/dist/src/components/motion-art/motion-art.js +1 -114
  392. package/dist/src/components/motion-art/motion-art.js.map +1 -1
  393. package/dist/src/components/overview/overview.css.js +1 -125
  394. package/dist/src/components/overview/overview.css.js.map +1 -1
  395. package/dist/src/components/overview/overview.d.ts +2 -2
  396. package/dist/src/components/overview/overview.js +9 -50
  397. package/dist/src/components/overview/overview.js.map +1 -1
  398. package/dist/src/components/page-switcher/page-switcher.css.js +1 -174
  399. package/dist/src/components/page-switcher/page-switcher.css.js.map +1 -1
  400. package/dist/src/components/page-switcher/page-switcher.d.ts +2 -2
  401. package/dist/src/components/page-switcher/page-switcher.js +6 -62
  402. package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
  403. package/dist/src/components/pagination-dots/pagination-dots.css.js +1 -160
  404. package/dist/src/components/pagination-dots/pagination-dots.css.js.map +1 -1
  405. package/dist/src/components/pagination-dots/pagination-dots.d.ts +2 -2
  406. package/dist/src/components/pagination-dots/pagination-dots.js +10 -210
  407. package/dist/src/components/pagination-dots/pagination-dots.js.map +1 -1
  408. package/dist/src/components/paragraph/paragraph.css.js +1 -101
  409. package/dist/src/components/paragraph/paragraph.css.js.map +1 -1
  410. package/dist/src/components/paragraph/paragraph.d.ts +2 -2
  411. package/dist/src/components/paragraph/paragraph.js +3 -119
  412. package/dist/src/components/paragraph/paragraph.js.map +1 -1
  413. package/dist/src/components/partner-banner/partner-banner.css.js +1 -245
  414. package/dist/src/components/partner-banner/partner-banner.css.js.map +1 -1
  415. package/dist/src/components/partner-banner/partner-banner.d.ts +1 -1
  416. package/dist/src/components/partner-banner/partner-banner.js +6 -81
  417. package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
  418. package/dist/src/components/picture/picture.css.js +1 -208
  419. package/dist/src/components/picture/picture.css.js.map +1 -1
  420. package/dist/src/components/picture/picture.d.ts +2 -2
  421. package/dist/src/components/picture/picture.js +14 -186
  422. package/dist/src/components/picture/picture.js.map +1 -1
  423. package/dist/src/components/post-card/post-card.css.js +1 -149
  424. package/dist/src/components/post-card/post-card.css.js.map +1 -1
  425. package/dist/src/components/post-card/post-card.d.ts +2 -2
  426. package/dist/src/components/post-card/post-card.js +5 -97
  427. package/dist/src/components/post-card/post-card.js.map +1 -1
  428. package/dist/src/components/pricing-cards/adopt-styles.js +1 -18
  429. package/dist/src/components/pricing-cards/adopt-styles.js.map +1 -1
  430. package/dist/src/components/pricing-cards/new-pricing-card.d.ts +2 -2
  431. package/dist/src/components/pricing-cards/new-pricing-card.js +4 -49
  432. package/dist/src/components/pricing-cards/new-pricing-card.js.map +1 -1
  433. package/dist/src/components/pricing-cards/new-pricing.css.js +1 -74
  434. package/dist/src/components/pricing-cards/new-pricing.css.js.map +1 -1
  435. package/dist/src/components/pricing-cards/pricing-card-actions.css.js +1 -11
  436. package/dist/src/components/pricing-cards/pricing-card-actions.css.js.map +1 -1
  437. package/dist/src/components/pricing-cards/pricing-card-actions.d.ts +2 -2
  438. package/dist/src/components/pricing-cards/pricing-card-actions.js +2 -59
  439. package/dist/src/components/pricing-cards/pricing-card-actions.js.map +1 -1
  440. package/dist/src/components/pricing-cards/pricing-card-container.css.js +1 -41
  441. package/dist/src/components/pricing-cards/pricing-card-container.css.js.map +1 -1
  442. package/dist/src/components/pricing-cards/pricing-card-container.d.ts +1 -1
  443. package/dist/src/components/pricing-cards/pricing-card-container.js +2 -40
  444. package/dist/src/components/pricing-cards/pricing-card-container.js.map +1 -1
  445. package/dist/src/components/pricing-cards/pricing-card-header.css.js +1 -82
  446. package/dist/src/components/pricing-cards/pricing-card-header.css.js.map +1 -1
  447. package/dist/src/components/pricing-cards/pricing-card-header.d.ts +5 -5
  448. package/dist/src/components/pricing-cards/pricing-card-header.js +7 -70
  449. package/dist/src/components/pricing-cards/pricing-card-header.js.map +1 -1
  450. package/dist/src/components/pricing-cards/pricing-card-pricing.css.js +1 -92
  451. package/dist/src/components/pricing-cards/pricing-card-pricing.css.js.map +1 -1
  452. package/dist/src/components/pricing-cards/pricing-card-pricing.d.ts +6 -6
  453. package/dist/src/components/pricing-cards/pricing-card-pricing.js +7 -87
  454. package/dist/src/components/pricing-cards/pricing-card-pricing.js.map +1 -1
  455. package/dist/src/components/pricing-cards/pricing-card-show-more.css.js +1 -29
  456. package/dist/src/components/pricing-cards/pricing-card-show-more.css.js.map +1 -1
  457. package/dist/src/components/pricing-cards/pricing-card-show-more.d.ts +4 -4
  458. package/dist/src/components/pricing-cards/pricing-card-show-more.js +5 -41
  459. package/dist/src/components/pricing-cards/pricing-card-show-more.js.map +1 -1
  460. package/dist/src/components/pricing-cards/pricing-card.css.js +1 -660
  461. package/dist/src/components/pricing-cards/pricing-card.css.js.map +1 -1
  462. package/dist/src/components/pricing-cards/pricing-card.d.ts +7 -7
  463. package/dist/src/components/pricing-cards/pricing-card.js +53 -639
  464. package/dist/src/components/pricing-cards/pricing-card.js.map +1 -1
  465. package/dist/src/components/pricing-cards/pricing-feature-item.css.js +1 -34
  466. package/dist/src/components/pricing-cards/pricing-feature-item.css.js.map +1 -1
  467. package/dist/src/components/pricing-cards/pricing-feature-item.d.ts +2 -2
  468. package/dist/src/components/pricing-cards/pricing-feature-item.js +2 -22
  469. package/dist/src/components/pricing-cards/pricing-feature-item.js.map +1 -1
  470. package/dist/src/components/process-steps/process-steps.css.js +1 -106
  471. package/dist/src/components/process-steps/process-steps.css.js.map +1 -1
  472. package/dist/src/components/process-steps/process-steps.d.ts +5 -5
  473. package/dist/src/components/process-steps/process-steps.js +10 -78
  474. package/dist/src/components/process-steps/process-steps.js.map +1 -1
  475. package/dist/src/components/progress/progress.css.js +1 -123
  476. package/dist/src/components/progress/progress.css.js.map +1 -1
  477. package/dist/src/components/progress/progress.d.ts +2 -2
  478. package/dist/src/components/progress/progress.js +6 -72
  479. package/dist/src/components/progress/progress.js.map +1 -1
  480. package/dist/src/components/quick-answer/quick-answer.css.js +1 -130
  481. package/dist/src/components/quick-answer/quick-answer.css.js.map +1 -1
  482. package/dist/src/components/quick-answer/quick-answer.d.ts +2 -2
  483. package/dist/src/components/quick-answer/quick-answer.js +9 -49
  484. package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
  485. package/dist/src/components/radio/radio-group.css.js +1 -41
  486. package/dist/src/components/radio/radio-group.css.js.map +1 -1
  487. package/dist/src/components/radio/radio-group.d.ts +1 -1
  488. package/dist/src/components/radio/radio-group.js +5 -92
  489. package/dist/src/components/radio/radio-group.js.map +1 -1
  490. package/dist/src/components/radio/radio.css.js +1 -193
  491. package/dist/src/components/radio/radio.css.js.map +1 -1
  492. package/dist/src/components/radio/radio.d.ts +4 -4
  493. package/dist/src/components/radio/radio.js +6 -263
  494. package/dist/src/components/radio/radio.js.map +1 -1
  495. package/dist/src/components/radio/toggle-radio.d.ts +2 -2
  496. package/dist/src/components/radio/toggle-radio.js +3 -39
  497. package/dist/src/components/radio/toggle-radio.js.map +1 -1
  498. package/dist/src/components/review/review-grid.css.js +1 -46
  499. package/dist/src/components/review/review-grid.css.js.map +1 -1
  500. package/dist/src/components/review/review-grid.d.ts +2 -2
  501. package/dist/src/components/review/review-grid.js +4 -49
  502. package/dist/src/components/review/review-grid.js.map +1 -1
  503. package/dist/src/components/review/review.css.js +1 -54
  504. package/dist/src/components/review/review.css.js.map +1 -1
  505. package/dist/src/components/review/review.d.ts +2 -2
  506. package/dist/src/components/review/review.js +2 -59
  507. package/dist/src/components/review/review.js.map +1 -1
  508. package/dist/src/components/section/section.css.js +1 -37
  509. package/dist/src/components/section/section.css.js.map +1 -1
  510. package/dist/src/components/section/section.d.ts +1 -1
  511. package/dist/src/components/section/section.js +1 -50
  512. package/dist/src/components/section/section.js.map +1 -1
  513. package/dist/src/components/section-header/section-header.css.js +1 -99
  514. package/dist/src/components/section-header/section-header.css.js.map +1 -1
  515. package/dist/src/components/section-header/section-header.d.ts +2 -2
  516. package/dist/src/components/section-header/section-header.js +4 -85
  517. package/dist/src/components/section-header/section-header.js.map +1 -1
  518. package/dist/src/components/shared/announcer.d.ts +1 -1
  519. package/dist/src/components/shared/announcer.js +1 -34
  520. package/dist/src/components/shared/announcer.js.map +1 -1
  521. package/dist/src/components/shared/controller.media-query.d.ts +1 -1
  522. package/dist/src/components/shared/controller.media-query.js +1 -57
  523. package/dist/src/components/shared/controller.media-query.js.map +1 -1
  524. package/dist/src/components/shared/define-element.js +1 -16
  525. package/dist/src/components/shared/define-element.js.map +1 -1
  526. package/dist/src/components/shared/ensemble.css.js +1 -101
  527. package/dist/src/components/shared/ensemble.css.js.map +1 -1
  528. package/dist/src/components/shared/events.js +0 -13
  529. package/dist/src/components/shared/fill-width.css.js +2 -27
  530. package/dist/src/components/shared/fill-width.css.js.map +1 -1
  531. package/dist/src/components/shared/form-control.d.ts +1 -1
  532. package/dist/src/components/shared/form-control.js +1 -198
  533. package/dist/src/components/shared/form-control.js.map +1 -1
  534. package/dist/src/components/shared/form-field.css.js +1 -258
  535. package/dist/src/components/shared/form-field.css.js.map +1 -1
  536. package/dist/src/components/shared/prop-vocabulary.js +1 -49
  537. package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
  538. package/dist/src/components/shared/token-scales.js +1 -351
  539. package/dist/src/components/shared/token-scales.js.map +1 -1
  540. package/dist/src/components/skeleton/skeleton.css.js +1 -32
  541. package/dist/src/components/skeleton/skeleton.css.js.map +1 -1
  542. package/dist/src/components/skeleton/skeleton.d.ts +2 -2
  543. package/dist/src/components/skeleton/skeleton.js +4 -36
  544. package/dist/src/components/skeleton/skeleton.js.map +1 -1
  545. package/dist/src/components/spinner/spinner.css.js +1 -87
  546. package/dist/src/components/spinner/spinner.css.js.map +1 -1
  547. package/dist/src/components/spinner/spinner.d.ts +3 -3
  548. package/dist/src/components/spinner/spinner.js +3 -69
  549. package/dist/src/components/spinner/spinner.js.map +1 -1
  550. package/dist/src/components/spotlight-section/spotlight-section.css.js +1 -105
  551. package/dist/src/components/spotlight-section/spotlight-section.css.js.map +1 -1
  552. package/dist/src/components/spotlight-section/spotlight-section.d.ts +2 -2
  553. package/dist/src/components/spotlight-section/spotlight-section.js +11 -72
  554. package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
  555. package/dist/src/components/stat/stat-highlight.js +6 -82
  556. package/dist/src/components/stat/stat-highlight.js.map +1 -1
  557. package/dist/src/components/stat/stat-tile.js +5 -52
  558. package/dist/src/components/stat/stat-tile.js.map +1 -1
  559. package/dist/src/components/stat/stat.css.js +1 -145
  560. package/dist/src/components/stat/stat.css.js.map +1 -1
  561. package/dist/src/components/stat/stat.d.ts +2 -2
  562. package/dist/src/components/stat/stat.js +1 -3
  563. package/dist/src/components/switch/switch.css.js +1 -175
  564. package/dist/src/components/switch/switch.css.js.map +1 -1
  565. package/dist/src/components/switch/switch.d.ts +4 -4
  566. package/dist/src/components/switch/switch.js +4 -99
  567. package/dist/src/components/switch/switch.js.map +1 -1
  568. package/dist/src/components/tab-list/tab-list.css.js +1 -289
  569. package/dist/src/components/tab-list/tab-list.css.js.map +1 -1
  570. package/dist/src/components/tab-list/tab-list.d.ts +1 -1
  571. package/dist/src/components/tab-list/tab-list.js +13 -191
  572. package/dist/src/components/tab-list/tab-list.js.map +1 -1
  573. package/dist/src/components/tabs/tabs.css.js +1 -77
  574. package/dist/src/components/tabs/tabs.css.js.map +1 -1
  575. package/dist/src/components/tabs/tabs.d.ts +6 -6
  576. package/dist/src/components/tabs/tabs.js +8 -220
  577. package/dist/src/components/tabs/tabs.js.map +1 -1
  578. package/dist/src/components/tag/tag.css.js +1 -52
  579. package/dist/src/components/tag/tag.css.js.map +1 -1
  580. package/dist/src/components/tag/tag.d.ts +2 -2
  581. package/dist/src/components/tag/tag.js +2 -37
  582. package/dist/src/components/tag/tag.js.map +1 -1
  583. package/dist/src/components/terminal/terminal-cursor.js +1 -65
  584. package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
  585. package/dist/src/components/terminal/terminal-message.css.js +1 -409
  586. package/dist/src/components/terminal/terminal-message.css.js.map +1 -1
  587. package/dist/src/components/terminal/terminal-message.d.ts +5 -5
  588. package/dist/src/components/terminal/terminal-message.js +28 -183
  589. package/dist/src/components/terminal/terminal-message.js.map +1 -1
  590. package/dist/src/components/termsOfUse/terms.css.js +1 -55
  591. package/dist/src/components/termsOfUse/terms.css.js.map +1 -1
  592. package/dist/src/components/termsOfUse/terms.d.ts +5 -5
  593. package/dist/src/components/termsOfUse/terms.js +9 -82
  594. package/dist/src/components/termsOfUse/terms.js.map +1 -1
  595. package/dist/src/components/textarea/textarea.css.js +1 -49
  596. package/dist/src/components/textarea/textarea.css.js.map +1 -1
  597. package/dist/src/components/textarea/textarea.d.ts +5 -5
  598. package/dist/src/components/textarea/textarea.js +15 -160
  599. package/dist/src/components/textarea/textarea.js.map +1 -1
  600. package/dist/src/components/tooltip/tooltip.css.js +1 -96
  601. package/dist/src/components/tooltip/tooltip.css.js.map +1 -1
  602. package/dist/src/components/tooltip/tooltip.d.ts +2 -2
  603. package/dist/src/components/tooltip/tooltip.js +5 -285
  604. package/dist/src/components/tooltip/tooltip.js.map +1 -1
  605. package/dist/src/components/trust-panel/trust-panel.css.js +1 -228
  606. package/dist/src/components/trust-panel/trust-panel.css.js.map +1 -1
  607. package/dist/src/components/trust-panel/trust-panel.d.ts +4 -4
  608. package/dist/src/components/trust-panel/trust-panel.js +25 -104
  609. package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
  610. package/dist/src/components/video/video.css.js +1 -20
  611. package/dist/src/components/video/video.css.js.map +1 -1
  612. package/dist/src/components/video/video.d.ts +2 -2
  613. package/dist/src/components/video/video.js +5 -88
  614. package/dist/src/components/video/video.js.map +1 -1
  615. package/dist/src/components/video-player/video-player.css.js +1 -167
  616. package/dist/src/components/video-player/video-player.css.js.map +1 -1
  617. package/dist/src/components/video-player/video-player.d.ts +2 -2
  618. package/dist/src/components/video-player/video-player.js +15 -150
  619. package/dist/src/components/video-player/video-player.js.map +1 -1
  620. package/dist/src/components/visually-hidden/visually-hidden.css.js +1 -22
  621. package/dist/src/components/visually-hidden/visually-hidden.css.js.map +1 -1
  622. package/dist/src/components/visually-hidden/visually-hidden.d.ts +2 -2
  623. package/dist/src/components/visually-hidden/visually-hidden.js +2 -22
  624. package/dist/src/components/visually-hidden/visually-hidden.js.map +1 -1
  625. package/dist/src/tokens/brand-layer.js +8 -162
  626. package/dist/src/tokens/brand-layer.js.map +1 -1
  627. package/dist/src/tokens/dark-derivation.js +1 -325
  628. package/dist/src/tokens/dark-derivation.js.map +1 -1
  629. package/dist/src/tokens/dark-findings.d.ts +1 -1
  630. package/dist/src/tokens/dark-findings.js +1 -204
  631. package/dist/src/tokens/dark-findings.js.map +1 -1
  632. package/dist/src/tokens/fonts.css +1 -166
  633. package/dist/src/tokens/layout.css +1 -61
  634. package/dist/src/tokens/story-chrome.js +27 -221
  635. package/dist/src/tokens/story-chrome.js.map +1 -1
  636. package/dist/src/tokens/themes/bitdefender.js +1 -30
  637. package/dist/src/tokens/themes/bitdefender.js.map +1 -1
  638. package/dist/src/tokens/themes/contract.js +1 -7
  639. package/dist/src/tokens/themes/contract.js.map +1 -1
  640. package/dist/src/tokens/themes/index.js +1 -39
  641. package/dist/src/tokens/themes/index.js.map +1 -1
  642. package/dist/src/tokens/token-map.js +1 -236
  643. package/dist/src/tokens/token-map.js.map +1 -1
  644. package/dist/src/tokens/token-purposes.js +1 -259
  645. package/dist/src/tokens/token-purposes.js.map +1 -1
  646. package/dist/src/tokens/tokens.css +1 -1809
  647. package/dist/src/tokens/tokens.js +1 -1865
  648. package/dist/src/tokens/tokens.js.map +1 -1
  649. package/dist/src/tokens/type-ceiling-words.js +1 -293
  650. package/dist/src/tokens/type-ceiling-words.js.map +1 -1
  651. package/package.json +14 -3
  652. package/schemas/component-manifest.json +1 -1
  653. package/dist/src/components/icons/icons.js.map +0 -1
  654. package/dist/src/components/icons/marks.js.map +0 -1
  655. package/dist/src/components/shared/events.js.map +0 -1
  656. package/dist/src/components/stat/stat.js.map +0 -1
@@ -1,546 +1,37 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { LitElement, html, nothing } from "lit";
8
- import { property, state } from "lit/decorators.js";
9
- import { defineElement } from "../shared/define-element.js";
10
- // Installs the design tokens into document scope; see src/tokens/tokens.ts
11
- import "../../tokens/tokens.js";
12
- import "../icons/arrow-down-icon.js";
13
- import "../button/button.js";
14
- import "../link/link.js";
15
- import { anchorNavStyles } from "./anchor-nav.css.js";
16
- import { ensembleCSS } from "../shared/ensemble.css.js";
17
- import { matchesBelow } from "../shared/token-scales.js";
18
- function parseLengthToPx(value) {
19
- const s = (value || "").trim();
20
- if (!s)
21
- return 0;
22
- if (s.endsWith("px"))
23
- return parseFloat(s);
24
- if (s.endsWith("rem")) {
25
- const root = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
26
- return parseFloat(s) * root;
27
- }
28
- return parseFloat(s) || 0;
29
- }
30
- const sectionIdOf = (href, n) => (href || "").replace(/^#/, "") || `anchor-${n}-section`;
31
- /* "The rest of the page" as a root margin: a hundred viewports. Each observer
32
- below watches one edge, and a jump only registers if it carries a section
33
- across that edge while still inside the root -- so the root reaches this far
34
- past the edge, beyond any jump a real page makes. */
35
- const FAR = "10000%";
36
- /* The dropdown panel is a popover only where it can also be anchored to its
37
- toggle: in the top layer it leaves the toggle's box, and without anchor
38
- positioning it would sit in the middle of the viewport. Both are newer than
39
- the Widely available target, so elsewhere the panel keeps its z-index and
40
- the document listeners close it. */
41
- const NATIVE_POPOVER = "popover" in HTMLElement.prototype && CSS.supports("anchor-name: --a");
42
- let BdAnchorNavItem = class BdAnchorNavItem extends HTMLElement {
43
- constructor() {
44
- super();
45
- this.attachShadow({ mode: "open" });
46
- }
47
- connectedCallback() { this.render(); }
48
- render() { this.shadowRoot.innerHTML = `<slot></slot>`; }
49
- };
50
- BdAnchorNavItem = __decorate([
51
- defineElement("bd-anchor-nav-item")
52
- ], BdAnchorNavItem);
53
- let BdAnchorNav = class BdAnchorNav extends LitElement {
54
- static { this.styles = [ensembleCSS, anchorNavStyles]; }
55
- constructor() {
56
- super();
57
- this.activeId = "";
58
- this.navLabel = "Section navigation";
59
- this._dropdownOpen = false;
60
- this._mobileCtaRevealed = false;
61
- this.ctaLabel = "Buy now";
62
- this.ctaHref = "";
63
- this.items = null;
64
- this.maxWidth = "";
65
- this.stickyTop = "0px";
66
- this._panelId = `bd-anchor-nav-panel-${Math.random().toString(36)
67
- .slice(2, 11)}`;
68
- this._onDocumentPointerDown = this._onDocumentPointerDown.bind(this);
69
- this._onKeydown = this._onKeydown.bind(this);
70
- this._onSectionsCrossLine = this._onSectionsCrossLine.bind(this);
71
- this._onFirstSectionCross = this._onFirstSectionCross.bind(this);
72
- this._scheduleSpy = this._scheduleSpy.bind(this);
73
- this._spyFrame = 0;
74
- this._spyObserver = null;
75
- this._ctaObserver = null;
76
- this._layoutObserver = null;
77
- this._sections = [];
78
- this._spyLine = 0;
79
- this._spyViewport = 0;
80
- this._passed = new Map();
81
- this._firstSectionBehind = false;
82
- this._programmaticScrollTargetId = null;
83
- this._unlockScrollSpyTimer = null;
84
- this._scrollEndUnlockHandler = null;
85
- this._onStickyScroll = null;
86
- this._restoreScrollBehavior = null;
87
- this._handleResize = this._handleResize.bind(this);
88
- this._indicatorReady = false;
89
- this._indicatorResizeObserver = null;
90
- }
91
- connectedCallback() {
92
- super.connectedCallback();
93
- window.addEventListener("resize", this._handleResize);
94
- if (!NATIVE_POPOVER) {
95
- document.addEventListener("pointerdown", this._onDocumentPointerDown, true);
96
- document.addEventListener("keydown", this._onKeydown, true);
97
- }
98
- this._initSticky();
99
- /* The bar's height moves the line the sections are read against, and the
100
- page growing may bring a section that was not there yet. */
101
- this._layoutObserver = new ResizeObserver(this._scheduleSpy);
102
- this._layoutObserver.observe(this);
103
- this._layoutObserver.observe(document.documentElement);
104
- }
105
- disconnectedCallback() {
106
- super.disconnectedCallback();
107
- this._cancelScrollSpyUnlock();
108
- this._restoreScrollBehavior?.();
109
- window.removeEventListener("resize", this._handleResize);
110
- document.removeEventListener("pointerdown", this._onDocumentPointerDown, true);
111
- document.removeEventListener("keydown", this._onKeydown, true);
112
- this._destroySticky();
113
- this._indicatorResizeObserver?.disconnect();
114
- this._unobserveSections();
115
- }
116
- /* The first item is active before the first render, not after it: state set
117
- in firstUpdated or updated starts a second render, the one Lit warns about
118
- as change-in-update. */
119
- willUpdate(changedProperties) {
120
- super.willUpdate(changedProperties);
121
- if (!this.hasUpdated && !this.activeId && this._resolvedItems().length)
122
- this.activeId = "anchor-1";
123
- }
124
- updated(changedProperties) {
125
- super.updated(changedProperties);
126
- if (changedProperties.has("stickyTop")) {
127
- this.style.setProperty("--sticky-top", this.stickyTop || "0px");
128
- }
129
- if (changedProperties.has("stickyTop") || changedProperties.has("items")) {
130
- this._scheduleSpy();
131
- }
132
- if (changedProperties.has("activeId") || changedProperties.has("items")) {
133
- requestAnimationFrame(() => this._updateIndicator("updated"));
134
- }
135
- if (!changedProperties.has("activeId"))
136
- return;
137
- const prev = changedProperties.get("activeId");
138
- if (prev === undefined || prev === "")
139
- return;
140
- if (prev === this.activeId)
141
- return;
142
- queueMicrotask(() => this._playMobileDropdownLabelSwap());
143
- }
144
- firstUpdated() {
145
- requestAnimationFrame(() => this._updateIndicator("firstUpdated"));
146
- const links = this.renderRoot?.querySelector(".anchor-links--desktop");
147
- if (links) {
148
- this._indicatorResizeObserver = new ResizeObserver(() => {
149
- this._updateIndicator("ResizeObserver");
150
- });
151
- this._indicatorResizeObserver.observe(links);
152
- this._indicatorResizeObserver.observe(this);
153
- }
154
- }
155
- /* The indicator spans the link row and is moved and sized on the
156
- compositor: translate to the current link's corner, scale to its width.
157
- It used to animate top and width, which laid the bar out again on every
158
- frame of the slide. The offsets are physical -- offsetLeft is -- so the
159
- indicator is anchored at the row's physical left, on a right-to-left
160
- page too. */
161
- _updateIndicator(_caller) {
162
- const indicator = this.renderRoot?.querySelector(".anchor-indicator");
163
- const activeLink = this.renderRoot?.querySelector(".anchor-links--desktop .anchor-link[current]");
164
- if (!indicator || !activeLink)
165
- return;
166
- const row = indicator.offsetWidth;
167
- const scale = row ? activeLink.offsetWidth / row : 0;
168
- // The bar's bottom edge is the inner's padding-bottom below the link.
169
- const inner = this.renderRoot.querySelector(".bd-anchor-nav__inner");
170
- const gap = inner ? parseFloat(getComputedStyle(inner).paddingBottom) || 0 : 0;
171
- const top = activeLink.offsetTop + activeLink.offsetHeight + gap;
172
- const place = () => {
173
- indicator.style.translate = `${activeLink.offsetLeft}px ${top}px`;
174
- indicator.style.scale = `${scale} 1`;
175
- };
176
- if (!this._indicatorReady) {
177
- indicator.style.transition = "none";
178
- place();
179
- void indicator.offsetWidth;
180
- indicator.style.transition = "";
181
- this._indicatorReady = true;
182
- return;
183
- }
184
- place();
185
- }
186
- _handleResize() {
187
- this._updateIndicator("windowResize");
188
- // The viewport's height places the spy's line inside its root.
189
- this._scheduleSpy();
190
- }
191
- /* The bar sticks with position: sticky, which keeps its own place in the
192
- flow and lets go at the end of its parent, so nothing here positions it.
193
- It used to: past its top it switched to position: fixed at the
194
- viewport's width, measured its parent to know when to let go, and left a
195
- placeholder behind to hold its space.
196
-
197
- While stuck it draws a shadow. A scroll-state container query says when
198
- that is, and it is newer than the Widely available target; where it is
199
- missing, this tells instead: the bar sits at its sticky top -- read as
200
- the browser resolved it, as _stickyOffsetPx() reads it, so calc(), em
201
- and custom properties count -- and the page has scrolled. A bar that
202
- merely rests at that line on an unscrolled page is not stuck, as the
203
- query would not call it. */
204
- _initSticky() {
205
- this.style.setProperty("--sticky-top", this.stickyTop || "0px");
206
- if (CSS.supports("container-type: scroll-state"))
207
- return;
208
- this._onStickyScroll = () => {
209
- const top = parseFloat(getComputedStyle(this).top) || 0;
210
- const atTop = Math.abs(this.getBoundingClientRect().top - top) < 1;
211
- this.classList.toggle("is-sticky", atTop && window.scrollY > 0);
212
- };
213
- window.addEventListener("scroll", this._onStickyScroll, { passive: true });
214
- window.addEventListener("resize", this._onStickyScroll, { passive: true });
215
- /* Removed within a frame of connecting, the bar has torn this down. */
216
- requestAnimationFrame(() => this._onStickyScroll?.());
217
- }
218
- _destroySticky() {
219
- if (this._onStickyScroll) {
220
- window.removeEventListener("scroll", this._onStickyScroll);
221
- window.removeEventListener("resize", this._onStickyScroll);
222
- this._onStickyScroll = null;
223
- }
224
- this.classList.remove("is-sticky");
225
- }
226
- _cancelScrollSpyUnlock() {
227
- if (this._unlockScrollSpyTimer != null) {
228
- clearTimeout(this._unlockScrollSpyTimer);
229
- this._unlockScrollSpyTimer = null;
230
- }
231
- if (this._scrollEndUnlockHandler) {
232
- window.removeEventListener("scrollend", this._scrollEndUnlockHandler);
233
- this._scrollEndUnlockHandler = null;
234
- }
235
- }
236
- /* The click's item stays active until the scroll is over. scrollend says so
237
- where the browser has it. The timer is for a click that scrolls nothing,
238
- which no scrollend follows, and for browsers without the event: it ends
239
- the lock once the page has stopped moving. It used to end it after a
240
- fixed second, and a long smooth scroll outlasts that -- measured 1.3s
241
- from the first section to the third on the playground at 1280, with the
242
- second item lit for the last 250ms of it. */
243
- _scheduleScrollSpyUnlock() {
244
- this._cancelScrollSpyUnlock();
245
- const unlock = () => {
246
- this._cancelScrollSpyUnlock();
247
- this._restoreScrollBehavior?.();
248
- this._programmaticScrollTargetId = null;
249
- this._runScrollSpy();
250
- };
251
- this._scrollEndUnlockHandler = unlock;
252
- window.addEventListener("scrollend", unlock, { passive: true });
253
- let lastY = window.scrollY;
254
- const unlockOnceStill = () => {
255
- if (window.scrollY === lastY)
256
- return unlock();
257
- lastY = window.scrollY;
258
- this._unlockScrollSpyTimer = window.setTimeout(unlockOnceStill, 250);
259
- };
260
- this._unlockScrollSpyTimer = window.setTimeout(unlockOnceStill, 250);
261
- }
262
- _onKeydown(e) {
263
- if (e.key === "Escape" && this._dropdownOpen) {
264
- this._dropdownOpen = false;
265
- this.requestUpdate();
266
- this.updateComplete.then(() => this.renderRoot?.querySelector(".bd-anchor-nav__dropdown-toggle")?.focus());
267
- }
268
- }
269
- _onDocumentPointerDown(e) {
270
- if (!this._dropdownOpen)
271
- return;
272
- const path = e.composedPath();
273
- if (path.includes(this))
274
- return;
275
- this._dropdownOpen = false;
276
- this.requestUpdate();
277
- }
278
- _scheduleSpy() {
279
- if (this._spyFrame)
280
- return;
281
- this._spyFrame = requestAnimationFrame(() => {
282
- this._spyFrame = 0;
283
- this._observeSections();
284
- });
285
- }
286
- /* Scroll-spy, without reading the page on every scroll. The active item is
287
- the last section whose top has reached a line just under the stuck bar,
288
- and two IntersectionObservers say when an edge crosses:
289
-
290
- - the spy's root ends at that line and reaches FAR above it, so a section
291
- is inside it exactly while its top is past the line;
292
- - the CTA's root starts at the top of the viewport and reaches FAR below,
293
- so the first section leaves it exactly when its bottom scrolls off.
294
-
295
- Each entry carries the target's box, so the callbacks read nothing. The
296
- line depends on the bar's height, the sticky top and the viewport, and a
297
- root margin cannot change, so the observers are rebuilt when one moves. */
298
- _observeSections() {
299
- const sections = this._resolvedItems()
300
- .map(({ href }, i) => document.getElementById(sectionIdOf(href, i + 1)));
301
- const offset = this._stickyOffsetPx();
302
- // 2px under where a click leaves the section, so a section the bar has just
303
- // scrolled to counts as reached.
304
- const line = offset + 2;
305
- const viewport = document.documentElement.clientHeight;
306
- if (line === this._spyLine && viewport === this._spyViewport &&
307
- sections.length === this._sections.length &&
308
- sections.every((el, i) => el === this._sections[i]))
309
- return;
310
- /* A section a click scrolls to stops under the bar, not behind it, and so
311
- does one the URL's hash or the back button brings into view. */
312
- for (const el of this._sections) {
313
- if (el && !sections.includes(el))
314
- el.style.removeProperty("scroll-margin-top");
315
- }
316
- for (const el of sections)
317
- el?.style.setProperty("scroll-margin-top", `${offset}px`);
318
- this._spyObserver?.disconnect();
319
- this._ctaObserver?.disconnect();
320
- this._spyObserver = this._ctaObserver = null;
321
- if (sections[0] !== this._sections[0])
322
- this._firstSectionBehind = false;
323
- this._passed = new Map(sections.filter((el) => this._passed.has(el))
324
- .map((el) => [el, this._passed.get(el)]));
325
- this._sections = sections;
326
- this._spyLine = line;
327
- this._spyViewport = viewport;
328
- const found = sections.filter(Boolean);
329
- if (found.length) {
330
- this._spyObserver = new IntersectionObserver(this._onSectionsCrossLine, {
331
- root: document,
332
- rootMargin: `${FAR} 0px ${line - viewport}px 0px`
333
- });
334
- found.forEach((el) => this._spyObserver.observe(el));
335
- }
336
- if (sections[0]) {
337
- this._ctaObserver = new IntersectionObserver(this._onFirstSectionCross, {
338
- root: document,
339
- rootMargin: `0px 0px ${FAR} 0px`
340
- });
341
- this._ctaObserver.observe(sections[0]);
342
- }
343
- this._runScrollSpy();
344
- }
345
- _unobserveSections() {
346
- cancelAnimationFrame(this._spyFrame);
347
- this._spyFrame = 0;
348
- this._layoutObserver?.disconnect();
349
- this._spyObserver?.disconnect();
350
- this._ctaObserver?.disconnect();
351
- this._layoutObserver = this._spyObserver = this._ctaObserver = null;
352
- for (const el of this._sections)
353
- el?.style.removeProperty("scroll-margin-top");
354
- this._sections = [];
355
- this._passed = new Map();
356
- }
357
- _onSectionsCrossLine(entries) {
358
- for (const { target, boundingClientRect, rootBounds } of entries) {
359
- this._passed.set(target, boundingClientRect.top <= rootBounds.bottom);
360
- }
361
- this._runScrollSpy();
362
- }
363
- _onFirstSectionCross(entries) {
364
- const { boundingClientRect, rootBounds } = entries[entries.length - 1];
365
- this._firstSectionBehind = boundingClientRect.bottom <= rootBounds.top;
366
- this._runScrollSpy();
367
- }
368
- _resolvedItems() {
369
- if (this.items && this.items.length) {
370
- return this.items.map((item, i) => ({
371
- title: item.title,
372
- href: item.href || `#anchor-${i + 1}-section`,
373
- id: `anchor-${i + 1}`
374
- }));
375
- }
376
- return Array.from(this.children)
377
- .filter((el) => el.tagName === "BD-ANCHOR-NAV-ITEM")
378
- .map((el, i) => ({
379
- title: el.getAttribute("title"),
380
- href: el.getAttribute("href") || `#anchor-${i + 1}-section`,
381
- id: `anchor-${i + 1}`
382
- }));
383
- }
384
- /* Read off what the observers last reported; while a click's scroll runs,
385
- the item it chose stays active. The CTA flag is set at every width, since
386
- only the stylesheet below md hides the CTA until the first section is
387
- behind the reader. */
388
- _runScrollSpy() {
389
- let next = this.activeId;
390
- if (this._sections.length && !this._programmaticScrollTargetId) {
391
- next = "anchor-1";
392
- this._sections.forEach((el, i) => {
393
- if (el && this._passed.get(el))
394
- next = `anchor-${i + 1}`;
395
- });
396
- }
397
- this.activeId = next;
398
- this._mobileCtaRevealed = !this._sections[0] || this._firstSectionBehind;
399
- }
400
- _playMobileDropdownLabelSwap() {
401
- if (typeof window === "undefined")
402
- return;
403
- if (window.matchMedia("(prefers-reduced-motion: reduce)").matches)
404
- return;
405
- if (!matchesBelow('md'))
406
- return;
407
- const el = this.renderRoot?.querySelector(".bd-anchor-nav__dropdown-label");
408
- if (!el)
409
- return;
410
- el.classList.remove("bd-anchor-nav__dropdown-label--swap");
411
- void el.offsetWidth;
412
- el.classList.add("bd-anchor-nav__dropdown-label--swap");
413
- el.addEventListener("animationend", () => el.classList.remove("bd-anchor-nav__dropdown-label--swap"), { once: true });
414
- }
415
- /* Where a section stops under the bar: the sticky top, the bar, and a gap.
416
- The sticky top is read as the browser resolved it, so any length
417
- sticky-top accepts -- rem, calc(), a custom property -- counts. */
418
- _stickyOffsetPx() {
419
- const barPx = this.offsetHeight;
420
- const stickyTopPx = parseFloat(getComputedStyle(this).top) || 0;
421
- const insetRaw = getComputedStyle(this).getPropertyValue("--spacing-8")
422
- .trim();
423
- const insetPx = parseLengthToPx(insetRaw) || 8;
424
- if (barPx > 0)
425
- return barPx + insetPx + stickyTopPx;
426
- const fallback = getComputedStyle(this).getPropertyValue("--spacing-128")
427
- .trim();
428
- return parseLengthToPx(fallback) || 128;
429
- }
430
- /* A section link is an ordinary fragment link, and the browser follows it:
431
- the hash goes into the URL as a history entry, :target moves to the
432
- section, and the next Tab starts from there. This used to stop the
433
- click and scroll by hand -- pushState and scrollIntoView -- which kept
434
- the URL but left :target and the Tab position behind, so a keyboard
435
- reader who chose "Pricing" tabbed on through the nav. The section's own
436
- scroll-margin-top keeps it clear of the bar.
437
-
438
- The click's item stays current until the scroll is over, so the spy
439
- does not light the sections it passes on the way. A click with a
440
- modifier, or on an item whose section is not on this page, is left to
441
- the browser as an ordinary link. */
442
- handleClick(event, id, href) {
443
- if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
444
- return;
445
- this._cancelScrollSpyUnlock();
446
- this._programmaticScrollTargetId = null;
447
- this.activeId = id;
448
- const sectionId = sectionIdOf(href, id.replace(/^anchor-/, ""));
449
- if (!document.getElementById(sectionId))
450
- return;
451
- this._programmaticScrollTargetId = id;
452
- this._smoothFragmentScroll();
453
- this._scheduleScrollSpyUnlock();
454
- }
455
- /* Fragment navigation scrolls with the root's scroll-behavior, and the
456
- page's <html> is not this component's to style. So for a reader who has
457
- not asked for less motion, the click sets it to smooth for the length of
458
- this one scroll -- before the navigation runs, which is after the click
459
- listeners -- and gives back whatever the page had when the scroll ends. */
460
- _smoothFragmentScroll() {
461
- if (this._restoreScrollBehavior)
462
- return;
463
- if (!window.matchMedia("(prefers-reduced-motion: no-preference)").matches)
464
- return;
465
- const root = document.documentElement;
466
- const before = root.style.scrollBehavior;
467
- root.style.scrollBehavior = "smooth";
468
- this._restoreScrollBehavior = () => {
469
- root.style.scrollBehavior = before;
470
- this._restoreScrollBehavior = null;
471
- };
472
- }
473
- /* With a native popover, popovertarget opens and closes the panel and the
474
- toggle event reports it; this handler is the fallback's. */
475
- _toggleDropdown(e) {
476
- if (NATIVE_POPOVER)
477
- return;
478
- e.preventDefault();
479
- e.stopPropagation();
480
- this._dropdownOpen = !this._dropdownOpen;
481
- }
482
- _onPanelToggle(e) {
483
- this._dropdownOpen = e.newState === "open";
484
- }
485
- _selectFromDropdown(e, id, href) {
486
- if (NATIVE_POPOVER) {
487
- const panel = this.renderRoot.querySelector(".bd-anchor-nav__dropdown-panel");
488
- if (panel?.matches(":popover-open"))
489
- panel.hidePopover();
490
- }
491
- else {
492
- this._dropdownOpen = false;
493
- }
494
- this.handleClick(e, id, href);
495
- }
496
- _activeLabel(resolved) {
497
- const m = /^anchor-(\d+)$/.exec(this.activeId || "");
498
- const n = m ? parseInt(m[1], 10) : 1;
499
- const idx = Math.min(Math.max(n - 1, 0), Math.max(0, resolved.length - 1));
500
- return resolved[idx]?.title || resolved[0]?.title || "Section";
501
- }
502
- render() {
503
- const resolved = this._resolvedItems();
504
- const dropdownLabel = this._activeLabel(resolved);
505
- const linkRow = (cls) => html `
506
- <div class="${cls}">
507
- ${resolved.map(({ id, title, href }) => {
508
- const isActive = this.activeId === id;
509
- return html `
1
+ import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import{matchesBelow as t}from"../shared/token-scales.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import"../icons/arrow-down-icon.js";import"../button/button.js";import{anchorNavStyles as i}from"./anchor-nav.css.js";import"../link/link.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c,state as l}from"lit/decorators.js";function u(e){let t=(e||``).trim();if(!t)return 0;if(t.endsWith(`px`))return parseFloat(t);if(t.endsWith(`rem`)){let e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return parseFloat(t)*e}return parseFloat(t)||0}var d=(e,t)=>(e||``).replace(/^#/,``)||`anchor-${t}-section`,f=`10000%`,p=`popover`in HTMLElement.prototype&&CSS.supports(`anchor-name: --a`),m=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`})}connectedCallback(){this.render()}render(){this.shadowRoot.innerHTML=`<slot></slot>`}};m=n([e(`bd-anchor-nav-item`)],m);var h=class extends a{static{this.styles=[r,i]}constructor(){super(),this.activeId=``,this.navLabel=`Section navigation`,this._dropdownOpen=!1,this._mobileCtaRevealed=!1,this.ctaLabel=`Buy now`,this.ctaHref=``,this.items=null,this.maxWidth=``,this.stickyTop=`0px`,this._panelId=`bd-anchor-nav-panel-${Math.random().toString(36).slice(2,11)}`,this._onDocumentPointerDown=this._onDocumentPointerDown.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onSectionsCrossLine=this._onSectionsCrossLine.bind(this),this._onFirstSectionCross=this._onFirstSectionCross.bind(this),this._scheduleSpy=this._scheduleSpy.bind(this),this._spyFrame=0,this._spyObserver=null,this._ctaObserver=null,this._layoutObserver=null,this._sections=[],this._spyLine=0,this._spyViewport=0,this._passed=/* @__PURE__ */ new Map,this._firstSectionBehind=!1,this._programmaticScrollTargetId=null,this._unlockScrollSpyTimer=null,this._scrollEndUnlockHandler=null,this._onStickyScroll=null,this._restoreScrollBehavior=null,this._handleResize=this._handleResize.bind(this),this._indicatorReady=!1,this._indicatorResizeObserver=null}connectedCallback(){super.connectedCallback(),window.addEventListener(`resize`,this._handleResize),p||(document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.addEventListener(`keydown`,this._onKeydown,!0)),this._initSticky(),this._layoutObserver=new ResizeObserver(this._scheduleSpy),this._layoutObserver.observe(this),this._layoutObserver.observe(document.documentElement)}disconnectedCallback(){super.disconnectedCallback(),this._cancelScrollSpyUnlock(),this._restoreScrollBehavior?.(),window.removeEventListener(`resize`,this._handleResize),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.removeEventListener(`keydown`,this._onKeydown,!0),this._destroySticky(),this._indicatorResizeObserver?.disconnect(),this._unobserveSections()}willUpdate(e){super.willUpdate(e),!this.hasUpdated&&!this.activeId&&this._resolvedItems().length&&(this.activeId=`anchor-1`)}updated(e){if(super.updated(e),e.has(`stickyTop`)&&this.style.setProperty(`--sticky-top`,this.stickyTop||`0px`),(e.has(`stickyTop`)||e.has(`items`))&&this._scheduleSpy(),(e.has(`activeId`)||e.has(`items`))&&requestAnimationFrame(()=>this._updateIndicator(`updated`)),!e.has(`activeId`))return;let t=e.get(`activeId`);t!==void 0&&t!==``&&t!==this.activeId&&queueMicrotask(()=>this._playMobileDropdownLabelSwap())}firstUpdated(){requestAnimationFrame(()=>this._updateIndicator(`firstUpdated`));let e=this.renderRoot?.querySelector(`.anchor-links--desktop`);e&&(this._indicatorResizeObserver=new ResizeObserver(()=>{this._updateIndicator(`ResizeObserver`)}),this._indicatorResizeObserver.observe(e),this._indicatorResizeObserver.observe(this))}_updateIndicator(e){let t=this.renderRoot?.querySelector(`.anchor-indicator`),n=this.renderRoot?.querySelector(`.anchor-links--desktop .anchor-link[current]`);if(!t||!n)return;let r=t.offsetWidth,i=r?n.offsetWidth/r:0,a=this.renderRoot.querySelector(`.bd-anchor-nav__inner`),o=a&&parseFloat(getComputedStyle(a).paddingBottom)||0,s=n.offsetTop+n.offsetHeight+o,c=()=>{t.style.translate=`${n.offsetLeft}px ${s}px`,t.style.scale=`${i} 1`};this._indicatorReady?c():(t.style.transition=`none`,c(),t.offsetWidth,t.style.transition=``,this._indicatorReady=!0)}_handleResize(){this._updateIndicator(`windowResize`),this._scheduleSpy()}_initSticky(){this.style.setProperty(`--sticky-top`,this.stickyTop||`0px`),!CSS.supports(`container-type: scroll-state`)&&(this._onStickyScroll=()=>{let e=parseFloat(getComputedStyle(this).top)||0,t=Math.abs(this.getBoundingClientRect().top-e)<1;this.classList.toggle(`is-sticky`,t&&window.scrollY>0)},window.addEventListener(`scroll`,this._onStickyScroll,{passive:!0}),window.addEventListener(`resize`,this._onStickyScroll,{passive:!0}),requestAnimationFrame(()=>this._onStickyScroll?.()))}_destroySticky(){this._onStickyScroll&&=(window.removeEventListener(`scroll`,this._onStickyScroll),window.removeEventListener(`resize`,this._onStickyScroll),null),this.classList.remove(`is-sticky`)}_cancelScrollSpyUnlock(){this._unlockScrollSpyTimer!=null&&(clearTimeout(this._unlockScrollSpyTimer),this._unlockScrollSpyTimer=null),this._scrollEndUnlockHandler&&=(window.removeEventListener(`scrollend`,this._scrollEndUnlockHandler),null)}_scheduleScrollSpyUnlock(){this._cancelScrollSpyUnlock();let e=()=>{this._cancelScrollSpyUnlock(),this._restoreScrollBehavior?.(),this._programmaticScrollTargetId=null,this._runScrollSpy()};this._scrollEndUnlockHandler=e,window.addEventListener(`scrollend`,e,{passive:!0});let t=window.scrollY,n=()=>{if(window.scrollY===t)return e();t=window.scrollY,this._unlockScrollSpyTimer=window.setTimeout(n,250)};this._unlockScrollSpyTimer=window.setTimeout(n,250)}_onKeydown(e){e.key===`Escape`&&this._dropdownOpen&&(this._dropdownOpen=!1,this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot?.querySelector(`.bd-anchor-nav__dropdown-toggle`)?.focus()))}_onDocumentPointerDown(e){this._dropdownOpen&&(e.composedPath().includes(this)||(this._dropdownOpen=!1,this.requestUpdate()))}_scheduleSpy(){this._spyFrame||=requestAnimationFrame(()=>{this._spyFrame=0,this._observeSections()})}_observeSections(){let e=this._resolvedItems().map(({href:e},t)=>document.getElementById(d(e,t+1))),t=this._stickyOffsetPx(),n=t+2,r=document.documentElement.clientHeight;if(n===this._spyLine&&r===this._spyViewport&&e.length===this._sections.length&&e.every((e,t)=>e===this._sections[t]))return;for(let t of this._sections)t&&!e.includes(t)&&t.style.removeProperty(`scroll-margin-top`);for(let n of e)n?.style.setProperty(`scroll-margin-top`,`${t}px`);this._spyObserver?.disconnect(),this._ctaObserver?.disconnect(),this._spyObserver=this._ctaObserver=null,e[0]!==this._sections[0]&&(this._firstSectionBehind=!1),this._passed=new Map(e.filter(e=>this._passed.has(e)).map(e=>[e,this._passed.get(e)])),this._sections=e,this._spyLine=n,this._spyViewport=r;let i=e.filter(Boolean);i.length&&(this._spyObserver=new IntersectionObserver(this._onSectionsCrossLine,{root:document,rootMargin:`${f} 0px ${n-r}px 0px`}),i.forEach(e=>this._spyObserver.observe(e))),e[0]&&(this._ctaObserver=new IntersectionObserver(this._onFirstSectionCross,{root:document,rootMargin:`0px 0px ${f} 0px`}),this._ctaObserver.observe(e[0])),this._runScrollSpy()}_unobserveSections(){cancelAnimationFrame(this._spyFrame),this._spyFrame=0,this._layoutObserver?.disconnect(),this._spyObserver?.disconnect(),this._ctaObserver?.disconnect(),this._layoutObserver=this._spyObserver=this._ctaObserver=null;for(let e of this._sections)e?.style.removeProperty(`scroll-margin-top`);this._sections=[],this._passed=/* @__PURE__ */ new Map}_onSectionsCrossLine(e){for(let{target:t,boundingClientRect:n,rootBounds:r}of e)this._passed.set(t,n.top<=r.bottom);this._runScrollSpy()}_onFirstSectionCross(e){let{boundingClientRect:t,rootBounds:n}=e[e.length-1];this._firstSectionBehind=t.bottom<=n.top,this._runScrollSpy()}_resolvedItems(){return this.items&&this.items.length?this.items.map((e,t)=>({title:e.title,href:e.href||`#anchor-${t+1}-section`,id:`anchor-${t+1}`})):Array.from(this.children).filter(e=>e.tagName===`BD-ANCHOR-NAV-ITEM`).map((e,t)=>({title:e.getAttribute(`title`),href:e.getAttribute(`href`)||`#anchor-${t+1}-section`,id:`anchor-${t+1}`}))}_runScrollSpy(){let e=this.activeId;this._sections.length&&!this._programmaticScrollTargetId&&(e=`anchor-1`,this._sections.forEach((t,n)=>{t&&this._passed.get(t)&&(e=`anchor-${n+1}`)})),this.activeId=e,this._mobileCtaRevealed=!this._sections[0]||this._firstSectionBehind}_playMobileDropdownLabelSwap(){if(typeof window>`u`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||!t(`md`))return;let e=this.renderRoot?.querySelector(`.bd-anchor-nav__dropdown-label`);e&&(e.classList.remove(`bd-anchor-nav__dropdown-label--swap`),e.offsetWidth,e.classList.add(`bd-anchor-nav__dropdown-label--swap`),e.addEventListener(`animationend`,()=>e.classList.remove(`bd-anchor-nav__dropdown-label--swap`),{once:!0}))}_stickyOffsetPx(){let e=this.offsetHeight,t=parseFloat(getComputedStyle(this).top)||0,n=u(getComputedStyle(this).getPropertyValue(`--spacing-8`).trim())||8;return e>0?e+n+t:u(getComputedStyle(this).getPropertyValue(`--spacing-128`).trim())||128}handleClick(e,t,n){if(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;this._cancelScrollSpyUnlock(),this._programmaticScrollTargetId=null,this.activeId=t;let r=d(n,t.replace(/^anchor-/,``));document.getElementById(r)&&(this._programmaticScrollTargetId=t,this._smoothFragmentScroll(),this._scheduleScrollSpyUnlock())}_smoothFragmentScroll(){if(this._restoreScrollBehavior||!window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches)return;let e=document.documentElement,t=e.style.scrollBehavior;e.style.scrollBehavior=`smooth`,this._restoreScrollBehavior=()=>{e.style.scrollBehavior=t,this._restoreScrollBehavior=null}}_toggleDropdown(e){p||(e.preventDefault(),e.stopPropagation(),this._dropdownOpen=!this._dropdownOpen)}_onPanelToggle(e){this._dropdownOpen=e.newState===`open`}_selectFromDropdown(e,t,n){if(p){let e=this.renderRoot.querySelector(`.bd-anchor-nav__dropdown-panel`);e?.matches(`:popover-open`)&&e.hidePopover()}else this._dropdownOpen=!1;this.handleClick(e,t,n)}_activeLabel(e){let t=/^anchor-(\d+)$/.exec(this.activeId||``),n=t?parseInt(t[1],10):1;return e[Math.min(Math.max(n-1,0),Math.max(0,e.length-1))]?.title||e[0]?.title||`Section`}render(){let e=this._resolvedItems(),t=this._activeLabel(e),n=t=>o`
2
+ <div class="${t}">
3
+ ${e.map(({id:e,title:t,href:n})=>{let r=this.activeId===e;return o`
510
4
  <bd-link
511
- href="${href}"
5
+ href="${n}"
512
6
  variant="primary"
513
7
  no-underline
514
8
  class="anchor-link"
515
- current=${isActive ? "location" : nothing}
516
- @click=${(e) => this.handleClick(e, id, href)}
517
- >${title}</bd-link>
518
- `;
519
- })}
9
+ current=${r?`location`:s}
10
+ @click=${t=>this.handleClick(t,e,n)}
11
+ >${t}</bd-link>
12
+ `})}
520
13
  <span class="anchor-indicator" aria-hidden="true"></span>
521
14
  </div>
522
- `;
523
- const innerStyle = this.maxWidth ? `max-width: ${this.maxWidth};` : '';
524
- return html `
15
+ `,r=this.maxWidth?`max-width: ${this.maxWidth};`:``;return o`
525
16
  <nav aria-label=${this.navLabel}>
526
17
  <div
527
18
  class="bd-ensemble bd-anchor-nav__inner"
528
19
  part="inner"
529
- style="${innerStyle}"
20
+ style="${r}"
530
21
  ?data-mobile-cta-visible=${this._mobileCtaRevealed}
531
22
  >
532
- ${linkRow("anchor-links anchor-links--desktop")}
23
+ ${n(`anchor-links anchor-links--desktop`)}
533
24
 
534
25
  <div class="bd-anchor-nav__dropdown" part="dropdown">
535
26
  <button
536
27
  type="button"
537
28
  class="bd-anchor-nav__dropdown-toggle"
538
- aria-expanded=${this._dropdownOpen ? "true" : "false"}
29
+ aria-expanded=${this._dropdownOpen?`true`:`false`}
539
30
  aria-controls=${this._panelId}
540
- popovertarget=${NATIVE_POPOVER ? this._panelId : nothing}
31
+ popovertarget=${p?this._panelId:s}
541
32
  @click=${this._toggleDropdown}
542
33
  >
543
- <span class="bd-anchor-nav__dropdown-label">${dropdownLabel}</span>
34
+ <span class="bd-anchor-nav__dropdown-label">${t}</span>
544
35
  <span class="bd-anchor-nav__dropdown-chevron" aria-hidden="true">
545
36
  <bd-arrow-down-icon size="md"></bd-arrow-down-icon>
546
37
  </span>
@@ -548,24 +39,21 @@ let BdAnchorNav = class BdAnchorNav extends LitElement {
548
39
  <div
549
40
  class="bd-anchor-nav__dropdown-panel"
550
41
  id=${this._panelId}
551
- popover=${NATIVE_POPOVER ? "auto" : nothing}
552
- ?hidden=${!NATIVE_POPOVER && !this._dropdownOpen}
42
+ popover=${p?`auto`:s}
43
+ ?hidden=${!p&&!this._dropdownOpen}
553
44
  @toggle=${this._onPanelToggle}
554
45
  >
555
46
  <ul class="bd-anchor-nav__dropdown-list">
556
- ${resolved.map(({ id, title, href }) => {
557
- const isActive = this.activeId === id;
558
- return html `
47
+ ${e.map(({id:e,title:t,href:n})=>{let r=this.activeId===e;return o`
559
48
  <li>
560
49
  <a
561
- href="${href}"
50
+ href="${n}"
562
51
  class="bd-anchor-nav__dropdown-option"
563
- aria-current=${isActive ? "location" : nothing}
564
- @click=${(e) => this._selectFromDropdown(e, id, href)}
565
- >${title}</a>
52
+ aria-current=${r?`location`:s}
53
+ @click=${t=>this._selectFromDropdown(t,e,n)}
54
+ >${t}</a>
566
55
  </li>
567
- `;
568
- })}
56
+ `})}
569
57
  </ul>
570
58
  </div>
571
59
  </div>
@@ -575,37 +63,5 @@ let BdAnchorNav = class BdAnchorNav extends LitElement {
575
63
  </div>
576
64
  </div>
577
65
  </nav>
578
- `;
579
- }
580
- };
581
- __decorate([
582
- state()
583
- ], BdAnchorNav.prototype, "activeId", void 0);
584
- __decorate([
585
- property({ type: String, attribute: "aria-label" })
586
- ], BdAnchorNav.prototype, "navLabel", void 0);
587
- __decorate([
588
- state()
589
- ], BdAnchorNav.prototype, "_dropdownOpen", void 0);
590
- __decorate([
591
- state()
592
- ], BdAnchorNav.prototype, "_mobileCtaRevealed", void 0);
593
- __decorate([
594
- property({ type: String, attribute: "cta-label" })
595
- ], BdAnchorNav.prototype, "ctaLabel", void 0);
596
- __decorate([
597
- property({ type: String, attribute: "cta-href" })
598
- ], BdAnchorNav.prototype, "ctaHref", void 0);
599
- __decorate([
600
- property({ type: Array })
601
- ], BdAnchorNav.prototype, "items", void 0);
602
- __decorate([
603
- property({ type: String, attribute: "max-width" })
604
- ], BdAnchorNav.prototype, "maxWidth", void 0);
605
- __decorate([
606
- property({ type: String, attribute: "sticky-top" })
607
- ], BdAnchorNav.prototype, "stickyTop", void 0);
608
- BdAnchorNav = __decorate([
609
- defineElement("bd-anchor-nav")
610
- ], BdAnchorNav);
66
+ `}};n([l()],h.prototype,`activeId`,void 0),n([c({type:String,attribute:`aria-label`})],h.prototype,`navLabel`,void 0),n([l()],h.prototype,`_dropdownOpen`,void 0),n([l()],h.prototype,`_mobileCtaRevealed`,void 0),n([c({type:String,attribute:`cta-label`})],h.prototype,`ctaLabel`,void 0),n([c({type:String,attribute:`cta-href`})],h.prototype,`ctaHref`,void 0),n([c({type:Array})],h.prototype,`items`,void 0),n([c({type:String,attribute:`max-width`})],h.prototype,`maxWidth`,void 0),n([c({type:String,attribute:`sticky-top`})],h.prototype,`stickyTop`,void 0),h=n([e(`bd-anchor-nav`)],h);
611
67
  //# sourceMappingURL=anchor-nav.js.map