@repobit/dex-system-design 2.0.0 → 2.1.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.
- package/CHANGELOG.md +15 -0
- package/package.json +4 -4
- package/schemas/component-manifest.json +1 -1
- package/src/components/header/header.css.js +3 -2
- package/src/components/header/header.stories.js +3 -2
- package/src/components/shared/ensemble.css.js +10 -1
- package/src/components/shared/token-scales.js +13 -10
- package/src/tokens/layout.css +2 -1
- package/src/tokens/tokens-grid.stories.js +5 -4
- package/src/tokens/tokens.css +15 -3
- package/src/tokens/tokens.js +15 -3
- package/src/tokens/typography.stories.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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.1.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@2.0.1...@repobit/dex-system-design@2.1.0) (2026-10-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **DEX-28949:** the page column's top steps land on the site menu and footer edges
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [2.0.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@2.0.0...@repobit/dex-system-design@2.0.1) (2026-10-15)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @repobit/dex-system-design
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
## [2.0.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@1.0.1...@repobit/dex-system-design@2.0.0) (2026-10-15)
|
|
7
22
|
|
|
8
23
|
### ⚠ BREAKING CHANGES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.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",
|
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
"url": "https://github.com/bitdefender/dex-core/issues"
|
|
161
161
|
},
|
|
162
162
|
"dependencies": {
|
|
163
|
-
"@repobit/dex-store": "1.6.
|
|
164
|
-
"@repobit/dex-store-elements": "2.1.
|
|
163
|
+
"@repobit/dex-store": "1.6.52",
|
|
164
|
+
"@repobit/dex-store-elements": "2.1.22",
|
|
165
165
|
"lit": "^3.3.2"
|
|
166
166
|
},
|
|
167
167
|
"devDependencies": {
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"volta": {
|
|
180
180
|
"node": "24.14.0"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "2b14e5a236f0cf4b62b2c0decbb0a1e2721f8ef6"
|
|
183
183
|
}
|
|
@@ -578,13 +578,14 @@ export default css`
|
|
|
578
578
|
width per step is fixed and so is the two-column arithmetic once the 64px
|
|
579
579
|
gap comes out of it:
|
|
580
580
|
|
|
581
|
-
|
|
581
|
+
xxxl 1372 - 80 = 1292 -> 614 per column
|
|
582
|
+
xxl 1280 - 80 = 1200 -> 568
|
|
582
583
|
xl 1140 - 80 = 1060 -> 498
|
|
583
584
|
lg 960 - 80 = 880 -> 408
|
|
584
585
|
md 720 - 64 = 656 -> 296
|
|
585
586
|
sm 540 - 48 = 492 -> 214
|
|
586
587
|
|
|
587
|
-
The CTA row is 446px wide. It fits at xl and
|
|
588
|
+
The CTA row is 446px wide. It fits at xl and above, wraps at lg, and at md
|
|
588
589
|
there is less room than one button needs. lg is therefore the last step
|
|
589
590
|
where two columns are even arguable, and it is arguable rather than good --
|
|
590
591
|
measured, two columns at lg cost the description a fourth line, the CTA
|
|
@@ -179,13 +179,14 @@ two-column arithmetic is fixed:
|
|
|
179
179
|
|
|
180
180
|
| step | content width | per column |
|
|
181
181
|
|---|---|---|
|
|
182
|
-
|
|
|
182
|
+
| xxxl | 1372 − 80 = 1292 | 614 |
|
|
183
|
+
| xxl | 1280 − 80 = 1200 | 568 |
|
|
183
184
|
| xl | 1140 − 80 = 1060 | 498 |
|
|
184
185
|
| lg | 960 − 80 = 880 | 408 |
|
|
185
186
|
| md | 720 − 64 = 656 | 296 |
|
|
186
187
|
| sm | 540 − 48 = 492 | 214 |
|
|
187
188
|
|
|
188
|
-
The CTA row is **446px**. It fits at xl and
|
|
189
|
+
The CTA row is **446px**. It fits at xl and above, wraps at lg, and at md there
|
|
189
190
|
is less room than one button needs. So:
|
|
190
191
|
|
|
191
192
|
- **\`below('lg')\` — stack.** One column, 32px row gap.
|
|
@@ -18,7 +18,10 @@ import { above } from "./token-scales.js";
|
|
|
18
18
|
* section whose width depended on the viewport.
|
|
19
19
|
*
|
|
20
20
|
* This is that container, implemented once, on the scale the docs promised:
|
|
21
|
-
* --grid-container-max-* with --grid-padding-* per breakpoint.
|
|
21
|
+
* --grid-container-max-* with --grid-padding-* per breakpoint. The top two
|
|
22
|
+
* steps, xxl and xxxl, are not the grid's own progression: they put the
|
|
23
|
+
* column's content edges on the site menu's and footer's -- 1200 wide up to
|
|
24
|
+
* 1599, 1292 from 1600 (see --grid-container-max-* in tokens.js). A module
|
|
22
25
|
* imports it first and puts the class on the element that holds its content:
|
|
23
26
|
*
|
|
24
27
|
* static styles = [ensembleCSS, ownCSS];
|
|
@@ -90,4 +93,10 @@ export const ensembleCSS = css`
|
|
|
90
93
|
max-width: var(--bd-ensemble-max-width, var(--grid-container-max-xxl));
|
|
91
94
|
}
|
|
92
95
|
}
|
|
96
|
+
|
|
97
|
+
@media ${unsafeCSS(above('xxxl'))} {
|
|
98
|
+
.bd-ensemble {
|
|
99
|
+
max-width: var(--bd-ensemble-max-width, var(--grid-container-max-xxxl));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
93
102
|
`;
|
|
@@ -198,12 +198,12 @@ export const spacingShorthand = value => {
|
|
|
198
198
|
/* ================================================================
|
|
199
199
|
BREAKPOINTS
|
|
200
200
|
================================================================
|
|
201
|
-
The
|
|
201
|
+
The seven viewport widths, and the only place a media condition is built
|
|
202
202
|
from them.
|
|
203
203
|
|
|
204
204
|
This lives in JS rather than in the token file because a media condition
|
|
205
205
|
cannot read a custom property — `@media (max-width: var(--breakpoint-md))`
|
|
206
|
-
is not valid CSS — so the
|
|
206
|
+
is not valid CSS — so the seven values have to be interpolated into the
|
|
207
207
|
stylesheet at author time. `--breakpoint-*` in src/tokens/tokens.js stays
|
|
208
208
|
the published record of the scale; this is how a component consumes it.
|
|
209
209
|
|
|
@@ -246,18 +246,21 @@ export const spacingShorthand = value => {
|
|
|
246
246
|
0.02 rather than 0.01 is the long-standing convention, from Safari having
|
|
247
247
|
rounded a hundredth away.
|
|
248
248
|
|
|
249
|
-
The
|
|
250
|
-
1199.98 and
|
|
249
|
+
The six subtractions are exact in IEEE 754 — 575.98, 767.98, 991.98,
|
|
250
|
+
1199.98, 1399.98 and 1599.98 all round-trip — so no rounding is needed here. If a
|
|
251
251
|
value is ever added to the scale whose complement does not, this is where
|
|
252
252
|
the rounding belongs. */
|
|
253
253
|
|
|
254
254
|
export const BREAKPOINTS = {
|
|
255
|
-
xs
|
|
256
|
-
sm
|
|
257
|
-
md
|
|
258
|
-
lg
|
|
259
|
-
xl
|
|
260
|
-
xxl: 1400
|
|
255
|
+
xs : 0,
|
|
256
|
+
sm : 576,
|
|
257
|
+
md : 768,
|
|
258
|
+
lg : 992,
|
|
259
|
+
xl : 1200,
|
|
260
|
+
xxl : 1400,
|
|
261
|
+
/* Not a grid-progression step: the site's menu and footer widen here, and
|
|
262
|
+
the page column has to widen with them. See --grid-container-max-xxxl. */
|
|
263
|
+
xxxl: 1600
|
|
261
264
|
};
|
|
262
265
|
|
|
263
266
|
export const BREAKPOINT_NAMES = Object.keys(BREAKPOINTS);
|
package/src/tokens/layout.css
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
/* The page column for light-DOM markup: the twin of .bd-ensemble in
|
|
32
32
|
src/components/shared/ensemble.css.js, which is the source of truth. A page
|
|
33
33
|
that lays out its own sections gets the same edges the modules draw. The
|
|
34
|
-
breakpoints are the scale's own values (576 / 768 / 992 / 1200 / 1400). */
|
|
34
|
+
breakpoints are the scale's own values (576 / 768 / 992 / 1200 / 1400 / 1600). */
|
|
35
35
|
.bd-container {
|
|
36
36
|
box-sizing: border-box;
|
|
37
37
|
width: 100%;
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
@media (min-width: 992px) { .bd-container { max-width: var(--grid-container-max-lg); padding-inline: var(--grid-padding-lg); } }
|
|
45
45
|
@media (min-width: 1200px) { .bd-container { max-width: var(--grid-container-max-xl); } }
|
|
46
46
|
@media (min-width: 1400px) { .bd-container { max-width: var(--grid-container-max-xxl); } }
|
|
47
|
+
@media (min-width: 1600px) { .bd-container { max-width: var(--grid-container-max-xxxl); } }
|
|
47
48
|
|
|
48
49
|
.bd-container-fluid {
|
|
49
50
|
width: 100%;
|
|
@@ -134,7 +134,8 @@ const COLUMN_TABLE = [
|
|
|
134
134
|
['768', 'md', '720px', 32],
|
|
135
135
|
['992', 'lg', '960px', 40],
|
|
136
136
|
['1200', 'xl', '1140px', 40],
|
|
137
|
-
['1400', 'xxl', '
|
|
137
|
+
['1400', 'xxl', '1280px', 40],
|
|
138
|
+
['1600', 'xxxl', '1372px', 40]
|
|
138
139
|
];
|
|
139
140
|
const columnOf = (vw, cmax, padding) => {
|
|
140
141
|
const box = cmax === '100%' ? Number(vw) : parseInt(cmax, 10);
|
|
@@ -157,7 +158,7 @@ export const TheColumn = () => html`
|
|
|
157
158
|
children: html`
|
|
158
159
|
${refSection({
|
|
159
160
|
name : 'Viewport to column',
|
|
160
|
-
meta : '
|
|
161
|
+
meta : '8 widths · container − 2 × gutter',
|
|
161
162
|
children: html`
|
|
162
163
|
<div style="overflow-x: auto">
|
|
163
164
|
<table class="tokens-table">
|
|
@@ -186,7 +187,7 @@ export const TheColumn = () => html`
|
|
|
186
187
|
</table>
|
|
187
188
|
</div>
|
|
188
189
|
<p>
|
|
189
|
-
<b><code>xl</code> and <code>
|
|
190
|
+
<b><code>xl</code>, <code>xxl</code> and <code>xxxl</code> inherit <code>--grid-padding-lg</code>.</b>
|
|
190
191
|
<code>ensemble.css.js</code> raises <code>max-width</code> above <code>lg</code> but
|
|
191
192
|
never the padding, so <b>40px is the widest gutter this system has</b> — and the
|
|
192
193
|
column therefore grows more slowly than the screen does. At 320 the gutters are 10%
|
|
@@ -245,7 +246,7 @@ export const GridTokens = () => {
|
|
|
245
246
|
};
|
|
246
247
|
|
|
247
248
|
export const GridContainer = () => {
|
|
248
|
-
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
249
|
+
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'xxxl'];
|
|
249
250
|
|
|
250
251
|
return html`
|
|
251
252
|
${gridStyles}
|
package/src/tokens/tokens.css
CHANGED
|
@@ -1635,7 +1635,7 @@
|
|
|
1635
1635
|
deliberately. A media condition cannot read a custom property — @media
|
|
1636
1636
|
(max-width: var(--breakpoint-sm)) is not valid CSS — so a breakpoint
|
|
1637
1637
|
token can never be referenced the way a colour is. It exists so the
|
|
1638
|
-
|
|
1638
|
+
seven values have one place to be read from, by the lint that checks
|
|
1639
1639
|
media queries against them and by anything generating CSS. The grid
|
|
1640
1640
|
tokens below are read: --grid-container-max-* and --grid-padding-*
|
|
1641
1641
|
are the page column, through shared/ensemble.css.js and layout.css,
|
|
@@ -1647,13 +1647,24 @@
|
|
|
1647
1647
|
references is dead weight, and the OLD VALUES and FONT TOKENS blocks
|
|
1648
1648
|
that used to sit below were removed for exactly that reason.
|
|
1649
1649
|
*/
|
|
1650
|
-
/* Grid container max widths
|
|
1650
|
+
/* Grid container max widths
|
|
1651
|
+
|
|
1652
|
+
The top two steps are set by the site's menu and footer, not by the
|
|
1653
|
+
grid's own progression: a page built from these modules sits between
|
|
1654
|
+
the two, so its content edges have to land on theirs. Measured on
|
|
1655
|
+
bitdefender.com on 2026-10-16, the menu and footer share one container
|
|
1656
|
+
whose content is 1200px wide from 1300 to 1599 (1300 max, 50px gutter)
|
|
1657
|
+
and 1292px from 1600 up (1332 max, 20px gutter). The column keeps its
|
|
1658
|
+
own 40px gutter, so each cap is that content plus 80: xxl 1280 gives
|
|
1659
|
+
1200 and xxxl 1372 gives 1292. xxl was 1320, a 1240 column that sat
|
|
1660
|
+
20px outside the menu's edges at 1440 and 26px inside them at 1920. */
|
|
1651
1661
|
--grid-container-max-xs: 100%; /* mobile full width */
|
|
1652
1662
|
--grid-container-max-sm: 540px;
|
|
1653
1663
|
--grid-container-max-md: 720px;
|
|
1654
1664
|
--grid-container-max-lg: 960px;
|
|
1655
1665
|
--grid-container-max-xl: 1140px;
|
|
1656
|
-
--grid-container-max-xxl:
|
|
1666
|
+
--grid-container-max-xxl: 1280px;
|
|
1667
|
+
--grid-container-max-xxxl: 1372px;
|
|
1657
1668
|
|
|
1658
1669
|
/* Column count (usually 12) */
|
|
1659
1670
|
--grid-columns: 12;
|
|
@@ -1677,6 +1688,7 @@
|
|
|
1677
1688
|
--breakpoint-lg: 992px;
|
|
1678
1689
|
--breakpoint-xl: 1200px;
|
|
1679
1690
|
--breakpoint-xxl: 1400px;
|
|
1691
|
+
--breakpoint-xxxl: 1600px; /* the site menu and footer widen here */
|
|
1680
1692
|
/* =====================
|
|
1681
1693
|
FONT-FACE DEFINITIONS
|
|
1682
1694
|
Intentionally NOT here. @font-face nested inside a :host rule is
|
package/src/tokens/tokens.js
CHANGED
|
@@ -1648,7 +1648,7 @@ const declarations = `
|
|
|
1648
1648
|
deliberately. A media condition cannot read a custom property — @media
|
|
1649
1649
|
(max-width: var(--breakpoint-sm)) is not valid CSS — so a breakpoint
|
|
1650
1650
|
token can never be referenced the way a colour is. It exists so the
|
|
1651
|
-
|
|
1651
|
+
seven values have one place to be read from, by the lint that checks
|
|
1652
1652
|
media queries against them and by anything generating CSS. The grid
|
|
1653
1653
|
tokens below are read: --grid-container-max-* and --grid-padding-*
|
|
1654
1654
|
are the page column, through shared/ensemble.css.js and layout.css,
|
|
@@ -1660,13 +1660,24 @@ const declarations = `
|
|
|
1660
1660
|
references is dead weight, and the OLD VALUES and FONT TOKENS blocks
|
|
1661
1661
|
that used to sit below were removed for exactly that reason.
|
|
1662
1662
|
*/
|
|
1663
|
-
/* Grid container max widths
|
|
1663
|
+
/* Grid container max widths
|
|
1664
|
+
|
|
1665
|
+
The top two steps are set by the site's menu and footer, not by the
|
|
1666
|
+
grid's own progression: a page built from these modules sits between
|
|
1667
|
+
the two, so its content edges have to land on theirs. Measured on
|
|
1668
|
+
bitdefender.com on 2026-10-16, the menu and footer share one container
|
|
1669
|
+
whose content is 1200px wide from 1300 to 1599 (1300 max, 50px gutter)
|
|
1670
|
+
and 1292px from 1600 up (1332 max, 20px gutter). The column keeps its
|
|
1671
|
+
own 40px gutter, so each cap is that content plus 80: xxl 1280 gives
|
|
1672
|
+
1200 and xxxl 1372 gives 1292. xxl was 1320, a 1240 column that sat
|
|
1673
|
+
20px outside the menu's edges at 1440 and 26px inside them at 1920. */
|
|
1664
1674
|
--grid-container-max-xs: 100%; /* mobile full width */
|
|
1665
1675
|
--grid-container-max-sm: 540px;
|
|
1666
1676
|
--grid-container-max-md: 720px;
|
|
1667
1677
|
--grid-container-max-lg: 960px;
|
|
1668
1678
|
--grid-container-max-xl: 1140px;
|
|
1669
|
-
--grid-container-max-xxl:
|
|
1679
|
+
--grid-container-max-xxl: 1280px;
|
|
1680
|
+
--grid-container-max-xxxl: 1372px;
|
|
1670
1681
|
|
|
1671
1682
|
/* Column count (usually 12) */
|
|
1672
1683
|
--grid-columns: 12;
|
|
@@ -1690,6 +1701,7 @@ const declarations = `
|
|
|
1690
1701
|
--breakpoint-lg: 992px;
|
|
1691
1702
|
--breakpoint-xl: 1200px;
|
|
1692
1703
|
--breakpoint-xxl: 1400px;
|
|
1704
|
+
--breakpoint-xxxl: 1600px; /* the site menu and footer widen here */
|
|
1693
1705
|
/* =====================
|
|
1694
1706
|
FONT-FACE DEFINITIONS
|
|
1695
1707
|
Intentionally NOT here. @font-face nested inside a :host rule is
|
|
@@ -190,7 +190,7 @@ const FLUID = [
|
|
|
190
190
|
['body-lead', 20, 18, 'Regular']
|
|
191
191
|
];
|
|
192
192
|
/* viewport -> column, from --grid-container-max-* minus 2x --grid-padding-* */
|
|
193
|
-
const COLUMNS = [[320, 288], [375, 343], [576, 492], [768, 656], [992, 880], [1200, 1060], [1400,
|
|
193
|
+
const COLUMNS = [[320, 288], [375, 343], [576, 492], [768, 656], [992, 880], [1200, 1060], [1400, 1200], [1600, 1292]];
|
|
194
194
|
const WINDOW = [320, 992];
|
|
195
195
|
|
|
196
196
|
/** What the clamp resolves to at a given viewport width, in px. */
|