Skip to content

Commit 5f758b4

Browse files
author
m.duszak
committed
Release 3.10.1
1 parent 0fa1998 commit 5f758b4

File tree

9 files changed

+59
-23
lines changed

9 files changed

+59
-23
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MDB5
2-
Version: FREE 3.10.0
2+
Version: FREE 3.10.1
33

44
Documentation:
55
https://mdbootstrap.com/docs/standard/

css/mdb.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,12 @@
2222
<div class="container">
2323
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
2424
<div class="text-center">
25-
<img
26-
class="mb-4"
27-
src="https://mdbootstrap.com/img/logo/mdb-transparent-250px.png"
28-
style="width: 250px; height: 90px;"
29-
/>
30-
<h5 class="mb-3">Thank you for using our product. We're glad you're with us.</h5>
31-
<p class="mb-3">MDB Team</p>
32-
<a
33-
class="btn btn-primary btn-lg"
34-
href="https://mdbootstrap.com/docs/standard/getting-started/"
35-
target="_blank"
36-
role="button"
37-
>Start MDB tutorial</a
38-
>
25+
<img class="mb-2" src="https://bf-sale.mdbgo.io/bf.png" width="800" height="450">
26+
<h2 class="fw-bold">Black Friday Sale</h2>
27+
<h5 class="mb-3">Get MDB Pro with discounts <span class="text-danger">up to 95%</span>.</h5>
28+
<p class="mb-3 fw-bold"> Hurry up the offer is limited!</p>
29+
30+
<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>
3931
</div>
4032
</div>
4133
</div>

js/mdb.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-ui-kit",
3-
"version": "3.10.0",
3+
"version": "3.10.1",
44
"main": "js/mdb.min.js",
55
"homepage": "https://mdbootstrap.com/docs/standard/",
66
"repository": "https://github.com/mdbootstrap/mdb-ui-kit.git",

src/js/free/input.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class Input {
131131
} else {
132132
this._getLabelWidth();
133133
this._getLabelPositionInInputGroup();
134+
this._toggleDefaultDatePlaceholder();
134135
}
135136
}
136137

@@ -166,6 +167,22 @@ class Input {
166167
});
167168
}
168169

170+
_toggleDefaultDatePlaceholder(input = this.input) {
171+
const isTypeDate = input.getAttribute('type') === 'date';
172+
173+
if (!isTypeDate) {
174+
return;
175+
}
176+
177+
const isInputFocused = document.activeElement === input;
178+
179+
if (!isInputFocused && !input.value) {
180+
input.style.opacity = 0;
181+
} else {
182+
input.style.opacity = 1;
183+
}
184+
}
185+
169186
_showPlaceholder() {
170187
Manipulator.addClass(this.input, CLASSNAME_PLACEHOLDER_ACTIVE);
171188
}
@@ -232,6 +249,7 @@ class Input {
232249
if (input.value !== '') {
233250
Manipulator.addClass(input, CLASSNAME_ACTIVE);
234251
}
252+
this._toggleDefaultDatePlaceholder(input);
235253
});
236254
}
237255

@@ -258,9 +276,11 @@ class Input {
258276

259277
_deactivate(event) {
260278
const input = event ? event.target : this.input;
279+
261280
if (input.value === '') {
262281
input.classList.remove(CLASSNAME_ACTIVE);
263282
}
283+
this._toggleDefaultDatePlaceholder(input);
264284
}
265285

266286
static activate(instance) {

src/js/free/ripple.js

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,15 @@ class Ripple {
6161
constructor(element, options) {
6262
this._element = element;
6363
this._options = this._getConfig(options);
64+
6465
if (this._element) {
6566
Data.setData(element, DATA_KEY, this);
6667
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
6768
}
6869

6970
this._clickHandler = this._createRipple.bind(this);
71+
this._rippleTimer = null;
72+
this._isMinWidthSet = false;
7073

7174
this.init();
7275
}
@@ -100,7 +103,10 @@ class Ripple {
100103
}
101104
});
102105

103-
this._element.style.minWidth = `${this._element.offsetWidth}px`;
106+
if (!this._element.style.minWidth) {
107+
Manipulator.style(this._element, { 'min-width': `${this._element.offsetWidth}px` });
108+
this._isMinWidthSet = true;
109+
}
104110

105111
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
106112
this._options = this._getConfig();
@@ -112,6 +118,10 @@ class Ripple {
112118
}
113119

114120
_createRipple(event) {
121+
if (!Manipulator.hasClass(this._element, CLASSNAME_RIPPLE)) {
122+
Manipulator.addClass(this._element, CLASSNAME_RIPPLE);
123+
}
124+
115125
const { layerX, layerY } = event;
116126
const offsetX = layerX;
117127
const offsetY = layerY;
@@ -164,9 +174,23 @@ class Ripple {
164174
}
165175

166176
_removeHTMLRipple({ ripple, duration }) {
167-
setTimeout(() => {
177+
if (this._rippleTimer) {
178+
clearTimeout(this._rippleTimer);
179+
this._rippleTimer = null;
180+
}
181+
this._rippleTimer = setTimeout(() => {
168182
if (ripple) {
169183
ripple.remove();
184+
if (this._element) {
185+
SelectorEngine.find(`.${CLASSNAME_RIPPLE_WAVE}`, this._element).forEach((rippleEl) => {
186+
rippleEl.remove();
187+
});
188+
if (this._isMinWidthSet) {
189+
Manipulator.style(this._element, { 'min-width': '' });
190+
this._isMinWidthSet = false;
191+
}
192+
Manipulator.removeClass(this._element, CLASSNAME_RIPPLE);
193+
}
170194
}
171195
}, duration);
172196
}

0 commit comments

Comments
 (0)