@repobit/dex-system-design 0.25.12 → 1.0.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 +204 -0
  2. package/README.md +131 -8
  3. package/package.json +96 -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,21 @@
1
+ import { css } from 'lit';
2
+
3
+ /** Styled entirely from design tokens — see npm run lint:tokens. */
4
+ export const captionCSS = css`
5
+ :host { display: block; }
6
+
7
+ figcaption {
8
+ font-family: var(--typography-caption-default-fontFamily);
9
+ font-size: var(--typography-caption-default-fontSize);
10
+ font-weight: var(--typography-caption-default-fontWeight);
11
+ line-height: var(--typography-caption-default-lineHeight);
12
+ letter-spacing: var(--typography-caption-default-letterSpacing);
13
+ color: var(--typography-caption-default-color);
14
+ }
15
+
16
+ :host([size='sm']) figcaption {
17
+ letter-spacing: var(--typography-caption-small-letterSpacing);
18
+ }
19
+ `;
20
+
21
+ export default captionCSS;
@@ -0,0 +1,31 @@
1
+ import { LitElement, html } from 'lit';
2
+ // Installs the design tokens into document scope; see src/tokens/tokens.js
3
+ import '../../tokens/tokens.js';
4
+ import { captionCSS } from './caption.css.js';
5
+ import { resolveSize } from '../shared/prop-vocabulary.js';
6
+
7
+ export class BdCaption extends LitElement {
8
+ static styles = [captionCSS];
9
+
10
+ static properties = {
11
+ size: { type: String, reflect: true }
12
+ };
13
+
14
+ constructor() {
15
+ super();
16
+ this.size = 'md';
17
+ }
18
+
19
+ willUpdate(changed) {
20
+ // small / default / large still resolve; see shared/prop-vocabulary.js
21
+ if (changed.has('size')) this.size = resolveSize(this.size, 'md');
22
+ }
23
+
24
+ render() {
25
+ return html`
26
+ <figcaption><slot></slot></figcaption>
27
+ `;
28
+ }
29
+ }
30
+
31
+ customElements.define('bd-caption', BdCaption);
@@ -0,0 +1,62 @@
1
+ import { html } from 'lit';
2
+ import './caption.js';
3
+
4
+ export default {
5
+ title : 'Atoms/Caption',
6
+ tags : ['autodocs'],
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component: `
11
+ **BdCaption** is the small explanatory line under a figure, table or chart.
12
+
13
+ ### Usage
14
+ \`\`\`html
15
+ <figure>
16
+ <img src="/images/chart.png" alt="Detections per month">
17
+ <bd-caption>Threat detections per month, 2026.</bd-caption>
18
+ </figure>
19
+
20
+ <bd-caption size="sm">Source: internal telemetry.</bd-caption>
21
+ \`\`\`
22
+
23
+ ### Props
24
+ | Prop | Values | Default |
25
+ |---|---|---|
26
+ | \`size\` | \`default\`, \`small\` | \`default\` |
27
+
28
+ ### Contrast
29
+ The caption is \`--color-neutral-600\`, which is 6.59:1 on white and stays above
30
+ 4.5:1 at the \`small\` size too. Caption text is the most common place a design
31
+ system slips below AA, because it is both small and grey — anything lighter
32
+ than \`neutral-600\` would not clear it.
33
+
34
+ ### The figcaption is cosmetic
35
+ This renders a \`<figcaption>\`, but inside its own shadow root. A native
36
+ \`figure\`/\`figcaption\` association needs them to be parent and child in the same
37
+ tree, so **placing this in a \`<figure>\` does not create that relationship** —
38
+ the element is styled as a caption but carries no grouping semantics.
39
+
40
+ If the association matters to you, use a real \`<figcaption>\` in the light DOM
41
+ and reach for this only where the styling alone is wanted.
42
+ `
43
+ }
44
+ }
45
+ },
46
+ argTypes: {
47
+ size: {
48
+ control : { type: 'select' },
49
+ options : ['default', 'small'],
50
+ description: 'Type size of the caption.',
51
+ table : { type: { summary: 'string' }, defaultValue: { summary: "default" }, category: 'Appearance' }
52
+ }
53
+ }
54
+ };
55
+
56
+ export const Default = () => html`
57
+ <bd-caption>Threat detections per month, 2026.</bd-caption>
58
+ `;
59
+
60
+ export const Small = () => html`
61
+ <bd-caption size="sm">Source: Bitdefender Labs</bd-caption>
62
+ `;
@@ -3,10 +3,6 @@ import { css } from "lit";
3
3
  export default css`
4
4
  :host {
5
5
  display: block;
6
- --background-card-grey: var(--color-neutral-25);
7
- --border-card-grey: var(--color-neutral-50);
8
- // padding-top: var(--spacing-32);
9
- // padding-bottom: var(--spacing-32);
10
6
  }
11
7
 
12
8
  .bd-card-features-s {
@@ -14,13 +10,12 @@ export default css`
14
10
  align-items: center;
15
11
  justify-content: center;
16
12
  position: relative;
13
+ /* Same reason as the card below, which already sets it: the gutters belong
14
+ inside the 100% and inside the max-width, not added on top of them. */
15
+ box-sizing: border-box;
17
16
  width: 100%;
18
17
  overflow: hidden;
19
18
  flex-direction: column;
20
- padding-left: var(--spacing-14);
21
- padding-right: var(--spacing-14);
22
- max-width: 1400px;
23
- margin: 0 auto;
24
19
  }
25
20
 
26
21
  .bd-card-features-header-s {
@@ -29,12 +24,6 @@ export default css`
29
24
  text-align: center;
30
25
  }
31
26
 
32
- .bd-card-features-title-s {
33
- font-family: var(--typography-fontFamily-sans);
34
- font-weight: var(--typography-fontWeight-semibold);
35
- font-size: var(--typography-fontSize-2xl);
36
- }
37
-
38
27
  .bd-card-features-track-s {
39
28
  width: 100%;
40
29
  display: grid;
@@ -47,9 +36,12 @@ export default css`
47
36
  flex-direction: row;
48
37
  align-items: flex-start;
49
38
  gap: var(--spacing-16);
50
- background: var(--background-card-grey);
51
- border-radius: var(--spacing-20);
52
- padding: var(--spacing-24);
39
+ background: var(--color-surface-container);
40
+ border-radius: var(--card-radius);
41
+ /* The other content cards are all on 32, and this one is not the small one
42
+ that would justify less: at 431px it is wider than both the card box and
43
+ the light carousel item, which are 304 and 413 and still take 32. */
44
+ padding: var(--card-padding);
53
45
  font-family: var(--typography-fontFamily-sans);
54
46
  box-sizing: border-box;
55
47
  height: 100%;
@@ -75,15 +67,15 @@ export default css`
75
67
  }
76
68
 
77
69
  .bd-card-features-item-title-s {
78
- font-size: var(--typography-fontSize-md);
79
- font-weight: var(--typography-fontWeight-semibold);
80
70
  margin: 0;
81
71
  }
82
72
 
73
+ /* No type here: this selector needs a directly-slotted raw <p>, and every
74
+ consumer slots <bd-p>, so it has never matched anything. The size and
75
+ leading are gone; the rest of the rule is dead by the same proof and is
76
+ left for a follow-up rather than widened into this one. */
83
77
  ::slotted(p) {
84
- font-size: var(--typography-fontSize-sm);
85
- color: var(--color-neutral-700);
86
- line-height: var(--typography-lineHeight-normal);
78
+ color: var(--color-text-secondary);
87
79
  margin: 0;
88
80
  font-family: var(--typography-fontFamily-sans);
89
81
  }
@@ -1,17 +1,21 @@
1
1
  import { LitElement, html } from "lit";
2
- import { tokens } from "../../tokens/tokens.js";
2
+ // Installs the design tokens into document scope; see src/tokens/tokens.js
3
+ import "../../tokens/tokens.js";
3
4
  import "../badge/badge.js";
4
5
  import "../heading/heading.js";
5
6
  import cardFeaturesCSS from "./card-features.css.js";
7
+ import { ensembleCSS } from "../shared/ensemble.css.js";
6
8
 
7
9
  class CardFeatures extends LitElement {
8
10
  static properties = {
9
- title: { type: String }
11
+ title : { type: String },
12
+ headingLevel: { type: Number, attribute: "heading-level" }
10
13
  };
11
14
 
12
15
  constructor() {
13
16
  super();
14
17
  this.title = "";
18
+ this.headingLevel = 2;
15
19
  this._resizeObserver = null;
16
20
  }
17
21
 
@@ -60,13 +64,36 @@ class CardFeatures extends LitElement {
60
64
  });
61
65
  }
62
66
 
67
+
68
+ /**
69
+ * The heading element this section renders. Level is the document-outline
70
+ * question and belongs to whoever composes the page; the type scale is this
71
+ * component's own and does not move with it. Defaults to h2, because a
72
+ * reusable section cannot know it is the only thing on the page, and two of
73
+ * these used to put two h1s on one.
74
+ */
75
+ get _headingTag() {
76
+ const n = Number(this.headingLevel);
77
+ return Number.isInteger(n) && n >= 1 && n <= 6 ? `h${n}` : "h2";
78
+ }
79
+
80
+ /* bd-h already builds the dynamic tag, and it keeps the two questions apart
81
+ the way this component needs: as= is the outline level the page composes,
82
+ visual-level= is the type role, which is ours. Building the element here
83
+ meant re-implementing bd-h and then hand-writing the type on top of it. */
84
+ _renderTitle(className) {
85
+ return html`<bd-h as=${this._headingTag} visual-level="h3" class=${className}
86
+ >${this.title}</bd-h
87
+ >`;
88
+ }
89
+
63
90
  render() {
64
91
  return html`
65
- <section class="bd-card-features-s">
92
+ <section class="bd-ensemble bd-card-features-s">
66
93
  ${this.title
67
94
  ? html`
68
95
  <div class="bd-card-features-header-s">
69
- <h1 class="bd-card-features-title-s">${this.title}</h1>
96
+ ${this._renderTitle("bd-card-features-title-s")}
70
97
  </div>
71
98
  `
72
99
  : null}
@@ -83,15 +110,35 @@ class CardFeaturesItem extends LitElement {
83
110
  title : { type: String },
84
111
  icon : { type: String },
85
112
  badge : { type: String },
86
- badgeVariant: { type: String }
113
+ /* `badge-variant`, which this component documents twice over: the usage
114
+ example in card-features.stories.js writes
115
+ badge-variant="bd-light-blue", and the props table there lists
116
+ `badge-variant` as a documented String input. It was never observed --
117
+ Lit was listening for `badgevariant` -- so the property held its "fill"
118
+ default and every badge rendered the same fill treatment: measured on
119
+ Modules/CardFeatures Default, the item asking for "bd-light-green" came
120
+ out rgb(0, 109, 255), the identical blue as the four asking for
121
+ "bd-light-blue".
122
+
123
+ Zero consumers of the lowercase spelling, so the mapping is safe. The
124
+ value is passed straight through to bd-badge's own `variant`, which is
125
+ where the colour decision lives; nothing about the badge's design
126
+ changes here beyond the variant finally being the one that was asked
127
+ for. */
128
+ badgeVariant: { type: String, attribute: "badge-variant" },
129
+ badgeTone : { type: String },
130
+ headingLevel: { type: Number, attribute: "heading-level" }
87
131
  };
88
132
 
89
133
  constructor() {
90
134
  super();
91
135
  this.title = "";
136
+ this.headingLevel = 3;
92
137
  this.icon = "";
93
138
  this.badge = "";
94
- this.badgeVariant = "";
139
+ // reproduces the blue fill these badges carried before ds-badge
140
+ this.badgeVariant = "fill";
141
+ this.badgeTone = "primary";
95
142
  }
96
143
 
97
144
  _renderIcon() {
@@ -112,6 +159,17 @@ class CardFeaturesItem extends LitElement {
112
159
  return "";
113
160
  }
114
161
 
162
+
163
+ /**
164
+ * One level below the section default. The h5 it used to carry was a type
165
+ * choice, not an outline one, so the size stays on visual-level while the
166
+ * level itself stops skipping three steps below its own section.
167
+ */
168
+ get _headingTag() {
169
+ const n = Number(this.headingLevel);
170
+ return Number.isInteger(n) && n >= 1 && n <= 6 ? `h${n}` : "h3";
171
+ }
172
+
115
173
  render() {
116
174
  return html`
117
175
  <div class="bd-card-features-box-s">
@@ -121,10 +179,11 @@ class CardFeaturesItem extends LitElement {
121
179
  ${this.title
122
180
  ? html`
123
181
  <div class="bd-card-features-title-badge-wrapper-s">
124
- <bd-h as="h5" fontWeight="700" class="bd-card-features-item-title-s">${this.title}</bd-h>
182
+ <bd-h as="${this._headingTag}" visual-level="h5" fontWeight="bold" class="bd-card-features-item-title-s">${this.title}</bd-h>
125
183
  ${this.badge
126
184
  ? html`<bd-badge
127
185
  variant="${this.badgeVariant}"
186
+ tone="${this.badgeTone}"
128
187
  size="sm"
129
188
  >${this.badge}</bd-badge>`
130
189
  : ""}
@@ -138,8 +197,8 @@ class CardFeaturesItem extends LitElement {
138
197
  }
139
198
  }
140
199
 
141
- CardFeatures.styles = [tokens, cardFeaturesCSS];
142
- CardFeaturesItem.styles = [tokens, cardFeaturesCSS];
200
+ CardFeatures.styles = [ensembleCSS, cardFeaturesCSS];
201
+ CardFeaturesItem.styles = [cardFeaturesCSS];
143
202
 
144
203
  customElements.define("bd-card-features-item", CardFeaturesItem);
145
204
  customElements.define("bd-card-features-section", CardFeatures);
@@ -11,7 +11,7 @@ import '../paragraph/paragraph.js';
11
11
  import './card-features.js';
12
12
 
13
13
  export default {
14
- title : 'Components/CardFeatures',
14
+ title : 'Modules/CardFeatures',
15
15
  tags : ['autodocs'],
16
16
  parameters: {
17
17
  docs: {
@@ -26,7 +26,7 @@ export default {
26
26
  badge="NEW"
27
27
  badge-variant="bd-light-blue"
28
28
  >
29
- <bd-individual-icon slot="icon" width="32" height="32" color="#006DFF"></bd-individual-icon>
29
+ <bd-individual-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-individual-icon>
30
30
  <bd-p>Specialized AI chatbot that helps you identify suspicious online interactions.</bd-p>
31
31
  </bd-card-features-item>
32
32
  </bd-card-features-section>
@@ -45,15 +45,15 @@ export default {
45
45
  };
46
46
 
47
47
  const iconMap = [
48
- html`<bd-individual-icon slot="icon" width="32" height="32" color="#006DFF"></bd-individual-icon>`,
49
- html`<bd-globe-icon slot="icon" width="32" height="32" color="#006DFF"></bd-globe-icon>`,
50
- html`<bd-machine-learning-icon slot="icon" width="32" height="32" color="#006DFF"></bd-machine-learning-icon>`,
51
- html`<bd-analysis-icon slot="icon" width="32" height="32" color="#006DFF"></bd-analysis-icon>`,
52
- html`<bd-family-icon slot="icon" width="32" height="32" color="#006DFF"></bd-family-icon>`,
53
- html`<bd-arrow-up-icon slot="icon" width="32" height="32" color="#006DFF"></bd-arrow-up-icon>`,
54
- html`<bd-close-icon slot="icon" width="32" height="32" color="#006DFF"></bd-close-icon>`,
55
- html`<bd-globe-icon slot="icon" width="32" height="32" color="#006DFF"></bd-globe-icon>`,
56
- html`<bd-analysis-icon slot="icon" width="32" height="32" color="#006DFF"></bd-analysis-icon>`
48
+ html`<bd-individual-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-individual-icon>`,
49
+ html`<bd-globe-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-globe-icon>`,
50
+ html`<bd-machine-learning-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-machine-learning-icon>`,
51
+ html`<bd-analysis-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-analysis-icon>`,
52
+ html`<bd-family-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-family-icon>`,
53
+ html`<bd-arrow-up-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-arrow-up-icon>`,
54
+ html`<bd-close-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-close-icon>`,
55
+ html`<bd-globe-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-globe-icon>`,
56
+ html`<bd-analysis-icon slot="icon" width="32" height="32" color="var(--color-blue-500)"></bd-analysis-icon>`
57
57
  ];
58
58
 
59
59
  const items = [
@@ -1,34 +1,22 @@
1
- import { css } from "lit";
1
+ import { css, unsafeCSS } from "lit";
2
+ import { above, below } from "../shared/token-scales.js";
2
3
 
3
4
  export default css`
4
5
  :host {
5
6
  display: block;
6
- --background-card-grey: var(--color-neutral-25);
7
- --border-card-grey: var(--color-neutral-50);
8
7
  --bd-card-cols: 4;
9
- max-width: 1290px;
10
- margin: 0 auto;
11
8
  }
12
9
 
13
- ::slotted([slot="icon"]) {
14
- max-width: 120px !important;
15
- max-height: 120px !important;
16
- object-fit: contain !important;
17
- display: block !important;
18
- }
19
10
 
20
11
  ::slotted(bd-card-item) {
21
12
  display: block;
22
13
  width: var(--bd-card-width, 280px);
23
14
  flex: 0 0 var(--bd-card-width, 280px);
24
15
  min-width: 200px;
25
- margin: 0 !important;
16
+ margin: 0;
26
17
  }
27
18
 
28
19
  .bd-section-title-s {
29
- font-family: var(--typography-fontFamily-sans);
30
- font-weight: var(--typography-fontWeight-semibold);
31
- font-size: 2em;
32
20
  text-align: center;
33
21
  margin: 0;
34
22
  }
@@ -36,7 +24,7 @@ export default css`
36
24
  .bd-section-subtitle-s {
37
25
  font-family: var(--typography-fontFamily-sans);
38
26
  font-size: var(--typography-body-regular-fontSize);
39
- color: var(--color-neutral-700);
27
+ color: var(--color-text-secondary);
40
28
  text-align: center;
41
29
  margin: var(--spacing-8) 0 0 0;
42
30
  }
@@ -53,7 +41,7 @@ export default css`
53
41
  /* Outline-variant sections get extra top padding above the header,
54
42
  per the reference design. */
55
43
  :host([variant="outline"]) .bd-header-light-carousel-s {
56
- padding-top: 80px;
44
+ padding-top: var(--spacing-80);
57
45
  }
58
46
 
59
47
  .bd-light-carousel-s {
@@ -63,7 +51,6 @@ export default css`
63
51
  position: relative;
64
52
  width: 100%;
65
53
  flex-direction: column;
66
- max-width: 1290px;
67
54
  margin: 0 auto;
68
55
  padding-top: var(--spacing-64);
69
56
  padding-bottom: var(--spacing-64);
@@ -80,17 +67,17 @@ export default css`
80
67
  }
81
68
 
82
69
  .bd-light-box-s {
83
- background: var(--background-card-grey);
84
- border-radius: var(--spacing-20);
85
- padding: var(--spacing-32);
70
+ background: var(--color-surface-container);
71
+ border-radius: var(--card-radius);
72
+ padding: var(--card-padding);
86
73
  display: flex;
87
74
  flex-direction: column;
88
75
  align-items: flex-start;
89
76
  justify-content: flex-start;
90
77
  text-align: start;
91
- transition: transform 0.2s ease-in-out;
78
+ transition: transform var(--transition-duration-normal) var(--transition-easing-smooth);
92
79
  position: relative;
93
- z-index: 2;
80
+ z-index: var(--z-raised);
94
81
  font-family: var(--typography-fontFamily-sans);
95
82
  box-sizing: border-box;
96
83
  width: 100%;
@@ -98,17 +85,17 @@ export default css`
98
85
  }
99
86
 
100
87
  .bd-light-box-blue {
101
- background: #E4F2FF !important;
88
+ background: var(--status-brand-surface);
102
89
  }
103
90
 
104
91
  /* === OUTLINE VARIANT — bordered, tinted, fully centered card. Set
105
92
  variant="outline" on bd-card-section (propagates to items) or on an
106
93
  individual bd-card-item to opt it in/out per-card. === */
107
94
  .bd-light-box-outline {
108
- background-color: var(--color-neutral-25);
109
- border: 2px solid var(--color-blue-500);
110
- border-radius: var(--radius-2xl, 1rem);
111
- padding: 40px;
95
+ background-color: var(--color-surface-container);
96
+ border: var(--border-width-2) solid var(--color-border-brand);
97
+ border-radius: var(--radius-2xl);
98
+ padding: var(--spacing-40);
112
99
  align-items: center !important;
113
100
  justify-content: center !important;
114
101
  text-align: center !important;
@@ -127,18 +114,18 @@ export default css`
127
114
  .bd-light-box-outline .bd-card-title-group {
128
115
  align-items: center;
129
116
  text-align: center;
130
- margin-top: 60px;
117
+ margin-top: var(--spacing-64);
131
118
  }
132
119
 
133
120
  .bd-light-box-outline .bd-card-title-group bd-h {
134
- color: var(--color-blue-500, #006dff);
121
+ color: var(--color-text-brand);
135
122
  text-align: center;
136
123
  }
137
124
 
138
125
  .bd-light-box-outline .bd-card-item-subtitle,
139
126
  .bd-light-box-outline .bd-card-content-wrapper p,
140
127
  .bd-light-box-outline .bd-card-content-wrapper ::slotted(*) {
141
- color: var(--color-neutral-700);
128
+ color: var(--color-text-secondary);
142
129
  text-align: center;
143
130
  }
144
131
 
@@ -152,9 +139,9 @@ export default css`
152
139
  }
153
140
 
154
141
  .bd-light-box-center {
155
- align-items: center !important;
156
- justify-content: center !important;
157
- text-align: center !important;
142
+ align-items: center;
143
+ justify-content: center;
144
+ text-align: center;
158
145
  }
159
146
 
160
147
  .bd-light-box-center .bd-light-box-header-s {
@@ -174,30 +161,6 @@ export default css`
174
161
  justify-content: center;
175
162
  }
176
163
 
177
- .bd-light-box-s h3 {
178
- font-size: var(--heading-xsmall);
179
- margin: var(--spacing-0) var(--spacing-8) var(--spacing-8) var(--spacing-0);
180
- font-weight: 600;
181
- font-family: var(--typography-fontFamily-sans);
182
- text-align: start;
183
- }
184
-
185
- .bd-light-box-center h3 {
186
- text-align: center !important;
187
- margin: var(--spacing-0) var(--spacing-0) var(--spacing-8) var(--spacing-0) !important;
188
- }
189
-
190
- .bd-light-box-s p {
191
- font-size: var(--spacing-16);
192
- margin: var(--spacing-0) var(--spacing-0) 1em var(--spacing-0);
193
- font-family: var(--typography-fontFamily-sans);
194
- text-align: start;
195
- }
196
-
197
- .bd-light-box-center p {
198
- text-align: center !important;
199
- }
200
-
201
164
  .bd-light-icon-s {
202
165
  max-width: 120px;
203
166
  max-height: 120px;
@@ -220,7 +183,7 @@ export default css`
220
183
  .bd-light-title-badge-wrapper-s {
221
184
  display: flex;
222
185
  align-items: flex-start;
223
- gap: var(--spacing-4, 4px);
186
+ gap: var(--spacing-4);
224
187
  overflow: hidden;
225
188
  margin-bottom: var(--spacing-8);
226
189
  width: 100%;
@@ -235,10 +198,14 @@ export default css`
235
198
 
236
199
  .bd-card-item-subtitle {
237
200
  font-family: var(--typography-fontFamily-sans);
238
- font-size: var(--typography-fontSize-sm);
239
- color: var(--color-neutral-600);
201
+ /* body-small: sm / normal / 1.5, which is what this already rendered on all
202
+ three axes. Only the axes this rule declares are adopted -- the role also
203
+ carries a family and a tracking, and importing those would change text
204
+ the rule never spoke for. */
205
+ font-size: var(--typography-body-small-fontSize);
206
+ color: var(--color-text-muted);
240
207
  margin: 0;
241
- line-height: var(--typography-lineHeight-normal);
208
+ line-height: var(--typography-body-small-lineHeight);
242
209
  }
243
210
 
244
211
  .bd-card-content-wrapper {
@@ -266,13 +233,13 @@ export default css`
266
233
  content wraps differently. Row counts come from _syncAlignRows(). Row gaps
267
234
  between tracks stay 0 so spacing inside cards is unchanged; spacing
268
235
  between wrapped card rows comes from the item margin instead. === */
269
- @media (min-width: 769px) {
236
+ @media ${unsafeCSS(above('md'))} {
270
237
  :host([align-rows]) .bd-light-carousel-track-s {
271
238
  display: grid;
272
239
  grid-template-columns: repeat(var(--bd-card-cols), minmax(0, 1fr));
273
- column-gap: 1.5rem;
240
+ column-gap: var(--spacing-24);
274
241
  row-gap: 0;
275
- margin-bottom: -1.5rem;
242
+ margin-bottom: calc(-1 * var(--spacing-24));
276
243
  }
277
244
 
278
245
  :host([align-rows]) ::slotted(bd-card-item) {
@@ -281,7 +248,7 @@ export default css`
281
248
  grid-row: span var(--bd-card-rows, 4);
282
249
  width: auto;
283
250
  min-width: 0;
284
- margin: 0 0 1.5rem !important;
251
+ margin: 0 0 var(--spacing-24) !important;
285
252
  }
286
253
 
287
254
  :host([align-rows]) .bd-light-box-s {
@@ -323,7 +290,7 @@ export default css`
323
290
  }
324
291
 
325
292
 
326
- @media (max-width: 768px) {
293
+ @media ${unsafeCSS(below('md'))} {
327
294
  .bd-light-carousel-track-s {
328
295
  flex-direction: column;
329
296
  gap: var(--spacing-20);
@@ -334,23 +301,35 @@ export default css`
334
301
  padding: 0 20px;
335
302
  }
336
303
  ::slotted(bd-card-item) {
337
- width: 100% !important;
338
- max-width: 100% !important;
339
- flex: 0 0 auto !important;
340
- min-width: 0 !important;
341
- margin: 0 auto !important;
342
- padding: 0 20px;
343
-
304
+ width: 100%;
305
+ max-width: 100%;
306
+ flex: 0 0 auto;
307
+ min-width: 0;
308
+ margin: 0 auto;
309
+ padding: 0 20px;
310
+ /* The gutters have to sit inside the 100%, exactly as they already do on
311
+ the box below. Without this the item is the full column plus 40px and
312
+ pushes the page 24px wider than the phone. */
313
+ box-sizing: border-box;
344
314
  }
345
315
 
346
316
  .bd-light-box-s {
347
- width: 100% !important;
348
- max-width: 100% !important;
349
- min-width: 0 !important;
350
- flex: none !important;
351
- margin: 0 !important;
352
- box-sizing: border-box !important;
317
+ width: 100%;
318
+ max-width: 100%;
319
+ min-width: 0;
320
+ flex: none;
321
+ margin: 0;
322
+ box-sizing: border-box;
353
323
  }
354
324
  }
355
325
 
356
- `;
326
+
327
+ /* A reader who asked for less motion was still getting the card lift. Twenty-three
328
+ of the thirty animated directories in this package honour the query; this
329
+ one did not. */
330
+ @media (prefers-reduced-motion: reduce) {
331
+ .bd-light-box-s {
332
+ transition: none;
333
+ }
334
+ }
335
+ `;