@repobit/dex-system-design 0.20.0 → 0.21.1

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 (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +7 -2
  3. package/src/components/Button/button.stories.js +51 -51
  4. package/src/components/accordion/accordion-bg.css.js +141 -123
  5. package/src/components/accordion/accordion-bg.stories.js +102 -72
  6. package/src/components/accordion/accordion-light.stories.js +78 -53
  7. package/src/components/anchor/anchor.stories.js +24 -22
  8. package/src/components/back/back.css.js +56 -0
  9. package/src/components/back/back.js +39 -0
  10. package/src/components/back/back.stories.js +184 -0
  11. package/src/components/badge/badge.stories.js +3 -10
  12. package/src/components/breadcrumb/breadcrumb.css.js +98 -0
  13. package/src/components/breadcrumb/breadcrumb.js +136 -0
  14. package/src/components/breadcrumb/breadcrumb.stories.js +109 -0
  15. package/src/components/cards/card.js +2 -1
  16. package/src/components/cards/card.stories.js +49 -49
  17. package/src/components/carousel/carousel.css.js +8 -1
  18. package/src/components/carousel/carousel.js +0 -1
  19. package/src/components/carousel/carousel.stories.js +21 -17
  20. package/src/components/display/display.css.js +68 -0
  21. package/src/components/display/display.js +26 -0
  22. package/src/components/display/display.stories.js +339 -0
  23. package/src/components/divider/divider-horizontal.js +1 -1
  24. package/src/components/footer/footer-links-group.js +3 -3
  25. package/src/components/footer/footer-lp.stories.js +0 -1
  26. package/src/components/footer/footer.css.js +0 -6
  27. package/src/components/footer/footer.js +21 -41
  28. package/src/components/footer/footer.stories.js +0 -1
  29. package/src/components/header/header.js +11 -11
  30. package/src/components/header/header.stories.js +36 -4
  31. package/src/components/heading/heading.css.js +79 -0
  32. package/src/components/heading/heading.js +79 -0
  33. package/src/components/heading/heading.stories.js +260 -0
  34. package/src/components/highlight/highlight.stories.js +1 -1
  35. package/src/components/image/image.css.js +101 -0
  36. package/src/components/image/image.js +57 -0
  37. package/src/components/image/image.stories.js +245 -0
  38. package/src/components/light-carousel/light-carousel-simple.js +3 -2
  39. package/src/components/light-carousel/light-carousel.js +3 -7
  40. package/src/components/light-carousel/light-carousel.stories.js +12 -13
  41. package/src/components/link/link.css.js +107 -18
  42. package/src/components/link/link.js +16 -12
  43. package/src/components/link/link.stories.js +177 -0
  44. package/src/components/list/list-item/list-item.css.js +106 -0
  45. package/src/components/list/list-item/list-item.js +43 -0
  46. package/src/components/list/list-item/list-item.stories.js +79 -0
  47. package/src/components/list/list.css.js +175 -0
  48. package/src/components/list/list.js +44 -0
  49. package/src/components/modal/modal.js +6 -5
  50. package/src/components/paragraph/paragraph.css.js +41 -11
  51. package/src/components/paragraph/paragraph.js +7 -45
  52. package/src/components/paragraph/paragraph.stories.js +235 -0
  53. package/src/components/picture/picture.css.js +0 -0
  54. package/src/components/picture/picture.js +46 -0
  55. package/src/components/picture/picture.stories.js +275 -0
  56. package/src/components/pricing-cards/pricing-card-header.js +9 -7
  57. package/src/components/pricing-cards/pricing-card-pricing.js +11 -12
  58. package/src/components/pricing-cards/pricing-card.js +37 -36
  59. package/src/components/tabs/tabs.js +44 -47
  60. package/src/components/termsOfUse/terms.js +77 -161
  61. package/src/components/termsOfUse/terms.stories.js +4 -3
  62. package/src/stories/Header.js +6 -6
  63. package/src/tokens/tokens.stories.js +9 -8
@@ -0,0 +1,339 @@
1
+ import { html } from 'lit';
2
+ import '../heading/heading.js';
3
+ import '../paragraph/paragraph.js';
4
+ import './display.js';
5
+
6
+ export default {
7
+ title : 'Atoms/Display',
8
+ component: 'bd-display',
9
+ argTypes : {
10
+ kind: {
11
+ control : { type: 'select' },
12
+ options : ['sm', 'md', 'lg', 'xl', '2xl', '3xl'],
13
+ description: 'Display size variant'
14
+ },
15
+ content: {
16
+ control : 'text',
17
+ description: 'Display text content'
18
+ }
19
+ },
20
+ parameters: {
21
+ docs: {
22
+ description: {
23
+ component: 'Large display typography for hero sections, landing pages, and prominent headlines.'
24
+ }
25
+ }
26
+ }
27
+ };
28
+
29
+ const Template = ({ kind, content }) => html`
30
+ <bd-display kind="${kind}">${content}</bd-display>
31
+ `;
32
+
33
+ export const AllDisplaySizes = () => html`
34
+ <div style="display: flex; flex-direction: column; gap: 3rem; max-width: 1200px; margin: 0 auto;">
35
+ <div style="border-bottom: 2px solid #e2e8f0; padding-bottom: 2rem;">
36
+ <bd-display kind="3xl">Display 3XL - Largest Hero Text</bd-display>
37
+ <bd-p kind="small" style="margin-top: 1rem;">
38
+ Font size: var(--typography-display-3xl-fontSize)<br>
39
+ Perfect for main hero sections on landing pages
40
+ </bd-p>
41
+ </div>
42
+
43
+ <div style="border-bottom: 2px solid #e2e8f0; padding-bottom: 2rem;">
44
+ <bd-display kind="2xl">Display 2XL - Major Headlines</bd-display>
45
+ <bd-p kind="small" style="margin-top: 1rem;">
46
+ Font size: var(--typography-display-2xl-fontSize)<br>
47
+ Ideal for primary section titles and important announcements
48
+ </bd-p>
49
+ </div>
50
+
51
+ <div style="border-bottom: 2px solid #e2e8f0; padding-bottom: 2rem;">
52
+ <bd-display kind="xl">Display XL - Prominent Headers</bd-display>
53
+ <bd-p kind="small" style="margin-top: 1rem;">
54
+ Font size: var(--typography-display-xl-fontSize)<br>
55
+ Great for feature highlights and key value propositions
56
+ </bd-p>
57
+ </div>
58
+
59
+ <div style="border-bottom: 2px solid #e2e8f0; padding-bottom: 2rem;">
60
+ <bd-display kind="lg">Display LG - Standard Display</bd-display>
61
+ <bd-p kind="small" style="margin-top: 1rem;">
62
+ Font size: var(--typography-display-lg-fontSize)<br>
63
+ Balanced display size for most prominent text needs
64
+ </bd-p>
65
+ </div>
66
+
67
+ <div style="border-bottom: 2px solid #e2e8f0; padding-bottom: 2rem;">
68
+ <bd-display kind="md">Display MD - Compact Display</bd-display>
69
+ <bd-p kind="small" style="margin-top: 1rem;">
70
+ Font size: var(--typography-display-md-fontSize)<br>
71
+ Smaller display for sections with less space
72
+ </bd-p>
73
+ </div>
74
+
75
+ <div>
76
+ <bd-display kind="sm">Display SM - Minimal Display</bd-display>
77
+ <bd-p kind="small" style="margin-top: 1rem;">
78
+ Font size: var(--typography-display-sm-fontSize)<br>
79
+ Smallest display size, still larger than regular headings
80
+ </bd-p>
81
+ </div>
82
+ </div>
83
+ `;
84
+ AllDisplaySizes.parameters = {
85
+ docs: {
86
+ description: {
87
+ story: 'All display size variants from 3XL (largest) to SM (smallest) for comparison.'
88
+ }
89
+ }
90
+ };
91
+
92
+ export const Display3XL = Template.bind({});
93
+ Display3XL.args = {
94
+ kind : '3xl',
95
+ content: 'Transform Your Digital Security'
96
+ };
97
+ Display3XL.parameters = {
98
+ docs: {
99
+ description: {
100
+ story: 'Largest display size for main hero sections and primary landing page headlines.'
101
+ }
102
+ }
103
+ };
104
+
105
+ export const Display2XL = Template.bind({});
106
+ Display2XL.args = {
107
+ kind : '2xl',
108
+ content: 'Enterprise-Grade Protection'
109
+ };
110
+ Display2XL.parameters = {
111
+ docs: {
112
+ description: {
113
+ story: 'Extra large display for major section titles and important feature announcements.'
114
+ }
115
+ }
116
+ };
117
+
118
+ export const DisplayXL = Template.bind({});
119
+ DisplayXL.args = {
120
+ kind : 'xl',
121
+ content: 'Advanced Threat Intelligence'
122
+ };
123
+ DisplayXL.parameters = {
124
+ docs: {
125
+ description: {
126
+ story: 'Large display size for prominent headers and key value propositions.'
127
+ }
128
+ }
129
+ };
130
+
131
+ export const DisplayLG = Template.bind({});
132
+ DisplayLG.args = {
133
+ kind : 'lg',
134
+ content: 'Real-Time Malware Detection'
135
+ };
136
+ DisplayLG.parameters = {
137
+ docs: {
138
+ description: {
139
+ story: 'Standard display size for balanced prominence and readability.'
140
+ }
141
+ }
142
+ };
143
+
144
+ export const DisplayMD = Template.bind({});
145
+ DisplayMD.args = {
146
+ kind : 'md',
147
+ content: 'Multi-Platform Security'
148
+ };
149
+ DisplayMD.parameters = {
150
+ docs: {
151
+ description: {
152
+ story: 'Medium display size for sections with limited space but still needing impact.'
153
+ }
154
+ }
155
+ };
156
+
157
+ export const DisplaySM = Template.bind({});
158
+ DisplaySM.args = {
159
+ kind : 'sm',
160
+ content: 'Privacy First Approach'
161
+ };
162
+ DisplaySM.parameters = {
163
+ docs: {
164
+ description: {
165
+ story: 'Smallest display size, ideal for compact hero sections or prominent card titles.'
166
+ }
167
+ }
168
+ };
169
+
170
+
171
+ export const ComparisonWithHeadings = () => html`
172
+ <div style="max-width: 800px; margin: 0 auto;">
173
+ <bd-display kind="xl" style="margin-bottom: 3rem;">Display XL vs Headings</bd-display>
174
+
175
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;">
176
+ <div>
177
+ <bd-h as="h3" style="margin-bottom: 1rem;">Display Typography</bd-h>
178
+ <bd-display kind="sm" style="margin-bottom: 1rem;">Display SM Text</bd-display>
179
+ <bd-display kind="md" style="margin-bottom: 1rem;">Display MD Text</bd-display>
180
+ <bd-display kind="lg" style="margin-bottom: 1rem;">Display LG Text</bd-display>
181
+ <bd-display kind="xl">Display XL Text</bd-display>
182
+ </div>
183
+
184
+ <div>
185
+ <bd-h as="h3" style="margin-bottom: 1rem;">Heading Typography</bd-h>
186
+ <bd-h as="h6" style="margin-bottom: 1rem;">Heading H6 Text</bd-h>
187
+ <bd-h as="h5" style="margin-bottom: 1rem;">Heading H5 Text</bd-h>
188
+ <bd-h as="h4" style="margin-bottom: 1rem;">Heading H4 Text</bd-h>
189
+ <bd-h as="h3">Heading H3 Text</bd-h>
190
+ </div>
191
+ </div>
192
+
193
+ <bd-p kind="regular" style="margin-top: 2rem;">
194
+ <strong>Usage guidelines:</strong> Display typography is for prominent, attention-grabbing text
195
+ while headings are for semantic document structure and section titles.
196
+ </bd-p>
197
+ </div>
198
+ `;
199
+ ComparisonWithHeadings.parameters = {
200
+ docs: {
201
+ description: {
202
+ story: 'Comparison between display typography and heading typography to demonstrate their different use cases and visual hierarchy.'
203
+ }
204
+ }
205
+ };
206
+
207
+ export const LandingPageExample = () => html`
208
+ <div style="max-width: 1400px; margin: 0 auto;">
209
+ <!-- Hero Section -->
210
+ <section style="text-align: center; padding: 4rem 2rem; background: #f8fafc;">
211
+ <bd-display kind="2xl" style="margin-bottom: 1rem;">
212
+ Complete Digital Protection
213
+ </bd-display>
214
+ <bd-display kind="lg" style="margin-bottom: 2rem; color: #3b82f6;">
215
+ For Home & Business
216
+ </bd-display>
217
+ <bd-p kind="lead" style="max-width: 600px; margin: 0 auto;">
218
+ Enterprise-grade security solutions tailored for modern threats and evolving digital landscapes.
219
+ </bd-p>
220
+ </section>
221
+
222
+ <!-- Features Section -->
223
+ <section style="padding: 4rem 2rem;">
224
+ <bd-display kind="xl" style="text-align: center; margin-bottom: 3rem;">
225
+ Why Choose Our Solution?
226
+ </bd-display>
227
+
228
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;">
229
+ <div style="text-align: center;">
230
+ <bd-display kind="lg" style="color: #3b82f6; margin-bottom: 1rem;">99.9%</bd-display>
231
+ <bd-h as="h4" style="margin-bottom: 1rem;">Threat Detection Rate</bd-h>
232
+ <bd-p kind="regular">Industry-leading accuracy in identifying and neutralizing cyber threats.</bd-p>
233
+ </div>
234
+
235
+ <div style="text-align: center;">
236
+ <bd-display kind="lg" style="color: #3b82f6; margin-bottom: 1rem;">24/7</bd-display>
237
+ <bd-h as="h4" style="margin-bottom: 1rem;">Real-Time Monitoring</bd-h>
238
+ <bd-p kind="regular">Continuous protection with instant response to emerging threats.</bd-p>
239
+ </div>
240
+
241
+ <div style="text-align: center;">
242
+ <bd-display kind="lg" style="color: #3b82f6; margin-bottom: 1rem;">50M+</bd-display>
243
+ <bd-h as="h4" style="margin-bottom: 1rem;">Protected Users</bd-h>
244
+ <bd-p kind="regular">Trusted by millions worldwide for their digital security needs.</bd-p>
245
+ </div>
246
+ </div>
247
+ </section>
248
+ </div>
249
+ `;
250
+ LandingPageExample.parameters = {
251
+ docs: {
252
+ description: {
253
+ story: 'Complete landing page example showing display typography in context with hero sections and feature highlights.'
254
+ }
255
+ }
256
+ };
257
+
258
+ export const ResponsiveDisplay = () => html`
259
+ <div style="max-width: 100%; padding: 2rem;">
260
+ <bd-h as="h2" style="margin-bottom: 2rem;">Responsive Display Typography</bd-h>
261
+
262
+ <div style="background: #f1f5f9; padding: 2rem; border-radius: 12px;">
263
+ <bd-display kind="xl" style="margin-bottom: 1rem;">
264
+ Adaptive Text Sizing
265
+ </bd-display>
266
+ <bd-p kind="regular">
267
+ Display components automatically adjust based on viewport size and CSS variables.
268
+ They maintain optimal readability across all devices from mobile to desktop.
269
+ </bd-p>
270
+
271
+ <div style="display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2rem;">
272
+ <div style="flex: 1; min-width: 200px;">
273
+ <bd-h as="h4">Mobile</bd-h>
274
+ <bd-display kind="sm" style="color: #3b82f6;">Compact & Clear</bd-display>
275
+ </div>
276
+
277
+ <div style="flex: 1; min-width: 200px;">
278
+ <bd-h as="h4">Tablet</bd-h>
279
+ <bd-display kind="md" style="color: #3b82f6;">Balanced Impact</bd-display>
280
+ </div>
281
+
282
+ <div style="flex: 1; min-width: 200px;">
283
+ <bd-h as="h4">Desktop</bd-h>
284
+ <bd-display kind="lg" style="color: #3b82f6;">Maximum Presence</bd-display>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ `;
290
+ ResponsiveDisplay.parameters = {
291
+ docs: {
292
+ description: {
293
+ story: 'Demonstrates how display typography adapts to different screen sizes while maintaining visual impact.'
294
+ }
295
+ }
296
+ };
297
+
298
+ export const InteractiveSizeDemo = () => {
299
+ const sizes = [
300
+ { kind: '3xl', label: '3XL', description: 'Largest - Hero sections' },
301
+ { kind: '2xl', label: '2XL', description: 'Extra large - Major headlines' },
302
+ { kind: 'xl', label: 'XL', description: 'Large - Prominent headers' },
303
+ { kind: 'lg', label: 'LG', description: 'Standard - Balanced display' },
304
+ { kind: 'md', label: 'MD', description: 'Medium - Compact display' },
305
+ { kind: 'sm', label: 'SM', description: 'Small - Minimal display' }
306
+ ];
307
+
308
+ return html`
309
+ <div style="max-width: 800px; margin: 0 auto;">
310
+ <bd-h as="h2" style="margin-bottom: 2rem;">Interactive Display Size Demo</bd-h>
311
+ <bd-p kind="regular" style="margin-bottom: 3rem;">
312
+ Explore different display sizes and their typical use cases:
313
+ </bd-p>
314
+
315
+ ${sizes.map(size => html`
316
+ <div style="margin: 3rem 0; padding: 2rem; background: white; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
317
+ <bd-display kind="${size.kind}" style="margin-bottom: 1rem;">
318
+ ${size.label} Display Size
319
+ </bd-display>
320
+ <bd-p kind="regular" style="margin-bottom: 1rem;">
321
+ This is the <strong>${size.kind}</strong> display size - ${size.description}.
322
+ </bd-p>
323
+ <bd-p kind="small" style="color: #64748b;">
324
+ CSS Variables:
325
+ <code>--typography-display-${size.kind}-fontSize</code>,
326
+ <code>--typography-display-${size.kind}-fontWeight</code>
327
+ </bd-p>
328
+ </div>
329
+ `)}
330
+ </div>
331
+ `;
332
+ };
333
+ InteractiveSizeDemo.parameters = {
334
+ docs: {
335
+ description: {
336
+ story: 'Interactive demonstration of all display sizes with their CSS variables and usage recommendations.'
337
+ }
338
+ }
339
+ };
@@ -13,7 +13,7 @@ export class BdDividerHorizontal extends LitElement {
13
13
 
14
14
  constructor() {
15
15
  super();
16
- this.width = "200px";
16
+ this.width = "";
17
17
  this.color = "var(--color-neutral-400)";
18
18
  this.opacity = "0.25";
19
19
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement, html } from 'lit';
2
2
  import { tokens } from '../../tokens/tokens.js';
3
+ import '../heading/heading.js';
3
4
  import footerCSS from './footer-links-group.css.js';
4
5
 
5
6
  export class BdFooterLinksGroup extends LitElement {
@@ -12,14 +13,13 @@ export class BdFooterLinksGroup extends LitElement {
12
13
  this.title = '';
13
14
  }
14
15
 
15
-
16
16
  render() {
17
17
  return html`
18
- <h4 class="group-title">${this.title ? this.title : html`&nbsp;`}</h4>
18
+ ${this.title ? html`<bd-h as="h6" fontWeight="700" color="#ffffff" class="group-title">${this.title}</bd-h>` : html`&nbsp;`}
19
19
  <slot></slot>
20
20
  `;
21
21
  }
22
22
  }
23
23
  BdFooterLinksGroup.styles = [tokens, footerCSS];
24
24
 
25
- customElements.define('bd-footer-links-group', BdFooterLinksGroup);
25
+ customElements.define('bd-footer-links-group', BdFooterLinksGroup);
@@ -1,4 +1,3 @@
1
- // footer-lp.stories.js
2
1
  import { html } from 'lit';
3
2
  import '../divider/divider-horizontal.js';
4
3
  import '../divider/divider-vertical.js';
@@ -37,12 +37,6 @@ export default css`
37
37
  padding: 2px 6px;
38
38
  }
39
39
 
40
- // /* Stiluri pentru link-urile din social icons */
41
- // .social-icons a:focus {
42
- // border-radius: 50%;
43
- // padding: 4px;
44
- // }
45
-
46
40
  /* Stiluri pentru link-urile din navigația principală */
47
41
  .footer-nav-main a:focus {
48
42
  padding: 2px 6px;
@@ -4,6 +4,7 @@ import '../../components/divider/divider-vertical.js';
4
4
  import '../../components/footer/footer-links-group.js';
5
5
  import '../../components/footer/footer-nav-menu.js';
6
6
  import '../../components/grid/grid.js';
7
+ import '../../components/link/link.js';
7
8
  import { tokens } from "../../tokens/tokens.js";
8
9
  import footerCSS from './footer.css.js';
9
10
  import { localeMap } from './localeMap.js';
@@ -43,8 +44,6 @@ export class BdFooter extends LitElement {
43
44
  firstUpdated() {
44
45
  super.firstUpdated();
45
46
  this._updateNavLinks();
46
- // Obține referința la containerul cu țări
47
- // this._countriesContainer = this.shadowRoot.querySelector('.footer-countries-container');
48
47
  }
49
48
 
50
49
  updated(changedProps) {
@@ -70,10 +69,8 @@ export class BdFooter extends LitElement {
70
69
  const impressumDivider = footerNav.querySelector('bd-divider-vertical + .impressum-link')?.previousElementSibling;
71
70
 
72
71
  if (impressumLink) {
73
- // Ascunde/afișează link-ul Impressum
74
72
  impressumLink.style.display = showImpressum ? '' : 'none';
75
73
 
76
- // Ascunde/afișează și separatorul dinaintea lui
77
74
  if (impressumDivider && impressumDivider.tagName === 'BD-DIVIDER-VERTICAL') {
78
75
  impressumDivider.style.display = showImpressum ? '' : 'none';
79
76
  }
@@ -82,10 +79,8 @@ export class BdFooter extends LitElement {
82
79
  }
83
80
 
84
81
  _scrollToCountries() {
85
- // Obține referința la container doar atunci când este necesar
86
82
  const container = this.shadowRoot.querySelector('.footer-countries-container');
87
83
  if (container) {
88
- // Așteaptă ca render-ul să se finalizeze
89
84
  setTimeout(() => {
90
85
  container.scrollIntoView({
91
86
  behavior: 'smooth',
@@ -96,7 +91,6 @@ export class BdFooter extends LitElement {
96
91
  }
97
92
 
98
93
  _scrollToTop() {
99
- // Scroll smooth către începutul footer-ului
100
94
  this.scrollIntoView({
101
95
  behavior: 'smooth',
102
96
  block : 'start'
@@ -122,27 +116,22 @@ export class BdFooter extends LitElement {
122
116
  return;
123
117
  }
124
118
 
125
- // Creează o versiune normalized a localeMap cu cheile lowercase
126
119
  const normalizedLocaleMap = {};
127
120
  Object.entries(localeMap).forEach(([key, value]) => {
128
121
  normalizedLocaleMap[key.toLowerCase()] = value;
129
122
  });
130
123
 
131
- // Încearcă mai întâi potrivire exactă
132
124
  let country = normalizedLocaleMap[urlLocale];
133
125
 
134
- // Dacă nu găsești potrivire exactă, încearcă să găsești cea mai bună potrivire
135
126
  if (!country && urlLocale) {
136
127
  const localeParts = urlLocale.split('-');
137
128
  const language = localeParts[0];
138
129
  const region = localeParts[1];
139
130
 
140
- // Caută o potrivire care să înceapă cu același limbaj
141
131
  const possibleMatches = Object.entries(normalizedLocaleMap)
142
132
  .filter(([key]) => key.startsWith(language));
143
133
 
144
134
  if (possibleMatches.length > 0) {
145
- // Preferă potrivirea cu aceeași regiune dacă există
146
135
  const exactRegionMatch = possibleMatches.find(([key]) => {
147
136
  const keyParts = key.split('-');
148
137
  const keyRegion = keyParts[1];
@@ -154,13 +143,11 @@ export class BdFooter extends LitElement {
154
143
 
155
144
  if (exactRegionMatch) {
156
145
  country = exactRegionMatch[1];
157
- // Recuperează cheia originală din localeMap
158
146
  const originalKey = Object.keys(localeMap).find(k =>
159
147
  k.toLowerCase() === exactRegionMatch[0]
160
148
  );
161
149
  this.currentLocale = originalKey || exactRegionMatch[0];
162
150
  } else {
163
- // Altfel, ia prima potrivire
164
151
  country = possibleMatches[0][1];
165
152
  const originalKey = Object.keys(localeMap).find(k =>
166
153
  k.toLowerCase() === possibleMatches[0][0]
@@ -170,7 +157,6 @@ export class BdFooter extends LitElement {
170
157
  }
171
158
  }
172
159
 
173
- // Setează valorile pentru țară și locale
174
160
  if (country) {
175
161
  this.selectedCountry = country;
176
162
  }
@@ -182,14 +168,12 @@ export class BdFooter extends LitElement {
182
168
  this.currentLocale = originalKey || urlLocale;
183
169
  }
184
170
 
185
- // Actualizează linkurile de navigație
186
171
  this._updateNavLinks();
187
172
  }
188
173
 
189
174
  _toggleCountries() {
190
175
  this._countriesOpen = !this._countriesOpen;
191
176
 
192
- // Dacă se închide dropdown-ul, fac scroll înapoi sus
193
177
  if (!this._countriesOpen) {
194
178
  this._scrollToTop();
195
179
  }
@@ -198,7 +182,6 @@ export class BdFooter extends LitElement {
198
182
  _closeCountries() {
199
183
  this._countriesOpen = false;
200
184
 
201
- // Doar pentru desktop, facem scroll înapoi sus
202
185
  if (!this._isMobile) {
203
186
  this._scrollToTop();
204
187
  }
@@ -208,7 +191,6 @@ export class BdFooter extends LitElement {
208
191
  e.preventDefault();
209
192
  this._selectCountry(countryLabel);
210
193
 
211
- // Redirect către pagina cu noul locale
212
194
  const newPath = `/${locale.toLowerCase()}/`;
213
195
  window.location.href = newPath;
214
196
  }
@@ -217,7 +199,6 @@ export class BdFooter extends LitElement {
217
199
  this.selectedCountry = countryLabel;
218
200
  this._countriesOpen = false;
219
201
 
220
- // Găsește locale-ul corespunzător pentru țara selectată
221
202
  const localeEntry = Object.entries(localeMap).find(
222
203
  ([, country]) => country === countryLabel
223
204
  );
@@ -237,8 +218,6 @@ export class BdFooter extends LitElement {
237
218
  }));
238
219
  }
239
220
 
240
-
241
-
242
221
  get locale() {
243
222
  const val = (this.currentLocale || 'en').toLowerCase();
244
223
  return val;
@@ -261,8 +240,7 @@ export class BdFooter extends LitElement {
261
240
  }
262
241
 
263
242
  _updateNavLinks() {
264
- // Actualizează linkurile care sunt acum în shadow DOM
265
- const links = this.shadowRoot.querySelectorAll('.footer-nav-main a');
243
+ const links = this.shadowRoot.querySelectorAll('.footer-nav-main bd-link');
266
244
  const linkPaths = ['consumer', 'small-business', 'business', 'partners'];
267
245
  const currentLocale = this.locale;
268
246
 
@@ -272,6 +250,7 @@ export class BdFooter extends LitElement {
272
250
  }
273
251
  });
274
252
  }
253
+
275
254
  render() {
276
255
  const year = new Date().getFullYear();
277
256
  const showAnpc = this.locale.startsWith('ro');
@@ -292,21 +271,20 @@ export class BdFooter extends LitElement {
292
271
  countriesList.slice(chunkSize, chunkSize * 2),
293
272
  countriesList.slice(chunkSize * 2)
294
273
  ];
295
- // Obține elementele din slot-ul quick-links
274
+
296
275
  const quickLinksSlot = this.shadowRoot?.querySelector('slot[name="quick-links"]');
297
276
  const quickLinksElements = quickLinksSlot?.assignedElements({ flatten: true }) || [];
298
277
 
299
- // Extrage toate componentele bd-footer-links-group din slot
300
278
  const linksGroups = [];
301
279
  quickLinksElements.forEach(el => {
302
280
  if (el.tagName === 'BD-FOOTER-LINKS-GROUP') {
303
281
  linksGroups.push(el);
304
282
  } else {
305
- // Dacă este un container, extrage copiii săi
306
283
  const children = el.querySelectorAll ? el.querySelectorAll('bd-footer-links-group') : [];
307
284
  children.forEach(child => linksGroups.push(child));
308
285
  }
309
286
  });
287
+
310
288
  return html`
311
289
  <div class="footer-top-bleed">
312
290
  <div class="container">
@@ -356,15 +334,15 @@ export class BdFooter extends LitElement {
356
334
  : ''}
357
335
 
358
336
  <div class="footer-links-right social-icons">
359
- <slot name="social-links">
360
- <a href="https://www.facebook.com/bitdefender" class="bd-facebook"></a>
361
- <a href="https://twitter.com/bitdefender" class="bd-twitter"></a>
362
- <a href="https://www.linkedin.com/company/bitdefender" class="bd-linkedin"></a>
363
- <a href="https://www.youtube.com/c/Bitdefender" class="bd-youtube"></a>
364
- <a href="https://www.instagram.com/bitdefender/" class="bd-instagram"></a>
365
- <a href="https://www.tiktok.com/@bitdefender" class="bd-tiktok"></a>
366
- </slot>
367
- </div>
337
+ <slot name="social-links">
338
+ <bd-link href="https://www.facebook.com/bitdefender" target="_blank" kind="secondary" class="bd-facebook">Facebook</bd-link>
339
+ <bd-link href="https://twitter.com/bitdefender" target="_blank" kind="secondary" class="bd-twitter">Twitter</bd-link>
340
+ <bd-link href="https://www.linkedin.com/company/bitdefender" target="_blank" kind="secondary" class="bd-linkedin">LinkedIn</bd-link>
341
+ <bd-link href="https://www.youtube.com/c/Bitdefender" target="_blank" kind="secondary" class="bd-youtube">YouTube</bd-link>
342
+ <bd-link href="https://www.instagram.com/bitdefender/" target="_blank" kind="secondary" class="bd-instagram">Instagram</bd-link>
343
+ <bd-link href="https://www.tiktok.com/@bitdefender" target="_blank" kind="secondary" class="bd-tiktok">TikTok</bd-link>
344
+ </slot>
345
+ </div>
368
346
  </div>
369
347
 
370
348
  ${!this._isMobile
@@ -426,12 +404,14 @@ export class BdFooter extends LitElement {
426
404
  ${countryChunks.map(chunk => html`
427
405
  <bd-footer-links-group slot="countries" title="${chunk === countryChunks[0] ? 'Choose your country' : ''}">
428
406
  ${chunk.map(c => html`
429
- <a href="/${c.locale.toLowerCase()}/"
430
- data-locale="${c.locale}"
431
- class="${this.selectedCountry === c.label ? 'selected' : ''}"
432
- @click="${(e) => this._handleCountryClick(e, c.label, c.locale)}">
407
+ <bd-link
408
+ href="/${c.locale.toLowerCase()}/"
409
+ data-locale="${c.locale}"
410
+ kind="light"
411
+ class="${this.selectedCountry === c.label ? 'selected' : ''}"
412
+ @click="${(e) => this._handleCountryClick(e, c.label, c.locale)}">
433
413
  ${c.label}
434
- </a>
414
+ </bd-link>
435
415
  `)}
436
416
  </bd-footer-links-group>
437
417
  `)}
@@ -1,4 +1,3 @@
1
- // footer.stories.js - Varianta ultra-simplă
2
1
  import { html } from 'lit';
3
2
  import './footer.js';
4
3