Skip to content

Commit e5dbbae

Browse files
author
dwaju
committed
Release 1.12.0
1 parent 4d3879d commit e5dbbae

24 files changed

+266
-94
lines changed

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.11.0
3+
Version: FREE 1.12.0
44

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

css/mdb.dark.min.css

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

css/mdb.dark.min.css.map

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

css/mdb.dark.rtl.min.css

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

css/mdb.min.css

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

css/mdb.min.css.map

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

css/mdb.rtl.min.css

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

js/mdb.common.js

+113-71
Large diffs are not rendered by default.

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.

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.

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.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "mdb-vue-ui-kit",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"main": "js/mdb.umd.min.js",
5-
"homepage": "https://mdbootstrap.com/docs/b5/vue/",
65
"repository": "https://github.com/mdbootstrap/mdb-vue-ui-kit.git",
76
"author": "MDBootstrap",
87
"license": "MIT",

src/components/free/components/MDBBadge.vue

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { computed } from "vue";
1010
export default {
1111
name: "MDBBadge",
1212
props: {
13+
badge: String,
1314
color: String,
1415
pill: Boolean,
1516
dot: Boolean,
@@ -24,6 +25,7 @@ export default {
2425
return [
2526
"badge",
2627
props.color && `bg-${props.color}`,
28+
props.badge && `badge-${props.badge}`,
2729
props.pill && "rounded-pill",
2830
props.dot && "badge-dot",
2931
props.notification && "badge-notification",

src/components/free/components/MDBCollapse.vue

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ export default {
193193
if (!el.style.height) {
194194
el.classList.add("show");
195195
el.style.height = collapse.value.scrollHeight + "px";
196-
console.log(el.style.height);
197196
}
198197
};
199198
const leave = (el) => {

src/components/free/content-styles/MDBIcon.vue

+4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ export default {
1515
icon: String,
1616
flag: String,
1717
size: String,
18+
fw: Boolean,
19+
solid: Boolean,
1820
},
1921
setup(props) {
2022
const className = computed(() => {
2123
return [
2224
!props.flag && props.iconStyle,
2325
props.flag ? `flag flag-${props.flag}` : `fa-${props.icon}`,
2426
props.size && `fa-${props.size}`,
27+
props.fw && "fa-fw",
28+
props.solid && "fa-solid",
2529
];
2630
});
2731

src/components/free/forms/MDBInput.vue

+11-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export default {
245245
}
246246
}
247247
248-
const currentLength = ref(0);
248+
const currentLength = ref(inputValue.value?.length || 0);
249249
250250
function handleInput(e) {
251251
if (props.counter) {
@@ -293,6 +293,16 @@ export default {
293293
});
294294
295295
watchEffect(() => {
296+
if (props.counter) {
297+
if (props.modelValue?.length > props.maxlength) {
298+
inputValue.value = props.modelValue.slice(0, props.maxlength);
299+
currentLength.value = props.maxlength;
300+
return;
301+
}
302+
303+
currentLength.value = props.modelValue?.length || 0;
304+
}
305+
296306
inputValue.value = props.modelValue;
297307
});
298308

src/components/free/forms/MDBTextarea.vue

+25-2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ import {
7474
onMounted,
7575
onUpdated,
7676
watchEffect,
77+
watch,
7778
onUnmounted,
7879
} from "vue";
7980
import { on, off } from "../../utils/MDBEventHandlers";
@@ -221,7 +222,7 @@ export default {
221222
}
222223
}
223224
224-
const currentLength = ref(0);
225+
const currentLength = ref(textareaValue.value?.length || 0);
225226
226227
function handleInput(e) {
227228
if (props.counter) {
@@ -255,7 +256,29 @@ export default {
255256
off(textareaRef.value, props.validationEvent, handleValidation);
256257
});
257258
258-
watchEffect(() => (textareaValue.value = props.modelValue));
259+
watchEffect(() => {
260+
if (props.counter) {
261+
if (props.modelValue?.length > props.maxLength) {
262+
textareaValue.value = props.modelValue.slice(0, props.maxLength);
263+
currentLength.value = props.maxLength;
264+
return;
265+
}
266+
267+
currentLength.value = props.modelValue?.length || 0;
268+
}
269+
270+
textareaValue.value = props.modelValue;
271+
});
272+
273+
watch(
274+
() => props.isValidated,
275+
(value) => (isInputValidated.value = value)
276+
);
277+
278+
watch(
279+
() => props.isValid,
280+
(value) => (isInputValid.value = value)
281+
);
259282
260283
return {
261284
textareaRef,
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { ref } from "vue";
2+
3+
const debounce = ref(false);
4+
5+
export const useScrollbarWidth = () => {
6+
// Animation
7+
const defaultPaddingRight = document.body.style.paddingRight;
8+
const getScrollbarWidth = () => {
9+
const scrollDiv = document.createElement("div");
10+
scrollDiv.className = "modal-scrollbar-measure";
11+
document.body.appendChild(scrollDiv);
12+
const scrollbarWidth =
13+
scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
14+
document.body.removeChild(scrollDiv);
15+
return scrollbarWidth;
16+
};
17+
const beforeEnter = () => {
18+
if (document.body.scrollHeight > window.innerHeight) {
19+
debounce.value = true;
20+
document.body.classList.add("modal-open");
21+
const paddingRightWhenActive = getScrollbarWidth().toFixed(2);
22+
if (paddingRightWhenActive > 0) {
23+
document.body.style.paddingRight = `${paddingRightWhenActive}px`;
24+
}
25+
setTimeout(() => (debounce.value = false), 500);
26+
}
27+
};
28+
const afterLeave = () => {
29+
if (debounce.value) return;
30+
document.body.classList.remove("modal-open");
31+
document.body.style.paddingRight = defaultPaddingRight;
32+
};
33+
34+
return {
35+
beforeEnter,
36+
afterLeave,
37+
};
38+
};

src/scss/free/_checkboxes.scss

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.form-check {
2+
&-input[type=checkbox] {
3+
margin-right: 0px;
4+
}
5+
&-label {
6+
padding-left: 0.15rem;
7+
}
8+
}

src/scss/index.free.scss

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@import "./standard/mdb.free";
33

44
// MDB Vue Free
5+
@import "./free/checkboxes";
56
@import "./free/badges";
67
@import "./free/buttons";
78
@import "./free/button-group";

src/scss/standard/free/_root.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
:root {
22
--mdb-font-roboto: #{inspect($font-family-roboto)};
3+
--mdb-bg-opacity: 1;
34
}

src/types/attributes.json

+18
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
"MDBAccordionItem/itemClasses": {
6666
"type": "string"
6767
},
68+
"mdb-badge/badge": {
69+
"type": "string"
70+
},
71+
"MDBBadge/badge": {
72+
"type": "string"
73+
},
6874
"mdb-badge/color": {
6975
"type": "string"
7076
},
@@ -1109,6 +1115,18 @@
11091115
"MDBIcon/size": {
11101116
"type": "string"
11111117
},
1118+
"mdb-icon/fw": {
1119+
"type": "boolean"
1120+
},
1121+
"MDBIcon/fw": {
1122+
"type": "boolean"
1123+
},
1124+
"mdb-icon/solid": {
1125+
"type": "boolean"
1126+
},
1127+
"MDBIcon/solid": {
1128+
"type": "boolean"
1129+
},
11121130
"mdb-table/tag": {
11131131
"type": "string"
11141132
},

src/types/tags.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
},
4444
"mdb-badge": {
4545
"attributes": [
46+
"badge",
4647
"color",
4748
"pill",
4849
"dot",
@@ -53,6 +54,7 @@
5354
},
5455
"MDBBadge": {
5556
"attributes": [
57+
"badge",
5658
"color",
5759
"pill",
5860
"dot",
@@ -696,7 +698,9 @@
696698
"iconStyle",
697699
"icon",
698700
"flag",
699-
"size"
701+
"size",
702+
"fw",
703+
"solid"
700704
],
701705
"description": ""
702706
},
@@ -705,7 +709,9 @@
705709
"iconStyle",
706710
"icon",
707711
"flag",
708-
"size"
712+
"size",
713+
"fw",
714+
"solid"
709715
],
710716
"description": ""
711717
},

src/types/web-types.json

+22-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.11.0",
4+
"version": "1.12.0",
55
"contributions": {
66
"html": {
77
"description-markup": "markdown",
@@ -121,6 +121,13 @@
121121
"name": "MDBBadge",
122122
"description": "",
123123
"attributes": [
124+
{
125+
"name": "badge",
126+
"value": {
127+
"kind": "expression",
128+
"type": "string"
129+
}
130+
},
124131
{
125132
"name": "color",
126133
"value": {
@@ -1734,6 +1741,20 @@
17341741
"kind": "expression",
17351742
"type": "string"
17361743
}
1744+
},
1745+
{
1746+
"name": "fw",
1747+
"value": {
1748+
"kind": "expression",
1749+
"type": "boolean"
1750+
}
1751+
},
1752+
{
1753+
"name": "solid",
1754+
"value": {
1755+
"kind": "expression",
1756+
"type": "boolean"
1757+
}
17371758
}
17381759
],
17391760
"slots": [

0 commit comments

Comments
 (0)