comand-component-library 4.2.51 → 4.2.53
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 +4040 -3388
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +179 -41
- package/src/assets/data/box-product.json +15 -10
- package/src/assets/data/box-user.json +8 -8
- package/src/assets/data/list-description-list.json +74 -0
- package/src/assets/data/listOfComponents.json +3 -1
- package/src/assets/data/pages/boxes-team-overview.json +8 -8
- package/src/assets/styles/component-library-global-styles.scss +0 -14
- package/src/componentSettingsDataAndControls.vue +131 -10
- package/src/components/CmdAddressData.vue +2 -0
- package/src/components/CmdAddressDataItem.vue +2 -1
- package/src/components/CmdBackToTopButton.vue +12 -3
- package/src/components/CmdBankAccountData.vue +2 -0
- package/src/components/CmdBasicForm.vue +6 -2
- package/src/components/CmdBox.vue +62 -35
- package/src/components/CmdBoxWrapper.vue +6 -0
- package/src/components/CmdBreadcrumbs.vue +2 -0
- package/src/components/CmdCodeOutput.vue +2 -2
- package/src/components/CmdCompanyLogo.vue +2 -0
- package/src/components/CmdContainer.vue +100 -87
- package/src/components/CmdCookieDisclaimer.vue +12 -1
- package/src/components/CmdCopyrightInformation.vue +2 -0
- package/src/components/CmdFakeSelect.vue +10 -6
- package/src/components/CmdFancyBox.vue +2 -0
- package/src/components/CmdFlexibleScrollContainer.vue +2 -0
- package/src/components/CmdForm.vue +2 -0
- package/src/components/CmdFormElement.vue +11 -1
- package/src/components/CmdFormFilters.vue +2 -0
- package/src/components/CmdGoogleMaps.vue +2 -0
- package/src/components/CmdHeadline.vue +23 -1
- package/src/components/CmdIcon.vue +2 -0
- package/src/components/CmdImage.vue +3 -0
- package/src/components/CmdImageGallery.vue +3 -1
- package/src/components/CmdImageZoom.vue +2 -0
- package/src/components/CmdInnerLink.vue +2 -0
- package/src/components/CmdInputGroup.vue +2 -0
- package/src/components/CmdLink.vue +17 -10
- package/src/components/CmdList.vue +191 -99
- package/src/components/CmdListOfLinksItem.vue +2 -0
- package/src/components/CmdListOfRequirements.vue +2 -0
- package/src/components/CmdLoginForm.vue +2 -2
- package/src/components/CmdMailTool.vue +2 -0
- package/src/components/CmdMailToolEntry.vue +2 -1
- package/src/components/CmdMailToolFilter.vue +2 -0
- package/src/components/CmdMainNavigation.vue +2 -0
- package/src/components/CmdMultistepFormProgressBar.vue +35 -14
- package/src/components/CmdNewsletterSubscription.vue +2 -0
- package/src/components/CmdOpeningHours.vue +2 -0
- package/src/components/CmdOpeningHoursItem.vue +2 -0
- package/src/components/CmdPageFooter.vue +2 -0
- package/src/components/CmdPageHeader.vue +2 -0
- package/src/components/CmdPagination.vue +2 -0
- package/src/components/CmdParagraph.vue +50 -0
- package/src/components/CmdProgressBar.vue +1 -1
- package/src/components/CmdSection.vue +2 -0
- package/src/components/CmdSidebar.vue +2 -0
- package/src/components/CmdSiteFooter.vue +2 -0
- package/src/components/CmdSiteHeader.vue +2 -0
- package/src/components/CmdSiteSearch.vue +12 -1
- package/src/components/CmdSlideButton.vue +5 -4
- package/src/components/CmdSlideshow.vue +10 -1
- package/src/components/CmdSmartSearch.vue +42 -11
- package/src/components/CmdSocialNetworks.vue +2 -0
- package/src/components/CmdSocialNetworksItem.vue +2 -0
- package/src/components/CmdSwitchLanguage.vue +2 -0
- package/src/components/CmdSystemMessage.vue +10 -5
- package/src/components/CmdTable.vue +10 -6
- package/src/components/CmdTabs.vue +39 -3
- package/src/components/CmdTag.vue +101 -0
- package/src/components/CmdTextImageBlock.vue +2 -0
- package/src/components/CmdThumbnailScroller.vue +14 -3
- package/src/components/CmdToggleDarkMode.vue +2 -0
- package/src/components/CmdTooltip.vue +2 -0
- package/src/components/CmdTooltipForFormElements.vue +2 -0
- package/src/components/CmdUploadForm.vue +14 -1
- package/src/components/CmdWidthLimitationWrapper.vue +2 -0
- package/src/components/CmdFlexContainer.vue +0 -109
@@ -0,0 +1,50 @@
|
|
1
|
+
<template>
|
2
|
+
<!-- begin CmdParagraph ---------------------------------------------------------------------------------------- -->
|
3
|
+
<p
|
4
|
+
:class="['cmd-paragraph', 'text-align-' + textAlign, 'column-count-' + numberOfColumns]"
|
5
|
+
v-html="content"
|
6
|
+
>
|
7
|
+
</p>
|
8
|
+
<!-- end CmdParagraph ---------------------------------------------------------------------------------------- -->
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
export default {
|
13
|
+
name: "CmdParagraph",
|
14
|
+
props: {
|
15
|
+
/**
|
16
|
+
* provide (html-)content
|
17
|
+
*/
|
18
|
+
content: {
|
19
|
+
type: String,
|
20
|
+
required: true
|
21
|
+
},
|
22
|
+
/**
|
23
|
+
* set the number of columns
|
24
|
+
*
|
25
|
+
* @affectStyling: true
|
26
|
+
* @allowedValues: 1/"1", 2/"2", 3/"3",
|
27
|
+
*/
|
28
|
+
numberOfColumns: {
|
29
|
+
type: [String, Number],
|
30
|
+
default: 1
|
31
|
+
},
|
32
|
+
/**
|
33
|
+
* set text-align
|
34
|
+
*
|
35
|
+
* @affectStyling: partially
|
36
|
+
* @allowedValues: "left", "center", "right", "justify"
|
37
|
+
*/
|
38
|
+
textAlign: {
|
39
|
+
type: String,
|
40
|
+
default: "left",
|
41
|
+
validator(value) {
|
42
|
+
return value === "left" ||
|
43
|
+
value === "center" ||
|
44
|
+
value === "right" ||
|
45
|
+
value === "justify"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
</script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSection ---------------------------------------------------------------------------------------- -->
|
2
3
|
<section :class="['cmd-section flex-container', {box: styleAsBox, 'vertical': orientation === 'vertical'}]">
|
3
4
|
<!-- begin CmdHeadline -->
|
4
5
|
<CmdHeadline
|
@@ -15,6 +16,7 @@
|
|
15
16
|
<slot v-else></slot>
|
16
17
|
<!-- end slot -->
|
17
18
|
</section>
|
19
|
+
<!-- end CmdSection ---------------------------------------------------------------------------------------- -->
|
18
20
|
</template>
|
19
21
|
|
20
22
|
<script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSidebar ---------------------------------------------------------------------------------------- -->
|
2
3
|
<aside :class="['cmd-sidebar', wrapperClass, {'box': styledAsBox, 'collapse-to-right': !collapseToLeft}]">
|
3
4
|
<!-- begin inner-sidebar-wrapper -->
|
4
5
|
<div class="inner-sidebar-wrapper">
|
@@ -34,6 +35,7 @@
|
|
34
35
|
</a>
|
35
36
|
<!-- end column to toggle sidebar open-closed-status -->
|
36
37
|
</aside>
|
38
|
+
<!-- end CmdSidebar ---------------------------------------------------------------------------------------- -->
|
37
39
|
</template>
|
38
40
|
|
39
41
|
<script>
|
@@ -1,9 +1,11 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSiteFooter ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div class="cmd-site-footer site-footer">
|
3
4
|
<footer :class="['flex-container', {vertical: orientation === 'vertical'}]">
|
4
5
|
<slot></slot>
|
5
6
|
</footer>
|
6
7
|
</div>
|
8
|
+
<!-- end CmdSiteFooter ---------------------------------------------------------------------------------------- -->
|
7
9
|
</template>
|
8
10
|
|
9
11
|
<script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div
|
3
4
|
ref="site-header"
|
4
5
|
:class="[
|
@@ -62,6 +63,7 @@
|
|
62
63
|
/>
|
63
64
|
<!-- end CmdMainNavigation -->
|
64
65
|
</div>
|
66
|
+
<!-- end CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
65
67
|
</template>
|
66
68
|
|
67
69
|
<script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdBoxSiteSearch ---------------------------------------------------------------------------------------- -->
|
2
3
|
<fieldset class="cmd-box-site-search flex-container">
|
3
4
|
<!-- begin legend -->
|
4
5
|
<legend :class="{hidden : !legend.show, 'align-left': legend.align === 'left'}">{{ legend.text }}</legend>
|
@@ -77,7 +78,7 @@
|
|
77
78
|
<span v-if="showFilters">{{ getMessage("site_search.hide_filter_options") }}</span>
|
78
79
|
<span v-else>{{ getMessage("site_search.show_filter_options") }}</span>
|
79
80
|
</a>
|
80
|
-
<transition name="
|
81
|
+
<transition :name="transitionFilters">
|
81
82
|
<div v-if="showFilters && cmdFakeSelect?.selectData.length" class="flex-container flex-none" role="listbox" aria-expanded="true">
|
82
83
|
<!-- begin CmdFakeSelect -->
|
83
84
|
<CmdFakeSelect
|
@@ -98,6 +99,7 @@
|
|
98
99
|
<!-- begin CmdFormFilters -->
|
99
100
|
<CmdFormFilters v-if="useFilters" v-model="searchFilters" :selectedOptionsName="getOptionName"/>
|
100
101
|
<!-- end CmdFormFilters -->
|
102
|
+
<!-- end CmdBoxSiteSearch ---------------------------------------------------------------------------------------- -->
|
101
103
|
</template>
|
102
104
|
|
103
105
|
<script>
|
@@ -121,6 +123,15 @@ export default {
|
|
121
123
|
}
|
122
124
|
},
|
123
125
|
props: {
|
126
|
+
/**
|
127
|
+
* define the transition when filters disappear
|
128
|
+
*
|
129
|
+
* @allowedValues: "none", "fade", "scroll"
|
130
|
+
*/
|
131
|
+
transitionFilters: {
|
132
|
+
type: String,
|
133
|
+
default: "fade"
|
134
|
+
},
|
124
135
|
/**
|
125
136
|
* custom modelValue for first input-field
|
126
137
|
*/
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSlideButton ---------------------------------------------------------------------------------------- -->
|
2
3
|
<a href="#"
|
3
4
|
@click.prevent
|
4
5
|
:class="['cmd-slide-button', 'button', 'keep-behavior-on-small-devices', slideButtonType]"
|
@@ -7,6 +8,7 @@
|
|
7
8
|
<CmdIcon :type="getDirection.iconType || 'auto'" :iconClass="getDirection.iconClass || 'right'" />
|
8
9
|
<!-- end CmdIcon -->
|
9
10
|
</a>
|
11
|
+
<!-- end CmdSlideButton ---------------------------------------------------------------------------------------- -->
|
10
12
|
</template>
|
11
13
|
|
12
14
|
<script>
|
@@ -75,14 +77,15 @@ export default {
|
|
75
77
|
}
|
76
78
|
</script>
|
77
79
|
|
78
|
-
<style
|
80
|
+
<style>
|
79
81
|
/* begin cmd-slide-button ---------------------------------------------------------------------------------------- */
|
80
82
|
.cmd-slide-button {
|
81
83
|
&.button {
|
82
84
|
font-size: 2rem;
|
83
85
|
z-index: 10;
|
84
|
-
height: 100%;
|
85
86
|
position: absolute;
|
87
|
+
top: 50%;
|
88
|
+
transform: translateY(-50%);
|
86
89
|
display: flex;
|
87
90
|
justify-content: center;
|
88
91
|
text-decoration: none;
|
@@ -95,12 +98,10 @@ export default {
|
|
95
98
|
|
96
99
|
&.left {
|
97
100
|
left: 0;
|
98
|
-
top: 0;
|
99
101
|
}
|
100
102
|
|
101
103
|
&.right {
|
102
104
|
right: 0;
|
103
|
-
top: 0;
|
104
105
|
}
|
105
106
|
|
106
107
|
&.up, &.down {
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<!-- end CmdSlideButton -->
|
13
13
|
|
14
14
|
<!-- begin area to slide -->
|
15
|
-
<transition-group name="
|
15
|
+
<transition-group :name="transition">
|
16
16
|
<template v-if="currentItem">
|
17
17
|
<template v-if="!useSlot">
|
18
18
|
<template v-if="!editModeContext">
|
@@ -103,6 +103,15 @@ export default {
|
|
103
103
|
}
|
104
104
|
},
|
105
105
|
props: {
|
106
|
+
/**
|
107
|
+
* define the transition when images change
|
108
|
+
*
|
109
|
+
* @allowedValues: "none", "fade", "scroll"
|
110
|
+
*/
|
111
|
+
transition: {
|
112
|
+
type: String,
|
113
|
+
default: "fade"
|
114
|
+
},
|
106
115
|
/**
|
107
116
|
* use slot for images
|
108
117
|
*/
|
@@ -76,6 +76,13 @@ export default {
|
|
76
76
|
openListToTop: {
|
77
77
|
type: Boolean,
|
78
78
|
default: false
|
79
|
+
},
|
80
|
+
/**
|
81
|
+
* allows user to enter a new term, that is not included in the listOfRecommendations-property
|
82
|
+
*/
|
83
|
+
allowUserToEnterNewTerm: {
|
84
|
+
type: Boolean,
|
85
|
+
default: true
|
79
86
|
}
|
80
87
|
},
|
81
88
|
computed: {
|
@@ -107,28 +114,36 @@ export default {
|
|
107
114
|
methods: {
|
108
115
|
showRecommendations() {
|
109
116
|
this.item = {} // reset item
|
110
|
-
if(typeof this.modelValue === "string") {
|
111
|
-
this.$emit("update:modelValue", "")
|
112
|
-
} else {
|
113
|
-
this.$emit("update:modelValue", {itemId: "", displayValue: ""})
|
114
|
-
}
|
115
|
-
|
116
117
|
this.showListOfRecommendations = true
|
117
118
|
},
|
118
119
|
optionSelected(item) {
|
119
120
|
this.searchTerm = item.displayValue // set search-field to selected option
|
120
121
|
this.showListOfRecommendations = false
|
121
|
-
|
122
|
-
this.$emit("update:modelValue", item.displayValue)
|
123
|
-
} else {
|
124
|
-
this.$emit("update:modelValue", {itemId: item.id, displayValue: item.displayValue})
|
125
|
-
}
|
122
|
+
this.emitValue(item)
|
126
123
|
},
|
127
124
|
linkItem(item) {
|
128
125
|
return {
|
129
126
|
...item,
|
130
127
|
text: item.displayValue
|
131
128
|
}
|
129
|
+
},
|
130
|
+
emitValue(item) {
|
131
|
+
let entryOfRecommendations = null
|
132
|
+
|
133
|
+
if(typeof item === "string") {
|
134
|
+
entryOfRecommendations = this.listOfRecommendations.find((entry) => {
|
135
|
+
return entry.displayValue === item
|
136
|
+
})
|
137
|
+
}
|
138
|
+
|
139
|
+
const displayValue = typeof item === "string" ? item : item.displayValue
|
140
|
+
|
141
|
+
if(typeof this.modelValue === "string") {
|
142
|
+
this.$emit("update:modelValue", displayValue)
|
143
|
+
} else {
|
144
|
+
// modelValue is object, check if it exist as entry in listOfRecommendations and emit id and displayValue, if just a string is ented, emit id: 0 and the displayValue
|
145
|
+
this.$emit("update:modelValue", {id: entryOfRecommendations ? entryOfRecommendations.id : (typeof item === "string" ? 0 : item.id), displayValue})
|
146
|
+
}
|
132
147
|
}
|
133
148
|
},
|
134
149
|
watch: {
|
@@ -136,6 +151,22 @@ export default {
|
|
136
151
|
if(!this.searchTerm.length) {
|
137
152
|
this.showListOfRecommendations = false
|
138
153
|
}
|
154
|
+
if(this.allowUserToEnterNewTerm) {
|
155
|
+
this.emitValue(this.searchTerm)
|
156
|
+
}
|
157
|
+
},
|
158
|
+
modelValue: {
|
159
|
+
handler() {
|
160
|
+
if(typeof this.modelValue === "string") {
|
161
|
+
this.searchTerm = this.modelValue
|
162
|
+
} else {
|
163
|
+
const idExists = this.listOfRecommendations.find((entry) => {
|
164
|
+
return entry.id === this.modelValue?.id
|
165
|
+
})
|
166
|
+
this.searchTerm = idExists?.displayValue || this.modelValue?.displayValue || ""
|
167
|
+
}
|
168
|
+
},
|
169
|
+
immediate: true
|
139
170
|
}
|
140
171
|
}
|
141
172
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSocialNetworks ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div :class="['cmd-social-networks', {'stretch': stretchButtons}, alignment]">
|
3
4
|
<!-- begin CmdHeadline -->
|
4
5
|
<CmdHeadline
|
@@ -64,6 +65,7 @@
|
|
64
65
|
</button>
|
65
66
|
<!-- end list of networks -->
|
66
67
|
</div>
|
68
|
+
<!-- end CmdSocialNetworks ---------------------------------------------------------------------------------------- -->
|
67
69
|
</template>
|
68
70
|
|
69
71
|
<script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSocialNetworksItem ---------------------------------------------------------------------------------------- -->
|
2
3
|
<li class="cmd-social-networks-item">
|
3
4
|
<a
|
4
5
|
:key="network.path"
|
@@ -15,6 +16,7 @@
|
|
15
16
|
<span v-if="network.linkText">{{ network.linkText }}</span>
|
16
17
|
</a>
|
17
18
|
</li>
|
19
|
+
<!-- end CmdSocialNetworksItem ---------------------------------------------------------------------------------------- -->
|
18
20
|
</template>
|
19
21
|
|
20
22
|
<script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdSwitchLanguage ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div class="cmd-switch-language">
|
3
4
|
<ul>
|
4
5
|
<li v-for="(language, index) in languages" :key="index">
|
@@ -25,6 +26,7 @@
|
|
25
26
|
</li>
|
26
27
|
</ul>
|
27
28
|
</div>
|
29
|
+
<!-- end CmdSwitchLanguage ---------------------------------------------------------------------------------------- -->
|
28
30
|
</template>
|
29
31
|
|
30
32
|
<script>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<template>
|
2
|
-
|
2
|
+
<!-- begin CmdSystemMessage ---------------------------------------------------------------------------------------- -->
|
3
|
+
<transition :name="transition">
|
3
4
|
<div
|
4
5
|
v-if="showSystemMessage"
|
5
6
|
:class="['cmd-system-message', 'system-message', 'flex-container', 'vertical', { 'full-width': fullWidth }, validationStatus]"
|
@@ -35,6 +36,7 @@
|
|
35
36
|
<!-- end slot-content -->
|
36
37
|
</div>
|
37
38
|
</transition>
|
39
|
+
<!-- end CmdSystemMessage ---------------------------------------------------------------------------------------- -->
|
38
40
|
</template>
|
39
41
|
|
40
42
|
<script>
|
@@ -51,11 +53,13 @@ export default {
|
|
51
53
|
},
|
52
54
|
props: {
|
53
55
|
/**
|
54
|
-
*
|
56
|
+
* define the transition when system message disappears
|
57
|
+
*
|
58
|
+
* @allowedValues: "none", "fade", "scroll"
|
55
59
|
*/
|
56
|
-
|
57
|
-
type:
|
58
|
-
default:
|
60
|
+
transition: {
|
61
|
+
type: String,
|
62
|
+
default: "fade"
|
59
63
|
},
|
60
64
|
/**
|
61
65
|
* validation-status for the message-box
|
@@ -156,6 +160,7 @@ export default {
|
|
156
160
|
display: inline-flex;
|
157
161
|
margin: var(--default-margin) 0;
|
158
162
|
align-items: center;
|
163
|
+
align-self: flex-start; /* if used in flex-container component should not be stretched */
|
159
164
|
|
160
165
|
> :last-child {
|
161
166
|
margin-bottom: 0;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdTableWrapper ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div
|
3
4
|
:class="['cmd-table-wrapper', {'collapsed': !showTableData, 'full-width': fullWidth, 'has-caption': hasCaption, 'has-overflow': hasOverflow}]">
|
4
5
|
<div v-if="collapsible || userCanToggleWidth" class="button-wrapper">
|
@@ -48,7 +49,7 @@
|
|
48
49
|
</tr>
|
49
50
|
</thead>
|
50
51
|
</slot>
|
51
|
-
<transition :name="
|
52
|
+
<transition :name="transition">
|
52
53
|
<slot name="table-body">
|
53
54
|
<tbody v-show="showTableData" aria-expanded="true">
|
54
55
|
<tr :class="{'active' : tableData.rowIndexHighlighted === indexRows}"
|
@@ -60,7 +61,7 @@
|
|
60
61
|
</tbody>
|
61
62
|
</slot>
|
62
63
|
</transition>
|
63
|
-
<transition :name="
|
64
|
+
<transition :name="transition">
|
64
65
|
<slot name="table-foot">
|
65
66
|
<tfoot v-if="tableData.tfoot && tableData.tfoot.length && showTableData" aria-expanded="true">
|
66
67
|
<tr>
|
@@ -82,6 +83,7 @@
|
|
82
83
|
<!-- end CmdSlideButton -->
|
83
84
|
</div>
|
84
85
|
</div>
|
86
|
+
<!-- end CmdTableWrapper ---------------------------------------------------------------------------------------- -->
|
85
87
|
</template>
|
86
88
|
|
87
89
|
<script>
|
@@ -98,11 +100,13 @@ export default {
|
|
98
100
|
},
|
99
101
|
props: {
|
100
102
|
/**
|
101
|
-
*
|
103
|
+
* define the transition for table-body and -footer when collapsible table-data is used
|
104
|
+
*
|
105
|
+
* @allowedValues: "none", "fade", "scroll"
|
102
106
|
*/
|
103
|
-
|
104
|
-
type:
|
105
|
-
default:
|
107
|
+
transition: {
|
108
|
+
type: String,
|
109
|
+
default: "fade"
|
106
110
|
},
|
107
111
|
/**
|
108
112
|
* table data (incl. caption, thead, tbody)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
|
2
|
+
<!-- begin CmdTabs ---------------------------------------------------------------------------------------- -->
|
3
|
+
<div :class="['cmd-tabs', highlightLevel]">
|
3
4
|
<!-- being tab-list -->
|
4
5
|
<ul :class="{'stretch-tabs' : stretchTabs}" role="tablist">
|
5
6
|
<li v-for="(tab, index) in tabs" :class="{active : showTab === index}" :key="index" role="tab">
|
6
|
-
<a href="#" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined">
|
7
|
+
<a href="#" :class="highlightLevel" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined">
|
7
8
|
<!-- begin CmdIcon -->
|
8
9
|
<CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass" :type="tab.iconType" />
|
9
10
|
<!-- end CmdIcon -->
|
@@ -40,6 +41,7 @@
|
|
40
41
|
</div>
|
41
42
|
<!-- end tab-content -->
|
42
43
|
</div>
|
44
|
+
<!-- end CmdTabs ---------------------------------------------------------------------------------------- -->
|
43
45
|
</template>
|
44
46
|
|
45
47
|
<script>
|
@@ -88,6 +90,21 @@ export default {
|
|
88
90
|
type: Boolean,
|
89
91
|
default: false
|
90
92
|
},
|
93
|
+
/**
|
94
|
+
* set highlight-level for tabs
|
95
|
+
*
|
96
|
+
* @allowedValues: "none", "primary", "secondary", "tertiary"
|
97
|
+
*/
|
98
|
+
highlightLevel: {
|
99
|
+
type: Boolean,
|
100
|
+
default: "primary",
|
101
|
+
validator(value) {
|
102
|
+
return value === "none" ||
|
103
|
+
value === "primary" ||
|
104
|
+
value === "secondary" ||
|
105
|
+
value === "tertiary"
|
106
|
+
}
|
107
|
+
},
|
91
108
|
/**
|
92
109
|
* set default active/shown tab
|
93
110
|
*/
|
@@ -202,17 +219,36 @@ export default {
|
|
202
219
|
|
203
220
|
> div {
|
204
221
|
padding: var(--default-padding);
|
205
|
-
border: var(--
|
222
|
+
border: var(--default-border);
|
206
223
|
border-radius: var(--default-border-radius);
|
207
224
|
background: var(--color-scheme-background);
|
208
225
|
border-top-left-radius: 0;
|
209
226
|
|
227
|
+
|
210
228
|
> div {
|
211
229
|
*:last-child {
|
212
230
|
margin-bottom: 0;
|
213
231
|
}
|
214
232
|
}
|
215
233
|
}
|
234
|
+
|
235
|
+
&.primary {
|
236
|
+
& > div {
|
237
|
+
border-color: var(--primary-color);
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
&.secondary {
|
242
|
+
& > div {
|
243
|
+
border-color: var(--secondary-color);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
&.tertiary {
|
248
|
+
& > div {
|
249
|
+
border-color: var(--tertiary-color);
|
250
|
+
}
|
251
|
+
}
|
216
252
|
}
|
217
253
|
|
218
254
|
/* end cmd-tabs ------------------------------------------------------------------------------------------ */
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<template>
|
2
|
+
<!-- begin CmdTag ---------------------------------------------------------------------------------------- -->
|
3
|
+
<small v-if="showTag" :class="['cmd-tag tag', highlightLevel]" ref="tag">
|
4
|
+
<slot>
|
5
|
+
<span>{{ tagText }}</span>
|
6
|
+
<a v-if="removeTagByClick" href="#" @click.prevent="removeTag">
|
7
|
+
<!-- begin CmdIcon -->
|
8
|
+
<CmdIcon v-bind="cmdIcon" />
|
9
|
+
<!-- end CmdIcon -->
|
10
|
+
</a>
|
11
|
+
</slot>
|
12
|
+
</small>
|
13
|
+
<!-- end CmdTag ---------------------------------------------------------------------------------------- -->
|
14
|
+
</template>
|
15
|
+
|
16
|
+
<script>
|
17
|
+
export default {
|
18
|
+
name: "CmdTag",
|
19
|
+
emits: ["click"],
|
20
|
+
data() {
|
21
|
+
return {
|
22
|
+
showTag: true
|
23
|
+
}
|
24
|
+
},
|
25
|
+
props: {
|
26
|
+
/**
|
27
|
+
* the displayed text of the tag
|
28
|
+
*/
|
29
|
+
tagText: {
|
30
|
+
type: String,
|
31
|
+
required: true
|
32
|
+
},
|
33
|
+
/**
|
34
|
+
* enable removing the tag by click
|
35
|
+
*/
|
36
|
+
removeTagByClick: {
|
37
|
+
type: Boolean,
|
38
|
+
default: false
|
39
|
+
},
|
40
|
+
/**
|
41
|
+
* set highlight-level for tag
|
42
|
+
*
|
43
|
+
* @allowedValues: "none", "primary", "secondary", "tertiary"
|
44
|
+
*/
|
45
|
+
highlightLevel: {
|
46
|
+
type: Boolean,
|
47
|
+
default: "none",
|
48
|
+
validator(value) {
|
49
|
+
return value === "none" ||
|
50
|
+
value === "primary" ||
|
51
|
+
value === "secondary" ||
|
52
|
+
value === "tertiary"
|
53
|
+
}
|
54
|
+
},
|
55
|
+
/**
|
56
|
+
* properties for CmdIcon-component
|
57
|
+
*/
|
58
|
+
cmdIcon: {
|
59
|
+
type: Object,
|
60
|
+
default: function () {
|
61
|
+
return {
|
62
|
+
iconClass: "icon-cancel-circle",
|
63
|
+
tooltip: "Back to top",
|
64
|
+
iconType: "auto"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
},
|
69
|
+
methods: {
|
70
|
+
removeTag() {
|
71
|
+
const event = {
|
72
|
+
prevented: false,
|
73
|
+
preventDefault() {
|
74
|
+
this.prevented = true
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
this.$emit("click", event)
|
79
|
+
|
80
|
+
if (!event.prevented) {
|
81
|
+
this.showTag = false
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
</script>
|
87
|
+
|
88
|
+
<style>
|
89
|
+
/* begin cmd-tag ------------------------------------------------------------------------------------------ */
|
90
|
+
.cmd-tag {
|
91
|
+
align-self: start; /* if used in vertical flex-container */
|
92
|
+
gap: var(--default-gap-half);
|
93
|
+
|
94
|
+
.primary, .secondary, .tertiary {
|
95
|
+
span[class*="icon-"] {
|
96
|
+
color: var(--color-white);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
/* end cmd-tag ------------------------------------------------------------------------------------------ */
|
101
|
+
</style>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<!-- begin CmdTextImageBlock ---------------------------------------------------------------------------------------- -->
|
2
3
|
<div :class="['cmd-text-image-block flex-container', orientation]">
|
3
4
|
<!-- begin cmdHeadline -->
|
4
5
|
<CmdHeadline
|
@@ -57,6 +58,7 @@
|
|
57
58
|
</EditComponentWrapper>
|
58
59
|
<!-- end edit-mode -->
|
59
60
|
</div>
|
61
|
+
<!-- end CmdTextImageBlock ---------------------------------------------------------------------------------------- -->
|
60
62
|
</template>
|
61
63
|
|
62
64
|
<script>
|