@repobit/dex-system-design 0.23.62 → 0.23.64

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,20 @@
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.64](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.63...@repobit/dex-system-design@0.23.64) (2026-07-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1014:** css adjustments for cards component
11
+
12
+
13
+ ## [0.23.63](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.62...@repobit/dex-system-design@0.23.63) (2026-07-02)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **DEX-1014:** css adjustments for cards4 component
18
+
19
+
6
20
  ## [0.23.62](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.61...@repobit/dex-system-design@0.23.62) (2026-07-01)
7
21
 
8
22
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "0.23.62",
3
+ "version": "0.23.64",
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.58",
74
- "@repobit/dex-store-elements": "1.4.50",
73
+ "@repobit/dex-store": "1.3.60",
74
+ "@repobit/dex-store-elements": "1.4.52",
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": "4742b085d57e9d3c35cfe88763e7bfff91bff6ec"
91
+ "gitHead": "d2ffeffa127085b7c0af844f9965b13afdfd7bd8"
92
92
  }
@@ -5,14 +5,18 @@ export default css`
5
5
  display: block;
6
6
  --background-card-grey: var(--color-neutral-25);
7
7
  --border-card-grey: var(--color-neutral-50);
8
- padding-top: var(--spacing-32);
9
- padding-bottom: var(--spacing-32);
10
- }
11
- ::slotted([slot="icon"]) {
12
- width: 48px !important;
13
- height: 48px !important;
14
- flex-shrink: 0;
15
- }
8
+ padding-top: var(--spacing-64);
9
+ padding-bottom: var(--spacing-64);
10
+ max-width: 1290px;
11
+ margin: 0 auto;
12
+ }
13
+
14
+ ::slotted([slot="icon"]) {
15
+ width: 48px !important;
16
+ height: 48px !important;
17
+ flex-shrink: 0;
18
+ }
19
+
16
20
  .bd-section-title-s {
17
21
  font-family: var(--typography-fontFamily-sans);
18
22
  font-weight: var(--typography-fontWeight-semibold);
@@ -30,8 +34,6 @@ export default css`
30
34
  justify-content: center;
31
35
  position: relative;
32
36
  width: 100%;
33
- margin: var(--spacing-0) auto;
34
- overflow: hidden;
35
37
  flex-direction: column;
36
38
  padding-left: var(--spacing-14);
37
39
  padding-right: var(--spacing-14);
@@ -62,7 +64,7 @@ export default css`
62
64
  scroll-snap-type: x mandatory;
63
65
  display: grid;
64
66
  gap: 1.5rem;
65
- grid-template-columns: repeat(4, 1fr);
67
+ /* grid-template-columns vine din JS */
66
68
  }
67
69
 
68
70
  .bd-light-carousel-track-s::-webkit-scrollbar {
@@ -77,26 +79,23 @@ export default css`
77
79
  display: flex;
78
80
  flex-direction: column;
79
81
  align-items: start;
80
- justify-content: center;
82
+ justify-content: flex-start;
81
83
  text-align: start;
82
84
  transition: transform 0.2s ease-in-out;
83
- min-height: 135px;
84
85
  position: relative;
85
86
  z-index: 2;
86
87
  scroll-snap-align: start;
87
88
  font-family: var(--typography-fontFamily-sans);
89
+ box-sizing: border-box;
88
90
  }
89
91
 
90
- /* Stiluri pentru carduri fără conținut (doar icon + titlu) */
91
92
  .bd-light-box-no-content {
92
93
  justify-content: center !important;
93
94
  align-items: center !important;
94
95
  text-align: center !important;
95
- min-height: 200px;
96
96
  gap: var(--spacing-32);
97
97
  }
98
98
 
99
- /* Stiluri pentru aliniere center */
100
99
  .bd-light-box-center {
101
100
  align-items: center !important;
102
101
  justify-content: center !important;
@@ -111,7 +110,6 @@ export default css`
111
110
  text-align: start;
112
111
  }
113
112
 
114
- /* Titlu pentru carduri fără conținut */
115
113
  .bd-light-title-no-content h3 {
116
114
  margin: var(--spacing-0) !important;
117
115
  font-size: var(--heading-small) !important;
@@ -141,7 +139,6 @@ export default css`
141
139
  width: var(--spacing-44);
142
140
  }
143
141
 
144
- /* Iconiță pentru carduri fără conținut */
145
142
  .bd-light-box-no-content .bd-light-icon-s {
146
143
  margin: 0 !important;
147
144
  bottom: 0;
@@ -157,14 +154,13 @@ export default css`
157
154
  position: relative;
158
155
  }
159
156
 
160
- /* Header pentru carduri fără conținut */
161
157
  .bd-light-box-no-content .bd-light-box-header-s {
162
158
  align-items: center !important;
163
159
  margin: 0 !important;
164
160
  }
165
161
 
166
162
  .bd-light-box-header-center {
167
- align-items: center !important;
163
+ align-items: center !important;
168
164
  padding-bottom: var(--spacing-16);
169
165
  }
170
166
 
@@ -174,7 +170,6 @@ export default css`
174
170
  gap: var(--spacing-4, 4px);
175
171
  }
176
172
 
177
- /* Container titlu pentru carduri fără conținut */
178
173
  .bd-light-title-no-content {
179
174
  margin: 0 !important;
180
175
  width: 100%;
@@ -186,15 +181,17 @@ export default css`
186
181
  width: 380px;
187
182
  padding: 1.5em;
188
183
  }
184
+
189
185
  .bd-light-box-s h3 {
190
186
  font-size: 1.1em;
191
187
  }
188
+
192
189
  .bd-light-box-s p {
193
190
  font-size: 0.95em;
194
191
  }
195
192
 
196
193
  .bd-light-carousel-track-s {
197
- grid-template-columns: repeat(2, 1fr);
194
+ grid-template-columns: repeat(2, 1fr) !important;
198
195
  }
199
196
  }
200
197
 
@@ -223,11 +220,6 @@ export default css`
223
220
  .bd-light-box-s {
224
221
  width: 100%;
225
222
  padding: 1em;
226
- min-height: 300px;
227
- }
228
-
229
- .bd-light-box-no-content {
230
- min-height: 250px;
231
223
  }
232
224
 
233
225
  .bd-light-box-s h3 {
@@ -245,7 +237,7 @@ export default css`
245
237
 
246
238
  @media (max-width: 600px) {
247
239
  .bd-light-carousel-track-s {
248
- grid-template-columns: 1fr;
240
+ grid-template-columns: 1fr !important;
249
241
  }
250
242
  }
251
243
  `;
@@ -10,24 +10,91 @@ class Card extends LitElement {
10
10
 
11
11
  constructor() {
12
12
  super();
13
- this.title = "";
13
+ this.title = "";
14
+ this._resizeObserver = null;
15
+ }
16
+
17
+ _isVisible() {
18
+ return this.offsetWidth > 0 && this.offsetHeight > 0;
19
+ }
20
+
21
+ _equalizeHeights() {
22
+ if (!this._isVisible()) return;
23
+
24
+ const items = Array.from(this.querySelectorAll("bd-card-item"));
25
+ if (!items.length) return;
26
+
27
+ items.forEach(item => {
28
+ const box = item.renderRoot?.querySelector(".bd-light-box-s");
29
+ if (box) {
30
+ box.style.height = "auto";
31
+ box.style.minHeight = "0";
32
+ }
33
+ });
34
+
35
+ requestAnimationFrame(() => {
36
+ let maxH = 0;
37
+ items.forEach(item => {
38
+ const box = item.renderRoot?.querySelector(".bd-light-box-s");
39
+ if (!box) return;
40
+ const h = box.getBoundingClientRect().height;
41
+ if (h > maxH) maxH = h;
42
+ });
43
+
44
+ if (maxH > 0) {
45
+ items.forEach(item => {
46
+ const box = item.renderRoot?.querySelector(".bd-light-box-s");
47
+ if (box) {
48
+ box.style.height = `${maxH}px`;
49
+ box.style.minHeight = `${maxH}px`;
50
+ }
51
+ });
52
+ }
53
+ });
54
+ }
55
+
56
+ async firstUpdated() {
57
+ if (document.fonts?.ready) {
58
+ await document.fonts.ready;
59
+ }
60
+
61
+ await new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
62
+ this._equalizeHeights();
63
+
64
+ const track = this.renderRoot.querySelector(".bd-light-carousel-track-s");
65
+ if (track) {
66
+ this._resizeObserver = new ResizeObserver(() => {
67
+ this._equalizeHeights();
68
+ });
69
+ this._resizeObserver.observe(track);
70
+ }
71
+ }
72
+
73
+ disconnectedCallback() {
74
+ super.disconnectedCallback();
75
+ this._resizeObserver?.disconnect();
14
76
  }
15
77
 
16
78
  render() {
79
+ const itemCount = this.querySelectorAll("bd-card-item").length;
80
+
17
81
  return html`
18
- <section class="bd-light-carousel-s">
19
- ${this.title
20
- ? html`
21
- <div class="bd-header-light-carousel-s">
22
- <bd-h as="h1" class="bd-section-title-s">${this.title}</bd-h>
23
- </div>
24
- `
25
- : null}
26
- <div class="bd-light-carousel-track-s">
27
- <slot></slot>
28
- </div>
29
- </section>
30
- `;
82
+ <section class="bd-light-carousel-s">
83
+ ${this.title
84
+ ? html`
85
+ <div class="bd-header-light-carousel-s">
86
+ <bd-h as="h1" class="bd-section-title-s">${this.title}</bd-h>
87
+ </div>
88
+ `
89
+ : null}
90
+ <div
91
+ class="bd-light-carousel-track-s"
92
+ style="grid-template-columns: repeat(${itemCount}, 1fr);"
93
+ >
94
+ <slot @slotchange=${() => this._equalizeHeights()}></slot>
95
+ </div>
96
+ </section>
97
+ `;
31
98
  }
32
99
  }
33
100
 
@@ -41,7 +108,7 @@ class CardItem extends LitElement {
41
108
  constructor() {
42
109
  super();
43
110
  this.title = "";
44
- this.icon = "";
111
+ this.icon = "";
45
112
  this.align = "start";
46
113
  }
47
114
 
@@ -79,13 +146,13 @@ class CardItem extends LitElement {
79
146
  const hasContent = this._hasContent();
80
147
 
81
148
  return html`
82
- <div class="bd-light-box-s ${isCentered ? 'bd-light-box-center' : ''} ${!hasContent ? 'bd-light-box-no-content' : ''}">
83
- <div class="bd-light-box-header-s ${isCentered ? 'bd-light-box-header-center' : ''}">
149
+ <div class="bd-light-box-s ${isCentered ? "bd-light-box-center" : ""} ${!hasContent ? "bd-light-box-no-content" : ""}">
150
+ <div class="bd-light-box-header-s ${isCentered ? "bd-light-box-header-center" : ""}">
84
151
  ${this._renderIcon()}
85
152
  </div>
86
153
  ${this.title
87
154
  ? html`
88
- <div class="bd-light-title-badge-wrapper-s ${!hasContent ? 'bd-light-title-no-content' : ''}">
155
+ <div class="bd-light-title-badge-wrapper-s ${!hasContent ? "bd-light-title-no-content" : ""}">
89
156
  <bd-h as="h5" fontWeight="700">${this.title}</bd-h>
90
157
  </div>
91
158
  `
@@ -96,7 +163,7 @@ class CardItem extends LitElement {
96
163
  }
97
164
  }
98
165
 
99
- Card.styles = [tokens, carouselCSS];
166
+ Card.styles = [tokens, carouselCSS];
100
167
  CardItem.styles = [tokens, carouselCSS];
101
168
 
102
169
  customElements.define("bd-card-item", CardItem);
@@ -26,9 +26,10 @@ export default {
26
26
  ### Usage
27
27
  \`\`\`html
28
28
  <bd-card-section title="Why Bitdefender">
29
- <bd-card-item title="AI Protection" align="center">
29
+ <bd-card-item title="AI Protectionn" align="center">
30
30
  <bd-individual-icon slot="icon" width="32" height="32" color="#006DFF"></bd-individual-icon>
31
31
  <bd-p>Powered by machine learning.</bd-p>
32
+ <bd-p>Powered by machine learning.</bd-p>
32
33
  </bd-card-item>
33
34
  </bd-card-section>
34
35
  \`\`\`