@bebranded/bb-contents 1.0.132 → 1.0.134
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/bb-contents.js +12 -38
- 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.
|
|
4
|
+
* @version 1.0.134
|
|
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.
|
|
35
|
+
console.log('bb-contents | v1.0.134');
|
|
36
36
|
|
|
37
37
|
// Configuration
|
|
38
38
|
const config = {
|
|
39
|
-
version: '1.0.
|
|
39
|
+
version: '1.0.134',
|
|
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)
|
|
@@ -1395,7 +1395,7 @@
|
|
|
1395
1395
|
|
|
1396
1396
|
trigger.innerHTML = '<div style="display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;"><span class="bb-country-flag" style="flex-shrink: 0;">' + selectedFlag + '</span><span class="bb-country-name" style="flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">' + bbContents.utils.sanitize(selectedName) + '</span></div><svg width="16" height="16" viewBox="0 0 16 16" fill="none" style="flex-shrink: 0; transition: transform 0.2s;"><path d="M4 6L8 10L12 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
|
1397
1397
|
let triggerStyle = 'display: flex; align-items: center; justify-content: space-between; cursor: pointer; box-sizing: border-box; transition: border-color 0.2s;';
|
|
1398
|
-
// Appliquer les styles du select natif
|
|
1398
|
+
// Appliquer les styles du select natif (récupérés depuis CET élément spécifique)
|
|
1399
1399
|
if (selectBgColor && selectBgColor !== 'rgba(0, 0, 0, 0)' && selectBgColor !== 'transparent') {
|
|
1400
1400
|
triggerStyle += ' background-color: ' + selectBgColor + ';';
|
|
1401
1401
|
}
|
|
@@ -1407,7 +1407,8 @@
|
|
|
1407
1407
|
if (selectBorderRadius && selectBorderRadius !== '0px') {
|
|
1408
1408
|
triggerStyle += ' border-radius: ' + selectBorderRadius + ';';
|
|
1409
1409
|
}
|
|
1410
|
-
|
|
1410
|
+
// Toujours appliquer la couleur du texte (même si héritée)
|
|
1411
|
+
if (selectColor && selectColor !== 'rgba(0, 0, 0, 0)') {
|
|
1411
1412
|
triggerStyle += ' color: ' + selectColor + ';';
|
|
1412
1413
|
}
|
|
1413
1414
|
if (selectFontSize) {
|
|
@@ -1442,19 +1443,10 @@
|
|
|
1442
1443
|
popover.className = 'bb-country-select-popover';
|
|
1443
1444
|
popover.setAttribute('role', 'listbox');
|
|
1444
1445
|
let popoverStyle = 'position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; max-height: 300px; overflow: hidden; display: none; z-index: 50;';
|
|
1445
|
-
//
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
popoverStyle += ' background-color: white;';
|
|
1450
|
-
}
|
|
1451
|
-
if (selectBorder && selectBorder !== 'none' && selectBorder !== '0px none rgb(0, 0, 0)') {
|
|
1452
|
-
popoverStyle += ' border: ' + selectBorder + ';';
|
|
1453
|
-
} else if (selectBorderColor && selectBorderColor !== 'rgba(0, 0, 0, 0)') {
|
|
1454
|
-
popoverStyle += ' border: 1px solid ' + selectBorderColor + ';';
|
|
1455
|
-
} else {
|
|
1456
|
-
popoverStyle += ' border: 1px solid #e5e7eb;';
|
|
1457
|
-
}
|
|
1446
|
+
// Garder les couleurs par défaut pour le dropdown
|
|
1447
|
+
popoverStyle += ' background-color: white;';
|
|
1448
|
+
popoverStyle += ' border: 1px solid #e5e7eb;';
|
|
1449
|
+
// Appliquer uniquement le border-radius du select natif
|
|
1458
1450
|
if (selectBorderRadius && selectBorderRadius !== '0px') {
|
|
1459
1451
|
popoverStyle += ' border-radius: ' + selectBorderRadius + ';';
|
|
1460
1452
|
} else {
|
|
@@ -1466,18 +1458,7 @@
|
|
|
1466
1458
|
// Barre de recherche
|
|
1467
1459
|
const searchWrapper = document.createElement('div');
|
|
1468
1460
|
searchWrapper.className = 'bb-country-search';
|
|
1469
|
-
|
|
1470
|
-
if (selectBgColor && selectBgColor !== 'rgba(0, 0, 0, 0)' && selectBgColor !== 'transparent') {
|
|
1471
|
-
searchWrapperStyle += ' background-color: ' + selectBgColor + ';';
|
|
1472
|
-
} else {
|
|
1473
|
-
searchWrapperStyle += ' background-color: white;';
|
|
1474
|
-
}
|
|
1475
|
-
if (selectBorderColor && selectBorderColor !== 'rgba(0, 0, 0, 0)') {
|
|
1476
|
-
searchWrapperStyle += ' border-bottom: 1px solid ' + selectBorderColor + ';';
|
|
1477
|
-
} else {
|
|
1478
|
-
searchWrapperStyle += ' border-bottom: 1px solid #e5e7eb;';
|
|
1479
|
-
}
|
|
1480
|
-
searchWrapper.style.cssText = searchWrapperStyle;
|
|
1461
|
+
searchWrapper.style.cssText = 'position: sticky; top: 0; padding: 8px; background-color: white; border-bottom: 1px solid #e5e7eb; z-index: 1;';
|
|
1481
1462
|
|
|
1482
1463
|
const searchInput = document.createElement('input');
|
|
1483
1464
|
searchInput.type = 'text';
|
|
@@ -1491,14 +1472,7 @@
|
|
|
1491
1472
|
if (selectFontFamily) {
|
|
1492
1473
|
searchInputStyle += ' font-family: ' + selectFontFamily + ';';
|
|
1493
1474
|
}
|
|
1494
|
-
|
|
1495
|
-
searchInputStyle += ' color: ' + selectColor + ';';
|
|
1496
|
-
}
|
|
1497
|
-
if (selectBorderColor && selectBorderColor !== 'rgba(0, 0, 0, 0)') {
|
|
1498
|
-
searchInputStyle += ' border: 1px solid ' + selectBorderColor + ';';
|
|
1499
|
-
} else {
|
|
1500
|
-
searchInputStyle += ' border: 1px solid #e5e7eb;';
|
|
1501
|
-
}
|
|
1475
|
+
searchInputStyle += ' border: 1px solid #e5e7eb;';
|
|
1502
1476
|
if (selectBorderRadius && selectBorderRadius !== '0px') {
|
|
1503
1477
|
const borderRadiusValue = parseFloat(selectBorderRadius);
|
|
1504
1478
|
if (!isNaN(borderRadiusValue)) {
|