@repobit/dex-system-design 2.5.0 → 2.6.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 (173) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +2 -1
  3. package/package.json +14 -27
  4. package/schemas/component-manifest.json +226 -33
  5. package/schemas/manifest-omissions.json +23 -0
  6. package/src/components/accordion/accordion-bg.css.js +39 -30
  7. package/src/components/accordion/accordion-bg.js +17 -28
  8. package/src/components/accordion/accordion-bg.stories.js +5 -0
  9. package/src/components/accordion/accordion-panel.js +24 -0
  10. package/src/components/accordion/accordion.css.js +105 -111
  11. package/src/components/accordion/accordion.js +23 -37
  12. package/src/components/accordion/accordion.stories.js +5 -1
  13. package/src/components/anchor/anchor-nav.css.js +131 -53
  14. package/src/components/anchor/anchor-nav.js +276 -201
  15. package/src/components/annotation/annotation.css.js +7 -4
  16. package/src/components/architecture.stories.js +8 -7
  17. package/src/components/audience-card/audience-card.css.js +30 -4
  18. package/src/components/audience-card/audience-card.js +8 -13
  19. package/src/components/awards/awards-flex.css.js +23 -6
  20. package/src/components/awards/awards-flex.js +21 -6
  21. package/src/components/awards/awards-spotlight.css.js +25 -5
  22. package/src/components/awards/awards-spotlight.js +19 -7
  23. package/src/components/awards/awards.css.js +20 -8
  24. package/src/components/awards/awards.js +30 -91
  25. package/src/components/awards/awards.stories.js +5 -5
  26. package/src/components/awards/scroll-slides.js +128 -0
  27. package/src/components/back/back.css.js +2 -0
  28. package/src/components/badge/badge.css.js +15 -0
  29. package/src/components/bento-grid/bento-grid.css.js +105 -11
  30. package/src/components/bento-grid/bento-grid.js +37 -124
  31. package/src/components/bento-grid/bento-grid.stories.js +3 -2
  32. package/src/components/bento-grid/bento-item.css.js +71 -32
  33. package/src/components/bento-grid/bento-item.js +3 -30
  34. package/src/components/blockquote/blockquote.css.js +2 -2
  35. package/src/components/breadcrumb/breadcrumb.css.js +10 -9
  36. package/src/components/breadcrumb/breadcrumb.js +35 -34
  37. package/src/components/button/button.css.js +42 -17
  38. package/src/components/button/button.js +84 -3
  39. package/src/components/button/button.stories.js +17 -0
  40. package/src/components/card-features/card-features.css.js +23 -2
  41. package/src/components/card-features/card-features.js +6 -48
  42. package/src/components/cards/card.css.js +43 -14
  43. package/src/components/cards/card.js +43 -177
  44. package/src/components/cards/card.stories.js +8 -10
  45. package/src/components/carousel/carousel.css.js +101 -70
  46. package/src/components/carousel/carousel.js +107 -71
  47. package/src/components/carousel/carousel.stories.js +18 -16
  48. package/src/components/checkbox/checkbox.css.js +26 -9
  49. package/src/components/checkbox/checkbox.js +73 -39
  50. package/src/components/checkbox/checkbox.stories.js +35 -18
  51. package/src/components/compare/compare.css.js +68 -10
  52. package/src/components/compare/compare.js +40 -103
  53. package/src/components/compare/compare.stories.js +1 -1
  54. package/src/components/compatibility-table/compatibility-table.css.js +70 -37
  55. package/src/components/compatibility-table/compatibility-table.js +47 -40
  56. package/src/components/compatibility-table/compatibility-table.stories.js +78 -1
  57. package/src/components/display/display.css.js +7 -0
  58. package/src/components/dropdown/dropdown.css.js +20 -3
  59. package/src/components/dropdown/dropdown.js +57 -21
  60. package/src/components/dropdown/dropdown.stories.js +31 -9
  61. package/src/components/features/features.css.js +56 -21
  62. package/src/components/features/features.js +7 -117
  63. package/src/components/fieldset/fieldset.stories.js +68 -0
  64. package/src/components/footer/footer-images.js +34 -0
  65. package/src/components/footer/footer-links-group.css.js +10 -10
  66. package/src/components/footer/footer-locale.js +47 -0
  67. package/src/components/footer/footer-lp.js +27 -114
  68. package/src/components/footer/footer-lp.stories.js +2 -2
  69. package/src/components/footer/footer-nav-menu.css.js +2 -2
  70. package/src/components/footer/footer-nav-menu.js +8 -3
  71. package/src/components/footer/footer.css.js +238 -197
  72. package/src/components/footer/footer.js +109 -187
  73. package/src/components/footer/footer.stories.js +14 -4
  74. package/src/components/grid/grid.css.js +64 -5
  75. package/src/components/header/header-code.css.js +20 -11
  76. package/src/components/header/header-code.js +1 -1
  77. package/src/components/header/header.css.js +20 -14
  78. package/src/components/header/header.js +6 -7
  79. package/src/components/header/header.stories.js +29 -24
  80. package/src/components/heading/heading.css.js +11 -0
  81. package/src/components/hero/hero.js +10 -2
  82. package/src/components/highlight/highlight.css.js +30 -6
  83. package/src/components/icons/arrow-icon.js +4 -1
  84. package/src/components/icons/arrow-right-icon.js +5 -1
  85. package/src/components/icons/icon-element.js +18 -0
  86. package/src/components/image/image.js +29 -9
  87. package/src/components/image/image.stories.js +38 -2
  88. package/src/components/input/custom-form.stories.js +38 -7
  89. package/src/components/input/input-clipboard.css.js +15 -1
  90. package/src/components/input/input-clipboard.js +84 -21
  91. package/src/components/input/input.js +27 -7
  92. package/src/components/install-options/install-options.css.js +26 -6
  93. package/src/components/install-options/install-options.js +32 -8
  94. package/src/components/label/label.css.js +1 -1
  95. package/src/components/light-carousel/light-carousel.css.js +100 -48
  96. package/src/components/light-carousel/light-carousel.js +43 -5
  97. package/src/components/link/link.css.js +15 -15
  98. package/src/components/link/link.js +17 -1
  99. package/src/components/link/link.stories.js +20 -7
  100. package/src/components/list/list.css.js +3 -3
  101. package/src/components/logo-marquee/logo-marquee.css.js +12 -1
  102. package/src/components/logo-marquee/logo-marquee.js +33 -8
  103. package/src/components/logo-marquee/logo-marquee.stories.js +10 -4
  104. package/src/components/modal/modal.css.js +74 -40
  105. package/src/components/modal/modal.js +85 -74
  106. package/src/components/modal/modal.stories.js +27 -14
  107. package/src/components/motion-art/motion-art.js +67 -1
  108. package/src/components/page-switcher/page-switcher.css.js +27 -9
  109. package/src/components/page-switcher/page-switcher.js +11 -8
  110. package/src/components/partner-banner/partner-banner.css.js +2 -0
  111. package/src/components/picture/picture.css.js +4 -4
  112. package/src/components/picture/picture.js +13 -3
  113. package/src/components/picture/picture.stories.js +28 -2
  114. package/src/components/post-card/post-card.css.js +18 -3
  115. package/src/components/pricing-cards/adopt-styles.js +16 -0
  116. package/src/components/pricing-cards/new-pricing-card.js +2 -4
  117. package/src/components/pricing-cards/new-pricing-card.stories.js +20 -22
  118. package/src/components/pricing-cards/pricing-card-actions.css.js +8 -12
  119. package/src/components/pricing-cards/pricing-card-actions.js +26 -13
  120. package/src/components/pricing-cards/pricing-card-container.css.js +4 -3
  121. package/src/components/pricing-cards/pricing-card-container.js +10 -4
  122. package/src/components/pricing-cards/pricing-card-header.css.js +5 -4
  123. package/src/components/pricing-cards/pricing-card-header.js +18 -31
  124. package/src/components/pricing-cards/pricing-card-pricing.css.js +84 -61
  125. package/src/components/pricing-cards/pricing-card-pricing.js +38 -24
  126. package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
  127. package/src/components/pricing-cards/pricing-card.css.js +75 -41
  128. package/src/components/pricing-cards/pricing-card.js +356 -308
  129. package/src/components/progress/progress.css.js +58 -13
  130. package/src/components/progress/progress.js +13 -10
  131. package/src/components/progress/progress.stories.js +9 -7
  132. package/src/components/radio/radio-group.css.js +42 -0
  133. package/src/components/radio/radio-group.js +89 -0
  134. package/src/components/radio/radio.css.js +63 -6
  135. package/src/components/radio/radio.js +173 -140
  136. package/src/components/radio/radio.stories.js +99 -44
  137. package/src/components/radio/toggle-radio.js +44 -0
  138. package/src/components/review/review-grid.css.js +5 -1
  139. package/src/components/review/review-grid.js +2 -0
  140. package/src/components/review/review.js +13 -0
  141. package/src/components/shared/announcer.js +37 -0
  142. package/src/components/shared/fill-width.css.js +33 -0
  143. package/src/components/shared/form-control.js +194 -0
  144. package/src/components/shared/form-field.css.js +31 -3
  145. package/src/components/shared/token-scales.js +75 -26
  146. package/src/components/spotlight-section/spotlight-section.js +2 -2
  147. package/src/components/stat/stat-highlight.js +1 -1
  148. package/src/components/stat/stat.css.js +18 -3
  149. package/src/components/switch/switch.css.js +58 -5
  150. package/src/components/switch/switch.js +53 -5
  151. package/src/components/switch/switch.stories.js +30 -8
  152. package/src/components/tab-list/tab-list.css.js +51 -13
  153. package/src/components/tab-list/tab-list.js +7 -2
  154. package/src/components/tab-list/tab-list.stories.js +2 -2
  155. package/src/components/tabs/tabs.css.js +18 -1
  156. package/src/components/tabs/tabs.js +119 -41
  157. package/src/components/terminal/terminal-message.css.js +6 -1
  158. package/src/components/termsOfUse/terms.css.js +4 -2
  159. package/src/components/textarea/textarea.js +22 -7
  160. package/src/components/textarea/textarea.stories.js +12 -9
  161. package/src/components/trust-panel/trust-panel.css.js +13 -3
  162. package/src/components/ultimate-security-demo.stories.js +5 -5
  163. package/src/components/video/video.css.js +5 -0
  164. package/src/components/video/video.js +5 -0
  165. package/src/components/video/video.stories.js +12 -0
  166. package/src/components/video-player/video-player.css.js +20 -8
  167. package/src/components/video-player/video-player.js +74 -20
  168. package/src/components/video-player/video-player.stories.js +17 -3
  169. package/src/tokens/brands.stories.js +1 -1
  170. package/src/tokens/themes/index.js +2 -2
  171. package/src/tokens/typography.stories.js +4 -3
  172. package/src/vendor/motion-art/README.md +4 -1
  173. package/src/components/footer/footer-lp.css.js +0 -159
@@ -51,8 +51,11 @@ export default css`
51
51
  went too -- ::slotted() must be the last compound in a selector, so a
52
52
  descendant after it never matches either. An anchor nested inside a
53
53
  slotted wrapper is the consuming page's to colour. */
54
+ /* No !important. A slotted anchor is the page's, and the page's own rule
55
+ for it is meant to win over this default: that is the order the cascade
56
+ gives light DOM over ::slotted. */
54
57
  ::slotted(a) {
55
- color: var(--color-text-primary) !important;
58
+ color: var(--color-text-primary);
56
59
  }
57
60
 
58
61
  /* ::slotted([slot="disclaimer-bottom"]) a stood here and could never match.
@@ -175,10 +178,15 @@ export default css`
175
178
 
176
179
  These are margins rather than a flex/grid gap because the column is a
177
180
  plain block flow and the atoms carry their own flow margins; a gap would
178
- mean also cancelling those. The !important is inherited from the rules
179
- these replace, and it earns its keep on exactly one of them: bd-h's inner
180
- element keeps the UA heading margins, which are not otherwise reachable
181
- from out here. */
181
+ mean also cancelling those.
182
+
183
+ No !important on them any more. It was inherited from older rules, and
184
+ the reason last given for it -- bd-h's inner heading keeping the UA
185
+ margins -- no longer holds: heading.css.js sets that element's margin to
186
+ 0, so nothing inside bd-h needs outranking. Measured with and without:
187
+ the bd-h host and its heading compute 0, the bd-p host 8 0 0, and bd-p's
188
+ own paragraph keeps the 16 below it that its --bd-paragraph-margin-bottom
189
+ gives, which is the copy -> price gap. */
182
190
  /* The kicker. It is a <p> rather than a bd-h -- see the note in header.js --
183
191
  so this is the one block of text in this component whose type the
184
192
  stylesheet has to declare, and it declares the ROLE rather than four
@@ -198,9 +206,7 @@ export default css`
198
206
 
199
207
  No !important. The two rules this replaces both carried it, inherited from
200
208
  an older version of the file; on a <p> the only thing to beat is the UA
201
- margin, which a plain declaration already does. The bd-h below still needs
202
- it, because its inner element keeps the UA heading margins and they are
203
- not otherwise reachable from out here. */
209
+ margin, which a plain declaration already does. */
204
210
  .bd-product-name {
205
211
  font-size: var(--typography-heading-h4-fontSize);
206
212
  font-weight: var(--typography-heading-h4-fontWeight);
@@ -228,15 +234,15 @@ export default css`
228
234
  be the same size and the hierarchy the semibold kicker was added to sharpen
229
235
  would flatten. That is a design question, not a CSS one. */
230
236
  .bd-value-prop {
231
- margin: var(--spacing-0) !important;
237
+ margin: var(--spacing-0);
232
238
  }
233
239
 
234
240
  .bd-description {
235
241
  /* LIVE, not inert: scripts/atom-inert-properties.json records colour on a
236
242
  bd-p host as reaching the text, unlike the five type axes. */
237
243
  color: var(--color-text-primary);
238
- margin-top: var(--spacing-8) !important;
239
- margin-bottom: var(--spacing-0) !important;
244
+ margin-top: var(--spacing-8);
245
+ margin-bottom: var(--spacing-0);
240
246
  }
241
247
 
242
248
  .bd-price-zone-top {
@@ -476,7 +482,7 @@ export default css`
476
482
  .bd-header-scrim {
477
483
  position: absolute;
478
484
  inset-inline: 0;
479
- bottom: 0;
485
+ inset-block-end: 0;
480
486
  height: calc(
481
487
  var(--bd-header-mark-inset) + var(--bd-header-mark-height) +
482
488
  var(--bd-header-scrim-fade)
@@ -501,8 +507,8 @@ export default css`
501
507
  position: absolute;
502
508
  /* the same property the scrim sizes its plateau from, so the band cannot
503
509
  stop covering the mark when the inset changes below sm */
504
- bottom: var(--bd-header-mark-inset);
505
- right: var(--bd-header-mark-inset);
510
+ inset-block-end: var(--bd-header-mark-inset);
511
+ inset-inline-end: var(--bd-header-mark-inset);
506
512
  z-index: var(--z-raised);
507
513
  color: var(--color-text-inverse);
508
514
  pointer-events: none;
@@ -92,9 +92,9 @@ class Header extends LitElement {
92
92
  props that do not exist. All three were listed there as if they worked.
93
93
 
94
94
  The one consumer was packages/dex-system-design/index.html, Vite's dev
95
- scratch page, which sets all three, loads no store, and has therefore
96
- never displayed a price. It demonstrated the bug rather than a need, and
97
- it is updated in the same commit. */
95
+ scratch page, which set all three and, loading no store then, had never
96
+ displayed a price. It demonstrated the bug rather than a need, and it was
97
+ updated in the same commit. */
98
98
  /* `product-id`, the spelling this component documents and the only one
99
99
  anything writes. Lit derives an observed attribute by lowercasing the
100
100
  property name rather than dash-casing it, so `productId` was listening
@@ -289,10 +289,9 @@ class Header extends LitElement {
289
289
  nothing on click. It has been that way since it was written.
290
290
  Set cta-secondary-href.
291
291
 
292
- In Storybook the PRIMARY is inert too, for the same reason
293
- the price zones are empty there -- no store to inject an
294
- href. On a real page the store fills the primary in and
295
- never touches the secondary. -->
292
+ The store fills the PRIMARY in -- on a real page and in
293
+ Storybook, though not in the Vitest story tests, which run
294
+ without it -- and never touches the secondary. -->
296
295
  <bd-button-link
297
296
  variant="accent"
298
297
  part="buy-button"
@@ -26,7 +26,7 @@ export default {
26
26
  title="Bitdefender Total Security"
27
27
  subtitle="Complete protection for all devices"
28
28
  description="Award-winning security for Windows, macOS, Android & iOS."
29
- product-id="ts"
29
+ product-id="ts_i"
30
30
  devices="5"
31
31
  subscription="1"
32
32
  >
@@ -390,14 +390,17 @@ sat inside a 96px column with \`overflow: hidden\` and read "rusted. lways.".
390
390
  The mark is the same words as artwork, so nothing needs translating and the
391
391
  width is fixed at 182.
392
392
 
393
- ### The prices are empty in Storybook
393
+ ### The prices are live in Storybook
394
394
 
395
395
  The struck price, the discount and the final price are store-driven —
396
396
  \`data-store-render\` with \`data-store-price\` / \`data-store-discount\` — and
397
- there is no store in Storybook, so all three render empty. The discount badge
398
- therefore shows as a small green pill with no text. That is the harness, not
399
- the design: on a real page \`data-store-hide\` removes the whole row when the
400
- option is not discounted.
397
+ Storybook gives every story the store a page uses (\`.storybook/preview.js\`),
398
+ so these are today's prices from www.bitdefender.com for the story's
399
+ \`product-id\`, \`devices\` and \`subscription\`, and they move when the store
400
+ does. An option the store does not sell renders nothing. The Vitest story tests
401
+ run without the store, so there all three are empty and the discount badge is
402
+ a small green pill with no text; on a real page \`data-store-hide\` removes the
403
+ whole row when the option is not discounted.
401
404
 
402
405
  ### Notes
403
406
  - Pricing zones use \`data-store-render\` and \`data-store-price\` attributes for store integration
@@ -536,7 +539,7 @@ const defaultArgs = {
536
539
  ctaLabel : 'Buy now',
537
540
  ctaSecondaryLabel: 'View more plans',
538
541
  ctaSecondaryHref : '',
539
- productId : 'ts', devices : '5', subscription : '1',
542
+ productId : 'ts_i', devices : '5', subscription : '1',
540
543
  shadow : true, dataLayerEvent : 'info'
541
544
  };
542
545
 
@@ -568,11 +571,11 @@ export const WithDisclaimers = {
568
571
  <bd-header
569
572
  title="Bitdefender Premium Security"
570
573
  subtitle="Ultimate protection for all devices"
571
- description="Unlimited devices, unlimited VPN, identity theft protection."
572
- product-id="ps" devices="unlimited" subscription="1"
574
+ description="Ten devices, unlimited VPN, identity theft protection."
575
+ product-id="ps" devices="10" subscription="1"
573
576
  >
574
577
  <img slot="header-picture" src="/images/bd-header-us.jpg" alt="Premium Security" />
575
- <span slot="disclaimer-top">Protects unlimited devices.</span>
578
+ <span slot="disclaimer-top">Protects up to 10 devices.</span>
576
579
  <span slot="disclaimer-bottom-text-start">By purchasing you agree to our </span>
577
580
  <a slot="disclaimer-bottom-link" href="/terms">Terms of Service</a>
578
581
  <span slot="disclaimer-bottom-text-end"> and Privacy Policy.</span>
@@ -586,7 +589,7 @@ export const DifferentProducts = {
586
589
  render: () => html`
587
590
  <div style="display:flex; flex-direction:column; gap:40px;">
588
591
  <bd-header title="Antivirus Plus" subtitle="Basic protection" description="Core antivirus for Windows." product-id="av" devices="1" subscription="1"></bd-header>
589
- <bd-header title="Total Security" subtitle="Complete coverage" description="Full-suite protection for all your devices." product-id="ts" devices="5" subscription="1"></bd-header>
592
+ <bd-header title="Total Security" subtitle="Complete coverage" description="Full-suite protection for all your devices." product-id="ts_i" devices="5" subscription="1"></bd-header>
590
593
  <bd-header title="Premium Security" subtitle="Ultimate defense" description="Everything you need plus unlimited VPN." product-id="ps" devices="10" subscription="1"></bd-header>
591
594
  </div>
592
595
  `,
@@ -654,7 +657,7 @@ decision belongs to the dev and SEO teams composing the page, not because
654
657
  title="Bitdefender Total Security"
655
658
  subtitle="Complete real-time data protection"
656
659
  description="Award-winning cybersecurity for all your devices."
657
- product-id="ts" devices="5" subscription="1">
660
+ product-id="ts_i" devices="5" subscription="1">
658
661
  <img slot="header-picture" src="/images/bd-header-img.jpg" alt="Product screenshot" />
659
662
  </bd-header>
660
663
  </div>
@@ -667,7 +670,7 @@ decision belongs to the dev and SEO teams composing the page, not because
667
670
  title="Bitdefender Total Security"
668
671
  subtitle="Complete real-time data protection"
669
672
  description="Award-winning cybersecurity for all your devices."
670
- product-id="ts" devices="5" subscription="1">
673
+ product-id="ts_i" devices="5" subscription="1">
671
674
  <img slot="header-picture" src="/images/bd-header-img.jpg" alt="Product screenshot" />
672
675
  </bd-header>
673
676
  </div>
@@ -694,12 +697,14 @@ The primary needs no href either way: it carries \`buyLink\`, so
694
697
  \`@repobit/dex-store\` injects the buy URL at runtime — which is also why there is no
695
698
  \`cta-href\` prop to match the label one.
696
699
 
697
- **Careful reading this page, though: in Storybook BOTH primaries are inert too**, for
698
- the same reason the price zones are empty here — there is no store to inject anything.
699
- Measured on this story: all three hrefless anchors refuse focus and match neither
700
- \`a[href]\` nor \`:enabled\`, while the one with \`cta-secondary-href\` takes focus
701
- normally. On a real page the primary gets its href from the store and the secondary
702
- still does not, unless you set it.
700
+ Storybook has the store too, so this page shows it working: measured on this story,
701
+ both primaries get a checkout URL and take focus, the secondary with
702
+ \`cta-secondary-href\` takes focus, and the top secondary is the one anchor with no
703
+ href — it refuses focus and matches neither \`a[href]\` nor \`:enabled\`. Until
704
+ 2026-10-28 both primaries were inert here as well: the preview handed the store to an
705
+ element the store package no longer defines, and \`bd-button-link\` did not ask the
706
+ store to search its shadow root, where the buy link's anchor is. The Vitest story
707
+ tests run without the store, so there the primaries are still inert.
703
708
 
704
709
  Accessible names come from the visible text now rather than from a \`label\` attribute —
705
710
  measured here as "Buy now", "View more plans", "Get Protection" and "Start your 30-day
@@ -719,7 +724,7 @@ duplicating its own content.`
719
724
  title="Bitdefender Total Security"
720
725
  subtitle="Complete real-time data protection"
721
726
  description="Award-winning cybersecurity for all your devices."
722
- product-id="ts" devices="5" subscription="1">
727
+ product-id="ts_i" devices="5" subscription="1">
723
728
  <img slot="header-picture" src="/images/bd-header-img.jpg" alt="Product screenshot" />
724
729
  </bd-header>
725
730
  </div>
@@ -735,7 +740,7 @@ duplicating its own content.`
735
740
  cta-label="Get Protection"
736
741
  cta-secondary-label="Start your 30-day trial"
737
742
  cta-secondary-href="#trial"
738
- product-id="ts" devices="5" subscription="1">
743
+ product-id="us_i" devices="5" subscription="1">
739
744
  <img slot="header-picture" src="/images/bd-header-img.jpg" alt="Product screenshot" />
740
745
  </bd-header>
741
746
  </div>
@@ -780,7 +785,7 @@ the reference for the type scale and the 16/8/8 rhythm described above.`
780
785
  title="Bitdefender Total Security"
781
786
  subtitle="Complete protection for all your devices"
782
787
  description="Award-winning security for Windows, macOS, Android and iOS."
783
- product-id="ts" devices="5" subscription="1"
788
+ product-id="ts_i" devices="5" subscription="1"
784
789
  >
785
790
  <img slot="header-picture" src="/images/bd-header-img.jpg" alt="Total Security" />
786
791
  </bd-header>
@@ -789,7 +794,7 @@ the reference for the type scale and the 16/8/8 rhythm described above.`
789
794
  title="Bitdefender Total Security"
790
795
  subtitle="The same mark on a pale image"
791
796
  description="The stand-in panel on the right is as light as an image can get."
792
- product-id="ts" devices="5" subscription="1"
797
+ product-id="ts_i" devices="5" subscription="1"
793
798
  >
794
799
  <div
795
800
  slot="header-picture"
@@ -872,7 +877,7 @@ the 16/8/8 rhythm already match, and were measured doing so.
872
877
  |---|---|---|
873
878
  | The product name on **two lines** — "Bitdefender" fixed, "Ultimate Security" variable | one \`title\` string, one line | **decided 2026-09-17: nothing, here.** The page builds it. \`title\` stays one string and one line; a page that needs the two-line kicker composes it from the atoms against this story, which is what this story is for. See below |
874
879
  | CTA labels "Get Protection" / "Start your 30-day trial" | \`cta-label\` and \`cta-secondary-label\`, defaulting to "Buy now" / "View more plans" | **the page sets them, as of 2026-09-17.** Which words sell a subscription is still funnel copy and still not ours — but it is now a value in markup rather than a literal in this file |
875
- | \`$159.99\` / \`44% OFF\` / \`$89.99\` visible | store-driven, so empty in Storybook | **nothing.** This is correct behaviour — the reference hardcodes them only so the price block's layout is visible here |
880
+ | \`$159.99\` / \`44% OFF\` / \`$89.99\` visible | store-driven: live in Storybook, empty in the Vitest story tests | **nothing.** The reference hardcodes them only so the price block's layout is visible; the store fills the same zones, and \`us_i\` with 5 devices for 1 year gave exactly these three on 2026-10-28 |
876
881
  | the disclaimer as one two-line paragraph | two \`bd-p\` blocks behind three slots | **nothing.** Measured identical: 8px from the CTA row, 0 between the lines |
877
882
 
878
883
  The Figma component exposes seven properties (\`productName\`, \`subtitle\`,
@@ -22,6 +22,17 @@ export default css`
22
22
  color: var(--color-text-primary);
23
23
  }
24
24
 
25
+ /* A heading that wraps shares its words between its lines rather than
26
+ leaving one on the last. text-wrap is inherited, so slotted copy and
27
+ every component titled through bd-h -- bd-section-header among them --
28
+ balances too. Behind @supports: balance is Newly available (Safari 17.5,
29
+ 2024-05-13) and Widely available only from 2026-11-13. */
30
+ @supports (text-wrap: balance) {
31
+ .bd-heading {
32
+ text-wrap: balance;
33
+ }
34
+ }
35
+
25
36
  /* h1 */
26
37
  .bd-heading.h1 {
27
38
  font-size: var(--typography-heading-h1-fontSize);
@@ -106,6 +106,8 @@ export class Hero extends LitElement {
106
106
 
107
107
  _renderMedia() {
108
108
  if (this._hasMedia) return nothing;
109
+ /* preload="none": under reduced motion, or paused, the video never plays
110
+ and the poster is all there is, so nothing else is fetched for it. */
109
111
  if (this.videoSrc) {
110
112
  return html`<video
111
113
  class="media"
@@ -115,14 +117,20 @@ export class Hero extends LitElement {
115
117
  muted
116
118
  loop
117
119
  playsinline
118
- preload="metadata"
120
+ preload="none"
119
121
  aria-hidden="true"
120
122
  tabindex="-1"
121
123
  .muted=${true}
122
124
  ></video>`;
123
125
  }
126
+ /* The poster alone is the band's picture, and the band opens the page, so
127
+ it is the image the page is waiting for: high priority, never lazy. The
128
+ size is the homepage poster's; the stage sizes the box itself, so the
129
+ attributes only give the image its shape before it arrives. alt="" is
130
+ what keeps it out of the accessibility tree -- aria-hidden beside it
131
+ said the same thing twice. */
124
132
  return this.poster
125
- ? html`<img class="media" src="${this.poster}" alt="" aria-hidden="true">`
133
+ ? html`<img class="media" src="${this.poster}" alt="" width="1440" height="613" fetchpriority="high">`
126
134
  : nothing;
127
135
  }
128
136
 
@@ -46,15 +46,13 @@ export default css`
46
46
  the tint sits below the line, the text on it, the decorations above. */
47
47
  z-index: var(--z-below);
48
48
  position: relative;
49
- margin-left: calc(-1 * var(--spacing-4));
50
- margin-right: calc(-1 * var(--spacing-4));
49
+ margin-inline: calc(-1 * var(--spacing-4));
51
50
  }
52
51
 
53
52
  .highlight-text {
54
53
  position: relative;
55
54
  z-index: var(--z-base);
56
- padding-left: var(--spacing-4);
57
- padding-right: var(--spacing-4);
55
+ padding-inline: var(--spacing-4);
58
56
  box-decoration-break: clone;
59
57
  -webkit-box-decoration-break: clone;
60
58
  }
@@ -87,8 +85,11 @@ margin-left: calc(-1 * var(--spacing-4));
87
85
  z-index: var(--z-raised);
88
86
  }
89
87
 
88
+ /* .left and .right are the phrase's start and end (highlight.js puts one
89
+ before it and one after), so they sit on the inline edges: in a
90
+ right-to-left page .left is the right-hand bar. */
90
91
  .highlight-deco.left {
91
- left: var(--bd-highlight-deco-inset);
92
+ inset-inline-start: var(--bd-highlight-deco-inset);
92
93
  top: calc(-1 * var(--spacing-4));
93
94
  bottom: 0;
94
95
  }
@@ -98,7 +99,7 @@ margin-left: calc(-1 * var(--spacing-4));
98
99
  with the surrounding text, which is why the bar drifted clear of the
99
100
  background when the highlight was the last word. */
100
101
  .highlight-deco.right {
101
- right: var(--bd-highlight-deco-inset);
102
+ inset-inline-end: var(--bd-highlight-deco-inset);
102
103
  top: 0;
103
104
  bottom: calc(-1 * var(--spacing-4));
104
105
  }
@@ -149,4 +150,27 @@ margin-left: calc(-1 * var(--spacing-4));
149
150
 
150
151
  }
151
152
 
153
+ /* The tint is the highlight, and forced colours repaint it as Canvas: the
154
+ phrase read exactly like the words around it. It opts out into the
155
+ system's Highlight pair, and the bracket bars, which sit on its edges,
156
+ draw in CanvasText so they still show against it.
157
+
158
+ It also leaves the rung below the line. Chromium paints a Canvas
159
+ backplate behind forced text, and the heading's backplate covered a tint
160
+ stacked under it -- measured, the phrase came out HighlightText on that
161
+ white, which is to say blank. */
162
+ @media (forced-colors: active) {
163
+ .highlight {
164
+ forced-color-adjust: none;
165
+ background: Highlight;
166
+ color: HighlightText;
167
+ z-index: auto;
168
+ }
169
+
170
+ .highlight-svg-rect,
171
+ .highlight-svg-ellipse-top,
172
+ .highlight-svg-ellipse-bottom {
173
+ fill: CanvasText;
174
+ }
175
+ }
152
176
  `;
@@ -1,6 +1,6 @@
1
1
  // icons/arrow-icon.js
2
2
  import { html } from "lit";
3
- import { BdIconElement } from "./icon-element.js";
3
+ import { BdIconElement, rtlMirror } from "./icon-element.js";
4
4
 
5
5
  /**
6
6
  * The trailing arrow on bd-contact-button.
@@ -30,6 +30,9 @@ import { BdIconElement } from "./icon-element.js";
30
30
  class BdArrowIcon extends BdIconElement {
31
31
  static defaultSize = "sm";
32
32
 
33
+ // forward: it points the way the line reads
34
+ static styles = [BdIconElement.styles, rtlMirror];
35
+
33
36
  render() {
34
37
  return html`
35
38
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true">
@@ -1,6 +1,6 @@
1
1
  // icons/arrow-right-icon.js
2
2
  import { html } from "lit";
3
- import { BdIconElement } from "./icon-element.js";
3
+ import { BdIconElement, rtlMirror } from "./icon-element.js";
4
4
 
5
5
  /**
6
6
  * The third direction of the arrow family, and it is the same drawing as the
@@ -27,6 +27,10 @@ import { BdIconElement } from "./icon-element.js";
27
27
  class ArrowRightIcon extends BdIconElement {
28
28
  static defaultSize = "md";
29
29
 
30
+ /* "Learn more", a next step: forward, so it points the way the line reads.
31
+ The up and down chevrons are not, and do not mirror. */
32
+ static styles = [BdIconElement.styles, rtlMirror];
33
+
30
34
  render() {
31
35
  return html`
32
36
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true">
@@ -5,6 +5,24 @@ import { iconSize } from "../shared/token-scales.js";
5
5
  the same pair: a page of forty check icons adopts one sheet, not forty. */
6
6
  const instanceSheets = new Map();
7
7
 
8
+ /**
9
+ * The mirror a forward-pointing icon opts into:
10
+ *
11
+ * static styles = [BdIconElement.styles, rtlMirror];
12
+ *
13
+ * An arrow or chevron that means "onward" -- a CTA's arrow, "Read more", a
14
+ * next step -- points the way the line reads, so on a right-to-left page it
15
+ * points left. It is opt-in because most icons are not directional, and some
16
+ * that look it are not: a chevron that opens a panel points down whatever
17
+ * the language. The svg mirrors rather than the host, so nothing the page
18
+ * sets on the element -- a transform, a rotation -- is overwritten.
19
+ */
20
+ export const rtlMirror = css`
21
+ :host(:dir(rtl)) svg {
22
+ scale: -1 1;
23
+ }
24
+ `;
25
+
8
26
  const instanceSheet = (size, color) => {
9
27
  const key = `${size}|${color}`;
10
28
  let sheet = instanceSheets.get(key);
@@ -13,23 +13,31 @@ const SHADOWS = ['none', 'sm', 'md', 'lg', 'xl'];
13
13
 
14
14
  export class BdImg extends LitElement {
15
15
  static properties = {
16
- src : { type: String },
17
- alt : { type: String },
18
- width : { type: Number },
19
- height : { type: Number },
20
- loading: { type: String },
21
- fit : { type: String },
22
- radius : { type: String },
23
- shadow : { type: String }
16
+ src : { type: String },
17
+ srcset : { type: String },
18
+ sizes : { type: String },
19
+ alt : { type: String },
20
+ width : { type: Number },
21
+ height : { type: Number },
22
+ loading : { type: String },
23
+ fetchPriority: { type: String, attribute: 'fetchpriority' },
24
+ decoding : { type: String },
25
+ fit : { type: String },
26
+ radius : { type: String },
27
+ shadow : { type: String }
24
28
  };
25
29
 
26
30
  constructor() {
27
31
  super();
28
32
  this.src = "";
33
+ this.srcset = "";
34
+ this.sizes = "";
29
35
  this.alt = "";
30
36
  this.width = null;
31
37
  this.height = null;
32
38
  this.loading = "lazy";
39
+ this.fetchPriority = "";
40
+ this.decoding = "";
33
41
  this.fit = "cover";
34
42
  this.radius = "none";
35
43
  this.shadow = "none";
@@ -44,13 +52,25 @@ export class BdImg extends LitElement {
44
52
 
45
53
  const finalClass = `${baseClass} ${fitClass} ${radiusClass} ${shadowClass}`;
46
54
 
55
+ /* fetchpriority="high" marks the image the page is waiting for -- its
56
+ Largest Contentful Paint -- so it is never lazy as well: a lazy image is
57
+ held back until layout puts it near the viewport, which is the very
58
+ delay the priority is there to remove. lazy stays the default for every
59
+ other image. No guard: fetchpriority and decoding are hints, and a
60
+ browser that does not know them loads the image as it always has. */
61
+ const lcp = this.fetchPriority === 'high';
62
+
47
63
  return html`
48
64
  <img
49
65
  src="${this.src}"
66
+ srcset="${this.srcset || nothing}"
67
+ sizes="${this.sizes || nothing}"
50
68
  alt="${this.alt}"
51
69
  width="${this.width ?? nothing}"
52
70
  height="${this.height ?? nothing}"
53
- loading="${this.loading}"
71
+ loading="${lcp ? nothing : this.loading}"
72
+ fetchpriority="${this.fetchPriority || nothing}"
73
+ decoding="${this.decoding || nothing}"
54
74
  class="${finalClass}"
55
75
  @load="${this._handleLoad}"
56
76
  @error="${this._handleError}"
@@ -1,4 +1,4 @@
1
- import { html } from 'lit';
1
+ import { html, nothing } from 'lit';
2
2
  import './image.js';
3
3
 
4
4
  export default {
@@ -24,6 +24,10 @@ export default {
24
24
  ></bd-img>
25
25
  \`\`\`
26
26
 
27
+ The image a page is waiting for -- a hero, its Largest Contentful Paint --
28
+ takes \`fetchpriority="high"\`, which also stops it being lazy. \`srcset\` and
29
+ \`sizes\` pass straight to the \`<img>\`.
30
+
27
31
  ### CSS Classes Applied
28
32
  | Prop | Class Pattern |
29
33
  |---|---|
@@ -44,6 +48,16 @@ export default {
44
48
  description: 'Image source URL',
45
49
  table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Content' }
46
50
  },
51
+ srcset: {
52
+ control : 'text',
53
+ description: 'Candidate sources for the `<img>`, as in HTML',
54
+ table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Content' }
55
+ },
56
+ sizes: {
57
+ control : 'text',
58
+ description: 'The rendered width for each condition, so the browser can pick from `srcset`',
59
+ table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Content' }
60
+ },
47
61
  alt: {
48
62
  control : 'text',
49
63
  description: 'Alt text for accessibility',
@@ -65,6 +79,18 @@ export default {
65
79
  description: 'Native browser loading strategy',
66
80
  table : { type: { summary: "'lazy' | 'eager'" }, defaultValue: { summary: 'lazy' }, category: 'Performance' }
67
81
  },
82
+ fetchpriority: {
83
+ control : { type: 'select' },
84
+ options : [undefined, 'high', 'low'],
85
+ description: '`high` for the image the page is waiting for (its Largest Contentful Paint) -- never lazy then; `low` for one that is above the fold but hidden at first. Leave it unset otherwise.',
86
+ table : { type: { summary: "'high' | 'low'" }, defaultValue: { summary: 'unset' }, category: 'Performance' }
87
+ },
88
+ decoding: {
89
+ control : { type: 'select' },
90
+ options : [undefined, 'async', 'sync'],
91
+ description: 'Decoding hint for the browser',
92
+ table : { type: { summary: "'async' | 'sync' | 'auto'" }, defaultValue: { summary: 'unset' }, category: 'Performance' }
93
+ },
68
94
  fit: {
69
95
  control : { type: 'select' },
70
96
  options : ['cover', 'contain', 'fill', 'none', 'scale-down'],
@@ -86,7 +112,7 @@ export default {
86
112
  }
87
113
  };
88
114
 
89
- const sampleSrc = 'https://via.placeholder.com/800x450';
115
+ const sampleSrc = '/assets/bd-header-img.jpg';
90
116
  const defaultArgs = { src: sampleSrc, alt: 'Sample image', width: 800, height: 450, loading: 'lazy', fit: 'cover', radius: 'none', shadow: 'none' };
91
117
 
92
118
  const render = (args) => html`
@@ -96,6 +122,8 @@ const render = (args) => html`
96
122
  width="${args.width}"
97
123
  height="${args.height}"
98
124
  loading="${args.loading}"
125
+ fetchpriority="${args.fetchpriority || nothing}"
126
+ decoding="${args.decoding || nothing}"
99
127
  fit="${args.fit}"
100
128
  radius="${args.radius}"
101
129
  shadow="${args.shadow}"
@@ -171,6 +199,14 @@ export const EagerLoading = {
171
199
  parameters: { docs: { description: { story: '`loading="eager"` — image loads immediately regardless of viewport position.' } } }
172
200
  };
173
201
 
202
+ export const HighPriority = {
203
+ name : 'High Priority (LCP)',
204
+ render: () => html`
205
+ <bd-img src="${sampleSrc}" alt="Product screenshot" width="800" height="450" fetchpriority="high"></bd-img>
206
+ `,
207
+ parameters: { docs: { description: { story: '`fetchpriority="high"` -- the image the page is waiting for, such as a hero. It is never lazy: the `<img>` renders without `loading`, so it is requested as soon as it is parsed.' } } }
208
+ };
209
+
174
210
  export const RoundedWithShadow = {
175
211
  name : 'Rounded + Shadow',
176
212
  render: () => html`