@repobit/dex-system-design 0.25.12 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/CHANGELOG.md +187 -0
  2. package/README.md +131 -8
  3. package/package.json +95 -13
  4. package/schemas/component-manifest.json +3294 -405
  5. package/schemas/manifest-omissions.json +173 -0
  6. package/src/blog/src/breakpoints.js +6 -6
  7. package/src/blog/src/content/blog-atoms-showcase.js +1 -1
  8. package/src/blog/src/content/blog-page-layout.js +2 -2
  9. package/src/blog/src/lib/article-toc.js +7 -7
  10. package/src/blog/src/shell/blog-shell.js +1 -1
  11. package/src/blog/src/tokens/blog.js +2 -2
  12. package/src/blog/src/tokens/core.js +34 -35
  13. package/src/blog/src/tokens/legacy.js +0 -9
  14. package/src/blog/tokens/blog.js +2 -2
  15. package/src/blog/tokens/core.js +34 -35
  16. package/src/blog/tokens/legacy.js +0 -9
  17. package/src/blog/tokens.css +36 -46
  18. package/src/components/accordion/accordion-bg.css.js +83 -59
  19. package/src/components/accordion/accordion-bg.js +29 -10
  20. package/src/components/accordion/accordion-bg.stories.js +67 -67
  21. package/src/components/accordion/accordion-keyboard.js +80 -0
  22. package/src/components/accordion/accordion.css.js +142 -80
  23. package/src/components/accordion/accordion.js +37 -10
  24. package/src/components/accordion/accordion.stories.js +7 -7
  25. package/src/components/agent-endpoints/agent-endpoints.css.js +36 -39
  26. package/src/components/agent-endpoints/agent-endpoints.js +30 -20
  27. package/src/components/agent-endpoints/agent-endpoints.stories.js +1 -1
  28. package/src/components/ai-guardian-demo.stories.js +91 -91
  29. package/src/components/alert/alert.css.js +198 -0
  30. package/src/components/alert/alert.js +103 -0
  31. package/src/components/alert/alert.stories.js +206 -0
  32. package/src/components/anchor/anchor-nav.css.js +213 -101
  33. package/src/components/anchor/anchor-nav.js +26 -40
  34. package/src/components/anchor/anchor.stories.js +22 -12
  35. package/src/components/annotation/annotation.css.js +58 -0
  36. package/src/components/annotation/annotation.js +67 -0
  37. package/src/components/annotation/annotation.stories.js +63 -0
  38. package/src/components/architecture.stories.js +285 -0
  39. package/src/components/atoms.stories.js +342 -0
  40. package/src/components/avatar/avatar.css.js +67 -0
  41. package/src/components/avatar/avatar.js +42 -0
  42. package/src/components/avatar/avatar.stories.js +95 -0
  43. package/src/components/awards/awards-flex.css.js +209 -23
  44. package/src/components/awards/awards-flex.js +66 -7
  45. package/src/components/awards/awards-flex.stories.js +1 -1
  46. package/src/components/awards/{awards-light.stories.js → awards-summary.stories.js} +54 -64
  47. package/src/components/awards/awards.css.js +116 -58
  48. package/src/components/awards/awards.js +102 -28
  49. package/src/components/awards/awards.stories.js +1 -1
  50. package/src/components/back/back.css.js +51 -22
  51. package/src/components/back/back.js +28 -7
  52. package/src/components/back/back.stories.js +9 -3
  53. package/src/components/badge/badge.css.js +158 -46
  54. package/src/components/badge/badge.js +62 -74
  55. package/src/components/badge/badge.stories.js +176 -248
  56. package/src/components/bento-grid/bento-grid.css.js +21 -16
  57. package/src/components/bento-grid/bento-grid.js +16 -4
  58. package/src/components/bento-grid/bento-grid.stories.js +19 -18
  59. package/src/components/bento-grid/bento-item.css.js +52 -28
  60. package/src/components/bento-grid/bento-item.js +2 -2
  61. package/src/components/blockquote/blockquote.css.js +47 -0
  62. package/src/components/blockquote/blockquote.js +29 -0
  63. package/src/components/blockquote/blockquote.stories.js +62 -0
  64. package/src/components/breadcrumb/breadcrumb.css.js +92 -22
  65. package/src/components/breadcrumb/breadcrumb.js +56 -11
  66. package/src/components/button/button.css.js +531 -161
  67. package/src/components/button/button.js +206 -214
  68. package/src/components/button/button.stories.js +322 -174
  69. package/src/components/caption/caption.css.js +21 -0
  70. package/src/components/caption/caption.js +31 -0
  71. package/src/components/caption/caption.stories.js +62 -0
  72. package/src/components/card-features/card-features.css.js +14 -22
  73. package/src/components/card-features/card-features.js +68 -9
  74. package/src/components/card-features/card-features.stories.js +11 -11
  75. package/src/components/cards/card.css.js +60 -81
  76. package/src/components/cards/card.js +56 -25
  77. package/src/components/cards/card.stories.js +39 -39
  78. package/src/components/carousel/carousel.css.js +93 -99
  79. package/src/components/carousel/carousel.js +32 -4
  80. package/src/components/checkbox/checkbox.css.js +111 -93
  81. package/src/components/checkbox/checkbox.js +64 -90
  82. package/src/components/checkbox/checkbox.stories.js +96 -29
  83. package/src/components/code/code.css.js +70 -0
  84. package/src/components/code/code.js +40 -0
  85. package/src/components/code/code.stories.js +73 -0
  86. package/src/components/compare/compare.css.js +179 -43
  87. package/src/components/compare/compare.js +52 -25
  88. package/src/components/compare/compare.stories.js +61 -4
  89. package/src/components/comparison-panel/comparison-panel.css.js +38 -51
  90. package/src/components/comparison-panel/comparison-panel.js +5 -4
  91. package/src/components/comparison-panel/comparison-panel.stories.js +1 -1
  92. package/src/components/compatibility-table/compatibility-table.css.js +180 -80
  93. package/src/components/compatibility-table/compatibility-table.js +37 -9
  94. package/src/components/control-alignment.stories.js +393 -0
  95. package/src/components/cta-banner/cta-banner.css.js +41 -13
  96. package/src/components/cta-banner/cta-banner.js +6 -5
  97. package/src/components/cta-banner/cta-banner.stories.js +43 -98
  98. package/src/components/display/display.css.js +25 -1
  99. package/src/components/display/display.js +46 -13
  100. package/src/components/display/display.stories.js +270 -40
  101. package/src/components/divider/divider-horizontal.js +21 -5
  102. package/src/components/divider/divider-vertical.js +15 -7
  103. package/src/components/divider/divider.css.js +2 -2
  104. package/src/components/divider/divider.stories.js +38 -34
  105. package/src/components/dropdown/dropdown.css.js +93 -126
  106. package/src/components/dropdown/dropdown.js +114 -34
  107. package/src/components/dropdown/dropdown.stories.js +56 -24
  108. package/src/components/features/features.css.js +24 -11
  109. package/src/components/features/features.js +7 -3
  110. package/src/components/features/features.stories.js +37 -37
  111. package/src/components/features-tab/features-tab.css.js +19 -8
  112. package/src/components/features-tab/features-tab.js +6 -5
  113. package/src/components/features-tab/features-tab.stories.js +23 -23
  114. package/src/components/fieldset/fieldset.css.js +30 -0
  115. package/src/components/fieldset/fieldset.js +28 -0
  116. package/src/components/fieldset/fieldset.stories.js +84 -0
  117. package/src/components/footer/footer-links-group.css.js +10 -14
  118. package/src/components/footer/footer-links-group.js +4 -3
  119. package/src/components/footer/footer-lp.css.js +59 -30
  120. package/src/components/footer/footer-lp.js +17 -12
  121. package/src/components/footer/footer-lp.stories.js +63 -75
  122. package/src/components/footer/footer-nav-menu.css.js +26 -4
  123. package/src/components/footer/footer-nav-menu.js +3 -2
  124. package/src/components/footer/footer.css.js +146 -264
  125. package/src/components/footer/footer.js +176 -106
  126. package/src/components/footer/footer.stories.js +9 -9
  127. package/src/components/footer/localeMap.js +1 -1
  128. package/src/components/grid/grid.css.js +1 -1
  129. package/src/components/grid/grid.js +49 -7
  130. package/src/components/grid/grid.stories.js +111 -0
  131. package/src/components/header/header-code.css.js +61 -51
  132. package/src/components/header/header-code.js +28 -14
  133. package/src/components/header/header-code.stories.js +5 -5
  134. package/src/components/header/header.css.js +655 -176
  135. package/src/components/header/header.js +269 -36
  136. package/src/components/header/header.stories.js +841 -18
  137. package/src/components/heading/heading.css.js +14 -17
  138. package/src/components/heading/heading.js +48 -33
  139. package/src/components/heading/heading.stories.js +27 -25
  140. package/src/components/help-text/help-text.css.js +21 -0
  141. package/src/components/help-text/help-text.js +25 -0
  142. package/src/components/help-text/help-text.stories.js +66 -0
  143. package/src/components/highlight/highlight.css.js +86 -64
  144. package/src/components/highlight/highlight.js +18 -27
  145. package/src/components/highlight/highlight.stories.js +14 -3
  146. package/src/components/icons/analysis-icon.js +6 -16
  147. package/src/components/icons/arrow-down-icon.js +6 -19
  148. package/src/components/icons/arrow-icon.js +44 -0
  149. package/src/components/icons/arrow-right-icon.js +30 -23
  150. package/src/components/icons/arrow-up-icon.js +19 -18
  151. package/src/components/icons/bd-ai-icon.js +1 -1
  152. package/src/components/icons/brand-marks.stories.js +279 -0
  153. package/src/components/icons/brand-signature-icon.js +42 -0
  154. package/src/components/icons/check-icon.js +27 -0
  155. package/src/components/icons/circle-info-icon.js +33 -0
  156. package/src/components/icons/close-icon.js +6 -18
  157. package/src/components/icons/family-icon.js +8 -20
  158. package/src/components/icons/globe-icon.js +6 -18
  159. package/src/components/icons/guide-icon.js +6 -18
  160. package/src/components/icons/icon-element.js +99 -0
  161. package/src/components/icons/icons.js +36 -0
  162. package/src/components/icons/icons.stories.js +184 -52
  163. package/src/components/icons/individual-icon.js +6 -18
  164. package/src/components/icons/laurel-icon.js +9 -19
  165. package/src/components/icons/machine-learning-icon.js +6 -17
  166. package/src/components/icons/marks.js +41 -0
  167. package/src/components/icons/minus-icon.js +7 -21
  168. package/src/components/icons/missing-icon.js +52 -0
  169. package/src/components/icons/plus-icon.js +7 -21
  170. package/src/components/icons/quote-icon.js +19 -19
  171. package/src/components/image/image.css.js +72 -25
  172. package/src/components/image/image.js +11 -6
  173. package/src/components/image/image.stories.js +2 -2
  174. package/src/components/input/custom-form.stories.js +214 -62
  175. package/src/components/input/input-clipboard.css.js +51 -144
  176. package/src/components/input/input-clipboard.js +31 -15
  177. package/src/components/input/input.css.js +8 -146
  178. package/src/components/input/input.js +93 -38
  179. package/src/components/install-options/install-options.css.js +84 -77
  180. package/src/components/install-options/install-options.js +33 -30
  181. package/src/components/install-options/install-options.stories.js +3 -3
  182. package/src/components/label/label.css.js +35 -0
  183. package/src/components/label/label.js +38 -0
  184. package/src/components/label/label.stories.js +82 -0
  185. package/src/components/light-carousel/light-carousel.css.js +111 -63
  186. package/src/components/light-carousel/light-carousel.js +85 -11
  187. package/src/components/light-carousel/light-carousel.stories.js +126 -82
  188. package/src/components/link/link.css.js +150 -99
  189. package/src/components/link/link.js +86 -11
  190. package/src/components/link/link.stories.js +124 -30
  191. package/src/components/list/list-item/list-item.css.js +74 -22
  192. package/src/components/list/list-item/list-item.js +32 -10
  193. package/src/components/list/list-item/list-item.stories.js +23 -23
  194. package/src/components/list/list.css.js +8 -2
  195. package/src/components/list/list.js +3 -2
  196. package/src/components/list/list.stories.js +222 -0
  197. package/src/components/modal/modal.css.js +114 -24
  198. package/src/components/modal/modal.js +83 -7
  199. package/src/components/modal/modal.stories.js +9 -9
  200. package/src/components/overview/overview.css.js +19 -14
  201. package/src/components/overview/overview.js +6 -5
  202. package/src/components/overview/overview.stories.js +10 -10
  203. package/src/components/page-switcher/page-switcher.css.js +97 -40
  204. package/src/components/page-switcher/page-switcher.js +28 -5
  205. package/src/components/page-switcher/page-switcher.stories.js +95 -0
  206. package/src/components/paragraph/paragraph.css.js +15 -10
  207. package/src/components/paragraph/paragraph.js +41 -44
  208. package/src/components/paragraph/paragraph.stories.js +56 -21
  209. package/src/components/picture/picture.css.js +103 -44
  210. package/src/components/picture/picture.js +100 -30
  211. package/src/components/picture/picture.stories.js +1 -1
  212. package/src/components/pricing-cards/new-pricing-card.js +3 -3
  213. package/src/components/pricing-cards/new-pricing.css.js +24 -15
  214. package/src/components/pricing-cards/pricing-card-actions.css.js +1 -1
  215. package/src/components/pricing-cards/pricing-card-actions.js +3 -4
  216. package/src/components/pricing-cards/pricing-card-container.css.js +3 -3
  217. package/src/components/pricing-cards/pricing-card-container.js +3 -2
  218. package/src/components/pricing-cards/pricing-card-header.css.js +10 -8
  219. package/src/components/pricing-cards/pricing-card-header.js +6 -7
  220. package/src/components/pricing-cards/pricing-card-pricing.css.js +16 -9
  221. package/src/components/pricing-cards/pricing-card-pricing.js +8 -6
  222. package/src/components/pricing-cards/pricing-card-show-more.css.js +11 -3
  223. package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
  224. package/src/components/pricing-cards/pricing-card.css.js +244 -190
  225. package/src/components/pricing-cards/pricing-card.js +54 -70
  226. package/src/components/pricing-cards/pricing-feature-item.css.js +25 -8
  227. package/src/components/pricing-cards/pricing-feature-item.js +8 -3
  228. package/src/components/process-steps/process-steps.css.js +26 -14
  229. package/src/components/process-steps/process-steps.js +23 -6
  230. package/src/components/process-steps/process-steps.stories.js +1 -1
  231. package/src/components/progress/progress.css.js +80 -0
  232. package/src/components/progress/progress.js +42 -0
  233. package/src/components/progress/progress.stories.js +79 -0
  234. package/src/components/quick-answer/quick-answer.css.js +75 -13
  235. package/src/components/quick-answer/quick-answer.js +8 -3
  236. package/src/components/radio/radio.css.js +92 -128
  237. package/src/components/radio/radio.js +106 -127
  238. package/src/components/radio/radio.stories.js +54 -19
  239. package/src/components/review/review-grid.css.js +5 -6
  240. package/src/components/review/review-grid.js +14 -11
  241. package/src/components/review/review.css.js +11 -6
  242. package/src/components/review/review.js +3 -8
  243. package/src/components/shared/ensemble.css.js +93 -0
  244. package/src/components/shared/form-field.css.js +206 -0
  245. package/src/components/shared/prop-vocabulary.js +48 -0
  246. package/src/components/shared/token-scales.js +306 -0
  247. package/src/components/skeleton/skeleton.css.js +34 -0
  248. package/src/components/skeleton/skeleton.js +32 -0
  249. package/src/components/skeleton/skeleton.stories.js +70 -0
  250. package/src/components/spinner/spinner.css.js +62 -0
  251. package/src/components/spinner/spinner.js +38 -0
  252. package/src/components/spinner/spinner.stories.js +92 -0
  253. package/src/components/spotlight-section/spotlight-section.css.js +14 -13
  254. package/src/components/spotlight-section/spotlight-section.js +42 -39
  255. package/src/components/switch/switch.css.js +103 -0
  256. package/src/components/switch/switch.js +44 -0
  257. package/src/components/switch/switch.stories.js +86 -0
  258. package/src/components/tab-list/content-switcher.stories.js +189 -0
  259. package/src/components/tab-list/tab-list.css.js +250 -0
  260. package/src/components/tab-list/tab-list.js +184 -0
  261. package/src/components/tab-list/tab-list.stories.js +221 -0
  262. package/src/components/tabs/tabs.css.js +14 -123
  263. package/src/components/tabs/tabs.js +16 -19
  264. package/src/components/tabs/tabs.stories.js +95 -95
  265. package/src/components/tag/tag.css.js +54 -0
  266. package/src/components/tag/tag.js +32 -0
  267. package/src/components/tag/tag.stories.js +126 -0
  268. package/src/components/terminal/terminal-message.css.js +164 -60
  269. package/src/components/terminal/terminal-message.js +5 -5
  270. package/src/components/terminal/terminal-message.stories.js +70 -1
  271. package/src/components/termsOfUse/terms.css.js +25 -20
  272. package/src/components/termsOfUse/terms.js +13 -9
  273. package/src/components/termsOfUse/terms.stories.js +1 -1
  274. package/src/components/textarea/textarea.css.js +51 -0
  275. package/src/components/textarea/textarea.js +136 -0
  276. package/src/components/textarea/textarea.stories.js +191 -0
  277. package/src/components/tooltip/tooltip.css.js +75 -0
  278. package/src/components/tooltip/tooltip.js +156 -0
  279. package/src/components/tooltip/tooltip.stories.js +161 -0
  280. package/src/components/trust-panel/trust-panel.css.js +85 -33
  281. package/src/components/trust-panel/trust-panel.js +18 -10
  282. package/src/components/trust-panel/trust-panel.stories.js +1 -1
  283. package/src/components/ultimate-security-demo.stories.js +431 -0
  284. package/src/components/video/video.css.js +17 -0
  285. package/src/components/video/video.js +40 -0
  286. package/src/components/video/video.stories.js +106 -0
  287. package/src/components/video-player/video-player.css.js +67 -11
  288. package/src/components/video-player/video-player.js +35 -4
  289. package/src/components/video-player/video-player.stories.js +1 -1
  290. package/src/components/visual-alignment.stories.js +411 -0
  291. package/src/components/visually-hidden/visually-hidden.css.js +24 -0
  292. package/src/components/visually-hidden/visually-hidden.js +16 -0
  293. package/src/components/visually-hidden/visually-hidden.stories.js +56 -0
  294. package/src/stories/Button.stories.js +17 -17
  295. package/src/stories/Header.stories.js +10 -10
  296. package/src/stories/Page.js +1 -1
  297. package/src/stories/Page.stories.js +6 -6
  298. package/src/tokens/borders.stories.js +339 -0
  299. package/src/tokens/color-responsibilities.stories.js +227 -0
  300. package/src/tokens/dark-derivation.js +309 -0
  301. package/src/tokens/dark-findings.js +197 -0
  302. package/src/tokens/dark-mode.stories.js +207 -0
  303. package/src/tokens/dimension.stories.js +251 -0
  304. package/src/tokens/elevation.stories.js +143 -0
  305. package/src/tokens/focus.stories.js +276 -0
  306. package/src/tokens/fonts.css +20 -20
  307. package/src/tokens/fonts.stories.js +354 -374
  308. package/src/tokens/layout.css +25 -11
  309. package/src/tokens/motion.stories.js +231 -0
  310. package/src/tokens/shape.stories.js +272 -0
  311. package/src/tokens/spacing-rhythm.stories.js +359 -0
  312. package/src/tokens/spacing.stories.js +208 -703
  313. package/src/tokens/story-chrome.js +503 -0
  314. package/src/tokens/surfaces.stories.js +224 -0
  315. package/src/tokens/text-on-surface.stories.js +164 -0
  316. package/src/tokens/token-map.js +220 -0
  317. package/src/tokens/token-map.stories.js +257 -0
  318. package/src/tokens/token-purposes.js +266 -0
  319. package/src/tokens/tokens-grid.stories.js +388 -900
  320. package/src/tokens/tokens.css +1633 -1045
  321. package/src/tokens/tokens.js +1130 -492
  322. package/src/tokens/tokens.stories.js +137 -47
  323. package/src/tokens/type-ceiling-words.js +299 -0
  324. package/src/tokens/typography.stories.js +1003 -965
  325. package/src/tokens/vertical-rhythm.stories.js +224 -0
  326. package/src/components/awards/awards-icon.js +0 -56
  327. package/src/components/awards/awards-light.js +0 -240
  328. package/src/components/banner/banner.js +0 -60
  329. package/src/components/banner/banner.stories.js +0 -51
  330. package/src/components/button/icons.js +0 -24
  331. package/src/components/input/index.js +0 -0
  332. package/src/components/light-carousel/light-carousel-simple.css.js +0 -183
  333. package/src/components/light-carousel/light-carousel-simple.js +0 -74
  334. package/src/tokens/colors.js +0 -121
  335. package/src/tokens/typography.css.js +0 -207
  336. package/src/tokens/typography.js +0 -0
@@ -0,0 +1,161 @@
1
+ import { html } from 'lit';
2
+ import '../badge/badge.js';
3
+ import './tooltip.js';
4
+ import '../button/button.js';
5
+
6
+ export default {
7
+ title : 'Atoms/Tooltip',
8
+ tags : ['autodocs'],
9
+ parameters: {
10
+ docs: {
11
+ description: {
12
+ component: `
13
+ **BdTooltip** shows a short explanatory bubble when the wrapped content is
14
+ hovered or focused.
15
+
16
+ ### Usage
17
+ \`\`\`html
18
+ <bd-tooltip text="Blocks trackers across every browser">
19
+ <bd-button variant="ghost">What is this?</bd-button>
20
+ </bd-tooltip>
21
+ \`\`\`
22
+
23
+ ### Props
24
+ | Prop | Values | Default |
25
+ |---|---|---|
26
+ | \`text\` | the tooltip content | \`''\` |
27
+
28
+ The trigger goes in the default slot.
29
+
30
+ ### What it is for, and what it is not
31
+ A tooltip supplements — it must never be the only place information appears.
32
+ Anything required to complete a task belongs in visible text or in
33
+ \`<bd-help-text>\`, because a tooltip is unreachable on touch, invisible in
34
+ print, and gone the moment the pointer leaves.
35
+
36
+ ### Accessibility caveats
37
+ The bubble carries \`role="tooltip"\`, but this element does **not** wire up
38
+ \`aria-describedby\` between the trigger and the bubble. A screen reader
39
+ therefore has no link from the control to its description, so the tooltip text
40
+ may never be announced.
41
+
42
+ Until that is connected, describe the trigger directly as well:
43
+
44
+ \`\`\`html
45
+ <bd-tooltip text="Blocks trackers">
46
+ <bd-button aria-describedby="trackers-hint">What is this?</bd-button>
47
+ </bd-tooltip>
48
+ <span id="trackers-hint" hidden>Blocks trackers across every browser</span>
49
+ \`\`\`
50
+
51
+ There is also no dismiss-on-Escape and no delay before showing, both of which
52
+ WCAG 1.4.13 asks of content that appears on hover.
53
+ `
54
+ }
55
+ }
56
+ },
57
+ argTypes: {
58
+ text: {
59
+ control : 'text',
60
+ description: 'The tooltip content. Supplementary only — never the sole place information appears.',
61
+ table : { type: { summary: 'string' }, defaultValue: { summary: "" }, category: 'Content' }
62
+ }
63
+ }
64
+ };
65
+
66
+ export const Default = () => html`
67
+ <bd-tooltip text="Blocks trackers across every browser">
68
+ <bd-button size="sm">Hover me</bd-button>
69
+ </bd-tooltip>
70
+ `;
71
+
72
+ /**
73
+ * ### The bubble cannot currently be snapshotted
74
+ *
75
+ * `.bubble` sits at `opacity: 0` and is raised only by `:host(:hover)` and
76
+ * `:host(:focus-within)`. Neither is reachable from a story: hover needs a live
77
+ * pointer, and `:focus-within` needs the document itself to hold focus, which a
78
+ * backgrounded or headless renderer does not guarantee.
79
+ *
80
+ * So every snapshot of this component records an **invisible** tooltip, and a
81
+ * change to the bubble's padding, colour, radius or shadow lands unreviewed.
82
+ * `bd-tooltip` exposes only `text` — there is no `open` attribute to set.
83
+ *
84
+ * Adding one would make the bubble testable, snapshottable, and controllable
85
+ * from a parent that already knows the tooltip should be showing. Until then,
86
+ * the two stories below cover the trigger and the layout around it, and the
87
+ * bubble is verified by hand.
88
+ */
89
+ export const LongText = () => html`
90
+ <div style="padding: var(--spacing-64) var(--spacing-64) var(--spacing-16)">
91
+ <bd-tooltip
92
+ text="Blocks trackers, cryptominers and fingerprinting scripts across every browser on every device on your account"
93
+ >
94
+ <bd-button size="sm">Long description</bd-button>
95
+ </bd-tooltip>
96
+ </div>
97
+ `;
98
+
99
+ /**
100
+ * The bubble is `position: absolute; left: 50%` with no `max-width` and
101
+ * `white-space: nowrap`, so it is centred on the trigger and grows in both
102
+ * directions. Against a narrow trigger near the edge of its container it
103
+ * overflows — measured at 42px past the left edge in the frame above.
104
+ *
105
+ * Rendered here at three trigger widths so the overhang is visible without
106
+ * needing the bubble itself to be.
107
+ */
108
+ export const TriggerWidths = () => html`
109
+ <div style="display: grid; gap: var(--spacing-16); justify-items: start">
110
+ <bd-tooltip text="Short"><bd-button size="sm">S</bd-button></bd-tooltip>
111
+ <bd-tooltip text="A medium-length description">
112
+ <bd-button size="md">Medium trigger</bd-button>
113
+ </bd-tooltip>
114
+ <bd-tooltip text="Short">
115
+ <bd-button size="lg">A considerably wider trigger</bd-button>
116
+ </bd-tooltip>
117
+ </div>
118
+ `;
119
+
120
+ export const ViewportEdges = {
121
+ name : 'At the viewport edges',
122
+ render: () => html`
123
+ <p style="max-width:70ch;color:var(--color-text-secondary);font-family:var(--typography-fontFamily-sans)">
124
+ Hover or Tab to each trigger. The bubble is centred on its trigger and is wider than it, so
125
+ at an edge it would paint off the page; the component measures the overhang and shifts the
126
+ bubble back, keeping an 8px gutter. Narrow the window to see the shift grow.
127
+ </p>
128
+ <div style="position:relative;height:180px;margin-top:var(--spacing-64)">
129
+ <span style="position:absolute;left:0;top:0">
130
+ <bd-tooltip text="Pinned to the left edge of the viewport, with enough text to be wider than its trigger">
131
+ <bd-badge tone="brand">left edge</bd-badge>
132
+ </bd-tooltip>
133
+ </span>
134
+ <span style="position:absolute;left:50%;top:0;transform:translateX(-50%)">
135
+ <bd-tooltip text="Centred, so no shift is needed and none is applied">
136
+ <bd-badge tone="brand">centre</bd-badge>
137
+ </bd-tooltip>
138
+ </span>
139
+ <span style="position:absolute;right:0;top:0">
140
+ <bd-tooltip text="Pinned to the right edge of the viewport, with enough text to be wider than its trigger">
141
+ <bd-badge tone="brand">right edge</bd-badge>
142
+ </bd-tooltip>
143
+ </span>
144
+ </div>
145
+ `,
146
+ parameters: {
147
+ docs: {
148
+ description: {
149
+ story: `The collision behaviour P6C.0 added, which until now nothing rendered — every other
150
+ tooltip story sits in the middle of the canvas where the shift is always 0.
151
+
152
+ Measured across 320/360/375/390/430/480/576/768/1024/1440, on hover and on real
153
+ keyboard Tab: the bubble's left edge never goes below 8px and its right edge never
154
+ past the viewport minus 8. The shift is what does it — 69px at the left edge of a
155
+ 320px viewport for the short bubble, 199px at 1440 for the long one — and it is
156
+ exactly 0 for the centred trigger, whose bubble centre matches its trigger centre
157
+ to the pixel.`
158
+ }
159
+ }
160
+ }
161
+ };
@@ -1,53 +1,65 @@
1
- import { css } from "lit";
1
+ import { css, unsafeCSS } from "lit";
2
+ import { below } from "../shared/token-scales.js";
2
3
 
3
4
  export default css`
4
5
  :host {
5
6
  display: block;
6
7
  font-family: var(--typography-fontFamily-sans);
7
- background: var(--color-blue-50);
8
+ background: var(--status-brand-surface);
8
9
  }
9
10
 
10
11
  .bd-trustpanel-wrapper {
11
- max-width: var(--layout-ensemble-max-width, 1200px);
12
- margin: 0 auto;
13
- padding: var(--spacing-48) var(--layout-ensemble-inline-padding, var(--spacing-24));
12
+ padding-block: var(--spacing-48);
14
13
  box-sizing: border-box;
15
14
  }
16
15
 
17
16
  .bd-trustpanel-eyebrow {
18
17
  display: block;
19
18
  margin: 0 0 var(--spacing-8);
20
- color: var(--color-blue-600);
21
- font-weight: var(--typography-fontWeight-medium);
19
+ color: var(--color-text-brand);
22
20
  }
23
21
 
24
22
  .bd-trustpanel-title {
25
23
  margin: 0 0 var(--spacing-16);
26
- color: var(--color-neutral-900);
27
- line-height: var(--typography-lineHeight-tight, 1.1);
28
24
  }
29
25
 
30
26
  .bd-trustpanel-description {
31
27
  display: block;
32
28
  margin: 0 0 var(--spacing-40);
33
- color: var(--color-neutral-600);
29
+ color: var(--color-text-muted);
34
30
  max-width: 80ch;
35
31
  }
36
32
 
37
33
  .bd-trustpanel-inline-link {
38
- color: var(--color-blue-500);
39
- font-weight: var(--typography-fontWeight-medium);
40
- text-decoration: none;
34
+ /* bd-link owns colour, weight, underline and the focus ring now. What is
35
+ left here is the one thing the parent legitimately decides: that this
36
+ link does not break across lines mid-phrase in running text.
37
+
38
+ It used to be a bare anchor with text-decoration none, which left colour
39
+ as the only thing marking it as a link inside a muted paragraph, and it
40
+ had no focus treatment beyond the browser default outline. */
41
41
  white-space: nowrap;
42
42
  }
43
43
 
44
44
  .bd-trustpanel-card-link {
45
- color: var(--color-blue-500);
46
- font-weight: var(--typography-fontWeight-semibold);
45
+ /* 16px on this tint, where blue-500 is 4.2:1. text-brand is what the link
46
+ atom itself uses for a primary link, so this stops diverging from it. */
47
+ color: var(--color-text-brand);
48
+ /* link-standalone: this is a link that stands on its own -- a card's call
49
+ to action, not a link inside a sentence, which is what link-default's
50
+ inherit-everything shape is for. The size was inherited at 16px and the
51
+ role names base, so declaring it changes nothing and stops the size
52
+ depending on whatever encloses the card. The weight moves 600 -> 500,
53
+ the same step already accepted for the accordion title and the
54
+ accordion-bg question. The leading is the real gain: it was undeclared
55
+ and computing to the font's own metric, which CLAUDE.md rule 2 says is
56
+ not a typography contract. */
57
+ font-size: var(--typography-link-standalone-fontSize);
58
+ font-weight: var(--typography-link-standalone-fontWeight);
59
+ line-height: var(--typography-link-standalone-lineHeight);
47
60
  text-decoration: none;
48
61
  white-space: nowrap;
49
62
  }
50
- .bd-trustpanel-inline-link:hover,
51
63
  .bd-trustpanel-card-link:hover {
52
64
  text-decoration: underline;
53
65
  }
@@ -66,21 +78,45 @@ export default css`
66
78
  }
67
79
 
68
80
  .bd-trustpanel-stat-divider {
69
- border-top: 2px solid var(--color-blue-500);
81
+ border-top: 2px solid var(--color-border-brand);
70
82
  margin-bottom: var(--spacing-16);
71
83
  }
72
84
 
73
85
  .bd-trustpanel-stat-value {
74
- color: var(--color-blue-500);
75
- font-size: var(--typography-fontSize-3xl, 2rem);
76
- font-weight: var(--typography-fontWeight-bold, 700);
86
+ /* --color-text-brand, the role, not --color-blue-500. CLAUDE.md is explicit
87
+ that blue-500 is 4.53:1 on pure white and fails on any tint, and this
88
+ statistic sits on the panel's blue-50 ground -- text on a tint, which is
89
+ the case the rule names.
90
+ .
91
+ It was not failing: measured 4.20:1 at 32px/700, and WCAG's large-text
92
+ bar is 3:1, so it passed on the exemption rather than on the number. The
93
+ role takes it to 5.72:1 and it passes without needing the exemption,
94
+ which is the difference worth having on a figure people read across a
95
+ room.
96
+ .
97
+ Visible, and small: the statistic darkens one step of blue. */
98
+ color: var(--color-text-brand);
99
+ font-size: var(--typography-fontSize-3xl);
100
+ font-weight: var(--typography-fontWeight-bold);
101
+ /* no token: 1.1 is neither --typography-lineHeight-none (1) nor -tight
102
+ (1.25), and choosing between them changes the height of a rendered
103
+ statistic. P5E recorded it as a design-review item and P5E.1 is
104
+ explicitly not the phase that decides it. */
77
105
  line-height: 1.1;
78
106
  margin-bottom: var(--spacing-4);
79
107
  }
80
108
 
81
109
  .bd-trustpanel-stat-label {
82
- color: var(--color-neutral-600);
83
- font-size: var(--typography-fontSize-sm);
110
+ color: var(--color-text-muted);
111
+ /* The sentence under a statistic, and it wraps to two lines at most widths.
112
+ Supporting body copy rather than a form label: label-default would put it
113
+ at weight 500, and this is prose describing a number, not a control's
114
+ name. The stat value above it keeps its own leading and is untouched. */
115
+ font-size: var(--typography-body-small-fontSize);
116
+ font-weight: var(--typography-body-small-fontWeight);
117
+ line-height: var(--typography-body-small-lineHeight);
118
+ letter-spacing: var(--typography-body-small-letterSpacing);
119
+ font-family: var(--typography-body-small-fontFamily);
84
120
  }
85
121
 
86
122
  /* === CARDS === */
@@ -92,14 +128,18 @@ export default css`
92
128
 
93
129
 
94
130
  .bd-trustpanel-card {
95
- background: var(--color-neutral-0, #fff);
96
- border: 1px solid var(--color-neutral-100, #e5e7eb);
97
- border-radius: var(--radius-2xl);
98
- padding: var(--spacing-32);
131
+ background: var(--color-surface-default);
132
+ border: var(--border-width-1) solid var(--color-border-container);
133
+ border-radius: var(--card-radius);
134
+ padding: var(--card-padding);
99
135
  box-sizing: border-box;
100
136
  display: flex;
101
137
  flex-direction: column;
102
- transition: transform 0.25s ease, box-shadow 0.25s ease;
138
+ /* normal, not 250ms: a hover lift is the most repeated interaction on
139
+ the page, and 250 was a fifth of a second off the scale for no reason
140
+ anyone recorded. bento-item ran the same lift at the same value. */
141
+ transition: transform var(--transition-duration-normal) var(--transition-easing-ease),
142
+ box-shadow var(--transition-duration-normal) var(--transition-easing-ease);
103
143
  }
104
144
 
105
145
  .bd-trustpanel-card:hover {
@@ -107,11 +147,24 @@ export default css`
107
147
  box-shadow: 0px 14px 40px #00000012;
108
148
  }
109
149
 
150
+ /* The shadow stays and the movement goes. Turning the transition off alone
151
+ would only make the lift instant, which is the same 3px of travel with
152
+ less warning; the transform is the part someone asking for reduced motion
153
+ is asking not to see. The shadow still says the card is hovered. */
154
+ @media (prefers-reduced-motion: reduce) {
155
+ .bd-trustpanel-card {
156
+ transition: none;
157
+ }
158
+
159
+ .bd-trustpanel-card:hover {
160
+ transform: none;
161
+ }
162
+ }
163
+
110
164
  .bd-trustpanel-card-eyebrow {
111
165
  display: block;
112
166
  margin: 0 0 var(--spacing-16);
113
- color: var(--color-blue-600);
114
- font-weight: var(--typography-fontWeight-medium);
167
+ color: var(--color-text-brand);
115
168
  }
116
169
 
117
170
  .bd-trustpanel-card-logos {
@@ -130,13 +183,12 @@ export default css`
130
183
 
131
184
  .bd-trustpanel-card-title {
132
185
  margin: 0 0 var(--spacing-12);
133
- color: var(--color-neutral-900);
134
186
  }
135
187
 
136
188
  .bd-trustpanel-card-description {
137
189
  display: block;
138
190
  margin: 0 0 var(--spacing-16);
139
- color: var(--color-neutral-600);
191
+ color: var(--color-text-muted);
140
192
  flex: 1;
141
193
  }
142
194
 
@@ -147,7 +199,7 @@ export default css`
147
199
  }
148
200
  }
149
201
 
150
- @media (max-width: 767px) {
202
+ @media ${unsafeCSS(below('md'))} {
151
203
  .bd-trustpanel-stats {
152
204
  grid-template-columns: repeat(2, 1fr);
153
205
  }
@@ -161,7 +213,7 @@ export default css`
161
213
  }
162
214
 
163
215
  .bd-trustpanel-card {
164
- padding: var(--spacing-24);
216
+ padding: var(--card-padding-compact);
165
217
  }
166
218
  }
167
219
  `;
@@ -1,8 +1,11 @@
1
1
  import { LitElement, html, nothing } from "lit";
2
2
  import { tokens } from "../../tokens/tokens.js";
3
3
  import "../heading/heading.js";
4
+ import "../link/link.js";
4
5
  import "../paragraph/paragraph.js";
5
6
  import trustPanelCSS from "./trust-panel.css.js";
7
+ import { ensembleCSS } from "../shared/ensemble.css.js";
8
+ import "../icons/arrow-right-icon.js";
6
9
 
7
10
  class TrustPanel extends LitElement {
8
11
  static properties = {
@@ -15,7 +18,7 @@ class TrustPanel extends LitElement {
15
18
  cards : { type: Array } // [{ eyebrow, title, description, linkLabel, linkHref }] — logos slotted per card
16
19
  };
17
20
 
18
- static styles = [tokens, trustPanelCSS];
21
+ static styles = [tokens, ensembleCSS, trustPanelCSS];
19
22
 
20
23
  constructor() {
21
24
  super();
@@ -33,7 +36,7 @@ class TrustPanel extends LitElement {
33
36
  return html`
34
37
  <div class="bd-trustpanel-card">
35
38
  ${card.eyebrow
36
- ? html`<bd-p kind="regular" font-weight="var(--typography-fontWeight-semibold, 600)" class="bd-trustpanel-card-eyebrow">${card.eyebrow}</bd-p>`
39
+ ? html`<bd-p variant="regular" font-weight="semibold" class="bd-trustpanel-card-eyebrow">${card.eyebrow}</bd-p>`
37
40
  : nothing}
38
41
 
39
42
  <div class="bd-trustpanel-card-logos">
@@ -45,13 +48,13 @@ class TrustPanel extends LitElement {
45
48
  : nothing}
46
49
 
47
50
  ${card.description
48
- ? html`<bd-p kind="regular" class="bd-trustpanel-card-description">${card.description}</bd-p>`
51
+ ? html`<bd-p variant="regular" class="bd-trustpanel-card-description">${card.description}</bd-p>`
49
52
  : nothing}
50
53
 
51
54
  ${card.linkLabel
52
55
  ? html`
53
56
  <a class="bd-trustpanel-card-link" href=${card.linkHref || "#"}>
54
- ${card.linkLabel} <span aria-hidden="true">→</span>
57
+ ${card.linkLabel} <bd-arrow-right-icon size="xs" aria-hidden="true"></bd-arrow-right-icon>
55
58
  </a>
56
59
  `
57
60
  : nothing}
@@ -61,9 +64,9 @@ class TrustPanel extends LitElement {
61
64
 
62
65
  render() {
63
66
  return html`
64
- <div class="bd-trustpanel-wrapper">
67
+ <div class="bd-ensemble bd-trustpanel-wrapper">
65
68
  ${this.eyebrow
66
- ? html`<bd-p kind="regular" font-weight="var(--typography-fontWeight-semibold, 600)" class="bd-trustpanel-eyebrow"><slot name="eyebrow">${this.eyebrow}</slot></bd-p>`
69
+ ? html`<bd-p variant="regular" font-weight="semibold" class="bd-trustpanel-eyebrow"><slot name="eyebrow">${this.eyebrow}</slot></bd-p>`
67
70
  : nothing}
68
71
 
69
72
  ${this.title
@@ -72,13 +75,18 @@ class TrustPanel extends LitElement {
72
75
 
73
76
  ${this.description
74
77
  ? html`
75
- <bd-p kind="regular" class="bd-trustpanel-description">
78
+ <bd-p variant="regular" class="bd-trustpanel-description">
76
79
  <slot name="description">${this.description}</slot>
77
80
  ${this.linkLabel
78
81
  ? html`
79
- <a class="bd-trustpanel-inline-link" href=${this.linkHref}>
80
- ${this.linkLabel} <span aria-hidden="true">→</span>
81
- </a>
82
+ <bd-link
83
+ class="bd-trustpanel-inline-link"
84
+ href=${this.linkHref}
85
+ underline
86
+ font-size="inherit"
87
+ >
88
+ ${this.linkLabel} <bd-arrow-right-icon size="xs" aria-hidden="true"></bd-arrow-right-icon>
89
+ </bd-link>
82
90
  `
83
91
  : nothing}
84
92
  </bd-p>
@@ -2,7 +2,7 @@ import { html } from "lit";
2
2
  import "./trust-panel.js";
3
3
 
4
4
  export default {
5
- title : "Components/Trust Panel",
5
+ title : "Modules/Trust Panel",
6
6
  component : "bd-trust-panel",
7
7
  tags : ["autodocs"],
8
8
  parameters: {