Skip to content

Commit 08e780c

Browse files
author
Marcin Łuczak
committed
Release 1.9.0
1 parent a7429bb commit 08e780c

16 files changed

+239
-84
lines changed

Diff for: README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 Vue
22

3-
Version: FREE 1.8.0
3+
Version: FREE 1.9.0
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/vue/

Diff for: css/mdb.dark.rtl.min.css

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: css/mdb.rtl.min.css

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/mdb.common.js

+127-66
Large diffs are not rendered by default.

Diff for: js/mdb.common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/mdb.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.navbar-collapse.collapsing{height:""}

Diff for: js/mdb.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/mdb.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-vue-ui-kit",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"main": "js/mdb.umd.min.js",
55
"repository": "https://github.com/mdbootstrap/mdb-vue-ui-kit.git",
66
"author": "MDBootstrap",

Diff for: src/components/free/components/MDBCollapse.vue

+14-3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export default {
118118
const isActive = ref(props.modelValue);
119119
watchEffect(() => {
120120
isActive.value = props.modelValue;
121+
121122
if (accordionState) {
122123
manageAccordion();
123124
}
@@ -178,22 +179,25 @@ export default {
178179
el.style.height = "0";
179180
};
180181
const enter = (el) => {
181-
el.style.height = `${getContentHeight()}px`;
182+
el.style.height = collapse.value.scrollHeight + "px";
182183
};
183184
184185
const afterEnter = (el) => {
185186
if (!el.classList.contains("show")) {
186187
el.classList.add("show");
187188
}
189+
el.style.height = "";
188190
};
189191
190192
const beforeLeave = (el) => {
191193
if (!el.style.height) {
192-
el.style.height = `${el.offsetHeight}px`;
194+
el.classList.add("show");
195+
el.style.height = collapse.value.scrollHeight + "px";
196+
console.log(el.style.height);
193197
}
194198
};
195199
const leave = (el) => {
196-
el.style.height = "0";
200+
el.style.height = "0px";
197201
};
198202
199203
const afterLeave = (el) => {
@@ -263,6 +267,7 @@ export default {
263267
});
264268
265269
return {
270+
navbarFlexWrapValue,
266271
collapse,
267272
className,
268273
isActive,
@@ -278,3 +283,9 @@ export default {
278283
},
279284
};
280285
</script>
286+
287+
<style>
288+
.navbar-collapse.collapsing {
289+
height: "";
290+
}
291+
</style>

Diff for: src/components/free/forms/MDBCheckbox.vue

+9-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
:aria-required="required"
1212
ref="inputRef"
1313
/>
14-
<label v-if="label" :class="labelClassName" :for="uid">
15-
{{ label }}
14+
<label v-if="label" :class="labelClassName" :for="uid" v-html="label">
1615
</label>
1716
<div v-if="validFeedback" :class="validFeedbackClassName">
1817
{{ validFeedback }}
@@ -33,8 +32,12 @@
3332
:aria-required="required"
3433
ref="inputRef"
3534
/>
36-
<label v-if="!wrap && label" :class="labelClassName" :for="uid">
37-
{{ label }}
35+
<label
36+
v-if="!wrap && label"
37+
:class="labelClassName"
38+
:for="uid"
39+
v-html="label"
40+
>
3841
</label>
3942
<div v-if="!wrap && validFeedback" :class="validFeedbackClassName">
4043
{{ validFeedback }}
@@ -84,7 +87,7 @@ export default {
8487
default: "div",
8588
},
8689
},
87-
emits: ["update:modelValue"],
90+
emits: ["update:modelValue", "on-validate"],
8891
setup(props, { emit }) {
8992
const inputRef = ref("inputRef");
9093
const inputValue = ref(props.modelValue);
@@ -124,6 +127,7 @@ export default {
124127
const handleValidation = (e) => {
125128
isInputValid.value = e.target.checkValidity();
126129
isInputValidated.value = true;
130+
emit("on-validate", isInputValid.value);
127131
};
128132
129133
const bindValidationEvent = () => {

Diff for: src/components/free/forms/MDBFile.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
validFeedback: String,
4040
validateOnChange: Boolean,
4141
},
42-
emits: ["update:modelValue"],
42+
emits: ["update:modelValue", "on-validate"],
4343
setup(props, { emit }) {
4444
const uid = props.id || getUID("MDBFile-");
4545
const inputValue = ref(props.modelValue);
@@ -70,6 +70,7 @@ export default {
7070
const handleValidation = (event) => {
7171
isInputValid.value = event.target.files.length > 0;
7272
isInputValidated.value = true;
73+
emit("on-validate", isInputValid.value);
7374
};
7475
7576
const handleChange = (event) => {

Diff for: src/components/free/forms/MDBInput.vue

+17-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
@input="handleInput"
99
ref="inputRef"
1010
v-mdb-click-outside="clickOutside"
11+
@focus="checkDateType(true)"
12+
@blur="checkDateType()"
1113
/>
1214
<label
1315
v-if="label && !wrap"
@@ -54,6 +56,8 @@
5456
:value="inputValue"
5557
@input="handleInput"
5658
ref="inputRef"
59+
@focus="checkDateType(true)"
60+
@blur="checkDateType()"
5761
/>
5862
<label v-if="label" ref="labelRef" :class="labelClassName" :for="uid">
5963
{{ label }}
@@ -143,7 +147,7 @@ export default {
143147
},
144148
},
145149
directives: { mdbClickOutside },
146-
emits: ["update:modelValue", "click-outside"],
150+
emits: ["update:modelValue", "click-outside", "on-validate"],
147151
setup(props, { attrs, emit }) {
148152
const inputRef = ref("inputRef");
149153
const inputValue = ref(props.modelValue);
@@ -219,6 +223,7 @@ export default {
219223
defaultValidatorInvalidFeedback.value = e.target.validationMessage;
220224
}
221225
isInputValidated.value = true;
226+
emit("on-validate", isInputValid.value);
222227
};
223228
224229
const bindValidationEvents = () => {
@@ -259,9 +264,19 @@ export default {
259264
emit("click-outside");
260265
}
261266
267+
const isTypeDate = attrs.type && attrs.type === "date";
268+
const checkDateType = (isFocused = false) => {
269+
if (!isTypeDate) {
270+
return;
271+
}
272+
273+
inputRef.value.type = isFocused ? "date" : "text";
274+
};
275+
262276
onMounted(() => {
263277
calcNotch();
264278
setPlaceholder();
279+
checkDateType();
265280
266281
if (props.validationEvent) {
267282
bindValidationEvents();
@@ -309,6 +324,7 @@ export default {
309324
clickOutside,
310325
props,
311326
currentLength,
327+
checkDateType,
312328
};
313329
},
314330
};

Diff for: src/components/free/forms/MDBRadio.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default {
8383
default: "div",
8484
},
8585
},
86-
emits: ["update:modelValue"],
86+
emits: ["update:modelValue", "on-validate"],
8787
setup(props, { emit }) {
8888
const inputRef = ref("inputRef");
8989
const inputValue = ref(props.modelValue || false);
@@ -122,6 +122,7 @@ export default {
122122
const handleValidation = (e) => {
123123
isInputValid.value = e.target.checkValidity();
124124
isInputValidated.value = true;
125+
emit("on-validate", isInputValid.value);
125126
};
126127
127128
const bindValidationEvent = () => {

Diff for: src/components/free/forms/MDBTextarea.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default {
126126
default: 0,
127127
},
128128
},
129-
emits: ["update:modelValue"],
129+
emits: ["update:modelValue", "on-validate"],
130130
setup(props, { attrs, emit }) {
131131
const textareaRef = ref("textareaRef");
132132
const textareaValue = ref(props.modelValue);
@@ -199,6 +199,7 @@ export default {
199199
defaultValidatorInvalidFeedback.value = e.target.validationMessage;
200200
}
201201
isInputValidated.value = true;
202+
emit("on-validate", isInputValid.value);
202203
};
203204
204205
const bindValidationEvents = () => {

Diff for: src/types/web-types.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"framework": "vue",
33
"name": "mdb-vue-ui-kit",
4-
"version": "1.8.0",
4+
"version": "1.9.0",
55
"contributions": {
66
"html": {
77
"description-markup": "markdown",
@@ -988,6 +988,9 @@
988988
"events": [
989989
{
990990
"name": "update:modelValue"
991+
},
992+
{
993+
"name": "on-validate"
991994
}
992995
],
993996
"source": {
@@ -1651,6 +1654,9 @@
16511654
"events": [
16521655
{
16531656
"name": "update:modelValue"
1657+
},
1658+
{
1659+
"name": "on-validate"
16541660
}
16551661
],
16561662
"source": {
@@ -1904,6 +1910,9 @@
19041910
},
19051911
{
19061912
"name": "click-outside"
1913+
},
1914+
{
1915+
"name": "on-validate"
19071916
}
19081917
],
19091918
"slots": [
@@ -3165,6 +3174,9 @@
31653174
"events": [
31663175
{
31673176
"name": "update:modelValue"
3177+
},
3178+
{
3179+
"name": "on-validate"
31683180
}
31693181
],
31703182
"source": {
@@ -3950,6 +3962,9 @@
39503962
"events": [
39513963
{
39523964
"name": "update:modelValue"
3965+
},
3966+
{
3967+
"name": "on-validate"
39533968
}
39543969
],
39553970
"slots": [

0 commit comments

Comments
 (0)