toggle-components-library 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/img/form_icon.cd53ec12.svg +10 -0
- package/dist/toggle-components-library.common.js +104 -68
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +104 -68
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/form_icon.svg +10 -0
- package/src/components/buttons/ToggleButton.vue +27 -0
- package/src/components/forms/ToggleInputTextArea.vue +5 -0
- package/src/components/navs/sidenav/ToggleSideNavItem.vue +1 -1
- package/src/components/tables/ToggleTable.vue +6 -2
- package/src/sass/includes/_as_navs.scss +3 -0
- package/src/sass/includes/_as_text.scss +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14.942" height="14.942" viewBox="0 0 14.942 14.942">
|
|
2
|
+
<g id="Group_207" data-name="Group 207" transform="translate(-162.057 -567.364)">
|
|
3
|
+
<rect id="Rectangle_890" data-name="Rectangle 890" width="14" height="14" rx="2" transform="matrix(0.998, -0.07, 0.07, 0.998, 162.057, 568.341)" fill="#e57936"/>
|
|
4
|
+
<path id="Rectangle_889_-_Outline" data-name="Rectangle 889 - Outline" d="M2,1A1,1,0,0,0,1,2V12a1,1,0,0,0,1,1H12a1,1,0,0,0,1-1V2a1,1,0,0,0-1-1H2M2,0H12a2,2,0,0,1,2,2V12a2,2,0,0,1-2,2H2a2,2,0,0,1-2-2V2A2,2,0,0,1,2,0Z" transform="matrix(0.998, -0.07, 0.07, 0.998, 162.057, 568.341)" fill="#881212"/>
|
|
5
|
+
<path id="Line_290" data-name="Line 290" d="M4.641.5H0A.5.5,0,0,1-.5,0,.5.5,0,0,1,0-.5H4.641a.5.5,0,0,1,.5.5A.5.5,0,0,1,4.641.5Z" transform="matrix(0.998, -0.07, 0.07, 0.998, 165.198, 571.75)" fill="#881212"/>
|
|
6
|
+
<path id="Line_291" data-name="Line 291" d="M8.21.5H0A.5.5,0,0,1-.5,0,.5.5,0,0,1,0-.5H8.21a.5.5,0,0,1,.5.5A.5.5,0,0,1,8.21.5Z" transform="matrix(0.998, -0.07, 0.07, 0.998, 165.364, 574.125)" fill="#881212"/>
|
|
7
|
+
<path id="Line_292" data-name="Line 292" d="M1.685.5H0A.5.5,0,0,1-.5,0,.5.5,0,0,1,0-.5H1.685a.5.5,0,0,1,.5.5A.5.5,0,0,1,1.685.5Z" transform="matrix(0.998, -0.07, 0.07, 0.998, 171.588, 571.303)" fill="#881212"/>
|
|
8
|
+
<path id="Line_293" data-name="Line 293" d="M2.761.75H0A.75.75,0,0,1-.75,0,.75.75,0,0,1,0-.75H2.761a.75.75,0,0,1,.75.75A.75.75,0,0,1,2.761.75Z" transform="matrix(0.998, -0.07, 0.07, 0.998, 168.317, 577.306)" fill="#881212"/>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
|
@@ -74,7 +74,29 @@ export default {
|
|
|
74
74
|
return this.buttonStyle.includes('mini');
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
+
watch: {
|
|
78
|
+
disabled() {
|
|
79
|
+
if (this.$slots.default !== undefined){
|
|
80
|
+
this.disableLinks()
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
loading() {
|
|
84
|
+
if (this.$slots.default !== undefined){
|
|
85
|
+
this.disableLinks()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
77
89
|
methods: {
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* set link href to null if button loading or disabled
|
|
93
|
+
*/
|
|
94
|
+
disableLinks() {
|
|
95
|
+
this.$slots.default.forEach(slot => {
|
|
96
|
+
slot.data.attrs.href = this.disabled || this.loading ? null : slot.data.attrs.href;
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
|
|
78
100
|
click(){
|
|
79
101
|
/**
|
|
80
102
|
* Emitted when the button is clicked.
|
|
@@ -83,6 +105,11 @@ export default {
|
|
|
83
105
|
*/
|
|
84
106
|
this.$emit('click');
|
|
85
107
|
}
|
|
108
|
+
},
|
|
109
|
+
created() {
|
|
110
|
+
if (this.$slots.default !== undefined){
|
|
111
|
+
this.disableLinks()
|
|
112
|
+
}
|
|
86
113
|
}
|
|
87
114
|
}
|
|
88
115
|
</script>
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
:required="required"
|
|
17
17
|
v-model="inputVal"
|
|
18
18
|
:maxlength="maxLength"
|
|
19
|
+
:disabled="disabled"
|
|
19
20
|
/>
|
|
20
21
|
<label
|
|
21
22
|
class="toggle-input-label-error"
|
|
@@ -81,6 +82,10 @@ export default {
|
|
|
81
82
|
maxLength:{
|
|
82
83
|
type: Number,
|
|
83
84
|
required:false
|
|
85
|
+
},
|
|
86
|
+
disabled: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
required: false,
|
|
84
89
|
}
|
|
85
90
|
},
|
|
86
91
|
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
default: false,
|
|
23
23
|
},
|
|
24
24
|
/**
|
|
25
|
-
* Icon to use `toggle-graph-icon`, `toggle-orders-icon`, `toggle-card-icon`, `toggle-megaphone-icon`
|
|
25
|
+
* Icon to use `toggle-graph-icon`, `toggle-orders-icon`, `toggle-card-icon`, `toggle-megaphone-icon`, `toggle-form-icon`
|
|
26
26
|
*/
|
|
27
27
|
icon: {
|
|
28
28
|
type: String,
|
|
@@ -102,12 +102,16 @@ export default {
|
|
|
102
102
|
return this.fields;
|
|
103
103
|
},
|
|
104
104
|
|
|
105
|
-
searchActive() {
|
|
105
|
+
searchActive() {
|
|
106
106
|
if(this.editingInput) {
|
|
107
107
|
return true;
|
|
108
108
|
}
|
|
109
109
|
for(let col in this.searchModels){
|
|
110
|
-
if
|
|
110
|
+
if(!this.searchModels[col])
|
|
111
|
+
return false;
|
|
112
|
+
if (this.searchModels[col].start !== undefined) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
111
115
|
else if(this.searchModels[col]) return true;
|
|
112
116
|
}
|
|
113
117
|
return false;
|