@bebranded/bb-contents 1.0.130 → 1.0.131

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 (2) hide show
  1. package/bb-contents.js +20 -4
  2. package/package.json +1 -1
package/bb-contents.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BeBranded Contents
3
3
  * Contenus additionnels français pour Webflow
4
- * @version 1.0.130
4
+ * @version 1.0.131
5
5
  * @author BeBranded
6
6
  * @license MIT
7
7
  * @website https://www.bebranded.xyz
@@ -32,11 +32,11 @@
32
32
  window._bbContentsInitialized = true;
33
33
 
34
34
  // Log de démarrage simple (une seule fois)
35
- console.log('bb-contents | v1.0.130');
35
+ console.log('bb-contents | v1.0.131');
36
36
 
37
37
  // Configuration
38
38
  const config = {
39
- version: '1.0.130',
39
+ version: '1.0.131',
40
40
  debug: false, // Debug désactivé pour rendu propre
41
41
  prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
42
42
  youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
@@ -1427,7 +1427,7 @@
1427
1427
  // Liste des pays
1428
1428
  const list = document.createElement('div');
1429
1429
  list.className = 'bb-country-list';
1430
- list.style.cssText = 'overflow-y: auto; max-height: 250px; padding-bottom: 4px;';
1430
+ list.style.cssText = 'overflow-y: auto; max-height: 250px; padding-bottom: 8px;';
1431
1431
  popover.appendChild(list);
1432
1432
 
1433
1433
  // Fonction pour rendre la liste
@@ -1478,6 +1478,22 @@
1478
1478
  trigger.addEventListener('click', function(e) {
1479
1479
  e.stopPropagation();
1480
1480
  const isOpen = popover.style.display === 'block';
1481
+
1482
+ // Fermer tous les autres dropdowns avant d'ouvrir celui-ci
1483
+ if (!isOpen) {
1484
+ document.querySelectorAll('.bb-country-select-popover').forEach(function(otherPopover) {
1485
+ if (otherPopover !== popover && otherPopover.style.display === 'block') {
1486
+ otherPopover.style.display = 'none';
1487
+ const otherTrigger = otherPopover.parentElement.querySelector('.bb-country-select-trigger');
1488
+ if (otherTrigger) {
1489
+ otherTrigger.setAttribute('aria-expanded', 'false');
1490
+ const otherChevron = otherTrigger.querySelector('svg');
1491
+ if (otherChevron) otherChevron.style.transform = 'rotate(0deg)';
1492
+ }
1493
+ }
1494
+ });
1495
+ }
1496
+
1481
1497
  popover.style.display = isOpen ? 'none' : 'block';
1482
1498
  trigger.setAttribute('aria-expanded', isOpen ? 'false' : 'true');
1483
1499
  if (chevron) chevron.style.transform = isOpen ? 'rotate(0deg)' : 'rotate(180deg)';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bebranded/bb-contents",
3
- "version": "1.0.130",
3
+ "version": "1.0.131",
4
4
  "description": "Contenus additionnels français pour Webflow",
5
5
  "main": "bb-contents.js",
6
6
  "scripts": {