@@ -45,6 +90,12 @@
-
+
diff --git a/src/components/mdChips/mdChip.vue b/src/components/mdChips/mdChip.vue
index cef0c31..ca8482f 100644
--- a/src/components/mdChips/mdChip.vue
+++ b/src/components/mdChips/mdChip.vue
@@ -2,7 +2,12 @@
-
+
cancel
@@ -13,13 +18,15 @@
export default {
props: {
+ disabled: Boolean,
mdDeletable: Boolean
},
mixins: [theme],
computed: {
classes() {
return {
- 'md-deletable': this.mdDeletable
+ 'md-deletable': this.mdDeletable,
+ 'md-disabled': this.disabled
};
}
}
diff --git a/src/components/mdChips/mdChips.scss b/src/components/mdChips/mdChips.scss
index 03ed04d..14013c7 100644
--- a/src/components/mdChips/mdChips.scss
+++ b/src/components/mdChips/mdChips.scss
@@ -7,12 +7,12 @@ $chip-icon-font: $chip-icon-size - 4px;
.md-chip {
height: $chip-height;
padding: 8px 12px;
- display: inline-flex;
- cursor: pointer;
+ display: inline-block;
border-radius: $chip-height;
transition: $swift-ease-out;
font-size: 13px;
line-height: 16px;
+ white-space: nowrap;
&.md-deletable {
position: relative;
@@ -22,7 +22,18 @@ $chip-icon-font: $chip-icon-size - 4px;
&:focus,
&:active {
outline: none;
- box-shadow: $material-shadow-2dp;
+
+ &:not(.md-disabled) {
+ cursor: pointer;
+ box-shadow: $material-shadow-2dp;
+ }
+ }
+
+ &.md-disabled {
+ .md-button {
+ pointer-events: none;
+ cursor: default;
+ }
}
.md-button.md-delete {
@@ -56,3 +67,21 @@ $chip-icon-font: $chip-icon-size - 4px;
}
}
}
+
+.md-chips {
+ .md-chip {
+ margin-right: 8px;
+ margin-bottom: 4px;
+ }
+
+ .md-input-container {
+ min-height: 54px;
+ display: flex;
+ flex-wrap: wrap;
+ }
+
+ .md-input {
+ width: 128px;
+ flex: 1;
+ }
+}
diff --git a/src/components/mdChips/mdChips.theme b/src/components/mdChips/mdChips.theme
index d13aab3..3910710 100644
--- a/src/components/mdChips/mdChips.theme
+++ b/src/components/mdChips/mdChips.theme
@@ -2,13 +2,15 @@
&.md-chip {
background-color: #{'BACKGROUND-CONTRAST-0.12'};
- &:hover,
- &:focus {
- background-color: #{'BACKGROUND-CONTRAST-0.54'};
- color: #{'BACKGROUND-COLOR'};
-
- .md-delete {
+ &:not(.md-disabled) {
+ &:hover,
+ &:focus {
+ background-color: #{'BACKGROUND-CONTRAST-0.54'};
color: #{'BACKGROUND-COLOR'};
+
+ .md-delete {
+ color: #{'BACKGROUND-COLOR'};
+ }
}
}
@@ -20,4 +22,22 @@
}
}
}
+
+ .md-chips.md-static {
+ .md-chip:not(.md-disabled) {
+ &:active {
+ box-shadow: none !important;
+ }
+
+ &:hover,
+ &:focus {
+ background-color: #{'BACKGROUND-CONTRAST-0.12'};
+ color: #{'BACKGROUND-CONTRAST-0.87'};
+
+ .md-delete {
+ color: #{'BACKGROUND-CONTRAST-0.87'};
+ }
+ }
+ }
+ }
}
diff --git a/src/components/mdChips/mdChips.vue b/src/components/mdChips/mdChips.vue
index bb16d41..2cf870a 100644
--- a/src/components/mdChips/mdChips.vue
+++ b/src/components/mdChips/mdChips.vue
@@ -1,8 +1,29 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -10,20 +31,76 @@
diff --git a/src/components/mdTabs/mdTabs.vue b/src/components/mdTabs/mdTabs.vue
index e490774..807f440 100644
--- a/src/components/mdTabs/mdTabs.vue
+++ b/src/components/mdTabs/mdTabs.vue
@@ -137,7 +137,7 @@
if (this.$refs.tabHeader) {
let tabsWidth = this.$el.offsetWidth;
let activeTab = this.$refs.tabHeader[this.activeTabNumber];
- let left = activeTab.offsetLeft;
+ let left = activeTab ? activeTab.offsetLeft : 0;
let right = tabsWidth - left - activeTab.offsetWidth;
this.$refs.indicator.style.left = left + 'px';