mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-22 17:47:11 +03:00
Release 3.10.1
This commit is contained in:
parent
0fa19988ce
commit
5f758b40d3
|
@ -1,5 +1,5 @@
|
||||||
MDB5
|
MDB5
|
||||||
Version: FREE 3.10.0
|
Version: FREE 3.10.1
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
https://mdbootstrap.com/docs/standard/
|
https://mdbootstrap.com/docs/standard/
|
||||||
|
|
2
css/mdb.min.css
vendored
2
css/mdb.min.css
vendored
|
@ -1,6 +1,6 @@
|
||||||
/*!
|
/*!
|
||||||
* MDB5
|
* MDB5
|
||||||
* Version: FREE 3.10.0
|
* Version: FREE 3.10.1
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright: Material Design for Bootstrap
|
* Copyright: Material Design for Bootstrap
|
||||||
|
|
File diff suppressed because one or more lines are too long
20
index.html
20
index.html
|
@ -22,20 +22,12 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
|
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<img
|
<img class="mb-2" src="https://bf-sale.mdbgo.io/bf.png" width="800" height="450">
|
||||||
class="mb-4"
|
<h2 class="fw-bold">Black Friday Sale</h2>
|
||||||
src="https://mdbootstrap.com/img/logo/mdb-transparent-250px.png"
|
<h5 class="mb-3">Get MDB Pro with discounts <span class="text-danger">up to 95%</span>.</h5>
|
||||||
style="width: 250px; height: 90px;"
|
<p class="mb-3 fw-bold"> Hurry up the offer is limited!</p>
|
||||||
/>
|
|
||||||
<h5 class="mb-3">Thank you for using our product. We're glad you're with us.</h5>
|
<a class="btn btn-black btn-lg mt-2" href="https://mdbootstrap.com/bf/sale/" target="_blank" role="button"> <i class="fas fa-shopping-cart"></i> Get the offer</a>
|
||||||
<p class="mb-3">MDB Team</p>
|
|
||||||
<a
|
|
||||||
class="btn btn-primary btn-lg"
|
|
||||||
href="https://mdbootstrap.com/docs/standard/getting-started/"
|
|
||||||
target="_blank"
|
|
||||||
role="button"
|
|
||||||
>Start MDB tutorial</a
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
4
js/mdb.min.js
vendored
4
js/mdb.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mdb-ui-kit",
|
"name": "mdb-ui-kit",
|
||||||
"version": "3.10.0",
|
"version": "3.10.1",
|
||||||
"main": "js/mdb.min.js",
|
"main": "js/mdb.min.js",
|
||||||
"homepage": "https://mdbootstrap.com/docs/standard/",
|
"homepage": "https://mdbootstrap.com/docs/standard/",
|
||||||
"repository": "https://github.com/mdbootstrap/mdb-ui-kit.git",
|
"repository": "https://github.com/mdbootstrap/mdb-ui-kit.git",
|
||||||
|
|
|
@ -131,6 +131,7 @@ class Input {
|
||||||
} else {
|
} else {
|
||||||
this._getLabelWidth();
|
this._getLabelWidth();
|
||||||
this._getLabelPositionInInputGroup();
|
this._getLabelPositionInInputGroup();
|
||||||
|
this._toggleDefaultDatePlaceholder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +167,22 @@ class Input {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_toggleDefaultDatePlaceholder(input = this.input) {
|
||||||
|
const isTypeDate = input.getAttribute('type') === 'date';
|
||||||
|
|
||||||
|
if (!isTypeDate) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isInputFocused = document.activeElement === input;
|
||||||
|
|
||||||
|
if (!isInputFocused && !input.value) {
|
||||||
|
input.style.opacity = 0;
|
||||||
|
} else {
|
||||||
|
input.style.opacity = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_showPlaceholder() {
|
_showPlaceholder() {
|
||||||
Manipulator.addClass(this.input, CLASSNAME_PLACEHOLDER_ACTIVE);
|
Manipulator.addClass(this.input, CLASSNAME_PLACEHOLDER_ACTIVE);
|
||||||
}
|
}
|
||||||
|
@ -232,6 +249,7 @@ class Input {
|
||||||
if (input.value !== '') {
|
if (input.value !== '') {
|
||||||
Manipulator.addClass(input, CLASSNAME_ACTIVE);
|
Manipulator.addClass(input, CLASSNAME_ACTIVE);
|
||||||
}
|
}
|
||||||
|
this._toggleDefaultDatePlaceholder(input);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,9 +276,11 @@ class Input {
|
||||||
|
|
||||||
_deactivate(event) {
|
_deactivate(event) {
|
||||||
const input = event ? event.target : this.input;
|
const input = event ? event.target : this.input;
|
||||||
|
|
||||||
if (input.value === '') {
|
if (input.value === '') {
|
||||||
input.classList.remove(CLASSNAME_ACTIVE);
|
input.classList.remove(CLASSNAME_ACTIVE);
|
||||||
}
|
}
|
||||||
|
this._toggleDefaultDatePlaceholder(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
static activate(instance) {
|
static activate(instance) {
|
||||||
|
|
|
@ -61,12 +61,15 @@ class Ripple {
|
||||||
constructor(element, options) {
|
constructor(element, options) {
|
||||||
this._element = element;
|
this._element = element;
|
||||||
this._options = this._getConfig(options);
|
this._options = this._getConfig(options);
|
||||||
|
|
||||||
if (this._element) {
|
if (this._element) {
|
||||||
Data.setData(element, DATA_KEY, this);
|
Data.setData(element, DATA_KEY, this);
|
||||||
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
|
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._clickHandler = this._createRipple.bind(this);
|
this._clickHandler = this._createRipple.bind(this);
|
||||||
|
this._rippleTimer = null;
|
||||||
|
this._isMinWidthSet = false;
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
@ -100,7 +103,10 @@ class Ripple {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this._element.style.minWidth = `${this._element.offsetWidth}px`;
|
if (!this._element.style.minWidth) {
|
||||||
|
Manipulator.style(this._element, { 'min-width': `${this._element.offsetWidth}px` });
|
||||||
|
this._isMinWidthSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
|
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
|
||||||
this._options = this._getConfig();
|
this._options = this._getConfig();
|
||||||
|
@ -112,6 +118,10 @@ class Ripple {
|
||||||
}
|
}
|
||||||
|
|
||||||
_createRipple(event) {
|
_createRipple(event) {
|
||||||
|
if (!Manipulator.hasClass(this._element, CLASSNAME_RIPPLE)) {
|
||||||
|
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
|
||||||
|
}
|
||||||
|
|
||||||
const { layerX, layerY } = event;
|
const { layerX, layerY } = event;
|
||||||
const offsetX = layerX;
|
const offsetX = layerX;
|
||||||
const offsetY = layerY;
|
const offsetY = layerY;
|
||||||
|
@ -164,9 +174,23 @@ class Ripple {
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeHTMLRipple({ ripple, duration }) {
|
_removeHTMLRipple({ ripple, duration }) {
|
||||||
setTimeout(() => {
|
if (this._rippleTimer) {
|
||||||
|
clearTimeout(this._rippleTimer);
|
||||||
|
this._rippleTimer = null;
|
||||||
|
}
|
||||||
|
this._rippleTimer = setTimeout(() => {
|
||||||
if (ripple) {
|
if (ripple) {
|
||||||
ripple.remove();
|
ripple.remove();
|
||||||
|
if (this._element) {
|
||||||
|
SelectorEngine.find(`.${CLASSNAME_RIPPLE_WAVE}`, this._element).forEach((rippleEl) => {
|
||||||
|
rippleEl.remove();
|
||||||
|
});
|
||||||
|
if (this._isMinWidthSet) {
|
||||||
|
Manipulator.style(this._element, { 'min-width': '' });
|
||||||
|
this._isMinWidthSet = false;
|
||||||
|
}
|
||||||
|
Manipulator.removeClass(this._element, CLASSNAME_RIPPLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, duration);
|
}, duration);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user