1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
This commit is contained in:
Mark Otto 2017-10-29 16:19:14 -07:00
parent b5cd9b91b2
commit c5af0a7d6a
16 changed files with 176 additions and 71 deletions

View file

@ -2931,6 +2931,69 @@ tbody.collapse.show {
margin-left: 0; margin-left: 0;
} }
.dropright .dropdown-menu {
margin-top: 0;
margin-left: 0.125rem;
}
.dropright .dropdown-toggle::after {
display: inline-block;
width: 0;
height: 0;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid transparent;
border-bottom: 0.3em solid transparent;
border-left: 0.3em solid;
}
.dropright .dropdown-toggle:empty::after {
margin-left: 0;
}
.dropright .dropdown-toggle::after {
vertical-align: 0;
}
.dropleft .dropdown-menu {
margin-top: 0;
margin-right: 0.125rem;
}
.dropleft .dropdown-toggle::after {
display: inline-block;
width: 0;
height: 0;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
}
.dropleft .dropdown-toggle::after {
display: none;
}
.dropleft .dropdown-toggle::before {
display: inline-block;
width: 0;
height: 0;
margin-right: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid transparent;
border-right: 0.3em solid;
border-bottom: 0.3em solid transparent;
}
.dropleft .dropdown-toggle:empty::after {
margin-left: 0;
}
.dropleft .dropdown-toggle::before {
vertical-align: 0;
}
.dropdown-divider { .dropdown-divider {
height: 0; height: 0;
margin: 0.5rem 0; margin: 0.5rem 0;
@ -5093,12 +5156,23 @@ button.close {
transform: translate(0, 0); transform: translate(0, 0);
} }
.modal-dialog-centered {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
height: 100%;
margin-top: 0;
margin-bottom: 0;
}
.modal-content { .modal-content {
position: relative; position: relative;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
-ms-flex-direction: column; -ms-flex-direction: column;
flex-direction: column; flex-direction: column;
width: 100%;
pointer-events: auto; pointer-events: auto;
background-color: #fff; background-color: #fff;
background-clip: padding-box; background-clip: padding-box;
@ -5187,6 +5261,10 @@ button.close {
max-width: 500px; max-width: 500px;
margin: 30px auto; margin: 30px auto;
} }
.modal-dialog-centered {
margin-top: 0;
margin-bottom: 0;
}
.modal-sm { .modal-sm {
max-width: 300px; max-width: 300px;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -3817,20 +3817,11 @@ Popper.Defaults = Defaults;
*/ */
var Dropdown = function ($$$1) { var Dropdown = function ($$$1) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'dropdown'; var NAME = 'dropdown';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.dropdown'; var DATA_KEY = 'bs.dropdown';
@ -3864,6 +3855,8 @@ var Dropdown = function ($$$1) {
DISABLED: 'disabled', DISABLED: 'disabled',
SHOW: 'show', SHOW: 'show',
DROPUP: 'dropup', DROPUP: 'dropup',
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right', MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left' MENULEFT: 'dropdown-menu-left'
}; };
@ -3878,7 +3871,11 @@ var Dropdown = function ($$$1) {
TOP: 'top-start', TOP: 'top-start',
TOPEND: 'top-end', TOPEND: 'top-end',
BOTTOM: 'bottom-start', BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end' BOTTOMEND: 'bottom-end',
RIGHT: 'right-start',
RIGHTEND: 'right-end',
LEFT: 'left-start',
LEFTEND: 'left-end'
}; };
var Default = { var Default = {
offset: 0, offset: 0,
@ -3936,6 +3933,15 @@ var Dropdown = function ($$$1) {
if (showEvent.isDefaultPrevented()) { if (showEvent.isDefaultPrevented()) {
return; return;
} }
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
var element = this._element; // for dropup with alignment we use the parent as popper container var element = this._element; // for dropup with alignment we use the parent as popper container
@ -4021,6 +4027,10 @@ var Dropdown = function ($$$1) {
if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND; placement = AttachmentMap.TOPEND;
} }
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND; placement = AttachmentMap.BOTTOMEND;
} }
@ -4839,20 +4849,11 @@ var Modal = function ($$$1) {
*/ */
var Tooltip = function ($$$1) { var Tooltip = function ($$$1) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'tooltip'; var NAME = 'tooltip';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.tooltip'; var DATA_KEY = 'bs.tooltip';
@ -4936,7 +4937,15 @@ var Tooltip = function ($$$1) {
/*#__PURE__*/ /*#__PURE__*/
function () { function () {
function Tooltip(element, config) { function Tooltip(element, config) {
// private /**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
} // private
this._isEnabled = true; this._isEnabled = true;
this._timeout = 0; this._timeout = 0;
this._hoverState = ''; this._hoverState = '';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1386,20 +1386,11 @@ var Collapse = function ($$$1) {
*/ */
var Dropdown = function ($$$1) { var Dropdown = function ($$$1) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'dropdown'; var NAME = 'dropdown';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.dropdown'; var DATA_KEY = 'bs.dropdown';
@ -1433,6 +1424,8 @@ var Dropdown = function ($$$1) {
DISABLED: 'disabled', DISABLED: 'disabled',
SHOW: 'show', SHOW: 'show',
DROPUP: 'dropup', DROPUP: 'dropup',
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right', MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left' MENULEFT: 'dropdown-menu-left'
}; };
@ -1447,7 +1440,11 @@ var Dropdown = function ($$$1) {
TOP: 'top-start', TOP: 'top-start',
TOPEND: 'top-end', TOPEND: 'top-end',
BOTTOM: 'bottom-start', BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end' BOTTOMEND: 'bottom-end',
RIGHT: 'right-start',
RIGHTEND: 'right-end',
LEFT: 'left-start',
LEFTEND: 'left-end'
}; };
var Default = { var Default = {
offset: 0, offset: 0,
@ -1505,6 +1502,15 @@ var Dropdown = function ($$$1) {
if (showEvent.isDefaultPrevented()) { if (showEvent.isDefaultPrevented()) {
return; return;
} }
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
var element = this._element; // for dropup with alignment we use the parent as popper container var element = this._element; // for dropup with alignment we use the parent as popper container
@ -1590,6 +1596,10 @@ var Dropdown = function ($$$1) {
if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND; placement = AttachmentMap.TOPEND;
} }
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND; placement = AttachmentMap.BOTTOMEND;
} }
@ -2408,20 +2418,11 @@ var Modal = function ($$$1) {
*/ */
var Tooltip = function ($$$1) { var Tooltip = function ($$$1) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'tooltip'; var NAME = 'tooltip';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.tooltip'; var DATA_KEY = 'bs.tooltip';
@ -2505,7 +2506,15 @@ var Tooltip = function ($$$1) {
/*#__PURE__*/ /*#__PURE__*/
function () { function () {
function Tooltip(element, config) { function Tooltip(element, config) {
// private /**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
} // private
this._isEnabled = true; this._isEnabled = true;
this._timeout = 0; this._timeout = 0;
this._hoverState = ''; this._hoverState = '';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

30
js/dist/dropdown.js vendored
View file

@ -9,20 +9,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
var Dropdown = function ($) { var Dropdown = function ($) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'dropdown'; var NAME = 'dropdown';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.dropdown'; var DATA_KEY = 'bs.dropdown';
@ -56,6 +47,8 @@ var Dropdown = function ($) {
DISABLED: 'disabled', DISABLED: 'disabled',
SHOW: 'show', SHOW: 'show',
DROPUP: 'dropup', DROPUP: 'dropup',
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right', MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left' MENULEFT: 'dropdown-menu-left'
}; };
@ -70,7 +63,11 @@ var Dropdown = function ($) {
TOP: 'top-start', TOP: 'top-start',
TOPEND: 'top-end', TOPEND: 'top-end',
BOTTOM: 'bottom-start', BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end' BOTTOMEND: 'bottom-end',
RIGHT: 'right-start',
RIGHTEND: 'right-end',
LEFT: 'left-start',
LEFTEND: 'left-end'
}; };
var Default = { var Default = {
offset: 0, offset: 0,
@ -128,6 +125,15 @@ var Dropdown = function ($) {
if (showEvent.isDefaultPrevented()) { if (showEvent.isDefaultPrevented()) {
return; return;
} }
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
var element = this._element; // for dropup with alignment we use the parent as popper container var element = this._element; // for dropup with alignment we use the parent as popper container
@ -213,6 +219,10 @@ var Dropdown = function ($) {
if ($(this._menu).hasClass(ClassName.MENURIGHT)) { if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND; placement = AttachmentMap.TOPEND;
} }
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND; placement = AttachmentMap.BOTTOMEND;
} }

File diff suppressed because one or more lines are too long

19
js/dist/tooltip.js vendored
View file

@ -9,20 +9,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
var Tooltip = function ($) { var Tooltip = function ($) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
}
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Constants * Constants
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var NAME = 'tooltip'; var NAME = 'tooltip';
var VERSION = '4.0.0-beta.2'; var VERSION = '4.0.0-beta.2';
var DATA_KEY = 'bs.tooltip'; var DATA_KEY = 'bs.tooltip';
@ -106,7 +97,15 @@ var Tooltip = function ($) {
/*#__PURE__*/ /*#__PURE__*/
function () { function () {
function Tooltip(element, config) { function Tooltip(element, config) {
// private /**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
} // private
this._isEnabled = true; this._isEnabled = true;
this._timeout = 0; this._timeout = 0;
this._hoverState = ''; this._hoverState = '';

File diff suppressed because one or more lines are too long