@repobit/dex-system-design 0.23.55 → 0.23.57
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
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
|
+
## [0.23.57](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.56...@repobit/dex-system-design@0.23.57) (2026-06-26)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **DEX-1014:** css adjustments for features component
|
|
11
|
+
* **DEX-1014:** css adjustments for features component
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.23.56](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.55...@repobit/dex-system-design@0.23.56) (2026-06-25)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **DEX-1014:** css adjustments for tabs component
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
## [0.23.55](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.54...@repobit/dex-system-design@0.23.55) (2026-06-25)
|
|
7
22
|
|
|
8
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.57",
|
|
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",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"url": "https://github.com/bitdefender/dex-core/issues"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@repobit/dex-store": "1.3.
|
|
74
|
-
"@repobit/dex-store-elements": "1.4.
|
|
73
|
+
"@repobit/dex-store": "1.3.53",
|
|
74
|
+
"@repobit/dex-store-elements": "1.4.45",
|
|
75
75
|
"lit": "^3.3.2"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"volta": {
|
|
89
89
|
"node": "24.14.0"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "2a961aadaa90eac422c04d1aa86d3b48505db1b6"
|
|
92
92
|
}
|
|
@@ -19,6 +19,7 @@ class BdFeatures extends LitElement {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
21
|
this._minHeight = 0;
|
|
22
|
+
this._resizeObserver = null;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
_getCols() {
|
|
@@ -26,10 +27,33 @@ class BdFeatures extends LitElement {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
async firstUpdated() {
|
|
30
|
+
if (document.fonts?.ready) {
|
|
31
|
+
await document.fonts.ready;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
await this._measureMaxHeight();
|
|
35
|
+
|
|
36
|
+
const container = this.renderRoot.querySelector(".bd-features-container");
|
|
37
|
+
if (container) {
|
|
38
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
39
|
+
this._equalizeRows();
|
|
40
|
+
});
|
|
41
|
+
this._resizeObserver.observe(container);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback();
|
|
47
|
+
this._resizeObserver?.disconnect();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
_isVisible() {
|
|
51
|
+
return this.offsetWidth > 0 && this.offsetHeight > 0;
|
|
30
52
|
}
|
|
31
53
|
|
|
32
54
|
_equalizeRows() {
|
|
55
|
+
if (!this._isVisible()) return;
|
|
56
|
+
|
|
33
57
|
const container = this.renderRoot.querySelector(".bd-features-container");
|
|
34
58
|
if (!container) return;
|
|
35
59
|
|
|
@@ -37,37 +61,64 @@ class BdFeatures extends LitElement {
|
|
|
37
61
|
const titles = container.querySelectorAll(".col-title-wrapper");
|
|
38
62
|
const descriptions = container.querySelectorAll(".col-description");
|
|
39
63
|
|
|
40
|
-
icons.forEach(el => el.style.height = "");
|
|
41
|
-
titles.forEach(el => el.style.height = "");
|
|
42
|
-
descriptions.forEach(el => el.style.height = "");
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
icons.forEach(el => el.style.height = "auto");
|
|
65
|
+
titles.forEach(el => el.style.height = "auto");
|
|
66
|
+
descriptions.forEach(el => el.style.height = "auto");
|
|
67
|
+
|
|
68
|
+
const measure = (els) => {
|
|
69
|
+
let maxH = 0;
|
|
70
|
+
els.forEach(el => {
|
|
71
|
+
const h = el.getBoundingClientRect().height;
|
|
72
|
+
if (h > maxH) maxH = h;
|
|
73
|
+
});
|
|
74
|
+
return maxH;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const iconMax = measure(icons);
|
|
78
|
+
const titleMax = measure(titles);
|
|
79
|
+
const descMax = measure(descriptions);
|
|
80
|
+
|
|
81
|
+
// Aplica doar daca > 0, altfel removeProperty
|
|
82
|
+
if (iconMax > 0) {
|
|
83
|
+
icons.forEach(el => el.style.height = `${iconMax}px`);
|
|
84
|
+
} else {
|
|
85
|
+
icons.forEach(el => el.style.removeProperty("height"));
|
|
86
|
+
}
|
|
47
87
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
88
|
+
if (titleMax > 0) {
|
|
89
|
+
titles.forEach(el => el.style.height = `${titleMax}px`);
|
|
90
|
+
} else {
|
|
91
|
+
titles.forEach(el => el.style.removeProperty("height"));
|
|
92
|
+
}
|
|
51
93
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
94
|
+
if (descMax > 0) {
|
|
95
|
+
descriptions.forEach(el => el.style.height = `${descMax}px`);
|
|
96
|
+
} else {
|
|
97
|
+
descriptions.forEach(el => el.style.removeProperty("height"));
|
|
98
|
+
}
|
|
55
99
|
}
|
|
56
100
|
|
|
57
101
|
async _measureMaxHeight() {
|
|
58
102
|
const container = this.renderRoot.querySelector(".bd-features-container");
|
|
59
103
|
if (!container) return;
|
|
60
104
|
|
|
105
|
+
// Daca e ascunsa, nu masura
|
|
106
|
+
if (!this._isVisible()) return;
|
|
107
|
+
|
|
61
108
|
await this.updateComplete;
|
|
109
|
+
|
|
110
|
+
await new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
|
|
111
|
+
|
|
62
112
|
this._equalizeRows();
|
|
63
|
-
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
64
113
|
|
|
65
|
-
|
|
114
|
+
await this.updateComplete;
|
|
115
|
+
|
|
116
|
+
const h = container.getBoundingClientRect().height;
|
|
66
117
|
if (h > 0) {
|
|
67
118
|
this._minHeight = h;
|
|
68
119
|
}
|
|
69
120
|
|
|
70
|
-
await
|
|
121
|
+
await new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
|
|
71
122
|
this._equalizeRows();
|
|
72
123
|
}
|
|
73
124
|
|
|
@@ -119,11 +170,14 @@ class BdFeatures extends LitElement {
|
|
|
119
170
|
render() {
|
|
120
171
|
const cols = this._getCols();
|
|
121
172
|
const colCount = cols.length;
|
|
173
|
+
const colWidth = 400;
|
|
174
|
+
const gap = 32;
|
|
175
|
+
const maxWidth = colCount * colWidth + (colCount - 1) * gap;
|
|
122
176
|
|
|
123
177
|
return html`
|
|
124
178
|
<div
|
|
125
179
|
class="bd-features-container"
|
|
126
|
-
style="grid-template-columns: repeat(${colCount}, 1fr); ${this._minHeight ? `min-height: ${this._minHeight}px;` : ""}"
|
|
180
|
+
style="grid-template-columns: repeat(${colCount}, 1fr); max-width: ${maxWidth}px; ${this._minHeight ? `min-height: ${this._minHeight}px;` : ""}"
|
|
127
181
|
>
|
|
128
182
|
${cols.map(col => this._renderCol(col))}
|
|
129
183
|
</div>
|
|
@@ -6,8 +6,8 @@ export default css`
|
|
|
6
6
|
font-size: 100%;
|
|
7
7
|
display: block;
|
|
8
8
|
font-family: var(--typography-fontFamily-sans);
|
|
9
|
-
padding-top: var(--spacing-64);
|
|
10
|
-
padding-bottom: var(--spacing-64);
|
|
9
|
+
// padding-top: var(--spacing-64);
|
|
10
|
+
// padding-bottom: var(--spacing-64);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:host([bg-blue]) {
|