@repobit/dex-system-design 0.9.0 → 0.10.0

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,25 @@
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.10.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.9.1...@repobit/dex-system-design@0.10.0) (2025-07-23)
7
+
8
+
9
+ ### Features
10
+
11
+ * **DEX-23636:** remove tokens.css and integrate design tokens into components ([ad53b2d](https://github.com/bitdefender/dex-core/commit/ad53b2d653957adbc6a961756b395fae4d2e12ed))
12
+ * **DEX-23636:** update Storybook configuration and enhance Header component with design tokens ([4dad876](https://github.com/bitdefender/dex-core/commit/4dad87680a03d77ed56293f3c4af5760f2ca9445))
13
+
14
+
15
+
16
+ ## [0.9.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.9.0...@repobit/dex-system-design@0.9.1) (2025-07-22)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **DEX-23636:** change CSS selector from :root to :host for better encapsulation ([b221681](https://github.com/bitdefender/dex-core/commit/b2216819b10c624637727aaad96c305cb84750e2))
22
+
23
+
24
+
6
25
  ## [0.9.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.8.0...@repobit/dex-system-design@0.9.0) (2025-07-22)
7
26
 
8
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
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",
@@ -16,8 +16,22 @@
16
16
  "LICENSE"
17
17
  ],
18
18
  "exports": {
19
+ "./anchor": "./src/components/anchor/anchor-nav.js",
20
+ "./badge": "./src/components/badge/badge.js",
19
21
  "./button": "./src/components/Button/Button.js",
20
- "./header": "./src/components/header/header.js"
22
+ "./carousel": "./src/components/carousel/carousel.js",
23
+ "./checkbox": "./src/components/checkbox/checkbox.js",
24
+ "./divider": "./src/components/divider/divider-horizontal.js",
25
+ "./faq": "./src/components/FAQ/faq.js",
26
+ "./header": "./src/components/header/header.js",
27
+ "./highlight": "./src/components/highlight/highlight.js",
28
+ "./input": "./src/components/Input/Input.js",
29
+ "./light-carousel": "./src/components/light-carousel/light-carousel.js",
30
+ "./paragraph": "./src/components/paragraph/paragraph.js",
31
+ "./pricing-cards": "./src/components/pricing-cards/pricing-card.js",
32
+ "./radio": "./src/components/radio/radio.js",
33
+ "./tabs": "./src/components/tabs/tabs.js",
34
+ "./terms": "./src/components/termsOfUse/terms.js"
21
35
  },
22
36
  "publishConfig": {
23
37
  "access": "public"
@@ -54,5 +68,5 @@
54
68
  "volta": {
55
69
  "node": "22.14.0"
56
70
  },
57
- "gitHead": "d627dea970dd55e62adf03427d56a10ee0fb8695"
71
+ "gitHead": "04e6ba773d3e1a126262cf6869e5280e00ce8863"
58
72
  }
@@ -1,11 +1,11 @@
1
- import { LitElement, html, css } from "lit";
2
- import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
3
 
4
4
  import faqCSS from "../FAQ/faq.css.js";
5
5
 
6
6
  class FaqSection extends LitElement {
7
7
  static properties = {
8
- faqs: { type: Array },
8
+ faqs: { type: Array }
9
9
  };
10
10
 
11
11
  constructor() {
@@ -27,14 +27,15 @@ class FaqSection extends LitElement {
27
27
  class FaqSectionItem extends LitElement {
28
28
  static properties = {
29
29
  title: { type: String },
30
- open: { type: Boolean, reflect: true },
30
+ open : { type: Boolean, reflect: true }
31
31
  };
32
32
 
33
33
  constructor() {
34
34
  super();
35
35
  this.title = "";
36
36
  this.open = false;
37
- this.id = `faq-${Math.random().toString(36).substr(2, 9)}`;
37
+ this.id = `faq-${Math.random().toString(36)
38
+ .substr(2, 9)}`;
38
39
  }
39
40
 
40
41
  toggleItem() {
@@ -78,8 +79,8 @@ class FaqSectionItem extends LitElement {
78
79
  }
79
80
  }
80
81
 
81
- FaqSection.styles = [faqCSS];
82
- FaqSectionItem.styles = [faqCSS];
82
+ FaqSection.styles = [tokens, faqCSS];
83
+ FaqSectionItem.styles = [tokens, faqCSS];
83
84
 
84
85
  customElements.define("bd-faq-section-item", FaqSectionItem);
85
86
  customElements.define("bd-faq-section", FaqSection);
@@ -1,19 +1,20 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import inputCSS from "../Input/input.css.js";
3
4
 
4
5
  class CustomInput extends LitElement {
5
6
  static properties = {
6
7
  label: { type: String },
7
- type: { type: String },
8
+ type : { type: String }
8
9
  };
9
10
 
10
11
  constructor() {
11
12
  super();
12
13
  this.label = "Default Label";
13
- this.type = "text";
14
+ this.type = "text";
14
15
  }
15
16
 
16
-
17
+
17
18
  render() {
18
19
  return html`
19
20
  <div class="input-container">
@@ -23,5 +24,5 @@ class CustomInput extends LitElement {
23
24
  `;
24
25
  }
25
26
  }
26
- CustomInput.styles = [inputCSS];
27
+ CustomInput.styles = [tokens, inputCSS];
27
28
  customElements.define("custom-input", CustomInput);
@@ -1,5 +1,6 @@
1
- import { LitElement, html, css } from "lit";
2
- import { anchorNavStyles, anchorNavItemStyles } from "./anchor-nav.css.js";
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import { anchorNavStyles } from "./anchor-nav.css.js";
3
4
 
4
5
  // BdAnchorNavItem
5
6
  class BdAnchorNavItem extends HTMLElement {
@@ -23,7 +24,7 @@ class BdAnchorNavItem extends HTMLElement {
23
24
 
24
25
 
25
26
  class BdAnchorNav extends LitElement {
26
- static styles = anchorNavStyles;
27
+ static styles = [tokens, anchorNavStyles];
27
28
 
28
29
  constructor() {
29
30
  super();
@@ -41,7 +42,7 @@ class BdAnchorNav extends LitElement {
41
42
  handleClick(event, id) {
42
43
  event.preventDefault();
43
44
  this.activeId = id;
44
-
45
+
45
46
  const sectionEl = document.querySelector(`#${id}-section`);
46
47
  if (sectionEl) {
47
48
  const offset = 120;
@@ -49,32 +50,32 @@ class BdAnchorNav extends LitElement {
49
50
  const scrollTop = window.pageYOffset;
50
51
  const elementY = rect.top + scrollTop;
51
52
  const offsetY = elementY - offset;
52
-
53
+
53
54
  window.scrollTo({
54
- top: offsetY,
55
+ top : offsetY,
55
56
  behavior: "smooth"
56
57
  });
57
58
  }
58
-
59
+
59
60
  this.requestUpdate();
60
61
  }
61
-
62
-
63
-
64
- scrollToPricing(event) {
65
- event.preventDefault();
66
- const pricingSection = document.querySelector("#section-pricing");
67
- if (pricingSection) {
68
- const offset = 120;
69
- const elementY = pricingSection.getBoundingClientRect().top + window.pageYOffset;
70
- const offsetY = elementY - offset;
71
-
72
- window.scrollTo({
73
- top: offsetY,
74
- behavior: "smooth"
75
- });
62
+
63
+
64
+
65
+ scrollToPricing(event) {
66
+ event.preventDefault();
67
+ const pricingSection = document.querySelector("#section-pricing");
68
+ if (pricingSection) {
69
+ const offset = 120;
70
+ const elementY = pricingSection.getBoundingClientRect().top + window.pageYOffset;
71
+ const offsetY = elementY - offset;
72
+
73
+ window.scrollTo({
74
+ top : offsetY,
75
+ behavior: "smooth"
76
+ });
77
+ }
76
78
  }
77
- }
78
79
 
79
80
  render() {
80
81
  const items = Array.from(this.children).filter(
@@ -1,10 +1,11 @@
1
- import { LitElement, html, css } from 'lit';
1
+ import { LitElement, html } from 'lit';
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import badgeCSS from './badge.css.js';
3
4
 
4
5
  export class BdBadge extends LitElement {
5
6
  static properties = {
6
- text: { type: String },
7
- color: { type: String },
7
+ text : { type: String },
8
+ color: { type: String }
8
9
  };
9
10
 
10
11
 
@@ -25,6 +26,6 @@ export class BdBadge extends LitElement {
25
26
  return html`<span class="badge">${this.text}</span>`;
26
27
  }
27
28
  }
28
- BdBadge.styles = [badgeCSS];
29
+ BdBadge.styles = [tokens, badgeCSS];
29
30
 
30
31
  customElements.define('bd-badge', BdBadge);
@@ -1,11 +1,12 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import carouselCSS from "../carousel/carousel.css.js";
3
4
 
4
5
  export class CarouselItem extends LitElement {
5
6
  static properties = {
6
- icon: { type: String },
7
- title: { type: String },
8
- modalText: { type: String },
7
+ icon : { type: String },
8
+ title : { type: String },
9
+ modalText: { type: String }
9
10
  };
10
11
 
11
12
  _onKeydown(event) {
@@ -18,12 +19,12 @@ export class CarouselItem extends LitElement {
18
19
  this.dispatchEvent(
19
20
  new CustomEvent("open-modal", {
20
21
  detail: {
21
- title: this.title,
22
+ title : this.title,
22
23
  modalText: this.modalText,
23
- icon: this.icon,
24
+ icon : this.icon
24
25
  },
25
- bubbles: true,
26
- composed: true,
26
+ bubbles : true,
27
+ composed: true
27
28
  })
28
29
  );
29
30
  }
@@ -51,13 +52,13 @@ export class CarouselItem extends LitElement {
51
52
  `;
52
53
  }
53
54
 
54
- static styles = [carouselCSS];
55
+ static styles = [tokens, carouselCSS];
55
56
  }
56
57
 
57
58
  class CustomCarousel extends LitElement {
58
59
  static properties = {
59
- title: { type: String },
60
- selectedItem: { type: Object },
60
+ title : { type: String },
61
+ selectedItem: { type: Object }
61
62
  };
62
63
 
63
64
  constructor() {
@@ -123,8 +124,8 @@ class CustomCarousel extends LitElement {
123
124
  if (!this.track) return;
124
125
 
125
126
  this.track.scrollBy({
126
- left: direction === "left" ? -itemWidth : itemWidth,
127
- behavior: "smooth",
127
+ left : direction === "left" ? -itemWidth : itemWidth,
128
+ behavior: "smooth"
128
129
  });
129
130
 
130
131
  setTimeout(() => this.updateArrowStates(), 300);
@@ -269,7 +270,7 @@ class CustomCarousel extends LitElement {
269
270
  `;
270
271
  }
271
272
 
272
- static styles = [carouselCSS];
273
+ static styles = [tokens, carouselCSS];
273
274
  }
274
275
 
275
276
  customElements.define("bd-carousel-item", CarouselItem);
@@ -1,15 +1,16 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import checkboxCSS from "./checkbox.css";
3
4
 
4
5
  export class BdCheckbox extends LitElement {
5
- static styles = [checkboxCSS];
6
+ static styles = [tokens, checkboxCSS];
6
7
 
7
8
  static properties = {
8
- name: { type: String },
9
- value: { type: String },
10
- checked: { type: Boolean, reflect: true },
9
+ name : { type: String },
10
+ value : { type: String },
11
+ checked : { type: Boolean, reflect: true },
11
12
  disabled: { type: Boolean, reflect: true },
12
- label: { type: String },
13
+ label : { type: String }
13
14
  };
14
15
 
15
16
  constructor() {
@@ -63,9 +64,9 @@ export class BdCheckbox extends LitElement {
63
64
 
64
65
  this.dispatchEvent(
65
66
  new CustomEvent("change", {
66
- detail: { value: this.checked ? this.value : null },
67
- bubbles: true,
68
- composed: true,
67
+ detail : { value: this.checked ? this.value : null },
68
+ bubbles : true,
69
+ composed: true
69
70
  })
70
71
  );
71
72
  }
@@ -76,24 +77,24 @@ export class BdCheckbox extends LitElement {
76
77
  }
77
78
  }
78
79
 
79
- handleKeydown(e) {
80
- if (this.disabled) return;
80
+ handleKeydown(e) {
81
+ if (this.disabled) return;
81
82
 
82
- if (e.key === " " || e.key === "Enter") {
83
- e.preventDefault();
84
- this.handleClick();
83
+ if (e.key === " " || e.key === "Enter") {
84
+ e.preventDefault();
85
+ this.handleClick();
85
86
 
86
- const outer = e.target;
87
+ const outer = e.target;
87
88
 
88
- if (this._hadKeyboardFocus) {
89
- outer.classList.add("focus", "kbd-activate");
89
+ if (this._hadKeyboardFocus) {
90
+ outer.classList.add("focus", "kbd-activate");
90
91
 
91
- setTimeout(() => {
92
- outer.classList.remove("kbd-activate");
93
- }, 150);
92
+ setTimeout(() => {
93
+ outer.classList.remove("kbd-activate");
94
+ }, 150);
95
+ }
94
96
  }
95
97
  }
96
- }
97
98
 
98
99
 
99
100
  handleBlur(e) {
@@ -101,7 +102,7 @@ export class BdCheckbox extends LitElement {
101
102
  const active = this.shadowRoot.activeElement || document.activeElement;
102
103
  if (active !== e.target) {
103
104
  e.target.classList.remove("focus");
104
- }
105
+ }
105
106
  }, 0);
106
107
  }
107
108
 
@@ -1,18 +1,19 @@
1
- import { LitElement, html, css } from 'lit';
1
+ import { LitElement, css, html } from 'lit';
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
 
3
4
  export class BdDividerHorizontal extends LitElement {
4
5
  static properties = {
5
- width: { type: String }, // Noua proprietate
6
+ width: { type: String } // Noua proprietate
6
7
  };
7
8
 
8
- static styles = css`
9
+ static styles = [tokens, css`
9
10
  .hr-line {
10
11
  border: none;
11
12
  border-top: 1px solid var(--color-neutral-200);
12
13
  margin: 0;
13
14
  width: 100%; /* valoare implicită */
14
15
  }
15
- `;
16
+ `];
16
17
 
17
18
  constructor() {
18
19
  super();
@@ -1,4 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import headerCSS from "../header/header.css.js";
3
4
 
4
5
  class Header extends LitElement {
@@ -82,6 +83,6 @@ class Header extends LitElement {
82
83
  }
83
84
  }
84
85
 
85
- Header.styles = [headerCSS];
86
+ Header.styles = [tokens, headerCSS];
86
87
 
87
88
  customElements.define("bd-header", Header);
@@ -1,4 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import highlightCSS from "./highlight.css.js";
3
4
 
4
5
  class BdHighlightSection extends LitElement {
@@ -6,7 +7,7 @@ class BdHighlightSection extends LitElement {
6
7
  highlightText: { type: String, attribute: 'highlight-text' }
7
8
  };
8
9
 
9
- static styles = [highlightCSS];
10
+ static styles = [tokens, highlightCSS];
10
11
 
11
12
  render() {
12
13
  const fullText = this.textContent || "";
@@ -1,9 +1,10 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
2
3
  import carouselCSS from "../light-carousel/light-carousel.css.js";
3
4
 
4
5
  class CustomLightCarousel extends LitElement {
5
6
  static properties = {
6
- title: { type: String },
7
+ title: { type: String }
7
8
  };
8
9
 
9
10
  constructor() {
@@ -77,7 +78,7 @@ class LightCarouselItem extends LitElement {
77
78
  static properties = {
78
79
  title: { type: String },
79
80
  badge: { type: String },
80
- icon: { type: String },
81
+ icon : { type: String }
81
82
  };
82
83
 
83
84
  constructor() {
@@ -87,8 +88,8 @@ class LightCarouselItem extends LitElement {
87
88
  this.icon = "";
88
89
  }
89
90
 
90
- render() {
91
- return html`
91
+ render() {
92
+ return html`
92
93
  <div class="bd-light-box">
93
94
  <div class="bd-light-box-header">
94
95
  ${this.icon
@@ -109,12 +110,12 @@ render() {
109
110
  <slot></slot>
110
111
  </div>
111
112
  `;
112
- }
113
+ }
113
114
 
114
115
 
115
116
  }
116
- CustomLightCarousel.styles = [carouselCSS];
117
- LightCarouselItem.styles = [carouselCSS];
117
+ CustomLightCarousel.styles = [tokens, carouselCSS];
118
+ LightCarouselItem.styles = [tokens, carouselCSS];
118
119
 
119
120
  customElements.define("bd-light-carousel-item", LightCarouselItem);
120
121
 
@@ -1,6 +1,7 @@
1
- import { LitElement, html, css } from "lit";
2
- import paragraphText from "../paragraph/paragraph.css.js";
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
3
  import textCSS from "../../tokens/typography.css.js";
4
+ import paragraphText from "../paragraph/paragraph.css.js";
4
5
 
5
6
  class TextFontBrand extends LitElement {
6
7
  static properties = {
@@ -50,9 +51,9 @@ class TextFontComp extends LitElement {
50
51
  return html` <p class="bd-font-comp">${this.text}</p> `;
51
52
  }
52
53
  }
53
- TextFontBrand.styles = [paragraphText, textCSS];
54
- TextFontCod.styles = [paragraphText, textCSS];
55
- TextFontComp.styles = [paragraphText, textCSS];
54
+ TextFontBrand.styles = [tokens, paragraphText, textCSS];
55
+ TextFontCod.styles = [tokens, paragraphText, textCSS];
56
+ TextFontComp.styles = [tokens, paragraphText, textCSS];
56
57
 
57
58
  customElements.define("bd-font-brand", TextFontBrand);
58
59
  customElements.define("bd-font-cod", TextFontCod);