diff --git a/js/src/collapse.js b/js/src/collapse.js index 8894342dfc..b1088e106f 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -256,12 +256,12 @@ class Collapse extends BaseComponent { // Static static jQueryInterface(config) { - return this.each(function () { - const _config = {} - if (typeof config === 'string' && /show|hide/.test(config)) { - _config.toggle = false - } + const _config = {} + if (typeof config === 'string' && /show|hide/.test(config)) { + _config.toggle = false + } + return this.each(function () { const data = Collapse.getOrCreateInstance(this, _config) if (typeof config === 'string') { diff --git a/package.json b/package.json index a1c805e1a7..7606ef0dca 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,18 @@ "contributors": [ "Orange SA" ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap.git" + }, + "bugs": { + "url": "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues" + }, + "main": "dist/js/boosted.js", + "module": "dist/js/boosted.esm.js", + "sass": "scss/boosted.scss", + "style": "dist/css/boosted.css", "scripts": { "start": "npm-run-all --parallel watch docs-serve", "bundlewatch": "bundlewatch --config .bundlewatch.config.json", @@ -85,18 +97,6 @@ "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"", "watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\"" }, - "style": "dist/css/boosted.css", - "sass": "scss/boosted.scss", - "main": "dist/js/boosted.js", - "module": "dist/js/boosted.esm.js", - "repository": { - "type": "git", - "url": "git+https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap.git" - }, - "bugs": { - "url": "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues" - }, - "license": "MIT", "peerDependencies": { "@popperjs/core": "^2.11.2" }, diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 8d16494dc9..0bbbb16097 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -243,12 +243,6 @@ $utilities: map-merge( class: flex, values: wrap nowrap wrap-reverse ), - "gap": ( - responsive: true, - property: gap, - class: gap, - values: $spacers - ), "justify-content": ( responsive: true, property: justify-content, @@ -441,6 +435,13 @@ $utilities: map-merge( class: ps, values: $spacers ), + // Gap utility + "gap": ( + responsive: true, + property: gap, + class: gap, + values: $spacers + ), // scss-docs-end utils-spacing // Text // scss-docs-start utils-text diff --git a/scss/_variables.scss b/scss/_variables.scss index d230b32307..243c32ef14 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -775,6 +775,8 @@ $table-border-factor: .4 !default; $table-border-width: $border-width * .5 !default; $table-border-color: $gray-500 !default; +// Boosted mod: no $table-striped-* + $table-group-separator-color: currentColor !default; $table-caption-color: $black !default; diff --git a/scss/forms/_form-check.scss b/scss/forms/_form-check.scss index cccdb9b0dc..d4e818f845 100644 --- a/scss/forms/_form-check.scss +++ b/scss/forms/_form-check.scss @@ -105,6 +105,7 @@ &:disabled { ~ .form-check-label { color: $form-label-disabled-color; // Boosted mod + cursor: default; opacity: $form-check-label-disabled-opacity; } } diff --git a/site/assets/js/application.js b/site/assets/js/application.js index 9ac287f969..65c20fc49c 100644 --- a/site/assets/js/application.js +++ b/site/assets/js/application.js @@ -120,7 +120,8 @@ } // Insert copy to clipboard button before .highlight - var btnHtml = '
' + var btnTitle = 'Copy to clipboard' + var btnHtml = '
' document.querySelectorAll('div.highlight') .forEach(function (element) { element.insertAdjacentHTML('beforebegin', btnHtml) @@ -128,7 +129,7 @@ document.querySelectorAll('.btn-clipboard') .forEach(function (btn) { - var tooltipBtn = new boosted.Tooltip(btn) + var tooltipBtn = new boosted.Tooltip(btn, { title: btnTitle }) btn.addEventListener('mouseleave', function () { // Explicitly hide tooltip, since after clicking it remains @@ -146,11 +147,10 @@ clipboard.on('success', function (event) { var tooltipBtn = boosted.Tooltip.getInstance(event.trigger) - var originalTitle = event.trigger.getAttribute('title') tooltipBtn.setContent({ '.tooltip-inner': 'Copied!' }) event.trigger.addEventListener('hidden.bs.tooltip', function () { - tooltipBtn.setContent({ '.tooltip-inner': originalTitle }) + tooltipBtn.setContent({ '.tooltip-inner': btnTitle }) }, { once: true }) event.clearSelection() }) @@ -159,11 +159,10 @@ var modifierKey = /mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-' var fallbackMsg = 'Press ' + modifierKey + 'C to copy' var tooltipBtn = boosted.Tooltip.getInstance(event.trigger) - var originalTitle = event.trigger.getAttribute('title') tooltipBtn.setContent({ '.tooltip-inner': fallbackMsg }) event.trigger.addEventListener('hidden.bs.tooltip', function () { - tooltipBtn.setContent({ '.tooltip-inner': originalTitle }) + tooltipBtn.setContent({ '.tooltip-inner': btnTitle }) }, { once: true }) }) diff --git a/site/content/docs/5.1/components/breadcrumb.md b/site/content/docs/5.1/components/breadcrumb.md index 9143e76127..e73195f980 100644 --- a/site/content/docs/5.1/components/breadcrumb.md +++ b/site/content/docs/5.1/components/breadcrumb.md @@ -54,8 +54,15 @@ $breadcrumb-divider: quote(">"); It's also possible to use an **embedded SVG icon**. Apply it via our CSS custom property, or use the Sass variable. + +{{< callout info >}} +### Using embedded SVG + +Inlining SVG as data URI requires to URL escape a few characters, most notably `<`, `>` and `#`. That's why the `$breadcrumb-divider` variable is passed through our [`escape-svg()` Sass function]({{< docsref "/customize/sass#escape-svg" >}}). When using the CSS custom property, you need to URL escape your SVG on your own. Read [Kevin Weber's explanations on CodePen](https://codepen.io/kevinweber/pen/dXWoRw ) for detailed information on what to escape. +{{< /callout >}} + {{< example >}} -