@repobit/dex-system-design 0.23.88 → 0.23.89

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,13 @@
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.89](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.88...@repobit/dex-system-design@0.23.89) (2026-07-16)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1014:** card adjustments
11
+
12
+
6
13
  ## [0.23.88](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.87...@repobit/dex-system-design@0.23.88) (2026-07-16)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "0.23.88",
3
+ "version": "0.23.89",
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",
@@ -74,8 +74,8 @@
74
74
  "url": "https://github.com/bitdefender/dex-core/issues"
75
75
  },
76
76
  "dependencies": {
77
- "@repobit/dex-store": "1.3.84",
78
- "@repobit/dex-store-elements": "1.5.1",
77
+ "@repobit/dex-store": "1.3.85",
78
+ "@repobit/dex-store-elements": "1.5.2",
79
79
  "lit": "^3.3.2"
80
80
  },
81
81
  "devDependencies": {
@@ -92,5 +92,5 @@
92
92
  "volta": {
93
93
  "node": "24.14.0"
94
94
  },
95
- "gitHead": "971af131324acdf322e7a01fff6549cebeabeab2"
95
+ "gitHead": "655316a0cdee9b7084c8bd4c8e85ca31b45ff55b"
96
96
  }
@@ -60,10 +60,6 @@ class Card extends LitElement {
60
60
  const items = Array.from(this.querySelectorAll("bd-card-item"));
61
61
  if (!items.length) return;
62
62
 
63
- console.log('[bd-card-section] _equalizeHeights called', {
64
- innerWidth: window.innerWidth,
65
- items : items.length
66
- });
67
63
 
68
64
  if (window.innerWidth <= 768) {
69
65
  items.forEach(item => {
@@ -93,22 +89,6 @@ class Card extends LitElement {
93
89
  });
94
90
 
95
91
  requestAnimationFrame(() => {
96
- // Log box computed styles
97
- console.log('[bd-card-section] box computed styles:', items.map(item => {
98
- const box = item.renderRoot?.querySelector(".bd-light-box-s");
99
- if (!box) return null;
100
- const cs = getComputedStyle(box);
101
- return {
102
- width : box.getBoundingClientRect().width,
103
- computedWidth: cs.width,
104
- flex : cs.flex,
105
- minWidth : cs.minWidth,
106
- inlineWidth : box.style.width,
107
- cssVarOnHost : getComputedStyle(item).getPropertyValue('--bd-card-width'),
108
- cssVarOnBox : cs.getPropertyValue('--bd-card-width')
109
- };
110
- }));
111
-
112
92
  // Egalizare icon wrappers
113
93
  let maxIcon = 0;
114
94
  items.forEach(item => {
@@ -242,35 +222,51 @@ class CardItem extends LitElement {
242
222
  }
243
223
 
244
224
  _renderIcon() {
245
- const SMALL_ICON_THRESHOLD = 120;
246
- const SMALL_ICON_SIZE = 40;
247
-
248
225
  const iconEl = this.querySelector("[slot='icon']");
249
226
 
250
227
  if (iconEl) {
251
228
  const clone = iconEl.cloneNode(true);
252
- const originalW = iconEl.getAttribute("width");
253
- const originalH = iconEl.getAttribute("height");
254
-
255
- const isSmallIcon =
256
- (originalW && parseInt(originalW) <= SMALL_ICON_THRESHOLD) ||
257
- (originalH && parseInt(originalH) <= SMALL_ICON_THRESHOLD);
258
-
259
- const targetSize = isSmallIcon ? SMALL_ICON_SIZE : 120;
260
-
261
- clone.style.maxWidth = `${targetSize}px`;
262
- clone.style.maxHeight = `${targetSize}px`;
263
- clone.style.width = `${targetSize}px`;
264
- clone.style.height = `${targetSize}px`;
229
+ const originalW = parseInt(iconEl.getAttribute("width") || "0");
230
+ const originalH = parseInt(iconEl.getAttribute("height") || "0");
231
+
232
+ const _calcSize = (w, h, el) => {
233
+ // Daca nu are atribute, incearca sa citeasca dimensiunile reale
234
+ if (!w && !h && el) {
235
+ const rect = el.getBoundingClientRect();
236
+ w = Math.round(rect.width);
237
+ h = Math.round(rect.height);
238
+ console.log('[bd-card-icon] fallback dimensions from rect:', { w, h });
239
+ }
240
+
241
+ // Daca tot nu stim dimensiunile, lasam ca e imagine mare
242
+ if (!w && !h) return { w: 120, h: 120 };
243
+
244
+ const dim = Math.max(w, h);
245
+ if (dim <= 50) return { w, h };
246
+ if (dim <= 100) return { w: 48, h: 48 };
247
+ return { w: 120, h: 120 };
248
+ };
249
+
250
+ const { w: finalW, h: finalH } = _calcSize(originalW, originalH, iconEl);
251
+
252
+
253
+ clone.style.maxWidth = "120px";
254
+ clone.style.maxHeight = "120px";
255
+ clone.style.width = `${finalW}px`;
256
+ clone.style.height = `${finalH}px`;
265
257
  clone.style.objectFit = "contain";
266
258
  clone.style.display = "block";
267
259
 
268
260
  const innerImg = clone.querySelector("img");
269
261
  if (innerImg) {
270
- innerImg.style.maxWidth = `${targetSize}px`;
271
- innerImg.style.maxHeight = `${targetSize}px`;
272
- innerImg.style.width = `${targetSize}px`;
273
- innerImg.style.height = `${targetSize}px`;
262
+ const imgW = parseInt(innerImg.getAttribute("width") || "0");
263
+ const imgH = parseInt(innerImg.getAttribute("height") || "0");
264
+ const { w: imgFinalW, h: imgFinalH } = _calcSize(imgW, imgH);
265
+
266
+ innerImg.style.maxWidth = "120px";
267
+ innerImg.style.maxHeight = "120px";
268
+ innerImg.style.width = `${imgFinalW}px`;
269
+ innerImg.style.height = `${imgFinalH}px`;
274
270
  innerImg.style.objectFit = "contain";
275
271
  innerImg.style.display = "block";
276
272
  innerImg.removeAttribute("width");
@@ -290,7 +286,6 @@ class CardItem extends LitElement {
290
286
 
291
287
  return "";
292
288
  }
293
-
294
289
  _hasContent() {
295
290
  const slottedNodes = [...this.childNodes].filter((node) => {
296
291
  if (node.nodeType === Node.ELEMENT_NODE) {