@repobit/dex-system-design 2.3.1 → 2.4.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 (43) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +5 -5
  3. package/schemas/component-manifest.json +62 -4
  4. package/src/components/anchor/anchor.stories.js +0 -3
  5. package/src/components/audience-card/audience-card.css.js +10 -0
  6. package/src/components/audience-card/audience-card.js +2 -2
  7. package/src/components/awards/awards-spotlight.css.js +10 -0
  8. package/src/components/awards/awards-spotlight.js +1 -1
  9. package/src/components/badge/badge.css.js +7 -1
  10. package/src/components/bento-grid/bento-grid.css.js +4 -0
  11. package/src/components/bento-grid/bento-grid.js +13 -0
  12. package/src/components/bento-grid/bento-grid.stories.js +1 -1
  13. package/src/components/bento-grid/bento-item.css.js +32 -3
  14. package/src/components/bento-grid/bento-item.js +3 -3
  15. package/src/components/button/button.css.js +36 -1
  16. package/src/components/button/button.js +13 -6
  17. package/src/components/button/button.stories.js +4 -4
  18. package/src/components/features-tab/features-tab.js +2 -1
  19. package/src/components/features-tab/features-tab.stories.js +2 -2
  20. package/src/components/grid/grid.css.js +6 -1
  21. package/src/components/grid/grid.js +10 -1
  22. package/src/components/grid/grid.stories.js +6 -1
  23. package/src/components/header/header-code.stories.js +2 -5
  24. package/src/components/header/header.js +4 -4
  25. package/src/components/header/header.stories.js +3 -3
  26. package/src/components/hero/hero.css.js +121 -18
  27. package/src/components/hero/hero.js +5 -2
  28. package/src/components/hero/hero.stories.js +5 -4
  29. package/src/components/logo-marquee/logo-marquee.js +3 -3
  30. package/src/components/logo-marquee/logo-marquee.stories.js +6 -6
  31. package/src/components/partner-banner/partner-banner.css.js +96 -14
  32. package/src/components/partner-banner/partner-banner.js +32 -16
  33. package/src/components/post-card/post-card.css.js +14 -0
  34. package/src/components/post-card/post-card.js +8 -8
  35. package/src/components/pricing-cards/pricing-card-actions.js +0 -1
  36. package/src/components/pricing-cards/pricing-card.js +0 -4
  37. package/src/components/section-header/section-header.css.js +11 -0
  38. package/src/components/section-header/section-header.js +3 -3
  39. package/src/components/stat/stat-highlight.js +3 -3
  40. package/src/components/stat/stat.css.js +21 -3
  41. package/src/components/stat/stat.stories.js +2 -2
  42. package/src/tokens/tokens.css +4 -2
  43. package/src/tokens/tokens.js +4 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.4.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@2.3.2...@repobit/dex-system-design@2.4.0) (2026-10-27)
7
+
8
+ ### Features
9
+
10
+ * **DEX-29014:** give a set of brand bento cards one row height
11
+ * **DEX-29014:** make bd-button size responsive by default
12
+ * **DEX-29014:** match the homepage hero, grid gaps and stat tiles to Figma
13
+ * **DEX-29014:** match the partner banner to its Figma frames
14
+
15
+ ### Bug Fixes
16
+
17
+ * **DEX-29014:** keep the partner banner photo's subject in view
18
+ * **DEX-29014:** wrap a post card's long badge inside its cover
19
+
20
+
21
+ ## [2.3.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@2.3.1...@repobit/dex-system-design@2.3.2) (2026-10-26)
22
+
23
+ ### Bug Fixes
24
+
25
+ * **DEX-29144:** move to Node 24.22.1 for the eMudhra CA incident
26
+
27
+
6
28
  ## [2.3.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@2.3.0...@repobit/dex-system-design@2.3.1) (2026-10-26)
7
29
 
8
30
  **Note:** Version bump only for package @repobit/dex-system-design
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Design system based on Web Components.",
5
5
  "author": "Iordache Matei Cezar <miordache@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -173,8 +173,8 @@
173
173
  "url": "https://github.com/bitdefender/dex-core/issues"
174
174
  },
175
175
  "dependencies": {
176
- "@repobit/dex-store": "1.6.52",
177
- "@repobit/dex-store-elements": "2.1.22",
176
+ "@repobit/dex-store": "1.6.53",
177
+ "@repobit/dex-store-elements": "2.1.23",
178
178
  "lit": "^3.3.2"
179
179
  },
180
180
  "devDependencies": {
@@ -190,7 +190,7 @@
190
190
  "vite": "^5.4.19"
191
191
  },
192
192
  "volta": {
193
- "node": "24.14.0"
193
+ "node": "24.22.1"
194
194
  },
195
- "gitHead": "727703f54bf39deaa0b85ccf0e53ef4404dd376a"
195
+ "gitHead": "2b38c249e4240fc489fb4a1a9338cd04a675c08f"
196
196
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifestVersion": 1,
3
3
  "package": "@repobit/dex-system-design",
4
- "packageVersion": "2.3.1",
4
+ "packageVersion": "2.4.0",
5
5
  "generatedFrom": [
6
6
  "package.json exports",
7
7
  "Lit static properties",
@@ -12,7 +12,8 @@
12
12
  "Props are expressed as component property names. When attributeName exists, a string-to-HTML renderer should emit that explicit attribute name.",
13
13
  "Private or state-only Lit properties were intentionally omitted.",
14
14
  "Prop values for colours, sizes and spacing should be token references (var(--…)) rather than literals; see the per-prop description.",
15
- "Run `npm run check:manifest` to verify this file against the components."
15
+ "Run `npm run check:manifest` to verify this file against the components.",
16
+ "Text props (eyebrow, heading, title, lead, body, caption, description, quote, attribution) are plain text, never HTML: a newline in the value renders as a line break, which is how a page keeps a <br> from authored copy."
16
17
  ],
17
18
  "components": [
18
19
  {
@@ -1753,6 +1754,63 @@
1753
1754
  "5xl"
1754
1755
  ]
1755
1756
  },
1757
+ {
1758
+ "name": "gapSm",
1759
+ "type": "string",
1760
+ "enum": [
1761
+ "none",
1762
+ "4xs",
1763
+ "3xs",
1764
+ "2xs",
1765
+ "xs",
1766
+ "sm",
1767
+ "md",
1768
+ "lg",
1769
+ "xl",
1770
+ "2xl",
1771
+ "3xl",
1772
+ "4xl",
1773
+ "5xl"
1774
+ ]
1775
+ },
1776
+ {
1777
+ "name": "gapMd",
1778
+ "type": "string",
1779
+ "enum": [
1780
+ "none",
1781
+ "4xs",
1782
+ "3xs",
1783
+ "2xs",
1784
+ "xs",
1785
+ "sm",
1786
+ "md",
1787
+ "lg",
1788
+ "xl",
1789
+ "2xl",
1790
+ "3xl",
1791
+ "4xl",
1792
+ "5xl"
1793
+ ]
1794
+ },
1795
+ {
1796
+ "name": "gapLg",
1797
+ "type": "string",
1798
+ "enum": [
1799
+ "none",
1800
+ "4xs",
1801
+ "3xs",
1802
+ "2xs",
1803
+ "xs",
1804
+ "sm",
1805
+ "md",
1806
+ "lg",
1807
+ "xl",
1808
+ "2xl",
1809
+ "3xl",
1810
+ "4xl",
1811
+ "5xl"
1812
+ ]
1813
+ },
1756
1814
  {
1757
1815
  "name": "align",
1758
1816
  "type": "string"
@@ -4097,8 +4155,8 @@
4097
4155
  {
4098
4156
  "name": "duration",
4099
4157
  "type": "number",
4100
- "default": 18,
4101
- "description": "Seconds for one copy of the set to pass: 18 for the partner line, 10 for the award strip."
4158
+ "default": 35,
4159
+ "description": "Seconds for one copy of the set to pass: 35 for the partner line and the award strip alike."
4102
4160
  },
4103
4161
  {
4104
4162
  "name": "gap",
@@ -56,7 +56,6 @@ prin \`ResizeObserver\` — fără a fi necesară setarea manuală a \`max-width
56
56
  <bd-button-link
57
57
  slot="cta"
58
58
  variant="accent"
59
- size="md"
60
59
  href="https://www.bitdefender.com/buy"
61
60
  label="Cumpără acum"
62
61
  buyLink
@@ -174,7 +173,6 @@ const renderWithSlotCta = (labels, ctaLabel = "Cumpără acum", ctaHref = "#sect
174
173
  <bd-button-link
175
174
  slot="cta"
176
175
  variant="accent"
177
- size="md"
178
176
  href=${ctaHref}
179
177
  label=${ctaLabel}
180
178
  font-size="base"
@@ -249,7 +247,6 @@ export const WithSlotCtaOutline = {
249
247
  <bd-button-link
250
248
  slot="cta"
251
249
  variant="ghost"
252
- size="md"
253
250
  href="https://www.bitdefender.com/buy"
254
251
  label="Cumpără acum"
255
252
  font-size="base"
@@ -84,4 +84,14 @@ export const audienceCardCSS = css`
84
84
  flex: 1 1 auto;
85
85
  }
86
86
  }
87
+
88
+ /* A newline in the text is a line break, so a page can keep the breaks its
89
+ copy was written with (a <br> in the authored eyebrow, heading or lead
90
+ arrives as a newline in the property). Text only: nothing here renders
91
+ HTML. The rule sits on a span around the text, not on bd-h or on the
92
+ eyebrow, which also holds the slotted icon. */
93
+ .text,
94
+ .description {
95
+ white-space: pre-line;
96
+ }
87
97
  `;
@@ -56,9 +56,9 @@ export class AudienceCard extends LitElement {
56
56
  <article class="card" @click=${this._onCardClick}>
57
57
  <div class="copy">
58
58
  ${this.eyebrow
59
- ? html`<p class="eyebrow"><slot name="icon"></slot><span>${this.eyebrow}</span></p>`
59
+ ? html`<p class="eyebrow"><slot name="icon"></slot><span class="text">${this.eyebrow}</span></p>`
60
60
  : nothing}
61
- <bd-h as="${this.as}" visual-level="h4" class="heading">${this.heading}</bd-h>
61
+ <bd-h as="${this.as}" visual-level="h4" class="heading"><span class="text">${this.heading}</span></bd-h>
62
62
  ${this.description ? html`<p class="description">${this.description}</p>` : nothing}
63
63
  </div>
64
64
  ${this.href
@@ -129,4 +129,14 @@ export const awardsSpotlightCSS = css`
129
129
  transition: none;
130
130
  }
131
131
  }
132
+
133
+ /* A newline in the text is a line break, so a page can keep the breaks its
134
+ copy was written with (a <br> in the authored eyebrow, heading or lead
135
+ arrives as a newline in the property). Text only: nothing here renders
136
+ HTML. The rule sits on a span around the text, not on bd-h,
137
+ whose own template could hold newlines that would break too. */
138
+ .text,
139
+ .body {
140
+ white-space: pre-line;
141
+ }
132
142
  `;
@@ -82,7 +82,7 @@ export class AwardsSpotlight extends LitElement {
82
82
  </div>`
83
83
  : nothing}
84
84
  <div class="copy">
85
- <bd-h as="${this.as}" visual-level="h3" color="primary" class="title">${award.title}</bd-h>
85
+ <bd-h as="${this.as}" visual-level="h3" color="primary" class="title"><span class="text">${award.title}</span></bd-h>
86
86
  ${award.body ? html`<p class="body">${award.body}</p>` : nothing}
87
87
  </div>
88
88
  </div>
@@ -21,7 +21,13 @@ export default css`
21
21
  font-weight: var(--typography-control-label-small-fontWeight);
22
22
  line-height: var(--typography-control-label-small-lineHeight);
23
23
  border-radius: var(--radius-full);
24
- white-space: nowrap;
24
+ /* One line, unless the component holding the badge caps its width and
25
+ lets it wrap through --bd-badge-white-space (bd-post-card does, for a
26
+ feed's long channel title over its cover). Wrapped, it stays a pill:
27
+ the full radius rounds the taller box, the lines centre in it, and the
28
+ leading is control-label-small's tight, which holds a second line. */
29
+ white-space: var(--bd-badge-white-space, nowrap);
30
+ text-align: center;
25
31
  user-select: none;
26
32
  }
27
33
 
@@ -58,6 +58,10 @@ export default css`
58
58
  why nothing looked wrong and no rule could see it -- the declaration
59
59
  reads a legitimate var(). */
60
60
  gap: var(--bd-bento-gap, var(--spacing-24));
61
+ /* auto, or 1fr when bento-grid.js finds a set of brand cards: every row
62
+ then takes the tallest row's height, so a full-row card matches the
63
+ pair above it rather than the lines its wider copy column wraps to */
64
+ grid-auto-rows: var(--bd-bento-row-height, auto);
61
65
  width: 100%;
62
66
  }
63
67
 
@@ -173,9 +173,22 @@ class BentoGrid extends LitElement {
173
173
  this._items.forEach((item) => item.style.setProperty("--bd-bento-span", String(span)));
174
174
  }
175
175
 
176
+ /* Brand cards are drawn as one set of equal bands: the full-row card is
177
+ the pair's height, not shorter for having a wider copy column, and
178
+ stacked cards match whatever their copy runs to. Only when every card is
179
+ brand-toned -- the default cards are content-sized tiles, and evening
180
+ those out would pad the short ones with empty space. */
181
+ _applyRowHeight() {
182
+ const items = this._items;
183
+ const uniform = items.length > 1 && items.every((el) => el.getAttribute("tone") === "brand");
184
+ if (uniform) this.style.setProperty("--bd-bento-row-height", "1fr");
185
+ else this.style.removeProperty("--bd-bento-row-height");
186
+ }
187
+
176
188
  _relayout() {
177
189
  const width = this.clientWidth || 960;
178
190
  this.style.setProperty("--bd-bento-total-units", String(TOTAL_UNITS));
191
+ this._applyRowHeight();
179
192
 
180
193
  if (this.variant === "equal") {
181
194
  const { columns, gap } = resolveEqualColumns(width, this.equalColumns, this.minCardWidth);
@@ -492,7 +492,7 @@ export const EqualColumns = {
492
492
  const brandCard = ({ badge, title, body, cta, art, motion, alt, featured }, still) => html`
493
493
  <bd-bento-item tone="brand" priority="${featured ? "featured" : "standard"}" badge="${badge}" title="${title}" body="${body}">
494
494
  ${still ? html`<img slot="media" src="/images/ai/${art}" alt="${alt}">` : motion}
495
- <bd-button-link variant="outline-white" size="lg" href="#">${cta}</bd-button-link>
495
+ <bd-button-link variant="outline-white" href="#">${cta}</bd-button-link>
496
496
  </bd-bento-item>
497
497
  `;
498
498
 
@@ -149,6 +149,16 @@ box-shadow: 0px 14px 40px #00000012;
149
149
  color: var(--color-brand-on-fill);
150
150
  }
151
151
 
152
+ /* A set of brand cards shares one row height (bento-grid.js), so a card
153
+ with shorter copy is taller than its content. On a phone the slack goes
154
+ above the CTA, which keeps every card's CTA on its bottom edge rather
155
+ than leaving a gap under the shortest one. */
156
+ @media ${unsafeCSS(below("md"))} {
157
+ :host([tone="brand"]) .bd-bentoitem-cta {
158
+ margin-block-start: auto;
159
+ }
160
+ }
161
+
152
162
  :host([tone="brand"]) .bd-bentoitem-box:hover {
153
163
  transform: none;
154
164
  box-shadow: none;
@@ -215,11 +225,19 @@ box-shadow: 0px 14px 40px #00000012;
215
225
  display: grid;
216
226
  /* no token: the copy's measure, the 300 every frame gives it */
217
227
  grid-template-columns: 300px minmax(0, 1fr);
228
+ /* The copy and CTA centred down the card by the two 1fr rows around
229
+ them, rather than by align-content: the art spans all four rows, so
230
+ it runs the card's full height however much taller than its copy
231
+ the shared row height makes the card. No row gap, so the empty rows
232
+ add nothing to a card that is only as tall as its content; the 24
233
+ between copy and CTA is the CTA's margin. */
234
+ grid-template-rows: 1fr auto auto 1fr;
218
235
  grid-template-areas:
236
+ ". media"
219
237
  "text media"
220
- "cta media";
221
- align-content: center;
222
- gap: var(--spacing-24) 0;
238
+ "cta media"
239
+ ". media";
240
+ gap: 0;
223
241
  padding: var(--spacing-32);
224
242
  border-radius: var(--shape-radius-3xl);
225
243
  }
@@ -235,6 +253,7 @@ box-shadow: 0px 14px 40px #00000012;
235
253
 
236
254
  .bd-bentoitem-cta {
237
255
  grid-area: cta;
256
+ margin-block-start: var(--spacing-24);
238
257
  }
239
258
 
240
259
  .bd-bentoitem-media {
@@ -268,4 +287,14 @@ box-shadow: 0px 14px 40px #00000012;
268
287
  margin-block-start: calc(max(100cqw, 100cqh) / -2);
269
288
  }
270
289
  }
290
+
291
+ /* A newline in the text is a line break, so a page can keep the breaks its
292
+ copy was written with (a <br> in the authored eyebrow, heading or lead
293
+ arrives as a newline in the property). Text only: nothing here renders
294
+ HTML. The rule sits on a span around the text, not on bd-h or bd-p,
295
+ whose own templates hold newlines that would break too. */
296
+ .text,
297
+ .bd-bentoitem-brand-body {
298
+ white-space: pre-line;
299
+ }
271
300
  `;
@@ -80,7 +80,7 @@ class BentoItem extends LitElement {
80
80
  <div class="bd-bentoitem-text">
81
81
  ${this.badge ? html`<bd-badge tone="info" variant="shade" size="sm">${this.badge}</bd-badge>` : ""}
82
82
  ${this.title
83
- ? html`<bd-h as="${this.as}" visual-level="h3" color="on-brand" class="bd-bentoitem-brand-title">${this.title}</bd-h>`
83
+ ? html`<bd-h as="${this.as}" visual-level="h3" color="on-brand" class="bd-bentoitem-brand-title"><span class="text">${this.title}</span></bd-h>`
84
84
  : ""}
85
85
  ${this.body ? html`<p class="bd-bentoitem-brand-body">${this.body}</p>` : ""}
86
86
  </div>
@@ -103,13 +103,13 @@ class BentoItem extends LitElement {
103
103
  ${this.title
104
104
  ? html`
105
105
  <div class="bd-bentoitem-title-wrap">
106
- <bd-h as="h5" fontWeight="bold">${this.title}</bd-h>
106
+ <bd-h as="h5" fontWeight="bold"><span class="text">${this.title}</span></bd-h>
107
107
  </div>
108
108
  `
109
109
  : ""}
110
110
 
111
111
  ${this.body
112
- ? html`<bd-p variant="regular" class="bd-bentoitem-body">${this.body}</bd-p>`
112
+ ? html`<bd-p variant="regular" class="bd-bentoitem-body"><span class="text">${this.body}</span></bd-p>`
113
113
  : ""}
114
114
 
115
115
  <slot></slot>
@@ -1,4 +1,5 @@
1
- import { css } from "lit";
1
+ import { css, unsafeCSS } from "lit";
2
+ import { above } from "../shared/token-scales.js";
2
3
 
3
4
  /**
4
5
  * Styled entirely from src/tokens/tokens.js — see CLAUDE.md, "The foundation
@@ -281,6 +282,24 @@ export default css`
281
282
  gap: var(--button-large-gap);
282
283
  }
283
284
 
285
+ /* No size attribute: md on phone and tablet, lg on desktop. The same
286
+ declarations as the two bands above, switched at lg so it lands on the
287
+ grid's own desktop step rather than a width of its own. */
288
+ .button--responsive {
289
+ padding: var(--button-medium-padding);
290
+ font-size: var(--button-medium-fontSize);
291
+ border-radius: var(--button-medium-borderRadius);
292
+ gap: var(--button-medium-gap);
293
+ }
294
+ @media ${unsafeCSS(above("lg"))} {
295
+ .button--responsive {
296
+ padding: var(--button-large-padding);
297
+ font-size: var(--button-large-fontSize);
298
+ border-radius: var(--button-large-borderRadius);
299
+ gap: var(--button-large-gap);
300
+ }
301
+ }
302
+
284
303
  .button--bold {
285
304
  /* no role: the class is the semantic. .button--bold says what this
286
305
  declaration does, so a role naming it would only restate the class --
@@ -393,6 +412,22 @@ export default css`
393
412
  padding: var(--spacing-16);
394
413
  border-radius: var(--radius-full);
395
414
  }
415
+ .button--icon-only.button--responsive {
416
+ --bd-button-icon-size: var(--icon-md-size);
417
+ padding: var(--spacing-12);
418
+ border-radius: var(--radius-full);
419
+ }
420
+ @media ${unsafeCSS(above("lg"))} {
421
+ .button--icon-only.button--responsive {
422
+ --bd-button-icon-size: var(--icon-lg-size);
423
+ padding: var(--spacing-16);
424
+ }
425
+ }
426
+ /* the default arrow is fallback content, not slotted, so ::slotted below
427
+ never reaches it; it takes the step through bd-icon's own property */
428
+ .button__icon {
429
+ --bd-icon-size: var(--bd-button-icon-size);
430
+ }
396
431
  .button--icon-only > ::slotted(*) {
397
432
  height: var(--bd-button-icon-size);
398
433
  }
@@ -26,6 +26,10 @@ const LEGACY_KINDS = {
26
26
  };
27
27
 
28
28
  const SIZE_CLASS = { sm: "button--small", md: "button--medium", lg: "button--large" };
29
+ /* No size given: md below the lg breakpoint, lg from it -- the band the
30
+ websites ask for on desktop and the one that fits a phone or tablet row.
31
+ An explicit size still pins one band at every width. */
32
+ const RESPONSIVE_SIZE_CLASS = "button--responsive";
29
33
  const SURFACES = ["light", "dark", "brand"];
30
34
  const SHAPES = ["default", "rounded"];
31
35
 
@@ -88,7 +92,8 @@ class BdButtonBase extends LitElement {
88
92
  // label is only an accessible name, never the visible text: defaulting it
89
93
  // to a word like "Buy now" would override whatever the caller slotted
90
94
  this.label = "";
91
- this.size = "md";
95
+ // empty is the responsive default; see RESPONSIVE_SIZE_CLASS
96
+ this.size = "";
92
97
  this.variant = "primary";
93
98
  this.kind = "";
94
99
  this.fullWidth = false;
@@ -114,7 +119,7 @@ class BdButtonBase extends LitElement {
114
119
  if (LEGACY_KINDS[this.variant]) this.variant = LEGACY_KINDS[this.variant];
115
120
  if (!VARIANTS.includes(this.variant)) this.variant = "primary";
116
121
  }
117
- if (changed.has("size") && !SIZE_CLASS[this.size]) this.size = "md";
122
+ if (changed.has("size") && !SIZE_CLASS[this.size]) this.size = "";
118
123
  if (changed.has("surface") && !SURFACES.includes(this.surface)) this.surface = "light";
119
124
  if (changed.has("shape") && !SHAPES.includes(this.shape)) this.shape = "default";
120
125
  }
@@ -134,7 +139,7 @@ class BdButtonBase extends LitElement {
134
139
  return [
135
140
  "button",
136
141
  `button--${this.variant}`,
137
- SIZE_CLASS[this.size],
142
+ SIZE_CLASS[this.size] || RESPONSIVE_SIZE_CLASS,
138
143
  this.iconOnly ? "button--icon-only" : "",
139
144
  // a circle stretched to the container is a pill, not this control
140
145
  this.fullWidth && !this.iconOnly ? "max--width" : "",
@@ -175,8 +180,10 @@ class BdButtonBase extends LitElement {
175
180
  * The icon is a slot so any bd-*-icon can go in; with nothing slotted it is
176
181
  * the arrow, the system's only true shafted arrow and the default the Figma
177
182
  * sets draw. The button and icon scales share step names -- sm 16, md 20,
178
- * lg 24 against padding 8, 12 and 16 -- so the size passes straight through
179
- * and the circle comes out 32, 44 and 56.
183
+ * lg 24 against padding 8, 12 and 16 -- and the circle comes out 32, 44 and
184
+ * 56. The glyph reads its step from --bd-button-icon-size through
185
+ * .button__icon rather than a size attribute, so the responsive default
186
+ * resizes it at the breakpoint along with the circle.
180
187
  */
181
188
  get _describedBy() {
182
189
  return this.description ? "description" : nothing;
@@ -188,7 +195,7 @@ class BdButtonBase extends LitElement {
188
195
 
189
196
  get _iconContent() {
190
197
  if (this.loading) return html`<span class="spinner" aria-hidden="true"></span>`;
191
- return html`<slot><bd-arrow-icon size="${this.size}" aria-hidden="true"></bd-arrow-icon></slot>`;
198
+ return html`<slot><bd-arrow-icon class="button__icon" aria-hidden="true"></bd-arrow-icon></slot>`;
192
199
  }
193
200
 
194
201
  _handleClick(e) {
@@ -135,9 +135,9 @@ variant, so every \`variant\`, \`size\`, \`surface\` and state applies unchanged
135
135
  },
136
136
  size: {
137
137
  control : { type: 'select' },
138
- options : ['sm', 'md', 'lg'],
139
- description: 'Size of the button',
140
- table : { type: { summary: "'sm' | 'md' | 'lg'" }, defaultValue: { summary: 'md' }, category: 'Appearance' }
138
+ options : ['', 'sm', 'md', 'lg'],
139
+ description: 'Size of the button. Left unset it is responsive: `md` below 992px, `lg` from 992px up. A value pins that size at every width.',
140
+ table : { type: { summary: "'sm' | 'md' | 'lg'" }, defaultValue: { summary: 'responsive (md → lg at 992px)' }, category: 'Appearance' }
141
141
  },
142
142
  shape: {
143
143
  control : { type: 'inline-radio' },
@@ -197,7 +197,7 @@ variant, so every \`variant\`, \`size\`, \`surface\` and state applies unchanged
197
197
  const defaultArgs = {
198
198
  label : 'Buy now',
199
199
  variant : 'primary',
200
- size : 'md',
200
+ size : '',
201
201
  shape : 'default',
202
202
  noArrow : false,
203
203
  iconOnly : false,
@@ -24,7 +24,8 @@ class BdFeaturesTab extends LitElement {
24
24
  this.ctaLabel = "";
25
25
  this.ctaHref = "#";
26
26
  this.ctaKind = "danger";
27
- this.ctaSize = "md";
27
+ // empty leaves bd-button-link on its responsive default
28
+ this.ctaSize = "";
28
29
  this.reverse = false;
29
30
  }
30
31
 
@@ -31,7 +31,7 @@ Toate elementele sunt sloturi pentru consistență maximă.
31
31
  | \`cta-label\` | String | — | Text buton CTA |
32
32
  | \`cta-href\` | String | \`#\` | Href buton CTA |
33
33
  | \`cta-kind\` | String | \`danger\` | Kind buton |
34
- | \`cta-size\` | String | \`md\` | Size buton |
34
+ | \`cta-size\` | String | responsive | Size buton; unset: \`md\` sub 992px, \`lg\` de la 992px |
35
35
  | \`reverse\` | Boolean | \`false\` | Media stânga, conținut dreapta |
36
36
  `
37
37
  }
@@ -257,7 +257,7 @@ export const WithCTASlot = {
257
257
  ${heading}
258
258
  ${content}
259
259
  <img slot="media" src="/assets/tabs-img1.png" alt="Admin" loading="lazy" style="${mediaStyle}" />
260
- <bd-button-link slot="cta" href="#" variant="primary" size="md">Custom CTA button</bd-button-link>
260
+ <bd-button-link slot="cta" href="#" variant="primary">Custom CTA button</bd-button-link>
261
261
  </bd-features-tab>
262
262
  `,
263
263
  parameters: { docs: { description: { story: 'Buton CTA custom via `slot="cta"`.' } } }
@@ -15,24 +15,29 @@ export default css`
15
15
  /* Default */
16
16
  .grid {
17
17
  grid-template-columns: repeat(var(--grid-cols), 1fr);
18
+ gap: var(--grid-gap, var(--spacing-24));
18
19
  }
19
20
 
20
- /* Responsive overrides */
21
+ /* Responsive overrides: the columns and the gap step together; a gap
22
+ left unset carries the one below it up */
21
23
  @media (min-width: 576px) {
22
24
  .grid {
23
25
  grid-template-columns: repeat(var(--grid-cols-sm), 1fr);
26
+ gap: var(--grid-gap-sm, var(--spacing-24));
24
27
  }
25
28
  }
26
29
 
27
30
  @media (min-width: 768px) {
28
31
  .grid {
29
32
  grid-template-columns: repeat(var(--grid-cols-md), 1fr);
33
+ gap: var(--grid-gap-md, var(--spacing-24));
30
34
  }
31
35
  }
32
36
 
33
37
  @media (min-width: 992px) {
34
38
  .grid {
35
39
  grid-template-columns: repeat(var(--grid-cols-lg), 1fr);
40
+ gap: var(--grid-gap-lg, var(--spacing-24));
36
41
  }
37
42
  }
38
43
  `;
@@ -51,6 +51,9 @@ class BdGrid extends LitElement {
51
51
  colsMd : { type: Number, attribute: "cols-md" }, // optional cols on medium
52
52
  colsLg : { type: Number, attribute: "cols-lg" }, // optional cols on large
53
53
  gap : { type: String }, // e.g., 'sm', 'md'
54
+ gapSm : { type: String, attribute: "gap-sm" }, // optional gap from sm; unset keeps the step below
55
+ gapMd : { type: String, attribute: "gap-md" }, // optional gap from md
56
+ gapLg : { type: String, attribute: "gap-lg" }, // optional gap from lg
54
57
  align : { type: String }, // start, center, end, stretch
55
58
  justify: { type: String }, // start, center, end, space-between
56
59
  padding: { type: String } // e.g., 'none', 'sm', 'md', 'lg'
@@ -64,6 +67,9 @@ class BdGrid extends LitElement {
64
67
  this.colsMd = 2;
65
68
  this.colsLg = 3;
66
69
  this.gap = "md";
70
+ this.gapSm = "";
71
+ this.gapMd = "";
72
+ this.gapLg = "";
67
73
  this.align = "stretch";
68
74
  this.justify = "start";
69
75
  this.padding = "none";
@@ -80,7 +86,10 @@ class BdGrid extends LitElement {
80
86
  --grid-cols-sm: ${this.colsSm};
81
87
  --grid-cols-md: ${this.colsMd};
82
88
  --grid-cols-lg: ${this.colsLg};
83
- gap: ${space(this.gap)};
89
+ ${space(this.gap) ? `--grid-gap: ${space(this.gap)};` : ""}
90
+ --grid-gap-sm: ${space(this.gapSm) || "var(--grid-gap)"};
91
+ --grid-gap-md: ${space(this.gapMd) || "var(--grid-gap-sm)"};
92
+ --grid-gap-lg: ${space(this.gapLg) || "var(--grid-gap-md)"};
84
93
  align-items: ${this.align};
85
94
  justify-items: ${this.justify};
86
95
  padding: ${space(this.padding)};
@@ -17,6 +17,8 @@ Columns are set per breakpoint and the component steps between them on its own:
17
17
  \`cols\` below 576, then \`cols-sm\`, \`cols-md\` at 768 and \`cols-lg\` at 992 — the
18
18
  \`--breakpoint-*\` scale. \`gap\` and \`padding\` take space step names
19
19
  (\`none\`, \`2xs\`, \`xs\`, \`sm\`, \`md\`, \`lg\`, \`xl\` …), not lengths.
20
+ The gap steps the same way: \`gap\` below 576, then \`gap-sm\`, \`gap-md\` and
21
+ \`gap-lg\`, each one left out keeping the step below it.
20
22
 
21
23
  Its one consumer today is the footer's link columns.
22
24
  `
@@ -28,7 +30,10 @@ Its one consumer today is the footer's link columns.
28
30
  colsSm : { name: "cols-sm", control: { type: "number", min: 1, max: 6 }, description: "Columns from 576px." },
29
31
  colsMd : { name: "cols-md", control: { type: "number", min: 1, max: 6 }, description: "Columns from 768px." },
30
32
  colsLg : { name: "cols-lg", control: { type: "number", min: 1, max: 6 }, description: "Columns from 992px." },
31
- gap : { control: "select", options: ["none", "2xs", "xs", "sm", "md", "lg", "xl"], description: "Space step between cells." },
33
+ gap : { control: "select", options: ["none", "2xs", "xs", "sm", "md", "lg", "xl"], description: "Space step between cells, below 576px." },
34
+ gapSm : { name: "gap-sm", control: "select", options: ["", "none", "2xs", "xs", "sm", "md", "lg", "xl"], description: "Space step between cells from 576px; unset keeps the step below." },
35
+ gapMd : { name: "gap-md", control: "select", options: ["", "none", "2xs", "xs", "sm", "md", "lg", "xl"], description: "Space step between cells from 768px; unset keeps the step below." },
36
+ gapLg : { name: "gap-lg", control: "select", options: ["", "none", "2xs", "xs", "sm", "md", "lg", "xl"], description: "Space step between cells from 992px; unset keeps the step below." },
32
37
  padding: { control: "select", options: ["none", "xs", "sm", "md", "lg"], description: "Space step inside the grid." },
33
38
  align : { control: "select", options: ["start", "center", "end", "stretch"] },
34
39
  justify: { control: "select", options: ["start", "center", "end", "stretch"] }