@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
@@ -2,41 +2,121 @@
2
2
  import { html } from "lit";
3
3
  import "./analysis-icon.js";
4
4
  import "./arrow-down-icon.js";
5
+ import "./arrow-icon.js";
6
+ import "./arrow-right-icon.js";
5
7
  import "./arrow-up-icon.js";
6
- import "./av-comparatives-icon.js";
7
- import "./best-brands-icon.js";
8
+ import "./check-icon.js";
9
+ import "./circle-info-icon.js";
8
10
  import "./close-icon.js";
9
11
  import "./family-icon.js";
10
12
  import "./globe-icon.js";
13
+ import "./guide-icon.js";
11
14
  import "./individual-icon.js";
12
15
  import "./laurel-icon.js";
13
16
  import "./machine-learning-icon.js";
14
17
  import "./minus-icon.js";
15
- import "./pc-mag-2024-icon.js";
16
- import "./pc-mag-business-icon.js";
17
- import "./pc-mag-icon.js";
18
- import "./pc-mag-readers-icon.js";
19
18
  import "./plus-icon.js";
20
- import "./top-product-icon.js";
21
19
 
22
20
  export default {
23
- title : "Icons",
24
- tags : ["autodocs"],
21
+ title : 'Atoms/Icon',
22
+ tags : ['autodocs'],
23
+ parameters: {
24
+ docs: {
25
+ description: {
26
+ component: `
27
+ Twelve tintable interface icons, each its own custom element.
28
+
29
+ They take a \`size\` step from the icon scale and are drawn in \`currentColor\`, so
30
+ an icon follows the text it sits beside and most uses need no colour at all.
31
+
32
+ \`bd-arrow-icon\`, \`bd-arrow-down-icon\`, \`bd-arrow-right-icon\`,
33
+ \`bd-arrow-up-icon\`, \`bd-check-icon\`, \`bd-circle-info-icon\`,
34
+ \`bd-close-icon\`, \`bd-family-icon\`, \`bd-globe-icon\`,
35
+ \`bd-individual-icon\`, \`bd-minus-icon\`, \`bd-plus-icon\`,
36
+ \`bd-analysis-icon\`, \`bd-guide-icon\`, \`bd-machine-learning-icon\`,
37
+ \`bd-laurel-icon\`
38
+
39
+ ### The brand and award marks live in Atoms/Brand mark
40
+ Eight wordmarks and award badges used to sit here — \`bd-pc-mag-icon\` and the
41
+ rest. They are not icons: they carry their own colours, their own aspect ratios
42
+ (52×48, 68×37, 126×15) and no \`size\` prop, so under this section's rules they
43
+ read as eight exceptions rather than as a family. They are documented in
44
+ **Atoms/Brand mark**, with the reasons they behave differently.
45
+
46
+ ### Usage
47
+ \`\`\`html
48
+ <bd-close-icon></bd-close-icon> <!-- the size it was drawn at -->
49
+ <bd-plus-icon size="lg"></bd-plus-icon> <!-- a step on the icon scale -->
50
+ <bd-globe-icon color="var(--color-text-brand)"></bd-globe-icon>
51
+ \`\`\`
52
+
53
+ ### Props — interface icons
54
+ | Prop | Values | Default |
55
+ |---|---|---|
56
+ | \`size\` | \`xs\` \`sm\` \`md\` \`lg\` \`xl\` \`2xl\` \`3xl\` → \`var(--icon-*-size)\` | the step the artwork was drawn at |
57
+ | \`color\` | any colour; normally left unset | \`currentColor\` |
58
+ | \`width\`, \`height\` | **deprecated** — a pixel size, still honoured | unset |
59
+
60
+ ### What changed, and why
61
+ These used to take \`width\` and \`height\` as numbers written straight into the
62
+ SVG attributes, so no caller could pass \`var(--icon-md-size)\` — which is why
63
+ twenty of the twenty-three \`--icon-*\` tokens had no consumer at all. Defaults
64
+ were 16, 18, 20, 32, 48, 48×49 and 80, three of them on no scale, and the
65
+ colour default was one of three different things depending on the file,
66
+ including the literal string \`"white"\` — so an unstyled \`bd-close-icon\` was
67
+ invisible on a white page.
68
+
69
+ An off-scale \`size\` is dropped rather than passed through, so a typo falls
70
+ back to the icon's own size instead of rendering something arbitrary.
71
+
72
+ \`bd-laurel-icon\` keeps an 80px default, which is off the scale: the scale
73
+ stops at 64, and shrinking the awards wreath by a fifth is a design decision
74
+ rather than a cleanup. It carries a \`no token:\` reason saying so.
75
+
76
+
77
+ ### Pass a token, not a hex value
78
+ \`color\` goes straight into the SVG's \`fill\`, so it accepts any CSS colour — but
79
+ per the foundation rule it should be a token reference such as
80
+ \`var(--color-neutral-900)\`, or better \`currentColor\` so the icon follows the
81
+ text it sits beside. A raw hex value here is the same drift the tokens exist to
82
+ prevent.
83
+
84
+ ### Known inconsistencies
85
+ - **\`bd-laurel-icon\` keeps an 80px default**, off the scale, which stops at 64.
86
+ Shrinking the awards wreath by a fifth is a design decision rather than a
87
+ cleanup, so it carries a \`no token:\` reason saying so.
88
+
89
+ ### Accessibility
90
+ Every icon renders its SVG with \`aria-hidden="true"\`, so it is decorative by
91
+ default. That is correct next to a text label. When an icon is the only content
92
+ of a control, put the name on the control — \`aria-label\` on the button, or
93
+ \`<bd-visually-hidden>\` text inside it — because the icon itself will never be
94
+ announced.
95
+ `
96
+ }
97
+ }
98
+ },
25
99
  argTypes: {
26
100
  width: {
27
- control : { type: "number", min: 8, max: 128, step: 4 },
28
- description : "Lățimea iconiței",
29
- defaultValue: 24
101
+ control : { type: 'number', min: 8, max: 200, step: 1 },
102
+ description: 'Rendered width in pixels. Defaults differ per icon, so set it explicitly.',
103
+ table : { type: { summary: 'number' }, defaultValue: { summary: "varies" }, category: 'Size' }
30
104
  },
31
105
  height: {
32
- control : { type: "number", min: 8, max: 128, step: 4 },
33
- description : "Înălțimea iconiței",
34
- defaultValue: 24
106
+ control : { type: 'number', min: 8, max: 200, step: 1 },
107
+ description: 'Rendered height in pixels. Defaults differ per icon, so set it explicitly.',
108
+ table : { type: { summary: 'number' }, defaultValue: { summary: "varies" }, category: 'Size' }
109
+ },
110
+ size: {
111
+ control : { type: 'select' },
112
+ options : ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
113
+ description: 'A step on the icon scale, which is what the manifest asks for — width and height above are the deprecated spelling and are kept because consumers still pass them. The host takes its HEIGHT from the step and lets width follow, so an icon keeps its own aspect ratio.',
114
+ table : { type: { summary: 'string' }, defaultValue: { summary: "varies" }, category: 'Size' }
35
115
  },
36
116
  color: {
37
- control : { type: "color" },
38
- description : "Culoarea iconiței (fill)",
39
- defaultValue: "#006DFF"
117
+ control : 'text',
118
+ description: 'Fill colour. Pass a token reference such as var(--color-neutral-900), or currentColor. Interface icons only — brand marks have no color prop.',
119
+ table : { type: { summary: 'string' }, defaultValue: { summary: "varies" }, category: 'Appearance' }
40
120
  }
41
121
  }
42
122
  };
@@ -121,6 +201,66 @@ export const AnalysisIcon = {
121
201
  `
122
202
  };
123
203
 
204
+ /* ─── Icons that had no story of their own ─────────────────────────────────
205
+ Four of these were drawn or adopted today and only ever reached the All
206
+ Icons gallery, which disables controls — so they had no sidebar entry and
207
+ no way to exercise size or colour. guide and laurel predate that. These
208
+ take `size`, the step the manifest asks for, rather than the deprecated
209
+ width/height pair the ten stories above still use. */
210
+
211
+ export const ArrowIcon = {
212
+ name : "Arrow",
213
+ args : { size: "sm", color: "#006DFF" },
214
+ render: ({ size, color }) => html`
215
+ <bd-arrow-icon size="${size}" color="${color}"></bd-arrow-icon>
216
+ `,
217
+ parameters: { docs: { description: { story: 'The only TRUE arrow in the set — a shaft with a head. `bd-arrow-up-icon`, `bd-arrow-down-icon` and `bd-arrow-right-icon` are chevrons despite their names.' } } }
218
+ };
219
+
220
+ export const ArrowRightIcon = {
221
+ name : "Arrow Right",
222
+ args : { size: "md", color: "#006DFF" },
223
+ render: ({ size, color }) => html`
224
+ <bd-arrow-right-icon size="${size}" color="${color}"></bd-arrow-right-icon>
225
+ `,
226
+ parameters: { docs: { description: { story: 'A CHEVRON, not a shafted arrow — reach for `bd-arrow-icon` if you want the arrow. On the same fill weight as `bd-arrow-up-icon` and `bd-arrow-down-icon` — all three measure a 2.5-unit edge offset against the light weight 1.25, so the family reads as one set.' } } }
227
+ };
228
+
229
+ export const CheckIcon = {
230
+ name : "Check",
231
+ args : { size: "sm", color: "#006DFF" },
232
+ render: ({ size, color }) => html`
233
+ <bd-check-icon size="${size}" color="${color}"></bd-check-icon>
234
+ `
235
+ };
236
+
237
+ export const CircleInfoIcon = {
238
+ name : "Circle Info",
239
+ args : { size: "xl", color: "#006DFF" },
240
+ render: ({ size, color }) => html`
241
+ <bd-circle-info-icon size="${size}" color="${color}"></bd-circle-info-icon>
242
+ `,
243
+ parameters: { docs: { description: { story: 'The icon `bd-alert` shows by default for every tone. It was a `bd-missing-icon` placeholder until the artwork arrived.' } } }
244
+ };
245
+
246
+ export const GuideIcon = {
247
+ name : "Guide",
248
+ args : { size: "2xl", color: "#006DFF" },
249
+ render: ({ size, color }) => html`
250
+ <bd-guide-icon size="${size}" color="${color}"></bd-guide-icon>
251
+ `,
252
+ parameters: { docs: { description: { story: 'Byte-identical artwork to `bd-analysis-icon`, and it has no consumer outside these stories. One of the two is probably meant to be a different drawing.' } } }
253
+ };
254
+
255
+ export const LaurelIcon = {
256
+ name : "Laurel",
257
+ args : { width: 80, height: 64, color: "#006DFF" },
258
+ render: ({ width, height, color }) => html`
259
+ <bd-laurel-icon width="${width}" height="${height}" color="${color}"></bd-laurel-icon>
260
+ `,
261
+ parameters: { docs: { description: { story: 'Keeps width/height rather than `size` on purpose: its 80px default is off the icon scale, which stops at 64.' } } }
262
+ };
263
+
124
264
  export const AllIcons = {
125
265
  name : "All Icons",
126
266
  parameters: { controls: { disable: true } },
@@ -144,82 +284,74 @@ export const AllIcons = {
144
284
  .icon-item span {
145
285
  font-size: 12px;
146
286
  color: #6b7280;
147
- font-family: monospace;
287
+ font-family: var(--typography-fontFamily-mono);
148
288
  text-align: center;
149
289
  }
150
290
  </style>
151
291
  <div class="icons-grid">
152
292
  <div class="icon-item">
153
- <bd-plus-icon width="24" height="24" color="#006DFF"></bd-plus-icon>
293
+ <bd-plus-icon width="24" height="24" color="var(--color-blue-500)"></bd-plus-icon>
154
294
  <span>bd-plus-icon</span>
155
295
  </div>
156
296
  <div class="icon-item">
157
- <bd-minus-icon width="24" height="24" color="#006DFF"></bd-minus-icon>
297
+ <bd-minus-icon width="24" height="24" color="var(--color-blue-500)"></bd-minus-icon>
158
298
  <span>bd-minus-icon</span>
159
299
  </div>
160
300
  <div class="icon-item">
161
- <bd-individual-icon width="32" height="32" color="#006DFF"></bd-individual-icon>
301
+ <bd-individual-icon width="32" height="32" color="var(--color-blue-500)"></bd-individual-icon>
162
302
  <span>bd-individual-icon</span>
163
303
  </div>
164
304
  <div class="icon-item">
165
- <bd-family-icon width="32" height="32" color="#006DFF"></bd-family-icon>
305
+ <bd-family-icon width="32" height="32" color="var(--color-blue-500)"></bd-family-icon>
166
306
  <span>bd-family-icon</span>
167
307
  </div>
168
308
  <div class="icon-item">
169
- <bd-globe-icon width="20" height="20" color="#006DFF"></bd-globe-icon>
309
+ <bd-globe-icon width="20" height="20" color="var(--color-blue-500)"></bd-globe-icon>
170
310
  <span>bd-globe-icon</span>
171
311
  </div>
172
312
  <div class="icon-item">
173
- <bd-close-icon width="18" height="18" color="#006DFF"></bd-close-icon>
313
+ <bd-close-icon width="18" height="18" color="var(--color-blue-500)"></bd-close-icon>
174
314
  <span>bd-close-icon</span>
175
315
  </div>
176
316
  <div class="icon-item">
177
- <bd-arrow-up-icon width="20" height="20" color="#006DFF"></bd-arrow-up-icon>
317
+ <bd-arrow-up-icon width="20" height="20" color="var(--color-blue-500)"></bd-arrow-up-icon>
178
318
  <span>bd-arrow-up-icon</span>
179
319
  </div>
180
320
  <div class="icon-item">
181
- <bd-arrow-down-icon width="20" height="20" color="#006DFF"></bd-arrow-down-icon>
182
- <span>bd-arrow-down-icon</span>
183
- </div>
184
- <div class="icon-item">
185
- <bd-machine-learning-icon width="48" height="48" color="#006DFF"></bd-machine-learning-icon>
186
- <span>bd-machine-learning-icon</span>
187
- </div>
188
- <div class="icon-item">
189
- <bd-analysis-icon width="48" height="48" color="#006DFF"></bd-analysis-icon>
190
- <span>bd-analysis-icon</span>
321
+ <bd-arrow-right-icon size="md" color="var(--color-blue-500)"></bd-arrow-right-icon>
322
+ <span>bd-arrow-right-icon</span>
191
323
  </div>
192
324
  <div class="icon-item">
193
- <bd-av-comparatives-icon width="48" height="48"></bd-av-comparatives-icon>
194
- <span>bd-av-comparatives-icon</span>
325
+ <bd-arrow-icon size="md" color="var(--color-blue-500)"></bd-arrow-icon>
326
+ <span>bd-arrow-icon</span>
195
327
  </div>
196
328
  <div class="icon-item">
197
- <bd-best-brands-icon width="48" height="48"></bd-best-brands-icon>
198
- <span>bd-best-brands-icon</span>
329
+ <bd-check-icon size="md" color="var(--color-blue-500)"></bd-check-icon>
330
+ <span>bd-check-icon</span>
199
331
  </div>
200
332
  <div class="icon-item">
201
- <bd-laurel-icon width="48" height="48"></bd-laurel-icon>
202
- <span>bd-laurel-icon</span>
333
+ <bd-circle-info-icon size="md" color="var(--color-blue-500)"></bd-circle-info-icon>
334
+ <span>bd-circle-info-icon</span>
203
335
  </div>
204
336
  <div class="icon-item">
205
- <bd-pc-mag-2024-icon width="48" height="48"></bd-pc-mag-2024-icon>
206
- <span>bd-pc-mag-2024-icon</span>
337
+ <bd-arrow-down-icon width="20" height="20" color="var(--color-blue-500)"></bd-arrow-down-icon>
338
+ <span>bd-arrow-down-icon</span>
207
339
  </div>
208
340
  <div class="icon-item">
209
- <bd-pc-mag-business-icon width="48" height="48"></bd-pc-mag-business-icon>
210
- <span>bd-pc-mag-business-icon</span>
341
+ <bd-machine-learning-icon width="48" height="48" color="var(--color-blue-500)"></bd-machine-learning-icon>
342
+ <span>bd-machine-learning-icon</span>
211
343
  </div>
212
344
  <div class="icon-item">
213
- <bd-pc-mag-icon width="48" height="48"></bd-pc-mag-icon>
214
- <span>bd-pc-mag-icon</span>
345
+ <bd-analysis-icon width="48" height="48" color="var(--color-blue-500)"></bd-analysis-icon>
346
+ <span>bd-analysis-icon</span>
215
347
  </div>
216
348
  <div class="icon-item">
217
- <bd-pc-mag-readers-icon width="37" height="64"></bd-pc-mag-readers-icon>
218
- <span>bd-pc-mag-readers-icon</span>
349
+ <bd-guide-icon width="48" height="48" color="var(--color-blue-500)"></bd-guide-icon>
350
+ <span>bd-guide-icon</span>
219
351
  </div>
220
352
  <div class="icon-item">
221
- <bd-top-product-icon width="48" height="48"></bd-top-product-icon>
222
- <span>bd-top-product-icon</span>
353
+ <bd-laurel-icon width="48" height="48"></bd-laurel-icon>
354
+ <span>bd-laurel-icon</span>
223
355
  </div>
224
356
  </div>
225
357
  `
@@ -1,26 +1,14 @@
1
1
  // icons/individual-icon.js
2
- import { LitElement, css, html } from "lit";
2
+ import { html } from "lit";
3
+ import { BdIconElement } from "./icon-element.js";
3
4
 
4
- class IndividualIcon extends LitElement {
5
- static properties = {
6
- width : { type: Number },
7
- height: { type: Number },
8
- color : { type: String }
9
- };
10
-
11
- constructor() {
12
- super();
13
- this.width = 32;
14
- this.height = 32;
15
- this.color = "currentColor";
16
- }
17
-
18
- static styles = css`:host { display: inline-flex; }`;
5
+ class IndividualIcon extends BdIconElement {
6
+ static defaultSize = "xl";
19
7
 
20
8
  render() {
21
9
  return html`
22
- <svg xmlns="http://www.w3.org/2000/svg" width="${this.width}" height="${this.height}" viewBox="0 0 32 32" fill="none" aria-hidden="true">
23
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.1154 5.42846C11.0158 6.39902 10.1576 7.97293 10.1576 10.4303C10.1576 14.2122 11.2398 16.6474 13.1651 18.0413C13.7542 18.4678 14.5777 18.842 15.9997 18.842C17.4157 18.842 18.2942 18.4324 18.8344 18.0413C20.7597 16.6474 21.8419 14.2122 21.8419 10.4303C21.8419 7.97293 20.9837 6.39902 19.8841 5.42846C18.7585 4.43503 17.2951 3.99994 15.9997 3.99994C14.7044 3.99994 13.241 4.43503 12.1154 5.42846ZM10.792 3.929C12.3375 2.56485 14.2951 1.99994 15.9997 1.99994C17.7044 1.99994 19.662 2.56485 21.2075 3.929C22.779 5.31602 23.8419 7.45729 23.8419 10.4303C23.8419 14.3066 22.793 17.3385 20.4997 19.276V20.3089C20.4997 20.7959 20.8184 21.2255 21.2845 21.3667L22.9476 21.8707C25.2447 22.5667 26.8155 24.6841 26.8155 27.0843V30.0526H24.8155V27.0843C24.8155 25.5653 23.8214 24.2252 22.3676 23.7847L20.7045 23.2807C19.4382 22.897 18.5591 21.7556 18.5026 20.4434C17.8123 20.6859 16.9853 20.842 15.9997 20.842C15.005 20.842 14.1865 20.6944 13.4965 20.4513C13.4369 21.7602 12.5587 22.8978 11.295 23.2807L9.63186 23.7847C8.17811 24.2252 7.18396 25.5653 7.18396 27.0843V30.0526H5.18396V27.0843C5.18396 24.6841 6.75481 22.5667 9.05185 21.8707L10.715 21.3667C11.1811 21.2255 11.4997 20.7959 11.4997 20.3089V19.276C9.2065 17.3385 8.15764 14.3066 8.15764 10.4303C8.15764 7.45729 9.22051 5.31602 10.792 3.929Z" fill="${this.color}"/>
10
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" aria-hidden="true">
11
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.1154 5.42846C11.0158 6.39902 10.1576 7.97293 10.1576 10.4303C10.1576 14.2122 11.2398 16.6474 13.1651 18.0413C13.7542 18.4678 14.5777 18.842 15.9997 18.842C17.4157 18.842 18.2942 18.4324 18.8344 18.0413C20.7597 16.6474 21.8419 14.2122 21.8419 10.4303C21.8419 7.97293 20.9837 6.39902 19.8841 5.42846C18.7585 4.43503 17.2951 3.99994 15.9997 3.99994C14.7044 3.99994 13.241 4.43503 12.1154 5.42846ZM10.792 3.929C12.3375 2.56485 14.2951 1.99994 15.9997 1.99994C17.7044 1.99994 19.662 2.56485 21.2075 3.929C22.779 5.31602 23.8419 7.45729 23.8419 10.4303C23.8419 14.3066 22.793 17.3385 20.4997 19.276V20.3089C20.4997 20.7959 20.8184 21.2255 21.2845 21.3667L22.9476 21.8707C25.2447 22.5667 26.8155 24.6841 26.8155 27.0843V30.0526H24.8155V27.0843C24.8155 25.5653 23.8214 24.2252 22.3676 23.7847L20.7045 23.2807C19.4382 22.897 18.5591 21.7556 18.5026 20.4434C17.8123 20.6859 16.9853 20.842 15.9997 20.842C15.005 20.842 14.1865 20.6944 13.4965 20.4513C13.4369 21.7602 12.5587 22.8978 11.295 23.2807L9.63186 23.7847C8.17811 24.2252 7.18396 25.5653 7.18396 27.0843V30.0526H5.18396V27.0843C5.18396 24.6841 6.75481 22.5667 9.05185 21.8707L10.715 21.3667C11.1811 21.2255 11.4997 20.7959 11.4997 20.3089V19.276C9.2065 17.3385 8.15764 14.3066 8.15764 10.4303C8.15764 7.45729 9.22051 5.31602 10.792 3.929Z" fill="currentColor"/>
24
12
  </svg>
25
13
  `;
26
14
  }
@@ -1,27 +1,17 @@
1
1
  // icons/laurel-icon.js
2
- import { LitElement, css, html } from "lit";
2
+ import { html } from "lit";
3
+ import { BdIconElement } from "./icon-element.js";
3
4
 
4
- class LaurelIcon extends LitElement {
5
- static properties = {
6
- width : { type: Number },
7
- height: { type: Number },
8
- color : { type: String }
9
- };
10
-
11
- constructor() {
12
- super();
13
- this.width = 80;
14
- this.height = 80;
15
- this.color = "currentColor"
16
- }
17
-
18
- static styles = css`:host { display: inline-flex; }`;
5
+ class LaurelIcon extends BdIconElement {
6
+ /* no token: the icon scale stops at 3xl (64px) and the laurel is drawn at 80.
7
+ Dropping it to 64 shrinks the wreath in the awards section by a fifth,
8
+ which is a design decision rather than a cleanup, so the size stays off
9
+ the scale until someone makes it. A caller can still pass a step. */
10
+ static defaultSize = "80px";
19
11
 
20
12
  render() {
21
13
  return html`
22
14
  <svg
23
- width="${this.width}"
24
- height="${this.height}"
25
15
  viewBox="0 0 80 80"
26
16
  fill="none"
27
17
  xmlns="http://www.w3.org/2000/svg"
@@ -29,7 +19,7 @@ class LaurelIcon extends LitElement {
29
19
  >
30
20
  <path
31
21
  d="M48.0751 11.994C48.0751 17.6107 52.457 21.9791 58.0908 21.9791C58.0908 16.4873 53.5837 11.994 48.0751 11.994ZM61.8466 19.7325C62.9734 16.737 65.1017 13.9911 68.1064 12.2437C68.9828 11.7444 70.1096 12.1189 70.6103 12.8677L72.7387 16.6121C75.3678 21.1054 75.493 26.3476 73.615 30.8409C74.9922 30.3417 76.6197 29.9672 78.2473 29.9672C79.2488 29.9672 80 30.8409 80 31.8394V35.9583C80 41.2005 77.4961 45.8186 73.615 48.8141C75.2426 49.0637 76.7449 49.563 78.1221 50.4367C78.9984 50.9359 79.2488 52.0592 78.8732 52.8081L76.7449 56.5525C73.2394 62.5436 66.4789 65.4143 60.0939 64.291L59.4679 64.0414C57.9656 63.2925 56.4632 62.6684 54.9609 62.0443C53.8341 61.6699 52.7074 61.2955 51.4554 61.0458C58.9671 57.0518 64.1002 49.0637 64.1002 39.9523C64.1002 34.835 62.2222 29.9672 59.0923 25.9732H58.0908C50.3286 25.9732 44.0689 19.7325 44.0689 11.994V9.99702C44.0689 8.99851 44.9452 8 46.072 8H48.0751C54.9609 8 60.8451 13.1174 61.8466 19.7325ZM39.9374 67.9106V68.0354H37.5587C32.9264 68.0354 28.2942 69.0339 24.1628 71.1558L22.9108 71.7798C21.9092 72.2791 20.6573 71.9046 20.1565 70.9061C19.6557 69.9076 20.1565 68.6595 21.0329 68.1602L22.2848 67.5362C24.1628 66.6625 26.0407 65.9136 28.0438 65.2895C26.6667 64.6654 25.2895 63.9166 24.0376 63.0429C23.1612 63.4173 22.2848 63.6669 21.5336 63.9166C14.6479 65.7888 7.01095 62.918 3.25509 56.5525L1.25196 52.8081C0.751174 52.0592 1.00156 50.9359 1.87793 50.4367C3.25509 49.563 4.75743 49.0637 6.38498 48.8141C2.50391 45.8186 0 41.2005 0 35.9583V31.8394C0 30.8409 0.751174 29.9672 1.75274 29.9672C3.38028 29.9672 5.00782 30.3417 6.38498 30.8409C4.50704 26.3476 4.75743 21.1054 7.26135 16.6121L9.38967 12.8677C9.89045 12.1189 11.0172 11.7444 11.8936 12.2437C14.8983 13.9911 17.0266 16.737 18.1534 19.7325C19.2801 13.1174 25.0391 8 32.0501 8H34.0532C35.0548 8 36.0563 8.99851 36.0563 9.99702V11.994C36.0563 19.7325 29.6714 25.9732 22.0344 25.9732H20.9077C17.7778 29.9672 16.025 34.835 16.025 39.9523C16.025 53.1826 26.7919 63.9166 40.0626 63.9166H42.4413C47.6995 63.9166 52.9577 65.1647 57.7152 67.5362L58.9671 68.1602C59.9687 68.6595 60.3443 69.9076 59.8435 70.9061C59.3427 71.7798 58.0908 72.2791 57.0892 71.7798L55.8372 71.1558C51.7058 69.0339 47.0736 67.9106 42.4413 67.9106H40.0626H39.9374ZM22.0344 21.9791C27.543 21.9791 32.0501 17.6107 32.0501 11.994C29.1706 11.994 26.6667 13.2422 24.7887 15.1144C23.036 16.8618 22.0344 19.3581 22.0344 21.9791ZM12.0188 44.196C12.0188 39.3282 8.5133 35.2094 4.00626 34.2109V35.9583C4.00626 41.2005 7.26135 45.6937 12.0188 47.3163V44.196ZM68.1064 47.3163C72.7387 45.6937 76.1189 41.2005 76.1189 35.9583V34.2109C71.4867 35.3342 68.1064 39.3282 68.1064 44.196V47.3163ZM17.7778 57.6759C15.3991 53.4322 10.3912 51.56 5.88419 53.0578L6.76056 54.5555C9.38967 59.0488 14.5227 61.1707 19.4053 60.297L17.7778 57.6759ZM12.0188 32.3387L13.6463 29.7176C16.025 25.4739 15.1487 20.2317 11.6432 17.1114L10.7668 18.6092C8.13772 23.1025 8.88889 28.5943 12.0188 32.3387ZM66.3537 29.7176L67.9812 32.3387C71.1111 28.5943 71.8623 23.1025 69.2332 18.6092L68.3568 17.1114C64.8513 20.2317 63.975 25.4739 66.3537 29.7176ZM62.2222 57.6759L60.5947 60.297C65.4773 61.1707 70.6103 59.0488 73.2394 54.5555L74.1158 53.0578C69.6088 51.56 64.6009 53.4322 62.2222 57.6759Z"
32
- fill="${this.color}"
22
+ fill="currentColor"
33
23
  />
34
24
  </svg>
35
25
  `;
@@ -1,24 +1,13 @@
1
1
  // icons/machine-learning-icon.js
2
- import { LitElement, css, html } from "lit";
3
- class MachineLearningIcon extends LitElement {
2
+ import { html } from "lit";
3
+ import { BdIconElement } from "./icon-element.js";
4
+ class MachineLearningIcon extends BdIconElement {
5
+ static defaultSize = "2xl";
4
6
 
5
- static properties = {
6
- width : { type: Number },
7
- height: { type: Number },
8
- color : { type: String }
9
- };
10
-
11
- constructor() {
12
- super();
13
- this.width = 48;
14
- this.height = 48;
15
- this.color = "#006DFF"; }
16
-
17
- static styles = css`:host { display: inline-flex; }`;
18
7
  render() {
19
8
  return html`
20
- <svg width="${this.width}" height="${this.height}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
21
- <path d="M18 3C15.6562 3 13.6875 4.875 13.5 7.125C13.4062 7.6875 12.9375 8.25 12.375 8.4375C10.4062 8.90625 8.90625 10.6875 8.90625 12.75C8.90625 13.0312 9 13.3125 9 13.5938C9.1875 14.3438 8.8125 15.0938 8.0625 15.2812C6.375 15.9375 5.15625 17.625 5.15625 19.5C5.15625 20.0625 5.25 20.5312 5.4375 20.9062C5.625 21.4688 5.4375 22.125 4.96875 22.5C3.75 23.625 3 25.2188 3 27C3 29.1562 4.125 31.0312 5.8125 32.1562C6.375 32.5312 6.65625 33.2812 6.375 34.0312C6.09375 34.5938 6 35.3438 6 36C6 38.9062 8.34375 41.25 11.25 41.25C11.5312 41.25 11.8125 41.25 12.0938 41.25C12.8438 41.0625 13.5 41.5312 13.7812 42.1875C14.4375 43.875 16.0312 45 18 45C20.4375 45 22.5 43.0312 22.5 40.5V28.5H18C17.25 28.5 16.6875 28.9688 16.5 29.625C17.8125 30.1875 18.75 31.5 18.75 33C18.75 35.1562 17.0625 36.75 15 36.75C12.8438 36.75 11.25 35.1562 11.25 33C11.25 31.5 12.1875 30.1875 13.5 29.625C13.6875 27.2812 15.6562 25.5 18 25.5H22.5V15H19.875C19.3125 16.4062 18 17.25 16.5 17.25C14.3438 17.25 12.75 15.6562 12.75 13.5C12.75 11.4375 14.3438 9.75 16.5 9.75C18 9.75 19.3125 10.6875 19.875 12H22.5V7.5C22.5 5.0625 20.4375 3 18 3ZM25.5 15V33H31.0312C31.5938 31.6875 32.9062 30.75 34.5 30.75C36.5625 30.75 38.25 32.4375 38.25 34.5C38.25 36.6562 36.5625 38.25 34.5 38.25C32.9062 38.25 31.5938 37.4062 31.0312 36H25.5V40.5C25.5 43.0312 27.4688 45 30 45C31.875 45 33.4688 43.875 34.125 42.1875C34.4062 41.4375 35.0625 41.0625 35.8125 41.25C36.0938 41.25 36.375 41.25 36.6562 41.25C39.5625 41.25 41.9062 38.9062 41.9062 36C41.9062 35.3438 41.8125 34.5938 41.5312 34.0312C41.25 33.2812 41.5312 32.5312 42.0938 32.1562C43.875 31.0312 45 29.1562 45 27C45 25.2188 44.1562 23.625 42.9375 22.5C42.4688 22.125 42.2812 21.5625 42.4688 20.9062C42.6562 20.5312 42.75 20.0625 42.75 19.5C42.75 17.625 41.5312 15.9375 39.8438 15.375C39.0938 15.0938 38.7188 14.3438 38.9062 13.6875C38.9062 13.4062 39 13.125 39 12.75C39 10.6875 37.5 8.90625 35.5312 8.4375C34.9688 8.25 34.5 7.78125 34.4062 7.125C34.2188 4.875 32.3438 3 30 3C27.4688 3 25.5 5.0625 25.5 7.5V12H30C32.4375 12 34.5 14.0625 34.5 16.5V17.625C35.8125 18.1875 36.75 19.5 36.75 21C36.75 23.1562 35.0625 24.75 33 24.75C30.8438 24.75 29.25 23.1562 29.25 21C29.25 19.5 30.0938 18.1875 31.5 17.625V16.5C31.5 15.75 30.75 15 30 15H25.5ZM18 48C15.1875 48 12.75 46.5 11.4375 44.25C11.3438 44.25 11.25 44.25 11.25 44.25C6.65625 44.25 3 40.5938 3 36C3 35.3438 3.09375 34.5938 3.1875 33.9375C1.21875 32.3438 0 29.8125 0 27C0 24.6562 0.84375 22.5 2.34375 20.9062C2.25 20.5312 2.25 20.0625 2.25 19.5C2.25 16.7812 3.75 14.3438 6 13.0312C6 12.9375 6 12.8438 6 12.75C6 9.65625 7.875 6.9375 10.6875 5.8125C11.4375 2.53125 14.4375 0 18 0C20.4375 0 22.5938 1.21875 24 3C25.3125 1.21875 27.4688 0 30 0C33.4688 0 36.4688 2.53125 37.2188 5.8125C40.0312 6.9375 42 9.65625 42 12.75C42 12.8438 42 12.9375 42 13.0312C44.1562 14.3438 45.75 16.7812 45.75 19.5C45.75 20.0625 45.6562 20.5312 45.5625 20.9062C47.0625 22.5 48 24.6562 48 27C48 29.8125 46.6875 32.3438 44.7188 33.9375C44.9062 34.5938 45 35.3438 45 36C45 40.5938 41.25 44.25 36.75 44.25C36.6562 44.25 36.5625 44.25 36.4688 44.25C35.1562 46.5 32.7188 48 30 48C27.4688 48 25.3125 46.875 24 45C22.5938 46.875 20.4375 48 18 48ZM16.5 12C15.6562 12 15 12.75 15 13.5C15 14.3438 15.6562 15 16.5 15C17.25 15 18 14.3438 18 13.5C18 12.75 17.25 12 16.5 12ZM15 31.5C14.1562 31.5 13.5 32.25 13.5 33C13.5 33.8438 14.1562 34.5 15 34.5C15.75 34.5 16.5 33.8438 16.5 33C16.5 32.25 15.75 31.5 15 31.5ZM31.5 21C31.5 21.8438 32.1562 22.5 33 22.5C33.75 22.5 34.5 21.8438 34.5 21C34.5 20.25 33.75 19.5 33 19.5C32.1562 19.5 31.5 20.25 31.5 21ZM34.5 33C33.6562 33 33 33.75 33 34.5C33 35.3438 33.6562 36 34.5 36C35.25 36 36 35.3438 36 34.5C36 33.75 35.25 33 34.5 33Z" fill="${this.color}"/>
9
+ <svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
10
+ <path d="M18 3C15.6562 3 13.6875 4.875 13.5 7.125C13.4062 7.6875 12.9375 8.25 12.375 8.4375C10.4062 8.90625 8.90625 10.6875 8.90625 12.75C8.90625 13.0312 9 13.3125 9 13.5938C9.1875 14.3438 8.8125 15.0938 8.0625 15.2812C6.375 15.9375 5.15625 17.625 5.15625 19.5C5.15625 20.0625 5.25 20.5312 5.4375 20.9062C5.625 21.4688 5.4375 22.125 4.96875 22.5C3.75 23.625 3 25.2188 3 27C3 29.1562 4.125 31.0312 5.8125 32.1562C6.375 32.5312 6.65625 33.2812 6.375 34.0312C6.09375 34.5938 6 35.3438 6 36C6 38.9062 8.34375 41.25 11.25 41.25C11.5312 41.25 11.8125 41.25 12.0938 41.25C12.8438 41.0625 13.5 41.5312 13.7812 42.1875C14.4375 43.875 16.0312 45 18 45C20.4375 45 22.5 43.0312 22.5 40.5V28.5H18C17.25 28.5 16.6875 28.9688 16.5 29.625C17.8125 30.1875 18.75 31.5 18.75 33C18.75 35.1562 17.0625 36.75 15 36.75C12.8438 36.75 11.25 35.1562 11.25 33C11.25 31.5 12.1875 30.1875 13.5 29.625C13.6875 27.2812 15.6562 25.5 18 25.5H22.5V15H19.875C19.3125 16.4062 18 17.25 16.5 17.25C14.3438 17.25 12.75 15.6562 12.75 13.5C12.75 11.4375 14.3438 9.75 16.5 9.75C18 9.75 19.3125 10.6875 19.875 12H22.5V7.5C22.5 5.0625 20.4375 3 18 3ZM25.5 15V33H31.0312C31.5938 31.6875 32.9062 30.75 34.5 30.75C36.5625 30.75 38.25 32.4375 38.25 34.5C38.25 36.6562 36.5625 38.25 34.5 38.25C32.9062 38.25 31.5938 37.4062 31.0312 36H25.5V40.5C25.5 43.0312 27.4688 45 30 45C31.875 45 33.4688 43.875 34.125 42.1875C34.4062 41.4375 35.0625 41.0625 35.8125 41.25C36.0938 41.25 36.375 41.25 36.6562 41.25C39.5625 41.25 41.9062 38.9062 41.9062 36C41.9062 35.3438 41.8125 34.5938 41.5312 34.0312C41.25 33.2812 41.5312 32.5312 42.0938 32.1562C43.875 31.0312 45 29.1562 45 27C45 25.2188 44.1562 23.625 42.9375 22.5C42.4688 22.125 42.2812 21.5625 42.4688 20.9062C42.6562 20.5312 42.75 20.0625 42.75 19.5C42.75 17.625 41.5312 15.9375 39.8438 15.375C39.0938 15.0938 38.7188 14.3438 38.9062 13.6875C38.9062 13.4062 39 13.125 39 12.75C39 10.6875 37.5 8.90625 35.5312 8.4375C34.9688 8.25 34.5 7.78125 34.4062 7.125C34.2188 4.875 32.3438 3 30 3C27.4688 3 25.5 5.0625 25.5 7.5V12H30C32.4375 12 34.5 14.0625 34.5 16.5V17.625C35.8125 18.1875 36.75 19.5 36.75 21C36.75 23.1562 35.0625 24.75 33 24.75C30.8438 24.75 29.25 23.1562 29.25 21C29.25 19.5 30.0938 18.1875 31.5 17.625V16.5C31.5 15.75 30.75 15 30 15H25.5ZM18 48C15.1875 48 12.75 46.5 11.4375 44.25C11.3438 44.25 11.25 44.25 11.25 44.25C6.65625 44.25 3 40.5938 3 36C3 35.3438 3.09375 34.5938 3.1875 33.9375C1.21875 32.3438 0 29.8125 0 27C0 24.6562 0.84375 22.5 2.34375 20.9062C2.25 20.5312 2.25 20.0625 2.25 19.5C2.25 16.7812 3.75 14.3438 6 13.0312C6 12.9375 6 12.8438 6 12.75C6 9.65625 7.875 6.9375 10.6875 5.8125C11.4375 2.53125 14.4375 0 18 0C20.4375 0 22.5938 1.21875 24 3C25.3125 1.21875 27.4688 0 30 0C33.4688 0 36.4688 2.53125 37.2188 5.8125C40.0312 6.9375 42 9.65625 42 12.75C42 12.8438 42 12.9375 42 13.0312C44.1562 14.3438 45.75 16.7812 45.75 19.5C45.75 20.0625 45.6562 20.5312 45.5625 20.9062C47.0625 22.5 48 24.6562 48 27C48 29.8125 46.6875 32.3438 44.7188 33.9375C44.9062 34.5938 45 35.3438 45 36C45 40.5938 41.25 44.25 36.75 44.25C36.6562 44.25 36.5625 44.25 36.4688 44.25C35.1562 46.5 32.7188 48 30 48C27.4688 48 25.3125 46.875 24 45C22.5938 46.875 20.4375 48 18 48ZM16.5 12C15.6562 12 15 12.75 15 13.5C15 14.3438 15.6562 15 16.5 15C17.25 15 18 14.3438 18 13.5C18 12.75 17.25 12 16.5 12ZM15 31.5C14.1562 31.5 13.5 32.25 13.5 33C13.5 33.8438 14.1562 34.5 15 34.5C15.75 34.5 16.5 33.8438 16.5 33C16.5 32.25 15.75 31.5 15 31.5ZM31.5 21C31.5 21.8438 32.1562 22.5 33 22.5C33.75 22.5 34.5 21.8438 34.5 21C34.5 20.25 33.75 19.5 33 19.5C32.1562 19.5 31.5 20.25 31.5 21ZM34.5 33C33.6562 33 33 33.75 33 34.5C33 35.3438 33.6562 36 34.5 36C35.25 36 36 35.3438 36 34.5C36 33.75 35.25 33 34.5 33Z" fill="currentColor"/>
22
11
  </svg>
23
12
  `;
24
13
  }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Barrel for the brand and award marks.
3
+ *
4
+ * Separate from ./icons.js because these are a different kind of thing and,
5
+ * more practically, a different order of weight. They take width and height
6
+ * only — no colour, because recolouring a third party's mark would
7
+ * misrepresent it — and seven of the eight are raster: the artwork is a PNG
8
+ * embedded in the SVG through a pattern fill, between 23KB and 106KB each,
9
+ * 360KB for the set.
10
+ *
11
+ * That is why they are not in the icon barrel. Together they were 94% of it,
12
+ * and the only component that uses them, bd-awards, imports the individual
13
+ * files it needs rather than the barrel. A consumer importing ./icons for an
14
+ * arrow was carrying all seven award badges.
15
+ *
16
+ * Two of them are exceptions, and they are the two that are ours: bd-ai-icon,
17
+ * the Bitdefender AI wordmark, 3KB of vector drawn in --color-blue-500, and
18
+ * bd-brand-signature-icon, the signature the hero lays over its image, a
19
+ * single path drawn in currentColor and sized from the icon scale like an
20
+ * interface icon. Neither of the two reasons above reaches a mark of your
21
+ * own -- choosing the ink is not misrepresentation, and a path has no PNG to
22
+ * stop it scaling -- so brand-signature-icon.js says that outright in its own
23
+ * header rather than inheriting a rule that was written about somebody else's
24
+ * marks. It is listed here because it is a brand mark; it behaves like an icon.
25
+ *
26
+ * Being raster has consequences worth knowing before reaching for one: these
27
+ * cannot be tinted, and they do not scale cleanly past the size their PNG was
28
+ * made at. Redrawing them as vectors would fix both and remove the 360KB, but
29
+ * they are third-party marks and redrawing is not a cleanup anyone should do
30
+ * unilaterally.
31
+ */
32
+
33
+ import './bd-ai-icon.js';
34
+ import './brand-signature-icon.js';
35
+ import './av-comparatives-icon.js';
36
+ import './best-brands-icon.js';
37
+ import './pc-mag-2024-icon.js';
38
+ import './pc-mag-business-icon.js';
39
+ import './pc-mag-icon.js';
40
+ import './pc-mag-readers-icon.js';
41
+ import './top-product-icon.js';
@@ -1,28 +1,14 @@
1
- import { LitElement, css, html } from "lit";
1
+ import { html } from "lit";
2
+ import { BdIconElement } from "./icon-element.js";
2
3
 
3
- class MinusIcon extends LitElement {
4
- static properties = {
5
- width : { type: Number },
6
- height: { type: Number },
7
- color : { type: String }
8
- };
9
-
10
- constructor() {
11
- super();
12
- this.width = 16;
13
- this.height = 16;
14
- this.color = "currentColor";
15
- }
16
-
17
- static styles = css`
18
- :host { display: inline-flex; }
19
- `;
4
+ class MinusIcon extends BdIconElement {
5
+ static defaultSize = "sm";
20
6
 
21
7
  render() {
22
8
  return html`
23
- <svg width="${this.width}" height="${this.height}" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
24
- <path d="M7 7.00001H1V9.00001H7H9H15V7.00001H9C8 7 7.5 6.99997 7 7.00001Z" fill="${this.color}"/>
25
- </svg>
9
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" aria-hidden="true">
10
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 7H13.75V9H2.25V7Z" fill="currentColor"/>
11
+ </svg>
26
12
 
27
13
  `;
28
14
  }
@@ -0,0 +1,52 @@
1
+ // icons/missing-icon.js
2
+ import { html } from "lit";
3
+ import { BdIconElement } from "./icon-element.js";
4
+
5
+ /**
6
+ * A deliberate placeholder for an icon that has been designed for but not drawn
7
+ * yet. Temporary by construction: `check:icons` lists every one of these with
8
+ * its name, so the set of icons still owed is a command rather than a memory.
9
+ *
10
+ * <bd-missing-icon name="shield"></bd-missing-icon>
11
+ *
12
+ * WHY AN EXPLICIT ELEMENT RATHER THAN A FALLBACK FOR UNKNOWN TAGS. The obvious
13
+ * design is to let someone write <bd-shield-icon> before it exists and have it
14
+ * render a placeholder, and the platform will not do it. An undefined custom
15
+ * element renders 0px wide and invisible -- measured -- and CSS cannot style it
16
+ * generically, because there is no selector for "any element whose tag looks
17
+ * like bd-*-icon"; enumerating names catches only the icons that already exist.
18
+ * A runtime scan does not reach it either, since icons live inside component
19
+ * shadow roots that a document-level observer never sees.
20
+ *
21
+ * So the placeholder is a real element with a real name. That costs one
22
+ * substitution when the artwork lands and buys three things a silent gap does
23
+ * not: the layout reserves the right box, a reviewer can see what is missing,
24
+ * and the list is checkable.
25
+ *
26
+ * A dashed square on the icon's own box, in currentColor, so it takes the ink of
27
+ * whatever it sits in. The dash is doing the work on its own: a first version
28
+ * dimmed it to 0.55 as well, which lint:tokens correctly refused -- a chosen
29
+ * dimness belongs in a token, and inventing one for a single consumer is the
30
+ * mistake the "component tokens" section names. The dash already says
31
+ * provisional, so nothing was lost.
32
+ */
33
+ class MissingIcon extends BdIconElement {
34
+ static defaultSize = "sm";
35
+
36
+ static properties = {
37
+ ...BdIconElement.properties,
38
+ /** What the icon should eventually be. Reported by check:icons. */
39
+ name: { type: String, reflect: true }
40
+ };
41
+
42
+ render() {
43
+ return html`
44
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"
45
+ role="img" aria-label="${this.name ? `${this.name} icon, not yet drawn` : 'icon not yet drawn'}">
46
+ <rect x="1" y="1" width="14" height="14" rx="2"
47
+ stroke="currentColor" stroke-width="1.5" stroke-dasharray="3 2.5"/>
48
+ </svg>
49
+ `;
50
+ }
51
+ }
52
+ customElements.define("bd-missing-icon", MissingIcon);
@@ -1,28 +1,14 @@
1
- import { LitElement, css, html } from "lit";
1
+ import { html } from "lit";
2
+ import { BdIconElement } from "./icon-element.js";
2
3
 
3
- class PlusIcon extends LitElement {
4
- static properties = {
5
- width : { type: Number },
6
- height: { type: Number },
7
- color : { type: String }
8
- };
9
-
10
- constructor() {
11
- super();
12
- this.width = 16;
13
- this.height = 16;
14
- this.color = "currentColor";
15
- }
16
-
17
- static styles = css`
18
- :host { display: inline-flex; }
19
- `;
4
+ class PlusIcon extends BdIconElement {
5
+ static defaultSize = "sm";
20
6
 
21
7
  render() {
22
8
  return html`
23
- <svg width="${this.width}" height="${this.height}" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
24
- <path d="M9 1H7V7H1V9H7V15H9V9H15V7H9V1Z" fill="${this.color}"/>
25
- </svg>
9
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" aria-hidden="true">
10
+ <path d="M9 1H7V7H1V9H7V15H9V9H15V7H9V1Z" fill="currentColor"/>
11
+ </svg>
26
12
  `;
27
13
  }
28
14
  }