@repobit/dex-system-design 0.23.33 → 0.23.34

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.34](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.33...@repobit/dex-system-design@0.23.34) (2026-05-21)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1014:** refactor accordion structure
11
+
12
+
6
13
  ## [0.23.33](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.32...@repobit/dex-system-design@0.23.33) (2026-05-21)
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.33",
3
+ "version": "0.23.34",
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.29",
74
- "@repobit/dex-store-elements": "1.4.21",
73
+ "@repobit/dex-store": "1.3.30",
74
+ "@repobit/dex-store-elements": "1.4.22",
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": "33f284d019667909f6437039a84f0301f485c95a"
91
+ "gitHead": "7d7e902dcbbb5deee029ea3e70d7cd27758b950e"
92
92
  }
@@ -9,6 +9,12 @@ export default css`
9
9
  --bd-accesibility-focus: var(--color-blue-500);
10
10
  display: block;
11
11
  }
12
+ :host(bd-accordion-bg-item[data-variant="terms-of-use"]) {
13
+ background-color: transparent !important;
14
+ padding: 0;
15
+ border-radius: 0;
16
+ }
17
+
12
18
 
13
19
  :host(bd-accordion-bg-item) {
14
20
  display: block;
@@ -9,15 +9,23 @@ import { accordionItem, accordionSection } from "./accordion.css.js";
9
9
 
10
10
  class BdAccordionBg extends LitElement {
11
11
  static properties = {
12
- title : { type: String },
13
- noBg : { type: Boolean, reflect: true, attribute: "no-bg" },
14
- _variant: { state: true }
15
- };
12
+ title : { type: String },
13
+ noBg : { type: Boolean, reflect: true, attribute: "no-bg" },
14
+ guideIcon : { type: String, reflect: true, attribute: "guide-icon" },
15
+ guideLabel: { type: String, reflect: true, attribute: "guide-label" },
16
+ guideHref : { type: String, reflect: true, attribute: "guide-href" },
17
+ _variant : { state: true },
18
+ variant : { type: String, reflect: true, attribute: "data-variant" }
19
+ }
16
20
 
17
21
  constructor() {
18
22
  super();
19
- this.noBg = false;
20
- this._variant = "default";
23
+ this.noBg = false;
24
+ this._variant = "default";
25
+ this.variant = "default";
26
+ this.guideIcon = "";
27
+ this.guideLabel = "";
28
+ this.guideHref = "#";
21
29
  }
22
30
 
23
31
  static styles = [tokens, accordionCSS, accordionSection];
@@ -27,28 +35,43 @@ class BdAccordionBg extends LitElement {
27
35
  Promise.resolve().then(() => this._detectVariant());
28
36
  }
29
37
 
38
+ // În BdAccordionBg, înlocuiește _detectVariant și adaugă firstUpdated:
39
+
30
40
  _detectVariant() {
31
41
  let el = this.parentElement;
32
42
  while (el) {
33
43
  if (el.classList.contains("faq")) {
34
44
  this._variant = "faq";
45
+ this.variant = "faq";
46
+ this._propagateVariant("faq");
35
47
  return;
36
48
  }
37
49
  if (
38
50
  el.classList.contains("terms-of-use") ||
39
- el.classList.contains("system-requirements")
51
+ el.classList.contains("system-requirements")
40
52
  ) {
41
53
  this._variant = "terms-of-use";
54
+ this.variant = "terms-of-use";
55
+ this._propagateVariant("terms-of-use");
42
56
  return;
43
57
  }
44
58
  el = el.parentElement;
45
59
  }
46
60
  this._variant = "default";
61
+ this.variant = "default";
62
+ this._propagateVariant("default");
47
63
  }
48
64
 
49
- render() {
65
+ _propagateVariant(variant) {
66
+ // Setam data-variant pe toti copiii slotted bd-accordion-bg-item
67
+ this.querySelectorAll("bd-accordion-bg-item").forEach(item => {
68
+ item.setAttribute("data-variant", variant);
69
+ });
70
+ }
71
+
72
+ _renderFaq() {
50
73
  return html`
51
- <div class="bd-accordion-bg-container ${this.noBg ? "no-bg" : ""}${this._variant}">
74
+ <div class="bd-accordion-bg-container ${this.noBg ? "no-bg" : ""}">
52
75
  <div class="bd-accordion-bg-header">
53
76
  <bd-h as="h2" class="bd-accordion-bg-title">${this.title}</bd-h>
54
77
  </div>
@@ -56,6 +79,34 @@ class BdAccordionBg extends LitElement {
56
79
  </div>
57
80
  `;
58
81
  }
82
+
83
+ _renderTerms() {
84
+ return html`
85
+ <div class="bd-accordion-section-container">
86
+ ${this.title
87
+ ? html`<bd-h as="h6" paddingBottom=var(--spacing-32) fontWeight="700" class="section-title">${this.title}</bd-h>`
88
+ : ""}
89
+ <slot></slot>
90
+ ${this.guideLabel
91
+ ? html`
92
+ <p class="user-guide-link">
93
+ <a href=${this.guideHref}>
94
+ ${this.guideIcon
95
+ ? html`<bd-plus-icon size="16" color="#006DFF"></bd-plus-icon>`
96
+ : ""}
97
+ ${this.guideLabel}
98
+ </a>
99
+ </p>`
100
+ : ""}
101
+ </div>
102
+ `;
103
+ }
104
+
105
+ render() {
106
+ return this._variant === "terms-of-use"
107
+ ? this._renderTerms()
108
+ : this._renderFaq();
109
+ }
59
110
  }
60
111
 
61
112
  class BdAccordionBgItem extends LitElement {
@@ -124,6 +175,7 @@ class BdAccordionBgItem extends LitElement {
124
175
  this.removeAttribute("data-bd-acc-focus");
125
176
  }
126
177
 
178
+ // Design bd-accordion — pentru terms-of-use si system-requirements
127
179
  _renderTerms() {
128
180
  return html`
129
181
  <button
@@ -148,6 +200,7 @@ class BdAccordionBgItem extends LitElement {
148
200
  `;
149
201
  }
150
202
 
203
+ // Design bd-accordion-bg — pentru faq (default)
151
204
  _renderDefault() {
152
205
  return html`
153
206
  <div class="bd-accordion-bg-item ${this.open ? "open" : ""} ${this.noBg ? "no-bg" : ""}">