@repobit/dex-system-design 0.23.52 → 0.23.54

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.54](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.53...@repobit/dex-system-design@0.23.54) (2026-06-24)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1014:** css adjustments for tabs component
11
+
12
+
13
+ ## [0.23.53](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.52...@repobit/dex-system-design@0.23.53) (2026-06-24)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **DEX-1014:** css adjustments for tabs component
18
+
19
+
6
20
  ## [0.23.52](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.51...@repobit/dex-system-design@0.23.52) (2026-06-23)
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.52",
3
+ "version": "0.23.54",
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.48",
74
- "@repobit/dex-store-elements": "1.4.40",
73
+ "@repobit/dex-store": "1.3.50",
74
+ "@repobit/dex-store-elements": "1.4.42",
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": "10b79725b3ab54c9aa0fab51c9b458941a483ef2"
91
+ "gitHead": "9b209d3aab1cacf2af53e6647b3eac3697db217d"
92
92
  }
@@ -13,6 +13,7 @@ export default css`
13
13
  margin: 0 auto;
14
14
  padding-top: var(--spacing-64)
15
15
  }
16
+
16
17
  .sub-title {
17
18
  color: #006DFF;
18
19
  font-family: var(--typography-fontFamily-sans);
@@ -38,7 +38,10 @@ export default css`
38
38
  border-bottom: 1px solid var(--color-neutral-100);
39
39
  // margin-bottom: var(--spacing-32);
40
40
  }
41
-
41
+ .bd-panel-wrapper {
42
+ width: 100%;
43
+ box-sizing: border-box;
44
+ }
42
45
  .bd-tab-button {
43
46
  display: inline-flex;
44
47
  align-items: center;
@@ -7,45 +7,72 @@ import "../highlight/highlight.js";
7
7
  import "../paragraph/paragraph.js";
8
8
  import tabsCSS from "./tabs.css.js";
9
9
 
10
- class BdTabPanel extends HTMLElement {
11
- connectedCallback() {
12
- this.style.display = "none";
10
+ class BdTabPanel extends LitElement {
11
+ static styles = [];
12
+
13
+ render() {
14
+ return html`<slot></slot>`;
13
15
  }
14
16
  }
15
17
  customElements.define("bd-tab-panel", BdTabPanel);
16
18
 
17
19
  class BdTabs extends LitElement {
18
20
  static properties = {
19
- title : { type: String },
20
- subtitle : { type: String },
21
- selectedTab: { type: Number, state: true }
21
+ title : { type: String },
22
+ subtitle : { type: String },
23
+ selectedTab : { type: Number, state: true },
24
+ _panelMinHeight: { type: Number, state: true }
22
25
  };
23
26
 
24
27
  static styles = [tokens, tabsCSS];
25
28
 
26
29
  constructor() {
27
30
  super();
28
- this.title = "";
29
- this.subtitle = "";
30
- this.selectedTab = 0;
31
+ this.title = "";
32
+ this.subtitle = "";
33
+ this.selectedTab = 0;
34
+ this._panelMinHeight = 0;
31
35
  }
32
36
 
33
37
  _getPanels() {
34
38
  return Array.from(this.querySelectorAll(":scope > bd-tab-panel"));
35
39
  }
36
40
 
37
- _getColsFromPanel(panel) {
38
- return Array.from(panel.querySelectorAll(":scope > bd-feature-col"));
39
- }
40
-
41
41
  selectTab(index) {
42
42
  this.selectedTab = index;
43
43
  }
44
44
 
45
+ async firstUpdated() {
46
+ await this.updateComplete;
47
+ await this._measureAllPanels();
48
+ }
49
+
50
+ async _measureAllPanels() {
51
+ const panels = this._getPanels();
52
+ const wrapper = this.renderRoot.querySelector(".bd-panel-wrapper");
53
+ if (!wrapper || !panels.length) return;
54
+
55
+ const originalTab = this.selectedTab;
56
+ let maxHeight = 0;
57
+
58
+ for (let i = 0; i < panels.length; i++) {
59
+ this.selectedTab = i;
60
+ await this.updateComplete;
61
+ await new Promise(r => requestAnimationFrame(r));
62
+ await new Promise(r => requestAnimationFrame(r));
63
+
64
+ const h = wrapper.scrollHeight;
65
+ if (h > maxHeight) maxHeight = h;
66
+ }
67
+
68
+ this.selectedTab = originalTab;
69
+ await this.updateComplete;
70
+ this._panelMinHeight = maxHeight;
71
+ }
72
+
45
73
  render() {
46
74
  const panels = this._getPanels();
47
75
  const activePanel = panels[this.selectedTab];
48
- const cols = activePanel ? this._getColsFromPanel(activePanel) : [];
49
76
 
50
77
  return html`
51
78
  <div class="bd-tabs-component">
@@ -78,12 +105,9 @@ class BdTabs extends LitElement {
78
105
  role="tabpanel"
79
106
  aria-labelledby="tab-btn-${this.selectedTab}"
80
107
  class="bd-panel-wrapper"
108
+ style="${this._panelMinHeight ? `min-height: ${this._panelMinHeight}px;` : ""}"
81
109
  >
82
- ${keyed(this.selectedTab, html`
83
- <bd-features>
84
- ${cols.map(col => col.cloneNode(true))}
85
- </bd-features>
86
- `)}
110
+ ${keyed(this.selectedTab, activePanel ? activePanel.cloneNode(true) : "")}
87
111
  </div>
88
112
 
89
113
  </div>