@repobit/dex-system-design 0.10.0 → 0.12.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/package.json +2 -2
  3. package/src/assets/icons/Identity_protection.png +0 -0
  4. package/src/assets/icons/arrow_down.png +0 -0
  5. package/src/assets/icons/arrow_up.png +0 -0
  6. package/src/assets/icons/device_protection.png +0 -0
  7. package/src/assets/icons/financial_insurance.png +0 -0
  8. package/src/assets/icons/privacy_protection.png +0 -0
  9. package/src/assets/icons/user_guide.png +0 -0
  10. package/src/components/Button/Button.js +19 -16
  11. package/src/components/Button/button.css.js +18 -16
  12. package/src/components/Button/icons.js +8 -8
  13. package/src/components/FAQ/faq.css.js +48 -49
  14. package/src/components/FAQ/faq.js +0 -86
  15. package/src/components/Input/Input.js +68 -6
  16. package/src/components/Input/custom-form.stories.js +88 -0
  17. package/src/components/Input/input-clipboard.css.js +168 -0
  18. package/src/components/Input/input-clipboard.js +137 -0
  19. package/src/components/Input/input.css.js +122 -42
  20. package/src/components/accordion/accordion-bg.css.js +117 -0
  21. package/src/components/accordion/accordion-bg.js +80 -0
  22. package/src/components/accordion/accordion-no-bg.css.js +114 -0
  23. package/src/components/accordion/accordion-no-bg.js +80 -0
  24. package/src/components/accordion/accordion.css.js +88 -0
  25. package/src/components/accordion/accordion.js +81 -0
  26. package/src/components/anchor/anchor-nav.css.js +15 -15
  27. package/src/components/anchor/anchor-nav.js +0 -1
  28. package/src/components/anchor/anchor.stories.js +10 -13
  29. package/src/components/badge/badge.css.js +6 -6
  30. package/src/components/badge/badge.js +1 -2
  31. package/src/components/badge/badge.stories.js +6 -6
  32. package/src/components/carousel/carousel.css.js +60 -60
  33. package/src/components/carousel/carousel.js +26 -30
  34. package/src/components/carousel/carousel.stories.js +55 -55
  35. package/src/components/checkbox/checkbox.css.js +14 -14
  36. package/src/components/divider/divider-horizontal.js +19 -14
  37. package/src/components/divider/divider-vertical.js +23 -14
  38. package/src/components/divider/divider.css.js +19 -0
  39. package/src/components/dropdown/dropdown.css.js +138 -0
  40. package/src/components/dropdown/dropdown.js +111 -0
  41. package/src/components/footer/footer-links-group.css.js +42 -0
  42. package/src/components/footer/footer-links-group.js +25 -0
  43. package/src/components/footer/footer-lp.css.js +625 -0
  44. package/src/components/footer/footer-lp.js +368 -0
  45. package/src/components/footer/footer-lp.stories.js +69 -0
  46. package/src/components/footer/footer-nav-menu.css.js +24 -0
  47. package/src/components/footer/footer-nav-menu.js +36 -0
  48. package/src/components/footer/footer.css.js +625 -0
  49. package/src/components/footer/footer.js +465 -0
  50. package/src/components/footer/footer.stories.js +60 -0
  51. package/src/components/footer/localeMap.js +1 -0
  52. package/src/components/grid/grid.css.js +38 -0
  53. package/src/components/grid/grid.js +55 -0
  54. package/src/components/header/header.css.js +81 -52
  55. package/src/components/header/header.js +19 -19
  56. package/src/components/highlight/highlight.css.js +32 -22
  57. package/src/components/highlight/highlight.js +15 -4
  58. package/src/components/highlight/highlight.stories.js +4 -4
  59. package/src/components/light-carousel/light-carousel-simple.css.js +183 -0
  60. package/src/components/light-carousel/light-carousel-simple.js +73 -0
  61. package/src/components/light-carousel/light-carousel.css.js +50 -31
  62. package/src/components/light-carousel/light-carousel.js +14 -57
  63. package/src/components/light-carousel/light-carousel.stories.js +51 -10
  64. package/src/components/link/link.css.js +41 -0
  65. package/src/components/link/link.js +54 -0
  66. package/src/components/modal/modal.css.js +75 -0
  67. package/src/components/modal/modal.js +41 -0
  68. package/src/components/modal/modal.stories.js +40 -0
  69. package/src/components/paragraph/paragraph.css.js +1 -3
  70. package/src/components/pricing-cards/new-pricing-card.js +30 -0
  71. package/src/components/pricing-cards/new-pricing.css.js +58 -0
  72. package/src/components/pricing-cards/pricing-card-actions.css.js +16 -0
  73. package/src/components/pricing-cards/pricing-card-actions.js +20 -0
  74. package/src/components/pricing-cards/pricing-card-container.css.js +41 -0
  75. package/src/components/pricing-cards/pricing-card-container.js +31 -0
  76. package/src/components/pricing-cards/pricing-card-header.css.js +70 -0
  77. package/src/components/pricing-cards/pricing-card-header.js +46 -0
  78. package/src/components/pricing-cards/pricing-card-pricing.css.js +63 -0
  79. package/src/components/pricing-cards/pricing-card-pricing.js +101 -0
  80. package/src/components/pricing-cards/pricing-card-show-more.css.js +22 -0
  81. package/src/components/pricing-cards/pricing-card-show-more.js +33 -0
  82. package/src/components/pricing-cards/pricing-card.css.js +91 -89
  83. package/src/components/pricing-cards/pricing-card.js +13 -16
  84. package/src/components/pricing-cards/pricing-feature-item.css.js +18 -0
  85. package/src/components/pricing-cards/pricing-feature-item.js +14 -0
  86. package/src/components/radio/radio.css.js +18 -18
  87. package/src/components/radio/radio.js +1 -0
  88. package/src/components/tabs/tabs.css.js +21 -11
  89. package/src/components/tabs/tabs.js +24 -18
  90. package/src/components/termsOfUse/terms.css.js +6 -6
  91. package/src/components/termsOfUse/terms.js +0 -1
  92. package/src/stories/demo.stories.js +271 -0
  93. package/src/tokens/colors.js +10 -10
  94. package/src/tokens/fonts.css +166 -0
  95. package/src/tokens/fonts.stories.js +5 -5
  96. package/src/tokens/layout.css +4 -3
  97. package/src/tokens/new-tokens.css +698 -0
  98. package/src/tokens/spacing.stories.js +1 -1
  99. package/src/tokens/tokens.css +1063 -0
  100. package/src/tokens/tokens.js +0 -133
  101. package/src/tokens/tokens.stories.js +3 -3
  102. package/src/tokens/typography.css.js +0 -4
  103. package/src/tokens/typography.stories.js +2 -2
  104. package/src/components/Input/index.js +0 -0
  105. package/src/components/highlight/highlight-s.css.js +0 -88
  106. package/src/components/highlight/highlight-s.js +0 -35
  107. package/src/components/highlight/highlight-s.stories.js +0 -22
@@ -0,0 +1,80 @@
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import accordionCSS from "./accordion-bg.css";
4
+
5
+ class BdAccordionBg extends LitElement {
6
+ static properties = {
7
+ title: { type: String }
8
+ };
9
+
10
+ static styles = [tokens, accordionCSS];
11
+
12
+ render() {
13
+ return html`
14
+ <div class="bd-accordion-bg-container">
15
+ <div class="bd-accordion-bg-header">
16
+ <h1 class="bd-accordion-bg-title">${this.title}</h1>
17
+ </div>
18
+ <slot></slot>
19
+ </div>
20
+ `;
21
+ }
22
+ }
23
+
24
+ class BdAccordionBgItem extends LitElement {
25
+ static properties = {
26
+ title: { type: String },
27
+ open : { type: Boolean, reflect: true }
28
+ };
29
+
30
+ constructor() {
31
+ super();
32
+ this.title = "";
33
+ this.open = false;
34
+ this.id = `accordion-${Math.random().toString(36)
35
+ .substr(2, 9)}`;
36
+ }
37
+
38
+ static styles = [tokens, accordionCSS];
39
+
40
+ toggleItem() {
41
+ this.open = !this.open;
42
+ }
43
+
44
+ handleKeyDown(event) {
45
+ if (event.key === "Enter" || event.key === " ") {
46
+ event.preventDefault();
47
+ this.toggleItem();
48
+ }
49
+ }
50
+
51
+ render() {
52
+ return html`
53
+ <div
54
+ class="bd-accordion-bg-item ${this.open ? "open" : ""}"
55
+ role="button"
56
+ aria-expanded="${this.open}"
57
+ aria-controls="${this.id}"
58
+ tabindex="0"
59
+ @click=${this.toggleItem}
60
+ @keydown=${this.handleKeyDown}
61
+ >
62
+ <div class="bd-accordion-bg-question">
63
+ <span class="bd-accordion-bg-icon">${this.open ? "−" : "+"}</span>
64
+ <span class="bd-accordion-bg-question-text">${this.title}</span>
65
+ </div>
66
+ <div
67
+ id="${this.id}"
68
+ class="bd-accordion-bg-answer"
69
+ role="region"
70
+ aria-labelledby="${this.id}"
71
+ >
72
+ <slot></slot>
73
+ </div>
74
+ </div>
75
+ `;
76
+ }
77
+ }
78
+
79
+ customElements.define("bd-accordion-bg", BdAccordionBg);
80
+ customElements.define("bd-accordion-bg-item", BdAccordionBgItem);
@@ -0,0 +1,114 @@
1
+ import { css } from "lit";
2
+
3
+ export default css`
4
+ :host {
5
+ --background-card-grey: var(--color-neutral-25);
6
+ --border-card-grey: var(--color-neutral-50);
7
+ --border-card-green: var(--color-green-700);
8
+ --badge-background: var(--color-blue-500);
9
+ --text-color-white: var(--color-neutral-0);
10
+ --bd-accesibility-focus: var(--color-blue-500);
11
+ display: block;
12
+ }
13
+
14
+ .bd-accordion-bg-item {
15
+ margin-bottom: var(--spacing-16);
16
+ border-radius: var(--spacing-8);
17
+ overflow: hidden;
18
+ transition: box-shadow 0.3s ease;
19
+ }
20
+
21
+ .bd-accordion-bg-item:hover {
22
+ .bd-accordion-bg-question-text {
23
+ text-decoration-line: underline;
24
+ }
25
+ }
26
+
27
+ .bd-accordion-bg-question {
28
+ cursor: pointer;
29
+ display: flex;
30
+ justify-content: flex-start;
31
+ align-items: center;
32
+ gap: var(--spacing-10);
33
+ padding: var(--spacing-16);
34
+ font-weight: bold;
35
+ color: #333;
36
+ transition: background-color 0.3s ease, color 0.3s ease;
37
+ }
38
+
39
+ .bd-accordion-bg-header {
40
+ margin-bottom: var(--spacing-32);
41
+ }
42
+
43
+ .bd-accordion-bg-question:hover {
44
+ color: #0073e6;
45
+ }
46
+
47
+ .bd-accordion-bg-item:focus-visible {
48
+ outline: var(--spacing-2) solid var(--bd-accesibility-focus);
49
+ outline-offset: var(--spacing-2);
50
+ border-radius: var(--space-2xs);
51
+ }
52
+
53
+ .bd-accordion-bg-item:focus {
54
+ .bd-accordion-bg-question-text {
55
+ font-weight: 600;
56
+ text-decoration-line: underline;
57
+ color: var(--color-blue-600);
58
+ text-decoration-thickness: var(--spacing-2);
59
+ }
60
+ }
61
+
62
+ .bd-accordion-bg-question-text {
63
+ font-family: var(--typography-fontFamily-sans);
64
+ font-weight: var(--typography-fontWeight-semibold);
65
+ }
66
+
67
+ .bd-accordion-bg-title {
68
+ font-family: var(--typography-fontFamily-sans);
69
+ font-weight: var(--typography-fontWeight-semibold);
70
+ margin-left: auto;
71
+ margin-right: auto;
72
+ text-align: center;
73
+ }
74
+
75
+ .bd-accordion-bg-icon {
76
+ transition: transform 0.3s ease;
77
+ width: var(--spacing-14);
78
+ height: var(--spacing-14);
79
+ color: var(--color-blue-500);
80
+ text-align: center;
81
+ position: relative;
82
+ bottom: 1px;
83
+ }
84
+
85
+ .bd-accordion-bg-answer {
86
+ overflow: hidden;
87
+ max-height: 0;
88
+ opacity: 0;
89
+ padding: 0 15px;
90
+ font-family: var(--typography-fontFamily-sans);
91
+ font-weight: var(--font-weight-sans-medium);
92
+ }
93
+
94
+ .bd-accordion-bg-item.open .bd-accordion-bg-answer {
95
+ max-height: 1000px;
96
+ opacity: 1;
97
+ padding: var(--spacing-0) var(--spacing-40);
98
+ }
99
+
100
+ .bd-accordion-bg-answer > div {
101
+ overflow: hidden;
102
+ }
103
+
104
+ .bd-accordion-bg-container {
105
+ width: 90%;
106
+ margin: auto;
107
+ padding-top: var(--spacing-64);
108
+ padding-bottom: var(--spacing-64);
109
+ }
110
+
111
+ .bd-accordion-bg-link-noline {
112
+ text-decoration: none;
113
+ }
114
+ `;
@@ -0,0 +1,80 @@
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import accordionCSS from "./accordion-no-bg.css";
4
+
5
+ class BdAccordionNoBg extends LitElement {
6
+ static properties = {
7
+ title: { type: String }
8
+ };
9
+
10
+ static styles = [tokens, accordionCSS];
11
+
12
+ render() {
13
+ return html`
14
+ <div class="bd-accordion-bg-container">
15
+ <div class="bd-accordion-bg-header">
16
+ <h1 class="bd-accordion-bg-title">${this.title}</h1>
17
+ </div>
18
+ <slot></slot>
19
+ </div>
20
+ `;
21
+ }
22
+ }
23
+
24
+ class BdAccordionNoBgItem extends LitElement {
25
+ static properties = {
26
+ title: { type: String },
27
+ open : { type: Boolean, reflect: true }
28
+ };
29
+
30
+ constructor() {
31
+ super();
32
+ this.title = "";
33
+ this.open = false;
34
+ this.id = `accordion-${Math.random().toString(36)
35
+ .substr(2, 9)}`;
36
+ }
37
+
38
+ static styles = [tokens, accordionCSS];
39
+
40
+ toggleItem() {
41
+ this.open = !this.open;
42
+ }
43
+
44
+ handleKeyDown(event) {
45
+ if (event.key === "Enter" || event.key === " ") {
46
+ event.preventDefault();
47
+ this.toggleItem();
48
+ }
49
+ }
50
+
51
+ render() {
52
+ return html`
53
+ <div
54
+ class="bd-accordion-bg-item ${this.open ? "open" : ""}"
55
+ role="button"
56
+ aria-expanded="${this.open}"
57
+ aria-controls="${this.id}"
58
+ tabindex="0"
59
+ @click=${this.toggleItem}
60
+ @keydown=${this.handleKeyDown}
61
+ >
62
+ <div class="bd-accordion-bg-question">
63
+ <span class="bd-accordion-bg-icon">${this.open ? "−" : "+"}</span>
64
+ <span class="bd-accordion-bg-question-text">${this.title}</span>
65
+ </div>
66
+ <div
67
+ id="${this.id}"
68
+ class="bd-accordion-bg-answer"
69
+ role="region"
70
+ aria-labelledby="${this.id}"
71
+ >
72
+ <slot></slot>
73
+ </div>
74
+ </div>
75
+ `;
76
+ }
77
+ }
78
+
79
+ customElements.define("bd-accordion-no-bg", BdAccordionNoBg);
80
+ customElements.define("bd-accordion-no-bg-item", BdAccordionNoBgItem);
@@ -0,0 +1,88 @@
1
+ import { css } from "lit";
2
+
3
+ export const accordionItem = css`
4
+ :host {
5
+ display: block;
6
+ margin-bottom: var(--spacing-8);
7
+ }
8
+
9
+ .header {
10
+ display: flex;
11
+ align-items: center;
12
+ cursor: pointer;
13
+ color: var(--color-blue-600);
14
+ font-family: var(--typography-fontFamily-sans);
15
+ font-weight: var(--typography-fontWeight-bold);
16
+ font-size: var(--typography-label-small-fontSize);
17
+ margin-bottom: var(--spacing-8);
18
+ }
19
+
20
+ .toggle {
21
+ font-size: 1.25rem;
22
+ margin-right: 0.5rem;
23
+ width: 1.25rem;
24
+ text-align: center;
25
+ user-select: none;
26
+ }
27
+
28
+ .title {
29
+ flex: 1;
30
+ }
31
+
32
+ .content {
33
+ padding-left: 1.75rem;
34
+ display: none;
35
+ font-size: var(--typography-label-small-fontSize);
36
+ font-family: var(--typography-fontFamily-sans);
37
+ }
38
+
39
+ :host([open]) .content {
40
+ display: block;
41
+ }
42
+ ::slotted(p) {
43
+ margin-bottom: var(--spacing-16);
44
+ font-size: var(--typography-label-small-fontSize);
45
+ font-family: var(--typography-fontFamily-sans);
46
+ margin-top: 0px;
47
+ }
48
+ `;
49
+
50
+ export const accordionSection = css`
51
+ :host {
52
+ display: block;
53
+ background-color: var(--color-neutral-25);
54
+ padding: var(--spacing-32);
55
+ }
56
+
57
+ .section-title {
58
+ margin-bottom: var(--spacing-32);
59
+ margin-top: var(--spacing-0);
60
+ font-weight: 600;
61
+ font-family: var(--typography-fontFamily-sans);
62
+ font-weight: var(--typography-fontWeight-bold);
63
+ font-size: var(--typography-body-regular-fontSize);
64
+ }
65
+ .user-guide-link {
66
+ margin-top: 16px;
67
+ font-family: Arial, sans-serif;
68
+ font-size: 12px;
69
+ color: var(--color-blue-600);
70
+ margin-left: 5px;
71
+ }
72
+
73
+ .user-guide-link a {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ text-decoration: none;
77
+ color: inherit;
78
+ gap: 6px;
79
+ }
80
+
81
+ .user-guide-link .icon img {
82
+ display: block;
83
+ width: 16px;
84
+ height: 14px;
85
+ object-fit: contain;
86
+ }
87
+ `;
88
+
@@ -0,0 +1,81 @@
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import { accordionItem, accordionSection } from "./accordion.css.js";
4
+
5
+ export class BdAccordionItem extends LitElement {
6
+ static styles = [tokens, accordionItem];
7
+
8
+ static properties = {
9
+ open : { type: Boolean, reflect: true },
10
+ title: { type: String }
11
+ };
12
+
13
+ constructor() {
14
+ super();
15
+ this.open = false;
16
+ }
17
+
18
+ toggle() {
19
+ this.open = !this.open;
20
+ }
21
+
22
+ render() {
23
+ return html`
24
+ <div class="header" @click=${this.toggle}>
25
+ <div class="toggle">${this.open ? "−" : "+"}</div>
26
+ <div class="title">${this.title}</div>
27
+ </div>
28
+ <div class="content">
29
+ <slot></slot>
30
+ </div>
31
+ `;
32
+ }
33
+ }
34
+
35
+ export class BdAccordionSection extends LitElement {
36
+ static styles = accordionSection;
37
+
38
+ static properties = {
39
+ title : { type: String },
40
+ guideIcon : { type: String, reflect: true, attribute: "guide-icon" },
41
+ guideLabel: { type: String, reflect: true, attribute: "guide-label" },
42
+ guideHref : { type: String, reflect: true, attribute: "guide-href" }
43
+ };
44
+
45
+ constructor() {
46
+ super();
47
+ this.title = "";
48
+ this.guideIcon =
49
+ "/assets/user_guide.png";
50
+ this.guideLabel = "";
51
+ this.guideHref = "#";
52
+ }
53
+
54
+
55
+
56
+
57
+ render() {
58
+ return html`
59
+ ${this.title
60
+ ? html`<h2 class="section-title">
61
+ ${this.title}
62
+ </h2>`
63
+ : ""}
64
+ <slot></slot>
65
+ ${this.guideLabel
66
+ ? html`<p class="user-guide-link">
67
+ <a href=${this.guideHref}>
68
+ ${this.guideIcon
69
+ ? html`<span class="icon"><img src=${this.guideIcon} alt="" /></span>`
70
+ : ""}
71
+ ${this.guideLabel}
72
+ </a>
73
+ </p>`
74
+ : ""}
75
+ `;
76
+ }
77
+
78
+ }
79
+
80
+ customElements.define("bd-accordion-item", BdAccordionItem);
81
+ customElements.define("bd-accordion-section", BdAccordionSection);
@@ -2,8 +2,8 @@ import { css } from "lit";
2
2
 
3
3
  export const anchorNavStyles = css`
4
4
  :host {
5
- padding: var(--size-0) 15em;
6
- margin: var(--size-0) auto;
5
+ padding: var(--spacing-0) 15em;
6
+ margin: var(--spacing-0) auto;
7
7
  --bd-accesibility-focus: var(--color-blue-500);
8
8
  }
9
9
 
@@ -14,13 +14,12 @@ export const anchorNavStyles = css`
14
14
  }
15
15
 
16
16
  a:focus-visible {
17
- outline: var(--size-2) solid var(--bd-accesibility-focus);
18
- outline-offset: var(--size-2);
17
+ outline: var(--spacing-2) solid var(--bd-accesibility-focus);
18
+ outline-offset: var(--spacing-2);
19
19
  border-radius: var(--space-2xs);
20
20
  }
21
21
 
22
22
  nav {
23
- position: -webkit-sticky;
24
23
  position: sticky;
25
24
  top: 0;
26
25
  z-index: 1000;
@@ -30,25 +29,26 @@ nav {
30
29
  align-items: center;
31
30
  border-top: 1px solid #f0f0f0;
32
31
  border-bottom: 1px solid #f0f0f0;
33
- padding: var(--size-10) 15em;
32
+ padding: var(--spacing-10) 15em;
34
33
  width: 100%;
35
34
  box-sizing: border-box;
36
35
  background: white;
36
+ margin-bottom: var(--spacing-64);
37
37
  }
38
38
 
39
39
  .bd-container {
40
- padding: 50px; /* Adăugăm o umplutură suplimentară pentru a putea vedea mai clar efectul */
40
+ padding: 50px;
41
41
  }
42
42
 
43
43
 
44
44
  [id$="-section"] {
45
- scroll-margin-top: 120px; /* Ajustează această valoare dacă este necesar */
45
+ scroll-margin-top: 120px;
46
46
  }
47
47
 
48
48
  .anchor-links {
49
49
  position: relative;
50
50
  display: flex;
51
- gap: var(--size-32);
51
+ gap: var(--spacing-32);
52
52
  }
53
53
 
54
54
  a {
@@ -56,16 +56,16 @@ a {
56
56
  text-decoration: none;
57
57
  color: black;
58
58
  font-weight: 600;
59
- padding: var(--size-10) var(--size-0);
59
+ padding: var(--spacing-10) var(--spacing-0);
60
60
  display: inline-block;
61
- font-size: 16px !important;
62
- font-family: var(--font-family-sans) !important;
61
+ font-size: var(--typography-body-regular-fontSize) !important;
62
+ font-family: var(--typography-fontFamily-sans) !important;
63
63
  }
64
64
 
65
65
  a::after {
66
66
  content: "";
67
67
  position: absolute;
68
- left: var(--size-0);
68
+ left: var(--spacing-0);
69
69
  bottom: -14px;
70
70
  width: 0%;
71
71
  height: 3px;
@@ -86,7 +86,7 @@ export const anchorNavItemStyles = css`
86
86
 
87
87
  :host([active]) {
88
88
  display: block;
89
- padding: var(--size-0) 15em;
90
- margin: var(--size-0) auto;
89
+ padding: var(--spacing-0) 15em;
90
+ margin: var(--spacing-0) auto;
91
91
  }
92
92
  `;
@@ -2,7 +2,6 @@ import { LitElement, html } from "lit";
2
2
  import { tokens } from "../../tokens/tokens.js";
3
3
  import { anchorNavStyles } from "./anchor-nav.css.js";
4
4
 
5
- // BdAnchorNavItem
6
5
  class BdAnchorNavItem extends HTMLElement {
7
6
  constructor() {
8
7
  super();
@@ -1,13 +1,13 @@
1
1
  import { html } from 'lit';
2
+ import '../FAQ/faq.js';
2
3
  import '../anchor/anchor-nav.js';
4
+ import '../carousel/carousel.js';
3
5
  import '../pricing-cards/pricing-card.js';
4
6
  import '../tabs/tabs.js';
5
- import '../FAQ/faq.js';
6
- import '../carousel/carousel.js';
7
7
 
8
8
  export default {
9
- title: 'Navigation/Navbar',
10
- component: 'bd-anchor-nav',
9
+ title : 'Navigation/Navbar',
10
+ component : 'bd-anchor-nav',
11
11
  parameters: {
12
12
  docs: {
13
13
  description: {
@@ -49,13 +49,13 @@ Folosește elemente \`<bd-anchor-nav-item>\` pentru fiecare link, ce trebuie să
49
49
  - \`bd-pricing-container\`
50
50
 
51
51
  ---
52
- `,
53
- },
54
- },
55
- },
52
+ `
53
+ }
54
+ }
55
+ }
56
56
  };
57
57
 
58
- const Template = (args) => html`
58
+ const Template = () => html`
59
59
  <bd-anchor-nav>
60
60
  <bd-anchor-nav-item title="Anchor 1" id="anchor-1"></bd-anchor-nav-item>
61
61
  <bd-anchor-nav-item title="Anchor 2" id="anchor-2"></bd-anchor-nav-item>
@@ -101,7 +101,7 @@ const Template = (args) => html`
101
101
  title="Scam Copilot Bot"
102
102
  subTitle="Specialized AI chatbot that helps you identify suspicious online interactions so you don’t become a victim"
103
103
  modalText="Specialized AI chatbot that helps you identify suspicious online interactions so you don’t become a victim"
104
- icon="src/assets/icons/light-carousel-img1.png"
104
+ icon="/assets/light-carousel-img1.png"
105
105
  >
106
106
  <h3>Scam Copilot Bot</h3>
107
107
  <p>
@@ -118,9 +118,6 @@ const Template = (args) => html`
118
118
  </p>
119
119
  <h6>Testare Scam Copilot</h6>
120
120
  </bd-carousel-item>
121
-
122
- <!-- alte bd-carousel-item-uri identic cu cele din codul tău -->
123
-
124
121
  </bd-carousel-section>
125
122
  </section>
126
123
 
@@ -4,24 +4,24 @@ export default css`
4
4
  :host {
5
5
  --badge-background-default: #026DFF;
6
6
  --badge-font-weight: 700;
7
- --badge-font-family: var(--font-family-sans, sans-serif);
7
+ --badge-font-family: var(--typography-fontFamily-sans, sans-serif);
8
8
  }
9
9
 
10
10
  .badge {
11
11
  display: inline-block;
12
12
  background-color: var(--color-blue-500);
13
13
  color: var(--color-neutral-0);
14
- border-radius: var(--size-20);
15
- font-size: var(--caption-small);
14
+ border-radius: var(--spacing-20);
15
+ font-size: var(--typography-label-extra-small-fontSize);
16
16
  font-weight: var(--badge-font-weight);
17
17
  font-family: var(--badge-font-family);
18
- line-height: var(--size-20);
19
- padding: 0 var(--size-12);
18
+ line-height: var(--spacing-20);
19
+ padding: 0 var(--spacing-12);
20
20
  white-space: nowrap;
21
21
  user-select: none;
22
22
  vertical-align: middle;
23
23
  box-sizing: border-box;
24
- bottom: var(--size-4);
24
+ bottom: var(--spacing-4);
25
25
  position: relative
26
26
  }
27
27
  `;
@@ -4,7 +4,6 @@ import badgeCSS from './badge.css.js';
4
4
 
5
5
  export class BdBadge extends LitElement {
6
6
  static properties = {
7
- text : { type: String },
8
7
  color: { type: String }
9
8
  };
10
9
 
@@ -23,7 +22,7 @@ export class BdBadge extends LitElement {
23
22
  }
24
23
 
25
24
  render() {
26
- return html`<span class="badge">${this.text}</span>`;
25
+ return html`<span class="badge"><slot></slot></span>`;
27
26
  }
28
27
  }
29
28
  BdBadge.styles = [tokens, badgeCSS];
@@ -5,9 +5,9 @@ export default {
5
5
  title: 'Atoms/Badge',
6
6
  component: 'bd-badge',
7
7
  argTypes: {
8
- text: {
8
+ children: {
9
9
  control: 'text',
10
- description: 'Textul afișat în badge',
10
+ description: 'Conținutul afișat în interiorul badge-ului (prin slot).',
11
11
  defaultValue: 'Badge',
12
12
  },
13
13
  color: {
@@ -19,18 +19,18 @@ export default {
19
19
  parameters: {
20
20
  docs: {
21
21
  description: {
22
- component: 'Un badge simplu care afișează un text cu o culoare de fundal configurabilă.',
22
+ component: 'Un badge simplu care afișează un text prin slot și are o culoare de fundal configurabilă.',
23
23
  },
24
24
  },
25
25
  },
26
26
  };
27
27
 
28
- const Template = ({ text, color }) => html`
29
- <bd-badge text="${text}" color="${color}"></bd-badge>
28
+ const Template = ({ children, color }) => html`
29
+ <bd-badge color="${color}">${children}</bd-badge>
30
30
  `;
31
31
 
32
32
  export const Default = Template.bind({});
33
33
  Default.args = {
34
- text: 'Badge',
34
+ children: 'Badge',
35
35
  color: '#026DFF',
36
36
  };