@repobit/dex-system-design 0.18.1 → 0.19.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.
- package/CHANGELOG.md +20 -0
- package/package.json +15 -4
- package/src/components/anchor/anchor.stories.js +9 -9
- package/src/components/badge/badge.css.js +52 -5
- package/src/components/badge/badge.js +58 -5
- package/src/components/badge/badge.stories.js +183 -15
- package/src/components/carousel/carousel.css.js +13 -13
- package/src/components/footer/footer-links-group.css.js +1 -5
- package/src/components/footer/footer-lp.css.js +49 -533
- package/src/components/footer/footer-lp.js +86 -203
- package/src/components/footer/footer-nav-menu.css.js +33 -19
- package/src/components/footer/footer-nav-menu.js +3 -3
- package/src/components/footer/footer.css.js +263 -193
- package/src/components/footer/footer.js +163 -166
- package/src/tokens/tokens.js +44 -66
- package/src/components/Button/icons.css +0 -5
- package/src/components/Button/index.js +0 -0
- package/src/components/FAQ/faq.css.js +0 -117
- package/src/components/FAQ/faq.js +0 -0
- package/src/components/FAQ/faq.stories.js +0 -66
|
@@ -26,7 +26,6 @@ export class BdFooter extends LitElement {
|
|
|
26
26
|
this.selectedCountry = 'Choose your country';
|
|
27
27
|
this._isMobile = window.innerWidth <= 768;
|
|
28
28
|
this._countriesContainer = null;
|
|
29
|
-
console.log('Constructor - isMobile:', this._isMobile, 'Window width:', window.innerWidth);
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
connectedCallback() {
|
|
@@ -51,16 +50,37 @@ export class BdFooter extends LitElement {
|
|
|
51
50
|
updated(changedProps) {
|
|
52
51
|
if (changedProps.has('currentLocale')) {
|
|
53
52
|
this._updateNavLinks();
|
|
53
|
+
this._toggleImpressumVisibility();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// Dacă s-a deschis lista de țări, fac scroll smooth către ea
|
|
57
56
|
if (changedProps.has('_countriesOpen') && this._countriesOpen) {
|
|
58
|
-
// Obține referința la containerul cu țări doar când este deschis
|
|
59
57
|
this._countriesContainer = this.shadowRoot.querySelector('.footer-countries-container');
|
|
60
58
|
this._scrollToCountries();
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
|
|
62
|
+
_toggleImpressumVisibility() {
|
|
63
|
+
const showImpressum = this.locale === 'de-de' || this.locale === 'de';
|
|
64
|
+
const slot = this.shadowRoot.querySelector('slot[name="secondary-nav"]');
|
|
65
|
+
const assignedElements = slot?.assignedElements({ flatten: true }) || [];
|
|
66
|
+
|
|
67
|
+
if (assignedElements.length > 0) {
|
|
68
|
+
const footerNav = assignedElements[0];
|
|
69
|
+
const impressumLink = footerNav.querySelector('.impressum-link');
|
|
70
|
+
const impressumDivider = footerNav.querySelector('bd-divider-vertical + .impressum-link')?.previousElementSibling;
|
|
71
|
+
|
|
72
|
+
if (impressumLink) {
|
|
73
|
+
// Ascunde/afișează link-ul Impressum
|
|
74
|
+
impressumLink.style.display = showImpressum ? '' : 'none';
|
|
75
|
+
|
|
76
|
+
// Ascunde/afișează și separatorul dinaintea lui
|
|
77
|
+
if (impressumDivider && impressumDivider.tagName === 'BD-DIVIDER-VERTICAL') {
|
|
78
|
+
impressumDivider.style.display = showImpressum ? '' : 'none';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
64
84
|
_scrollToCountries() {
|
|
65
85
|
// Obține referința la container doar atunci când este necesar
|
|
66
86
|
const container = this.shadowRoot.querySelector('.footer-countries-container');
|
|
@@ -217,28 +237,7 @@ export class BdFooter extends LitElement {
|
|
|
217
237
|
}));
|
|
218
238
|
}
|
|
219
239
|
|
|
220
|
-
renderQuickLinksSection(slotName) {
|
|
221
|
-
const assignedElements = this.shadowRoot?.querySelector(`slot[name="${slotName}"]`)?.assignedElements({ flatten: true }) || [];
|
|
222
|
-
if (assignedElements.length === 0) return null;
|
|
223
240
|
|
|
224
|
-
const maxCols = this.maxColumnsPerRow || 3;
|
|
225
|
-
const rows = Math.ceil(assignedElements.length / maxCols);
|
|
226
|
-
|
|
227
|
-
const groupedRows = Array.from({ length: rows }, (_, rowIndex) => {
|
|
228
|
-
const start = rowIndex * maxCols;
|
|
229
|
-
return assignedElements.slice(start, start + maxCols);
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
return html`
|
|
233
|
-
<div class="quick-links-section" style="display: flex; flex-direction: column; gap: 1rem;">
|
|
234
|
-
${groupedRows.map(row => html`
|
|
235
|
-
<div style="display: grid; grid-template-columns: repeat(${row.length}, 1fr); gap: 1rem;">
|
|
236
|
-
${row.map(el => html`${el}`)}
|
|
237
|
-
</div>
|
|
238
|
-
`)}
|
|
239
|
-
</div>
|
|
240
|
-
`;
|
|
241
|
-
}
|
|
242
241
|
|
|
243
242
|
get locale() {
|
|
244
243
|
const val = (this.currentLocale || 'en').toLowerCase();
|
|
@@ -273,13 +272,11 @@ export class BdFooter extends LitElement {
|
|
|
273
272
|
}
|
|
274
273
|
});
|
|
275
274
|
}
|
|
276
|
-
|
|
277
275
|
render() {
|
|
278
276
|
const year = new Date().getFullYear();
|
|
279
277
|
const showAnpc = this.locale.startsWith('ro');
|
|
280
278
|
const showImpressum = this.locale === 'de-de' || this.locale === 'de';
|
|
281
279
|
const countriesList = this.getCountriesList();
|
|
282
|
-
console.log('Render - isMobile:', this._isMobile, 'Window width:', window.innerWidth);
|
|
283
280
|
|
|
284
281
|
const masterbrandUrl = this._isMobile
|
|
285
282
|
? '/assets/Bitdefender-Masterbrand_mobile.png'
|
|
@@ -290,175 +287,175 @@ export class BdFooter extends LitElement {
|
|
|
290
287
|
: '/assets/anpc.png';
|
|
291
288
|
|
|
292
289
|
const logoUrl = '/assets/BD_logo.png';
|
|
293
|
-
const facebookIcon = '/assets/facebook_vector.
|
|
294
|
-
const xIcon = '/assets/x_vector.
|
|
295
|
-
const linkedinIcon = '/assets/linkedin_vector.
|
|
296
|
-
const youtubeIcon = '/assets/youtube_vector.
|
|
297
|
-
const instagramIcon = '/assets/instagram_vector.
|
|
298
|
-
const tiktokIcon = '/assets/tiktok_vector.
|
|
299
|
-
const leadingIcon = '/assets/leading.
|
|
300
|
-
const closeIcon = '/assets/close_icon.png';
|
|
290
|
+
const facebookIcon = '/assets/facebook_vector.svg';
|
|
291
|
+
const xIcon = '/assets/x_vector.svg';
|
|
292
|
+
const linkedinIcon = '/assets/linkedin_vector.svg';
|
|
293
|
+
const youtubeIcon = '/assets/youtube_vector.svg';
|
|
294
|
+
const instagramIcon = '/assets/instagram_vector.svg';
|
|
295
|
+
const tiktokIcon = '/assets/tiktok_vector.svg';
|
|
296
|
+
const leadingIcon = '/assets/leading.svg';
|
|
297
|
+
const closeIcon = '/assets/close_icon.png';
|
|
301
298
|
|
|
302
299
|
const chunkSize = Math.ceil(countriesList.length / 3);
|
|
303
300
|
const countryChunks = [
|
|
304
301
|
countriesList.slice(0, chunkSize),
|
|
305
302
|
countriesList.slice(chunkSize, chunkSize * 2),
|
|
306
303
|
countriesList.slice(chunkSize * 2)
|
|
307
|
-
|
|
308
304
|
];
|
|
309
|
-
|
|
305
|
+
// Obține elementele din slot-ul quick-links
|
|
306
|
+
const quickLinksSlot = this.shadowRoot?.querySelector('slot[name="quick-links"]');
|
|
307
|
+
const quickLinksElements = quickLinksSlot?.assignedElements({ flatten: true }) || [];
|
|
308
|
+
|
|
309
|
+
// Extrage toate componentele bd-footer-links-group din slot
|
|
310
|
+
const linksGroups = [];
|
|
311
|
+
quickLinksElements.forEach(el => {
|
|
312
|
+
if (el.tagName === 'BD-FOOTER-LINKS-GROUP') {
|
|
313
|
+
linksGroups.push(el);
|
|
314
|
+
} else {
|
|
315
|
+
// Dacă este un container, extrage copiii săi
|
|
316
|
+
const children = el.querySelectorAll ? el.querySelectorAll('bd-footer-links-group') : [];
|
|
317
|
+
children.forEach(child => linksGroups.push(child));
|
|
318
|
+
}
|
|
319
|
+
});
|
|
310
320
|
return html`
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
</div>
|
|
321
|
+
<div class="footer-top-bleed">
|
|
322
|
+
<div class="container">
|
|
323
|
+
<div class="footer-top">
|
|
324
|
+
<div class="footer-logo">
|
|
325
|
+
<slot name="logo">
|
|
326
|
+
<span><img src="${logoUrl}" alt="Bitdefender Logo"></span>
|
|
327
|
+
</slot>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="footer-top-right">
|
|
330
|
+
<slot name="top-right">
|
|
331
|
+
<div slot="top-right">
|
|
332
|
+
<span slot="logo">
|
|
333
|
+
<img src="${masterbrandUrl}" alt="Bitdefender Masterbrand">
|
|
334
|
+
</span>
|
|
335
|
+
</div>
|
|
336
|
+
</slot>
|
|
328
337
|
</div>
|
|
329
338
|
</div>
|
|
330
339
|
</div>
|
|
340
|
+
</div>
|
|
331
341
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
<a href="https://www.bitdefender.com/en-us/cyberpedia/">Bitdefender Cyberpedia</a>
|
|
353
|
-
<a href="https://pan.bitdefender.com/partners/save/?adobe_mc=TS%3D1755696435%7CMCMID%3D63411747395182077784244429321314993670%7CMCORGID%3D0E920C0F53DA9E9B0A490D45%2540AdobeOrg">Partner Advantage Network Portal</a>
|
|
354
|
-
<a href="https://brand.bitdefender.com/point/en/bitdefenderhub/component/default/104804?adobe_mc=TS%3D1755696435%7CMCMID%3D63411747395182077784244429321314993670%7CMCORGID%3D0E920C0F53DA9E9B0A490D45%2540AdobeOrg">Brand Portal</a>
|
|
355
|
-
</bd-footer-links-group>
|
|
356
|
-
|
|
357
|
-
<bd-footer-links-group slot="quick-links">
|
|
358
|
-
<a href="https://www.bitdefender.com/consumer/support/">Support for Home Products</a>
|
|
359
|
-
<a href="https://www.bitdefender.com/business/support/">Support for Business Products</a>
|
|
360
|
-
<a href="/${this.locale}/company/">Investors</a>
|
|
361
|
-
<a href="/${this.locale}/company/job-opportunities/">Careers</a>
|
|
362
|
-
<a href="/${this.locale}/business/infozone/">InfoZone</a>
|
|
363
|
-
</bd-footer-links-group>
|
|
364
|
-
</div>
|
|
365
|
-
|
|
366
|
-
<div class="footer-links-right social-icons">
|
|
367
|
-
<a href="https://www.facebook.com/bitdefender"><img src="${facebookIcon}" alt="Facebook"></a>
|
|
368
|
-
<a href="https://twitter.com/bitdefender"><img src="${xIcon}" alt="X"></a>
|
|
369
|
-
<a href="https://www.linkedin.com/company/bitdefender"><img src="${linkedinIcon}" alt="LinkedIn"></a>
|
|
370
|
-
<a href="https://www.youtube.com/c/Bitdefender"><img src="${youtubeIcon}" alt="YouTube"></a>
|
|
371
|
-
<a href="https://www.instagram.com/bitdefender/"><img src="${instagramIcon}" alt="Instagram"></a>
|
|
372
|
-
<a href="https://www.tiktok.com/@bitdefender"><img src="${tiktokIcon}" alt="TikTok"></a>
|
|
373
|
-
</div>
|
|
342
|
+
<footer class="container">
|
|
343
|
+
<div class="footer-nav-main-container">
|
|
344
|
+
<slot name="nav"></slot>
|
|
345
|
+
</div>
|
|
346
|
+
<bd-divider-horizontal width="100%" color="white" opacity="0.25"></bd-divider-horizontal>
|
|
347
|
+
|
|
348
|
+
<div class="footer-links">
|
|
349
|
+
<div class="footer-links-left">
|
|
350
|
+
<bd-grid
|
|
351
|
+
cols="1"
|
|
352
|
+
cols-sm="1"
|
|
353
|
+
cols-md="2"
|
|
354
|
+
cols-lg="2"
|
|
355
|
+
gap="lg"
|
|
356
|
+
align="start"
|
|
357
|
+
justify="start"
|
|
358
|
+
padding="none"
|
|
359
|
+
>
|
|
360
|
+
<slot name="quick-links"></slot>
|
|
361
|
+
</bd-grid>
|
|
374
362
|
</div>
|
|
363
|
+
|
|
364
|
+
${this._isMobile
|
|
365
|
+
? html`<bd-divider-horizontal width="100%" color="white" opacity="0.25"></bd-divider-horizontal>`
|
|
366
|
+
: ''}
|
|
367
|
+
|
|
368
|
+
<div class="footer-links-right social-icons">
|
|
369
|
+
<slot name="social-links">
|
|
370
|
+
<a href="https://www.facebook.com/bitdefender"><img src="${facebookIcon}" alt="Facebook"></a>
|
|
371
|
+
<a href="https://twitter.com/bitdefender"><img src="${xIcon}" alt="X"></a>
|
|
372
|
+
<a href="https://www.linkedin.com/company/bitdefender"><img src="${linkedinIcon}" alt="LinkedIn"></a>
|
|
373
|
+
<a href="https://www.youtube.com/c/Bitdefender"><img src="${youtubeIcon}" alt="YouTube"></a>
|
|
374
|
+
<a href="https://www.instagram.com/bitdefender/"><img src="${instagramIcon}" alt="Instagram"></a>
|
|
375
|
+
<a href="https://www.tiktok.com/@bitdefender"><img src="${tiktokIcon}" alt="TikTok"></a>
|
|
376
|
+
</slot>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
375
379
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<bd-divider-vertical color="white" height="18px"></bd-divider-vertical>
|
|
395
|
-
<a href="#" class="impressum-link">Impressum</a>
|
|
396
|
-
`
|
|
397
|
-
: ''}
|
|
398
|
-
</div>
|
|
399
|
-
</bd-footer-nav>
|
|
400
|
-
<div class="footer-address">
|
|
401
|
-
<slot name="address">
|
|
402
|
-
<div slot="address">
|
|
403
|
-
111 W. Houston Street, Suite 2105, Frost Tower Building<br />
|
|
404
|
-
San Antonio, Texas 78205
|
|
405
|
-
</div>
|
|
406
|
-
</slot>
|
|
407
|
-
</div>
|
|
380
|
+
${!this._isMobile
|
|
381
|
+
? html`<bd-divider-horizontal width="100%" color="white" opacity="0.25"></bd-divider-horizontal>`
|
|
382
|
+
: ''}
|
|
383
|
+
|
|
384
|
+
<div class="footer-middle-line">
|
|
385
|
+
<div class="secondary-nav-container">
|
|
386
|
+
<slot name="secondary-nav"></slot>
|
|
387
|
+
${this._isMobile
|
|
388
|
+
? html`<bd-divider-horizontal width="100%" color="white" opacity="0.25"></bd-divider-horizontal>`
|
|
389
|
+
: ''}
|
|
390
|
+
</div>
|
|
391
|
+
<div class="footer-address">
|
|
392
|
+
<slot name="address">
|
|
393
|
+
<div>
|
|
394
|
+
111 W. Houston Street, Suite 2105, Frost Tower Building<br />
|
|
395
|
+
San Antonio, Texas 78205
|
|
396
|
+
</div>
|
|
397
|
+
</slot>
|
|
408
398
|
</div>
|
|
399
|
+
</div>
|
|
409
400
|
|
|
410
|
-
|
|
401
|
+
<bd-divider-horizontal width="100%" color="white" opacity="0.25"></bd-divider-horizontal>
|
|
402
|
+
|
|
411
403
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
404
|
+
<div class="footer-extra">
|
|
405
|
+
<div class="footer-copy">
|
|
406
|
+
<slot name="copyright">
|
|
407
|
+
Copyright © 1997 - ${year} Bitdefender
|
|
408
|
+
</slot>
|
|
409
|
+
</div>
|
|
410
|
+
|
|
411
|
+
${showAnpc
|
|
412
|
+
? html`
|
|
416
413
|
<div class="footer-anpc">
|
|
417
414
|
<slot name="anpc">
|
|
418
|
-
<
|
|
419
|
-
<img src="${anpcUrl}" alt="Certificat" />
|
|
420
|
-
</div>
|
|
415
|
+
<img src="${anpcUrl}" alt="Certificat" />
|
|
421
416
|
</slot>
|
|
422
417
|
</div>
|
|
423
418
|
`
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
</
|
|
435
|
-
</
|
|
419
|
+
: null}
|
|
420
|
+
|
|
421
|
+
<div class="footer-countries-toggle">
|
|
422
|
+
<button class="country-toggle" @click="${this._toggleCountries}">
|
|
423
|
+
<img src="${leadingIcon}" alt="Leading icon">
|
|
424
|
+
${this.selectedCountry}
|
|
425
|
+
<span class="arrow">
|
|
426
|
+
${this._countriesOpen
|
|
427
|
+
? html`<img src="/assets/arrow_up.svg" alt="Arrow up">`
|
|
428
|
+
: html`<img src="/assets/arrow_down.svg" alt="Arrow down">`}
|
|
429
|
+
</span>
|
|
430
|
+
</button>
|
|
436
431
|
</div>
|
|
432
|
+
</div>
|
|
437
433
|
|
|
438
434
|
${this._countriesOpen
|
|
439
435
|
? html`
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
436
|
+
<div class="footer-countries-container">
|
|
437
|
+
<button class="close-countries-button" @click="${this._closeCountries}">
|
|
438
|
+
<img src="${closeIcon}" alt="Close countries list">
|
|
439
|
+
</button>
|
|
440
|
+
${countryChunks.map(chunk => html`
|
|
441
|
+
<bd-footer-links-group slot="countries" title="${chunk === countryChunks[0] ? 'Choose your country' : ''}">
|
|
442
|
+
${chunk.map(c => html`
|
|
443
|
+
<a href="/${c.locale.toLowerCase()}/"
|
|
444
|
+
data-locale="${c.locale}"
|
|
445
|
+
class="${this.selectedCountry === c.label ? 'selected' : ''}"
|
|
446
|
+
@click="${(e) => this._handleCountryClick(e, c.label, c.locale)}">
|
|
447
|
+
${c.label}
|
|
448
|
+
</a>
|
|
449
|
+
`)}
|
|
450
|
+
</bd-footer-links-group>
|
|
453
451
|
`)}
|
|
454
|
-
</
|
|
455
|
-
`
|
|
456
|
-
</div>
|
|
457
|
-
`
|
|
452
|
+
</div>
|
|
453
|
+
`
|
|
458
454
|
: null}
|
|
459
|
-
|
|
460
|
-
|
|
455
|
+
</footer>
|
|
456
|
+
`;
|
|
461
457
|
}
|
|
458
|
+
|
|
462
459
|
static styles = [tokens, footerCSS];
|
|
463
460
|
}
|
|
464
461
|
|