comand-component-library 4.2.49 → 4.2.51
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/comand-component-library.js +1294 -1262
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +532 -1254
- package/src/assets/data/list-of-tags.json +1 -1
- package/src/assets/data/listOfComponents.json +1 -1
- package/src/assets/styles/component-library-global-styles.scss +14 -0
- package/src/components/CmdLink.vue +1 -3
- package/src/components/CmdList.vue +47 -2
@@ -285,7 +285,21 @@ a img.flag {
|
|
285
285
|
}
|
286
286
|
}
|
287
287
|
|
288
|
+
.cmd-link.button {
|
289
|
+
&.router-link-active {
|
290
|
+
background: var(--button-primary-background-highlighted); /* set background for active router-links styled as buttons buttons */
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
288
294
|
/* end tooltip for cmd-form-element and cmd-fake-select -------------------------------------------------------------------------------------------------------------------- */
|
295
|
+
|
296
|
+
/* begin cmd-link -------------------------------------------------------------------------------------------------------------------- */
|
297
|
+
.cmd-link.button {
|
298
|
+
&.router-link-active {
|
299
|
+
background: var(--button-primary-background-highlighted); /* set background for active router-links styled as buttons */
|
300
|
+
}
|
301
|
+
}
|
302
|
+
/* end cmd-link -------------------------------------------------------------------------------------------------------------------- */
|
289
303
|
/* ----------------------------------------------- END COMPONENTS AND GLOBAL STYLES --------------------------------------------------- */
|
290
304
|
|
291
305
|
/* ---------------------------------------------- BEGIN MEDIA QUERIES AND BROWSER SPECIFIC STYLES -------------------------------------------------- */
|
@@ -168,9 +168,7 @@ export default {
|
|
168
168
|
gap: var(--icon-and-text-gap);
|
169
169
|
align-items: center;
|
170
170
|
|
171
|
-
&.active, &.router-link-active
|
172
|
-
background: var(--button-primary-background-highlighted); /* overwrite background for active links/buttons */
|
173
|
-
|
171
|
+
&.active, &.router-link-active {
|
174
172
|
&.button {
|
175
173
|
padding: var(--button-padding); /* overwrite padding for active links/buttons */
|
176
174
|
}
|
@@ -77,8 +77,21 @@
|
|
77
77
|
|
78
78
|
<!-- begin tags -->
|
79
79
|
<template v-if="listType === 'tags'">
|
80
|
-
<li v-for="(tag, index) in
|
81
|
-
<small class="tag">
|
80
|
+
<li v-for="(tag, index) in listOfTagItems" :key="index">
|
81
|
+
<small class="tag flex-container">
|
82
|
+
<span>{{ tag }}</span>
|
83
|
+
<!-- begin icon 'remove tag' -->
|
84
|
+
<a v-if="iconRemoveTag.show"
|
85
|
+
href="#"
|
86
|
+
@click.prevent="removeTag(index)"
|
87
|
+
:title="iconRemoveTag.tooltip"
|
88
|
+
class="flex-none"
|
89
|
+
>
|
90
|
+
<span :class="iconRemoveTag.iconClass"></span>
|
91
|
+
</a>
|
92
|
+
<!-- end icon 'remove tag' -->
|
93
|
+
</small>
|
94
|
+
|
82
95
|
</li>
|
83
96
|
</template>
|
84
97
|
<!-- end tags -->
|
@@ -98,6 +111,11 @@ export default {
|
|
98
111
|
name: "CmdListOfLinks",
|
99
112
|
emits: ["click"],
|
100
113
|
mixins: [EditMode],
|
114
|
+
data() {
|
115
|
+
return {
|
116
|
+
listOfTagItems: [...(this.items || [])]
|
117
|
+
}
|
118
|
+
},
|
101
119
|
props: {
|
102
120
|
/**
|
103
121
|
* set list-type
|
@@ -199,6 +217,19 @@ export default {
|
|
199
217
|
value === "vertical"
|
200
218
|
}
|
201
219
|
},
|
220
|
+
/**
|
221
|
+
* define remove-icon/link for tags
|
222
|
+
*/
|
223
|
+
iconRemoveTag: {
|
224
|
+
type: Object,
|
225
|
+
default: () => (
|
226
|
+
{
|
227
|
+
show: true,
|
228
|
+
title: "Remove this tag",
|
229
|
+
iconClass: "icon-cancel"
|
230
|
+
}
|
231
|
+
)
|
232
|
+
},
|
202
233
|
/**
|
203
234
|
* properties for CmdHeadline-component
|
204
235
|
*/
|
@@ -216,6 +247,10 @@ export default {
|
|
216
247
|
}
|
217
248
|
},
|
218
249
|
methods: {
|
250
|
+
removeTag(event, index) {
|
251
|
+
this.listOfTagItems.splice(index, 1);
|
252
|
+
this.$emit("remove-tag", {originalEvent: event, tagIndex: index})
|
253
|
+
},
|
219
254
|
onAddItem() {
|
220
255
|
this.editModeContext.content.addContent(
|
221
256
|
buildComponentPath(this, 'props', 'links', -1),
|
@@ -260,6 +295,16 @@ export default {
|
|
260
295
|
li {
|
261
296
|
list-style: none;
|
262
297
|
margin-left: 0 !important; /* overwrite default-settings from frontend-framework */
|
298
|
+
|
299
|
+
&:has(.tag) {
|
300
|
+
.tag {
|
301
|
+
gap: var(--default-gap-half);
|
302
|
+
}
|
303
|
+
|
304
|
+
[class*="icon-"] {
|
305
|
+
font-size: var(--icon-size-small);
|
306
|
+
}
|
307
|
+
}
|
263
308
|
}
|
264
309
|
|
265
310
|
&.align-center {
|