@repobit/dex-system-design 2.5.1 → 2.7.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 (175) 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 +233 -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 +1 -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 +228 -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 +56 -20
  75. package/src/components/grid/grid.js +20 -15
  76. package/src/components/grid/grid.stories.js +39 -11
  77. package/src/components/header/header-code.css.js +20 -11
  78. package/src/components/header/header-code.js +1 -1
  79. package/src/components/header/header.css.js +20 -14
  80. package/src/components/header/header.js +6 -7
  81. package/src/components/header/header.stories.js +29 -24
  82. package/src/components/heading/heading.css.js +11 -0
  83. package/src/components/hero/hero.js +10 -2
  84. package/src/components/highlight/highlight.css.js +30 -6
  85. package/src/components/icons/arrow-icon.js +4 -1
  86. package/src/components/icons/arrow-right-icon.js +5 -1
  87. package/src/components/icons/icon-element.js +18 -0
  88. package/src/components/image/image.js +29 -9
  89. package/src/components/image/image.stories.js +38 -2
  90. package/src/components/input/custom-form.stories.js +38 -7
  91. package/src/components/input/input-clipboard.css.js +15 -1
  92. package/src/components/input/input-clipboard.js +84 -21
  93. package/src/components/input/input.js +27 -7
  94. package/src/components/install-options/install-options.css.js +26 -6
  95. package/src/components/install-options/install-options.js +32 -8
  96. package/src/components/label/label.css.js +1 -1
  97. package/src/components/light-carousel/light-carousel.css.js +100 -48
  98. package/src/components/light-carousel/light-carousel.js +43 -5
  99. package/src/components/link/link.css.js +15 -15
  100. package/src/components/link/link.js +17 -1
  101. package/src/components/link/link.stories.js +20 -7
  102. package/src/components/list/list.css.js +3 -3
  103. package/src/components/logo-marquee/logo-marquee.css.js +12 -1
  104. package/src/components/logo-marquee/logo-marquee.js +33 -8
  105. package/src/components/logo-marquee/logo-marquee.stories.js +10 -4
  106. package/src/components/modal/modal.css.js +74 -40
  107. package/src/components/modal/modal.js +85 -74
  108. package/src/components/modal/modal.stories.js +27 -14
  109. package/src/components/motion-art/motion-art.js +67 -1
  110. package/src/components/page-switcher/page-switcher.css.js +27 -9
  111. package/src/components/page-switcher/page-switcher.js +11 -8
  112. package/src/components/partner-banner/partner-banner.css.js +2 -0
  113. package/src/components/picture/picture.css.js +4 -4
  114. package/src/components/picture/picture.js +13 -3
  115. package/src/components/picture/picture.stories.js +28 -2
  116. package/src/components/post-card/post-card.css.js +18 -3
  117. package/src/components/pricing-cards/adopt-styles.js +16 -0
  118. package/src/components/pricing-cards/new-pricing-card.js +2 -4
  119. package/src/components/pricing-cards/new-pricing-card.stories.js +20 -22
  120. package/src/components/pricing-cards/pricing-card-actions.css.js +8 -12
  121. package/src/components/pricing-cards/pricing-card-actions.js +26 -13
  122. package/src/components/pricing-cards/pricing-card-container.css.js +4 -3
  123. package/src/components/pricing-cards/pricing-card-container.js +10 -4
  124. package/src/components/pricing-cards/pricing-card-header.css.js +5 -4
  125. package/src/components/pricing-cards/pricing-card-header.js +18 -31
  126. package/src/components/pricing-cards/pricing-card-pricing.css.js +84 -61
  127. package/src/components/pricing-cards/pricing-card-pricing.js +38 -24
  128. package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
  129. package/src/components/pricing-cards/pricing-card.css.js +75 -41
  130. package/src/components/pricing-cards/pricing-card.js +356 -308
  131. package/src/components/progress/progress.css.js +58 -13
  132. package/src/components/progress/progress.js +13 -10
  133. package/src/components/progress/progress.stories.js +9 -7
  134. package/src/components/radio/radio-group.css.js +42 -0
  135. package/src/components/radio/radio-group.js +89 -0
  136. package/src/components/radio/radio.css.js +63 -6
  137. package/src/components/radio/radio.js +173 -140
  138. package/src/components/radio/radio.stories.js +99 -44
  139. package/src/components/radio/toggle-radio.js +44 -0
  140. package/src/components/review/review-grid.css.js +5 -1
  141. package/src/components/review/review-grid.js +2 -0
  142. package/src/components/review/review.js +13 -0
  143. package/src/components/shared/announcer.js +37 -0
  144. package/src/components/shared/fill-width.css.js +29 -0
  145. package/src/components/shared/form-control.js +194 -0
  146. package/src/components/shared/form-field.css.js +31 -3
  147. package/src/components/shared/token-scales.js +75 -26
  148. package/src/components/spotlight-section/spotlight-section.js +2 -2
  149. package/src/components/stat/stat-highlight.js +1 -1
  150. package/src/components/stat/stat.css.js +18 -3
  151. package/src/components/switch/switch.css.js +58 -5
  152. package/src/components/switch/switch.js +53 -5
  153. package/src/components/switch/switch.stories.js +30 -8
  154. package/src/components/tab-list/tab-list.css.js +51 -13
  155. package/src/components/tab-list/tab-list.js +7 -2
  156. package/src/components/tab-list/tab-list.stories.js +2 -2
  157. package/src/components/tabs/tabs.css.js +18 -1
  158. package/src/components/tabs/tabs.js +119 -41
  159. package/src/components/terminal/terminal-message.css.js +6 -1
  160. package/src/components/termsOfUse/terms.css.js +4 -2
  161. package/src/components/textarea/textarea.js +22 -7
  162. package/src/components/textarea/textarea.stories.js +12 -9
  163. package/src/components/trust-panel/trust-panel.css.js +13 -3
  164. package/src/components/ultimate-security-demo.stories.js +5 -5
  165. package/src/components/video/video.css.js +5 -0
  166. package/src/components/video/video.js +5 -0
  167. package/src/components/video/video.stories.js +12 -0
  168. package/src/components/video-player/video-player.css.js +20 -8
  169. package/src/components/video-player/video-player.js +74 -20
  170. package/src/components/video-player/video-player.stories.js +17 -3
  171. package/src/tokens/brands.stories.js +1 -1
  172. package/src/tokens/themes/index.js +2 -2
  173. package/src/tokens/typography.stories.js +4 -3
  174. package/src/vendor/motion-art/README.md +4 -1
  175. package/src/components/footer/footer-lp.css.js +0 -159
@@ -6,15 +6,28 @@ export const anchorNavStyles = css`
6
6
  display: block;
7
7
  width: 100%;
8
8
  background: var(--color-surface-default);
9
+ position: sticky;
10
+ top: var(--sticky-top, 0);
11
+ z-index: var(--z-sticky);
9
12
  }
10
13
 
11
- :host(.is-sticky) {
12
- position: fixed;
13
- top: var(--sticky-top, 0);
14
- left: var(--sticky-left, 0);
15
- width: var(--sticky-width, 100%);
14
+ /* The shadow the bar casts while stuck. A scroll-state container query
15
+ reads the stuck state where the browser has one; elsewhere anchor-nav.js
16
+ sets .is-sticky. */
17
+ @supports (container-type: scroll-state) {
18
+ :host {
19
+ container: anchor-nav / scroll-state;
20
+ }
21
+
22
+ @container anchor-nav scroll-state(stuck: top) {
23
+ nav {
24
+ box-shadow: var(--shadow-sm);
25
+ }
26
+ }
27
+ }
28
+
29
+ :host(.is-sticky) nav {
16
30
  box-shadow: var(--shadow-sm);
17
- z-index: var(--z-sticky);
18
31
  }
19
32
 
20
33
  nav {
@@ -27,11 +40,6 @@ export const anchorNavStyles = css`
27
40
  border-bottom: var(--border-width-1) solid var(--color-border-container);
28
41
  }
29
42
 
30
- /* Când e sticky, păstrăm aceleași border-uri */
31
- :host(.is-sticky) nav {
32
- background: var(--color-surface-default);
33
- }
34
-
35
43
  .bd-anchor-nav__inner {
36
44
  display: flex;
37
45
  flex-wrap: wrap;
@@ -93,7 +101,7 @@ export const anchorNavStyles = css`
93
101
  color: var(--color-text-primary);
94
102
  /* No font-weight: body-regular, whose size this rule already asks for, is
95
103
  normal -- and the inherited weight here is 400 too, measured, so the
96
- declaration said nothing. .anchor-link.active still sets its own. */
104
+ declaration said nothing. .anchor-link[current] still sets its own. */
97
105
  display: inline-block;
98
106
  font-size: var(--typography-body-regular-fontSize);
99
107
  font-family: var(--typography-body-regular-fontFamily);
@@ -105,7 +113,7 @@ export const anchorNavStyles = css`
105
113
  A host's padding does not extend the anchor inside it, so this rule used
106
114
  to build a 44px-tall row around a 24px-tall target: measured 63x44 on the
107
115
  host with a 63x24 <a> inside it, and elementsFromPoint 4px below the top
108
- edge came back bd-anchor-nav > bd-root > div with no <a> in the stack at
116
+ edge came back bd-anchor-nav > bd-root (the former Storybook wrapper) > div with no <a> in the stack at
109
117
  all. The top and bottom 10px of every item were dead, 45% of the height a
110
118
  reader aims at.
111
119
 
@@ -122,30 +130,23 @@ export const anchorNavStyles = css`
122
130
  padding: var(--spacing-10) var(--spacing-0);
123
131
  }
124
132
 
125
- .anchor-link.active {
133
+ /* [current] is the bd-link attribute that becomes aria-current on its <a>,
134
+ so the item is drawn current exactly when it is announced so. */
135
+ .anchor-link[current] {
126
136
  /* no role: the active item in the anchor nav -- a state or modifier weight, not a text-content
127
137
  type. See button.css.js's .button--bold for the argument. */
128
138
  font-weight: var(--typography-fontWeight-semibold);
129
139
  color: var(--color-text-primary);
130
140
  }
131
141
 
132
- /* The .bd-link--primary / --secondary selectors that used to accompany these
133
- matched nothing: bd-link is a custom element and those classes live inside
134
- its shadow root, unreachable from here. Measured zero matches for
135
- .bd-link--primary, .bd-link--secondary and .anchor-link.bd-link, against
136
- four live .anchor-link elements. Only the reachable selectors remain. */
137
- .anchor-link {
138
- text-decoration: none !important;
139
- }
140
-
141
- .anchor-link:hover {
142
- text-decoration: none !important;
143
- }
144
-
145
- .anchor-link.active:hover {
146
- color: var(--color-text-primary) !important;
147
- text-decoration: none !important;
148
- }
142
+ /* No underline or hover rules here. Three !important ones stood here --
143
+ text-decoration: none on every .anchor-link, hovered or not, and
144
+ text-primary on the hovered active one -- and all three landed on the
145
+ bd-link host, which draws no text: the underline and the colour belong to
146
+ the <a> in its shadow root. The no-underline attribute already keeps that
147
+ <a> undecorated, and bd-link's current-and-hovered rule keeps the
148
+ current item text-primary. Measured on all four Default items, at rest and hovered:
149
+ the same colour, decoration and weight with the rules and without. */
149
150
 
150
151
  /* The offset has to equal the inner's padding-bottom, and it did not.
151
152
 
@@ -163,19 +164,25 @@ export const anchorNavStyles = css`
163
164
  The indicator is now one element that slides between items rather than
164
165
  an ::after per link, so the offset lives in _updateIndicator(), which
165
166
  reads the inner's padding-bottom instead of a number -- the two move
166
- together. */
167
+ together.
168
+
169
+ It spans the whole row and is placed with translate and sized with
170
+ scale from its top-left corner, so a slide is drawn on the compositor;
171
+ it animated top and width, which re-laid it out every frame. Scaled to
172
+ nothing until the first placement. The anchor is the physical left
173
+ because the offsets it is given are physical. */
167
174
  .anchor-indicator {
168
175
  position: absolute;
169
176
  left: var(--spacing-0);
170
177
  top: var(--spacing-0);
171
- width: 0;
178
+ width: 100%;
172
179
  height: var(--indicator-underline-height);
173
180
  background-color: var(--indicator-color);
174
- transform: translateX(0);
181
+ transform-origin: left top;
182
+ scale: 0 1;
175
183
  transition:
176
- transform var(--indicator-underline-duration) var(--indicator-underline-easing),
177
- top var(--indicator-underline-duration) var(--indicator-underline-easing),
178
- width var(--indicator-underline-duration) var(--indicator-underline-easing);
184
+ translate var(--indicator-underline-duration) var(--indicator-underline-easing),
185
+ scale var(--indicator-underline-duration) var(--indicator-underline-easing);
179
186
  pointer-events: none;
180
187
  }
181
188
 
@@ -223,7 +230,7 @@ export const anchorNavStyles = css`
223
230
  border: var(--border-width-1) solid var(--color-border-default);
224
231
  border-radius: var(--shape-radius-lg);
225
232
  cursor: pointer;
226
- text-align: left;
233
+ text-align: start;
227
234
  transition:
228
235
  background var(--transition-duration-fast) var(--transition-easing-smooth),
229
236
  border-color var(--transition-duration-fast) var(--transition-easing-smooth),
@@ -299,7 +306,7 @@ export const anchorNavStyles = css`
299
306
  right: var(--spacing-0);
300
307
  top: 100%;
301
308
  z-index: var(--z-overlay);
302
- max-height: min(50vh, 20rem);
309
+ max-height: min(50dvh, 20rem);
303
310
  overflow-y: auto;
304
311
  background: var(--color-surface-default);
305
312
  border: var(--border-width-1) solid var(--color-brand-200);
@@ -308,6 +315,31 @@ export const anchorNavStyles = css`
308
315
  box-shadow: var(--shadow-md);
309
316
  }
310
317
 
318
+ /* Where popover and anchor positioning both exist, anchor-nav.js makes the
319
+ panel a popover: the top layer replaces the z-index above, and light
320
+ dismiss replaces the document listeners. In the top layer the panel is
321
+ no longer inside the dropdown's box, so it is tied to the toggle instead,
322
+ at the place the absolute rule above puts it: under the toggle, as wide
323
+ as it. The rest undoes the popover's UA styles -- centred, fit-content,
324
+ padded, CanvasText. */
325
+ @supports (anchor-name: --a) {
326
+ .bd-anchor-nav__dropdown-toggle {
327
+ anchor-name: --bd-anchor-nav-toggle;
328
+ }
329
+
330
+ .bd-anchor-nav__dropdown-panel[popover] {
331
+ position-anchor: --bd-anchor-nav-toggle;
332
+ inset: auto;
333
+ top: anchor(bottom);
334
+ left: anchor(left);
335
+ width: anchor-size(width);
336
+ box-sizing: border-box;
337
+ margin: var(--spacing-0);
338
+ padding: var(--spacing-0);
339
+ color: inherit;
340
+ }
341
+ }
342
+
311
343
  .bd-anchor-nav__dropdown-list {
312
344
  list-style: none;
313
345
  margin: var(--spacing-0);
@@ -333,7 +365,7 @@ export const anchorNavStyles = css`
333
365
  dropdown -- and CLAUDE.md asks for at least 1.25 on anything that can. */
334
366
  line-height: var(--typography-body-regular-lineHeight);
335
367
  /* No font-weight: as .anchor-link above -- body-regular is normal and so is
336
- the inherited value. The --active variant sets its own. */
368
+ the inherited value. The current option sets its own. */
337
369
  /* text/brand, the same resting ink the desktop items take. This is the
338
370
  same component below md showing the same items, so it expresses the same
339
371
  meaning: colour is AVAILABLE and neutral is current. It read
@@ -345,7 +377,7 @@ export const anchorNavStyles = css`
345
377
  border: none;
346
378
  border-radius: var(--shape-radius-md);
347
379
  cursor: pointer;
348
- text-align: left;
380
+ text-align: start;
349
381
  transition:
350
382
  color var(--transition-duration-fast) var(--transition-easing-smooth),
351
383
  background var(--transition-duration-fast) var(--transition-easing-smooth);
@@ -357,7 +389,7 @@ export const anchorNavStyles = css`
357
389
  the --color-neutral-25 this hover sets measures 8.19:1; the blue-500 that
358
390
  stood here before either role measured 4.34 and failed. The background is
359
391
  the dropdown's own affordance and is not part of the ink contract. */
360
- .bd-anchor-nav__dropdown-option:hover:not(.bd-anchor-nav__dropdown-option--active) {
392
+ .bd-anchor-nav__dropdown-option:hover:not([aria-current]) {
361
393
  color: var(--color-action-primary-active);
362
394
  background: var(--color-neutral-25);
363
395
  }
@@ -372,18 +404,21 @@ export const anchorNavStyles = css`
372
404
  an interactive element in an engaged state -- but it made the current item
373
405
  the bluest thing in the list while every other item was neutral. Under one
374
406
  contract for the whole family that reading is inverted: colour marks what
375
- you can go to, neutral marks where you are. */
376
- .bd-anchor-nav__dropdown-option--active {
407
+ you can go to, neutral marks where you are.
408
+
409
+ Read off the option's aria-current, not a class kept beside it, so the
410
+ look and the announcement are one attribute. */
411
+ .bd-anchor-nav__dropdown-option[aria-current] {
377
412
  /* no role: the weight that marks the current option -- a state or modifier
378
- weight, not a text-content type. 700, the same as bd-link's
379
- .bd-link--active and bd-tab-list's selected tab. */
413
+ weight, not a text-content type. 700, the same as bd-link's current
414
+ link and bd-tab-list's selected tab. */
380
415
  font-weight: var(--typography-fontWeight-bold);
381
416
  background: var(--color-brand-50);
382
417
  color: var(--color-text-primary);
383
418
  }
384
419
 
385
420
  /* The current option does not move under the pointer, as on the bars. */
386
- .bd-anchor-nav__dropdown-option--active:hover {
421
+ .bd-anchor-nav__dropdown-option[aria-current]:hover {
387
422
  color: var(--color-text-primary);
388
423
  background: var(--color-brand-50);
389
424
  }
@@ -402,6 +437,24 @@ export const anchorNavStyles = css`
402
437
  display: none;
403
438
  }
404
439
 
440
+ /* Forced colours repaint backgrounds as Canvas, which took the sliding
441
+ indicator and the current option's fill with them. Both opt out into
442
+ Highlight, as bd-tab-list's and bd-page-switcher's indicators do; the
443
+ option takes HighlightText on it. */
444
+ @media (forced-colors: active) {
445
+ .anchor-indicator {
446
+ forced-color-adjust: none;
447
+ background-color: Highlight;
448
+ }
449
+
450
+ .bd-anchor-nav__dropdown-option[aria-current],
451
+ .bd-anchor-nav__dropdown-option[aria-current]:hover {
452
+ forced-color-adjust: none;
453
+ background: Highlight;
454
+ color: HighlightText;
455
+ }
456
+ }
457
+
405
458
  @keyframes bd-anchor-nav-dropdown-label-swap {
406
459
  from { opacity: 0.35; transform: translateY(var(--spacing-4)); }
407
460
  to { opacity: 1; transform: translateY(var(--spacing-0)); }
@@ -441,29 +494,54 @@ export const anchorNavStyles = css`
441
494
  var(--transition-easing-smooth);
442
495
  }
443
496
 
497
+ /* The CTA opens below the dropdown once the first section is behind the
498
+ reader. Its row grows from 0fr to 1fr: a grid track interpolates to the
499
+ content's own height, where the max-height that stood here had to
500
+ guess one -- 128px, which clipped a CTA whose label wraps at a large
501
+ text size. visibility follows, so a closed CTA is out of the tab order
502
+ as well as out of sight. */
444
503
  .bd-cta {
445
504
  align-self: stretch;
446
- display: block;
447
- overflow: hidden;
448
- max-height: var(--spacing-0);
505
+ display: grid;
506
+ grid-template-rows: 0fr;
449
507
  opacity: 0;
508
+ visibility: hidden;
450
509
  transform: translateY(calc(-1 * var(--spacing-8)));
451
510
  pointer-events: none;
452
511
  margin-top: calc(-1 * var(--spacing-16));
453
512
  transition:
454
- max-height var(--transition-duration-slow) var(--transition-easing-ease-out),
513
+ grid-template-rows var(--transition-duration-slow) var(--transition-easing-ease-out),
455
514
  opacity var(--transition-duration-normal) var(--transition-easing-smooth),
456
515
  transform var(--transition-duration-normal) var(--transition-easing-smooth),
457
- margin-top var(--transition-duration-normal) var(--transition-easing-smooth);
516
+ margin-top var(--transition-duration-normal) var(--transition-easing-smooth),
517
+ visibility var(--transition-duration-slow);
518
+ }
519
+
520
+ /* The clip the row needs while it grows, held off the CTA by the width of
521
+ its focus ring -- an outline 2px out at a 2px offset -- so the ring is
522
+ not cut off: the old clip sat on the CTA's own edge and cut it on all
523
+ four sides. Padding and margin cancel, so nothing moves. */
524
+ .bd-cta__inner {
525
+ min-height: 0;
526
+ overflow: hidden;
527
+ padding: var(--spacing-4);
528
+ margin: calc(-1 * var(--spacing-4));
458
529
  }
459
530
 
460
531
  .bd-anchor-nav__inner[data-mobile-cta-visible] .bd-cta {
461
- max-height: var(--spacing-128);
532
+ grid-template-rows: 1fr;
462
533
  opacity: 1;
534
+ visibility: visible;
463
535
  transform: translateY(var(--spacing-0));
464
536
  pointer-events: auto;
465
537
  margin-top: var(--spacing-0);
466
538
  }
467
539
 
540
+ /* Full width on a phone, through bd-button's width hook. This was a
541
+ resize listener writing fullwidth on the page's own element. */
542
+ ::slotted([slot="cta"]) {
543
+ --bd-button-width: 100%;
544
+ }
545
+
468
546
  }
469
547
  `;