{
- return ["form-outline", props.white && "form-white", props.wrapperClass];
+ return [
+ props.formOutline && "form-outline",
+ inputGroupClassName.value,
+ props.white && "form-white",
+ props.wrapperClass
+ ];
});
const textareaClassName = computed(() => {
return [
@@ -93,13 +135,26 @@ export default {
props.size && `form-control-${props.size}`,
textareaValue.value && "active",
showPlaceholder.value && "placeholder-active",
- ((isInputValidated.value && isInputValid.value) || props.isValid) &&
- "is-valid",
- ((isInputValidated.value && !isInputValid.value) || props.isInvalid) &&
- "is-invalid"
+ isInputValidated.value && isInputValid.value && "is-valid",
+ isInputValidated.value && !isInputValid.value && "is-invalid"
];
});
+ const inputGroupClassName = computed(() => {
+ if (!props.inputGroup) {
+ return;
+ }
+ return props.inputGroup !== true
+ ? `input-group input-group-${props.inputGroup}`
+ : "input-group";
+ });
+
+ const validationStyle = computed(() => {
+ return props.inputGroup && isInputValidated.value
+ ? { marginBottom: "1rem" }
+ : "";
+ });
+
const validFeedbackClassName = computed(() => {
return props.tooltipFeedback ? "valid-tooltip" : "valid-feedback";
});
@@ -185,6 +240,7 @@ export default {
textareaClassName,
validFeedbackClassName,
invalidFeedbackClassName,
+ validationStyle,
customInvalidFeedback,
notchLeadingWidth,
notchMiddleWidth,
diff --git a/src/components/free/layout/MDBRow.vue b/src/components/free/layout/MDBRow.vue
index 2f0bffcf3813e5abe6e9413b0d2251e00e1f9c68..d56b2a545c209370a991e0c5c0c5daf1c689316e 100644
--- a/src/components/free/layout/MDBRow.vue
+++ b/src/components/free/layout/MDBRow.vue
@@ -38,7 +38,6 @@ export default {
type: [String, Array]
}
},
-
setup(props, { attrs }) {
const className = computed(() => {
return [
diff --git a/src/components/free/navigation/MDBTabContent.vue b/src/components/free/navigation/MDBTabContent.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5dd47e878c1d15d1ba58c6a0ea79e8c319556805
--- /dev/null
+++ b/src/components/free/navigation/MDBTabContent.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/free/navigation/MDBTabItem.vue b/src/components/free/navigation/MDBTabItem.vue
new file mode 100644
index 0000000000000000000000000000000000000000..cec81ab1eda6b9bde84f7164fb860071d0813519
--- /dev/null
+++ b/src/components/free/navigation/MDBTabItem.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/free/navigation/MDBTabNav.vue b/src/components/free/navigation/MDBTabNav.vue
new file mode 100644
index 0000000000000000000000000000000000000000..9f6523fbb65a321119759f0bab697bb56c2225ef
--- /dev/null
+++ b/src/components/free/navigation/MDBTabNav.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/free/navigation/MDBTabPane.vue b/src/components/free/navigation/MDBTabPane.vue
new file mode 100644
index 0000000000000000000000000000000000000000..22faf4e99a55f899483d69289d5cf396b1f73d2c
--- /dev/null
+++ b/src/components/free/navigation/MDBTabPane.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/free/navigation/MDBTabs.vue b/src/components/free/navigation/MDBTabs.vue
new file mode 100644
index 0000000000000000000000000000000000000000..90fe8ff652fba58c55a1086471762ee0023d72e7
--- /dev/null
+++ b/src/components/free/navigation/MDBTabs.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
diff --git a/src/components/utils/MDBBreakpointHandler.js b/src/components/utils/MDBBreakpointHandler.js
index f0856b8baca2780e0d8de90f81641850f99b2272..160231f64562dcd4c3be762416211d8545814422 100644
--- a/src/components/utils/MDBBreakpointHandler.js
+++ b/src/components/utils/MDBBreakpointHandler.js
@@ -2,43 +2,43 @@ export const handleBreakpoints = (windowWidth, breakpointValues) => {
const breakpoints = {
none: {
width: 0,
- align: null
+ attr: null
},
sm: {
width: 576,
- align: null
+ attr: null
},
md: {
width: 768,
- align: null
+ attr: null
},
lg: {
width: 992,
- align: null
+ attr: null
},
xl: {
width: 1200,
- align: null
+ attr: null
},
xxl: {
width: 1400,
- align: null
+ attr: null
},
mega: {
width: 10000,
- align: null
+ attr: null
}
};
- // replace breakpoints align values with corresponding props values
+ // replace breakpoints attr values with corresponding props values
breakpointValues.forEach(value => {
const match = Object.keys(breakpoints).filter(breakpoint =>
value.includes(breakpoint) ? breakpoint : false
)[0];
if (match) {
- breakpoints[match].align = value;
+ breakpoints[match].attr = value;
} else {
- breakpoints.none.align = value;
+ breakpoints.none.attr = value;
}
});
@@ -62,17 +62,17 @@ export const handleBreakpoints = (windowWidth, breakpointValues) => {
const ranges = {};
Object.keys(breakpoints).reduce((acc, cur, index) => {
if (
- (breakpoints[acc].align && breakpoints[cur].align) ||
- (breakpoints[acc].align && !cur)
+ (breakpoints[acc].attr && breakpoints[cur].attr) ||
+ (breakpoints[acc].attr && !cur)
) {
- ranges[breakpoints[acc].align] = {
+ ranges[breakpoints[acc].attr] = {
min: breakpoints[acc].width,
max: breakpoints[cur].width
};
return cur;
- } else if (breakpoints[acc].align && !breakpoints[cur].align) {
+ } else if (breakpoints[acc].attr && !breakpoints[cur].attr) {
if (index === Object.keys(breakpoints).length - 1) {
- ranges[breakpoints[acc].align] = {
+ ranges[breakpoints[acc].attr] = {
min: breakpoints[acc].width,
max: breakpoints[cur].width
};
diff --git a/src/index.free.js b/src/index.free.js
index 94976efa000d6feeb88257e81309f44aa38a9e83..806b2ee0a62d118ed9f9c0e9faa0d9eee51d7046 100644
--- a/src/index.free.js
+++ b/src/index.free.js
@@ -45,6 +45,11 @@ import MDBPageItem from "@/components/free/navigation/MDBPageItem";
import MDBBreadcrumb from "@/components/free/navigation/MDBBreadcrumb";
import MDBBreadcrumbItem from "@/components/free/navigation/MDBBreadcrumbItem";
import MDBFooter from "@/components/free/navigation/MDBFooter";
+import MDBTabs from "@/components/free/navigation/MDBTabs";
+import MDBTabNav from "@/components/free/navigation/MDBTabNav";
+import MDBTabItem from "@/components/free/navigation/MDBTabItem";
+import MDBTabPane from "@/components/free/navigation/MDBTabPane";
+import MDBTabContent from "@/components/free/navigation/MDBTabContent";
/* ------------- Layout ------------- */
import MDBCol from "@/components/free/layout/MDBCol";
@@ -59,6 +64,9 @@ import MDBInput from "@/components/free/forms/MDBInput";
import MDBTextarea from "@/components/free/forms/MDBTextarea";
import MDBCheckbox from "@/components/free/forms/MDBCheckbox";
import MDBRadio from "@/components/free/forms/MDBRadio";
+import MDBFile from "@/components/free/forms/MDBFile";
+import MDBRange from "@/components/free/forms/MDBRange";
+import MDBSwitch from "@/components/free/forms/MDBSwitch";
/* ------------- Directives ------------- */
import mdbRipple from "@/directives/free/mdbRipple";
@@ -95,6 +103,11 @@ export {
MDBModalTitle,
MDBModalBody,
MDBModalFooter,
+ MDBTabs,
+ MDBTabNav,
+ MDBTabItem,
+ MDBTabPane,
+ MDBTabContent,
MDBIcon,
MDBNavbar,
MDBNavbarToggler,
@@ -115,6 +128,9 @@ export {
MDBTextarea,
MDBCheckbox,
MDBRadio,
+ MDBFile,
+ MDBRange,
+ MDBSwitch,
mdbRipple,
mdbScrollspy
};
diff --git a/src/scss/free/_buttons.scss b/src/scss/free/_buttons.scss
index b3844b66e22e10419c84339d2f6efc4b7d806161..3dcf45b1a35547277b9cfa4a2725678951f1e10c 100644
--- a/src/scss/free/_buttons.scss
+++ b/src/scss/free/_buttons.scss
@@ -1,3 +1,7 @@
.btn {
margin: 0 0.12rem;
+}
+
+.input-group .btn {
+ margin: 0;
}
\ No newline at end of file
diff --git a/src/scss/free/_input-group.scss b/src/scss/free/_input-group.scss
new file mode 100644
index 0000000000000000000000000000000000000000..bae5cd70c9ab1505ab86b5f7d89a3d453896dbeb
--- /dev/null
+++ b/src/scss/free/_input-group.scss
@@ -0,0 +1,25 @@
+.input-group {
+ .btn-group {
+ box-shadow: none;
+ }
+
+ &:not(.has-validation) > .btn-group:not(:last-child) {
+ > :not(:last-child):not(.dropdown-menu),
+ > .dropdown-toggle:last-child, .dropdown-toggle:nth-last-child(n+1) {
+ @include border-end-radius(0);
+ }
+ }
+
+ &.has-validation > .btn-group{
+ > :last-child:not(.dropdown-toggle):not(.dropdown-menu),
+ > .dropdown-toggle:last-child {
+ @include border-end-radius(0);
+ }
+ }
+
+ > .btn-group:last-child {
+ > :first-child:not(.dropdown-menu) {
+ @include border-start-radius(0);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/scss/free/_tabs.scss b/src/scss/free/_tabs.scss
new file mode 100644
index 0000000000000000000000000000000000000000..57b51900eb009f67d0a406c0a97eb57252901279
--- /dev/null
+++ b/src/scss/free/_tabs.scss
@@ -0,0 +1,10 @@
+.nav-tabs {
+ .nav-link {
+ cursor: pointer;
+ }
+}
+.nav-pills {
+ .nav-link {
+ cursor: pointer;
+ }
+}
diff --git a/src/scss/index.free.scss b/src/scss/index.free.scss
index b9c3910623aca8e63e4025a72f1fc126d12446c7..83316be80d85dda23ccfcd24842cb3ed7fb1770d 100644
--- a/src/scss/index.free.scss
+++ b/src/scss/index.free.scss
@@ -9,3 +9,5 @@
@import './free/tooltips';
@import './free/popovers';
@import './free/validation';
+@import './free/tabs';
+@import './free/input-group';
diff --git a/src/scss/standard/free/forms/_form-check.scss b/src/scss/standard/free/forms/_form-check.scss
index 64ce3302c2c4ec16fc7438340d078c4cbbf82a30..fd51b75422f27aec22483ca06f7d5b09235ea31a 100644
--- a/src/scss/standard/free/forms/_form-check.scss
+++ b/src/scss/standard/free/forms/_form-check.scss
@@ -3,16 +3,7 @@
//
.form-check {
- .form-check-input {
- margin-left: $form-check-input-margin-left * -1;
-
- &[type='radio'] {
- margin-left: $form-check-input-radio-margin-left * -1;
- }
- }
-
- margin-bottom: 0;
- min-height: auto;
+ min-height: 1.5rem;
}
.form-check-input {
@@ -90,6 +81,8 @@
&[type='checkbox'] {
border-radius: $form-check-input-checkbox-border-radius;
+ margin-top: 0.19em;
+ margin-right: 8px;
&:focus {
&:after {
@@ -158,6 +151,8 @@
border-radius: $form-check-input-radio-border-radius;
width: $form-check-input-radio-width;
height: $form-check-input-radio-height;
+ margin-top: 0.125em;
+ margin-right: 6px;
&:before {
width: $form-check-input-radio-before-width;
@@ -208,8 +203,6 @@
//
.form-switch {
- padding-left: $form-switch-padding-left;
-
.form-check-input {
background-image: none;
border-width: 0;
@@ -217,8 +210,8 @@
width: $form-switch-form-check-input-width;
height: $form-switch-form-check-input-height;
background-color: $form-switch-form-check-input-background-color;
- margin-top: $form-switch-form-check-input-margin-top;
- margin-right: $form-switch-form-check-input-margin-right;
+ margin-top: 0.3em;
+ margin-right: 8px;
&:after {
content: '';
diff --git a/src/scss/standard/free/forms/_form-file.scss b/src/scss/standard/free/forms/_form-file.scss
index fab9b6de49d0c291593bcddae176bcecd9a5eb0c..afc0659aba5d8fdd228e82a4595562060b4d9f79 100644
--- a/src/scss/standard/free/forms/_form-file.scss
+++ b/src/scss/standard/free/forms/_form-file.scss
@@ -1,80 +1,12 @@
-.form-file {
- height: $form-file-height;
-}
-
-.form-file-input {
- height: $form-file-height;
-
- &:focus-within ~ .form-file-label {
- border: none;
- border-color: $form-file-label-focus-border-color;
- box-shadow: 0px 0px 0px 1px $primary;
- }
-
- &:focus-within ~ .form-file-label .form-file-text,
- &:focus-within ~ .form-file-label .form-file-button {
- transition: $form-file-label-focus-transition;
- }
- &[disabled] ~ .form-file-label .form-file-text,
- &:disabled ~ .form-file-label .form-file-text,
- &[disabled] ~ .form-file-label .form-file-button,
- &:disabled ~ .form-file-label .form-file-button {
- background-color: $form-file-label-disabled-background-color;
- }
-}
-
-.form-file-label {
- height: $form-file-label-height;
- border-color: $form-file-label-border-color;
- border-radius: $form-file-label-border-radius;
-}
-
-.form-file-text {
- padding-top: $form-file-text-padding-y;
- padding-bottom: $form-file-text-padding-y;
-}
-
-.form-file-button {
- line-height: $form-file-button-line-height;
- background-color: $form-file-button-background-color;
-}
-
-.form-file-sm {
- height: $form-file-sm-height;
- font-size: $form-file-sm-font-size;
-
- .form-file-input {
- height: $form-file-sm-height;
- }
-
- .form-file-label {
- height: $form-file-sm-height;
- }
-
- .form-file-text,
- .form-file-button {
- line-height: $form-file-sm-line-height;
- padding-top: $form-file-sm-padding-y;
- padding-bottom: $form-file-sm-padding-y;
- }
-}
-
-.form-file-lg {
- height: $form-file-lg-height;
- font-size: $form-file-lg-font-size;
-
- .form-file-input {
- height: $form-file-lg-height;
- }
-
- .form-file-label {
- height: $form-file-lg-height;
- }
-
- .form-file-text,
- .form-file-button {
- line-height: $form-file-lg-line-height;
- padding-top: $form-file-lg-padding-y;
- padding-bottom: $form-file-lg-padding-y;
- }
-}
+.form-control {
+ &[type='file'] {
+ &::-webkit-file-upload-button {
+ background-color: transparent;
+ }
+ }
+ &:hover {
+ &:not(:disabled):not([readonly])::-webkit-file-upload-button {
+ background-color: transparent;
+ }
+ }
+}
\ No newline at end of file