Commit 935d45f4 authored by Mark Otto's avatar Mark Otto
Browse files

dist

parent 13150872
Showing with 30 additions and 37 deletions
+30 -37
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -4,6 +4,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d ...@@ -4,6 +4,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v4.0.0-beta.2): popover.js * Bootstrap (v4.0.0-beta.2): popover.js
...@@ -23,15 +25,18 @@ var Popover = function ($) { ...@@ -23,15 +25,18 @@ var Popover = function ($) {
var JQUERY_NO_CONFLICT = $.fn[NAME]; var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover'; var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var Default = $.extend({}, Tooltip.Default, {
var Default = _extends({}, Tooltip.Default, {
placement: 'right', placement: 'right',
trigger: 'click', trigger: 'click',
content: '', content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
}); });
var DefaultType = $.extend({}, Tooltip.DefaultType, {
var DefaultType = _extends({}, Tooltip.DefaultType, {
content: '(string|element|function)' content: '(string|element|function)'
}); });
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
SHOW: 'show' SHOW: 'show'
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
...@@ -142,7 +144,7 @@ var ScrollSpy = function ($) { ...@@ -142,7 +144,7 @@ var ScrollSpy = function ($) {
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config); config = _extends({}, Default, config);
if (typeof config.target !== 'string') { if (typeof config.target !== 'string') {
var id = $(config.target).attr('id'); var id = $(config.target).attr('id');
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -142,7 +142,7 @@ var Tab = function ($) { ...@@ -142,7 +142,7 @@ var Tab = function ($) {
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE); var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
var complete = function complete() { var complete = function complete() {
return _this2._transitionComplete(element, active, isTransitioning, callback); return _this2._transitionComplete(element, active, callback);
}; };
if (active && isTransitioning) { if (active && isTransitioning) {
...@@ -150,15 +150,11 @@ var Tab = function ($) { ...@@ -150,15 +150,11 @@ var Tab = function ($) {
} else { } else {
complete(); complete();
} }
if (active) {
$(active).removeClass(ClassName.SHOW);
}
}; };
_proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) { _proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) { if (active) {
$(active).removeClass(ClassName.ACTIVE); $(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
if (dropdownChild) { if (dropdownChild) {
...@@ -176,12 +172,8 @@ var Tab = function ($) { ...@@ -176,12 +172,8 @@ var Tab = function ($) {
element.setAttribute('aria-selected', true); element.setAttribute('aria-selected', true);
} }
if (isTransitioning) { Util.reflow(element);
Util.reflow(element); $(element).addClass(ClassName.SHOW);
$(element).addClass(ClassName.SHOW);
} else {
$(element).removeClass(ClassName.FADE);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
...@@ -33,7 +35,8 @@ var Tooltip = function ($) { ...@@ -33,7 +35,8 @@ var Tooltip = function ($) {
placement: '(string|function)', placement: '(string|function)',
offset: '(number|string)', offset: '(number|string)',
container: '(string|element|boolean)', container: '(string|element|boolean)',
fallbackPlacement: '(string|array)' fallbackPlacement: '(string|array)',
boundary: '(string|element)'
}; };
var AttachmentMap = { var AttachmentMap = {
AUTO: 'auto', AUTO: 'auto',
...@@ -53,7 +56,8 @@ var Tooltip = function ($) { ...@@ -53,7 +56,8 @@ var Tooltip = function ($) {
placement: 'top', placement: 'top',
offset: 0, offset: 0,
container: false, container: false,
fallbackPlacement: 'flip' fallbackPlacement: 'flip',
boundary: 'scrollParent'
}; };
var HoverState = { var HoverState = {
SHOW: 'show', SHOW: 'show',
...@@ -243,6 +247,9 @@ var Tooltip = function ($) { ...@@ -243,6 +247,9 @@ var Tooltip = function ($) {
}, },
arrow: { arrow: {
element: Selector.ARROW element: Selector.ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
} }
}, },
onCreate: function onCreate(data) { onCreate: function onCreate(data) {
...@@ -420,7 +427,7 @@ var Tooltip = function ($) { ...@@ -420,7 +427,7 @@ var Tooltip = function ($) {
}); });
if (this.config.selector) { if (this.config.selector) {
this.config = $.extend({}, this.config, { this.config = _extends({}, this.config, {
trigger: 'manual', trigger: 'manual',
selector: '' selector: ''
}); });
...@@ -514,7 +521,7 @@ var Tooltip = function ($) { ...@@ -514,7 +521,7 @@ var Tooltip = function ($) {
}; };
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); config = _extends({}, this.constructor.Default, $(this.element).data(), config);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -11,12 +11,7 @@ var Util = function ($) { ...@@ -11,12 +11,7 @@ var Util = function ($) {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var transition = false; var transition = false;
var MAX_UID = 1000000; var MAX_UID = 1000000; // shoutout AngusCroll (https://goo.gl/pxwQGp)
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
transition: 'transitionend' // 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();
...@@ -41,17 +36,9 @@ var Util = function ($) { ...@@ -41,17 +36,9 @@ var Util = function ($) {
return false; return false;
} }
var el = document.createElement('bootstrap'); return {
end: 'transitionend'
for (var name in TransitionEndEvent) { };
if (typeof el.style[name] !== 'undefined') {
return {
end: TransitionEndEvent[name]
};
}
}
return false;
} }
function transitionEndEmulator(duration) { function transitionEndEmulator(duration) {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
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