@repobit/dex-system-design 0.25.11 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/README.md +131 -8
  3. package/package.json +95 -13
  4. package/schemas/component-manifest.json +3294 -405
  5. package/schemas/manifest-omissions.json +173 -0
  6. package/src/blog/src/breakpoints.js +6 -6
  7. package/src/blog/src/content/blog-atoms-showcase.js +1 -1
  8. package/src/blog/src/content/blog-page-layout.js +2 -2
  9. package/src/blog/src/lib/article-toc.js +7 -7
  10. package/src/blog/src/shell/blog-shell.js +1 -1
  11. package/src/blog/src/tokens/blog.js +2 -2
  12. package/src/blog/src/tokens/core.js +34 -35
  13. package/src/blog/src/tokens/legacy.js +0 -9
  14. package/src/blog/tokens/blog.js +2 -2
  15. package/src/blog/tokens/core.js +34 -35
  16. package/src/blog/tokens/legacy.js +0 -9
  17. package/src/blog/tokens.css +36 -46
  18. package/src/components/accordion/accordion-bg.css.js +83 -59
  19. package/src/components/accordion/accordion-bg.js +29 -10
  20. package/src/components/accordion/accordion-bg.stories.js +67 -67
  21. package/src/components/accordion/accordion-keyboard.js +80 -0
  22. package/src/components/accordion/accordion.css.js +142 -80
  23. package/src/components/accordion/accordion.js +37 -10
  24. package/src/components/accordion/accordion.stories.js +7 -7
  25. package/src/components/agent-endpoints/agent-endpoints.css.js +36 -39
  26. package/src/components/agent-endpoints/agent-endpoints.js +30 -20
  27. package/src/components/agent-endpoints/agent-endpoints.stories.js +1 -1
  28. package/src/components/ai-guardian-demo.stories.js +91 -91
  29. package/src/components/alert/alert.css.js +198 -0
  30. package/src/components/alert/alert.js +103 -0
  31. package/src/components/alert/alert.stories.js +206 -0
  32. package/src/components/anchor/anchor-nav.css.js +213 -101
  33. package/src/components/anchor/anchor-nav.js +26 -40
  34. package/src/components/anchor/anchor.stories.js +22 -12
  35. package/src/components/annotation/annotation.css.js +58 -0
  36. package/src/components/annotation/annotation.js +67 -0
  37. package/src/components/annotation/annotation.stories.js +63 -0
  38. package/src/components/architecture.stories.js +285 -0
  39. package/src/components/atoms.stories.js +342 -0
  40. package/src/components/avatar/avatar.css.js +67 -0
  41. package/src/components/avatar/avatar.js +42 -0
  42. package/src/components/avatar/avatar.stories.js +95 -0
  43. package/src/components/awards/awards-flex.css.js +209 -23
  44. package/src/components/awards/awards-flex.js +66 -7
  45. package/src/components/awards/awards-flex.stories.js +1 -1
  46. package/src/components/awards/{awards-light.stories.js → awards-summary.stories.js} +54 -64
  47. package/src/components/awards/awards.css.js +116 -58
  48. package/src/components/awards/awards.js +102 -28
  49. package/src/components/awards/awards.stories.js +1 -1
  50. package/src/components/back/back.css.js +51 -22
  51. package/src/components/back/back.js +28 -7
  52. package/src/components/back/back.stories.js +9 -3
  53. package/src/components/badge/badge.css.js +158 -46
  54. package/src/components/badge/badge.js +62 -74
  55. package/src/components/badge/badge.stories.js +176 -248
  56. package/src/components/bento-grid/bento-grid.css.js +21 -16
  57. package/src/components/bento-grid/bento-grid.js +16 -4
  58. package/src/components/bento-grid/bento-grid.stories.js +19 -18
  59. package/src/components/bento-grid/bento-item.css.js +52 -28
  60. package/src/components/bento-grid/bento-item.js +2 -2
  61. package/src/components/blockquote/blockquote.css.js +47 -0
  62. package/src/components/blockquote/blockquote.js +29 -0
  63. package/src/components/blockquote/blockquote.stories.js +62 -0
  64. package/src/components/breadcrumb/breadcrumb.css.js +92 -22
  65. package/src/components/breadcrumb/breadcrumb.js +56 -11
  66. package/src/components/button/button.css.js +531 -161
  67. package/src/components/button/button.js +206 -214
  68. package/src/components/button/button.stories.js +322 -174
  69. package/src/components/caption/caption.css.js +21 -0
  70. package/src/components/caption/caption.js +31 -0
  71. package/src/components/caption/caption.stories.js +62 -0
  72. package/src/components/card-features/card-features.css.js +14 -22
  73. package/src/components/card-features/card-features.js +68 -9
  74. package/src/components/card-features/card-features.stories.js +11 -11
  75. package/src/components/cards/card.css.js +60 -81
  76. package/src/components/cards/card.js +56 -25
  77. package/src/components/cards/card.stories.js +39 -39
  78. package/src/components/carousel/carousel.css.js +93 -99
  79. package/src/components/carousel/carousel.js +32 -4
  80. package/src/components/checkbox/checkbox.css.js +111 -93
  81. package/src/components/checkbox/checkbox.js +64 -90
  82. package/src/components/checkbox/checkbox.stories.js +96 -29
  83. package/src/components/code/code.css.js +70 -0
  84. package/src/components/code/code.js +40 -0
  85. package/src/components/code/code.stories.js +73 -0
  86. package/src/components/compare/compare.css.js +179 -43
  87. package/src/components/compare/compare.js +52 -25
  88. package/src/components/compare/compare.stories.js +61 -4
  89. package/src/components/comparison-panel/comparison-panel.css.js +38 -51
  90. package/src/components/comparison-panel/comparison-panel.js +5 -4
  91. package/src/components/comparison-panel/comparison-panel.stories.js +1 -1
  92. package/src/components/compatibility-table/compatibility-table.css.js +180 -80
  93. package/src/components/compatibility-table/compatibility-table.js +37 -9
  94. package/src/components/control-alignment.stories.js +393 -0
  95. package/src/components/cta-banner/cta-banner.css.js +41 -13
  96. package/src/components/cta-banner/cta-banner.js +6 -5
  97. package/src/components/cta-banner/cta-banner.stories.js +43 -98
  98. package/src/components/display/display.css.js +25 -1
  99. package/src/components/display/display.js +46 -13
  100. package/src/components/display/display.stories.js +270 -40
  101. package/src/components/divider/divider-horizontal.js +21 -5
  102. package/src/components/divider/divider-vertical.js +15 -7
  103. package/src/components/divider/divider.css.js +2 -2
  104. package/src/components/divider/divider.stories.js +38 -34
  105. package/src/components/dropdown/dropdown.css.js +93 -126
  106. package/src/components/dropdown/dropdown.js +114 -34
  107. package/src/components/dropdown/dropdown.stories.js +56 -24
  108. package/src/components/features/features.css.js +24 -11
  109. package/src/components/features/features.js +7 -3
  110. package/src/components/features/features.stories.js +37 -37
  111. package/src/components/features-tab/features-tab.css.js +19 -8
  112. package/src/components/features-tab/features-tab.js +6 -5
  113. package/src/components/features-tab/features-tab.stories.js +23 -23
  114. package/src/components/fieldset/fieldset.css.js +30 -0
  115. package/src/components/fieldset/fieldset.js +28 -0
  116. package/src/components/fieldset/fieldset.stories.js +84 -0
  117. package/src/components/footer/footer-links-group.css.js +10 -14
  118. package/src/components/footer/footer-links-group.js +4 -3
  119. package/src/components/footer/footer-lp.css.js +59 -30
  120. package/src/components/footer/footer-lp.js +17 -12
  121. package/src/components/footer/footer-lp.stories.js +63 -75
  122. package/src/components/footer/footer-nav-menu.css.js +26 -4
  123. package/src/components/footer/footer-nav-menu.js +3 -2
  124. package/src/components/footer/footer.css.js +146 -264
  125. package/src/components/footer/footer.js +176 -106
  126. package/src/components/footer/footer.stories.js +9 -9
  127. package/src/components/footer/localeMap.js +1 -1
  128. package/src/components/grid/grid.css.js +1 -1
  129. package/src/components/grid/grid.js +49 -7
  130. package/src/components/grid/grid.stories.js +111 -0
  131. package/src/components/header/header-code.css.js +61 -51
  132. package/src/components/header/header-code.js +28 -14
  133. package/src/components/header/header-code.stories.js +5 -5
  134. package/src/components/header/header.css.js +655 -176
  135. package/src/components/header/header.js +269 -36
  136. package/src/components/header/header.stories.js +841 -18
  137. package/src/components/heading/heading.css.js +14 -17
  138. package/src/components/heading/heading.js +48 -33
  139. package/src/components/heading/heading.stories.js +27 -25
  140. package/src/components/help-text/help-text.css.js +21 -0
  141. package/src/components/help-text/help-text.js +25 -0
  142. package/src/components/help-text/help-text.stories.js +66 -0
  143. package/src/components/highlight/highlight.css.js +86 -64
  144. package/src/components/highlight/highlight.js +18 -27
  145. package/src/components/highlight/highlight.stories.js +14 -3
  146. package/src/components/icons/analysis-icon.js +6 -16
  147. package/src/components/icons/arrow-down-icon.js +6 -19
  148. package/src/components/icons/arrow-icon.js +44 -0
  149. package/src/components/icons/arrow-right-icon.js +30 -23
  150. package/src/components/icons/arrow-up-icon.js +19 -18
  151. package/src/components/icons/bd-ai-icon.js +1 -1
  152. package/src/components/icons/brand-marks.stories.js +279 -0
  153. package/src/components/icons/brand-signature-icon.js +42 -0
  154. package/src/components/icons/check-icon.js +27 -0
  155. package/src/components/icons/circle-info-icon.js +33 -0
  156. package/src/components/icons/close-icon.js +6 -18
  157. package/src/components/icons/family-icon.js +8 -20
  158. package/src/components/icons/globe-icon.js +6 -18
  159. package/src/components/icons/guide-icon.js +6 -18
  160. package/src/components/icons/icon-element.js +99 -0
  161. package/src/components/icons/icons.js +36 -0
  162. package/src/components/icons/icons.stories.js +184 -52
  163. package/src/components/icons/individual-icon.js +6 -18
  164. package/src/components/icons/laurel-icon.js +9 -19
  165. package/src/components/icons/machine-learning-icon.js +6 -17
  166. package/src/components/icons/marks.js +41 -0
  167. package/src/components/icons/minus-icon.js +7 -21
  168. package/src/components/icons/missing-icon.js +52 -0
  169. package/src/components/icons/plus-icon.js +7 -21
  170. package/src/components/icons/quote-icon.js +19 -19
  171. package/src/components/image/image.css.js +72 -25
  172. package/src/components/image/image.js +11 -6
  173. package/src/components/image/image.stories.js +2 -2
  174. package/src/components/input/custom-form.stories.js +214 -62
  175. package/src/components/input/input-clipboard.css.js +51 -144
  176. package/src/components/input/input-clipboard.js +31 -15
  177. package/src/components/input/input.css.js +8 -146
  178. package/src/components/input/input.js +93 -38
  179. package/src/components/install-options/install-options.css.js +84 -77
  180. package/src/components/install-options/install-options.js +33 -30
  181. package/src/components/install-options/install-options.stories.js +3 -3
  182. package/src/components/label/label.css.js +35 -0
  183. package/src/components/label/label.js +38 -0
  184. package/src/components/label/label.stories.js +82 -0
  185. package/src/components/light-carousel/light-carousel.css.js +111 -63
  186. package/src/components/light-carousel/light-carousel.js +85 -11
  187. package/src/components/light-carousel/light-carousel.stories.js +126 -82
  188. package/src/components/link/link.css.js +150 -99
  189. package/src/components/link/link.js +86 -11
  190. package/src/components/link/link.stories.js +124 -30
  191. package/src/components/list/list-item/list-item.css.js +74 -22
  192. package/src/components/list/list-item/list-item.js +32 -10
  193. package/src/components/list/list-item/list-item.stories.js +23 -23
  194. package/src/components/list/list.css.js +8 -2
  195. package/src/components/list/list.js +3 -2
  196. package/src/components/list/list.stories.js +222 -0
  197. package/src/components/modal/modal.css.js +114 -24
  198. package/src/components/modal/modal.js +83 -7
  199. package/src/components/modal/modal.stories.js +9 -9
  200. package/src/components/overview/overview.css.js +19 -14
  201. package/src/components/overview/overview.js +6 -5
  202. package/src/components/overview/overview.stories.js +10 -10
  203. package/src/components/page-switcher/page-switcher.css.js +97 -40
  204. package/src/components/page-switcher/page-switcher.js +28 -5
  205. package/src/components/page-switcher/page-switcher.stories.js +95 -0
  206. package/src/components/paragraph/paragraph.css.js +15 -10
  207. package/src/components/paragraph/paragraph.js +41 -44
  208. package/src/components/paragraph/paragraph.stories.js +56 -21
  209. package/src/components/picture/picture.css.js +103 -44
  210. package/src/components/picture/picture.js +100 -30
  211. package/src/components/picture/picture.stories.js +1 -1
  212. package/src/components/pricing-cards/new-pricing-card.js +3 -3
  213. package/src/components/pricing-cards/new-pricing.css.js +24 -15
  214. package/src/components/pricing-cards/pricing-card-actions.css.js +1 -1
  215. package/src/components/pricing-cards/pricing-card-actions.js +3 -4
  216. package/src/components/pricing-cards/pricing-card-container.css.js +3 -3
  217. package/src/components/pricing-cards/pricing-card-container.js +3 -2
  218. package/src/components/pricing-cards/pricing-card-header.css.js +10 -8
  219. package/src/components/pricing-cards/pricing-card-header.js +6 -7
  220. package/src/components/pricing-cards/pricing-card-pricing.css.js +16 -9
  221. package/src/components/pricing-cards/pricing-card-pricing.js +8 -6
  222. package/src/components/pricing-cards/pricing-card-show-more.css.js +11 -3
  223. package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
  224. package/src/components/pricing-cards/pricing-card.css.js +244 -190
  225. package/src/components/pricing-cards/pricing-card.js +54 -70
  226. package/src/components/pricing-cards/pricing-feature-item.css.js +25 -8
  227. package/src/components/pricing-cards/pricing-feature-item.js +8 -3
  228. package/src/components/process-steps/process-steps.css.js +26 -14
  229. package/src/components/process-steps/process-steps.js +23 -6
  230. package/src/components/process-steps/process-steps.stories.js +1 -1
  231. package/src/components/progress/progress.css.js +80 -0
  232. package/src/components/progress/progress.js +42 -0
  233. package/src/components/progress/progress.stories.js +79 -0
  234. package/src/components/quick-answer/quick-answer.css.js +75 -13
  235. package/src/components/quick-answer/quick-answer.js +8 -3
  236. package/src/components/radio/radio.css.js +92 -128
  237. package/src/components/radio/radio.js +106 -127
  238. package/src/components/radio/radio.stories.js +54 -19
  239. package/src/components/review/review-grid.css.js +5 -6
  240. package/src/components/review/review-grid.js +14 -11
  241. package/src/components/review/review.css.js +11 -6
  242. package/src/components/review/review.js +3 -8
  243. package/src/components/shared/ensemble.css.js +93 -0
  244. package/src/components/shared/form-field.css.js +206 -0
  245. package/src/components/shared/prop-vocabulary.js +48 -0
  246. package/src/components/shared/token-scales.js +306 -0
  247. package/src/components/skeleton/skeleton.css.js +34 -0
  248. package/src/components/skeleton/skeleton.js +32 -0
  249. package/src/components/skeleton/skeleton.stories.js +70 -0
  250. package/src/components/spinner/spinner.css.js +62 -0
  251. package/src/components/spinner/spinner.js +38 -0
  252. package/src/components/spinner/spinner.stories.js +92 -0
  253. package/src/components/spotlight-section/spotlight-section.css.js +14 -13
  254. package/src/components/spotlight-section/spotlight-section.js +42 -39
  255. package/src/components/switch/switch.css.js +103 -0
  256. package/src/components/switch/switch.js +44 -0
  257. package/src/components/switch/switch.stories.js +86 -0
  258. package/src/components/tab-list/content-switcher.stories.js +189 -0
  259. package/src/components/tab-list/tab-list.css.js +250 -0
  260. package/src/components/tab-list/tab-list.js +184 -0
  261. package/src/components/tab-list/tab-list.stories.js +221 -0
  262. package/src/components/tabs/tabs.css.js +14 -123
  263. package/src/components/tabs/tabs.js +16 -19
  264. package/src/components/tabs/tabs.stories.js +95 -95
  265. package/src/components/tag/tag.css.js +54 -0
  266. package/src/components/tag/tag.js +32 -0
  267. package/src/components/tag/tag.stories.js +126 -0
  268. package/src/components/terminal/terminal-message.css.js +164 -60
  269. package/src/components/terminal/terminal-message.js +5 -5
  270. package/src/components/terminal/terminal-message.stories.js +70 -1
  271. package/src/components/termsOfUse/terms.css.js +25 -20
  272. package/src/components/termsOfUse/terms.js +13 -9
  273. package/src/components/termsOfUse/terms.stories.js +1 -1
  274. package/src/components/textarea/textarea.css.js +51 -0
  275. package/src/components/textarea/textarea.js +136 -0
  276. package/src/components/textarea/textarea.stories.js +191 -0
  277. package/src/components/tooltip/tooltip.css.js +75 -0
  278. package/src/components/tooltip/tooltip.js +156 -0
  279. package/src/components/tooltip/tooltip.stories.js +161 -0
  280. package/src/components/trust-panel/trust-panel.css.js +85 -33
  281. package/src/components/trust-panel/trust-panel.js +18 -10
  282. package/src/components/trust-panel/trust-panel.stories.js +1 -1
  283. package/src/components/ultimate-security-demo.stories.js +431 -0
  284. package/src/components/video/video.css.js +17 -0
  285. package/src/components/video/video.js +40 -0
  286. package/src/components/video/video.stories.js +106 -0
  287. package/src/components/video-player/video-player.css.js +67 -11
  288. package/src/components/video-player/video-player.js +35 -4
  289. package/src/components/video-player/video-player.stories.js +1 -1
  290. package/src/components/visual-alignment.stories.js +411 -0
  291. package/src/components/visually-hidden/visually-hidden.css.js +24 -0
  292. package/src/components/visually-hidden/visually-hidden.js +16 -0
  293. package/src/components/visually-hidden/visually-hidden.stories.js +56 -0
  294. package/src/stories/Button.stories.js +17 -17
  295. package/src/stories/Header.stories.js +10 -10
  296. package/src/stories/Page.js +1 -1
  297. package/src/stories/Page.stories.js +6 -6
  298. package/src/tokens/borders.stories.js +339 -0
  299. package/src/tokens/color-responsibilities.stories.js +227 -0
  300. package/src/tokens/dark-derivation.js +309 -0
  301. package/src/tokens/dark-findings.js +197 -0
  302. package/src/tokens/dark-mode.stories.js +207 -0
  303. package/src/tokens/dimension.stories.js +251 -0
  304. package/src/tokens/elevation.stories.js +143 -0
  305. package/src/tokens/focus.stories.js +276 -0
  306. package/src/tokens/fonts.css +20 -20
  307. package/src/tokens/fonts.stories.js +354 -374
  308. package/src/tokens/layout.css +25 -11
  309. package/src/tokens/motion.stories.js +231 -0
  310. package/src/tokens/shape.stories.js +272 -0
  311. package/src/tokens/spacing-rhythm.stories.js +359 -0
  312. package/src/tokens/spacing.stories.js +208 -703
  313. package/src/tokens/story-chrome.js +503 -0
  314. package/src/tokens/surfaces.stories.js +224 -0
  315. package/src/tokens/text-on-surface.stories.js +164 -0
  316. package/src/tokens/token-map.js +220 -0
  317. package/src/tokens/token-map.stories.js +257 -0
  318. package/src/tokens/token-purposes.js +266 -0
  319. package/src/tokens/tokens-grid.stories.js +388 -900
  320. package/src/tokens/tokens.css +1633 -1045
  321. package/src/tokens/tokens.js +1130 -492
  322. package/src/tokens/tokens.stories.js +137 -47
  323. package/src/tokens/type-ceiling-words.js +299 -0
  324. package/src/tokens/typography.stories.js +1003 -965
  325. package/src/tokens/vertical-rhythm.stories.js +224 -0
  326. package/src/components/awards/awards-icon.js +0 -56
  327. package/src/components/awards/awards-light.js +0 -240
  328. package/src/components/banner/banner.js +0 -60
  329. package/src/components/banner/banner.stories.js +0 -51
  330. package/src/components/button/icons.js +0 -24
  331. package/src/components/input/index.js +0 -0
  332. package/src/components/light-carousel/light-carousel-simple.css.js +0 -183
  333. package/src/components/light-carousel/light-carousel-simple.js +0 -74
  334. package/src/tokens/colors.js +0 -121
  335. package/src/tokens/typography.css.js +0 -207
  336. package/src/tokens/typography.js +0 -0
@@ -1,19 +1,39 @@
1
1
  import { LitElement, html, nothing } 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 pictureCSS from "./picture.css.js";
4
5
 
6
+ // the radius steps picture.css.js implements — the full --radius-* scale
7
+ const RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'];
8
+
5
9
  export class BdPicture extends LitElement {
6
10
  static properties = {
7
11
  sources : { type: Array },
8
12
  alt : { type: String },
9
- fallbackSrc : { type: String },
13
+ /* `fallback-src`, because that is the attribute this component documents
14
+ and the only spelling anything writes. Lit lowercases a property name to
15
+ get its observed attribute instead of dash-casing it, so `fallbackSrc`
16
+ was listening for `fallbacksrc` while every story and the usage example
17
+ in picture.stories.js wrote `fallback-src`. The attribute was inert, the
18
+ property stayed at its "" default, and the fallback <img> rendered with
19
+ src="".
20
+
21
+ That is the whole image on this component: measured across the six
22
+ Atoms/Picture stories, all 14 instances had naturalWidth 0, and the 12
23
+ with an empty `sources` array had currentSrc="" -- no candidate to
24
+ request at all, so a story called "No Sources (fallback only)" showed
25
+ nothing but an empty box. Isolated from the network with a data: URI:
26
+ setAttribute('fallback-src') left it 0x0, while setAttribute
27
+ ('fallbacksrc') and the property both loaded the image. (The two stories
28
+ that do have a currentSrc get it from a <source>, and their 0x0 is this
29
+ sandbox having no route to the placeholder host -- not this defect.) */
30
+ fallbackSrc : { type: String, attribute: "fallback-src" },
10
31
  width : { type: Number },
11
32
  height : { type: Number },
12
33
  loading : { type: String },
13
34
  fit : { type: String },
14
35
  radius : { type: String },
15
- referrerPolicy: { type: String, attribute: "referrer-policy" },
16
- _loaded : { state: true }
36
+ referrerPolicy: { type: String, attribute: "referrer-policy" }
17
37
  };
18
38
 
19
39
  constructor() {
@@ -27,35 +47,17 @@ export class BdPicture extends LitElement {
27
47
  this.fit = "cover";
28
48
  this.radius = "none";
29
49
  this.referrerPolicy = "";
30
- this._loaded = false;
31
- }
32
-
33
- _onImgLoad() {
34
- this._loaded = true;
35
- }
36
-
37
- _onImgError() {
38
- this._loaded = true;
39
- }
40
-
41
- updated(changedProperties) {
42
- super.updated(changedProperties);
43
- if (this._loaded) return;
44
- const img = this.renderRoot?.querySelector("img");
45
- if (img && img.complete && img.naturalWidth > 0) {
46
- this._loaded = true;
47
- }
48
50
  }
49
51
 
50
52
  render() {
51
53
  const classes = [
52
54
  'bd-picture',
53
55
  `fit-${this.fit}`,
54
- `radius-${this.radius}`
56
+ `radius-${RADIUS_STEPS.includes(this.radius) ? this.radius : 'none'}`
55
57
  ].filter(Boolean).join(' ');
56
58
 
57
59
  return html`
58
- <picture class="${classes}" ?loaded=${this._loaded}>
60
+ <picture class="${classes}">
59
61
  ${this.sources.map(source => html`
60
62
  <source
61
63
  type="${source.type}"
@@ -68,18 +70,86 @@ export class BdPicture extends LitElement {
68
70
  loading="${this.loading}"
69
71
  alt="${this.alt}"
70
72
  src="${this.fallbackSrc}"
71
- width="${this.width}"
72
- height="${this.height}"
73
+ width="${this.width ?? nothing}"
74
+ height="${this.height ?? nothing}"
73
75
  referrerpolicy="${this.referrerPolicy || nothing}"
74
- ?loaded=${this._loaded}
75
- @load=${this._onImgLoad}
76
- @error=${this._onImgError}
76
+ @load="${this._onLoad}"
77
+ @error="${this._onError}"
77
78
  >
78
79
  </picture>
79
80
  `;
80
81
  }
81
82
 
82
- static styles = [tokens, pictureCSS];
83
+ /* The stylesheet has always been written around a `loaded` attribute --
84
+ `.bd-picture:not([loaded])` paints the grey placeholder and its "Loading
85
+ image" label, and `img[loading="lazy"][loaded]` is what returns a lazy
86
+ image from opacity 0 to opacity 1 -- and nothing in this package ever set
87
+ it. `loaded` appeared in exactly three places, all three of them those
88
+ selectors. So the reveal had no trigger:
89
+
90
+ loading="lazy" (the default) -> opacity 0, scale(0.95), forever
91
+ every instance -> placeholder background and label on
92
+ top of the image, permanently
93
+
94
+ Measured on a served 800x450 PNG: the img reached naturalWidth 800 --
95
+ fully decoded -- with computed opacity 0 in 7 of the 8 instances across
96
+ four stories. The eighth is the one story that passes loading="eager",
97
+ which has no opacity rule and so was the only visible image in the
98
+ component; it still carried the placeholder behind it.
99
+
100
+ That is also why fixing the `fallback-src` attribute above is not on its
101
+ own enough to see anything: it gives the img a src and the src decodes,
102
+ and a default-configured bd-picture then renders a fully loaded image at
103
+ opacity 0. The two defects had to be fixed together or neither is visible.
104
+
105
+ bd-img is the shape this follows. It keys its placeholder on
106
+ `:not([src])` -- a fact the element already knows -- and never hides the
107
+ image at all, which is why bd-img has no equivalent bug. The minimal
108
+ change here is to make this component tell the truth it already asks CSS
109
+ about, rather than to restyle it: the fade on load is a deliberate
110
+ nicety, and it is kept.
111
+
112
+ `complete` is checked once on first update because a cached or
113
+ already-decoded image can finish before the listener is attached, in
114
+ which case no load event is coming -- the same "the state may already be
115
+ true before anything is watching for it" case as the tooltip's first
116
+ placement pass. naturalWidth guards it, because `complete` is also true
117
+ for an image that failed. */
118
+ firstUpdated() {
119
+ const img = this.renderRoot?.querySelector('img');
120
+ if (img?.complete && img.naturalWidth > 0) this._markLoaded(img);
121
+ }
122
+
123
+ /* A new source means the old image is no longer what is on screen, so the
124
+ flag goes back down and the placeholder returns until the new one
125
+ decodes. Without this a changed fallbackSrc would keep showing the
126
+ previous image's revealed state while the new bytes were still in
127
+ flight. */
128
+ updated(changed) {
129
+ if (!changed.has('fallbackSrc') && !changed.has('sources')) return;
130
+ const img = this.renderRoot?.querySelector('img');
131
+ if (!img) return;
132
+ if (img.complete && img.naturalWidth > 0) return this._markLoaded(img);
133
+ img.removeAttribute('loaded');
134
+ this.renderRoot?.querySelector('picture')?.removeAttribute('loaded');
135
+ }
136
+
137
+ _onLoad(e) {
138
+ this._markLoaded(e.currentTarget);
139
+ }
140
+
141
+ /* Deliberately does not set the flag: a broken image is exactly the case
142
+ the placeholder is for, so it stays up and says so. */
143
+ _onError() {}
144
+
145
+ /* Both elements, because the two selectors ask different questions: the
146
+ <picture> owns the placeholder and the <img> owns the reveal. */
147
+ _markLoaded(img) {
148
+ img.setAttribute('loaded', '');
149
+ this.renderRoot?.querySelector('picture')?.setAttribute('loaded', '');
150
+ }
151
+
152
+ static styles = [pictureCSS];
83
153
  }
84
154
 
85
155
  customElements.define("bd-picture", BdPicture);
@@ -2,7 +2,7 @@ import { html } from 'lit';
2
2
  import './picture.js';
3
3
 
4
4
  export default {
5
- title : 'Components/Picture',
5
+ title : 'Atoms/Picture',
6
6
  tags : ['autodocs'],
7
7
  parameters: {
8
8
  docs: {
@@ -1,7 +1,8 @@
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
- import newPricingCSS from "../pricing-cards/new-pricing.css";
5
+ import newPricingCSS from "../pricing-cards/new-pricing.css.js";
5
6
 
6
7
  class PricingCard extends LitElement {
7
8
  static properties = {
@@ -23,7 +24,6 @@ class PricingCard extends LitElement {
23
24
  render() {
24
25
  return html`
25
26
  <style>
26
- ${tokens}
27
27
  ${newPricingCSS}
28
28
  </style>
29
29
 
@@ -1,21 +1,30 @@
1
1
  import { css } from "lit";
2
2
 
3
3
  export default css`
4
- :host {
5
- --background-card-grey: var(--color-neutral-25);
6
- --border-card-grey: var(--color-neutral-50);
7
- }
8
4
 
9
5
  .card {
10
- background: white;
11
- border-radius: var(--spacing-20);
12
- padding: var(--spacing-32);
13
- background: #fafafa;
14
- border: 1px solid var(--border-card-grey);
6
+ border-radius: var(--card-radius);
7
+ padding: var(--card-padding);
8
+ /* The white above this was dead: the grey overrode it in the same rule. */
9
+ background: var(--color-surface-container);
10
+ /* border/container, not the private --border-card-grey alias, which
11
+ pointed at --color-neutral-50 and measured 1.07:1 against this card's
12
+ own ground. 1px was a literal too.
13
+
14
+ This card keeps surface/container rather than inverting like
15
+ pricing-card.css.js: new-pricing-card has no wrapper of its own to
16
+ carry a band -- its container is pricing-card-container -- so going
17
+ white here without one would put a white card on a white page. The
18
+ edge is the half that is safe on its own, and it triples the delta to
19
+ 1.233:1. */
20
+ border: var(--border-width-1) solid var(--color-border-container);
15
21
  }
16
22
 
17
23
  .highlight {
18
- border: 2px solid #1d7928;
24
+ /* no role: no BORDER role carries green-700 -- --status-success-border is
25
+ green-200, four steps lighter. The fill and accent steps do carry it,
26
+ and both are the wrong category for an edge. */
27
+ border: 2px solid var(--color-green-700);
19
28
  }
20
29
 
21
30
  .highlight-wrapper {
@@ -34,13 +43,13 @@ export default css`
34
43
  top: 1rem;
35
44
  left: 50%;
36
45
  transform: translate(-50%, -50%);
37
- background-color: #1d7928;
38
- color: white;
46
+ background-color: var(--status-success-fill);
47
+ color: var(--color-text-inverse);
39
48
  font-weight: bold;
40
49
  font-size: var(--typography-body-regular-fontSize);
41
50
  text-align: center;
42
- border-radius: 1rem 1rem 0 0;
43
- z-index: 2;
51
+ border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
52
+ z-index: var(--z-raised);
44
53
  height: 48px;
45
54
  width: 85%;
46
55
  max-width: 360px;
@@ -60,7 +69,7 @@ export default css`
60
69
 
61
70
  .hr-line {
62
71
  border: none;
63
- border-top: 1px solid #ccc;
72
+ border-top: 1px solid var(--color-border-subtle);
64
73
  margin: 1.5rem 0;
65
74
  }
66
75
  `;
@@ -10,7 +10,7 @@ export default css`
10
10
 
11
11
  .hr-line {
12
12
  border: none;
13
- border-top: 1px solid #ccc;
13
+ border-top: 1px solid var(--color-border-subtle);
14
14
  margin: 1.5rem 0;
15
15
  }
16
16
  `;
@@ -1,5 +1,6 @@
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 "../button/button.js";
4
5
  import newPricingActionsCSS from "../pricing-cards/pricing-card-actions.css.js";
5
6
 
@@ -26,7 +27,6 @@ class PricingCardActions extends LitElement {
26
27
  render() {
27
28
  return html`
28
29
  <style>
29
- ${tokens}
30
30
  ${newPricingActionsCSS}
31
31
  </style>
32
32
 
@@ -41,10 +41,9 @@ class PricingCardActions extends LitElement {
41
41
  <div class="actions">
42
42
  <bd-button-link
43
43
  label="Buy now"
44
- kind="danger"
44
+ variant="accent"
45
45
  size="md"
46
46
  fullwidth
47
- strong
48
47
  buyLink
49
48
  >
50
49
  Buy Now
@@ -1,8 +1,8 @@
1
- import { css } from "lit";
1
+ import { css, unsafeCSS } from "lit";
2
+ import { below } from "../shared/token-scales.js";
2
3
 
3
4
  export default css`
4
5
  :host {
5
- // display: block;
6
6
  padding: 0px 240px;
7
7
  }
8
8
 
@@ -33,7 +33,7 @@ export default css`
33
33
  flex: 1 1 calc(25% - 1rem);
34
34
  }
35
35
 
36
- @media (max-width: 768px) {
36
+ @media ${unsafeCSS(below('md'))} {
37
37
  ::slotted(new-pricing-card) {
38
38
  flex: 1 1 100%;
39
39
  }
@@ -1,5 +1,6 @@
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 newCardsContainerPricingCSS from "../pricing-cards/pricing-card-container.css.js";
4
5
 
5
6
  export class PricingCardsContainer extends LitElement {
@@ -26,6 +27,6 @@ export class PricingCardsContainer extends LitElement {
26
27
  `;
27
28
  }
28
29
  }
29
- PricingCardsContainer.styles = [tokens, newCardsContainerPricingCSS];
30
+ PricingCardsContainer.styles = [newCardsContainerPricingCSS];
30
31
 
31
32
  customElements.define("pricing-cards-container", PricingCardsContainer);
@@ -12,22 +12,21 @@ export default css`
12
12
  .card-title {
13
13
  font-size: var(--typography-heading-h4-fontSize);
14
14
  font-family: var(--typography-fontFamily-sans);
15
- font-weight: var(--typography-fontWeight-bold);
16
15
  margin: 0;
17
16
  text-align: left;
18
- color: #000000;
17
+ color: var(--color-text-primary);
19
18
  }
20
19
 
21
20
  .card-title-brand {
22
21
  display: inline;
23
22
  font-family: var(--typography-fontFamily-sans);
24
23
  font-weight: var(--typography-fontWeight-bold);
25
- color: #000000;
24
+ color: var(--color-text-primary);
26
25
  }
27
26
 
28
27
  /* Stil pentru cuvântul "Plus" evidențiat */
29
28
  .plus-text {
30
- color: var(--color-blue-600);
29
+ color: var(--color-text-brand);
31
30
  font-weight: var(--typography-fontWeight-bold);
32
31
  font-family: var(--typography-fontFamily-sans);
33
32
  }
@@ -37,9 +36,12 @@ export default css`
37
36
  align-items: center;
38
37
  gap: 0.25rem;
39
38
  font-weight: bold;
40
- background: #e8f0fe;
39
+ /* The brand tint as a badge ground. bd-badge's brand variant is this exact
40
+ pair (badge.css.js:71-72) and tokens.js names the step for the job:
41
+ -surface is the light tint. Value-identical at #f0f7ff. */
42
+ background: var(--status-brand-surface);
41
43
  padding: 0.25rem 0.5rem;
42
- border-radius: 4px;
44
+ border-radius: var(--radius-sm);
43
45
  margin: 0.5rem 0;
44
46
  font-size: 0.875rem;
45
47
  }
@@ -52,7 +54,7 @@ export default css`
52
54
  font-size: var(--typography-body-regular-fontSize);
53
55
  text-align: left;
54
56
  font-family: var(--typography-fontFamily-sans);
55
- color: #000000;
57
+ color: var(--color-text-primary);
56
58
  margin: 0;
57
59
  margin-bottom: var(--spacing-16);
58
60
  margin-top: -8px;
@@ -60,7 +62,7 @@ export default css`
60
62
 
61
63
  .hr-line {
62
64
  border: none;
63
- border-top: 1px solid #ccc;
65
+ border-top: 1px solid var(--color-border-subtle);
64
66
  margin: 1rem 0;
65
67
  }
66
68
 
@@ -1,6 +1,8 @@
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";
5
+ import "../divider/divider-horizontal.js";
4
6
  import "../heading/heading.js";
5
7
  import "../paragraph/paragraph.js";
6
8
  import newHeaderPricingCSS from "../pricing-cards/pricing-card-header.css.js";
@@ -25,9 +27,6 @@ class PricingCardHeader extends LitElement {
25
27
  const plusIndex = title.toLowerCase().indexOf("plus");
26
28
 
27
29
  if (plusIndex === -1) {
28
- const [brand, ...rest] = title.split(" ");
29
- const restOfTitle = rest.join(" ");
30
-
31
30
  return html`
32
31
  <bd-h as="h4" class="card-title">
33
32
  <template shadowrootmode="open">
@@ -66,17 +65,17 @@ class PricingCardHeader extends LitElement {
66
65
  ${this.parsedBadges.length
67
66
  ? html`
68
67
  <div class="badge-wrapper multiple">
69
- ${this.parsedBadges.map((b) => html`<bd-badge>${b}</bd-badge>`)}
68
+ ${this.parsedBadges.map((b) => html`<bd-badge tone="primary" variant="fill">${b}</bd-badge>`)}
70
69
  </div>
71
70
  `
72
71
  : ""}
73
- <bd-p kind="small" class="badge-subtitle">${this.subtitle}</bd-p>
72
+ <bd-p variant="small" class="badge-subtitle">${this.subtitle}</bd-p>
74
73
  <bd-divider-horizontal></bd-divider-horizontal>
75
74
  </div>
76
75
  `;
77
76
  }
78
77
  }
79
78
 
80
- PricingCardHeader.styles = [tokens, newHeaderPricingCSS];
79
+ PricingCardHeader.styles = [newHeaderPricingCSS];
81
80
 
82
81
  customElements.define("pricing-card-header", PricingCardHeader);
@@ -15,35 +15,42 @@ export default css`
15
15
  .original-price {
16
16
  text-decoration: line-through;
17
17
  font-family: var(--typography-fontFamily-sans);
18
- color: #000000;
18
+ color: var(--color-text-primary);
19
19
  font-size: var(--typography-body-regular-fontSize);
20
20
  margin: 0;
21
21
  }
22
22
 
23
23
  .discount {
24
- color: #0b6a26;
24
+ color: var(--color-text-success);
25
25
  font-weight: bold;
26
- background: #d1fadc;
26
+ /* -surface-strong is the step tokens.js calls "the heavier tint, badge
27
+ shade", and this pill's ink is already --color-text-success, which is
28
+ the same green-800 --status-success-text resolves to. So the pair now
29
+ matches bd-badge's success variant exactly (badge.css.js:78-79) and
30
+ measures the 5.93:1 that file records. Value-identical at #d1fadc. */
31
+ background: var(--status-success-surface-strong);
27
32
  font-size: var(--typography-body-regular-fontSize);
28
33
  padding: 5px;
29
- border-radius: 20px;
34
+ border-radius: var(--radius-full);
30
35
  font-family: var(--typography-fontFamily-sans);
31
36
  margin: 0;
32
37
  }
33
38
 
34
39
  .price {
35
- font-size: var(--heading-xxlarge);
36
- font-weight: var(--typography-fontWeight-bold);
40
+ /* no token: 40px is not on the type scale — 4xl is 36 and 5xl is 48 —
41
+ and this was reading --heading-xxlarge, a legacy pixel size deleted with the
42
+ rest of that family. Adding the step is its own decision. */
43
+ font-size: 40px;
37
44
  text-align: left;
38
45
  font-family: var(--typography-fontFamily-sans);
39
- color: #000000;
46
+ color: var(--color-text-primary);
40
47
  margin: 0;
41
48
  }
42
49
 
43
50
  .terms {
44
51
  font-family: var(--typography-fontFamily-sans);
45
52
  font-size: var(--typography-label-small-fontSize);
46
- color: #000000;
53
+ color: var(--color-text-primary);
47
54
  text-align: left;
48
55
  margin: 0;
49
56
  margin-top: var(--spacing-8);
@@ -53,7 +60,7 @@ export default css`
53
60
  .terms a {
54
61
  font-family: var(--typography-fontFamily-sans);
55
62
  font-size: var(--typography-label-small-fontSize);
56
- color: #000000;
63
+ color: var(--color-text-primary);
57
64
  text-decoration: underline;
58
65
  }
59
66
  .toggle-group {
@@ -1,8 +1,11 @@
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 "../paragraph/paragraph.js";
7
+ import "../link/link.js";
8
+ import "../radio/radio.js";
6
9
  import newPricingPricingCSS from "../pricing-cards/pricing-card-pricing.css.js";
7
10
 
8
11
  class PricingCardPricing extends LitElement {
@@ -33,7 +36,6 @@ class PricingCardPricing extends LitElement {
33
36
 
34
37
  return html`
35
38
  <style>
36
- ${tokens}
37
39
  ${newPricingPricingCSS}
38
40
  </style>
39
41
 
@@ -63,11 +65,11 @@ class PricingCardPricing extends LitElement {
63
65
  </div>
64
66
 
65
67
  <div class="pricing-info" data-store-hide="!it.option.price.discounted">
66
- <bd-p kind="small" class="original-price">
68
+ <bd-p variant="small" class="original-price">
67
69
  <s data-store-render data-store-price="full"></s>
68
70
  </bd-p>
69
71
 
70
- <bd-badge variant="bd-light-green">
72
+ <bd-badge tone="success" variant="shade">
71
73
  Save <span data-store-render data-store-discount="percentage"></span>
72
74
  </bd-badge>
73
75
  </div>
@@ -76,9 +78,9 @@ class PricingCardPricing extends LitElement {
76
78
  <span data-store-render data-store-price="discounted||full"></span>/month
77
79
  </bd-h>
78
80
 
79
- <bd-p kind="small" class="terms">
81
+ <bd-p variant="small" class="terms">
80
82
  First year price. Plus applicable sales tax. See
81
- <bd-link href="#" target="_blank" font-size="14px" color="var(--color-neutral-900)" underline>
83
+ <bd-link href="#" target="_blank" font-size="sm" color="strong" underline>
82
84
  terms of use
83
85
  </bd-link>
84
86
  </bd-p>
@@ -2,12 +2,20 @@ import { css } from "lit";
2
2
 
3
3
  export default css`
4
4
  .show-more-toggle {
5
- display: block;
5
+ /* flex, not block, because the + and - are icon atoms now rather than
6
+ characters in the label. A glyph sat on the text baseline and was
7
+ centred by text-align; an atom is an inline-flex box of its own, so the
8
+ button aligns it against the label instead. gap replaces the space that
9
+ used to be part of the string. */
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ gap: var(--spacing-8);
6
14
  background: none;
7
15
  border: none;
8
- color: var(--color-blue-600);
16
+ color: var(--color-text-brand);
9
17
  cursor: pointer;
10
- font-size: var(--body-xlarge);
18
+ font-size: var(--typography-fontSize-lg);
11
19
  text-align: center;
12
20
  margin: 1rem auto;
13
21
  font-family: var(--typography-fontFamily-sans);
@@ -1,6 +1,9 @@
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 newShowMorePricingCSS from "../pricing-cards/pricing-card-show-more.css.js";
5
+ import "../icons/plus-icon.js";
6
+ import "../icons/minus-icon.js";
4
7
 
5
8
  class PricingCardShowMore extends LitElement {
6
9
  static properties = {
@@ -20,7 +23,9 @@ class PricingCardShowMore extends LitElement {
20
23
  render() {
21
24
  return html`
22
25
  <button @click="${this.toggleFeatures}" class="show-more-toggle">
23
- ${this.expanded ? '− Hide features' : '+ Show more features'}
26
+ ${this.expanded
27
+ ? html`<bd-minus-icon aria-hidden="true"></bd-minus-icon>Hide features`
28
+ : html`<bd-plus-icon aria-hidden="true"></bd-plus-icon>Show more features`}
24
29
  </button>
25
30
  ${this.expanded
26
31
  ? html`<div class="feature-items"><slot></slot></div>`
@@ -28,6 +33,6 @@ class PricingCardShowMore extends LitElement {
28
33
  `;
29
34
  }
30
35
  }
31
- PricingCardShowMore.styles = [tokens, newShowMorePricingCSS];
36
+ PricingCardShowMore.styles = [newShowMorePricingCSS];
32
37
 
33
38
  customElements.define('pricing-card-show-more', PricingCardShowMore);