Commit df47558e authored by Mark Otto's avatar Mark Otto
Browse files

dist

parent fbd1f52f
main cleanup-floating-forms cssvar-function dependabot/npm_and_yarn/stylelint-and-stylelint-config-twbs-bootstrap-15.3.0 extend-snippets feat/data-target floating-always-visible floating-labels-icons fod-main-banner form-controls-with-icons github/fork/719media/patch-13 github/fork/719media/patch-14 github/fork/719media/patch-9 github/fork/ChellyAhmed/fix-typo-reboot.md github/fork/ChellyAhmed/offcanvas-scroll-back github/fork/CtrlAltLilith/main github/fork/Elysiome/offcanvas-optional-window-resizing github/fork/JanSargsyan/main github/fork/LunicLynx/support-different-line-height-for-buttons github/fork/Psixodelik/main github/fork/Ronid1/ronid1/offcanvas_static_backdrop github/fork/RyanBerliner/tooltip-accessibility github/fork/SantiagoPVazquez/Feature-default-border-bottom-to-dropdown-item github/fork/Sir-Genius/utils github/fork/Sumit-Singh-8/main github/fork/Viktor-VERA2020/offcanvas-slide github/fork/Zivangu9/input-group-for-form-control-plaintext github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation github/fork/astagi/fix/tree-shake-modules github/fork/compnerd/dark-accordion-icon github/fork/derSascha/dropdown-dont-close-on-input-click github/fork/dev-ph1l/main github/fork/donquixote/issue-33861-utl-mixin github/fork/florianlacreuse/mixin-make-row-gutter-y github/fork/gregorw/main github/fork/iteggmbh/transitionend-dispose-race github/fork/jdelStrother/patch-1 github/fork/jonnysp/form-floating github/fork/jonnysp/independent-offcanvas github/fork/jonnysp/theme-dark-on-card-and-modal-fix github/fork/josefdlange/floating-label-placeholder-opacity github/fork/julien-deramond/enhance-change-version.js github/fork/julien-deramond/main-jd-fix-offset-content github/fork/julien-deramond/main-jd-issue-with-utitlies github/fork/julien-deramond/main-xmr-pa11y-ci-jd-add-hideElements github/fork/kyletsang/fix-tooltip-padding github/fork/lacutah/CheckboxCenteringDocumentation github/fork/lekoala/patch-3 github/fork/louismaximepiton/main-kld-lmp-collapse-proposal github/fork/louismaximepiton/main-lmp-card-inner-border-radius-fix github/fork/louismaximepiton/main-lmp-carousel-multiple-images github/fork/louismaximepiton/main-lmp-css-var-init github/fork/louismaximepiton/main-lmp-disabled-floating-label-fix github/fork/louismaximepiton/main-lmp-input-range-fix github/fork/louismaximepiton/main-lmp-shift-color github/fork/louismaximepiton/main-lmp-table-active-tr-fix github/fork/maciek-szn/switch github/fork/michael-roth/feature/19964-multiple-tab-targets github/fork/mistic100/dom-utils github/fork/nkdas91/accordion github/fork/nstungcom/fix-missing-modal-open-class github/fork/oraliahdz/animation-utilities github/fork/pine3ree/patch-7 github/fork/pouwerkerk/unindent-scss-docs-shortcode github/fork/smares/smares-no-scolling-on-modal-close github/fork/tgm-git/patch-1 gs-forms gs-toasts-with-animated-progress-bar gs/add-history-helper gs/change-version-dir-on-docs gs/data-must-set-onlu-one-instance gs/docs/fix-drop-down-error gs/event-handler-2 gs/make-docs-js-build gs/make-simple-attribute-toggler gs/popover-fix-doc gs/provide-steConfig-method gs/scrollspy-smoothscroll-option-use-browser-history gs/streamline-jqueryInterface gs/support-drop-down-in-navbar gs/test-js-generic-trigger gs/try-web-components gs/tweak-collapse-js-selector gs/use-event-handler-in-cocmponent gs/use-rollup-replace-for-version jo-docs-thanks-page jo-ssr-friendly logical-props-spacing-utils main-fod-disabled-form-check-label main-fod-nested-accordion main-fod-simpler-table-structure main-fod-table-separator main-fod-utilities-contrast main-jd-abbr-title main-jd-add-chips main-jd-add-doc-for-sass-custom-colors main-jd-add-enable-host-to-handle-web-components main-jd-browserstack-fine-tune main-jd-browserstack-updates main-jd-docs-consistent-usage-of-css-sections-step-2 main-jd-fix-docs-headers-in-white main-jd-fix-highlight-docs-border-radius main-jd-fix-placeholder-color-background-params-for-img-markup main-jd-glossary-experiment main-jd-postcss-drop-empty-css-vars main-jd-proto-doc-astro main-jd-skip-navigation-component main-jd-stackblitz-for-examples main-jd-upgrade-browserlistrc main-jd-use-host main-lmp-dark-theme-customization main-lmp-handle-scroll-target main-lmp-tab-fix main-mc-opensearch main-xmr-bundlewatch-action main-xmr-eslint-plugin-compat main-xmr-hugo-docs-vendor main-xmr-hugo-rm-ver main-xmr-linkinator-prod main-xmr-min-mangle main-xmr-pa11y-ci more-darkmode-examples nested-dropdowns patrickhlauke-issue37428 patrickhlauke-use-of-color-tweaks pr/34102 pr/37590 previous-next-docs-links sticky-thead utilities-functions-mixin v4-dev v4-dev-dropdown-hide-method v530-dev v6-postcss-custom-media v6-spinner-dots v6/gs/use-floating-ui-in-place-of-popper xmr/dev xmr/docs-png xmr/docs-svgs xmr/hugo-reorg-files xmr/js-2 xmr/markdownlint xmr/prepare-530-alpha2 xmr/xo v5.3.0-alpha1 v5.2.3 v5.2.2 v5.2.1 v5.2.0 v5.2.0-beta1 v5.1.3 v5.1.2 v5.1.1 v5.1.0 v5.0.2 v5.0.1 v5.0.0 v5.0.0-beta3 v5.0.0-beta2 v5.0.0-beta1 v5.0.0-alpha3 v5.0.0-alpha2 v5.0.0-alpha1 v4.6.2 v4.6.1 v4.6.0 v4.5.3 v4.5.2 v4.5.1 v4.5.0 v4.4.1 v4.4.0 v4.3.1 v4.3.0 v4.2.1 v4.2.0 v4.1.3 v4.1.2 v4.1.1 v4.1.0 v4.0.0 v4.0.0-beta.3 v4.0.0-beta.2
8 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!25494web pack,!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23973aaaa,!23207#22402 : modal: new autofocus & keyboardBtnNav options,!17021v4
Showing with 8085 additions and 1548 deletions
+8085 -1548
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -180,7 +180,7 @@ a, ...@@ -180,7 +180,7 @@ a,
area, area,
button, button,
[role="button"], [role="button"],
input, input:not([type=range]),
label, label,
select, select,
summary, summary,
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important} *,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */ /*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -244,7 +244,7 @@ a, ...@@ -244,7 +244,7 @@ a,
area, area,
button, button,
[role="button"], [role="button"],
input, input:not([type=range]),
label, label,
select, select,
summary, summary,
...@@ -1689,51 +1689,105 @@ pre code { ...@@ -1689,51 +1689,105 @@ pre code {
background-color: rgba(0, 0, 0, 0.075); background-color: rgba(0, 0, 0, 0.075);
} }
.thead-inverse th { .table .thead-dark th {
color: #fff; color: #fff;
background-color: #212529; background-color: #212529;
border-color: #32383e;
} }
.thead-default th { .table .thead-light th {
color: #495057; color: #495057;
background-color: #e9ecef; background-color: #e9ecef;
border-color: #e9ecef;
} }
.table-inverse { .table-dark {
color: #fff; color: #fff;
background-color: #212529; background-color: #212529;
} }
.table-inverse th, .table-dark th,
.table-inverse td, .table-dark td,
.table-inverse thead th { .table-dark thead th {
border-color: #32383e; border-color: #32383e;
} }
.table-inverse.table-bordered { .table-dark.table-bordered {
border: 0; border: 0;
} }
.table-inverse.table-striped tbody tr:nth-of-type(odd) { .table-dark.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
} }
.table-inverse.table-hover tbody tr:hover { .table-dark.table-hover tbody tr:hover {
background-color: rgba(255, 255, 255, 0.075); background-color: rgba(255, 255, 255, 0.075);
} }
@media (max-width: 575px) {
.table-responsive-sm {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
.table-responsive-sm.table-bordered {
border: 0;
}
}
@media (max-width: 767px) {
.table-responsive-md {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
.table-responsive-md.table-bordered {
border: 0;
}
}
@media (max-width: 991px) { @media (max-width: 991px) {
.table-responsive { .table-responsive-lg {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
.table-responsive-lg.table-bordered {
border: 0;
}
}
@media (max-width: 1199px) {
.table-responsive-xl {
display: block; display: block;
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
} }
.table-responsive.table-bordered { .table-responsive-xl.table-bordered {
border: 0; border: 0;
} }
} }
.table-responsive {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
.table-responsive.table-bordered {
border: 0;
}
.form-control { .form-control {
display: block; display: block;
width: 100%; width: 100%;
...@@ -4032,6 +4086,10 @@ tbody.collapse.show { ...@@ -4032,6 +4086,10 @@ tbody.collapse.show {
} }
.breadcrumb { .breadcrumb {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding: 0.75rem 1rem; padding: 0.75rem 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
list-style: none; list-style: none;
...@@ -4039,16 +4097,6 @@ tbody.collapse.show { ...@@ -4039,16 +4097,6 @@ tbody.collapse.show {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.breadcrumb::after {
display: block;
clear: both;
content: "";
}
.breadcrumb-item {
float: left;
}
.breadcrumb-item + .breadcrumb-item::before { .breadcrumb-item + .breadcrumb-item::before {
display: inline-block; display: inline-block;
padding-right: 0.5rem; padding-right: 0.5rem;
...@@ -4811,6 +4859,7 @@ button.close { ...@@ -4811,6 +4859,7 @@ button.close {
position: relative; position: relative;
width: auto; width: auto;
margin: 10px; margin: 10px;
pointer-events: none;
} }
.modal-content { .modal-content {
...@@ -4819,6 +4868,7 @@ button.close { ...@@ -4819,6 +4868,7 @@ button.close {
display: flex; display: flex;
-ms-flex-direction: column; -ms-flex-direction: column;
flex-direction: column; flex-direction: column;
pointer-events: auto;
background-color: #fff; background-color: #fff;
background-clip: padding-box; background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2); border: 1px solid rgba(0, 0, 0, 0.2);
......
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
'use strict';
var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
...@@ -9,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons ...@@ -9,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
var Alert = function ($) { var Alert = function () {
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
...@@ -56,98 +58,110 @@ var Alert = function ($) { ...@@ -56,98 +58,110 @@ var Alert = function ($) {
// getters // getters
// public _createClass(Alert, [{
key: 'close',
Alert.prototype.close = function close(element) {
element = element || this._element;
var rootElement = this._getRootElement(element);
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) { // public
return;
}
this._removeElement(rootElement); value: function close(element) {
}; element = element || this._element;
Alert.prototype.dispose = function dispose() { var rootElement = this._getRootElement(element);
$.removeData(this._element, DATA_KEY); var customEvent = this._triggerCloseEvent(rootElement);
this._element = null;
};
// private if (customEvent.isDefaultPrevented()) {
return;
Alert.prototype._getRootElement = function _getRootElement(element) { }
var selector = Util.getSelectorFromElement(element);
var parent = false;
if (selector) { this._removeElement(rootElement);
parent = $(selector)[0];
} }
}, {
if (!parent) { key: 'dispose',
parent = $(element).closest('.' + ClassName.ALERT)[0]; value: function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
} }
return parent; // private
};
Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
$(element).trigger(closeEvent); }, {
return closeEvent; key: '_getRootElement',
}; value: function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var parent = false;
Alert.prototype._removeElement = function _removeElement(element) { if (selector) {
var _this = this; parent = $(selector)[0];
}
$(element).removeClass(ClassName.SHOW); if (!parent) {
parent = $(element).closest('.' + ClassName.ALERT)[0];
}
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { return parent;
this._destroyElement(element);
return;
} }
}, {
key: '_triggerCloseEvent',
value: function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
$(element).one(Util.TRANSITION_END, function (event) { $(element).trigger(closeEvent);
return _this._destroyElement(element, event); return closeEvent;
}).emulateTransitionEnd(TRANSITION_DURATION); }
}; }, {
key: '_removeElement',
Alert.prototype._destroyElement = function _destroyElement(element) { value: function _removeElement(element) {
$(element).detach().trigger(Event.CLOSED).remove(); var _this = this;
};
// static
Alert._jQueryInterface = function _jQueryInterface(config) { $(element).removeClass(ClassName.SHOW);
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) { if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
data = new Alert(this); this._destroyElement(element);
$element.data(DATA_KEY, data); return;
} }
if (config === 'close') { $(element).one(Util.TRANSITION_END, function (event) {
data[config](this); return _this._destroyElement(element, event);
} }).emulateTransitionEnd(TRANSITION_DURATION);
}); }
}; }, {
key: '_destroyElement',
value: function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
}
Alert._handleDismiss = function _handleDismiss(alertInstance) { // static
return function (event) {
if (event) { }], [{
event.preventDefault(); key: '_jQueryInterface',
} value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
alertInstance.close(this); if (!data) {
}; data = new Alert(this);
}; $element.data(DATA_KEY, data);
}
_createClass(Alert, null, [{ if (config === 'close') {
data[config](this);
}
});
}
}, {
key: '_handleDismiss',
value: function _handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
}, {
key: 'VERSION', key: 'VERSION',
get: function get() { get: function get() {
return VERSION; return VERSION;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
'use strict';
var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
...@@ -9,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons ...@@ -9,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
var Button = function ($) { var Button = function () {
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
...@@ -58,74 +60,80 @@ var Button = function ($) { ...@@ -58,74 +60,80 @@ var Button = function ($) {
// getters // getters
// public _createClass(Button, [{
key: 'toggle',
// public
Button.prototype.toggle = function toggle() { value: function toggle() {
var triggerChangeEvent = true; var triggerChangeEvent = true;
var addAriaPressed = true; var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
if (rootElement) { if (rootElement) {
var input = $(this._element).find(Selector.INPUT)[0]; var input = $(this._element).find(Selector.INPUT)[0];
if (input) { if (input) {
if (input.type === 'radio') { if (input.type === 'radio') {
if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
triggerChangeEvent = false; triggerChangeEvent = false;
} else { } else {
var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
if (activeElement) { if (activeElement) {
$(activeElement).removeClass(ClassName.ACTIVE); $(activeElement).removeClass(ClassName.ACTIVE);
}
} }
} }
}
if (triggerChangeEvent) { if (triggerChangeEvent) {
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
return; return;
}
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
$(input).trigger('change');
} }
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
$(input).trigger('change'); input.focus();
addAriaPressed = false;
} }
}
input.focus(); if (addAriaPressed) {
addAriaPressed = false; this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
} }
}
if (addAriaPressed) { if (triggerChangeEvent) {
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); $(this._element).toggleClass(ClassName.ACTIVE);
}
} }
}, {
if (triggerChangeEvent) { key: 'dispose',
$(this._element).toggleClass(ClassName.ACTIVE); value: function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
} }
};
Button.prototype.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
};
// static // static
Button._jQueryInterface = function _jQueryInterface(config) { }], [{
return this.each(function () { key: '_jQueryInterface',
var data = $(this).data(DATA_KEY); value: function _jQueryInterface(config) {
return this.each(function () {
if (!data) { var data = $(this).data(DATA_KEY);
data = new Button(this);
$(this).data(DATA_KEY, data);
}
if (config === 'toggle') { if (!data) {
data[config](); data = new Button(this);
} $(this).data(DATA_KEY, data);
}); }
};
_createClass(Button, null, [{ if (config === 'toggle') {
data[config]();
}
});
}
}, {
key: 'VERSION', key: 'VERSION',
get: function get() { get: function get() {
return VERSION; return VERSION;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
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