Commit c090c79a authored by XhmikosR's avatar XhmikosR Committed by GitHub
Browse files

Merge branch 'v4-dev' into btn-active

parents 8e56145e 3eae92f1
Showing with 233 additions and 207 deletions
+233 -207
...@@ -11,34 +11,30 @@ ...@@ -11,34 +11,30 @@
/* global Set */ /* global Set */
var fs = require('fs') const fs = require('fs')
var path = require('path') const path = require('path')
var sh = require('shelljs') const sh = require('shelljs')
sh.config.fatal = true sh.config.fatal = true
var sed = sh.sed const sed = sh.sed
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 // Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
RegExp.quote = function (string) { RegExp.quote = (string) => string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') RegExp.quoteReplacement = (string) => string.replace(/[$]/g, '$$')
}
RegExp.quoteReplacement = function (string) {
return string.replace(/[$]/g, '$$')
}
var DRY_RUN = false const DRY_RUN = false
function walkAsync(directory, excludedDirectories, fileCallback, errback) { function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) { if (excludedDirectories.has(path.parse(directory).base)) {
return return
} }
fs.readdir(directory, function (err, names) { fs.readdir(directory, (err, names) => {
if (err) { if (err) {
errback(err) errback(err)
return return
} }
names.forEach(function (name) { names.forEach((name) => {
var filepath = path.join(directory, name) const filepath = path.join(directory, name)
fs.lstat(filepath, function (err, stats) { fs.lstat(filepath, (err, stats) => {
if (err) { if (err) {
process.nextTick(errback, err) process.nextTick(errback, err)
return return
...@@ -60,19 +56,19 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) { ...@@ -60,19 +56,19 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(RegExp.quote(original), 'g') original = new RegExp(RegExp.quote(original), 'g')
replacement = RegExp.quoteReplacement(replacement) replacement = RegExp.quoteReplacement(replacement)
var updateFile = !DRY_RUN ? function (filepath) { const updateFile = !DRY_RUN ? (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) { if (allowedExtensions.has(path.parse(filepath).ext)) {
sed('-i', original, replacement, filepath) sed('-i', original, replacement, filepath)
} }
} : function (filepath) { } : (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) { if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log('FILE: ' + filepath) console.log(`FILE: ${filepath}`)
} }
else { else {
console.log('EXCLUDED:' + filepath) console.log(`EXCLUDED:${filepath}`)
} }
} }
walkAsync(directory, excludedDirectories, updateFile, function (err) { walkAsync(directory, excludedDirectories, updateFile, (err) => {
console.error('ERROR while traversing directory!:') console.error('ERROR while traversing directory!:')
console.error(err) console.error(err)
process.exit(1) process.exit(1)
...@@ -85,14 +81,14 @@ function main(args) { ...@@ -85,14 +81,14 @@ function main(args) {
console.error('Got arguments:', args) console.error('Got arguments:', args)
process.exit(1) process.exit(1)
} }
var oldVersion = args[0] const oldVersion = args[0]
var newVersion = args[1] const newVersion = args[1]
var EXCLUDED_DIRS = new Set([ const EXCLUDED_DIRS = new Set([
'.git', '.git',
'node_modules', 'node_modules',
'vendor' 'vendor'
]) ])
var INCLUDED_EXTENSIONS = new Set([ const INCLUDED_EXTENSIONS = new Set([
// This extension whitelist is how we avoid modifying binary files // This extension whitelist is how we avoid modifying binary files
'', '',
'.css', '.css',
......
...@@ -5,27 +5,6 @@ module.exports = (ctx) => ({ ...@@ -5,27 +5,6 @@ module.exports = (ctx) => ({
sourcesContent: true sourcesContent: true
}, },
plugins: { plugins: {
autoprefixer: { autoprefixer: {}
browsers: [
//
// Official browser support policy:
// https://getbootstrap.com/docs/4.0/getting-started/browsers-devices/#supported-browsers
//
'Chrome >= 45', // Exact version number here is kinda arbitrary
'Firefox ESR',
// Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
// NOT the Edge app version shown in Edge's "About" screen.
// For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
// See also https://github.com/Fyrd/caniuse/issues/1928
'Edge >= 12',
'Explorer >= 10',
// Out of leniency, we prefix these 1 version further back than the official policy.
'iOS >= 9',
'Safari >= 9',
// The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
'Android >= 4.4',
'Opera >= 30'
]
}
} }
}) })
...@@ -5,17 +5,15 @@ const pkg = require(path.resolve(__dirname, '../package.json')) ...@@ -5,17 +5,15 @@ const pkg = require(path.resolve(__dirname, '../package.json'))
const BUNDLE = process.env.BUNDLE === 'true' const BUNDLE = process.env.BUNDLE === 'true'
const year = new Date().getFullYear() const year = new Date().getFullYear()
var fileDest = 'bootstrap.js' let fileDest = 'bootstrap.js'
var external = ['jquery', 'popper.js'] const external = ['jquery', 'popper.js']
const plugins = [ const plugins = [
babel({ babel({
exclude: 'node_modules/**', // only transpile our source code exclude: 'node_modules/**', // only transpile our source code
externalHelpersWhitelist: [ // include only required helpers externalHelpersWhitelist: [ // include only required helpers
'typeof', 'defineProperties',
'classCallCheck',
'createClass', 'createClass',
'inherits', 'inheritsLoose'
'possibleConstructorReturn'
] ]
}) })
] ]
...@@ -46,6 +44,5 @@ module.exports = { ...@@ -46,6 +44,5 @@ module.exports = {
* Bootstrap v${pkg.version} (${pkg.homepage}) * Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author} * Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */`
`
} }
{ {
"output": { "output": {
"comments": "/^!/" "comments": "/^!/"
}, },
"compress": { "compress": {
"typeofs": false "typeofs": false
} }
......
{
"globDirectory": "./",
"globPatterns": [
"_gh_pages/**/*.{html,css,js,json,png,jpg}"
],
"swSrc": "./sw.js",
"swDest": "./_gh_pages/sw.js"
}
const fs = require('fs')
const path = require('path')
const swBuild = require('workbox-build')
const config = require('./workbox.config.json')
const buildPrefix = '_gh_pages/'
const workboxSWSrcPath = require.resolve('workbox-sw')
const wbFileName = path.basename(workboxSWSrcPath)
const workboxSWDestPath = buildPrefix + 'assets/js/vendor/' + wbFileName
const workboxSWSrcMapPath = `${workboxSWSrcPath}.map`
const workboxSWDestMapPath = `${workboxSWDestPath}.map`
fs.createReadStream(workboxSWSrcPath).pipe(fs.createWriteStream(workboxSWDestPath))
fs.createReadStream(workboxSWSrcMapPath).pipe(fs.createWriteStream(workboxSWDestMapPath))
const updateUrl = (manifestEntries) => manifestEntries.map((entry) => {
if (entry.url.startsWith(buildPrefix)) {
const regex = new RegExp(buildPrefix, 'g')
entry.url = entry.url.replace(regex, '')
}
return entry
})
config.manifestTransforms = [updateUrl]
swBuild.injectManifest(config).then(() => {
const wbSwRegex = /{fileName}/g
fs.readFile(config.swDest, 'utf8', (err, data) => {
if (err) {
throw err
}
const swFileContents = data.replace(wbSwRegex, wbFileName)
fs.writeFile(config.swDest, swFileContents, () => {
console.log('Pre-cache Manifest generated.')
})
})
})
...@@ -3530,6 +3530,8 @@ tbody.collapse.show { ...@@ -3530,6 +3530,8 @@ tbody.collapse.show {
.navbar-collapse { .navbar-collapse {
-ms-flex-preferred-size: 100%; -ms-flex-preferred-size: 100%;
flex-basis: 100%; flex-basis: 100%;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
} }
...@@ -3597,6 +3599,8 @@ tbody.collapse.show { ...@@ -3597,6 +3599,8 @@ tbody.collapse.show {
.navbar-expand-sm .navbar-collapse { .navbar-expand-sm .navbar-collapse {
display: -ms-flexbox !important; display: -ms-flexbox !important;
display: flex !important; display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
} }
.navbar-expand-sm .navbar-toggler { .navbar-expand-sm .navbar-toggler {
display: none; display: none;
...@@ -3643,6 +3647,8 @@ tbody.collapse.show { ...@@ -3643,6 +3647,8 @@ tbody.collapse.show {
.navbar-expand-md .navbar-collapse { .navbar-expand-md .navbar-collapse {
display: -ms-flexbox !important; display: -ms-flexbox !important;
display: flex !important; display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
} }
.navbar-expand-md .navbar-toggler { .navbar-expand-md .navbar-toggler {
display: none; display: none;
...@@ -3689,6 +3695,8 @@ tbody.collapse.show { ...@@ -3689,6 +3695,8 @@ tbody.collapse.show {
.navbar-expand-lg .navbar-collapse { .navbar-expand-lg .navbar-collapse {
display: -ms-flexbox !important; display: -ms-flexbox !important;
display: flex !important; display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
} }
.navbar-expand-lg .navbar-toggler { .navbar-expand-lg .navbar-toggler {
display: none; display: none;
...@@ -3735,6 +3743,8 @@ tbody.collapse.show { ...@@ -3735,6 +3743,8 @@ tbody.collapse.show {
.navbar-expand-xl .navbar-collapse { .navbar-expand-xl .navbar-collapse {
display: -ms-flexbox !important; display: -ms-flexbox !important;
display: flex !important; display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
} }
.navbar-expand-xl .navbar-toggler { .navbar-expand-xl .navbar-toggler {
display: none; display: none;
...@@ -3784,6 +3794,8 @@ tbody.collapse.show { ...@@ -3784,6 +3794,8 @@ tbody.collapse.show {
.navbar-expand .navbar-collapse { .navbar-expand .navbar-collapse {
display: -ms-flexbox !important; display: -ms-flexbox !important;
display: flex !important; display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
} }
.navbar-expand .navbar-toggler { .navbar-expand .navbar-toggler {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -33,10 +33,9 @@ var Util = function () { ...@@ -33,10 +33,9 @@ var Util = function () {
MozTransition: 'transitionend', MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend', OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend' transition: 'transitionend'
};
// shoutout AngusCroll (https://goo.gl/pxwQGp) // shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) { };function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
} }
...@@ -256,14 +255,14 @@ var Alert = function () { ...@@ -256,14 +255,14 @@ var Alert = function () {
ALERT: 'alert', ALERT: 'alert',
FADE: 'fade', FADE: 'fade',
SHOW: 'show' SHOW: 'show'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Alert = function () { var Alert = function () {
function Alert(element) { function Alert(element) {
classCallCheck(this, Alert); classCallCheck(this, Alert);
...@@ -436,14 +435,14 @@ var Button = function () { ...@@ -436,14 +435,14 @@ var Button = function () {
var Event = { var Event = {
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY) FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Button = function () { var Button = function () {
function Button(element) { function Button(element) {
classCallCheck(this, Button); classCallCheck(this, Button);
...@@ -645,14 +644,14 @@ var Carousel = function () { ...@@ -645,14 +644,14 @@ var Carousel = function () {
INDICATORS: '.carousel-indicators', INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]', DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]' DATA_RIDE: '[data-ride="carousel"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Carousel = function () { var Carousel = function () {
function Carousel(element, config) { function Carousel(element, config) {
classCallCheck(this, Carousel); classCallCheck(this, Carousel);
...@@ -1129,14 +1128,14 @@ var Collapse = function () { ...@@ -1129,14 +1128,14 @@ var Collapse = function () {
var Selector = { var Selector = {
ACTIVES: '.show, .collapsing', ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]' DATA_TOGGLE: '[data-toggle="collapse"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Collapse = function () { var Collapse = function () {
function Collapse(element, config) { function Collapse(element, config) {
classCallCheck(this, Collapse); classCallCheck(this, Collapse);
...@@ -1404,7 +1403,7 @@ var Collapse = function () { ...@@ -1404,7 +1403,7 @@ var Collapse = function () {
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A' && !$.contains(this, event.target)) { if (event.currentTarget.tagName === 'A') {
event.preventDefault(); event.preventDefault();
} }
...@@ -3951,14 +3950,14 @@ var Dropdown = function () { ...@@ -3951,14 +3950,14 @@ var Dropdown = function () {
var DefaultType = { var DefaultType = {
offset: '(number|string)', offset: '(number|string)',
flip: 'boolean' flip: 'boolean'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Dropdown = function () { var Dropdown = function () {
function Dropdown(element, config) { function Dropdown(element, config) {
classCallCheck(this, Dropdown); classCallCheck(this, Dropdown);
...@@ -4102,10 +4101,9 @@ var Dropdown = function () { ...@@ -4102,10 +4101,9 @@ var Dropdown = function () {
enabled: this._config.flip enabled: this._config.flip
} }
} }
};
// Disable Popper.js for Dropdown in Navbar // Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) { };if (this._inNavbar) {
popperConfig.modifiers.applyStyle = { popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar enabled: !this._inNavbar
}; };
...@@ -4358,14 +4356,14 @@ var Modal = function () { ...@@ -4358,14 +4356,14 @@ var Modal = function () {
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top', STICKY_CONTENT: '.sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler' NAVBAR_TOGGLER: '.navbar-toggler'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Modal = function () { var Modal = function () {
function Modal(element, config) { function Modal(element, config) {
classCallCheck(this, Modal); classCallCheck(this, Modal);
...@@ -4973,14 +4971,14 @@ var Tooltip = function () { ...@@ -4973,14 +4971,14 @@ var Tooltip = function () {
FOCUS: 'focus', FOCUS: 'focus',
CLICK: 'click', CLICK: 'click',
MANUAL: 'manual' MANUAL: 'manual'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Tooltip = function () { var Tooltip = function () {
function Tooltip(element, config) { function Tooltip(element, config) {
classCallCheck(this, Tooltip); classCallCheck(this, Tooltip);
...@@ -5409,18 +5407,18 @@ var Tooltip = function () { ...@@ -5409,18 +5407,18 @@ var Tooltip = function () {
Tooltip.prototype._getConfig = function _getConfig(config) { Tooltip.prototype._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
if (config.delay && typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
show: config.delay, show: config.delay,
hide: config.delay hide: config.delay
}; };
} }
if (config.title && typeof config.title === 'number') { if (typeof config.title === 'number') {
config.title = config.title.toString(); config.title = config.title.toString();
} }
if (config.content && typeof config.content === 'number') { if (typeof config.content === 'number') {
config.content = config.content.toString(); config.content = config.content.toString();
} }
...@@ -5604,14 +5602,14 @@ var Popover = function () { ...@@ -5604,14 +5602,14 @@ var Popover = function () {
FOCUSOUT: 'focusout' + EVENT_KEY, FOCUSOUT: 'focusout' + EVENT_KEY,
MOUSEENTER: 'mouseenter' + EVENT_KEY, MOUSEENTER: 'mouseenter' + EVENT_KEY,
MOUSELEAVE: 'mouseleave' + EVENT_KEY MOUSELEAVE: 'mouseleave' + EVENT_KEY
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Popover = function (_Tooltip) { var Popover = function (_Tooltip) {
inherits(Popover, _Tooltip); inherits(Popover, _Tooltip);
...@@ -5803,14 +5801,14 @@ var ScrollSpy = function () { ...@@ -5803,14 +5801,14 @@ var ScrollSpy = function () {
var OffsetMethod = { var OffsetMethod = {
OFFSET: 'offset', OFFSET: 'offset',
POSITION: 'position' POSITION: 'position'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var ScrollSpy = function () { var ScrollSpy = function () {
function ScrollSpy(element, config) { function ScrollSpy(element, config) {
var _this = this; var _this = this;
...@@ -6104,14 +6102,14 @@ var Tab = function () { ...@@ -6104,14 +6102,14 @@ var Tab = function () {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle', DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Tab = function () { var Tab = function () {
function Tab(element) { function Tab(element) {
classCallCheck(this, Tab); classCallCheck(this, Tab);
......
This diff is collapsed.
...@@ -34,10 +34,9 @@ var Util = function () { ...@@ -34,10 +34,9 @@ var Util = function () {
MozTransition: 'transitionend', MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend', OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend' transition: 'transitionend'
};
// shoutout AngusCroll (https://goo.gl/pxwQGp) // shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) { };function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
} }
...@@ -257,14 +256,14 @@ var Alert = function () { ...@@ -257,14 +256,14 @@ var Alert = function () {
ALERT: 'alert', ALERT: 'alert',
FADE: 'fade', FADE: 'fade',
SHOW: 'show' SHOW: 'show'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Alert = function () { var Alert = function () {
function Alert(element) { function Alert(element) {
classCallCheck(this, Alert); classCallCheck(this, Alert);
...@@ -437,14 +436,14 @@ var Button = function () { ...@@ -437,14 +436,14 @@ var Button = function () {
var Event = { var Event = {
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY) FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Button = function () { var Button = function () {
function Button(element) { function Button(element) {
classCallCheck(this, Button); classCallCheck(this, Button);
...@@ -646,14 +645,14 @@ var Carousel = function () { ...@@ -646,14 +645,14 @@ var Carousel = function () {
INDICATORS: '.carousel-indicators', INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]', DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]' DATA_RIDE: '[data-ride="carousel"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Carousel = function () { var Carousel = function () {
function Carousel(element, config) { function Carousel(element, config) {
classCallCheck(this, Carousel); classCallCheck(this, Carousel);
...@@ -1130,14 +1129,14 @@ var Collapse = function () { ...@@ -1130,14 +1129,14 @@ var Collapse = function () {
var Selector = { var Selector = {
ACTIVES: '.show, .collapsing', ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]' DATA_TOGGLE: '[data-toggle="collapse"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Collapse = function () { var Collapse = function () {
function Collapse(element, config) { function Collapse(element, config) {
classCallCheck(this, Collapse); classCallCheck(this, Collapse);
...@@ -1405,7 +1404,7 @@ var Collapse = function () { ...@@ -1405,7 +1404,7 @@ var Collapse = function () {
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A' && !$.contains(this, event.target)) { if (event.currentTarget.tagName === 'A') {
event.preventDefault(); event.preventDefault();
} }
...@@ -1514,14 +1513,14 @@ var Dropdown = function () { ...@@ -1514,14 +1513,14 @@ var Dropdown = function () {
var DefaultType = { var DefaultType = {
offset: '(number|string)', offset: '(number|string)',
flip: 'boolean' flip: 'boolean'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Dropdown = function () { var Dropdown = function () {
function Dropdown(element, config) { function Dropdown(element, config) {
classCallCheck(this, Dropdown); classCallCheck(this, Dropdown);
...@@ -1665,10 +1664,9 @@ var Dropdown = function () { ...@@ -1665,10 +1664,9 @@ var Dropdown = function () {
enabled: this._config.flip enabled: this._config.flip
} }
} }
};
// Disable Popper.js for Dropdown in Navbar // Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) { };if (this._inNavbar) {
popperConfig.modifiers.applyStyle = { popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar enabled: !this._inNavbar
}; };
...@@ -1921,14 +1919,14 @@ var Modal = function () { ...@@ -1921,14 +1919,14 @@ var Modal = function () {
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top', STICKY_CONTENT: '.sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler' NAVBAR_TOGGLER: '.navbar-toggler'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Modal = function () { var Modal = function () {
function Modal(element, config) { function Modal(element, config) {
classCallCheck(this, Modal); classCallCheck(this, Modal);
...@@ -2536,14 +2534,14 @@ var Tooltip = function () { ...@@ -2536,14 +2534,14 @@ var Tooltip = function () {
FOCUS: 'focus', FOCUS: 'focus',
CLICK: 'click', CLICK: 'click',
MANUAL: 'manual' MANUAL: 'manual'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Tooltip = function () { var Tooltip = function () {
function Tooltip(element, config) { function Tooltip(element, config) {
classCallCheck(this, Tooltip); classCallCheck(this, Tooltip);
...@@ -2972,18 +2970,18 @@ var Tooltip = function () { ...@@ -2972,18 +2970,18 @@ var Tooltip = function () {
Tooltip.prototype._getConfig = function _getConfig(config) { Tooltip.prototype._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
if (config.delay && typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
show: config.delay, show: config.delay,
hide: config.delay hide: config.delay
}; };
} }
if (config.title && typeof config.title === 'number') { if (typeof config.title === 'number') {
config.title = config.title.toString(); config.title = config.title.toString();
} }
if (config.content && typeof config.content === 'number') { if (typeof config.content === 'number') {
config.content = config.content.toString(); config.content = config.content.toString();
} }
...@@ -3167,14 +3165,14 @@ var Popover = function () { ...@@ -3167,14 +3165,14 @@ var Popover = function () {
FOCUSOUT: 'focusout' + EVENT_KEY, FOCUSOUT: 'focusout' + EVENT_KEY,
MOUSEENTER: 'mouseenter' + EVENT_KEY, MOUSEENTER: 'mouseenter' + EVENT_KEY,
MOUSELEAVE: 'mouseleave' + EVENT_KEY MOUSELEAVE: 'mouseleave' + EVENT_KEY
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Popover = function (_Tooltip) { var Popover = function (_Tooltip) {
inherits(Popover, _Tooltip); inherits(Popover, _Tooltip);
...@@ -3366,14 +3364,14 @@ var ScrollSpy = function () { ...@@ -3366,14 +3364,14 @@ var ScrollSpy = function () {
var OffsetMethod = { var OffsetMethod = {
OFFSET: 'offset', OFFSET: 'offset',
POSITION: 'position' POSITION: 'position'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var ScrollSpy = function () { var ScrollSpy = function () {
function ScrollSpy(element, config) { function ScrollSpy(element, config) {
var _this = this; var _this = this;
...@@ -3667,14 +3665,14 @@ var Tab = function () { ...@@ -3667,14 +3665,14 @@ var Tab = function () {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle', DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
};
var Tab = function () { var Tab = function () {
function Tab(element) { function Tab(element) {
classCallCheck(this, Tab); classCallCheck(this, Tab);
......
This diff is collapsed.
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
layout: docs layout: docs
title: History title: History
description: A brief overview of the history of Bootstrap. description: A brief overview of the history of Bootstrap.
redirect_from: redirect_from: "/docs/4.0/about/"
- /docs/4.0/about/
group: about group: about
--- ---
......
...@@ -4,6 +4,7 @@ title: Breadcrumb ...@@ -4,6 +4,7 @@ title: Breadcrumb
description: Indicate the current page's location within a navigational hierarchy that automatically adds separators via CSS. description: Indicate the current page's location within a navigational hierarchy that automatically adds separators via CSS.
group: components group: components
--- ---
## Overview ## Overview
Separators are automatically added in CSS through [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content). Separators are automatically added in CSS through [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content).
......
...@@ -25,6 +25,7 @@ In order for assistive technologies (such as screen readers) to convey that a se ...@@ -25,6 +25,7 @@ In order for assistive technologies (such as screen readers) to convey that a se
In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used. In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used.
{% endcallout %} {% endcallout %}
## Button toolbar ## Button toolbar
Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more. Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more.
......
...@@ -560,7 +560,7 @@ Just like with card groups, card footers in decks will automatically line up. ...@@ -560,7 +560,7 @@ Just like with card groups, card footers in decks will automatically line up.
### Card columns ### Card columns
Cards can be organized into [Masonry](http://masonry.desandro.com)-like columns with just CSS by wrapping them in `.card-columns`. Cards are built with CSS `column` properties instead of flexbox for easier alignment. Cards are ordered from top to bottom and left to right. Cards can be organized into [Masonry](https://masonry.desandro.com/)-like columns with just CSS by wrapping them in `.card-columns`. Cards are built with CSS `column` properties instead of flexbox for easier alignment. Cards are ordered from top to bottom and left to right.
**Heads up!** Your mileage with card columns may vary. To prevent cards breaking across columns, we must set them to `display: inline-block` as `column-break-inside: avoid` isn't a bulletproof solution yet. **Heads up!** Your mileage with card columns may vary. To prevent cards breaking across columns, we must set them to `display: inline-block` as `column-break-inside: avoid` isn't a bulletproof solution yet.
...@@ -591,7 +591,7 @@ Cards can be organized into [Masonry](http://masonry.desandro.com)-like columns ...@@ -591,7 +591,7 @@ Cards can be organized into [Masonry](http://masonry.desandro.com)-like columns
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div> </div>
</div> </div>
<div class="card bg-primary p-3 text-center"> <div class="card bg-primary text-white text-center p-3">
<blockquote class="blockquote mb-0"> <blockquote class="blockquote mb-0">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.</p>
<footer class="blockquote-footer"> <footer class="blockquote-footer">
......
...@@ -186,9 +186,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap ...@@ -186,9 +186,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<tbody> <tbody>
<tr> <tr>
<td>parent</td> <td>parent</td>
<td>selector</td> <td>selector | jQuery object | DOM element </td>
<td>false</td> <td>false</td>
<td>If a selector is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the <code>card</code> class). The attribute has to be set on the target collapsible area.</td> <td>If parent is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the <code>card</code> class). The attribute has to be set on the target collapsible area.</td>
</tr> </tr>
<tr> <tr>
<td>toggle</td> <td>toggle</td>
......
...@@ -10,7 +10,7 @@ toc: true ...@@ -10,7 +10,7 @@ toc: true
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/) Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/)
Dropdowns are built on a third party library, [Popper.js](https://popper.js.org), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{ site.cdn.popper }}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js. Dropdowns are built on a third party library, [Popper.js](https://popper.js.org/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{ site.cdn.popper }}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js.
If you're building our JS from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util). If you're building our JS from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment